[MPlayer-dev-eng] [PATCH] dvdnav

Ötvös Attila oattila at chello.hu
Sun Jan 29 21:40:36 CET 2006


2006. január 28. 09.26 dátummal Nico Sabbi ezt írta:
> - the patch below is not acceptable because 1) it reintroduces
> demuxer-specific code in demuxer.c
> (that we worked hard to clean) and 2) it's a huge hack. You can get
> something similar but cleaner
> implementing a new DEMUXER_CTRL call.
>
> --- libmpdemux/demuxer.c        2006-01-17 21:04:49.000000000 +0100
> +++ libmpdemux/demuxer.c        2006-01-27 22:40:17.000000000 +0100
> @@ -370,6 +373,19 @@
>        --ds->packs;
>        return 1; //ds->buffer_size;
>      }
> +#ifdef USE_MPDVDNAV
> +    if(demux->stream->type==STREAMTYPE_DVDNAV && (
> +       (dvdnav_isevent_lock((dvdnav_priv_t*)(demux->stream->priv)) &&
> ds==demux->video && (demux->audio->packs>=128)) || /* slow wait max=
> 4096 : only stream length time query max=128 */
>
> [snip]

I modified the code of the function ds_fill_buffer() in the demuxer.c. 
This have been more complicated because while opening of the 
demuxer there is needed the lower audio packet limit. Before 
the opening of the demuxer I can't use the DEMUXER_CTRL call.

> - I'm sure you can clean and place decode_video_still() in a custom
> decoder (maybe something
> like libmpcodecs/vd_videostill.c)

I created a vd_videostill.c. I would like to know if the modify of 
the decode_video() function will be better in the dec_video.c because 
the decode_video_still() function is an expanded version of 
the decode_video().

> - the biggest one: stream_dvdnav.c seems to be the whole libdvdnav
> unrolled in one file
> + mplayer's specific stream code. If so, it's not acceptable, either.
> Can't you simply link to the official libdvdnav? If not (yet), try to
> get your patches applied by
> the maintaner of the library or remove your additions. In any case I'm
> against importing
> dvdnav in mplayer (especially in this all-in-one form).

I created a libmpdvdnav directory and I moved here the suitable
files from stream_dvdnav.c. Unfortunately, official libdvdnav
can be used because there is needed some new functions.
At first the decode of the still frame is faulty but at
second it will be successful therefore the repeat of the
still frame must be forced from libdvdnav.

New patch:

http://dcxx.fw.hu/

Best regards!
Attila




More information about the MPlayer-dev-eng mailing list