[FFmpeg-devel] [WIP] DVD reader protocol
Erik Van Grunderbeeck
erik at arawix.com
Sun Jan 29 12:16:43 CET 2012
>> If someone wants to work on part of this, I can do some (or advise on
>> how) of it, but I don't have loads of times anymore these days.
>Before to jump at finetuning I want to get simple playback (even if
>clunky) working. Your patchset was old and incomplete and I had to figure
out how to put all the pieces togheter, so something is not yet working
>Now my main problem is that I don't know how I am supposed to deal with a
sector/VOBU end, dvd_read() keeps reading from dvdnav_get_next_block(), at
some point I get "Truncating packet"
>ffio_limit() errors when I reach the end of the AVIOContext buffer (which
is the size of the VOBU).
>I suppose I need a mechanism for automatically skipping to the next
chapter/VOBU when a certain VOBU end is reached (how to test it?), but I'm
not sure about which is the best method for doing that.
Yes. VOBU skipping in a chapter should be automatic, since they will be
handled by the IFO data structures.
When a chapter ends, libdvd will send a message to the callback stating with
the next transition state in the FSM of the DVD is. Its up to the player to
respond to that.
This can be several messages: DVDNAV_WAIT, DVDNAV_VTS_CHANGE:, etc.
Depending on these, actions need to be taken.
I send these messages on a seperate callback that has a timestamp of the
event, and a structure containing extracted message data.
Why a seperate callback and not inject them in the stream? Mainly because of
the buffering of the FFMpeg libraries. Inserting non-stream dynamic packages
leads to several problems there.
For the scenario above, the VTS change messages are the most important. Note
that however, almost every DVD package creator reads the spec differently.
Eg. sometimes a set of messages will be included, sometimes a domain change
will be there, ...
FFmpeg = Fancy and Foolish Mystic Pure Enhancing Gladiator
More information about the ffmpeg-devel