Hi Arnout,<br><br>Thanks for the reply and the information about the possible solutions.<br><br>I would be greatful if you can tell me more about the index.<br>As of my knowledge the index has the info on the number of <br>
audio and video streams in media stream, with their proprties (like <br>width &amp; height of a video stream). If I am not wrong the &quot;av_write_trailer&quot; <br>function in gstffmpegmux.c helps writing the index in muxers.<br>
<br>Now if I am opting fourth option can I parse whole file. As <br>the incoming data is from live source, and the duration is not known.<br>Can you hint me on how do I build index ?<br><br>Thanks.<br><br><br><div class="gmail_quote">
On Wed, May 13, 2009 at 8:15 PM, Arnout Vandecappelle <span dir="ltr">&lt;<a href="mailto:arnout@mind.be">arnout@mind.be</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
 Accessing a file while it is being written is as such not a problem.<br>
However, there&#39;s no index yet at that point, and also some of the headers<br>
(e.g. duration) may not be filled in.<br>
<br>
 Sending an EOS doesn&#39;t solve the issue here, because you&#39;d either have a file<br>
which contains multiple indices (probably not a legal file), or you&#39;d<br>
overwrite the index immediately while recording continues and end up reading<br>
a corrupted index.<br>
<br>
 The solution is for your reading application to somehow support the case<br>
where the file doesn&#39;t have an index yet.  When I had this problem, I<br>
considered four solutions:<br>
 - make sure the writer and reader are in the same GStreamer process, and<br>
somehow share the index being built up in the muxer element with the reader;<br>
 - write the index to a separate file while it is built up, and let the reader<br>
read from this file;<br>
 - make sure the reader doesn&#39;t need an index, i.e. convert time-based seeking<br>
into bytes-based seeking using some binary search approach;<br>
 - make the reader build an index while it is reading - for forward seeking<br>
that means the whole file has to be parsed (but not decoded), obviously.<br>
<br>
 In my case, I choose the third option because I didn&#39;t need to do actual<br>
demuxing so I could easily write a custom stream parser.<br>
<br>
 Unfortunately, all four solutions require changes in the muxer/demuxer<br>
elements - it simply cannot be solved as a separate element.  My guess is<br>
that the fourth option is the easiest to implement in a demuxer.<br>
<br>
 Regards,<br>
 Arnout<br>
<div><div></div><div class="h5"><br>
On Tuesday 12 May 2009 06:39:58 Jyoti wrote:<br>
&gt; Hi all,<br>
&gt;<br>
&gt; I am currently writing an application to save data from a live source<br>
&gt; into file. The server streams a file RTP payloaded H.264 video packets<br>
&gt; and AAC audio packets on separate ports. The reciever receives the<br>
&gt; data and saves it into a file. I could save the file properly.<br>
&gt;<br>
&gt; But now my problem is I want to do trickmode operations on this file even<br>
&gt; when it is downloading(while the file is still been written on client<br>
&gt; side). Currently I have written separate application to do trickmode<br>
&gt; opearations on a file. But when I do trickmode operations on the file which<br>
&gt; is still writing contents in to it, the pipeline gets into ASYNC state &amp;<br>
&gt; when the application is forceably closed the qtdemuxer throws an error.<br>
&gt;<br>
&gt; One thing I thought is to send an EOS for every 5 secs on the client side<br>
&gt; while writing data into file. So that the muxer gracefully writes the<br>
&gt; proper data after EOS and the chunk of data can be considered for<br>
&gt; trickmode. But after sending the first EOS I can&#39;t set pipeline to any<br>
&gt; state and the data flow on pad is stopped.<br>
&gt;<br>
&gt; I would be very thankful if anyone could just tell me<br>
&gt; * how can I access the file even when its writing.<br>
&gt; * Or in any way can I start the data flow even after sending EOS?<br>
&gt;<br>
&gt; Thanks in advance.<br>
<br>
<br>
<br>
</div></div>--<br>
Arnout Vandecappelle                               arnout at mind be<br>
Senior Embedded Software Architect                 +32-16-286540<br>
Essensium/Mind                                     <a href="http://www.mind.be" target="_blank">http://www.mind.be</a><br>
G.Geenslaan 9, 3001 Leuven, Belgium                BE 872 984 063 RPR Leuven<br>
LinkedIn profile: <a href="http://www.linkedin.com/in/arnoutvandecappelle" target="_blank">http://www.linkedin.com/in/arnoutvandecappelle</a><br>
GPG fingerprint:  D206 D44B 5155 DF98 550D  3F2A 2213 88AA A1C7 C933<br>
<br>
------------------------------------------------------------------------------<br>
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your<br>
production scanning environment may not be a perfect world - but thanks to<br>
Kodak, there&#39;s a perfect scanner to get the job done! With the NEW KODAK i700<br>
Series Scanner you&#39;ll get full speed at 300 dpi even with all image<br>
processing features enabled. <a href="http://p.sf.net/sfu/kodak-com" target="_blank">http://p.sf.net/sfu/kodak-com</a><br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.sourceforge.net">gstreamer-devel@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel</a><br>
</blockquote></div><br>