Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ferjm committed Dec 19, 2017
1 parent 27a1019 commit b23977f
Show file tree
Hide file tree
Showing 6 changed files with 312 additions and 129 deletions.
1 change: 0 additions & 1 deletion gecko-media/gecko/glue/GeckoMediaDecoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ GeckoMediaDecoder::GeckoMediaDecoder(MediaDecoderInit& aInit)
: MediaDecoder(aInit)
, mGeckoWatchManager(this, aInit.mOwner->AbstractMainThread())
{
mExplicitDuration.emplace(UnspecifiedNaN<double>());
mGeckoWatchManager.Watch(mBuffered, &GeckoMediaDecoder::NotifyBuffered);
}

Expand Down
2 changes: 1 addition & 1 deletion gecko-media/gecko/glue/MediaSource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ MediaSource::SourceBuffers()
MOZ_ASSERT(NS_IsMainThread());

CALLBACK_GUARD(GetSourceBuffers, nullptr);
size_t* id = (*mImpl.mGetSourceBuffers)(mImpl.mContext);
size_t* id = CALLBACK_CALL(GetSourceBuffers);
if (NS_WARN_IF(!id)) {
return nullptr;
}
Expand Down
10 changes: 7 additions & 3 deletions gecko-media/gecko/glue/SourceBuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,16 @@ SourceBuffer::SourceBuffer(GeckoMediaSourceBufferImpl aImpl,
mMediaSource = GetMediaSource(aParentId);
MOZ_ASSERT(mMediaSource);

mTrackBuffersManager =
new TrackBuffersManager(mMediaSource->GetDecoder(), mime.value());
RefPtr<MediaSourceDecoder> decoder = mMediaSource->GetDecoder();
if (NS_WARN_IF(!decoder)) {
return;
}

mTrackBuffersManager = new TrackBuffersManager(decoder, mime.value());

MSE_DEBUG("Create mTrackBuffersManager=%p", mTrackBuffersManager.get());

mMediaSource->GetDecoder()->GetDemuxer()->AttachSourceBuffer(mTrackBuffersManager);
decoder->GetDemuxer()->AttachSourceBuffer(mTrackBuffersManager);
}

media::TimeIntervals
Expand Down
1 change: 0 additions & 1 deletion gecko-media/gecko/glue/include/MediaSource.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ class MediaSource final
MediaSourceReadyState ReadyState();

// Attach this MediaSource to Decoder aDecoder. Returns false if already attached.
// FIXME This will likely get a GeckoMediaSourceDecoder at some point.
bool Attach(MediaSourceDecoder* aDecoder);
void Detach();

Expand Down
Loading

0 comments on commit b23977f

Please sign in to comment.