<div dir="ltr"><div class="gmail_extra">Hi Tim,</div><div class="gmail_extra"> </div><div class="gmail_extra">OK....I am pushing video elementary data from video thread to the appsrc.</div><div class="gmail_extra"> </div><div class="gmail_extra">
My pipeline is like</div><div class="gmail_extra"> </div><div class="gmail_extra">appsrc->h264parse->ffdec_h264->ffmpegcolorspace->videoscale->autovideosink</div><div class="gmail_extra"> </div><div class="gmail_extra">
Now as I can see, video is properly pushed to appsrc, then to h264parse but no data can be found after ffdec_h264 and nothing happens</div><div class="gmail_extra"> </div><div class="gmail_extra"> </div><div class="gmail_extra">
This I checked by putting filesink first after appsrc, then after h264parse. Both times, I get the data properly</div><div class="gmail_extra"> </div><div class="gmail_extra">But when I put filesink after ffdec_h264, my file shows o bytes.</div>
<div class="gmail_extra"> </div><div class="gmail_extra">Any idea what I may be missing?<br><br></div><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 style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid" class="gmail_quote"><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><div class="gmail_extra"><br></div></div>