[longomatch] Fix default elements for OS X
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Fix default elements for OS X
- Date: Sat, 8 Sep 2012 23:11:20 +0000 (UTC)
commit e897fb86df8054edff9077b88d31a9d9126e2568
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Sun Sep 9 01:10:57 2012 +0200
Fix default elements for OS X
configure.ac | 3 +++
libcesarplayer/bacon-video-widget-gst-0.10.c | 7 +++++--
libcesarplayer/gst-camera-capturer.c | 10 +++++++---
3 files changed, 15 insertions(+), 5 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 5a21516..2030dc5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -93,11 +93,14 @@ ostype=""
case "$host" in
*-*-mingw*|*-*-cygwin*)
ostype=Windows
+ AC_DEFINE(OSTYPE_WINDOWS)
;;
*-*-darwin*)
+ AC_DEFINE(OSTYPE_OS_X)
ostype=OS_X
;;
*-*-linux*)
+ AC_DEFINE(OSTYPE_LINUX)
ostype=Linux
;;
esac
diff --git a/libcesarplayer/bacon-video-widget-gst-0.10.c b/libcesarplayer/bacon-video-widget-gst-0.10.c
index 1b72513..e8bbe24 100644
--- a/libcesarplayer/bacon-video-widget-gst-0.10.c
+++ b/libcesarplayer/bacon-video-widget-gst-0.10.c
@@ -70,10 +70,13 @@
#include <gtk/gtk.h>
-#ifdef WIN32
+#if defined(OSTYPE_WINDOWS)
#define DEFAULT_VIDEO_SINK "autovideosink"
#define BACKUP_VIDEO_SINK "autovideosink"
-#else
+#elif defined(OSTYPE_OS_X)
+#define DEFAULT_VIDEO_SINK "autovideosink"
+#define BACKUP_VIDEO_SINK "autovideosink"
+#elif defined(OSTYPE_LINUX)
#define DEFAULT_VIDEO_SINK "gsettingsvideosink"
#define BACKUP_VIDEO_SINK "autovideosink"
#endif
diff --git a/libcesarplayer/gst-camera-capturer.c b/libcesarplayer/gst-camera-capturer.c
index cebcb0e..0cee4dd 100644
--- a/libcesarplayer/gst-camera-capturer.c
+++ b/libcesarplayer/gst-camera-capturer.c
@@ -34,11 +34,15 @@
#include "gstscreenshot.h"
/*Default video source*/
-#ifdef WIN32
+#if defined(OSTYPE_WINDOWS)
#define DVVIDEOSRC "dshowvideosrc"
#define RAWVIDEOSRC "dshowvideosrc"
#define AUDIOSRC "dshowaudiosrc"
-#else
+#elif defined(OSTYPE_OS_X)
+#define DVVIDEOSRC "osxvideosrc"
+#define RAWVIDEOSRC "osxvideosrc"
+#define AUDIOSRC "osxaudiosrc"
+#elif defined(OSTYPE_LINUX)
#define DVVIDEOSRC "dv1394src"
#define RAWVIDEOSRC "gsettingsvideosrc"
#define AUDIOSRC "gsettingsaudiosrc"
@@ -1065,7 +1069,7 @@ gst_camera_capturer_set_source (GstCameraCapturer * gcc,
{
gchar *videosrc = RAWVIDEOSRC;
-#ifndef WIN32
+#if defined(OSTYPE_WINDOWS)
GstElementFactory *fact = gst_element_factory_find(RAWVIDEOSRC);
if (fact == NULL)
videosrc = RAWVIDEOSRC_GCONF;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]