diff options
author | James Dong <jdong@google.com> | 2012-02-02 18:04:02 -0800 |
---|---|---|
committer | James Dong <jdong@google.com> | 2012-02-02 18:11:53 -0800 |
commit | b44c9d2bdc0d5b9cb03254022a58e017b516e9e6 (patch) | |
tree | 06a30f5984b5fd11da06bbc6bc7d8294f21d1ac2 /include/media/stagefright/CameraSource.h | |
parent | 2af955b7437ac5345d75a5e528ebbb749667af7e (diff) | |
download | frameworks_av-b44c9d2bdc0d5b9cb03254022a58e017b516e9e6.zip frameworks_av-b44c9d2bdc0d5b9cb03254022a58e017b516e9e6.tar.gz frameworks_av-b44c9d2bdc0d5b9cb03254022a58e017b516e9e6.tar.bz2 |
Don't call virtual functions in the destructor for audio and camera source classes
Change-Id: Ia74ffc1c0cbd7971697f5e3c476e340ec5c7727a
Diffstat (limited to 'include/media/stagefright/CameraSource.h')
-rw-r--r-- | include/media/stagefright/CameraSource.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/media/stagefright/CameraSource.h b/include/media/stagefright/CameraSource.h index 446720b..5a35358 100644 --- a/include/media/stagefright/CameraSource.h +++ b/include/media/stagefright/CameraSource.h @@ -79,7 +79,7 @@ public: virtual ~CameraSource(); virtual status_t start(MetaData *params = NULL); - virtual status_t stop(); + virtual status_t stop() { return reset(); } virtual status_t read( MediaBuffer **buffer, const ReadOptions *options = NULL); @@ -163,7 +163,6 @@ protected: bool storeMetaDataInVideoBuffers); virtual void startCameraRecording(); - virtual void stopCameraRecording(); virtual void releaseRecordingFrame(const sp<IMemory>& frame); // Returns true if need to skip the current frame. @@ -220,7 +219,9 @@ private: status_t checkFrameRate(const CameraParameters& params, int32_t frameRate); + void stopCameraRecording(); void releaseCamera(); + status_t reset(); CameraSource(const CameraSource &); CameraSource &operator=(const CameraSource &); |