diff options
author | James Dong <jdong@google.com> | 2012-01-12 12:12:40 -0800 |
---|---|---|
committer | James Dong <jdong@google.com> | 2012-01-12 15:53:01 -0800 |
commit | daeb5b33861147fda0096f9c794be6f341d884c2 (patch) | |
tree | 434128fd7151191d8718a57da09d3b019e874915 /libvideoeditor/lvpp/PreviewPlayer.cpp | |
parent | 8dcbd11c186e26b67de813adaec66dd578415cd7 (diff) | |
download | frameworks_av-daeb5b33861147fda0096f9c794be6f341d884c2.zip frameworks_av-daeb5b33861147fda0096f9c794be6f341d884c2.tar.gz frameworks_av-daeb5b33861147fda0096f9c794be6f341d884c2.tar.bz2 |
Remove streaming related logic from preview player.
Video editor engine only deals with local file playback/preview.
Change-Id: I8e3414abf8a109a77a1e34a959fb4a090612ae3d
related-to-bug: 5857057
Diffstat (limited to 'libvideoeditor/lvpp/PreviewPlayer.cpp')
-rwxr-xr-x | libvideoeditor/lvpp/PreviewPlayer.cpp | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/libvideoeditor/lvpp/PreviewPlayer.cpp b/libvideoeditor/lvpp/PreviewPlayer.cpp index 9a640a4..9d2154a 100755 --- a/libvideoeditor/lvpp/PreviewPlayer.cpp +++ b/libvideoeditor/lvpp/PreviewPlayer.cpp @@ -31,7 +31,6 @@ #include <binder/IPCThreadState.h> #include <media/stagefright/DataSource.h> -#include <media/stagefright/FileSource.h> #include <media/stagefright/MediaBuffer.h> #include <media/stagefright/MediaDefs.h> #include <media/stagefright/MediaExtractor.h> @@ -129,7 +128,7 @@ PreviewPlayer::~PreviewPlayer() { } } -void PreviewPlayer::cancelPlayerEvents(bool keepBufferingGoing) { +void PreviewPlayer::cancelPlayerEvents() { mQueue.cancelEvent(mVideoEvent->eventID()); mVideoEventPending = false; mQueue.cancelEvent(mStreamDoneEvent->eventID()); @@ -141,21 +140,15 @@ void PreviewPlayer::cancelPlayerEvents(bool keepBufferingGoing) { mProgressCbEventPending = false; } -status_t PreviewPlayer::setDataSource( - const char *uri, const KeyedVector<String8, String8> *headers) { +status_t PreviewPlayer::setDataSource(const char *path) { Mutex::Autolock autoLock(mLock); - return setDataSource_l(uri, headers); + return setDataSource_l(path); } -status_t PreviewPlayer::setDataSource_l( - const char *uri, const KeyedVector<String8, String8> *headers) { +status_t PreviewPlayer::setDataSource_l(const char *path) { reset_l(); - mUri = uri; - - if (headers) { - mUriHeaders = *headers; - } + mUri = path; // The actual work will be done during preparation in the call to // ::finishSetDataSource_l to avoid blocking the calling thread in @@ -324,9 +317,6 @@ void PreviewPlayer::reset_l() { mSeekTimeUs = 0; mUri.setTo(""); - mUriHeaders.clear(); - - mFileSource.clear(); mCurrentVideoEffect = VIDEO_EFFECT_NONE; mIsVideoSourceJpg = false; @@ -1160,7 +1150,7 @@ status_t PreviewPlayer::finishSetDataSource_l() { sp<DataSource> dataSource; sp<MediaExtractor> extractor; - dataSource = DataSource::CreateFromURI(mUri.string(), &mUriHeaders); + dataSource = DataSource::CreateFromURI(mUri.string(), NULL); if (dataSource == NULL) { return UNKNOWN_ERROR; |