diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/media/MediaPlayerInterface.h | 6 | ||||
-rwxr-xr-x | include/media/stagefright/LPAPlayer.h | 4 | ||||
-rw-r--r-- | include/media/stagefright/TunnelPlayer.h | 15 |
3 files changed, 22 insertions, 3 deletions
diff --git a/include/media/MediaPlayerInterface.h b/include/media/MediaPlayerInterface.h index 00d53af..5f9eb01 100644 --- a/include/media/MediaPlayerInterface.h +++ b/include/media/MediaPlayerInterface.h @@ -1,5 +1,8 @@ /* * Copyright (C) 2007 The Android Open Source Project + * Copyright (c) 2013, The Linux Foundation. All rights reserved. + * Not a Contribution, Apache license notifications and license are retained + * for attribution purposes only. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -87,6 +90,9 @@ public: virtual ssize_t channelCount() const = 0; virtual ssize_t frameSize() const = 0; virtual uint32_t latency() const = 0; +#ifdef QCOM_HARDWARE + virtual audio_stream_type_t streamType() const {return AUDIO_STREAM_DEFAULT;} +#endif virtual float msecsPerFrame() const = 0; virtual status_t getPosition(uint32_t *position) const = 0; virtual status_t getFramesWritten(uint32_t *frameswritten) const = 0; diff --git a/include/media/stagefright/LPAPlayer.h b/include/media/stagefright/LPAPlayer.h index 91f9b3a..ceba399 100755 --- a/include/media/stagefright/LPAPlayer.h +++ b/include/media/stagefright/LPAPlayer.h @@ -206,6 +206,9 @@ private: void handleA2DPSwitch(); void onPauseTimeOut(); + int64_t getMediaTimeUs_l(); + bool seekTooClose(int64_t); + sp<AudioFlingerLPAdecodeClient> AudioFlingerClient; friend class AudioFlingerLPAdecodeClient; Mutex AudioFlingerLock; @@ -260,7 +263,6 @@ private: MediaPlayerBase::AudioSink *audioSink, void *buffer, size_t size, void *cookie); size_t AudioCallback(void *cookie, void *data, size_t size); - int64_t getMediaTimeUs_l(); void convertMonoToStereo(int16_t *data, size_t size); diff --git a/include/media/stagefright/TunnelPlayer.h b/include/media/stagefright/TunnelPlayer.h index 04cc750..0b083b3 100644 --- a/include/media/stagefright/TunnelPlayer.h +++ b/include/media/stagefright/TunnelPlayer.h @@ -133,8 +133,7 @@ private: //Declare the condition Variables and Mutex - pthread_mutex_t extractor_mutex; - pthread_cond_t extractor_cv; + Condition mExtractorCV; // make sure Decoder thread has exited @@ -198,8 +197,18 @@ private: sp<TimedEventQueue::Event> mPauseEvent; bool mPauseEventPending; + typedef enum { + NCREATED = -1, + INITIALIZED, + RUNNING, + SLEEPING, + EXITING, + } ThreadState; + sp<MediaPlayerBase::AudioSink> mAudioSink; AwesomePlayer *mObserver; + ThreadState mThreadState; + bool mStopSinkPending; static size_t AudioSinkCallback( MediaPlayerBase::AudioSink *audioSink, @@ -218,6 +227,8 @@ private: size_t fillBuffer(void *data, size_t size); void reset(); + status_t schedPauseTimeOut(); + status_t stopAudioSink(); TunnelPlayer(const TunnelPlayer &); TunnelPlayer &operator=(const TunnelPlayer &); |