summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
author Jean-Michel Trivi <jmtrivi@google.com> 2012-03-05 14:51:54 -0800
committer Android (Google) Code Review <android-gerrit@google.com> 2012-03-05 14:51:54 -0800
commitb93a765ba69a292c268694e7ac127833e00a9b63 (patch)
treedbdf4f1ea5ca5e1dabb28941e294289856eaf4e0 /include
parentc1717569db5a637b054e552e255b2bbf36f7a3f1 (diff)
parent4ed260feda32f6c51dd018e1c012e39aa63e61d4 (diff)
Merge "Add channel mask in AudioSink"
Diffstat (limited to 'include')
-rw-r--r--include/media/MediaPlayerInterface.h4
-rw-r--r--include/media/stagefright/MetaData.h1
2 files changed, 4 insertions, 1 deletions
diff --git a/include/media/MediaPlayerInterface.h b/include/media/MediaPlayerInterface.h
index f7491d82a98b..8168dff803da 100644
--- a/include/media/MediaPlayerInterface.h
+++ b/include/media/MediaPlayerInterface.h
@@ -60,6 +60,8 @@ enum player_type {
#define DEFAULT_AUDIOSINK_BUFFERSIZE 1200
#define DEFAULT_AUDIOSINK_SAMPLERATE 44100
+// when the channel mask isn't known, use the channel count to derive a mask in AudioSink::open()
+#define CHANNEL_MASK_USE_CHANNEL_ORDER 0
// callback mechanism for passing messages to MediaPlayer object
typedef void (*notify_callback_f)(void* cookie,
@@ -91,7 +93,7 @@ public:
// If no callback is specified, use the "write" API below to submit
// audio data.
virtual status_t open(
- uint32_t sampleRate, int channelCount,
+ uint32_t sampleRate, int channelCount, audio_channel_mask_t channelMask,
audio_format_t format=AUDIO_FORMAT_PCM_16_BIT,
int bufferCount=DEFAULT_AUDIOSINK_BUFFERCOUNT,
AudioCallback cb = NULL,
diff --git a/include/media/stagefright/MetaData.h b/include/media/stagefright/MetaData.h
index 4cdee1702fe0..8b4b8edd64bc 100644
--- a/include/media/stagefright/MetaData.h
+++ b/include/media/stagefright/MetaData.h
@@ -43,6 +43,7 @@ enum {
kKeyStride = 'strd', // int32_t
kKeySliceHeight = 'slht', // int32_t
kKeyChannelCount = '#chn', // int32_t
+ kKeyChannelMask = 'chnm', // int32_t
kKeySampleRate = 'srte', // int32_t (audio sampling rate Hz)
kKeyFrameRate = 'frmR', // int32_t (video frame rate fps)
kKeyBitRate = 'brte', // int32_t (bps)