mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 23:31:56 +00:00
Bug 1393399 P3 - keep the MediaDecoderOwner's identification in MFR; r=gerald
When GPU process crashes, the MediaDecoder, MDSM, and MFR are all destroyed. So, we use MediaDecoderOwner to identify which video we're dealing with. MozReview-Commit-ID: 1cv08M7Cpcf --HG-- extra : rebase_source : 62f7be874d97a58eb4c1d7a98b4e9fe83a9313d3
This commit is contained in:
parent
15e39cee1b
commit
e738871d59
@ -201,6 +201,7 @@ MediaDecoderStateMachine* ChannelMediaDecoder::CreateStateMachine()
|
||||
init.mCrashHelper = GetOwner()->CreateGMPCrashHelper();
|
||||
init.mFrameStats = mFrameStats;
|
||||
init.mResource = mResource;
|
||||
init.mMediaDecoderOwnerID = mOwner;
|
||||
mReader = DecoderTraits::CreateReader(ContainerType(), init);
|
||||
return new MediaDecoderStateMachine(this, mReader);
|
||||
}
|
||||
|
@ -1114,6 +1114,7 @@ MediaFormatReader::MediaFormatReader(MediaFormatReaderInit& aInit,
|
||||
TimeIntervals(),
|
||||
"MediaFormatReader::mBuffered (Canonical)")
|
||||
, mFrameStats(aInit.mFrameStats)
|
||||
, mMediaDecoderOwnerID(aInit.mMediaDecoderOwnerID)
|
||||
{
|
||||
MOZ_ASSERT(aDemuxer);
|
||||
MOZ_COUNT_CTOR(MediaFormatReader);
|
||||
|
@ -73,6 +73,8 @@ struct MetadataHolder
|
||||
UniquePtr<MetadataTags> mTags;
|
||||
};
|
||||
|
||||
typedef void* MediaDecoderOwnerID;
|
||||
|
||||
struct MOZ_STACK_CLASS MediaFormatReaderInit
|
||||
{
|
||||
MediaResource* mResource = nullptr;
|
||||
@ -80,6 +82,8 @@ struct MOZ_STACK_CLASS MediaFormatReaderInit
|
||||
FrameStatistics* mFrameStats = nullptr;
|
||||
already_AddRefed<layers::KnowsCompositor> mKnowsCompositor;
|
||||
already_AddRefed<GMPCrashHelper> mCrashHelper;
|
||||
// Used in bug 1393399 for temporary telemetry.
|
||||
MediaDecoderOwnerID mMediaDecoderOwnerID = nullptr;
|
||||
};
|
||||
|
||||
class MediaFormatReader final
|
||||
@ -762,6 +766,9 @@ private:
|
||||
MediaEventProducer<MediaResult> mOnDecodeWarning;
|
||||
|
||||
RefPtr<FrameStatistics> mFrameStats;
|
||||
|
||||
// Used in bug 1393399 for telemetry.
|
||||
const MediaDecoderOwnerID mMediaDecoderOwnerID;
|
||||
};
|
||||
|
||||
} // namespace mozilla
|
||||
|
@ -93,6 +93,7 @@ HLSDecoder::CreateStateMachine()
|
||||
init.mKnowsCompositor = GetCompositor();
|
||||
init.mCrashHelper = GetOwner()->CreateGMPCrashHelper();
|
||||
init.mFrameStats = mFrameStats;
|
||||
init.mMediaDecoderOwnerID = mOwner;
|
||||
mReader =
|
||||
new MediaFormatReader(init, new HLSDemuxer(mHLSResourceWrapper->GetPlayerId()));
|
||||
|
||||
|
@ -42,6 +42,7 @@ MediaSourceDecoder::CreateStateMachine()
|
||||
init.mKnowsCompositor = GetCompositor();
|
||||
init.mCrashHelper = GetOwner()->CreateGMPCrashHelper();
|
||||
init.mFrameStats = mFrameStats;
|
||||
init.mMediaDecoderOwnerID = mOwner;
|
||||
mReader = new MediaFormatReader(init, mDemuxer);
|
||||
return new MediaDecoderStateMachine(this, mReader);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user