diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/media/MediaPlayerInterface.h | 18 | ||||
-rw-r--r-- | include/media/stagefright/CameraSource.h | 2 | ||||
-rw-r--r-- | include/media/stagefright/OMXCodec.h | 4 |
3 files changed, 19 insertions, 5 deletions
diff --git a/include/media/MediaPlayerInterface.h b/include/media/MediaPlayerInterface.h index c0963a6..048f041 100644 --- a/include/media/MediaPlayerInterface.h +++ b/include/media/MediaPlayerInterface.h @@ -126,8 +126,6 @@ public: virtual status_t setLooping(int loop) = 0; virtual player_type playerType() = 0; - virtual void setNotifyCallback(void* cookie, notify_callback_f notifyFunc) { - mCookie = cookie; mNotify = notifyFunc; } // Invoke a generic method on the player by using opaque parcels // for the request and reply. // @@ -149,9 +147,21 @@ public: return INVALID_OPERATION; }; - virtual void sendEvent(int msg, int ext1=0, int ext2=0) { if (mNotify) mNotify(mCookie, msg, ext1, ext2); } + void setNotifyCallback( + void* cookie, notify_callback_f notifyFunc) { + Mutex::Autolock autoLock(mNotifyLock); + mCookie = cookie; mNotify = notifyFunc; + } -protected: + void sendEvent(int msg, int ext1=0, int ext2=0) { + Mutex::Autolock autoLock(mNotifyLock); + if (mNotify) mNotify(mCookie, msg, ext1, ext2); + } + +private: + friend class MediaPlayerService; + + Mutex mNotifyLock; void* mCookie; notify_callback_f mNotify; }; diff --git a/include/media/stagefright/CameraSource.h b/include/media/stagefright/CameraSource.h index 794355b..4a39fbf 100644 --- a/include/media/stagefright/CameraSource.h +++ b/include/media/stagefright/CameraSource.h @@ -158,6 +158,7 @@ protected: int32_t mNumFramesReceived; int64_t mLastFrameTimestampUs; bool mStarted; + int32_t mNumFramesEncoded; CameraSource(const sp<ICamera>& camera, int32_t cameraId, Size videoSize, int32_t frameRate, @@ -189,7 +190,6 @@ private: List<int64_t> mFrameTimes; int64_t mFirstFrameTimeUs; - int32_t mNumFramesEncoded; int32_t mNumFramesDropped; int32_t mNumGlitches; int64_t mGlitchDurationThresholdUs; diff --git a/include/media/stagefright/OMXCodec.h b/include/media/stagefright/OMXCodec.h index 3251c28..82948cb 100644 --- a/include/media/stagefright/OMXCodec.h +++ b/include/media/stagefright/OMXCodec.h @@ -47,6 +47,9 @@ struct OMXCodec : public MediaSource, // Store meta data in video buffers kStoreMetaDataInVideoBuffers = 32, + + // Only submit one input buffer at one time. + kOnlySubmitOneInputBufferAtOneTime = 64, }; static sp<MediaSource> Create( const sp<IOMX> &omx, @@ -192,6 +195,7 @@ private: Condition mBufferFilled; bool mIsMetaDataStoredInVideoBuffers; + bool mOnlySubmitOneBufferAtOneTime; OMXCodec(const sp<IOMX> &omx, IOMX::node_id node, uint32_t quirks, bool isEncoder, const char *mime, const char *componentName, |