Commit 69a83da5 authored by Kirill Gavrilov's avatar Kirill Gavrilov Committed by Michael Niedermayer

matroska: cosmetics

parent 8dd12b07
...@@ -77,8 +77,8 @@ ...@@ -77,8 +77,8 @@
#define MATROSKA_ID_TRACKNUMBER 0xD7 #define MATROSKA_ID_TRACKNUMBER 0xD7
#define MATROSKA_ID_TRACKUID 0x73C5 #define MATROSKA_ID_TRACKUID 0x73C5
#define MATROSKA_ID_TRACKTYPE 0x83 #define MATROSKA_ID_TRACKTYPE 0x83
#define MATROSKA_ID_TRACKAUDIO 0xE1 #define MATROSKA_ID_TRACKVIDEO 0xE0
#define MATROSKA_ID_TRACKVIDEO 0xE0 #define MATROSKA_ID_TRACKAUDIO 0xE1
#define MATROSKA_ID_CODECID 0x86 #define MATROSKA_ID_CODECID 0x86
#define MATROSKA_ID_CODECPRIVATE 0x63A2 #define MATROSKA_ID_CODECPRIVATE 0x63A2
#define MATROSKA_ID_CODECNAME 0x258688 #define MATROSKA_ID_CODECNAME 0x258688
...@@ -219,21 +219,21 @@ typedef enum { ...@@ -219,21 +219,21 @@ typedef enum {
} MatroskaTrackEncodingCompAlgo; } MatroskaTrackEncodingCompAlgo;
typedef enum { typedef enum {
MATROSKA_VIDEO_STEREOMODE_TYPE_MONO = 0, MATROSKA_VIDEO_STEREOMODE_MONO = 0,
MATROSKA_VIDEO_STEREOMODE_TYPE_LEFT_RIGHT = 1, MATROSKA_VIDEO_STEREOMODE_LEFT_RIGHT = 1,
MATROSKA_VIDEO_STEREOMODE_TYPE_BOTTOM_TOP = 2, MATROSKA_VIDEO_STEREOMODE_BOTTOM_TOP = 2,
MATROSKA_VIDEO_STEREOMODE_TYPE_TOP_BOTTOM = 3, MATROSKA_VIDEO_STEREOMODE_TOP_BOTTOM = 3,
MATROSKA_VIDEO_STEREOMODE_TYPE_CHECKERBOARD_RL = 4, MATROSKA_VIDEO_STEREOMODE_CHECKERBOARD_RL = 4,
MATROSKA_VIDEO_STEREOMODE_TYPE_CHECKERBOARD_LR = 5, MATROSKA_VIDEO_STEREOMODE_CHECKERBOARD_LR = 5,
MATROSKA_VIDEO_STEREOMODE_TYPE_ROW_INTERLEAVED_RL = 6, MATROSKA_VIDEO_STEREOMODE_ROW_INTERLEAVED_RL = 6,
MATROSKA_VIDEO_STEREOMODE_TYPE_ROW_INTERLEAVED_LR = 7, MATROSKA_VIDEO_STEREOMODE_ROW_INTERLEAVED_LR = 7,
MATROSKA_VIDEO_STEREOMODE_TYPE_COL_INTERLEAVED_RL = 8, MATROSKA_VIDEO_STEREOMODE_COL_INTERLEAVED_RL = 8,
MATROSKA_VIDEO_STEREOMODE_TYPE_COL_INTERLEAVED_LR = 9, MATROSKA_VIDEO_STEREOMODE_COL_INTERLEAVED_LR = 9,
MATROSKA_VIDEO_STEREOMODE_TYPE_ANAGLYPH_CYAN_RED = 10, MATROSKA_VIDEO_STEREOMODE_ANAGLYPH_CYAN_RED = 10,
MATROSKA_VIDEO_STEREOMODE_TYPE_RIGHT_LEFT = 11, MATROSKA_VIDEO_STEREOMODE_RIGHT_LEFT = 11,
MATROSKA_VIDEO_STEREOMODE_TYPE_ANAGLYPH_GREEN_MAG = 12, MATROSKA_VIDEO_STEREOMODE_ANAGLYPH_GREEN_MAG = 12,
MATROSKA_VIDEO_STEREOMODE_TYPE_BOTH_EYES_BLOCK_LR = 13, MATROSKA_VIDEO_STEREOMODE_BOTH_EYES_BLOCK_LR = 13,
MATROSKA_VIDEO_STEREOMODE_TYPE_BOTH_EYES_BLOCK_RL = 14, MATROSKA_VIDEO_STEREOMODE_BOTH_EYES_BLOCK_RL = 14,
} MatroskaVideoStereoModeType; } MatroskaVideoStereoModeType;
/* /*
......
...@@ -591,20 +591,21 @@ static int mkv_write_tracks(AVFormatContext *s) ...@@ -591,20 +591,21 @@ static int mkv_write_tracks(AVFormatContext *s)
int valid_fmt = 0; int valid_fmt = 0;
switch (mkv->mode) { switch (mkv->mode) {
case MODE_WEBM: case MODE_WEBM:
if (stereo_fmt <= MATROSKA_VIDEO_STEREOMODE_TYPE_TOP_BOTTOM if (stereo_fmt <= MATROSKA_VIDEO_STEREOMODE_TOP_BOTTOM
|| stereo_fmt == MATROSKA_VIDEO_STEREOMODE_TYPE_RIGHT_LEFT) || stereo_fmt == MATROSKA_VIDEO_STEREOMODE_RIGHT_LEFT)
valid_fmt = 1; valid_fmt = 1;
break; break;
case MODE_MATROSKAv2: case MODE_MATROSKAv2:
if (stereo_fmt <= MATROSKA_VIDEO_STEREOMODE_TYPE_BOTH_EYES_BLOCK_RL) if (stereo_fmt <= MATROSKA_VIDEO_STEREOMODE_BOTH_EYES_BLOCK_RL)
valid_fmt = 1; valid_fmt = 1;
break; break;
} }
if (valid_fmt) if (valid_fmt)
put_ebml_uint (pb, MATROSKA_ID_VIDEOSTEREOMODE, stereo_fmt); put_ebml_uint (pb, MATROSKA_ID_VIDEOSTEREOMODE, stereo_fmt);
} }
if (st->sample_aspect_ratio.num) { if (st->sample_aspect_ratio.num) {
int d_width = codec->width*av_q2d(st->sample_aspect_ratio); int d_width = codec->width*av_q2d(st->sample_aspect_ratio);
put_ebml_uint(pb, MATROSKA_ID_VIDEODISPLAYWIDTH , d_width); put_ebml_uint(pb, MATROSKA_ID_VIDEODISPLAYWIDTH , d_width);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment