mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-05-26 14:30:27 +00:00
import changes from `dev' branch of rmottola/Arctic-Fox:
- CLOSED TREE. Bug 1174077 - send silence instead of nothing to the decoded stream in CORS case. r=roc. (cf576aac9) - Bug 1177466 - Clean up places calling MaybeStartPlayback() in MediaDecoderStateMachine. r=cpearce (a2ef0f47b) - Remaining of Bug 1168008 - Replace 'Consumer' with 'Request' in MediaPromise (4e77e4f42) - bug 1137076 remove declaration of undefined OmxDecoder::ProcessCachedData() r=edwin (90ef83ee9) - bug 1137076 mark some methods as private r=edwin (e9f4dd0a1) - Bug 1173001 - Fix up some task queue naming to make MediaDecoderReader consistent with MDSM. r=jww (879b186ea)
This commit is contained in:
@@ -447,9 +447,11 @@ void MediaDecoderStateMachine::SendStreamData()
|
||||
bool finished =
|
||||
(!mInfo.HasAudio() || AudioQueue().IsFinished()) &&
|
||||
(!mInfo.HasVideo() || VideoQueue().IsFinished());
|
||||
if (mDecoder->IsSameOriginMedia()) {
|
||||
|
||||
{
|
||||
SourceMediaStream* mediaStream = stream->mStream;
|
||||
StreamTime endPosition = 0;
|
||||
const bool isSameOrigin = mDecoder->IsSameOriginMedia();
|
||||
|
||||
if (!stream->mStreamInitialized) {
|
||||
if (mInfo.HasAudio()) {
|
||||
@@ -487,6 +489,9 @@ void MediaDecoderStateMachine::SendStreamData()
|
||||
for (uint32_t i = 0; i < audio.Length(); ++i) {
|
||||
SendStreamAudio(audio[i], stream, &output);
|
||||
}
|
||||
if (!isSameOrigin) {
|
||||
output.ReplaceWithDisabled();
|
||||
}
|
||||
// |mNextAudioTime| is updated as we process each audio sample in
|
||||
// SendStreamAudio(). This is consistent with how |mNextVideoTime|
|
||||
// is updated for video samples.
|
||||
@@ -549,6 +554,9 @@ void MediaDecoderStateMachine::SendStreamData()
|
||||
v->mTime, v->GetEndTime());
|
||||
}
|
||||
}
|
||||
if (!isSameOrigin) {
|
||||
output.ReplaceWithDisabled();
|
||||
}
|
||||
if (output.GetDuration() > 0) {
|
||||
mediaStream->AppendToTrack(videoTrackId, &output);
|
||||
}
|
||||
@@ -2347,7 +2355,6 @@ MediaDecoderStateMachine::FinishDecodeFirstFrame()
|
||||
// So we need to check if this has occurred, else our decode pipeline won't
|
||||
// run (since it doesn't need to) and we won't detect end of stream.
|
||||
CheckIfDecodeComplete();
|
||||
MaybeStartPlayback();
|
||||
|
||||
if (mQueuedSeek.Exists()) {
|
||||
mPendingSeek.Steal(mQueuedSeek);
|
||||
@@ -2901,12 +2908,6 @@ void MediaDecoderStateMachine::UpdateRenderedVideoFrames()
|
||||
}
|
||||
}
|
||||
|
||||
// We've got enough data to keep playing until at least the next frame.
|
||||
// Start playing now if need be.
|
||||
if ((mFragmentEndTime >= 0 && clock_time < mFragmentEndTime) || mFragmentEndTime < 0) {
|
||||
MaybeStartPlayback();
|
||||
}
|
||||
|
||||
// Cap the current time to the larger of the audio and video end time.
|
||||
// This ensures that if we're running off the system clock, we don't
|
||||
// advance the clock to after the media end time.
|
||||
|
||||
Reference in New Issue
Block a user