[MPlayer-dev-eng] Some patches
Cristian KLEIN
cristiklein at c7.campus.utcluj.ro
Fri Jul 1 00:43:39 CEST 2005
Hi everybody,
I made a few changes to MPlayer, and I though the whole comunity should
take advantage of them.
1) When in PAUSE mode, any key gets MPlayer out of pause mode. My patch
is pretty nesty, because it makes MPlayer play frame-by-frame, for each
given command, however, it is less anoying then missing a part of the
movie, because fullscreen has been disactivated.
$diff -u old/mplayer.c new/mplayer.c
--- old/mplayer.c 2005-04-15 15:14:24.000000000 +0300
+++ new/mplayer.c 2005-07-01 01:32:12.000000000 +0300
@@ -2669,8 +2669,8 @@
if (cmd && cmd->id == MP_CMD_PAUSE) {
cmd = mp_input_get_cmd(0,1,0);
mp_cmd_free(cmd);
+ osd_function=OSD_PLAY;
}
- osd_function=OSD_PLAY;
if (audio_out && sh_audio)
audio_out->resume(); // resume audio
if (video_out && sh_video && vo_config_count)
@@ -3722,7 +3722,12 @@
}
}
if (cmd->pausing)
- osd_function = OSD_PAUSE;
+ {
+ if (osd_function != OSD_PAUSE)
+ osd_function = OSD_PAUSE;
+ else
+ osd_function = OSD_PLAY;
+ }
mp_cmd_free(cmd);
}
}
2) I wanted to have a single option to auto-expand my movies to 4:3
format. vf_expand does its job pretty well, however you have to know the
width of the movie and make a few calculations to successfully apply it.
Therefore, I modified the default behavior of vf_expand, when no
parameter is given: output's width = input's width, output's height =
input's width * 3 / 4. Still a nasty patch, but should make a lot of
people happy.
$diff -u old/libmpcodecs/vf_expand.c new/libmpcodecs/vf_expand.c
--- old/libmpcodecs/vf_expand.c 2005-04-10 18:37:43.000000000 +0300
+++ new/libmpcodecs/vf_expand.c 2005-07-01 01:42:29.000000000 +0300
@@ -172,7 +172,7 @@
if ( vf->priv->exp_w == -1 ) vf->priv->exp_w=width;
else if (vf->priv->exp_w < -1 ) vf->priv->exp_w=width -
vf->priv->exp_w;
else if ( vf->priv->exp_w<width ) vf->priv->exp_w=width;
- if ( vf->priv->exp_h == -1 ) vf->priv->exp_h=height;
+ if ( vf->priv->exp_h == -1 ) vf->priv->exp_h=width*3/4;
else if ( vf->priv->exp_h < -1 ) vf->priv->exp_h=height -
vf->priv->exp_h;
else if( vf->priv->exp_h<height ) vf->priv->exp_h=height;
#endif
BFN,
Cristi.
More information about the MPlayer-dev-eng
mailing list