[MPlayer-dev-eng] Patch for Mplayer to support VDR/DVB
Nico Sabbi
nsabbi at tiscali.it
Fri Nov 5 08:58:12 CET 2004
C.Y.M wrote:
> Is this patch an acceptable addition to mplayer? It is used by
> VDR/DVB to support playback through the DVB card.
>
>
> --- main/mplayer.c.orig 2004-11-04 20:32:05.000000000 -0800
> +++ main/mplayer.c 2004-11-04 20:32:35.000000000 -0800
> @@ -3781,6 +3781,25 @@
> loop_seek=0;
> }
>
> +#if 1
> + if(slave_mode){
> + float position=0.0;
> + float time=0.0;
> + if(demuxer->file_format==DEMUXER_TYPE_AVI &&
> sh_video->video.dwLength>2) {
> + // get pos from frame number / total frames
> + position=(float)d_video->pack_no*100.0/(float)sh_video->video.dwLength;
> + }
> + else {
> + off_t len = ( demuxer->movi_end - demuxer->movi_start );
> + off_t pos = ( demuxer->file_format ==
> DEMUXER_TYPE_AUDIO?stream->pos:demuxer->filepos );
> + if(len>0) position=( pos - demuxer->movi_start ) * 100.0 / len;
> + }
> + if(sh_video) time=d_video->pts;
> + else if(sh_audio) time=sh_audio->delay;
> + mp_msg(MSGT_OSD,MSGL_ERR,"SLAVE: time=%.2f
> position=%.2f\r",time,position);
> + }
> +#endif
> +
> #ifdef HAVE_NEW_GUI
> if(use_gui){
> guiEventHandling();
>
Mplayer can already output to FF dvb cards (if this is what you want),
but anyway
what is this patch supposed to do? Patches must have a description :)
More information about the MPlayer-dev-eng
mailing list