I see. I have heard of the GstAppSrc but haven't found any documentation for it yet. It appears as if that component would be better suited to deal with my use case.<br><br><ul><li>What version of GStreamer contains this new GstAppSrc component?<br>
</li><li>Can anyone point me to an example showing how to use the GstAppSrc?<br></li><li>Does anyone have any suggestions as to what else I could try?</li><li>How difficult is it to make the fakesrc produce time-based data? I have so far stayed away from compiling GStreamer on my Windows machine, but I am willing to give OABuild a try.<br>
</li></ul><br>What I am trying to do basically is the following:<br>In my application I have the encoded raw audio and video samples. I would like to feed them to a GStreamer pipeline for playback and I would prefer not having to write my own plugin.<br>
<br>Are there any better ways to accomplish what I am trying to do? And if the only way is to write my own source plugin, can you give me any pointers? I am not looking for source code, just some hints that get me started quickly and on the right track.<br>
<br>Thanks for all your help.<br><br>Andreas<br><br><div class="gmail_quote">On Tue, May 6, 2008 at 9:33 AM, Wim Taymans <<a href="mailto:wim.taymans@gmail.com">wim.taymans@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Tue, 2008-05-06 at 09:05 -0500, Andreas Schuler wrote:<br>
<br>
You need to force fakesrc into producing time-based data (it produces<br>
byte based formats by default). Unfortunatly this is not possible yet.<br>
<br>
Wim<br>
<div><div></div><div class="Wj3C7c"><br>
> I have compared log entries like the following to the samples I am<br>
> feeding the pipeline:<br>
><br>
> "dshowaudiodec : chain (size 768)=> pts 0:00:00.128000000 stop<br>
> 0:00:00.320000000"<br>
><br>
> This line is produced by the following statement (from<br>
> gstdshowaudiodec.c):<br>
><br>
> GST_CAT_DEBUG_OBJECT (dshowaudiodec_debug, adec, "chain (size %d)=><br>
> pts %"<br>
> GST_TIME_FORMAT " stop %" GST_TIME_FORMAT,<br>
> GST_BUFFER_SIZE (buffer), GST_TIME_ARGS (GST_BUFFER_TIMESTAMP<br>
> (buffer)),<br>
> GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buffer) +<br>
> GST_BUFFER_DURATION (buffer)));<br>
><br>
> Those timestamps are matching from what I can tell and therefore look<br>
> ok to me.<br>
><br>
><br>
><br>
> It is possible that I am not setting all necessary data on the<br>
> GstBuffer in the fakesrc. The following fields get set at the moment:<br>
> * GST_BUFFER_DATA<br>
> * GST_BUFFER_SIZE<br>
> * GST_BUFFER_TIMESTAMP<br>
> * GST_BUFFER_DURATION<br>
> * GST_BUFFER_FLAG_DISCONT (if present in source sample)<br>
> * GST_BUFFER_FLAG_PREROLL (if present in source sample)<br>
><br>
> It is also worth mentioning that my fakesrc has the "is-live" property<br>
> set to TRUE.<br>
><br>
> Thanks,<br>
><br>
> Andreas<br>
><br>
><br>
> On Tue, May 6, 2008 at 1:43 AM, Felipe Contreras<br>
> <<a href="mailto:felipe.contreras@gmail.com">felipe.contreras@gmail.com</a>> wrote:<br>
><br>
> On Tue, May 6, 2008 at 1:41 AM, Andreas Schuler<br>
> <<a href="mailto:andreas@neokast.com">andreas@neokast.com</a>> wrote:<br>
> > Hi all,<br>
> ><br>
> > I am having some trouble playing back Windows Media content.<br>
> ><br>
> > The setup is somewhat unique but necessary for my<br>
> application:<br>
> ><br>
> > 2 fakesrc components, which are injecting encoded audio and<br>
> video data<br>
> > Sources are connected to capsfilters, on which I am setting<br>
> the correct<br>
> > input caps (see below)<br>
> > Caps filters are connected to a multiqueue<br>
> > Queue is connected to two decoding bins<br>
> > Standard audio and video rendering tails (i.e. convert<br>
> filters, rendering<br>
> > sinks etc.) are connected to decoding bin source pads This<br>
> setup actually<br>
> > works fine for XVID/MP3 encoded content but I didn't have<br>
> any luck getting<br>
> > it to play with WM content. The caps I have for audio and<br>
> video are as<br>
> > follows:<br>
> ><br>
> > audio/x-wma, channels=(int)2, rate=(int)32000,<br>
> wmaversion=(int)2,<br>
> > bitrate=(int)32000, codec_data=(buffer)008800001f0000000000,<br>
> > block_align=(int)768, depth=(int)16<br>
> > video/x-wmv, width=(int)720, height=(int)496,<br>
> framerate=(fraction)24/1,<br>
> > wmvversion=(int)2, codec_data=(buffer)baf8ad00,<br>
> format=(fourcc)WMV2<br>
> ><br>
> > I have the same content in a regular WMV file, which is<br>
> playing back fine<br>
> > when using the playbin. I verified the caps with that setup<br>
> (the only<br>
> > difference appears to be the order of some of the fields and<br>
> the video<br>
> > framerate [the actual value is 23.97fps]):<br>
> ><br>
> > audio/x-wma, wmaversion=(int)2, bitrate=(int)32000,<br>
> depth=(int)16,<br>
> > rate=(int)32000, channels=(int)2, block_align=(int)768,<br>
> > codec_data=(buffer)008800001f0000000000<br>
> > video/x-wmv, wmvversion=(int)2, framerate=(fraction)25/1,<br>
> width=(int)720,<br>
> > height=(int)496, codec_data=(buffer)baf8ad00,<br>
> format=(fourcc)WMV2<br>
> ><br>
> ><br>
> ><br>
> > When trying to play the content using the setup mention<br>
> above I get a lot of<br>
> > the following messages from gstsegment.c (702):<br>
> ><br>
> > CRITICAL **: file E:\devel-release\src_releases\gstreamer<br>
> \gst\gstsegment.c:<br>
> > line 702: assertion `segment->format == format' failed<br>
> ><br>
> > Enabling the debug output reveals the following from the<br>
> dshow audio<br>
> > decoder:<br>
> ><br>
> > dshowaudiodec : received new segment from 0:00:00.000000000<br>
> to<br>
> > 99:99:99.999999999<br>
> > dshowaudiodec : chain (size 768)=> pts 0:00:00.000000000<br>
> stop<br>
> > 0:00:00.192000000<br>
> > dshowaudiodec : this buffer has a DISCONT flag<br>
> (0:00:00.000000000),<br>
> > flushing<br>
> > dshowaudiodec : chain (size 768)=> pts 0:00:00.128000000<br>
> stop<br>
> > 0:00:00.320000000<br>
> > dshowaudiodec : buffer is out of segment, start<br>
> 0:00:00.128000000 stop<br>
> > 0:00:00.256000000<br>
> > dshowaudiodec : buffer is out of segment, start<br>
> 0:00:00.256000000 stop<br>
> > 0:00:00.320000000<br>
> > dshowaudiodec : chain (size 768)=> pts 0:00:00.320000000<br>
> stop<br>
> > 0:00:00.512000000<br>
> > dshowaudiodec : buffer is out of segment, start<br>
> 0:00:00.320000000 stop<br>
> > 0:00:00.448000000<br>
> > dshowaudiodec : buffer is out of segment, start<br>
> 0:00:00.448000000 stop<br>
> > 0:00:00.512000000<br>
> > dshowaudiodec : chain (size 768)=> pts 0:00:00.512000000<br>
> stop<br>
> > 0:00:00.704000000<br>
> > dshowaudiodec : buffer is out of segment, start<br>
> 0:00:00.512000000 stop<br>
> > 0:00:00.640000000<br>
> > dshowaudiodec : buffer is out of segment, start<br>
> 0:00:00.640000000 stop<br>
> > 0:00:00.704000000<br>
> > dshowaudiodec : chain (size 768)=> pts 0:00:00.704000000<br>
> stop<br>
> > 0:00:00.896000000<br>
> > dshowaudiodec : buffer is out of segment, start<br>
> 0:00:00.704000000 stop<br>
> > 0:00:00.832000000<br>
> > dshowaudiodec : buffer is out of segment, start<br>
> 0:00:00.832000000 stop<br>
> > 0:00:00.896000000<br>
> ><br>
> > The video decoder is showing a similar picture:<br>
> ><br>
> > dshowvideodec : new segment received =><br>
> start=0:00:00.000000000<br>
> > stop=99:99:99.999999999<br>
> > dshowvideodec : chain (size 1749)=> pts 0:00:00.009000000<br>
> stop<br>
> > 0:00:00.010000000<br>
> > dshowvideodec : this buffer has a DISCONT flag<br>
> (0:00:00.009000000), flushing<br>
> > dshowvideodec : buffer is out of segment, start<br>
> 0:00:00.009000000 stop<br>
> > 0:00:00.010000000<br>
> > dshowvideodec : chain (size 2972)=> pts 0:00:02.411000000<br>
> stop<br>
> > 0:00:02.412000000<br>
> > dshowvideodec : buffer is out of segment, start<br>
> 0:00:02.411000000 stop<br>
> > 0:00:02.412000000<br>
> > dshowvideodec : chain (size 3735)=> pts 0:00:02.445000000<br>
> stop<br>
> > 0:00:02.446000000<br>
> > dshowvideodec : buffer is out of segment, start<br>
> 0:00:02.445000000 stop<br>
> > 0:00:02.446000000<br>
> > dshowvideodec : chain (size 3500)=> pts 0:00:02.478000000<br>
> stop<br>
> > 0:00:02.479000000<br>
> > dshowvideodec : buffer is out of segment, start<br>
> 0:00:02.478000000 stop<br>
> > 0:00:02.479000000<br>
> > dshowvideodec : chain (size 5141)=> pts 0:00:02.545000000<br>
> stop<br>
> > 0:00:02.546000000<br>
> > dshowvideodec : buffer is out of segment, start<br>
> 0:00:02.545000000 stop<br>
> > 0:00:02.546000000<br>
> > dshowvideodec : chain (size 7849)=> pts 0:00:02.578000000<br>
> stop<br>
> > 0:00:02.579000000<br>
> > dshowvideodec : buffer is out of segment, start<br>
> 0:00:02.578000000 stop<br>
> > 0:00:02.579000000<br>
> > dshowvideodec : chain (size 5101)=> pts 0:00:02.611000000<br>
> stop<br>
> > 0:00:02.612000000<br>
> > dshowvideodec : buffer is out of segment, start<br>
> 0:00:02.611000000 stop<br>
> > 0:00:02.612000000<br>
> > dshowvideodec : chain (size 7712)=> pts 0:00:02.645000000<br>
> stop<br>
> > 0:00:02.646000000<br>
> > dshowvideodec : buffer is out of segment, start<br>
> 0:00:02.645000000 stop<br>
> > 0:00:02.646000000<br>
> ><br>
> ><br>
> > I understand that the problem appears to be that the<br>
> "format" in GstSegment<br>
> > is not of type GST_FORMAT_TIME when "gst_segment_clip" is<br>
> called in<br>
> > gstdshowaudiocodec.c. The question is why. Can anyone point<br>
> me in the right<br>
> > direction on this one?<br>
><br>
><br>
> What about the timestamps? Are those ok?<br>
><br>
> --<br>
> Felipe Contreras<br>
</div></div>> -------------------------------------------------------------------------<br>
> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference<br>
> Don't miss this year's exciting event. There's still time to save $100.<br>
> Use priority code J8TL2D2.<br>
> <a href="http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone" target="_blank">http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone</a><br>
> _______________________________________________ gstreamer-devel mailing list <a href="mailto:gstreamer-devel@lists.sourceforge.net">gstreamer-devel@lists.sourceforge.net</a> <a href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel</a><br>
<br>
</blockquote></div>