summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Dong <jdong@google.com>2011-05-02 18:12:22 -0700
committerJames Dong <jdong@google.com>2011-05-03 08:47:28 -0700
commit2dbef65fea1115c53edda5bd4b40c4f49c0d06dd (patch)
treed684e987a060701ca39b7823c628098847cac865
parente84b6c0d8b1c969975560726ca1cf87d5c676ad6 (diff)
downloadframeworks_av-2dbef65fea1115c53edda5bd4b40c4f49c0d06dd.zip
frameworks_av-2dbef65fea1115c53edda5bd4b40c4f49c0d06dd.tar.gz
frameworks_av-2dbef65fea1115c53edda5bd4b40c4f49c0d06dd.tar.bz2
Cleaned up dummy audio and video sources
o remove unused member variables o replace a full loop with a memset Change-Id: Ib482525a321c2a17dd188fba47b642c63ab811c3
-rwxr-xr-xlibvideoeditor/lvpp/DummyAudioSource.cpp10
-rwxr-xr-xlibvideoeditor/lvpp/DummyAudioSource.h1
-rwxr-xr-xlibvideoeditor/lvpp/DummyVideoSource.h3
3 files changed, 2 insertions, 12 deletions
diff --git a/libvideoeditor/lvpp/DummyAudioSource.cpp b/libvideoeditor/lvpp/DummyAudioSource.cpp
index 4eca3aa..8273a40 100755
--- a/libvideoeditor/lvpp/DummyAudioSource.cpp
+++ b/libvideoeditor/lvpp/DummyAudioSource.cpp
@@ -158,7 +158,6 @@ status_t DummyAudioSource::read( MediaBuffer **out, const MediaSource::ReadOptio
status_t err = OK;
//LOG2("DummyAudioSource::read START");
MediaBuffer *buffer;
- int32_t byteCount;
int64_t seekTimeUs;
ReadOptions::SeekMode mode;
@@ -180,13 +179,8 @@ status_t DummyAudioSource::read( MediaBuffer **out, const MediaSource::ReadOptio
return err;
}
- uint8_t *inputPtr =
- ( uint8_t *)buffer->data() + buffer->range_offset();
-
- //TODO: replace with memset
- for (byteCount = 0; byteCount < (mNumberOfSamplePerFrame << 1); byteCount++) {
- inputPtr[byteCount] = 0;
- }
+ memset((uint8_t *) buffer->data() + buffer->range_offset(),
+ 0, mNumberOfSamplePerFrame << 1);
buffer->set_range(buffer->range_offset(), (mNumberOfSamplePerFrame << 1));
diff --git a/libvideoeditor/lvpp/DummyAudioSource.h b/libvideoeditor/lvpp/DummyAudioSource.h
index 6e6ead4..bb3f4a2 100755
--- a/libvideoeditor/lvpp/DummyAudioSource.h
+++ b/libvideoeditor/lvpp/DummyAudioSource.h
@@ -63,7 +63,6 @@ private:
int32_t mNumberOfSamplePerFrame;
int64_t mAudioDurationUs;
int64_t mTimeStampUs;
- int32_t mNbBuffer;
Mutex mLock;
MediaBufferGroup *mBufferGroup;
diff --git a/libvideoeditor/lvpp/DummyVideoSource.h b/libvideoeditor/lvpp/DummyVideoSource.h
index 6fcc0a9..686e637 100755
--- a/libvideoeditor/lvpp/DummyVideoSource.h
+++ b/libvideoeditor/lvpp/DummyVideoSource.h
@@ -21,7 +21,6 @@
#include <utils/RefBase.h>
#include <utils/threads.h>
-#include <media/stagefright/MediaBufferGroup.h>
#include <media/stagefright/MediaSource.h>
#include <media/stagefright/DataSource.h>
#include "OMX_IVCommon.h"
@@ -36,7 +35,6 @@ namespace android {
class MediaBuffer;
class MetaData;
-struct MediaBufferGroup;
struct DummyVideoSource : public MediaSource {
@@ -63,7 +61,6 @@ private:
uint64_t mImageClipDuration;
const char *mUri;
int64_t mFrameTimeUs;
- MediaBufferGroup *mBufferGroup;
bool mIsFirstImageFrame;
void *mImageBuffer;
M4OSA_Time mImagePlayStartTime;