summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/media/EffectsFactoryApi.h24
-rw-r--r--include/media/nbaio/AudioBufferProviderSource.h2
-rw-r--r--include/media/nbaio/MonoPipe.h2
-rw-r--r--include/media/nbaio/NBAIO.h21
-rw-r--r--include/media/nbaio/Pipe.h2
-rw-r--r--include/media/stagefright/ACodec.h3
-rw-r--r--include/private/media/AudioTrackShared.h14
-rw-r--r--include/private/media/StaticAudioTrackState.h10
8 files changed, 34 insertions, 44 deletions
diff --git a/include/media/EffectsFactoryApi.h b/include/media/EffectsFactoryApi.h
index b1143b9..b1ed7b0 100644
--- a/include/media/EffectsFactoryApi.h
+++ b/include/media/EffectsFactoryApi.h
@@ -171,30 +171,6 @@ int EffectGetDescriptor(const effect_uuid_t *pEffectUuid, effect_descriptor_t *p
////////////////////////////////////////////////////////////////////////////////
int EffectIsNullUuid(const effect_uuid_t *pEffectUuid);
-////////////////////////////////////////////////////////////////////////////////
-//
-// Function: EffectGetSubEffects
-//
-// Description: Returns the descriptors of the sub effects of the effect
-// whose uuid is pointed to by first argument.
-//
-// Input:
-// pEffectUuid: pointer to the effect uuid.
-// size: size of the buffer pointed by pDescriptor.
-//
-// Input/Output:
-// pDescriptor: address where to return the sub effect descriptors.
-//
-// Output:
-// returned value: 0 successful operation.
-// -ENODEV factory failed to initialize
-// -EINVAL invalid pEffectUuid or pDescriptor
-// -ENOENT no effect with this uuid found
-// *pDescriptor: updated with the sub effect descriptors.
-//
-////////////////////////////////////////////////////////////////////////////////
-int EffectGetSubEffects(const effect_uuid_t *pEffectUuid, effect_descriptor_t *pDescriptors, size_t size);
-
#if __cplusplus
} // extern "C"
#endif
diff --git a/include/media/nbaio/AudioBufferProviderSource.h b/include/media/nbaio/AudioBufferProviderSource.h
index 2c4aaff..b16e20a 100644
--- a/include/media/nbaio/AudioBufferProviderSource.h
+++ b/include/media/nbaio/AudioBufferProviderSource.h
@@ -27,7 +27,7 @@ namespace android {
class AudioBufferProviderSource : public NBAIO_Source {
public:
- AudioBufferProviderSource(AudioBufferProvider *provider, NBAIO_Format format);
+ AudioBufferProviderSource(AudioBufferProvider *provider, const NBAIO_Format& format);
virtual ~AudioBufferProviderSource();
// NBAIO_Port interface
diff --git a/include/media/nbaio/MonoPipe.h b/include/media/nbaio/MonoPipe.h
index d3802fe..b09b35f 100644
--- a/include/media/nbaio/MonoPipe.h
+++ b/include/media/nbaio/MonoPipe.h
@@ -41,7 +41,7 @@ public:
// Note: whatever shares this object with another thread needs to do so in an SMP-safe way (like
// creating it the object before creating the other thread, or storing the object with a
// release_store). Otherwise the other thread could see a partially-constructed object.
- MonoPipe(size_t reqFrames, NBAIO_Format format, bool writeCanBlock = false);
+ MonoPipe(size_t reqFrames, const NBAIO_Format& format, bool writeCanBlock = false);
virtual ~MonoPipe();
// NBAIO_Port interface
diff --git a/include/media/nbaio/NBAIO.h b/include/media/nbaio/NBAIO.h
index 1da0c73..9c9721a 100644
--- a/include/media/nbaio/NBAIO.h
+++ b/include/media/nbaio/NBAIO.h
@@ -53,24 +53,23 @@ enum {
// too large, then this decision should be re-visited.
// Sample rate and channel count are explicit, PCM interleaved 16-bit is assumed.
typedef unsigned NBAIO_Format;
-enum {
- Format_Invalid
-};
+
+extern const NBAIO_Format Format_Invalid;
// Return the frame size of an NBAIO_Format in bytes
-size_t Format_frameSize(NBAIO_Format format);
+size_t Format_frameSize(const NBAIO_Format& format);
// Return the frame size of an NBAIO_Format as a bit shift
-size_t Format_frameBitShift(NBAIO_Format format);
+size_t Format_frameBitShift(const NBAIO_Format& format);
// Convert a sample rate in Hz and channel count to an NBAIO_Format
NBAIO_Format Format_from_SR_C(unsigned sampleRate, unsigned channelCount);
// Return the sample rate in Hz of an NBAIO_Format
-unsigned Format_sampleRate(NBAIO_Format format);
+unsigned Format_sampleRate(const NBAIO_Format& format);
// Return the channel count of an NBAIO_Format
-unsigned Format_channelCount(NBAIO_Format format);
+unsigned Format_channelCount(const NBAIO_Format& format);
// Callbacks used by NBAIO_Sink::writeVia() and NBAIO_Source::readVia() below.
typedef ssize_t (*writeVia_t)(void *user, void *buffer, size_t count);
@@ -115,8 +114,8 @@ public:
virtual NBAIO_Format format() const { return mNegotiated ? mFormat : Format_Invalid; }
protected:
- NBAIO_Port(NBAIO_Format format) : mNegotiated(false), mFormat(format),
- mBitShift(Format_frameBitShift(format)) { }
+ NBAIO_Port(const NBAIO_Format& format) : mNegotiated(false), mFormat(format),
+ mBitShift(Format_frameBitShift(format)) { }
virtual ~NBAIO_Port() { }
// Implementations are free to ignore these if they don't need them
@@ -220,7 +219,7 @@ public:
virtual status_t getTimestamp(AudioTimestamp& timestamp) { return INVALID_OPERATION; }
protected:
- NBAIO_Sink(NBAIO_Format format = Format_Invalid) : NBAIO_Port(format), mFramesWritten(0) { }
+ NBAIO_Sink(const NBAIO_Format& format = Format_Invalid) : NBAIO_Port(format), mFramesWritten(0) { }
virtual ~NBAIO_Sink() { }
// Implementations are free to ignore these if they don't need them
@@ -311,7 +310,7 @@ public:
virtual void onTimestamp(const AudioTimestamp& timestamp) { }
protected:
- NBAIO_Source(NBAIO_Format format = Format_Invalid) : NBAIO_Port(format), mFramesRead(0) { }
+ NBAIO_Source(const NBAIO_Format& format = Format_Invalid) : NBAIO_Port(format), mFramesRead(0) { }
virtual ~NBAIO_Source() { }
// Implementations are free to ignore these if they don't need them
diff --git a/include/media/nbaio/Pipe.h b/include/media/nbaio/Pipe.h
index 79a4eee..c784129 100644
--- a/include/media/nbaio/Pipe.h
+++ b/include/media/nbaio/Pipe.h
@@ -30,7 +30,7 @@ class Pipe : public NBAIO_Sink {
public:
// maxFrames will be rounded up to a power of 2, and all slots are available. Must be >= 2.
- Pipe(size_t maxFrames, NBAIO_Format format);
+ Pipe(size_t maxFrames, const NBAIO_Format& format);
virtual ~Pipe();
// NBAIO_Port interface
diff --git a/include/media/stagefright/ACodec.h b/include/media/stagefright/ACodec.h
index bc391fc..7ba5acc 100644
--- a/include/media/stagefright/ACodec.h
+++ b/include/media/stagefright/ACodec.h
@@ -67,6 +67,8 @@ struct ACodec : public AHierarchicalStateMachine {
void signalRequestIDRFrame();
+ bool isConfiguredForAdaptivePlayback() { return mIsConfiguredForAdaptivePlayback; }
+
struct PortDescription : public RefBase {
size_t countBuffers();
IOMX::buffer_id bufferIDAt(size_t index) const;
@@ -187,6 +189,7 @@ private:
bool mIsEncoder;
bool mUseMetadataOnEncoderOutput;
bool mShutdownInProgress;
+ bool mIsConfiguredForAdaptivePlayback;
// If "mKeepComponentAllocated" we only transition back to Loaded state
// and do not release the component instance.
diff --git a/include/private/media/AudioTrackShared.h b/include/private/media/AudioTrackShared.h
index b5a4c0b..3901e79 100644
--- a/include/private/media/AudioTrackShared.h
+++ b/include/private/media/AudioTrackShared.h
@@ -65,7 +65,9 @@ typedef SingleStateQueue<StaticAudioTrackState> StaticAudioTrackSingleStateQueue
struct AudioTrackSharedStatic {
StaticAudioTrackSingleStateQueue::Shared
mSingleStateQueue;
- size_t mBufferPosition; // updated asynchronously by server,
+ // This field should be a size_t, but since it is located in shared memory we
+ // force to 32-bit. The client and server may have different typedefs for size_t.
+ uint32_t mBufferPosition; // updated asynchronously by server,
// "for entertainment purposes only"
};
@@ -104,7 +106,9 @@ struct audio_track_cblk_t
private:
- size_t mMinimum; // server wakes up client if available >= mMinimum
+ // This field should be a size_t, but since it is located in shared memory we
+ // force to 32-bit. The client and server may have different typedefs for size_t.
+ uint32_t mMinimum; // server wakes up client if available >= mMinimum
// Channel volumes are fixed point U4.12, so 0x1000 means 1.0.
// Left channel is in [0:15], right channel is in [16:31].
@@ -241,7 +245,11 @@ public:
}
void setMinimum(size_t minimum) {
- mCblk->mMinimum = minimum;
+ // This can only happen on a 64-bit client
+ if (minimum > UINT32_MAX) {
+ minimum = UINT32_MAX;
+ }
+ mCblk->mMinimum = (uint32_t) minimum;
}
// Return the number of frames that would need to be obtained and released
diff --git a/include/private/media/StaticAudioTrackState.h b/include/private/media/StaticAudioTrackState.h
index 46a5946..d483061 100644
--- a/include/private/media/StaticAudioTrackState.h
+++ b/include/private/media/StaticAudioTrackState.h
@@ -25,9 +25,13 @@ namespace android {
// state is wrapped by a SingleStateQueue.
struct StaticAudioTrackState {
// do not define constructors, destructors, or virtual methods
- size_t mLoopStart;
- size_t mLoopEnd;
- int mLoopCount;
+
+ // These fields should both be size_t, but since they are located in shared memory we
+ // force to 32-bit. The client and server may have different typedefs for size_t.
+ uint32_t mLoopStart;
+ uint32_t mLoopEnd;
+
+ int mLoopCount;
};
} // namespace android