[FFmpeg-devel] [PATCH 1/2] avcodec/libdcadec: export matrix encoding side data

Hendrik Leppkes h.leppkes at gmail.com
Tue Jul 7 17:29:17 CEST 2015


On Tue, Jul 7, 2015 at 1:46 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
> On Tue, Jul 07, 2015 at 03:06:23AM -0300, James Almer wrote:
>> Signed-off-by: James Almer <jamrial at gmail.com>
>> ---
>>  libavcodec/libdcadec.c | 19 +++++++++++++++++++
>>  1 file changed, 19 insertions(+)
>>
>> diff --git a/libavcodec/libdcadec.c b/libavcodec/libdcadec.c
>> index 890d270..4bc3765 100644
>> --- a/libavcodec/libdcadec.c
>> +++ b/libavcodec/libdcadec.c
>> @@ -41,6 +41,7 @@ static int dcadec_decode_frame(AVCodecContext *avctx, void *data,
>>  {
>>      DCADecContext *s = avctx->priv_data;
>>      AVFrame *frame = data;
>> +    struct dcadec_exss_info *exss;
>>      int ret, i, k;
>>      int **samples, nsamples, channel_mask, sample_rate, bits_per_sample, profile;
>>      uint32_t mrk;
>> @@ -127,6 +128,24 @@ static int dcadec_decode_frame(AVCodecContext *avctx, void *data,
>>      } else
>>          avctx->bit_rate = 0;
>>
>> +    if (exss = dcadec_context_get_exss_info(s->ctx)) {
>> +        enum AVMatrixEncoding matrix_encoding = AV_MATRIX_ENCODING_NONE;
>> +
>> +        switch(exss->matrix_encoding) {
>> +        case DCADEC_MATRIX_ENCODING_SURROUND:
>> +            matrix_encoding = AV_MATRIX_ENCODING_DOLBY;
>> +            break;
>> +        case DCADEC_MATRIX_ENCODING_HEADPHONE:
>
> breaks build here
>
> CC      libavcodec/libdcadec.o
> libavcodec/libdcadec.c: In function ‘dcadec_decode_frame’:
> libavcodec/libdcadec.c:147:20: error: ‘struct dcadec_exss_info’ has no member named ‘matrix_encoding’
> libavcodec/libdcadec.c:148:14: error: ‘DCADEC_MATRIX_ENCODING_SURROUND’ undeclared (first use in this function)
> libavcodec/libdcadec.c:148:14: note: each undeclared identifier is reported only once for each function it appears in
> libavcodec/libdcadec.c:151:14: error: ‘DCADEC_MATRIX_ENCODING_HEADPHONE’ undeclared (first use in this function)
>

dcadec currently does not version its library or headers, so we're
always assuming you are using git HEAD, until such a time when he has
a release version and library versioning (ie. after the first
release).

- Hendrik


More information about the ffmpeg-devel mailing list