Bug 1208922. Part 6 - IsWaitingOnCDMResource() is not used by MDSM anymore. Remove it from MediaDecoderReader and make it private in MediaFormatReader. r=cpearce.

This commit is contained in:
JW Wang 2015-09-27 18:59:52 +08:00
Родитель 6b35bad359
Коммит 7651430ef0
3 изменённых файлов: 5 добавлений и 10 удалений

Просмотреть файл

@ -97,9 +97,6 @@ public:
// True if this reader is waiting media resource allocation
virtual bool IsWaitingMediaResources() { return false; }
// True if this reader is waiting for a Content Decryption Module to become
// available.
virtual bool IsWaitingOnCDMResource() { return false; }
// Release media resources they should be released in dormant state
// The reader can be made usable again by calling ReadMetadata().
virtual void ReleaseMediaResources() {};

Просмотреть файл

@ -226,7 +226,9 @@ MediaFormatReader::SetCDMProxy(CDMProxy* aProxy)
}
#endif // MOZ_EME
bool MediaFormatReader::IsWaitingOnCDMResource() {
bool
MediaFormatReader::IsWaitingOnCDMResource() {
MOZ_ASSERT(OnTaskQueue());
#ifdef MOZ_EME
return IsEncrypted() && !mCDMProxy;
#else

Просмотреть файл

@ -88,8 +88,6 @@ public:
bool IsWaitForDataSupported() override { return true; }
nsRefPtr<WaitForDataPromise> WaitForData(MediaData::Type aType) override;
bool IsWaitingOnCDMResource() override;
bool UseBufferingHeuristics() override
{
return mTrackDemuxersMayBlock;
@ -100,6 +98,8 @@ public:
#endif
private:
bool IsWaitingOnCDMResource();
bool InitDemuxer();
// Notify the demuxer that new data has been received.
// The next queued task calling GetBuffered() is guaranteed to have up to date
@ -397,10 +397,6 @@ private:
{
return mIsEncrypted;
}
// Accessed from multiple thread, in particular the MediaDecoderStateMachine,
// however the value doesn't currently change after reading the metadata.
// TODO handle change of encryption half-way. The above assumption will then
// become incorrect.
bool mIsEncrypted;
// Set to true if any of our track buffers may be blocking.