From 57418fbb53615c5579e5fd7d2779c5853171dad3 Mon Sep 17 00:00:00 2001 From: saintdev Date: Mon, 14 May 2007 02:33:39 +0000 Subject: [PATCH] Move mk_Context out of libmkv.h Add codec macros. git-svn-id: svn://inti/libmkv/trunk@48 3291aec2-eb20-0410-9a9b-815520b14c3d --- include/libmkv.h | 40 ++++++++++++++++++++++++++++++---------- src/matroska.c | 1 + src/matroska.h | 35 +++++++++++++++++++++++++++++++++++ 3 files changed, 66 insertions(+), 10 deletions(-) create mode 100644 src/matroska.h diff --git a/include/libmkv.h b/include/libmkv.h index fe06e2c..66c5de0 100644 --- a/include/libmkv.h +++ b/include/libmkv.h @@ -24,6 +24,36 @@ #ifndef _LIBMKV_H #define _LIBMKV_H 1 +/* Video codecs */ +#define MKV_VCODEC_MPEG1 "V_MPEG1" +#define MKV_VCODEC_MPEG2 "V_MPEG2" +#define MKV_VCODEC_THEORA "V_THEORA" +#define MKV_VCODEC_SNOW "V_SNOW" +#define MKV_VCODEC_MP4ASP "V_MPEG4/ISO/ASP" +#define MKV_VCODEC_MP4AVC "V_MPEG4/ISO/AVC" + +/* Audio codecs */ +#define MKV_ACODEC_AC3 "A_AC3" +#define MKV_ACODEC_MP3 "A_MPEG/L3" +#define MKV_ACODEC_MP2 "A_MPEG/L2" +#define MKV_ACODEC_MP1 "A_MPEG/L1" +#define MKV_ACODEC_DTS "A_DTS" +#define MKV_ACODEC_PCMINTLE "A_PCM/INT/LIT" +#define MKV_ACODEC_PCMFLTLE "A_PCM/FLOAT/IEEE" +#define MKV_ACODEC_TTA1 "A_TTA1" +#define MKV_ACODEC_WAVPACK "A_WAVPACK4" +#define MKV_ACODEC_VORBIS "A_VORBIS" +#define MKV_ACODEC_FLAC "A_FLAC" +#define MKV_ACODEC_AAC "A_AAC" + +/* Subtitles */ +#define MKV_SUBTITLE_ASCII "S_TEXT/ASCII" +#define MKV_SUBTITLE_UTF8 "S_TEXT/UTF8" +#define MKV_SUBTITLE_SSA "S_TEXT/SSA" +#define MKV_SUBTITLE_ASS "S_TEXT/ASS" +#define MKV_SUBTITLE_USF "S_TEXT/USF" +#define MKV_SUBTITLE_VOBSUB "S_VOBSUB" + #ifdef __cplusplus extern "C" { #endif @@ -31,16 +61,6 @@ extern "C" { typedef struct mk_Context_s mk_Context; typedef struct mk_Writer_s mk_Writer; -struct mk_Context_s { - mk_Context *next, **prev, *parent; - mk_Writer *owner; - unsigned id; - - void *data; - unsigned d_cur, d_max; -}; - - struct mk_Writer_s { FILE *fp; diff --git a/src/matroska.c b/src/matroska.c index 8055b16..efa118a 100644 --- a/src/matroska.c +++ b/src/matroska.c @@ -35,6 +35,7 @@ #endif #include "libmkv.h" +#include "matroska.h" #define CLSIZE 1048576 #define CHECK(x) do { if ((x) < 0) return -1; } while (0) diff --git a/src/matroska.h b/src/matroska.h new file mode 100644 index 0000000..f1fa355 --- /dev/null +++ b/src/matroska.h @@ -0,0 +1,35 @@ +/***************************************************************************** + * matroska.h: + ***************************************************************************** + * Copyright (C) 2007 libmkv + * $Id: $ + * + * Authors: Mike Matsnev + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. + *****************************************************************************/ +#ifndef _MATROSKA_H +#define _MATROSKA_H 1 + +struct mk_Context_s { + mk_Context *next, **prev, *parent; + mk_Writer *owner; + unsigned id; + + void *data; + unsigned d_cur, d_max; +}; + +#endif \ No newline at end of file -- 2.11.4.GIT