[longomatch] Fix source device selection in the camera capturer
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Fix source device selection in the camera capturer
- Date: Thu, 8 Jul 2010 21:38:39 +0000 (UTC)
commit 7c64fe444bda55d9d5e3d6a7103b9873669ebc33
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Thu Jul 8 22:33:26 2010 +0200
Fix source device selection in the camera capturer
libcesarplayer/src/gst-camera-capturer.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/libcesarplayer/src/gst-camera-capturer.c b/libcesarplayer/src/gst-camera-capturer.c
index e8fff73..40d8e40 100644
--- a/libcesarplayer/src/gst-camera-capturer.c
+++ b/libcesarplayer/src/gst-camera-capturer.c
@@ -315,8 +315,12 @@ gst_camera_capturer_set_device_id (GstCameraCapturer * gcc,
{
gcc->priv->device_id = g_strdup (device_id);
#ifdef WIN32
- /* On windows the source is always dshowvideosrc */
- g_object_set (gcc->priv->videosrc, "device-name", device_id, NULL);
+ {
+ GstElement *source;
+ source =
+ gst_bin_get_by_name (GST_BIN (gcc->priv->videosrc), "source_device");
+ g_object_set (source, "device-name", device_id, NULL);
+ }
#else
/* On linux it only makes sense to set the device id
* for the dv1394src element because the gconf one can be set
@@ -325,7 +329,7 @@ gst_camera_capturer_set_device_id (GstCameraCapturer * gcc,
GstElement *source;
source =
- gst_bin_get_by_name (GST_BIN (gcc->priv->videosrc), "source_element");
+ gst_bin_get_by_name (GST_BIN (gcc->priv->videosrc), "source_device");
g_object_set (source, "guid", g_ascii_strtoull (device_id, NULL, 10), NULL);
}
#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]