[FFmpeg-devel] [PATCH 10/14] avformat/matroskadec: move the elements semantic in a separate file

Steve Lhomme robux4 at ycbcr.xyz
Sat Mar 28 16:20:28 EET 2020


On 2020-03-25 3:09, Andreas Rheinhardt wrote:
> Steve Lhomme:
>> From: Steve Lhomme <robux4 at ycbcr.xyz>
>>
>> So the file can be generated from the Matroska Schema.
>>
>> The EbmlSyntax structures are not shared between files.
>> matroska_segments and matroska_cluster_enter also have their size predefined.
>>
>> No functional changes.
>> ---
>>   libavformat/Makefile      |   2 +-
>>   libavformat/matroskadec.c | 668 +-------------------------------------
>>   libavformat/matroskasem.c | 384 ++++++++++++++++++++++
>>   libavformat/matroskasem.h | 362 +++++++++++++++++++++
>>   4 files changed, 748 insertions(+), 668 deletions(-)
>>   create mode 100644 libavformat/matroskasem.c
>>   create mode 100644 libavformat/matroskasem.h
> 
> [...]
> 
>> diff --git a/libavformat/matroskasem.h b/libavformat/matroskasem.h
>> new file mode 100644
>> index 0000000000..8171982abf
>> --- /dev/null
>> +++ b/libavformat/matroskasem.h
>> @@ -0,0 +1,362 @@
>> +/*
>> + * Matroska file semantic definition
>> + * Copyright (c) 2003-2020 The FFmpeg project
>> + *
>> + * This file is part of FFmpeg.
>> + *
>> + * FFmpeg is free software; you can redistribute it and/or
>> + * modify it under the terms of the GNU Lesser General Public
>> + * License as published by the Free Software Foundation; either
>> + * version 2.1 of the License, or (at your option) any later version.
>> + *
>> + * FFmpeg is distributed in the hope that it will be useful,
>> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
>> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
>> + * Lesser General Public License for more details.
>> + *
>> + * You should have received a copy of the GNU Lesser General Public
>> + * License along with FFmpeg; if not, write to the Free Software
>> + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
>> + */
>> +
>> +/**
>> + * @file
>> + * Matroska file demuxer
>> + * @author Ronald Bultje <rbultje at ronald.bitfreak.net>
>> + * @author with a little help from Moritz Bunkus <moritz at bunkus.org>
>> + * @author totally reworked by Aurelien Jacobs <aurel at gnuage.org>
>> + * @see specs available on the Matroska project page: http://www.matroska.org/
>> + */
>> +
>> +#ifndef AVFORMAT_MATROSKASEM_H
>> +#define AVFORMAT_MATROSKASEM_H
>> +
>> +#include <inttypes.h>
>> +
>> +#include "matroska.h"
>> +#include "avformat.h"
>> +#include "libavutil/frame.h"
> 
> Is it possible that you just included this for AVBufferRef (which is
> defined in libavutil/buffer.h)?

Sure, I'll give it a try.


More information about the ffmpeg-devel mailing list