[MPlayer-dev-eng] [PATCH] Capture feature

Reimar Döffinger Reimar.Doeffinger at gmx.de
Thu Sep 2 21:43:52 CEST 2010


On Thu, Sep 02, 2010 at 02:51:41PM +0200, Pásztor Szilárd wrote:
> I introduced a new
> flag for stream->flags to indicate the "main" stream (the one
> referenced as mpctx->stream).

I don't really like that design.
Can't you put the FILE * in the stream struct?
You'll then dump which ever stream you set the FILE * on (and
could even dump several into the same file in case this ever makes sense).
A very minor thing (that I don't really know if it is solvable):
AFAICS you dump on filling the buffer.
This means with heavy seeking it'll dump more data than what
is actually read.
I thought about instead dumping the previous buffer before it is
overwritten because then the pos will indicate how much was read
from it.
However that will fail in other cases (e.g. seeking backwards
within the buffer then seeking forward a lot will end up
in not dumping parts that were read), so it might be best
to keep your approach there.


More information about the MPlayer-dev-eng mailing list