Bug 1371200. P3 - remove unused code.
MozReview-Commit-ID: JVmmKSAQl3q
--- a/dom/media/MediaDecoder.cpp
+++ b/dom/media/MediaDecoder.cpp
@@ -677,28 +677,16 @@ MediaDecoder::SetStateMachineParameters(
mOnPlaybackErrorEvent = mDecoderStateMachine->OnPlaybackErrorEvent().Connect(
mAbstractMainThread, this, &MediaDecoder::OnPlaybackErrorEvent);
mOnDecoderDoctorEvent = mDecoderStateMachine->OnDecoderDoctorEvent().Connect(
mAbstractMainThread, this, &MediaDecoder::OnDecoderDoctorEvent);
mOnMediaNotSeekable = mDecoderStateMachine->OnMediaNotSeekable().Connect(
mAbstractMainThread, this, &MediaDecoder::OnMediaNotSeekable);
}
-void
-MediaDecoder::SetMinimizePrerollUntilPlaybackStarts()
-{
- MOZ_ASSERT(NS_IsMainThread());
- LOG("SetMinimizePrerollUntilPlaybackStarts()");
- mMinimizePreroll = true;
-
- // This needs to be called before we init the state machine, otherwise it will
- // have no effect.
- MOZ_DIAGNOSTIC_ASSERT(!mDecoderStateMachine);
-}
-
nsresult
MediaDecoder::Play()
{
MOZ_ASSERT(NS_IsMainThread());
NS_ASSERTION(mDecoderStateMachine != nullptr, "Should have state machine.");
if (mPlaybackRate == 0) {
return NS_OK;
--- a/dom/media/MediaDecoder.h
+++ b/dom/media/MediaDecoder.h
@@ -223,21 +223,16 @@ public:
// Pause video playback.
virtual void Pause();
// Adjust the speed of the playback, optionally with pitch correction,
virtual void SetVolume(double aVolume);
virtual void SetPlaybackRate(double aPlaybackRate);
void SetPreservesPitch(bool aPreservesPitch);
- // Directs the decoder to not preroll extra samples until the media is
- // played. This reduces the memory overhead of media elements that may
- // not be played. Note that seeking also doesn't cause us start prerolling.
- void SetMinimizePrerollUntilPlaybackStarts();
-
bool GetMinimizePreroll() const { return mMinimizePreroll; }
// All MediaStream-related data is protected by mReentrantMonitor.
// We have at most one DecodedStreamData per MediaDecoder. Its stream
// is used as the input for each ProcessedMediaStream created by calls to
// captureStream(UntilEnded). Seeking creates a new source stream, as does
// replaying after the input as ended. In the latter case, the new source is
// not connected to streams created by captureStreamUntilEnded.
@@ -380,17 +375,16 @@ private:
// The actual playback rate computation. The monitor must be held.
void ComputePlaybackRate();
// Returns true if we can play the entire media through without stopping
// to buffer, given the current download and playback rates.
virtual bool CanPlayThrough();
- void SetAudioChannel(dom::AudioChannel aChannel) { mAudioChannel = aChannel; }
dom::AudioChannel GetAudioChannel() { return mAudioChannel; }
// Called from HTMLMediaElement when owner document activity changes
virtual void SetElementVisibility(bool aIsDocumentVisible,
Visibility aElementVisibility,
bool aIsElementInTree);
// Force override the visible state to hidden.