[FFmpeg-devel] [PATCH] mov reference files search improvement
Jean-Daniel Dupas
devlists
Thu Sep 3 19:10:44 CEST 2009
Le 3 sept. 2009 ? 18:41, Maksym Veremeyenko a ?crit :
> Maksym Veremeyenko ???????(??):
>> Hi,
>> Current implementation of mov reference files reading works only
>> with absolute path, but in most cases (IMHO) it should search for
>> relative reference files.
>> Proposed patch:
>> - extends *MOVDref* for more variables stored in [alis]
>> - extends *mov_read_dref* for reading additional variables
>> - implements two function for creating probe file list and probe them
>> - replace stream open code in *mov_read_trak*
>
> I did more exploration of relative reference search that honor
> *nlvl_to* (next level down to target) and *nlvl_from* (next level up
> from alias) and i will post updated patch later....
>
> For whom it may be interesting i post a reference stream search
> exploration procedure....
>
> I build some reference movies bases on DV stream in deep tree. I
> extracted appropriate values for *nlvl_to*, *directory_name* and
> *nlvl_from*:
>
> ---------------------------------------+---------+-----------+------+
> TREE | nlvl_to | nlvl_from | Dir |
> ---------------------------------------+---------+-----------+-------
> . | | | |
> `-- dir1 | | | |
> |-- dir2 | | | |
> | |-- dir3 | | | |
> | | |-- STREAM.dv | | | |
> | | |-- dir4 | | | |
> | | | |-- dir5 | | | |
> | | | | |-- dir6 | | | |
> | | | | | `-- movie7.mov | 1 | 4 | dir3 |
> | | | | `-- movie6.mov | 1 | 3 | dir3 |
> | | | |-- dir5a | | | |
> | | | | `-- movie5a.mov | 1 | 3 | dir3 |
> | | | `-- movie5.mov | 1 | 2 | dir3 |
> | | `-- movie4.mov | 1 | 1 | dir3 |
> | |-- dir3a | | | |
> | | `-- movie3a.mov | 2 | 2 | dir3 |
> | `-- movie3.mov | 2 | 1 | dir3 |
> `-- movie2.mov | 3 | 1 | dir3 |
> ---------------------------------------+---------+-----------+------+
>
> Lets build another table, with *nlvl_to* and *nlvl_from* and
> accessible relative name of *STREAM.dv* from appropriate mov:
>
> +----+-----+------+--------------------+----------------------------+
> |nlvl|nlvl | Dir | case #1 bases on |case #2 based on *file_name*|
> |_to |_from| Name | *absolute_path* | and *directory_name* |
> +----+-----+------+--------------------+----------------------------|
> | 1 | 4 | dir3 | ../../../STREAM.dv|../../../../dir3/STREAM.dv |
> | 1 | 3 | dir3 | ../../STREAM.dv| ../../../dir3/STREAM.dv |
> | 1 | 3 | dir3 | ../../STREAM.dv| ../../../dir3/STREAM.dv |
> | 1 | 2 | dir3 | ../STREAM.dv| ../../dir3/STREAM.dv |
> | 1 | 1 | dir3 | STREAM.dv| ../dir3/STREAM.dv |
> | 2 | 2 | dir3 | ../dir3/STREAM.dv| |
> | 2 | 1 | dir3 | dir3/STREAM.dv| |
> | 3 | 1 | dir3 | dir2/dir3/STREAM.dv| |
> +----+-----+------+--------------------+----------------------------+
>
> So, if *absolute_path* equal to "tor/dir1/dir2/dir3/STREAM.dv" (like
> in my case for all files) then, depencies from *nlvl_to* will looks
> like:
>
> *nlvl_to* target part
> ----------------------------------
> 1 STREAM.dv
> 2 dir3/STREAM.dv
> 3 dir2/dir3/STREAM.dv
> 4 dir1/dir2/dir3/STREAM.dv
>
> and *nlvl_from* for both cases will looks like:
>
> *nlvl_From* case #1 case #2
> -------------------------------------
> 1 [] [../]
> 2 [../] [../../]
> 3 [../../] [../../../]
> 4 [../../../] [../../../../]
>
> So as seen it has enough format way to implement relative path
> building code....
If you want to implements Alias support, this may be helpful. This is
an alias record as shown in Dumpster, an Apple QuickTime application
to inspect and edit mov file.
It may give you some hints about what Alias record fields are.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Capture d??cran 2009-09-03 ? 19.08.09.png
Type: image/png
Size: 16364 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090903/54c83991/attachment.png>
-------------- next part --------------
More information about the ffmpeg-devel
mailing list