diff options
author | Surajit Podder <spodder@codeaurora.org> | 2015-07-21 15:29:39 +0530 |
---|---|---|
committer | Satish Kamuju <skamuj@codeaurora.org> | 2015-10-06 17:36:01 +0530 |
commit | 9953765019ae2243e98e8e74eee327c9893b93d1 (patch) | |
tree | a0d21f06540cbdac85dcb6348a27b9eddf3cb68d /media/libstagefright/MPEG4Writer.cpp | |
parent | bd019775a921ae9165e924e4d37bc838a7ef5781 (diff) | |
download | frameworks_av-9953765019ae2243e98e8e74eee327c9893b93d1.zip frameworks_av-9953765019ae2243e98e8e74eee327c9893b93d1.tar.gz frameworks_av-9953765019ae2243e98e8e74eee327c9893b93d1.tar.bz2 |
video: Modify classes to support camcorder pause/resume
* Modify MediaRecorder, CameraSource, AudioSource to
be extendable.
* Add hooks to instantiate extended implementations to
implement pause/resume.
Change-Id: I847263fc69e4f613c5ea60fb6809c7da176d3a8d
Diffstat (limited to 'media/libstagefright/MPEG4Writer.cpp')
-rw-r--r-- | media/libstagefright/MPEG4Writer.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/media/libstagefright/MPEG4Writer.cpp b/media/libstagefright/MPEG4Writer.cpp index dd80b42..94f40b4 100644 --- a/media/libstagefright/MPEG4Writer.cpp +++ b/media/libstagefright/MPEG4Writer.cpp @@ -697,8 +697,6 @@ status_t MPEG4Writer::start(MetaData *param) { mIsRealTimeRecording = isRealTimeRecording; } - mStartTimestampUs = -1; - if (mStarted) { if (mPaused) { mPaused = false; @@ -707,6 +705,8 @@ status_t MPEG4Writer::start(MetaData *param) { return OK; } + mStartTimestampUs = -1; + if (!param || !param->findInt32(kKeyTimeScale, &mTimeScale)) { mTimeScale = 1000; @@ -2331,6 +2331,7 @@ status_t MPEG4Writer::Track::threadEntry() { previousPausedDurationUs = mStartTimestampUs; } +#if 0 if (mResumed) { int64_t durExcludingEarlierPausesUs = timestampUs - previousPausedDurationUs; if (WARN_UNLESS(durExcludingEarlierPausesUs >= 0ll, "for %s track", trackName)) { @@ -2347,6 +2348,7 @@ status_t MPEG4Writer::Track::threadEntry() { previousPausedDurationUs += pausedDurationUs - lastDurationUs; mResumed = false; } +#endif timestampUs -= previousPausedDurationUs; if (WARN_UNLESS(timestampUs >= 0ll, "for %s track", trackName)) { |