[MPlayer-dev-eng] [PATCH] Support for MOV-Reference Files

Fabian Franz FabianFranz at gmx.de
Sun Jan 12 22:51:30 CET 2003


Am Sonntag, 12. Januar 2003 22:07 schrieb Arpi:
> Hi,
>
> > attached patch adds support for MOV-Reference-Files ...
>
> nice

:)

>
> > It uses the video->stream for doing so and makes sure that type is set to
> > TYPE_PLAYLIST ...
>
> ok
>
> > It also makes sure, that unnecessary items like qt5gateQT are removed and
> > that the url/basepath is added to "local files" ... (There should be a
> > fix to also test for ../bla and so on ...)
>
> ok
>
> btw afaik these reference files contain the same video in several
> resolutions/formats/bitrates, so maybe insteda of adding all them to the
> playlist, we should select the best?
>
> > For this and t hat is one drawback of the patch it uses basename, which
> > needs libgen.h which is only available on linux-systems ...
>
> bad!!!

... fixed in new attached patch ...

one macro ;)

I tought that running strrchr twice is still faster than having it in a 
function as compiler can cache result ... (it hopefully does)

>
> > So we need our own function to do this ... (native implementation)
>
> shouldn't be hard, the dirname(0 (also from libgen) impl. was 5 lines...
>
> > It also changes some network code:
> >
> > If mime/type==video/quicktime and video is bigger than normal set cache
> > (40 kb), cache-size is set to Content-Length ...
>
> BAD!!!

ok, ok ;) 

... removed from patch ...

But anyway how can a plugin for example know what kind of buffer it needs to 
smoothly playback qt-files for example ... 

So it has to always send -cache 8192 or so :-(

But then I vote to fix it and add an -cacheopts option that you can set the 
prefill-buffer to something different than 20% of cache ...

>
> > PS: I hope it is clean and there are no 10l's in for example the code
> > with the basename-thingy (I really don't like string-handling, I really
> > don't ;) )
>
> ask .so for help :)))

Ah, #mplayer-ppl told me what you meant :)

>
> >   
> > demuxer=new_demuxer(stream,DEMUXER_TYPE_MOV,audio_id,video_id,dvdsub_id);
> > if(mov_check_file(demuxer)){
> >        mp_msg(MSGT_DEMUXER,MSGL_INFO,MSGTR_Detected_XXX_FileFormat
> > ,"QuickTime/MOV");
> > -      file_format=DEMUXER_TYPE_MOV;
> > +      if (demuxer->type==DEMUXER_TYPE_PLAYLIST)
> > +        file_format=DEMUXER_TYPE_PLAYLIST;
> > +      else
> > +        file_format=DEMUXER_TYPE_MOV;
>
> this is not needed, new_demuxer() sets demuxer->type to its 2nd
> parameter... just remove that nonsense/useless
> file_format=DEMUXER_TYPE_MOV;
> line

ok, changed to one line ;)

file_format=demuxer->type...

As file_format is used in next switch and ifs .. :-/

cu

Fabian

PS: Hope this time it is ok :)
>
>
> A'rpi / Astral & ESP-team
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mplayer_mov_ref_sup_2.diff
Type: text/x-diff
Size: 4598 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20030112/ccb7fe3c/attachment.diff>


More information about the MPlayer-dev-eng mailing list