[MPlayer-dev-eng] [PATCH] Frame stepping (i.e. seeking while paused)

Shachar Raindel shacharr at gmail.com
Wed Jul 7 10:28:41 CEST 2004


Hi,
 I am attaching a diff between my current tree and the official
mplayer CVS as of yesterday night. I am uploading a tar ball of my
current tree as I write these lines, which will be available in few
minutes from http://blarg52.spymac.net/mplayer-shachars-tree-20040707-1049.tar.bz2
. I ran into A/V sync problems since my patch draws additional 4
frames after any seek command, and when you set a line like:
' seek +0
in your input.conf, you get 4 frames ahead "seek" while paused, but
the seek stuff in mplayer.c doesn't call demux_seek on 0 length seek,
therefore causing A/V desync. I solved this issue by adding a 0 offset
seek when we leave pause mode and we had handled seek commands while
paused. It seems that the GUI crashes on me when I am trying to stop
the player while paused. Can anybody verify that it is (un)related to
my patch?

BTW, my variable playback speed uses a C++ library called soundtouch.
I built it against  version 1.0.1 of this library, available from
http://sky.prohosting.com/oparviai/soundtouch/old.html (official
project page: http://www.iki.fi/oparviai/soundtouch ).

   Cheers,
   Shachar
   

On Tue, 06 Jul 2004 23:05:00 -0400, Jason Tackaberry <tack at sault.org> wrote:
> On Wed, 2004-07-07 at 03:48 +0300, Shachar Raindel wrote:
> > Here is an improved version of this hack, even uglier one, but this
> > one handles seeking in MPEG 1/2 streams (the original patch has
> > serious problems with these streams), and allows stepping forward the
> 
> It's not actually my patch that has problems seeking in MPEG streams but
> mplayer's demuxer in general.  It seems to calculate the byte position
> in the file to seek to based on the bitrate of the video, so if you're
> viewing a variable bitrate mpeg (most mpegs, probably) seeking will not
> be accurate.
> 
> > stream in 3 frames each time (and keeps A/V sync when the pause is
> > released). I think it should be canidated for the ugliest patch of the
> > month competition, but it is really really cool....
> 
> I haven't had any A/V sync problems with that patch.  I tested on an
> mpeg2 stream (from my PVR350), a divx, and a DVD.  Where did you run
> into problems?
> 
> > BTW, my havely modified tree contains, at time being, a nice looking
> > patch for realtime priority under linux, and a really really ugly
> > patch for variable playback speed, with minimal distortion to the
> > sound. I will send my tree if anybody has the time to cleen these
> 
> I'm keen to see the stuff on variable playback speed if possible.
> 
> Cheers,
> Jason.
> 
> _______________________________________________
> MPlayer-dev-eng mailing list
> MPlayer-dev-eng at mplayerhq.hu
> http://mplayerhq.hu/mailman/listinfo/mplayer-dev-eng
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mplayer-commulative-patch-shachar-20040707-1049.tar.bz2
Type: application/x-bzip
Size: 28876 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20040707/0dd38e6d/attachment.bin>


More information about the MPlayer-dev-eng mailing list