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:
- Bug 1172264 - Mirror duration from the MDSM to the MediaDecoderReader and remove MDSM::GetDuration. r=jww (369a3d1b4) - Bug 1172264 - Route mExplicitDuration directly from the mediasource code to MediaDecoder, and stop passing an argument to DurationChanged. r=pending=jww (b429dfe41) - Bug 1172264 - Watch mStateMachineDuration, and stop manually firing DurationChanged. r=jww (54091368c) - bug 1126065 - Make JS callers of ios.newChannel call ios.newChannel2 in dom/browser-element. r=sicking (8c38534ed) - Bug 1144015 - (Browser API) mozbrowseropentab support. r=kchen (8b1eecb4e) - Bug 1143650: Update webref failure links r=karlt (b3c94f173) - Bug 1172264 - Mark WPT as succeeding. r=jya (664350c56) - Bug 1141029 - Disabling mochitests on Mulet with parity to B2G Desktop for taskcluster. r=ahal (73bb186cb) - Bug 1144080 - Disable mochitests on Mulet for TaskCluster. r=ahal (0b71b6a05) - Bug 1145407: Add mochitests that cause multiple tracks of the same type to be placed in the same remote stream. r=mt (263770e16) - Bug 1148649: Reenable video multistream mochitests on debug e10s. r=drno (f7674fe4a) - part of Bug 1094764 - Implement AudioContext.suspend and friends. @ (baa450713) - Bug 1166803 - Add an `msg` tag to mochitest.ini in dom/media/*. r=jesup (5284df8b2) - Bug 1166659 - Add mochitest tags for webaudio and webrtc. r=jesup, r=padenot (f5424f26f) - Bug 1087551: updated tests around addIceCandidate(). r=jib (f28cde40b) - Bug 1169338 - Part 1: Re-enable a subset of the webrtc mochitests on B2G emulator and Mulet. r=mt (9c0f8c2da) - Bug 1143827 - remove default stun server. r=abr,bsmedberg (f1e306a95) - Bug 1169338 - Part 2: Extend ICE timeouts since mochitests are frequently run on systems that are performance constrained. r=mt (da6147576) - Bug 1155493 - Part 1: Add CaretStateChangedEvent and corresponding utility function. r=roc, sr=smaug (9d710ad21) - Bug 995394: Removed parts of BrowserElementPanning.js that are only used when APZ is disabled and added that to a separte file BrowserElementPanningAPZDisabled.js r=botond, a=RyanVM (8b76bca9f) - Bug 1138252 - Load BrowserElementPanning.js only if touch events are enabled. r=botond (30f5f3197) - Bug 1155493 - Part 2: Event hook for mozbrowser element. r=kanru (6f6db8248) - Bug 1162844 - Add meta name="viewmode" to have configurable VR experiences. r=fabrice (07d6d0736) - Bug 1163961 - Browser API: Page search. r=kchen, r=ehsan (df0c37dfa) - Bug 1179718 - Convert BrowserElement.webidl to use CheckAllPermissions. r=bz (4a92b2c7d) - Bug 1147819 - Any media element should be stopped by the AudioChannelService when the window is destroyed, r=ehsan (e949db77f) - Bug 1153915 - Null check the window in AudioChannelService::WindowDestroyedEnumerator(); r=baku (b38261d9d) - Bug 1089526 - Change speaker state. r=baku (8dbf54b04) - Bug 1157121 - Add speaker status checking. r=baku (ec5416680) - Bug 1037389 - add support for deviceId in gUM constraints (merged 11 patches). r=smaug, r=jesup (bc6f9640d) - Bug 1180748 - Unbreak building with --disable-webrtc. r=jesup (b5d53b666)
This commit is contained in:
@@ -1379,26 +1379,11 @@ bool MediaDecoderStateMachine::IsRealTime() const
|
||||
return mRealTime;
|
||||
}
|
||||
|
||||
int64_t MediaDecoderStateMachine::GetDuration()
|
||||
{
|
||||
AssertCurrentThreadInMonitor();
|
||||
if (mDuration.Ref().isNothing() || Duration().IsInfinite()) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
return Duration().ToMicroseconds();
|
||||
}
|
||||
|
||||
void MediaDecoderStateMachine::RecomputeDuration()
|
||||
{
|
||||
MOZ_ASSERT(OnTaskQueue());
|
||||
ReentrantMonitorAutoEnter mon(mDecoder->GetReentrantMonitor());
|
||||
|
||||
// We dispatch DurationChanged to the MediaDecoder when the duration changes
|
||||
// sometime after initialization, unless it has already been fired by the code
|
||||
// that set the new duration.
|
||||
bool fireDurationChanged = false;
|
||||
|
||||
TimeUnit duration;
|
||||
if (mExplicitDuration.Ref().isSome()) {
|
||||
double d = mExplicitDuration.Ref().ref();
|
||||
@@ -1412,7 +1397,6 @@ void MediaDecoderStateMachine::RecomputeDuration()
|
||||
duration = TimeUnit::FromSeconds(d);
|
||||
} else if (mEstimatedDuration.Ref().isSome()) {
|
||||
duration = mEstimatedDuration.Ref().ref();
|
||||
fireDurationChanged = true;
|
||||
} else if (mInfo.mMetadataDuration.isSome()) {
|
||||
duration = mInfo.mMetadataDuration.ref();
|
||||
} else {
|
||||
@@ -1421,18 +1405,10 @@ void MediaDecoderStateMachine::RecomputeDuration()
|
||||
|
||||
if (duration < mObservedDuration.Ref()) {
|
||||
duration = mObservedDuration;
|
||||
fireDurationChanged = true;
|
||||
}
|
||||
fireDurationChanged = fireDurationChanged && duration != Duration();
|
||||
|
||||
MOZ_ASSERT(duration.ToMicroseconds() >= 0);
|
||||
mDuration = Some(duration);
|
||||
|
||||
if (fireDurationChanged) {
|
||||
nsCOMPtr<nsIRunnable> event =
|
||||
NS_NewRunnableMethodWithArg<TimeUnit>(mDecoder, &MediaDecoder::DurationChanged, duration);
|
||||
AbstractThread::MainThread()->Dispatch(event.forget());
|
||||
}
|
||||
}
|
||||
|
||||
void MediaDecoderStateMachine::SetFragmentEndTime(int64_t aEndTime)
|
||||
|
||||
Reference in New Issue
Block a user