[longomatch] Link the source with the supported caps



commit 780b2977f9d5bfdf641a185f42a87c27a451edfd
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Wed Jul 28 00:05:10 2010 +0200

    Link the source with the supported caps
    
    dshowvideosrc expose "video/x-dv, systemstream=false" but the device only
    supports muxed dv stream.

 libcesarplayer/src/gst-camera-capturer.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/libcesarplayer/src/gst-camera-capturer.c b/libcesarplayer/src/gst-camera-capturer.c
index 9765b6f..b7277db 100644
--- a/libcesarplayer/src/gst-camera-capturer.c
+++ b/libcesarplayer/src/gst-camera-capturer.c
@@ -990,6 +990,7 @@ gst_camera_capture_create_dshow_source_bin (GstCameraCapturer * gcc)
   GstElement *videorate;
   GstElement *videoscale;
   GstPad *src_pad;
+  GstCaps *source_caps; 
 
   bin = gst_bin_new ("videosource");
   source = gst_element_factory_make (DVVIDEOSRC, "source_device");
@@ -1006,7 +1007,9 @@ gst_camera_capture_create_dshow_source_bin (GstCameraCapturer * gcc)
 
   gst_bin_add_many (GST_BIN (bin), source, decoder, colorspace,
       deinterlacer, videorate, videoscale, NULL);
-  gst_element_link (source, decoder);
+  source_caps = gst_caps_from_string ("video/x-dv, systemstream=true;" 
+      "video/x-raw-rgb; video/x-raw-yuv");
+  gst_element_link_filtered (source, decoder, source_caps);
   gst_element_link_many (colorspace, deinterlacer, videorate, videoscale, NULL);
 
   g_signal_connect (decoder, "pad-added", G_CALLBACK (cb_new_pad), bin);



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