[MPlayer-dev-eng] [PATCH] RTMP seek support

Howard Chu hyc at highlandsun.com
Tue Mar 30 02:48:00 CEST 2010


Reimar Döffinger wrote:
> On Mon, Mar 29, 2010 at 07:32:35PM +0200, Reimar Döffinger wrote:
>> On Sun, Mar 28, 2010 at 08:02:16PM -0700, Howard Chu wrote:
>>> As a followon to this patch
>>>   https://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2010-March/086051.html
>>>
>>> this patch is needed for mplayer to support rtmp seek. (The ffmpeg
>>> patch just gets it working for ffplay.)
>>
>> You will have to make sure the stream is actually lavf,

Since rtmp support is only provided by ffmpeg, that seems to be a foregone 
conclusion.

>> and even then
>> I'd like to think some more if this is not too hackish.

> Now I remember why it felt so wrong: look at the existing
> STREAM_CTRL_SEEK_TO_TIME stuff for DVDs and try to reuse it if at
> all possible.

I've been down that road before.

http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/2010-March/063988.html

It didn't work, because demux_seek() never invoked stream_control(). It has 
something to do with this in demux_seek():

 >>>>
    if (flags & SEEK_ABSOLUTE)
         pts = 0.0f;
     else {
         if (demuxer->stream_pts == MP_NOPTS_VALUE)
             goto dmx_seek;
         pts = demuxer->stream_pts;
     }

     if (flags & SEEK_FACTOR) {
         if (stream_control(demuxer->stream, STREAM_CTRL_GET_TIME_LENGTH, &tmp)
             == STREAM_UNSUPPORTED)
             goto dmx_seek;
         pts += tmp * rel_seek_secs;
     } else
         pts += rel_seek_secs;

     if (stream_control(demuxer->stream, STREAM_CTRL_SEEK_TO_TIME, &pts) !=
         STREAM_UNSUPPORTED) {
         demux_resync(demuxer);
         return 1;
     }

   dmx_seek:
     if (demuxer->desc->seek)
         demuxer->desc->seek(demuxer, rel_seek_secs, audio_delay, flags);
<<<<

I don't know why the lavf demuxer is not reporting the stream timestamp...
-- 
   -- Howard Chu
   CTO, Symas Corp.           http://www.symas.com
   Director, Highland Sun     http://highlandsun.com/hyc/
   Chief Architect, OpenLDAP  http://www.openldap.org/project/



More information about the MPlayer-dev-eng mailing list