[gst-devel] video box connection

progDes desvid at mail.ru
Fri Oct 8 10:09:42 CEST 2010


Hello.

I'm newbie in GStreamer. And now just need to do a little fix in the code
that other developer did. But I have problems with that. Just not to talk a
lot - 2 code snippets.

This works fine, this is original code (error checks are removed to be
clear):

m_pipeline = gst_element_factory_make("playbin2", "playbin");
m_videosink = gst_element_factory_make ("dshowvideosink", "videosink");
g_object_set(G_OBJECT(m_pipeline), "video-sink", m_videosink, NULL);

Now I need to insert a videobox element just before video sink. Here what I
did:
m_pipeline = gst_element_factory_make("playbin2", "playbin");
m_videosink = gst_element_factory_make ("dshowvideosink", "videosink");
m_autocrop = gst_element_factory_make("videobox", "autocrop");
g_object_set(G_OBJECT(m_autocrop), "autocrop", TRUE, NULL);
GstBin * bin = (GstBin*)gst_bin_new("videosinkbin");
gst_bin_add(bin, m_autocrop);
gst_bin_add(bin, m_videosink);
gst_element_link(m_autocrop, m_videosink);
GstPad* ghostPad = gst_ghost_pad_new(NULL,
(GstPad*)(m_autocrop->sinkpads[0].data));
gst_element_add_pad((GstElement*)bin, ghostPad);
g_object_set(G_OBJECT(m_pipeline), "video-sink", bin, NULL);

For some reasons this doesnt work. No error. Just silently not playing. I
cant understand why. First I tried not to use bin, and connect videobox
directly to the playbin2 but this doesnt change anything.

Any ideas?
Thanks.

-- 
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/video-box-connection-tp2967990p2967990.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.




More information about the gstreamer-devel mailing list