[FFmpeg-devel] Bink demuxer/av_add_index_entry

Michael Niedermayer michaelni
Sun Jan 11 00:32:22 CET 2009


On Fri, Dec 19, 2008 at 01:18:16AM -0600, Daniel Verkamp wrote:
[...]
> - What should size be? Size of the audio data if calling this on the
> audio stream (not known until reading each frame)?  Size of the whole
> audio/video frame data (knowable at index reading time by looking at
> the next index entry)? 0?  The most useful would be size of the whole
> frame data (size of video data = size of whole frame - size of audio),
> but this seems counterintuitive since this does not really apply to
> the single audio stream.

you can set it to what is most convenient for the demuxer, in that respect
the field should of course not be missused for some random value


> 
> - What timestamp should be used? For video, the demuxer is using a
> time base where the frame number is the PTS, but I am not certain how
> this should work for audio.  Assuming I want to look up the size of
> the whole frame in read_packet, the simplest would be to look it up by
> frame number.

you set some timebase with av_set_pts_info() and the pts should be in that


> 
> - How does the demuxer look up/use these index entries later (in the
> demuxer's read_packet)?

av_index_search_timestamp() is one possibility


[...]
> - Same for distance, what is it used for? Can it just be set to 0
> (some demuxers seem to do this)?

yes you can set it to 0


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I do not agree with what you have to say, but I'll defend to the death your
right to say it. -- Voltaire
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090111/57718b7d/attachment.pgp>



More information about the ffmpeg-devel mailing list