summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/camera/CameraParameters.h2
-rw-r--r--include/media/AudioRecord.h133
-rw-r--r--include/media/AudioSystem.h16
-rw-r--r--include/media/AudioTrack.h18
-rw-r--r--include/media/IAudioFlinger.h12
-rw-r--r--include/media/IAudioPolicyService.h9
-rw-r--r--include/media/IAudioRecord.h2
-rw-r--r--include/media/Visualizer.h2
-rw-r--r--include/media/mediametadataretriever.h1
-rw-r--r--include/media/mediaplayer.h2
-rw-r--r--include/media/stagefright/CameraSource.h1
-rw-r--r--include/media/stagefright/MetaData.h1
-rw-r--r--include/media/stagefright/OMXCodec.h15
-rw-r--r--include/media/stagefright/foundation/hexdump.h6
-rw-r--r--include/media/stagefright/timedtext/TimedTextDriver.h1
15 files changed, 111 insertions, 110 deletions
diff --git a/include/camera/CameraParameters.h b/include/camera/CameraParameters.h
index 36248a0..4d5aa36 100644
--- a/include/camera/CameraParameters.h
+++ b/include/camera/CameraParameters.h
@@ -606,6 +606,8 @@ public:
// Raw bayer format used for images, which is 10 bit precision samples
// stored in 16 bit words. The filter pattern is RGGB.
static const char PIXEL_FORMAT_BAYER_RGGB[];
+ // Pixel format is not known to the framework
+ static const char PIXEL_FORMAT_ANDROID_OPAQUE[];
// Values for focus mode settings.
// Auto-focus mode. Applications should call
diff --git a/include/media/AudioRecord.h b/include/media/AudioRecord.h
index ef77692..156c592 100644
--- a/include/media/AudioRecord.h
+++ b/include/media/AudioRecord.h
@@ -17,22 +17,15 @@
#ifndef AUDIORECORD_H_
#define AUDIORECORD_H_
-#include <stdint.h>
-#include <sys/types.h>
-
-#include <media/IAudioFlinger.h>
+#include <binder/IMemory.h>
+#include <cutils/sched_policy.h>
+#include <media/AudioSystem.h>
#include <media/IAudioRecord.h>
-
+#include <system/audio.h>
#include <utils/RefBase.h>
#include <utils/Errors.h>
-#include <binder/IInterface.h>
-#include <binder/IMemory.h>
-#include <cutils/sched_policy.h>
#include <utils/threads.h>
-#include <system/audio.h>
-#include <media/AudioSystem.h>
-
namespace android {
class audio_track_cblk_t;
@@ -46,11 +39,10 @@ public:
static const int DEFAULT_SAMPLE_RATE = 8000;
/* Events used by AudioRecord callback function (callback_t).
- *
- * to keep in sync with frameworks/base/media/java/android/media/AudioRecord.java
+ * Keep in sync with frameworks/base/media/java/android/media/AudioRecord.java NATIVE_EVENT_*.
*/
enum event_type {
- EVENT_MORE_DATA = 0, // Request to reqd more data from PCM buffer.
+ EVENT_MORE_DATA = 0, // Request to read more data from PCM buffer.
EVENT_OVERRUN = 1, // PCM buffer overrun occured.
EVENT_MARKER = 2, // Record head is at the specified marker position
// (See setMarkerPosition()).
@@ -72,7 +64,7 @@ public:
int channelCount;
audio_format_t format;
size_t frameCount;
- size_t size;
+ size_t size; // total size in bytes == frameCount * frameSize
union {
void* raw;
short* i16;
@@ -80,12 +72,6 @@ public:
};
};
- /* These are static methods to control the system-wide AudioFlinger
- * only privileged processes can have access to them
- */
-
-// static status_t setMasterMute(bool mute);
-
/* As a convenience, if a callback is supplied, a handler thread
* is automatically created with the appropriate priority. This thread
* invokes the callback when a new buffer becomes ready or an overrun condition occurs.
@@ -98,8 +84,8 @@ public:
* more bytes than indicated by 'size' field and update 'size' if less bytes are
* read.
* - EVENT_OVERRUN: unused.
- * - EVENT_MARKER: pointer to an uin32_t containing the marker position in frames.
- * - EVENT_NEW_POS: pointer to an uin32_t containing the new position in frames.
+ * - EVENT_MARKER: pointer to const uint32_t containing the marker position in frames.
+ * - EVENT_NEW_POS: pointer to const uint32_t containing the new position in frames.
*/
typedef void (*callback_t)(int event, void* user, void *info);
@@ -115,7 +101,7 @@ public:
static status_t getMinFrameCount(int* frameCount,
uint32_t sampleRate,
audio_format_t format,
- int channelCount);
+ audio_channel_mask_t channelMask);
/* Constructs an uninitialized AudioRecord. No connection with
* AudioFlinger takes place.
@@ -133,32 +119,22 @@ public:
* sampleRate: Track sampling rate in Hz.
* format: Audio format (e.g AUDIO_FORMAT_PCM_16_BIT for signed
* 16 bits per sample).
- * channelMask: Channel mask: see audio_channels_t.
+ * channelMask: Channel mask.
* frameCount: Total size of track PCM buffer in frames. This defines the
* latency of the track.
- * flags: A bitmask of acoustic values from enum record_flags. It enables
- * AGC, NS, and IIR.
* cbf: Callback function. If not null, this function is called periodically
* to provide new PCM data.
+ * user: Context for use by the callback receiver.
* notificationFrames: The callback function is called each time notificationFrames PCM
* frames are ready in record track output buffer.
- * user Context for use by the callback receiver.
+ * sessionId: Not yet supported.
*/
- // FIXME consider removing this alias and replacing it by audio_in_acoustics_t
- // or removing the parameter entirely if it is unused
- enum record_flags {
- RECORD_AGC_ENABLE = AUDIO_IN_ACOUSTICS_AGC_ENABLE,
- RECORD_NS_ENABLE = AUDIO_IN_ACOUSTICS_NS_ENABLE,
- RECORD_IIR_ENABLE = AUDIO_IN_ACOUSTICS_TX_IIR_ENABLE,
- };
-
AudioRecord(audio_source_t inputSource,
uint32_t sampleRate = 0,
audio_format_t format = AUDIO_FORMAT_DEFAULT,
- uint32_t channelMask = AUDIO_CHANNEL_IN_MONO,
+ audio_channel_mask_t channelMask = AUDIO_CHANNEL_IN_MONO,
int frameCount = 0,
- record_flags flags = (record_flags) 0,
callback_t cbf = NULL,
void* user = NULL,
int notificationFrames = 0,
@@ -166,7 +142,7 @@ public:
/* Terminates the AudioRecord and unregisters it from AudioFlinger.
- * Also destroys all resources assotiated with the AudioRecord.
+ * Also destroys all resources associated with the AudioRecord.
*/
~AudioRecord();
@@ -182,9 +158,8 @@ public:
status_t set(audio_source_t inputSource = AUDIO_SOURCE_DEFAULT,
uint32_t sampleRate = 0,
audio_format_t format = AUDIO_FORMAT_DEFAULT,
- uint32_t channelMask = AUDIO_CHANNEL_IN_MONO,
+ audio_channel_mask_t channelMask = AUDIO_CHANNEL_IN_MONO,
int frameCount = 0,
- record_flags flags = (record_flags) 0,
callback_t cbf = NULL,
void* user = NULL,
int notificationFrames = 0,
@@ -205,11 +180,10 @@ public:
*/
uint32_t latency() const;
- /* getters, see constructor */
+ /* getters, see constructor and set() */
audio_format_t format() const;
int channelCount() const;
- int channels() const;
uint32_t frameCount() const;
size_t frameSize() const;
audio_source_t inputSource() const;
@@ -227,7 +201,7 @@ public:
* obtainBuffer returns STOPPED. Note that obtainBuffer() still works
* and will fill up buffers until the pool is exhausted.
*/
- status_t stop();
+ void stop();
bool stopped() const;
/* get sample rate for this record track
@@ -271,7 +245,7 @@ public:
status_t getPositionUpdatePeriod(uint32_t *updatePeriod) const;
- /* Gets record head position. The position is the total number of frames
+ /* Gets record head position. The position is the total number of frames
* recorded since record start.
*
* Parameters:
@@ -294,7 +268,7 @@ public:
*/
audio_io_handle_t getInput() const;
- /* returns the audio session ID associated to this AudioRecord.
+ /* returns the audio session ID associated with this AudioRecord.
*
* Parameters:
* none.
@@ -342,57 +316,72 @@ private:
AudioRecord& operator = (const AudioRecord& other);
/* a small internal class to handle the callback */
- class ClientRecordThread : public Thread
+ class AudioRecordThread : public Thread
{
public:
- ClientRecordThread(AudioRecord& receiver, bool bCanCallJava = false);
+ AudioRecordThread(AudioRecord& receiver, bool bCanCallJava = false);
+
+ // Do not call Thread::requestExitAndWait() without first calling requestExit().
+ // Thread::requestExitAndWait() is not virtual, and the implementation doesn't do enough.
+ virtual void requestExit();
+
+ void pause(); // suspend thread from execution at next loop boundary
+ void resume(); // allow thread to execute, if not requested to exit
+
private:
friend class AudioRecord;
virtual bool threadLoop();
- virtual status_t readyToRun();
- virtual void onFirstRef() {}
AudioRecord& mReceiver;
+ virtual ~AudioRecordThread();
+ Mutex mMyLock; // Thread::mLock is private
+ Condition mMyCond; // Thread::mThreadExitedCondition is private
+ bool mPaused; // whether thread is currently paused
};
- bool processAudioBuffer(const sp<ClientRecordThread>& thread);
+ // body of AudioRecordThread::threadLoop()
+ bool processAudioBuffer(const sp<AudioRecordThread>& thread);
+
status_t openRecord_l(uint32_t sampleRate,
audio_format_t format,
- uint32_t channelMask,
+ audio_channel_mask_t channelMask,
int frameCount,
audio_io_handle_t input);
audio_io_handle_t getInput_l();
status_t restoreRecord_l(audio_track_cblk_t*& cblk);
- sp<IAudioRecord> mAudioRecord;
- sp<IMemory> mCblkMemory;
- sp<ClientRecordThread> mClientRecordThread;
- status_t mReadyToRun;
+ sp<AudioRecordThread> mAudioRecordThread;
mutable Mutex mLock;
- Condition mCondition;
- uint32_t mFrameCount;
+ bool mActive; // protected by mLock
- audio_track_cblk_t* mCblk;
+ // for client callback handler
+ callback_t mCbf;
+ void* mUserData;
+
+ // for notification APIs
+ uint32_t mNotificationFrames;
+ uint32_t mRemainingFrames;
+ uint32_t mMarkerPosition; // in frames
+ bool mMarkerReached;
+ uint32_t mNewPosition; // in frames
+ uint32_t mUpdatePeriod; // in ms
+
+ // constant after constructor or set()
+ uint32_t mFrameCount;
audio_format_t mFormat;
uint8_t mChannelCount;
audio_source_t mInputSource;
status_t mStatus;
uint32_t mLatency;
+ audio_channel_mask_t mChannelMask;
+ audio_io_handle_t mInput; // returned by AudioSystem::getInput()
+ int mSessionId;
- volatile int32_t mActive;
+ // may be changed if IAudioRecord object is re-created
+ sp<IAudioRecord> mAudioRecord;
+ sp<IMemory> mCblkMemory;
+ audio_track_cblk_t* mCblk;
- callback_t mCbf;
- void* mUserData;
- uint32_t mNotificationFrames;
- uint32_t mRemainingFrames;
- uint32_t mMarkerPosition;
- bool mMarkerReached;
- uint32_t mNewPosition;
- uint32_t mUpdatePeriod;
- record_flags mFlags;
- uint32_t mChannelMask;
- audio_io_handle_t mInput;
- int mSessionId;
int mPreviousPriority; // before start()
SchedPolicy mPreviousSchedulingGroup;
};
diff --git a/include/media/AudioSystem.h b/include/media/AudioSystem.h
index e2662f2..932482b 100644
--- a/include/media/AudioSystem.h
+++ b/include/media/AudioSystem.h
@@ -110,8 +110,8 @@ public:
static bool routedToA2dpOutput(audio_stream_type_t streamType);
- static status_t getInputBufferSize(uint32_t sampleRate, audio_format_t format, int channelCount,
- size_t* buffSize);
+ static status_t getInputBufferSize(uint32_t sampleRate, audio_format_t format,
+ audio_channel_mask_t channelMask, size_t* buffSize);
static status_t setVoiceVolume(float volume);
@@ -126,6 +126,7 @@ public:
// necessary to check returned status before using the returned values.
static status_t getRenderPosition(uint32_t *halFrames, uint32_t *dspFrames, audio_stream_type_t stream = AUDIO_STREAM_DEFAULT);
+ // return the number of input frames lost by HAL implementation, or 0 if the handle is invalid
static unsigned int getInputFramesLost(audio_io_handle_t ioHandle);
static int newAudioSessionId();
@@ -188,7 +189,7 @@ public:
static audio_io_handle_t getOutput(audio_stream_type_t stream,
uint32_t samplingRate = 0,
audio_format_t format = AUDIO_FORMAT_DEFAULT,
- uint32_t channels = AUDIO_CHANNEL_OUT_STEREO,
+ audio_channel_mask_t channelMask = AUDIO_CHANNEL_OUT_STEREO,
audio_output_flags_t flags = AUDIO_OUTPUT_FLAG_NONE);
static status_t startOutput(audio_io_handle_t output,
audio_stream_type_t stream,
@@ -200,8 +201,7 @@ public:
static audio_io_handle_t getInput(audio_source_t inputSource,
uint32_t samplingRate = 0,
audio_format_t format = AUDIO_FORMAT_DEFAULT,
- uint32_t channels = AUDIO_CHANNEL_IN_MONO,
- audio_in_acoustics_t acoustics = (audio_in_acoustics_t)0,
+ audio_channel_mask_t channelMask = AUDIO_CHANNEL_IN_MONO,
int sessionId = 0);
static status_t startInput(audio_io_handle_t input);
static status_t stopInput(audio_io_handle_t input);
@@ -219,8 +219,8 @@ public:
static uint32_t getStrategyForStream(audio_stream_type_t stream);
static audio_devices_t getDevicesForStream(audio_stream_type_t stream);
- static audio_io_handle_t getOutputForEffect(effect_descriptor_t *desc);
- static status_t registerEffect(effect_descriptor_t *desc,
+ static audio_io_handle_t getOutputForEffect(const effect_descriptor_t *desc);
+ static status_t registerEffect(const effect_descriptor_t *desc,
audio_io_handle_t io,
uint32_t strategy,
int session,
@@ -277,7 +277,7 @@ private:
// previous parameters for recording buffer size queries
static uint32_t gPrevInSamplingRate;
static audio_format_t gPrevInFormat;
- static int gPrevInChannelCount;
+ static audio_channel_mask_t gPrevInChannelMask;
static sp<IAudioPolicyService> gAudioPolicyService;
diff --git a/include/media/AudioTrack.h b/include/media/AudioTrack.h
index 639d6d2..4488ce4 100644
--- a/include/media/AudioTrack.h
+++ b/include/media/AudioTrack.h
@@ -135,7 +135,7 @@ public:
* sampleRate: Track sampling rate in Hz.
* format: Audio format (e.g AUDIO_FORMAT_PCM_16_BIT for signed
* 16 bits per sample).
- * channelMask: Channel mask: see audio_channels_t.
+ * channelMask: Channel mask.
* frameCount: Minimum size of track PCM buffer in frames. This defines the
* latency of the track. The actual size selected by the AudioTrack could be
* larger if the requested size is not compatible with current audio HAL
@@ -154,7 +154,7 @@ public:
AudioTrack( audio_stream_type_t streamType,
uint32_t sampleRate = 0,
audio_format_t format = AUDIO_FORMAT_DEFAULT,
- int channelMask = 0,
+ audio_channel_mask_t channelMask = 0,
int frameCount = 0,
audio_output_flags_t flags = AUDIO_OUTPUT_FLAG_NONE,
callback_t cbf = NULL,
@@ -186,7 +186,7 @@ public:
AudioTrack( audio_stream_type_t streamType,
uint32_t sampleRate = 0,
audio_format_t format = AUDIO_FORMAT_DEFAULT,
- int channelMask = 0,
+ audio_channel_mask_t channelMask = 0,
const sp<IMemory>& sharedBuffer = 0,
audio_output_flags_t flags = AUDIO_OUTPUT_FLAG_NONE,
callback_t cbf = NULL,
@@ -204,13 +204,13 @@ public:
* Returned status (from utils/Errors.h) can be:
* - NO_ERROR: successful initialization
* - INVALID_OPERATION: AudioTrack is already initialized
- * - BAD_VALUE: invalid parameter (channels, format, sampleRate...)
+ * - BAD_VALUE: invalid parameter (channelMask, format, sampleRate...)
* - NO_INIT: audio server or audio hardware not initialized
* */
status_t set(audio_stream_type_t streamType = AUDIO_STREAM_DEFAULT,
uint32_t sampleRate = 0,
audio_format_t format = AUDIO_FORMAT_DEFAULT,
- int channelMask = 0,
+ audio_channel_mask_t channelMask = 0,
int frameCount = 0,
audio_output_flags_t flags = AUDIO_OUTPUT_FLAG_NONE,
callback_t cbf = NULL,
@@ -472,10 +472,8 @@ protected:
private:
friend class AudioTrack;
virtual bool threadLoop();
- virtual status_t readyToRun();
- virtual void onFirstRef();
AudioTrack& mReceiver;
- ~AudioTrackThread();
+ virtual ~AudioTrackThread();
Mutex mMyLock; // Thread::mLock is private
Condition mMyCond; // Thread::mThreadExitedCondition is private
bool mPaused; // whether thread is currently paused
@@ -487,7 +485,7 @@ protected:
status_t createTrack_l(audio_stream_type_t streamType,
uint32_t sampleRate,
audio_format_t format,
- uint32_t channelMask,
+ audio_channel_mask_t channelMask,
int frameCount,
audio_output_flags_t flags,
const sp<IMemory>& sharedBuffer,
@@ -512,7 +510,7 @@ protected:
uint8_t mChannelCount;
uint8_t mMuted;
uint8_t mReserved;
- uint32_t mChannelMask;
+ audio_channel_mask_t mChannelMask;
status_t mStatus;
uint32_t mLatency;
diff --git a/include/media/IAudioFlinger.h b/include/media/IAudioFlinger.h
index 86e228b..bdd0142 100644
--- a/include/media/IAudioFlinger.h
+++ b/include/media/IAudioFlinger.h
@@ -48,7 +48,7 @@ public:
enum {
TRACK_DEFAULT = 0, // client requests a default AudioTrack
TRACK_TIMED = 1, // client requests a TimedAudioTrack
- TRACK_FAST = 2, // client requests a fast AudioTrack
+ TRACK_FAST = 2, // client requests a fast AudioTrack or AudioRecord
};
typedef uint32_t track_flags_t;
@@ -60,7 +60,7 @@ public:
audio_stream_type_t streamType,
uint32_t sampleRate,
audio_format_t format,
- uint32_t channelMask,
+ audio_channel_mask_t channelMask,
int frameCount,
track_flags_t flags,
const sp<IMemory>& sharedBuffer,
@@ -74,9 +74,10 @@ public:
audio_io_handle_t input,
uint32_t sampleRate,
audio_format_t format,
- uint32_t channelMask,
+ audio_channel_mask_t channelMask,
int frameCount,
track_flags_t flags,
+ pid_t tid, // -1 means unused, otherwise must be valid non-0
int *sessionId,
status_t *status) = 0;
@@ -84,7 +85,9 @@ public:
* and therefore can be cached.
*/
virtual uint32_t sampleRate(audio_io_handle_t output) const = 0;
+#if 0
virtual int channelCount(audio_io_handle_t output) const = 0;
+#endif
virtual audio_format_t format(audio_io_handle_t output) const = 0;
virtual size_t frameCount(audio_io_handle_t output) const = 0;
@@ -126,7 +129,8 @@ public:
virtual void registerClient(const sp<IAudioFlingerClient>& client) = 0;
// retrieve the audio recording buffer size
- virtual size_t getInputBufferSize(uint32_t sampleRate, audio_format_t format, int channelCount) const = 0;
+ virtual size_t getInputBufferSize(uint32_t sampleRate, audio_format_t format,
+ audio_channel_mask_t channelMask) const = 0;
virtual audio_io_handle_t openOutput(audio_module_handle_t module,
audio_devices_t *pDevices,
diff --git a/include/media/IAudioPolicyService.h b/include/media/IAudioPolicyService.h
index e160d70..fb556af 100644
--- a/include/media/IAudioPolicyService.h
+++ b/include/media/IAudioPolicyService.h
@@ -51,7 +51,7 @@ public:
virtual audio_io_handle_t getOutput(audio_stream_type_t stream,
uint32_t samplingRate = 0,
audio_format_t format = AUDIO_FORMAT_DEFAULT,
- uint32_t channels = 0,
+ audio_channel_mask_t channelMask = 0,
audio_output_flags_t flags = AUDIO_OUTPUT_FLAG_NONE) = 0;
virtual status_t startOutput(audio_io_handle_t output,
audio_stream_type_t stream,
@@ -63,8 +63,7 @@ public:
virtual audio_io_handle_t getInput(audio_source_t inputSource,
uint32_t samplingRate = 0,
audio_format_t format = AUDIO_FORMAT_DEFAULT,
- uint32_t channels = 0,
- audio_in_acoustics_t acoustics = (audio_in_acoustics_t)0,
+ audio_channel_mask_t channelMask = 0,
int audioSession = 0) = 0;
virtual status_t startInput(audio_io_handle_t input) = 0;
virtual status_t stopInput(audio_io_handle_t input) = 0;
@@ -80,8 +79,8 @@ public:
audio_devices_t device) = 0;
virtual uint32_t getStrategyForStream(audio_stream_type_t stream) = 0;
virtual audio_devices_t getDevicesForStream(audio_stream_type_t stream) = 0;
- virtual audio_io_handle_t getOutputForEffect(effect_descriptor_t *desc) = 0;
- virtual status_t registerEffect(effect_descriptor_t *desc,
+ virtual audio_io_handle_t getOutputForEffect(const effect_descriptor_t *desc) = 0;
+ virtual status_t registerEffect(const effect_descriptor_t *desc,
audio_io_handle_t io,
uint32_t strategy,
int session,
diff --git a/include/media/IAudioRecord.h b/include/media/IAudioRecord.h
index ebc03ea..d6e3141 100644
--- a/include/media/IAudioRecord.h
+++ b/include/media/IAudioRecord.h
@@ -37,7 +37,7 @@ public:
/* After it's created the track is not active. Call start() to
* make it active.
*/
- virtual status_t start(int event, int triggerSession) = 0;
+ virtual status_t start(int /*AudioSystem::sync_event_t*/ event, int triggerSession) = 0;
/* Stop a track. If set, the callback will cease being called and
* obtainBuffer will return an error. Buffers that are already released
diff --git a/include/media/Visualizer.h b/include/media/Visualizer.h
index fdec5ee..aa58905 100644
--- a/include/media/Visualizer.h
+++ b/include/media/Visualizer.h
@@ -142,8 +142,6 @@ private:
private:
friend class Visualizer;
virtual bool threadLoop();
- virtual status_t readyToRun();
- virtual void onFirstRef();
Visualizer& mReceiver;
Mutex mLock;
uint32_t mSleepTimeUs;
diff --git a/include/media/mediametadataretriever.h b/include/media/mediametadataretriever.h
index 534afce..0df77c1 100644
--- a/include/media/mediametadataretriever.h
+++ b/include/media/mediametadataretriever.h
@@ -55,6 +55,7 @@ enum {
METADATA_KEY_TIMED_TEXT_LANGUAGES = 21,
METADATA_KEY_IS_DRM = 22,
METADATA_KEY_LOCATION = 23,
+ METADATA_KEY_VIDEO_ROTATION = 24,
// Add more here...
};
diff --git a/include/media/mediaplayer.h b/include/media/mediaplayer.h
index 1fad383..f7cebc5 100644
--- a/include/media/mediaplayer.h
+++ b/include/media/mediaplayer.h
@@ -99,6 +99,8 @@ enum media_info_type {
// The player was started because it was used as the next player for another
// player, which just completed playback
MEDIA_INFO_STARTED_AS_NEXT = 2,
+ // The player just pushed the very first video frame for rendering
+ MEDIA_INFO_RENDERING_START = 3,
// 7xx
// The video is too complex for the decoder: it can't decode frames fast
// enough. Possibly only the audio plays fine at this stage.
diff --git a/include/media/stagefright/CameraSource.h b/include/media/stagefright/CameraSource.h
index 5a35358..6d6b8a9 100644
--- a/include/media/stagefright/CameraSource.h
+++ b/include/media/stagefright/CameraSource.h
@@ -137,6 +137,7 @@ protected:
int32_t mCameraFlags;
Size mVideoSize;
+ int32_t mNumInputBuffers;
int32_t mVideoFrameRate;
int32_t mColorFormat;
status_t mInitCheck;
diff --git a/include/media/stagefright/MetaData.h b/include/media/stagefright/MetaData.h
index 3c25a14..e91904c 100644
--- a/include/media/stagefright/MetaData.h
+++ b/include/media/stagefright/MetaData.h
@@ -111,6 +111,7 @@ enum {
kKeyTrackTimeStatus = 'tktm', // int64_t
kKeyNotRealTime = 'ntrt', // bool (int32_t)
+ kKeyNumBuffers = 'nbbf', // int32_t
// Ogg files can be tagged to be automatically looping...
kKeyAutoLoop = 'autL', // bool (int32_t)
diff --git a/include/media/stagefright/OMXCodec.h b/include/media/stagefright/OMXCodec.h
index 81350ca..bb9e595 100644
--- a/include/media/stagefright/OMXCodec.h
+++ b/include/media/stagefright/OMXCodec.h
@@ -98,9 +98,13 @@ struct OMXCodec : public MediaSource,
kDecoderLiesAboutNumberOfChannels = 256,
kInputBufferSizesAreBogus = 512,
kSupportsMultipleFramesPerInputBuffer = 1024,
- kAvoidMemcopyInputRecordingFrames = 2048,
- kRequiresLargerEncoderOutputBuffer = 4096,
- kOutputBuffersAreUnreadable = 8192,
+ kRequiresLargerEncoderOutputBuffer = 2048,
+ kOutputBuffersAreUnreadable = 4096,
+ };
+
+ struct CodecNameAndQuirks {
+ String8 mName;
+ uint32_t mQuirks;
};
// for use by ACodec
@@ -108,8 +112,7 @@ struct OMXCodec : public MediaSource,
const char *mime,
bool createEncoder, const char *matchComponentName,
uint32_t flags,
- Vector<String8> *matchingCodecs,
- Vector<uint32_t> *matchingCodecQuirks = NULL);
+ Vector<CodecNameAndQuirks> *matchingCodecNamesAndQuirks);
static uint32_t getComponentQuirks(
const MediaCodecList *list, size_t index);
@@ -342,8 +345,6 @@ private:
status_t configureCodec(const sp<MetaData> &meta);
- void restorePatchedDataPointer(BufferInfo *info);
-
status_t applyRotation();
status_t waitForBufferFilled_l();
diff --git a/include/media/stagefright/foundation/hexdump.h b/include/media/stagefright/foundation/hexdump.h
index f6083a9..8360c5a 100644
--- a/include/media/stagefright/foundation/hexdump.h
+++ b/include/media/stagefright/foundation/hexdump.h
@@ -22,7 +22,11 @@
namespace android {
-void hexdump(const void *_data, size_t size);
+struct AString;
+
+void hexdump(
+ const void *_data, size_t size,
+ size_t indent = 0, AString *appendTo = NULL);
} // namespace android
diff --git a/include/media/stagefright/timedtext/TimedTextDriver.h b/include/media/stagefright/timedtext/TimedTextDriver.h
index cde551b..f23c337 100644
--- a/include/media/stagefright/timedtext/TimedTextDriver.h
+++ b/include/media/stagefright/timedtext/TimedTextDriver.h
@@ -64,6 +64,7 @@ private:
enum State {
UNINITIALIZED,
+ PREPARED,
PLAYING,
PAUSED,
};