Creating elements on typedef's callback function cause sync issue

deepthips deepthips at tataelxsi.co.in
Thu Jan 1 05:49:35 PST 2015


Created a pileline to play MJPEG streams. I have a bin 'playerbin' which
consists of multipartdemux, jpegdec and <my sink>
This is connected to httpsrc thus creating connection httpsrc->playerbin.

Now, I want the playerbin implementation to be generic to many formats. It
should play mjpeg / mp4/ ts accoring to format.
That is, by using typefind element, I have to find the format and decide the
pipeline.

So I did like this :
g_signal_connect (playerbin->typefind, "have-type", G_CALLBACK (onHaveType),
playerbin);


and in onHaveType() :
if (strcmp(type, "multipart/x-mixed-replace") == 0)
                gst_element_factory_make (of all plugins and add to bin and
link)


My issue is that the creation of my elements happen in callback function of
typedef. By this time, main context is running and tries to set properties
to elements. 
That will throw error as creation of elements is happening only on typedef
callback. How can I solve this issue.



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Creating-elements-on-typedef-s-callback-function-cause-sync-issue-tp4670079.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list