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

Diego Biurrun diego at biurrun.de
Tue Sep 28 17:16:38 CEST 2010


On Tue, Sep 28, 2010 at 02:19:16PM +0200, Pásztor Szilárd wrote:
> Diego Biurrun:
> > You don't use svn?
> 
> I can't because the server I use (195.70.57.4) is banned from 213.144.138.186
> for some unknown reason.

Fixed.

> > +    case M_PROPERTY_OK:
> > +        set_osd_msg(OSD_MSG_SPEED, 1, osd_duration, MSGTR_OSDCapturing,
> > +            mpctx->stream->capture_file ? MSGTR_Enabled : MSGTR_Disabled);
> >
> > Indentation is off.
> 
> No because it is a continuation of the previous line.

Indentation is still off.  If you break a line, you should not indent
mechanically, but intelligently, i.e. optimized for readability.  For
function calls this means that the next line should be aligned with
the first function argument:

  set_osd_msg(OSD_MSG_SPEED, 1, osd_duration, MSGTR_OSDCapturing,
              mpctx->stream->capture_file ? MSGTR_Enabled : MSGTR_Disabled);

> --- mplayer-export-2010-09-28/config.asm	1970-01-01 01:00:00.000000000 +0100
> +++ mplayer-export-2010-09-28-capture/config.asm	2010-09-28 14:00:38.503655100 +0200
> @@ -0,0 +1,2 @@
> +%define ARCH_X86
> +%define ARCH_X86_32

?

Probably an artifact from not using Subversion, should go away now...

> --- mplayer-export-2010-09-28/DOCS/man/en/mplayer.1	2010-09-08 07:29:05.000000000 +0200
> +++ mplayer-export-2010-09-28-capture/DOCS/man/en/mplayer.1	2010-09-28 13:59:44.095654521 +0200
> @@ -1340,6 +1342,17 @@ from the current position, MPlayer will 
>  .
>  .TP
> +.b \-capturefile <filename> (mplayer only)
> +allows capturing the primary stream (not additional audio or others)
> +into the specified file.
> +If this option is given, capturing can be started and stopped by pressing
> +the key bound to this function (see section INTERACTIVE CONTROL).
> +The capture file produced by this function is the same as that of
> +\-dumpstream and will probably be useless for anything else than MPEG streams.
> +Note that, due to cache latencies, captured data may begin and end
> +somewhat delayed compared to what you see displayed.

I still find this confusing and indirect, let me try to rephrase:

  .b \-capturefile <filename> (MPlayer only)
  Allows capturing the primary stream (not additional audio tracks or
  other kinds of streams) into the specified file upon pressing the
  key bound to this function (see section INTERACTIVE CONTROL).
  Same as for \-dumpstream, this will likely not produce usable
  results for anything but MPEG streams.
  Note that, due to cache latencies, there may be a delay between
  the keypress and the moment capture begins/ends.

Is this still correct?

Also, how does this differ from -dumpfile and -dumpstream apart from
the interactivity?  I see a certain amount of duplication going on
here.  We could have a -capture option and then set the filename to
be captured to with -dumpfile as usual.  Am I missing something?

Diego


More information about the MPlayer-dev-eng mailing list