[MPlayer-dev-eng] [PATCH] Capture feature
Lobster
lobo at lobs.sytes.net
Wed Sep 29 01:28:19 CEST 2010
On 29/09/2010 9:43 a.m., Pásztor Szilárd wrote:
> Diego Biurrun:
>>>> + 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 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);
> Done.
>
>> 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?
> I don't completely agree with this because the last sentence means what you
> asked and what is not the real situation. Upon keypress capturing of course
> starts immediately, but what is read into the cache (if enabled) is what gets
> written and that is somewhat ahead of what is displayed. This is what this
> sentence should mean.
> So I did a kind of merge of the two texts.
>
>> 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?
> This is reasonable so I changed it to honor -dumpfile but i had to make that
> non-static. The parameter is now -capture (docs are updated accordingly).
>
Just one thing I may ask if can be done here (for how I see myself using
this),
Would it be possible at all to have it so dumpfile can be a base file name?
so, you set dumpfile to mycapture or whatever,
then you record,
mycapture is made,
you stop capture,
then later you start capture again and I would assume the default would
be to
continue to write to mycapture,
but could an extra flag be made to increment a number to the file?
so when you record again the new recording goes to mycapture001 and
the next to mycapture002 etc etc (as an example).
Or is this complicating matters too much?
More information about the MPlayer-dev-eng
mailing list