[longomatch/camera_capturer] Cleanup



commit af24f632d995c8d40d4dede3578551f1479a390b
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Tue Oct 2 22:12:35 2012 +0200

    Cleanup

 libcesarplayer/bacon-video-widget-gst-0.10.c |   10 --------
 libcesarplayer/common.h                      |   30 ++++++++++++++++++++++++++
 libcesarplayer/gst-camera-capturer.c         |   24 +-------------------
 libcesarplayer/video-utils.c                 |   29 ++++++++++++++++++++++++-
 libcesarplayer/video-utils.h                 |   28 ++++++++++++++++++++++++
 5 files changed, 88 insertions(+), 33 deletions(-)
---
diff --git a/libcesarplayer/bacon-video-widget-gst-0.10.c b/libcesarplayer/bacon-video-widget-gst-0.10.c
index c312927..2f0aa6f 100644
--- a/libcesarplayer/bacon-video-widget-gst-0.10.c
+++ b/libcesarplayer/bacon-video-widget-gst-0.10.c
@@ -67,16 +67,6 @@
 #include <gtk/gtk.h>
 
 
-#if defined(OSTYPE_WINDOWS)
-#define DEFAULT_VIDEO_SINK "autovideosink"
-#define BACKUP_VIDEO_SINK "autovideosink"
-#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
 #include <gio/gio.h>
 #include <glib/gi18n.h>
 
diff --git a/libcesarplayer/common.h b/libcesarplayer/common.h
index 09b8e56..de7999b 100644
--- a/libcesarplayer/common.h
+++ b/libcesarplayer/common.h
@@ -17,6 +17,35 @@
  *
  */
 
+#ifndef __LIBCESARPLAYER_COMMON_H__
+#define __LIBCESARPLAYER_COMMON_H__
+
+/* Default video/audio sinks */
+#if defined(OSTYPE_WINDOWS)
+#define DEFAULT_VIDEO_SINK "autovideosink"
+#define BACKUP_VIDEO_SINK "autovideosink"
+#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
+
+/*Default video/audio source*/
+#if defined(OSTYPE_WINDOWS)
+#define DVVIDEOSRC "dshowvideosrc"
+#define SYSVIDEOSRC "dshowvideosrc"
+#define AUDIOSRC "dshowaudiosrc"
+#elif defined(OSTYPE_OS_X)
+#define DVVIDEOSRC "dv1394src"
+#define SYSVIDEOSRC "osxvideosrc"
+#define AUDIOSRC "osxaudiosrc"
+#elif defined(OSTYPE_LINUX)
+#define DVVIDEOSRC "dv1394src"
+#define SYSVIDEOSRC "gsettingsvideosrc"
+#define AUDIOSRC "gsettingsaudiosrc"
+#endif
 
 /**
  * Error:
@@ -105,3 +134,4 @@ typedef enum
   VIDEO_MUXER_WEBM
 } VideoMuxerType;
 
+#endif
diff --git a/libcesarplayer/gst-camera-capturer.c b/libcesarplayer/gst-camera-capturer.c
index 0ec13af..a0a1d18 100644
--- a/libcesarplayer/gst-camera-capturer.c
+++ b/libcesarplayer/gst-camera-capturer.c
@@ -32,22 +32,9 @@
 
 #include "gst-camera-capturer.h"
 #include "gstscreenshot.h"
+#include "common.h"
 #include "video-utils.h"
 
-/*Default video source*/
-#if defined(OSTYPE_WINDOWS)
-#define DVVIDEOSRC "dshowvideosrc"
-#define SYSVIDEOSRC "dshowvideosrc"
-#define AUDIOSRC "dshowaudiosrc"
-#elif defined(OSTYPE_OS_X)
-#define DVVIDEOSRC "dv1394src"
-#define SYSVIDEOSRC "osxvideosrc"
-#define AUDIOSRC "osxaudiosrc"
-#elif defined(OSTYPE_LINUX)
-#define DVVIDEOSRC "dv1394src"
-#define SYSVIDEOSRC "gsettingsvideosrc"
-#define AUDIOSRC "gsettingsaudiosrc"
-#endif
 
 /* gtk+/gnome */
 #include <gdk/gdk.h>
