On Fri, Jun 22, 2012 at 3:39 AM, Diego Biurrun <[email protected]> wrote:
> On Thu, Jun 21, 2012 at 04:15:13PM -0700, Alex Converse wrote:
>> --- a/doc/filters.texi
>> +++ b/doc/filters.texi
>> @@ -232,6 +232,39 @@ front_center.wav -map '[LFE]' lfe.wav -map '[SL]' 
>> side_left.wav -map '[SR]'
>>
>> +@section channelmap
>> +Remap input channels to new locations.
>> +
>> +This filter accepts the following named parameters:
>> +@table @option
>> +@item channel_layout
>> +Channel layout of the output stream.
>
> How do I specify channel layouts?
>

the same way you do for the other filters that don't specify how. If
this isn't clear enough then feel free to come up with some way to
indicate how it should be specified in one place for all audio
filters. Copy-pasting the same paragraph describing this everywhere is
just a maintenance burden and will probably lead to more inconsistency
in the end.

>> +    if (mode == MAP_PAIR_INT_STR || mode == MAP_PAIR_STR_STR) {
>> +        for (i = 0; i < s->nch; i++) {
>> +            s->map[i].out_channel_idx = av_get_channel_layout_channel_index(
>> +                s->output_layout, s->map[i].out_channel);
>> +        }
>> +    }
>
> drop some {}

I don't think this makes it any more readable as the inside is not
just one line. The style guide simply says these are not required. Not
that they are forbidden.

>
> Breaking lines after an opening parenthesis is ugly; better move the whole
> function invocation to the next line if you are worried about line length.
>

It's getting difficult to satisfy 80 chars, the long channel layout
API function names, and not breaking after a parenthesis all at the
same time. Using the API function names as-is is a must. The style
guide recommends 80 chars. No documentation says anything about
breaking after a parenthesis.

>> +    const int nch_in = FFMIN(
>> +        av_get_channel_layout_nb_channels(inlink->channel_layout), MAX_CH);
>
> same
>
>> +    for (ch = 0; ch < nch_out; ch++) {
>> +        buf->extended_data[s->map[ch].out_channel_idx] =
>> +            source_planes[s->map[ch].in_channel_idx];
>> +    }
>
> drop {}

see above
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to