[MPlayer-dev-eng] [PATCH] Movie fragments support for demux_mov
David Romacho
romaxin2002 at yahoo.com.au
Tue Nov 27 11:17:48 CET 2007
Hi all,
The goal of these patches is to provide MPlayer with the movie fragment
feature present in mov/mp4 container (ISO/IEC 14496-12 standard). This
feature is used by some digital cameras that save the video in several
fragments. Currently MPlayer just recognises the first movie fragment
and does not play the rest of fragments.
I split the previous patch into 3 different patches. They are supposed
to be applied one right after the other against demux_mov.c
MPlayer should compile after applying each patch but support for movie
fragments won't be fully operational till last patch is applied.
So, once all patches are applied, MPlayer should playback the movie
fragment test samples (http://samples.mplayerhq.hu/mov/fragments/)
completely. The head of MPlayer just plays the first 15 seconds of them
(the first movie fragment).
Patch description:
step1.patch
This patch basically adds :
* Adds the mov_traf_t struct.
* Adds new members to mov_priv_t.
* Does not stop parsing when a 'mdat' atom is found. Inserts it into
the list and continues.
* Recognises 'mfra' atoms in 'mov_check_file' function.
* Recognises 'moov' atoms in 'mov_check_file' function.
step2.patch
This patch adds new functions that parse previously ignored atoms:
* lschunks_inmfra: parses 'mfra' atoms. Movie Fragment Random Access
Box (for fast seeking). Has 'tfra' and 'mfro' atoms inside.
* lschunks_intraf: parses 'traf' atoms. Track Fragment Box. Has
'tfhd' and 'trun' atoms inside.
* lschunks_inmoof: parses 'moof' atoms. Movie Fragment Box. Has
'mfhd' and 'traf' atoms inside.
* lschunks_inmvex: parses 'mvex' atoms. Movie Extends Box. Has
'mehd' and 'trex' atoms inside.
If someone reviews this patch, he will need to take a look to the
ISO/IEC 14496-12 Standard documentation.
And a couple of new functions that are needed in order to add the traf
to each track and finally rebuild indexes.
* add_traf_to_track.
* mov_rebuild_index.
step3.patch
* Free allocated memory.
* Fix the duration map.
* Detect 'mvex' atoms in lschunks function.
* Process 'moof' chunks, attach corresponding trafs and rebuild
indexes in mov_read_header function.
I am also including movie_fragments.patch which includes all the
changes. It can can be applied directly to demux_mov.c.
Cheers,
David
-------------- next part --------------
A non-text attachment was scrubbed...
Name: step1.patch
Type: text/x-patch
Size: 4168 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20071127/1b267325/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: step2.patch
Type: text/x-patch
Size: 25192 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20071127/1b267325/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: step3.patch
Type: text/x-patch
Size: 6559 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20071127/1b267325/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: movie_fragments.patch
Type: text/x-patch
Size: 35484 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20071127/1b267325/attachment-0003.bin>
More information about the MPlayer-dev-eng
mailing list