[longomatch] Fix device selection on windows
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Fix device selection on windows
- Date: Fri, 14 Dec 2012 20:35:15 +0000 (UTC)
commit 5950159f8b092172f5130f3ef7bc792d6159cb1b
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Fri Dec 14 21:33:47 2012 +0100
Fix device selection on windows
libcesarplayer/gst-camera-capturer.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/libcesarplayer/gst-camera-capturer.c b/libcesarplayer/gst-camera-capturer.c
index b45bc08..e055d84 100644
--- a/libcesarplayer/gst-camera-capturer.c
+++ b/libcesarplayer/gst-camera-capturer.c
@@ -1316,7 +1316,14 @@ gst_camera_capturer_create_video_source (GstCameraCapturer * gcc,
g_assert_not_reached();
}
- source_str = g_strdup_printf("%s name=source ! typefind name=typefind", source_desc);
+ /* HACK: dshowvideosrc's device must be set before linking the element
+ * since the device is set in getcaps and can't be changed later */
+ if (!g_strcmp0 (gcc->priv->source_element_name, "dshowvideosrc"))
+ source_str = g_strdup_printf("%s device-name=\"%s\" name=source ! typefind name=typefind",
+ source_desc, gcc->priv->device_id);
+ else
+ source_str = g_strdup_printf("%s name=source ! typefind name=typefind", source_desc);
+ GST_INFO_OBJECT(gcc, "Created video source %s", source_str);
gcc->priv->source_bin = gst_parse_bin_from_description(source_str, TRUE, NULL);
g_free(source_str);
if (!gcc->priv->source_bin) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]