\r
\r
sp<DummyVideoSource> DummyVideoSource::Create (\r
- uint32_t width, uint32_t height, \r
+ uint32_t width, uint32_t height,\r
uint64_t clipDuration, const char *imageUri) {\r
LOG2("DummyVideoSource::Create ");\r
sp<DummyVideoSource> vSource = new DummyVideoSource (\r
\r
\r
DummyVideoSource::DummyVideoSource (\r
- uint32_t width, uint32_t height, \r
+ uint32_t width, uint32_t height,\r
uint64_t clipDuration, const char *imageUri) {\r
\r
LOG2("DummyVideoSource::DummyVideoSource constructor START");\r
return meta;\r
}\r
\r
-status_t DummyVideoSource::read( \r
- MediaBuffer **out, \r
+status_t DummyVideoSource::read(\r
+ MediaBuffer **out,\r
const MediaSource::ReadOptions *options) {\r
status_t err = OK;\r
MediaBuffer *buffer;\r
if (options && options->getSeekTo(&seekTimeUs, &seekMode)) {\r
seeking = true;\r
mImageSeekTime = seekTimeUs;\r
+ M4OSA_clockGetTime(&mImagePlayStartTime, 1000); //1000 time scale for time in ms\r
}\r
\r
if ((mImageSeekTime == mImageClipDuration) || (mFrameTimeUs == mImageClipDuration)) {\r
mTimeSource = &mSystemTimeSource;
}
+ // Set the seek option for Image source files and read.
+ // This resets the timestamping for image play
+ if (mIsVideoSourceJpg) {
+ MediaSource::ReadOptions options;
+ MediaBuffer *aLocalBuffer;
+ options.setSeekTo(mSeekTimeUs);
+ mVideoSource->read(&aLocalBuffer, &options);
+ }
+
if (mVideoSource != NULL) {
// Kick off video playback
postVideoEvent_l();
break;\r
case 0xAAAAAAAA:\r
LOGV("VIDEO PLAYBACK ALMOST over, prepare next player");\r
- pController->mPrepareReqest = M4OSA_TRUE;\r
// Select next player and prepare it\r
// If there is a clip after this one\r
if ((pController->mCurrentClipNumber+1) <\r
pController->mNumberClipsToPreview) {\r
-\r
+ pController->mPrepareReqest = M4OSA_TRUE;\r
pController->mCurrentPlayer++;\r
if (pController->mCurrentPlayer >= NBPLAYER_INSTANCES) {\r
pController->mCurrentPlayer = 0;\r