Bug 1316211. P3 - remove unused members.
MozReview-Commit-ID: 4cAHEvMEm9Q
--- a/dom/media/MediaDecoderReader.cpp
+++ b/dom/media/MediaDecoderReader.cpp
@@ -64,25 +64,22 @@ public:
mSize += audioData->SizeOfIncludingThis(MallocSizeOf);
return nullptr;
}
size_t mSize;
};
MediaDecoderReader::MediaDecoderReader(MediaDecoderReaderInit& aInit)
- : mAudioCompactor(mAudioQueue)
- , mDecoder(aInit.mDecoder)
+ : mDecoder(aInit.mDecoder)
, mTaskQueue(new TaskQueue(
GetMediaThreadPool(MediaThreadType::PLAYBACK),
"MediaDecoderReader::mTaskQueue",
/* aSupportsTailDispatch = */ true))
, mBuffered(mTaskQueue, TimeIntervals(), "MediaDecoderReader::mBuffered (Canonical)")
- , mIgnoreAudioOutputFormat(false)
- , mHitAudioDecodeError(false)
, mShutdown(false)
, mResource(aInit.mResource)
{
MOZ_COUNT_CTOR(MediaDecoderReader);
MOZ_ASSERT(NS_IsMainThread());
}
nsresult
@@ -128,36 +125,31 @@ MediaDecoderReader::UpdateDuration(const
mDuration = Some(aDuration);
UpdateBuffered();
}
nsresult MediaDecoderReader::ResetDecode(TrackSet aTracks)
{
if (aTracks.contains(TrackInfo::kVideoTrack)) {
VideoQueue().Reset();
- mBaseVideoPromise.RejectIfExists(NS_ERROR_DOM_MEDIA_CANCELED, __func__);
}
if (aTracks.contains(TrackInfo::kAudioTrack)) {
AudioQueue().Reset();
- mBaseAudioPromise.RejectIfExists(NS_ERROR_DOM_MEDIA_CANCELED, __func__);
}
return NS_OK;
}
RefPtr<ShutdownPromise>
MediaDecoderReader::Shutdown()
{
MOZ_ASSERT(OnTaskQueue());
mShutdown = true;
- mBaseAudioPromise.RejectIfExists(NS_ERROR_DOM_MEDIA_END_OF_STREAM, __func__);
- mBaseVideoPromise.RejectIfExists(NS_ERROR_DOM_MEDIA_END_OF_STREAM, __func__);
-
ReleaseResources();
mBuffered.DisconnectAll();
mDecoder = nullptr;
return mTaskQueue->BeginShutdown();
}
--- a/dom/media/MediaDecoderReader.h
+++ b/dom/media/MediaDecoderReader.h
@@ -182,17 +182,16 @@ public:
virtual void SetCDMProxy(CDMProxy* aProxy) = 0;
// Tell the reader that the data decoded are not for direct playback, so it
// can accept more files, in particular those which have more channels than
// available in the audio output.
void SetIgnoreAudioOutputFormat()
{
- mIgnoreAudioOutputFormat = true;
}
// The MediaDecoderStateMachine uses various heuristics that assume that
// raw media data is arriving sequentially from a network channel. This
// makes sense in the <video src="foo"> case, but not for more advanced use
// cases like MSE.
virtual bool UseBufferingHeuristics() const = 0;
@@ -293,46 +292,30 @@ protected:
// Queue of audio frames. This queue is threadsafe, and is accessed from
// the audio, decoder, state machine, and main threads.
MediaQueue<AudioData> mAudioQueue;
// Queue of video frames. This queue is threadsafe, and is accessed from
// the decoder, state machine, and main threads.
MediaQueue<VideoData> mVideoQueue;
- // An adapter to the audio queue which first copies data to buffers with
- // minimal allocation slop and then pushes them to the queue. This is
- // useful for decoders working with formats that give awkward numbers of
- // frames such as mp3.
- AudioCompactor mAudioCompactor;
-
// Reference to the owning decoder object.
AbstractMediaDecoder* mDecoder;
// Decode task queue.
RefPtr<TaskQueue> mTaskQueue;
// Buffered range.
Canonical<media::TimeIntervals> mBuffered;
// Stores presentation info required for playback.
MediaInfo mInfo;
media::NullableTimeUnit mDuration;
- // Whether we should accept media that we know we can't play
- // directly, because they have a number of channel higher than
- // what we support.
- bool mIgnoreAudioOutputFormat;
-
- // This is a quick-and-dirty way for DecodeAudioData implementations to
- // communicate the presence of a decoding error to RequestAudioData. We should
- // replace this with a promise-y mechanism as we make this stuff properly
- // async.
- bool mHitAudioDecodeError;
bool mShutdown;
// Used to send TimedMetadata to the listener.
TimedMetadataEventProducer mTimedMetadataEvent;
// Notify if this media is not seekable.
MediaEventProducer<void> mOnMediaNotSeekable;
@@ -344,18 +327,13 @@ protected:
MediaEventProducer<void> mOnWaitingForKey;
MediaEventProducer<MediaResult> mOnDecodeWarning;
RefPtr<MediaResource> mResource;
private:
virtual nsresult InitInternal() = 0;
-
- // Promises used only for the base-class (sync->async adapter) implementation
- // of Request{Audio,Video}Data.
- MozPromiseHolder<AudioDataPromise> mBaseAudioPromise;
- MozPromiseHolder<VideoDataPromise> mBaseVideoPromise;
};
} // namespace mozilla
#endif