mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 895753 - Rtsp: Support suspend and resume to media stream server. r=sworkman
This commit is contained in:
parent
16f635c504
commit
9e77e68edf
@ -207,7 +207,16 @@ void RTSPSource::performPlay(int64_t playTimeUs) {
|
|||||||
if (mState == PAUSING) {
|
if (mState == PAUSING) {
|
||||||
playTimeUs = mLatestPausedUnit;
|
playTimeUs = mLatestPausedUnit;
|
||||||
}
|
}
|
||||||
LOGI("performPlay : %lld", playTimeUs);
|
|
||||||
|
int64_t duration = 0;
|
||||||
|
getDuration(&duration);
|
||||||
|
MOZ_ASSERT(playTimeUs < duration,
|
||||||
|
"Should never receive an out of bounds play time!");
|
||||||
|
if (playTimeUs >= duration) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
LOGI("performPlay : duration=%lld playTimeUs=%lld", duration, playTimeUs);
|
||||||
mState = PLAYING;
|
mState = PLAYING;
|
||||||
mHandler->play(playTimeUs);
|
mHandler->play(playTimeUs);
|
||||||
}
|
}
|
||||||
@ -238,13 +247,22 @@ void RTSPSource::performSeek(int64_t seekTimeUs) {
|
|||||||
if (mState != PLAYING && mState != PAUSING) {
|
if (mState != PLAYING && mState != PAUSING) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
LOGI("performSeek: %llu", seekTimeUs);
|
|
||||||
|
int64_t duration = 0;
|
||||||
|
getDuration(&duration);
|
||||||
|
MOZ_ASSERT(seekTimeUs < duration,
|
||||||
|
"Should never receive an out of bounds seek time!");
|
||||||
|
if (seekTimeUs >= duration) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
for (size_t i = 0; i < mTracks.size(); ++i) {
|
for (size_t i = 0; i < mTracks.size(); ++i) {
|
||||||
TrackInfo *info = &mTracks.editItemAt(i);
|
TrackInfo *info = &mTracks.editItemAt(i);
|
||||||
info->mLatestPausedUnit = 0;
|
info->mLatestPausedUnit = 0;
|
||||||
mLatestPausedUnit = 0;
|
mLatestPausedUnit = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LOGI("performSeek: %llu", seekTimeUs);
|
||||||
mState = SEEKING;
|
mState = SEEKING;
|
||||||
mHandler->seek(seekTimeUs);
|
mHandler->seek(seekTimeUs);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user