[FFmpeg-devel] [RFC] native MMS as URLProtocol
Thu Aug 30 11:26:36 CEST 2007
On Wed, 2007-08-29 at 01:05 +0200, Michael Niedermayer wrote:
> On Tue, Aug 28, 2007 at 04:46:43PM +0200, Bj?rn Axelsson wrote:
> > On Tue, 2007-08-28 at 16:12 +0200, Luca Barbato wrote:
> > > Bj?rn Axelsson wrote:
> > > > Another unsolved interface issue is pausing. Since MMS (and also RTSP)
> > > > pauses at the server end, an application must not try to read data from
> > > > a paused stream. Not a big deal, but there's no way for an application
> > > > to know whether it is safe or not to read when paused. See the temporary
> > > > hack to ffplay.c for how to _not_ solve this...
> > >
> > > Well you have to send the pause command AND quit decoding at the same
> > > time, once you issue a new play you just start from that point (nearest
> > > I frame) as you don't have any context (so you reset the decoders),
> > > what's the problem? (consider return from pause a seek).
> > Consider ffplay: normally it constantly reads as fast as it can to fill
> > a certain amount of frame buffers. When the user pauses the display, it
> > calls av_read_pause() but continues to read packets and fill its frame
> > buffers.
> > As a special case for RTSP it also pauses reading into the buffer when
> > the display is paused, something that also needs to be done for MMS.
> > Now, this _can_ be handled with special cases on the application side,
> > but it would be better to have a generic way to indicate whether it is
> > ok or not to read data after an av_read_pause().
> av_read_frame() could simply return AVERROR(EAGAIN) or some other "i have
> no packet ATM try again later" return code
> we need this or something else for grabing from X11 at non random framerate
> as well ...
AVERROR(EAGAIN) would be a nice solution for both the application and
the protocol. However, it will require some nontrivial modifications to
aviobuf and at least a few demuxers for correct handling.
Bj?rn Axelsson Phone: +46-(0)90-18 98 97
Intinor AB Fax: +46-(0)920-757 10
Interactive Television & Digital Media Distribution
More information about the ffmpeg-devel