summaryrefslogtreecommitdiffstats
path: root/libvideoeditor/lvpp/VideoEditorSRC.h
diff options
context:
space:
mode:
authorJames Dong <jdong@google.com>2012-01-13 17:34:42 -0800
committerJames Dong <jdong@google.com>2012-01-19 17:29:53 -0800
commit00f742c087d92e5452d29be1fb668022b5f8a6c7 (patch)
treedc3de13666176b2d17655b8719af93f5b3197252 /libvideoeditor/lvpp/VideoEditorSRC.h
parent7a4097cc526fc25a36e0f451613340a9444ca043 (diff)
downloadframeworks_av-00f742c087d92e5452d29be1fb668022b5f8a6c7.zip
frameworks_av-00f742c087d92e5452d29be1fb668022b5f8a6c7.tar.gz
frameworks_av-00f742c087d92e5452d29be1fb668022b5f8a6c7.tar.bz2
More source code Clean up in video editor engine
o fixed incorrect design and got rid of PreviewPlayerBase class o removed obsolete/unused code as much as possible and reformatted the source code o verified and passed functional tests o More to come ... Change-Id: I7a89162f8b9d9ea6eabcf0457366cd2f6d970d11
Diffstat (limited to 'libvideoeditor/lvpp/VideoEditorSRC.h')
-rwxr-xr-xlibvideoeditor/lvpp/VideoEditorSRC.h80
1 files changed, 38 insertions, 42 deletions
diff --git a/libvideoeditor/lvpp/VideoEditorSRC.h b/libvideoeditor/lvpp/VideoEditorSRC.h
index eabafde..3eb8c6c 100755
--- a/libvideoeditor/lvpp/VideoEditorSRC.h
+++ b/libvideoeditor/lvpp/VideoEditorSRC.h
@@ -14,13 +14,9 @@
* limitations under the License.
*/
-#include <stdint.h>
-
-#include <utils/RefBase.h>
-#include <utils/threads.h>
+#include <stdint.h>
#include <media/stagefright/MediaSource.h>
-
#include "AudioBufferProvider.h"
#include "AudioResampler.h"
@@ -30,61 +26,61 @@ struct MediaBuffer;
class VideoEditorSRC : public MediaSource , public AudioBufferProvider {
- public:
- VideoEditorSRC(
- const sp<MediaSource> &source);
+public:
+ VideoEditorSRC(const sp<MediaSource> &source);
- virtual status_t start (MetaData *params = NULL);
- virtual status_t stop();
- virtual sp<MetaData> getFormat();
- virtual status_t read (
- MediaBuffer **buffer, const ReadOptions *options = NULL);
+ virtual status_t start (MetaData *params = NULL);
+ virtual status_t stop();
+ virtual sp<MetaData> getFormat();
+ virtual status_t read (
+ MediaBuffer **buffer, const ReadOptions *options = NULL);
- virtual status_t getNextBuffer(Buffer* buffer);
- virtual void releaseBuffer(Buffer* buffer);
+ virtual status_t getNextBuffer(Buffer* buffer);
+ virtual void releaseBuffer(Buffer* buffer);
- enum { //Sampling freq
- kFreq8000Hz = 8000,
+ // Sampling freqencies
+ enum {
+ kFreq8000Hz = 8000,
kFreq11025Hz = 11025,
kFreq12000Hz = 12000,
kFreq16000Hz = 16000,
kFreq22050Hz = 22050,
kFreq24000Hz = 24000,
kFreq32000Hz = 32000,
- kFreq44100 = 44100,
- kFreq48000 = 48000,
+ kFreq44100Hz = 44100,
+ kFreq48000Hz = 48000,
};
- static const uint16_t UNITY_GAIN = 0x1000;
- static const int32_t DEFAULT_SAMPLING_FREQ = (int32_t)kFreq32000Hz;
+protected :
+ virtual ~VideoEditorSRC();
- protected :
- virtual ~VideoEditorSRC();
- private:
+private:
+ AudioResampler *mResampler;
+ sp<MediaSource> mSource;
+ int mChannelCnt;
+ int mSampleRate;
+ int32_t mOutputSampleRate;
+ bool mStarted;
+ sp<MetaData> mOutputFormat;
- VideoEditorSRC();
- VideoEditorSRC &operator=(const VideoEditorSRC &);
+ MediaBuffer* mBuffer;
+ int32_t mLeftover;
+ bool mFormatChanged;
+ bool mStopPending;
- void checkAndSetResampler();
+ int64_t mInitialTimeStampUs;
+ int64_t mAccuOutBufferSize;
- AudioResampler *mResampler;
- sp<MediaSource> mSource;
- int mChannelCnt;
- int mSampleRate;
- int32_t mOutputSampleRate;
- bool mStarted;
- sp<MetaData> mOutputFormat;
+ int64_t mSeekTimeUs;
+ ReadOptions::SeekMode mSeekMode;
- MediaBuffer* mBuffer;
- int32_t mLeftover;
- bool mFormatChanged;
- bool mStopPending;
+ VideoEditorSRC();
+ void checkAndSetResampler();
- int64_t mInitialTimeStampUs;
- int64_t mAccuOutBufferSize;
+ // Don't call me
+ VideoEditorSRC(const VideoEditorSRC&);
+ VideoEditorSRC &operator=(const VideoEditorSRC &);
- int64_t mSeekTimeUs;
- ReadOptions::SeekMode mSeekMode;
};
} //namespce android