diff options
author | Glenn Kasten <gkasten@google.com> | 2012-01-12 10:30:28 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-01-12 10:30:28 -0800 |
commit | 4cc55d53d542c4f4ed645738cebb65b9e7eb6c44 (patch) | |
tree | 417efab1bc349bfaa4bdf7fccdff0e53fb76e7c0 /include | |
parent | d5a8bf0bca459389cdb81fdcc30893516bdce951 (diff) | |
parent | e1c3962e268ffc12bfd1bd9ea84da1f135f36960 (diff) | |
download | frameworks_av-4cc55d53d542c4f4ed645738cebb65b9e7eb6c44.zip frameworks_av-4cc55d53d542c4f4ed645738cebb65b9e7eb6c44.tar.gz frameworks_av-4cc55d53d542c4f4ed645738cebb65b9e7eb6c44.tar.bz2 |
Merge "Use audio_format_t consistently"
Diffstat (limited to 'include')
-rw-r--r-- | include/media/AudioTrack.h | 15 | ||||
-rw-r--r-- | include/media/IMediaPlayerService.h | 5 | ||||
-rw-r--r-- | include/media/MediaPlayerInterface.h | 2 | ||||
-rw-r--r-- | include/media/mediaplayer.h | 4 |
4 files changed, 14 insertions, 12 deletions
diff --git a/include/media/AudioTrack.h b/include/media/AudioTrack.h index 98b2c70..60b052b 100644 --- a/include/media/AudioTrack.h +++ b/include/media/AudioTrack.h @@ -69,7 +69,8 @@ public: MUTE = 0x00000001 }; uint32_t flags; - int format; + audio_format_t format; // but AUDIO_FORMAT_PCM_8_BIT -> AUDIO_FORMAT_PCM_16_BIT + // accessed directly by WebKit ANP callback int channelCount; // will be removed in the future, do not use size_t frameCount; size_t size; @@ -143,7 +144,7 @@ public: AudioTrack( int streamType, uint32_t sampleRate = 0, - int format = 0, + audio_format_t format = AUDIO_FORMAT_DEFAULT, int channelMask = 0, int frameCount = 0, uint32_t flags = 0, @@ -163,7 +164,7 @@ public: AudioTrack( int streamType, uint32_t sampleRate = 0, - int format = 0, + audio_format_t format = AUDIO_FORMAT_DEFAULT, int channelMask = 0, const sp<IMemory>& sharedBuffer = 0, uint32_t flags = 0, @@ -187,7 +188,7 @@ public: * */ status_t set(int streamType =-1, uint32_t sampleRate = 0, - int format = 0, + audio_format_t format = AUDIO_FORMAT_DEFAULT, int channelMask = 0, int frameCount = 0, uint32_t flags = 0, @@ -215,7 +216,7 @@ public: /* getters, see constructor */ int streamType() const; - int format() const; + audio_format_t format() const; int channelCount() const; uint32_t frameCount() const; int frameSize() const; @@ -434,7 +435,7 @@ private: bool processAudioBuffer(const sp<AudioTrackThread>& thread); status_t createTrack_l(int streamType, uint32_t sampleRate, - uint32_t format, + audio_format_t format, uint32_t channelMask, int frameCount, uint32_t flags, @@ -456,7 +457,7 @@ private: uint32_t mFrameCount; audio_track_cblk_t* mCblk; - uint32_t mFormat; + audio_format_t mFormat; uint8_t mStreamType; uint8_t mChannelCount; uint8_t mMuted; diff --git a/include/media/IMediaPlayerService.h b/include/media/IMediaPlayerService.h index 93bbe13..4f46fcd 100644 --- a/include/media/IMediaPlayerService.h +++ b/include/media/IMediaPlayerService.h @@ -23,6 +23,7 @@ #include <utils/String8.h> #include <binder/IInterface.h> #include <binder/Parcel.h> +#include <system/audio.h> #include <media/IMediaPlayerClient.h> #include <media/IMediaPlayer.h> @@ -43,8 +44,8 @@ public: virtual sp<IMediaMetadataRetriever> createMetadataRetriever(pid_t pid) = 0; virtual sp<IMediaPlayer> create(pid_t pid, const sp<IMediaPlayerClient>& client, int audioSessionId = 0) = 0; - virtual sp<IMemory> decode(const char* url, uint32_t *pSampleRate, int* pNumChannels, int* pFormat) = 0; - virtual sp<IMemory> decode(int fd, int64_t offset, int64_t length, uint32_t *pSampleRate, int* pNumChannels, int* pFormat) = 0; + virtual sp<IMemory> decode(const char* url, uint32_t *pSampleRate, int* pNumChannels, audio_format_t* pFormat) = 0; + virtual sp<IMemory> decode(int fd, int64_t offset, int64_t length, uint32_t *pSampleRate, int* pNumChannels, audio_format_t* pFormat) = 0; virtual sp<IOMX> getOMX() = 0; // codecs and audio devices usage tracking for the battery app diff --git a/include/media/MediaPlayerInterface.h b/include/media/MediaPlayerInterface.h index 80f43a3..1f6bdda 100644 --- a/include/media/MediaPlayerInterface.h +++ b/include/media/MediaPlayerInterface.h @@ -85,7 +85,7 @@ public: // audio data. virtual status_t open( uint32_t sampleRate, int channelCount, - int format=AUDIO_FORMAT_PCM_16_BIT, + audio_format_t format=AUDIO_FORMAT_PCM_16_BIT, int bufferCount=DEFAULT_AUDIOSINK_BUFFERCOUNT, AudioCallback cb = NULL, void *cookie = NULL) = 0; diff --git a/include/media/mediaplayer.h b/include/media/mediaplayer.h index e6a0cc5..2dc055e 100644 --- a/include/media/mediaplayer.h +++ b/include/media/mediaplayer.h @@ -190,8 +190,8 @@ public: bool isLooping(); status_t setVolume(float leftVolume, float rightVolume); void notify(int msg, int ext1, int ext2, const Parcel *obj = NULL); - static sp<IMemory> decode(const char* url, uint32_t *pSampleRate, int* pNumChannels, int* pFormat); - static sp<IMemory> decode(int fd, int64_t offset, int64_t length, uint32_t *pSampleRate, int* pNumChannels, int* pFormat); + static sp<IMemory> decode(const char* url, uint32_t *pSampleRate, int* pNumChannels, audio_format_t* pFormat); + static sp<IMemory> decode(int fd, int64_t offset, int64_t length, uint32_t *pSampleRate, int* pNumChannels, audio_format_t* pFormat); status_t invoke(const Parcel& request, Parcel *reply); status_t setMetadataFilter(const Parcel& filter); status_t getMetadata(bool update_only, bool apply_filter, Parcel *metadata); |