[MPlayer-dev-eng] [RFC] Playing growing file
compn
tempn at twmi.rr.com
Tue Feb 7 13:31:00 CET 2012
On Sun, 1 Jan 2012 02:28:53 +0000 (UTC), Doc Holliday wrote:
>
>Vlad Seryakov <vseryakov <at> gmail.com> writes:
>
>> Hi,
>>
>> This is just some crazy idea i am thinking about while trying to figure out
>how to play MPEG TS recordings with
>> mplayer. Really this is not full timeshift solution and never be, player is
>just a player but supporting
>> growing file may be very useful.
>> I decided to try with adding one function to stream_file.c which will handle
>> pipe://
>> urls and just use different fill_buffer function which indefinitely reads
>from file but process events to
>> avoid hangs.
>> Just wondetng what other think about this solution.
>>
>> Thanks
>
>Hi Vlad,
>I've run into a slight problem with your file. Specifically, while playing a
>test mkv file, mplayer would just freeze. I realized that in some cases demux
>might try to search all the way to the end of the file (eg in order to determine
>its length), which will cause it to freeze.
>
>So I took liberty in adding a few lines and making it into an actual patch
>(attached). I also changed the prefix from pipe:// to grow://. Hope you don't
>mind ;)
>
>-Doc
hey reimar, lots of users want this feature, any chance of it getting
in?
>From 846db1c1c9ceeecf5dd253302bd1dc69bc333d0c Mon Sep 17 00:00:00 2001
>From: Doc Holliday <doc4holliday at gmail.com>
>Date: Fri, 30 Dec 2011 21:14:08 -0500
>Subject: [PATCH] Wait for data
>
>When file is opened as grow://file.ext, mplayer will
>continue waiting for new data even after it reaches EOF.
>---
> mplayer.c | 7 ++++++
> stream/stream.h | 1 +
> stream/stream_file.c | 53 +++++++++++++++++++++++++++++++++++++++++++++++++-
> 3 files changed, 60 insertions(+), 1 deletions(-)
>
>diff --git a/mplayer.c b/mplayer.c
>index 53139dd..ef60bbc 100644
>--- a/mplayer.c
>+++ b/mplayer.c
>@@ -3292,8 +3292,15 @@ if(stream_cache_size>0){
> //============ Open DEMUXERS --- DETECT file type =======================
> current_module="demux_open";
>
>+// HACK temporarily disable STREAM_GROW, as some demuxers like to seek
>+// all the way to the end to find out length of the stream
>+int grow = mpctx->stream->flags & STREAM_GROW;
>+mpctx->stream->flags &= ~STREAM_GROW;
>+
isnt there an option that disables seeking, mainly over streamed files?
i know there is one for raw files 'cannot seek in raw file' or 'cannot
seek in this stream' .. maybe that could be used?
-compn
More information about the MPlayer-dev-eng
mailing list