@@ -60,12 +47,6 @@
 #endif
 #include <gtk/gtk.h>
 
-#ifdef WIN32
-#define DEFAULT_SOURCE_TYPE  GST_CAMERA_CAPTURE_SOURCE_TYPE_DSHOW
-#else
-#define DEFAULT_SOURCE_TYPE  GST_CAMERA_CAPTURE_SOURCE_TYPE_RAW
-#endif
-
 GST_DEBUG_CATEGORY (_cesarplayer_gst_debug_cat);
 #define GST_CAT_DEFAULT _cesarplayer_gst_debug_cat
 
@@ -181,7 +162,6 @@ static void gcc_element_msg_sync (GstBus * bus, GstMessage * msg,
     gpointer data);
 static void gcc_update_interface_implementations (GstCameraCapturer * gcc);
 static int gcc_get_video_stream_info (GstCameraCapturer * gcc);
-static void gst_camera_capturer_link_encoder_bin (GstCameraCapturer *gcc);
 
 G_DEFINE_TYPE (GstCameraCapturer, gst_camera_capturer, GTK_TYPE_EVENT_BOX);
 
@@ -920,7 +900,7 @@ gst_camera_capture_videosrc_buffer_probe (GstPad * pad, GstBuffer * buf,
 }
 
 static void
-gst_camera_capturer_update_device_id(GstCameraCapturer *gcc)
+gst_camera_capturer_update_device_id (GstCameraCapturer *gcc)
 {
   /*FIXME */
 }
diff --git a/libcesarplayer/video-utils.c b/libcesarplayer/video-utils.c
index d6fc907..43cdf35 100644
--- a/libcesarplayer/video-utils.c
+++ b/libcesarplayer/video-utils.c
@@ -1,4 +1,31 @@
-
+/* 
+ * Copyright (C) 2003-2007 the GStreamer project
+ *      Julien Moutte <julien moutte net>
+ *      Ronald Bultje <rbultje ronald bitfreak net>
+ * Copyright (C) 2005-2008 Tim-Philipp MÃller <tim centricular net>
+ * Copyright (C) 2009 Sebastian DrÃge <sebastian droege collabora co uk>
+ * Copyright (C) 2009  Andoni Morales Alastruey <ylatuya gmail com> 
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The Totem project hereby grant permission for non-gpl compatible GStreamer
+ * plugins to be used and distributed together with GStreamer and Totem. This
+ * permission is above and beyond the permissions granted by the GPL license
+ * Totem is covered by.
+ *
+ */
 
 #include "video-utils.h"
 
diff --git a/libcesarplayer/video-utils.h b/libcesarplayer/video-utils.h
index f00c9f0..ee87196 100644
--- a/libcesarplayer/video-utils.h
+++ b/libcesarplayer/video-utils.h
@@ -1,3 +1,31 @@
+/* 
+ * Copyright (C) 2003-2007 the GStreamer project
+ *      Julien Moutte <julien moutte net>
+ *      Ronald Bultje <rbultje ronald bitfreak net>
+ * Copyright (C) 2005-2008 Tim-Philipp MÃller <tim centricular net>
+ * Copyright (C) 2009 Sebastian DrÃge <sebastian droege collabora co uk>
+ * Copyright (C) 2009  Andoni Morales Alastruey <ylatuya gmail com> 
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The Totem project hereby grant permission for non-gpl compatible GStreamer
+ * plugins to be used and distributed together with GStreamer and Totem. This
+ * permission is above and beyond the permissions granted by the GPL license
+ * Totem is covered by.
+ *
+ */
 
 #include <gst/gst.h>
 #include <gst/interfaces/xoverlay.h>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]