summaryrefslogtreecommitdiffstats
path: root/media/ffmpeg/ffmpeg_common.cc
diff options
context:
space:
mode:
authordalecurtis@google.com <dalecurtis@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-26 23:32:31 +0000
committerdalecurtis@google.com <dalecurtis@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-26 23:32:31 +0000
commit8e200c2e6b4b276a4ba15000699ae0cace4a6c9e (patch)
tree2c626ce0268a43d959ceb8f857c4a671a820ef4b /media/ffmpeg/ffmpeg_common.cc
parent7d84406df54bbbc99162bcbc792e1f49a3bd0c4b (diff)
downloadchromium_src-8e200c2e6b4b276a4ba15000699ae0cace4a6c9e.zip
chromium_src-8e200c2e6b4b276a4ba15000699ae0cace4a6c9e.tar.gz
chromium_src-8e200c2e6b4b276a4ba15000699ae0cace4a6c9e.tar.bz2
Sync new FFmpeg channel layouts.
Updates our enum to match the latest FFmpeg one. Also fixes an issue with the downmix for left/right of center channels. BUG=132572 TEST=file plays with correct channel order. Review URL: https://codereview.chromium.org/11273057 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@164442 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/ffmpeg/ffmpeg_common.cc')
-rw-r--r--media/ffmpeg/ffmpeg_common.cc26
1 files changed, 25 insertions, 1 deletions
diff --git a/media/ffmpeg/ffmpeg_common.cc b/media/ffmpeg/ffmpeg_common.cc
index 973dc81..6820066 100644
--- a/media/ffmpeg/ffmpeg_common.cc
+++ b/media/ffmpeg/ffmpeg_common.cc
@@ -353,6 +353,30 @@ ChannelLayout ChannelLayoutToChromeChannelLayout(int64_t layout,
return CHANNEL_LAYOUT_7_1_WIDE;
case AV_CH_LAYOUT_STEREO_DOWNMIX:
return CHANNEL_LAYOUT_STEREO_DOWNMIX;
+ case AV_CH_LAYOUT_2POINT1:
+ return CHANNEL_LAYOUT_2POINT1;
+ case AV_CH_LAYOUT_3POINT1:
+ return CHANNEL_LAYOUT_3_1;
+ case AV_CH_LAYOUT_4POINT1:
+ return CHANNEL_LAYOUT_4_1;
+ case AV_CH_LAYOUT_6POINT0:
+ return CHANNEL_LAYOUT_6_0;
+ case AV_CH_LAYOUT_6POINT0_FRONT:
+ return CHANNEL_LAYOUT_6_0_FRONT;
+ case AV_CH_LAYOUT_HEXAGONAL:
+ return CHANNEL_LAYOUT_HEXAGONAL;
+ case AV_CH_LAYOUT_6POINT1:
+ return CHANNEL_LAYOUT_6_1;
+ case AV_CH_LAYOUT_6POINT1_BACK:
+ return CHANNEL_LAYOUT_6_1_BACK;
+ case AV_CH_LAYOUT_6POINT1_FRONT:
+ return CHANNEL_LAYOUT_6_1_FRONT;
+ case AV_CH_LAYOUT_7POINT0_FRONT:
+ return CHANNEL_LAYOUT_7_0_FRONT;
+ case AV_CH_LAYOUT_7POINT1_WIDE_BACK:
+ return CHANNEL_LAYOUT_7_1_WIDE_BACK;
+ case AV_CH_LAYOUT_OCTAGONAL:
+ return CHANNEL_LAYOUT_OCTAGONAL;
default:
// FFmpeg channel_layout is 0 for .wav and .mp3. We know mono and stereo
// from the number of channels, otherwise report errors.
@@ -360,7 +384,7 @@ ChannelLayout ChannelLayoutToChromeChannelLayout(int64_t layout,
return CHANNEL_LAYOUT_MONO;
if (channels == 2)
return CHANNEL_LAYOUT_STEREO;
- DVLOG(1) << "Unsupported channel layout: " << layout;
+ LOG(ERROR) << "Unsupported channel layout: " << layout;
}
return CHANNEL_LAYOUT_UNSUPPORTED;
}