<div dir="ltr"><div><div><div><div><div><div><div><div><div><div>Hello,<br></div>I have to read an ASF stream from a named pipe (on windows).<br></div>The pipe is already opened and I cannot seek.<br><br></div>I've followed these links to begin (I think there is no official doc about the argument):<br>
<a href="http://www.codeproject.com/Tips/489450/Creating-Custom-FFmpeg-IO-Context">http://www.codeproject.com/Tips/489450/Creating-Custom-FFmpeg-IO-Context</a><br><a href="http://cdry.wordpress.com/2009/09/09/using-custom-io-callbacks-with-ffmpeg/">http://cdry.wordpress.com/2009/09/09/using-custom-io-callbacks-with-ffmpeg/</a><br>
<br></div>I've found some diffs with official doc:<br><br>1.<br></div>If my buf size is (1000 + FF_INPUT_BUFFER_PADDING_SIZE), When calling "avio_alloc_context" the 2nd params buffer_size must be 1000 or (1000 + FF_INPUT_BUFFER_PADDING_SIZE)?<br>
<br>2.<br></div>Does it make the difference specify AVFormatContecxt->flags = AVFMT_FLAG_CUSTOM_IO?<br><br></div>3. <br>How to allocate the buffer? av_malloc(1000) or new BYTE[1000]?<br><br></div>4. <br>The articles say that it is mandatory to use AVProbeData and av_probe_input_format to avoid application crashes, but I have no probs with normal flow using avformat_open_input and avformat_find_stream_info. Is this safe? <br>
<br>5.<br>a. does avformat_open_input reads header only?<br></div><div>b. is avformat_find_stream_info the method that uses analyzeduration and probesize values?<br><br></div><div>Do you have some resource about this subject to provide?<br>
</div><div><br></div>thanks a lot,<br></div>MB<br><br></div>