On 5/6/17 4:20 AM, Vittorio Giovara wrote:
> +typedef struct AVChannelLayout {
> +    /**
> +     * Channel order used in this layout.
> +     */
> +    enum AVChannelOrder order;
> +
> +    /**
> +     * Number of channels in this layout. Mandatory field.
> +     */
> +    int nb_channels;
> +
> +    /**
> +     * Details about which channels are present in this layout.
> +     * For AV_CHANNEL_ORDER_UNSPEC, this field is undefined and must not be
> +     * used.
> +     */
> +    union {
> +        /**
> +         * This member must be used for AV_CHANNEL_ORDER_NATIVE.
> +         * It is a bitmask, where the position of each set bit means that the
> +         * AVChannel with the corresponding value is present.
> +         *
> +         * I.e. when (mask & (1 << AV_CHAN_FOO)) is non-zero, then 
> AV_CHAN_FOO
> +         * is present in the layout. Otherwise it is not present.
> +         *
> +         * @note when a channel layout using a bitmask is constructed or
> +         * modified manually (i.e.  not using any of the av_channel_layout_*
> +         * functions), the code doing it must ensure that the number of set 
> bits
> +         * is equal to nb_channels.
> +         */
> +        uint64_t mask;
> +        /**
> +         * This member must be used when the channel order is not native, and
> +         * represents a nb_channels-sized array. Its semantics may depending 
> on
> +         * the channel order.
> +         *
> +         * - For AV_CHANNEL_ORDER_CUSTOM: each element signals the presence 
> of
> +         *   the AVChannel with the corresponding value: eg. when map[i] is
> +         *   equal to AV_CHAN_FOO, then AV_CHAN_FOO is the i-th channel in
> +         *   the audio data.
> +         */
> +        uint8_t *map;
> +    } u;
> +} AVChannelLayout;

Please add a flag so constant well known layouts that use the map can be
used.
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to