[libav-devel] [PATCH 3/6] matroskaenc: implement query_codec()
Anton Khirnov
anton at khirnov.net
Tue Aug 16 17:10:50 CEST 2011
On Tue, 16 Aug 2011 17:05:02 +0200, Kostya <kostya.shishkov at gmail.com> wrote:
> On Tue, Aug 16, 2011 at 10:33:57AM +0200, Anton Khirnov wrote:
> > ---
> > libavformat/matroskaenc.c | 17 +++++++++++++++++
> > 1 files changed, 17 insertions(+), 0 deletions(-)
> >
> > diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
> > index b08f546..6ba750f 100644
> > --- a/libavformat/matroskaenc.c
> > +++ b/libavformat/matroskaenc.c
> > @@ -1191,6 +1191,22 @@ static int mkv_write_trailer(AVFormatContext *s)
> > return 0;
> > }
> >
> > +static int mkv_query_codec(enum CodecID codec_id, int std_compliance)
> > +{
> > + int i;
> > + for (i = 0; ff_mkv_codec_tags[i].id != CODEC_ID_NONE; i++)
> > + if (ff_mkv_codec_tags[i].id == codec_id)
> > + return 1;
> > +
> > + if (std_compliance < FF_COMPLIANCE_NORMAL) { // mkv theoretically supports any
> > + enum AVMediaType type = avcodec_get_type(codec_id); // video/audio through VFW/ACM
> > + if (type == AVMEDIA_TYPE_VIDEO || type == AVMEDIA_TYPE_AUDIO)
> > + return 1;
> > + }
>
> no subtitles?
No, there's no generic storage method for subs AFAIK.
--
Anton Khirnov
More information about the libav-devel
mailing list