Bug 1317576. Part 4 - remove unused MediaDecoder::SeekResolveValue.
MozReview-Commit-ID: 9H6e0gFvWeT
--- a/dom/media/MediaDecoder.cpp
+++ b/dom/media/MediaDecoder.cpp
@@ -1120,17 +1120,17 @@ MediaDecoder::NotifyBytesConsumed(int64_
MOZ_ASSERT(mDecoderStateMachine);
if (aOffset >= mDecoderPosition) {
mPlaybackStatistics->AddBytes(aBytes);
}
mDecoderPosition = aOffset + aBytes;
}
void
-MediaDecoder::OnSeekResolved(SeekResolveValue aVal)
+MediaDecoder::OnSeekResolved()
{
MOZ_ASSERT(NS_IsMainThread());
MOZ_ASSERT(!IsShutdown());
mSeekRequest.Complete();
{
// An additional seek was requested while the current seek was
// in operation.
--- a/dom/media/MediaDecoder.h
+++ b/dom/media/MediaDecoder.h
@@ -53,19 +53,16 @@ enum class MediaEventType : int8_t;
// GetTickCount() and conflicts with MediaDecoder::GetCurrentTime implementation.
#ifdef GetCurrentTime
#undef GetCurrentTime
#endif
class MediaDecoder : public AbstractMediaDecoder
{
public:
- struct SeekResolveValue {
- };
-
// Used to register with MediaResource to receive notifications which will
// be forwarded to MediaDecoder.
class ResourceCallback : public MediaResourceCallback {
// Throttle calls to MediaDecoder::NotifyDataArrived()
// to be at most once per 500ms.
static const uint32_t sDelay = 500;
public:
@@ -90,17 +87,17 @@ public:
static void TimerCallback(nsITimer* aTimer, void* aClosure);
// The decoder to send notifications. Main-thread only.
MediaDecoder* mDecoder = nullptr;
nsCOMPtr<nsITimer> mTimer;
bool mTimerArmed = false;
};
- typedef MozPromise<SeekResolveValue, bool /* aIgnored */, /* IsExclusive = */ true> SeekPromise;
+ typedef MozPromise<bool /* aIgnored */, bool /* aIgnored */, /* IsExclusive = */ true> SeekPromise;
NS_DECL_THREADSAFE_ISUPPORTS
// Enumeration for the valid play states (see mPlayState)
enum PlayState {
PLAY_STATE_START,
PLAY_STATE_LOADING,
PLAY_STATE_PAUSED,
@@ -380,17 +377,17 @@ private:
// the track list. Call on the main thread only.
void RemoveMediaTracks();
// Called when the video has completed playing.
// Call on the main thread only.
void PlaybackEnded();
void OnSeekRejected();
- void OnSeekResolved(SeekResolveValue aVal);
+ void OnSeekResolved();
void SeekingChanged()
{
// Stop updating the bytes downloaded for progress notifications when
// seeking to prevent wild changes to the progress notification.
MOZ_ASSERT(NS_IsMainThread());
mIgnoreProgressData = mLogicallySeeking;
}
--- a/dom/media/SeekJob.cpp
+++ b/dom/media/SeekJob.cpp
@@ -36,18 +36,17 @@ SeekJob& SeekJob::operator=(SeekJob&& aO
bool SeekJob::Exists() const
{
MOZ_ASSERT(mTarget.IsValid() == !mPromise.IsEmpty());
return mTarget.IsValid();
}
void SeekJob::Resolve(const char* aCallSite)
{
- MediaDecoder::SeekResolveValue val;
- mPromise.Resolve(val, aCallSite);
+ mPromise.Resolve(true, aCallSite);
mTarget.Reset();
}
void SeekJob::RejectIfExists(const char* aCallSite)
{
mTarget.Reset();
mPromise.RejectIfExists(true, aCallSite);
}