[longomatch] Initialize source type as NONE and then use the default source type at create time
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Initialize source type as NONE and then use the default source type at create time
- Date: Sun, 30 May 2010 23:18:10 +0000 (UTC)
commit bdac9c3c74329936712cb914ec8dcc8e90e5f7da
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Sat May 22 21:09:43 2010 +0200
Initialize source type as NONE and then use the default source type at create time
libcesarplayer/src/gst-camera-capturer.c | 5 +++--
libcesarplayer/src/gst-camera-capturer.h | 5 +++--
2 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/libcesarplayer/src/gst-camera-capturer.c b/libcesarplayer/src/gst-camera-capturer.c
index 5ff5af1..cff79a7 100644
--- a/libcesarplayer/src/gst-camera-capturer.c
+++ b/libcesarplayer/src/gst-camera-capturer.c
@@ -169,7 +169,7 @@ gst_camera_capturer_init (GstCameraCapturer * object)
priv->audio_bitrate = 128;
priv->video_bitrate = 5000;
priv->last_buffer = NULL;
- priv->source_type = GST_CAMERA_CAPTURE_SOURCE_TYPE_RAW;
+ priv->source_type = GST_CAMERA_CAPTURE_SOURCE_TYPE_NONE;
priv->lock = g_mutex_new ();
}
@@ -860,6 +860,7 @@ gst_camera_capturer_set_source (GstCameraCapturer * gcc,
gcc->priv->audiosrc = gcc->priv->videosrc;
}
case GST_CAMERA_CAPTURE_SOURCE_TYPE_RAW:
+ default:
{
#ifdef WIN32
source_element = "dshowvideosrc";
@@ -905,7 +906,7 @@ gst_camera_capturer_new (gchar * filename, GError ** err)
g_object_set (gcc->priv->camerabin, "mode", 1, NULL);
GST_INFO_OBJECT (gcc, "Setting video/audio source ");
- gst_camera_capturer_set_source (gcc, gcc->priv->source_type, err);
+ gst_camera_capturer_set_source (gcc, DEFAULT_SOURCE_TYPE, err);
if (*err != NULL) {
return NULL;
}
diff --git a/libcesarplayer/src/gst-camera-capturer.h b/libcesarplayer/src/gst-camera-capturer.h
index fe62799..3e17566 100644
--- a/libcesarplayer/src/gst-camera-capturer.h
+++ b/libcesarplayer/src/gst-camera-capturer.h
@@ -65,8 +65,9 @@ struct _GstCameraCapturer
typedef enum
{
- GST_CAMERA_CAPTURE_SOURCE_TYPE_DV,
- GST_CAMERA_CAPTURE_SOURCE_TYPE_RAW
+ GST_CAMERA_CAPTURE_SOURCE_TYPE_NONE = 0,
+ GST_CAMERA_CAPTURE_SOURCE_TYPE_DV = 1,
+ GST_CAMERA_CAPTURE_SOURCE_TYPE_RAW = 2
}GstCameraCaptureSourceType;
EXPORT GType gst_camera_capturer_get_type (void) G_GNUC_CONST;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]