<div dir="ltr"><div>what about Dbus messages?<br></div>will they come without main loop?<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Aug 22, 2013 at 3:42 AM, Tim-Philipp Müller <span dir="ltr"><<a href="mailto:t.i.m@zen.co.uk" target="_blank">t.i.m@zen.co.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Wed, 2013-08-21 at 19:38 +0530, Deepak Jain wrote:<br>
<br>
Hi,<br>
<br>
> I am having a audio/video application providing interfaces for audio<br>
> video playback.<br>
><br>
> I am using GStreamer framework for actual playback.<br>
><br>
> In my application, I get elementary streams from the network(demuxed<br>
> streams).<br>
><br>
> Elementary Audio and Video in separate threads.<br>
><br>
><br>
> Now there is problem when I create pipeline and use appsrc.<br>
><br>
> I am creating pipeline for video elementary stream as:<br>
><br>
><br>
> appsrc->h264parse->ffdec_h264->ffmpegcolorconverter->videoconvert->xvimagesink<br>
><br>
><br>
> My class is C++ and I am creating and doing gst_init in my class<br>
> function like:<br>
><br>
> gst_init (NULL, NULL);<br>
><br>
><br>
> loop = g_main_loop_new (NULL, TRUE);<br>
><br>
><br>
> /* creating pipeline here */<br>
> --------------<br>
> ---------------<br>
> --------------<br>
><br>
> /* go to playing and wait in a mainloop. */<br>
> gst_element_set_state (playbin, GST_STATE_PLAYING);<br>
><br>
><br>
><br>
> Now if I use g_main_loop_run (loop); after setting the pipeline to<br>
> play state above, my code don’t work. My audio and video threads(which<br>
> are bringing audio video elementary data) don't work at all.<br>
><br>
><br>
> if I call g_main_loop_run (loop); after getting first video packet,<br>
> the idle handler callback works too fast then my feeding thread due to<br>
> which same data gets pushed to app_src repeatedly and therefore the<br>
> pipeline fails.<br>
><br>
><br>
> The problem to me seems to be where to call g_main_loop_run (loop);<br>
<br>
</div></div>You are aware that g_main_loop_run() blocks, until you quit it, right?<br>
<br>
It's not quite clear to me why you are using a main loop in the first<br>
place. If you get your data in separate threads, you can just push them<br>
into the respective appsrc from those threads.<br>
<br>
GStreamer's streaming threads operate with or without a main loop and<br>
are not affected by any main loops running in the application thread.<br>
<div class="im"><br>
<br>
> Also since my code is c++ and gstreamer is C, is that can be a issue?<br>
<br>
</div>No.<br>
<br>
Not sure what's going on, and it's hard to help without seeing all the<br>
relevant code and how it works together.<br>
<br>
Cheers<br>
-Tim<br>
<br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
</blockquote></div><br></div>