diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/media/AudioRecord.h | 4 | ||||
-rw-r--r-- | include/media/AudioTrack.h | 6 | ||||
-rw-r--r-- | include/private/media/AudioTrackShared.h | 7 | ||||
-rw-r--r-- | include/surfaceflinger/ISurfaceComposer.h | 7 | ||||
-rw-r--r-- | include/ui/egl/android_natives.h | 15 |
5 files changed, 36 insertions, 3 deletions
diff --git a/include/media/AudioRecord.h b/include/media/AudioRecord.h index 5f7cd90..293764d 100644 --- a/include/media/AudioRecord.h +++ b/include/media/AudioRecord.h @@ -346,12 +346,14 @@ private: }; bool processAudioBuffer(const sp<ClientRecordThread>& thread); - status_t openRecord(uint32_t sampleRate, + status_t openRecord_l(uint32_t sampleRate, int format, int channelCount, int frameCount, uint32_t flags, 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; diff --git a/include/media/AudioTrack.h b/include/media/AudioTrack.h index 813a905..3e346db 100644 --- a/include/media/AudioTrack.h +++ b/include/media/AudioTrack.h @@ -437,7 +437,7 @@ private: }; bool processAudioBuffer(const sp<AudioTrackThread>& thread); - status_t createTrack(int streamType, + status_t createTrack_l(int streamType, uint32_t sampleRate, int format, int channelCount, @@ -446,6 +446,10 @@ private: const sp<IMemory>& sharedBuffer, audio_io_handle_t output, bool enforceFrameCount); + void flush_l(); + status_t setLoop_l(uint32_t loopStart, uint32_t loopEnd, int loopCount); + audio_io_handle_t getOutput_l(); + status_t restoreTrack_l(audio_track_cblk_t*& cblk, bool fromStart); sp<IAudioTrack> mAudioTrack; sp<IMemory> mCblkMemory; diff --git a/include/private/media/AudioTrackShared.h b/include/private/media/AudioTrackShared.h index c6990bf..4610135 100644 --- a/include/private/media/AudioTrackShared.h +++ b/include/private/media/AudioTrackShared.h @@ -31,6 +31,7 @@ namespace android { #define MAX_STARTUP_TIMEOUT_MS 3000 // Longer timeout period at startup to cope with A2DP init time #define MAX_RUN_TIMEOUT_MS 1000 #define WAIT_PERIOD_MS 10 +#define RESTORE_TIMEOUT_MS 5000 // Maximum waiting time for a track to be restored #define CBLK_UNDERRUN_MSK 0x0001 #define CBLK_UNDERRUN_ON 0x0001 // underrun (out) or overrrun (in) indication @@ -47,6 +48,12 @@ namespace android { #define CBLK_DISABLED_MSK 0x0010 #define CBLK_DISABLED_ON 0x0010 // track disabled by AudioFlinger due to underrun: #define CBLK_DISABLED_OFF 0x0000 // must be re-started +#define CBLK_RESTORING_MSK 0x0020 +#define CBLK_RESTORING_ON 0x0020 // track is being restored after invalidation +#define CBLK_RESTORING_OFF 0x0000 // by AudioFlinger +#define CBLK_RESTORED_MSK 0x0040 +#define CBLK_RESTORED_ON 0x0040 // track has been restored after invalidation +#define CBLK_RESTORED_OFF 0x0040 // by AudioFlinger struct audio_track_cblk_t { diff --git a/include/surfaceflinger/ISurfaceComposer.h b/include/surfaceflinger/ISurfaceComposer.h index 361e7dc..dea1b10 100644 --- a/include/surfaceflinger/ISurfaceComposer.h +++ b/include/surfaceflinger/ISurfaceComposer.h @@ -138,6 +138,10 @@ public: * This is an ASYNCHRONOUS call. */ virtual void signal() const = 0; + + /* verify that an ISurface was created by SurfaceFlinger. + */ + virtual bool authenticateSurface(const sp<ISurface>& surface) const = 0; }; // ---------------------------------------------------------------------------- @@ -161,7 +165,8 @@ public: SIGNAL, CAPTURE_SCREEN, TURN_ELECTRON_BEAM_OFF, - TURN_ELECTRON_BEAM_ON + TURN_ELECTRON_BEAM_ON, + AUTHENTICATE_SURFACE, }; virtual status_t onTransact( uint32_t code, diff --git a/include/ui/egl/android_natives.h b/include/ui/egl/android_natives.h index fd83f46..0ac34d0 100644 --- a/include/ui/egl/android_natives.h +++ b/include/ui/egl/android_natives.h @@ -95,6 +95,21 @@ enum { * 5. Queue, dequeue, queue, dequeue, ad infinitum */ NATIVE_WINDOW_MIN_UNDEQUEUED_BUFFERS, + + /* Check whether queueBuffer operations on the ANativeWindow send the buffer + * to the window compositor. The query sets the returned 'value' argument + * to 1 if the ANativeWindow DOES send queued buffers directly to the window + * compositor and 0 if the buffers do not go directly to the window + * compositor. + * + * This can be used to determine whether protected buffer content should be + * sent to the ANativeWindow. Note, however, that a result of 1 does NOT + * indicate that queued buffers will be protected from applications or users + * capturing their contents. If that behavior is desired then some other + * mechanism (e.g. the GRALLOC_USAGE_PROTECTED flag) should be used in + * conjunction with this query. + */ + NATIVE_WINDOW_QUEUES_TO_WINDOW_COMPOSER, }; /* valid operations for the (*perform)() hook */ |