Bug 1274216 - remove use of FlushableTaskQueue from PlatformDecoderModule. r=jya.

MozReview-Commit-ID: E3DG84yKRmw

--HG--
extra : rebase_source : 2636b7d1ef5cc544f70b3912d4d6bd30f25424df
This commit is contained in:
JW Wang 2016-05-19 17:50:31 +08:00
Родитель cdc61249b6
Коммит 8b980a3cbc
27 изменённых файлов: 71 добавлений и 72 удалений

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

@ -102,7 +102,7 @@ PDMFactory::EnsureInit() const
already_AddRefed<MediaDataDecoder> already_AddRefed<MediaDataDecoder>
PDMFactory::CreateDecoder(const TrackInfo& aConfig, PDMFactory::CreateDecoder(const TrackInfo& aConfig,
FlushableTaskQueue* aTaskQueue, TaskQueue* aTaskQueue,
MediaDataDecoderCallback* aCallback, MediaDataDecoderCallback* aCallback,
DecoderDoctorDiagnostics* aDiagnostics, DecoderDoctorDiagnostics* aDiagnostics,
layers::LayersBackend aLayersBackend, layers::LayersBackend aLayersBackend,
@ -157,7 +157,7 @@ PDMFactory::CreateDecoder(const TrackInfo& aConfig,
already_AddRefed<MediaDataDecoder> already_AddRefed<MediaDataDecoder>
PDMFactory::CreateDecoderWithPDM(PlatformDecoderModule* aPDM, PDMFactory::CreateDecoderWithPDM(PlatformDecoderModule* aPDM,
const TrackInfo& aConfig, const TrackInfo& aConfig,
FlushableTaskQueue* aTaskQueue, TaskQueue* aTaskQueue,
MediaDataDecoderCallback* aCallback, MediaDataDecoderCallback* aCallback,
DecoderDoctorDiagnostics* aDiagnostics, DecoderDoctorDiagnostics* aDiagnostics,
layers::LayersBackend aLayersBackend, layers::LayersBackend aLayersBackend,

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

@ -31,7 +31,7 @@ public:
// This is called on the decode task queue. // This is called on the decode task queue.
already_AddRefed<MediaDataDecoder> already_AddRefed<MediaDataDecoder>
CreateDecoder(const TrackInfo& aConfig, CreateDecoder(const TrackInfo& aConfig,
FlushableTaskQueue* aTaskQueue, TaskQueue* aTaskQueue,
MediaDataDecoderCallback* aCallback, MediaDataDecoderCallback* aCallback,
DecoderDoctorDiagnostics* aDiagnostics, DecoderDoctorDiagnostics* aDiagnostics,
layers::LayersBackend aLayersBackend = layers::LayersBackend::LAYERS_NONE, layers::LayersBackend aLayersBackend = layers::LayersBackend::LAYERS_NONE,
@ -62,7 +62,7 @@ private:
already_AddRefed<MediaDataDecoder> already_AddRefed<MediaDataDecoder>
CreateDecoderWithPDM(PlatformDecoderModule* aPDM, CreateDecoderWithPDM(PlatformDecoderModule* aPDM,
const TrackInfo& aConfig, const TrackInfo& aConfig,
FlushableTaskQueue* aTaskQueue, TaskQueue* aTaskQueue,
MediaDataDecoderCallback* aCallback, MediaDataDecoderCallback* aCallback,
DecoderDoctorDiagnostics* aDiagnostics, DecoderDoctorDiagnostics* aDiagnostics,
layers::LayersBackend aLayersBackend, layers::LayersBackend aLayersBackend,

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

@ -7,7 +7,6 @@
#if !defined(PlatformDecoderModule_h_) #if !defined(PlatformDecoderModule_h_)
#define PlatformDecoderModule_h_ #define PlatformDecoderModule_h_
#include "FlushableTaskQueue.h"
#include "MediaDecoderReader.h" #include "MediaDecoderReader.h"
#include "mozilla/MozPromise.h" #include "mozilla/MozPromise.h"
#include "mozilla/layers/LayersTypes.h" #include "mozilla/layers/LayersTypes.h"
@ -28,7 +27,7 @@ class ImageContainer;
class MediaDataDecoder; class MediaDataDecoder;
class MediaDataDecoderCallback; class MediaDataDecoderCallback;
class FlushableTaskQueue; class TaskQueue;
class CDMProxy; class CDMProxy;
// The PlatformDecoderModule interface is used by the MediaFormatReader to // The PlatformDecoderModule interface is used by the MediaFormatReader to
@ -90,7 +89,7 @@ protected:
CreateVideoDecoder(const VideoInfo& aConfig, CreateVideoDecoder(const VideoInfo& aConfig,
layers::LayersBackend aLayersBackend, layers::LayersBackend aLayersBackend,
layers::ImageContainer* aImageContainer, layers::ImageContainer* aImageContainer,
FlushableTaskQueue* aVideoTaskQueue, TaskQueue* aTaskQueue,
MediaDataDecoderCallback* aCallback, MediaDataDecoderCallback* aCallback,
DecoderDoctorDiagnostics* aDiagnostics) = 0; DecoderDoctorDiagnostics* aDiagnostics) = 0;
@ -106,7 +105,7 @@ protected:
// This is called on the decode task queue. // This is called on the decode task queue.
virtual already_AddRefed<MediaDataDecoder> virtual already_AddRefed<MediaDataDecoder>
CreateAudioDecoder(const AudioInfo& aConfig, CreateAudioDecoder(const AudioInfo& aConfig,
FlushableTaskQueue* aAudioTaskQueue, TaskQueue* aTaskQueue,
MediaDataDecoderCallback* aCallback, MediaDataDecoderCallback* aCallback,
DecoderDoctorDiagnostics* aDiagnostics) = 0; DecoderDoctorDiagnostics* aDiagnostics) = 0;
}; };

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

@ -26,7 +26,7 @@ already_AddRefed<MediaDataDecoder>
AgnosticDecoderModule::CreateVideoDecoder(const VideoInfo& aConfig, AgnosticDecoderModule::CreateVideoDecoder(const VideoInfo& aConfig,
layers::LayersBackend aLayersBackend, layers::LayersBackend aLayersBackend,
layers::ImageContainer* aImageContainer, layers::ImageContainer* aImageContainer,
FlushableTaskQueue* aVideoTaskQueue, TaskQueue* aTaskQueue,
MediaDataDecoderCallback* aCallback, MediaDataDecoderCallback* aCallback,
DecoderDoctorDiagnostics* aDiagnostics) DecoderDoctorDiagnostics* aDiagnostics)
{ {
@ -35,7 +35,7 @@ AgnosticDecoderModule::CreateVideoDecoder(const VideoInfo& aConfig,
if (VPXDecoder::IsVPX(aConfig.mMimeType)) { if (VPXDecoder::IsVPX(aConfig.mMimeType)) {
m = new VPXDecoder(*aConfig.GetAsVideoInfo(), m = new VPXDecoder(*aConfig.GetAsVideoInfo(),
aImageContainer, aImageContainer,
aVideoTaskQueue, aTaskQueue,
aCallback); aCallback);
} }
@ -44,7 +44,7 @@ AgnosticDecoderModule::CreateVideoDecoder(const VideoInfo& aConfig,
already_AddRefed<MediaDataDecoder> already_AddRefed<MediaDataDecoder>
AgnosticDecoderModule::CreateAudioDecoder(const AudioInfo& aConfig, AgnosticDecoderModule::CreateAudioDecoder(const AudioInfo& aConfig,
FlushableTaskQueue* aAudioTaskQueue, TaskQueue* aTaskQueue,
MediaDataDecoderCallback* aCallback, MediaDataDecoderCallback* aCallback,
DecoderDoctorDiagnostics* aDiagnostics) DecoderDoctorDiagnostics* aDiagnostics)
{ {
@ -52,11 +52,11 @@ AgnosticDecoderModule::CreateAudioDecoder(const AudioInfo& aConfig,
if (VorbisDataDecoder::IsVorbis(aConfig.mMimeType)) { if (VorbisDataDecoder::IsVorbis(aConfig.mMimeType)) {
m = new VorbisDataDecoder(*aConfig.GetAsAudioInfo(), m = new VorbisDataDecoder(*aConfig.GetAsAudioInfo(),
aAudioTaskQueue, aTaskQueue,
aCallback); aCallback);
} else if (OpusDataDecoder::IsOpus(aConfig.mMimeType)) { } else if (OpusDataDecoder::IsOpus(aConfig.mMimeType)) {
m = new OpusDataDecoder(*aConfig.GetAsAudioInfo(), m = new OpusDataDecoder(*aConfig.GetAsAudioInfo(),
aAudioTaskQueue, aTaskQueue,
aCallback); aCallback);
} else if (WaveDataDecoder::IsWave(aConfig.mMimeType)) { } else if (WaveDataDecoder::IsWave(aConfig.mMimeType)) {
m = new WaveDataDecoder(*aConfig.GetAsAudioInfo(), aCallback); m = new WaveDataDecoder(*aConfig.GetAsAudioInfo(), aCallback);

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

@ -25,14 +25,14 @@ protected:
CreateVideoDecoder(const VideoInfo& aConfig, CreateVideoDecoder(const VideoInfo& aConfig,
layers::LayersBackend aLayersBackend, layers::LayersBackend aLayersBackend,
layers::ImageContainer* aImageContainer, layers::ImageContainer* aImageContainer,
FlushableTaskQueue* aVideoTaskQueue, TaskQueue* aTaskQueue,
MediaDataDecoderCallback* aCallback, MediaDataDecoderCallback* aCallback,
DecoderDoctorDiagnostics* aDiagnostics) override; DecoderDoctorDiagnostics* aDiagnostics) override;
// Decode thread. // Decode thread.
already_AddRefed<MediaDataDecoder> already_AddRefed<MediaDataDecoder>
CreateAudioDecoder(const AudioInfo& aConfig, CreateAudioDecoder(const AudioInfo& aConfig,
FlushableTaskQueue* aAudioTaskQueue, TaskQueue* aTaskQueue,
MediaDataDecoderCallback* aCallback, MediaDataDecoderCallback* aCallback,
DecoderDoctorDiagnostics* aDiagnostics) override; DecoderDoctorDiagnostics* aDiagnostics) override;
}; };

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

@ -201,7 +201,7 @@ public:
CreateVideoDecoder(const VideoInfo& aConfig, CreateVideoDecoder(const VideoInfo& aConfig,
layers::LayersBackend aLayersBackend, layers::LayersBackend aLayersBackend,
layers::ImageContainer* aImageContainer, layers::ImageContainer* aImageContainer,
FlushableTaskQueue* aVideoTaskQueue, TaskQueue* aTaskQueue,
MediaDataDecoderCallback* aCallback, MediaDataDecoderCallback* aCallback,
DecoderDoctorDiagnostics* aDiagnostics) override { DecoderDoctorDiagnostics* aDiagnostics) override {
BlankVideoDataCreator* creator = new BlankVideoDataCreator( BlankVideoDataCreator* creator = new BlankVideoDataCreator(
@ -216,7 +216,7 @@ public:
// Decode thread. // Decode thread.
already_AddRefed<MediaDataDecoder> already_AddRefed<MediaDataDecoder>
CreateAudioDecoder(const AudioInfo& aConfig, CreateAudioDecoder(const AudioInfo& aConfig,
FlushableTaskQueue* aAudioTaskQueue, TaskQueue* aTaskQueue,
MediaDataDecoderCallback* aCallback, MediaDataDecoderCallback* aCallback,
DecoderDoctorDiagnostics* aDiagnostics) override { DecoderDoctorDiagnostics* aDiagnostics) override {
BlankAudioDataCreator* creator = new BlankAudioDataCreator( BlankAudioDataCreator* creator = new BlankAudioDataCreator(

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

@ -238,7 +238,7 @@ already_AddRefed<MediaDataDecoder>
EMEDecoderModule::CreateVideoDecoder(const VideoInfo& aConfig, EMEDecoderModule::CreateVideoDecoder(const VideoInfo& aConfig,
layers::LayersBackend aLayersBackend, layers::LayersBackend aLayersBackend,
layers::ImageContainer* aImageContainer, layers::ImageContainer* aImageContainer,
FlushableTaskQueue* aVideoTaskQueue, TaskQueue* aTaskQueue,
MediaDataDecoderCallback* aCallback, MediaDataDecoderCallback* aCallback,
DecoderDoctorDiagnostics* aDiagnostics) DecoderDoctorDiagnostics* aDiagnostics)
{ {
@ -246,12 +246,12 @@ EMEDecoderModule::CreateVideoDecoder(const VideoInfo& aConfig,
if (SupportsMimeType(aConfig.mMimeType, nullptr)) { if (SupportsMimeType(aConfig.mMimeType, nullptr)) {
// GMP decodes. Assume that means it can decrypt too. // GMP decodes. Assume that means it can decrypt too.
RefPtr<MediaDataDecoderProxy> wrapper = CreateDecoderWrapper(aCallback, mProxy, aVideoTaskQueue); RefPtr<MediaDataDecoderProxy> wrapper = CreateDecoderWrapper(aCallback, mProxy, aTaskQueue);
wrapper->SetProxyTarget(new EMEVideoDecoder(mProxy, wrapper->SetProxyTarget(new EMEVideoDecoder(mProxy,
aConfig, aConfig,
aLayersBackend, aLayersBackend,
aImageContainer, aImageContainer,
aVideoTaskQueue, aTaskQueue,
wrapper->Callback())); wrapper->Callback()));
return wrapper.forget(); return wrapper.forget();
} }
@ -259,7 +259,7 @@ EMEDecoderModule::CreateVideoDecoder(const VideoInfo& aConfig,
MOZ_ASSERT(mPDM); MOZ_ASSERT(mPDM);
RefPtr<MediaDataDecoder> decoder( RefPtr<MediaDataDecoder> decoder(
mPDM->CreateDecoder(aConfig, mPDM->CreateDecoder(aConfig,
aVideoTaskQueue, aTaskQueue,
aCallback, aCallback,
aDiagnostics, aDiagnostics,
aLayersBackend, aLayersBackend,
@ -277,7 +277,7 @@ EMEDecoderModule::CreateVideoDecoder(const VideoInfo& aConfig,
already_AddRefed<MediaDataDecoder> already_AddRefed<MediaDataDecoder>
EMEDecoderModule::CreateAudioDecoder(const AudioInfo& aConfig, EMEDecoderModule::CreateAudioDecoder(const AudioInfo& aConfig,
FlushableTaskQueue* aAudioTaskQueue, TaskQueue* aTaskQueue,
MediaDataDecoderCallback* aCallback, MediaDataDecoderCallback* aCallback,
DecoderDoctorDiagnostics* aDiagnostics) DecoderDoctorDiagnostics* aDiagnostics)
{ {
@ -285,17 +285,17 @@ EMEDecoderModule::CreateAudioDecoder(const AudioInfo& aConfig,
if (SupportsMimeType(aConfig.mMimeType, nullptr)) { if (SupportsMimeType(aConfig.mMimeType, nullptr)) {
// GMP decodes. Assume that means it can decrypt too. // GMP decodes. Assume that means it can decrypt too.
RefPtr<MediaDataDecoderProxy> wrapper = CreateDecoderWrapper(aCallback, mProxy, aAudioTaskQueue); RefPtr<MediaDataDecoderProxy> wrapper = CreateDecoderWrapper(aCallback, mProxy, aTaskQueue);
wrapper->SetProxyTarget(new EMEAudioDecoder(mProxy, wrapper->SetProxyTarget(new EMEAudioDecoder(mProxy,
aConfig, aConfig,
aAudioTaskQueue, aTaskQueue,
wrapper->Callback())); wrapper->Callback()));
return wrapper.forget(); return wrapper.forget();
} }
MOZ_ASSERT(mPDM); MOZ_ASSERT(mPDM);
RefPtr<MediaDataDecoder> decoder( RefPtr<MediaDataDecoder> decoder(
mPDM->CreateDecoder(aConfig, aAudioTaskQueue, aCallback, aDiagnostics)); mPDM->CreateDecoder(aConfig, aTaskQueue, aCallback, aDiagnostics));
if (!decoder) { if (!decoder) {
return nullptr; return nullptr;
} }

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

@ -29,14 +29,14 @@ protected:
CreateVideoDecoder(const VideoInfo& aConfig, CreateVideoDecoder(const VideoInfo& aConfig,
layers::LayersBackend aLayersBackend, layers::LayersBackend aLayersBackend,
layers::ImageContainer* aImageContainer, layers::ImageContainer* aImageContainer,
FlushableTaskQueue* aVideoTaskQueue, TaskQueue* aTaskQueue,
MediaDataDecoderCallback* aCallback, MediaDataDecoderCallback* aCallback,
DecoderDoctorDiagnostics* aDiagnostics) override; DecoderDoctorDiagnostics* aDiagnostics) override;
// Decode thread. // Decode thread.
already_AddRefed<MediaDataDecoder> already_AddRefed<MediaDataDecoder>
CreateAudioDecoder(const AudioInfo& aConfig, CreateAudioDecoder(const AudioInfo& aConfig,
FlushableTaskQueue* aAudioTaskQueue, TaskQueue* aTaskQueue,
MediaDataDecoderCallback* aCallback, MediaDataDecoderCallback* aCallback,
DecoderDoctorDiagnostics* aDiagnostics) override; DecoderDoctorDiagnostics* aDiagnostics) override;

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

@ -49,7 +49,7 @@ already_AddRefed<MediaDataDecoder>
GMPDecoderModule::CreateVideoDecoder(const VideoInfo& aConfig, GMPDecoderModule::CreateVideoDecoder(const VideoInfo& aConfig,
layers::LayersBackend aLayersBackend, layers::LayersBackend aLayersBackend,
layers::ImageContainer* aImageContainer, layers::ImageContainer* aImageContainer,
FlushableTaskQueue* aVideoTaskQueue, TaskQueue* aTaskQueue,
MediaDataDecoderCallback* aCallback, MediaDataDecoderCallback* aCallback,
DecoderDoctorDiagnostics* aDiagnostics) DecoderDoctorDiagnostics* aDiagnostics)
{ {
@ -68,14 +68,14 @@ GMPDecoderModule::CreateVideoDecoder(const VideoInfo& aConfig,
wrapper->SetProxyTarget(new GMPVideoDecoder(aConfig, wrapper->SetProxyTarget(new GMPVideoDecoder(aConfig,
aLayersBackend, aLayersBackend,
aImageContainer, aImageContainer,
aVideoTaskQueue, aTaskQueue,
wrapper->Callback())); wrapper->Callback()));
return wrapper.forget(); return wrapper.forget();
} }
already_AddRefed<MediaDataDecoder> already_AddRefed<MediaDataDecoder>
GMPDecoderModule::CreateAudioDecoder(const AudioInfo& aConfig, GMPDecoderModule::CreateAudioDecoder(const AudioInfo& aConfig,
FlushableTaskQueue* aAudioTaskQueue, TaskQueue* aTaskQueue,
MediaDataDecoderCallback* aCallback, MediaDataDecoderCallback* aCallback,
DecoderDoctorDiagnostics* aDiagnostics) DecoderDoctorDiagnostics* aDiagnostics)
{ {
@ -92,7 +92,7 @@ GMPDecoderModule::CreateAudioDecoder(const AudioInfo& aConfig,
RefPtr<MediaDataDecoderProxy> wrapper = CreateDecoderWrapper(aCallback); RefPtr<MediaDataDecoderProxy> wrapper = CreateDecoderWrapper(aCallback);
wrapper->SetProxyTarget(new GMPAudioDecoder(aConfig, wrapper->SetProxyTarget(new GMPAudioDecoder(aConfig,
aAudioTaskQueue, aTaskQueue,
wrapper->Callback())); wrapper->Callback()));
return wrapper.forget(); return wrapper.forget();
} }

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

@ -36,14 +36,14 @@ public:
CreateVideoDecoder(const VideoInfo& aConfig, CreateVideoDecoder(const VideoInfo& aConfig,
layers::LayersBackend aLayersBackend, layers::LayersBackend aLayersBackend,
layers::ImageContainer* aImageContainer, layers::ImageContainer* aImageContainer,
FlushableTaskQueue* aVideoTaskQueue, TaskQueue* aTaskQueue,
MediaDataDecoderCallback* aCallback, MediaDataDecoderCallback* aCallback,
DecoderDoctorDiagnostics* aDiagnostics) override; DecoderDoctorDiagnostics* aDiagnostics) override;
// Decode thread. // Decode thread.
already_AddRefed<MediaDataDecoder> already_AddRefed<MediaDataDecoder>
CreateAudioDecoder(const AudioInfo& aConfig, CreateAudioDecoder(const AudioInfo& aConfig,
FlushableTaskQueue* aAudioTaskQueue, TaskQueue* aTaskQueue,
MediaDataDecoderCallback* aCallback, MediaDataDecoderCallback* aCallback,
DecoderDoctorDiagnostics* aDiagnostics) override; DecoderDoctorDiagnostics* aDiagnostics) override;

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

@ -269,7 +269,7 @@ AndroidDecoderModule::SupportsMimeType(const nsACString& aMimeType,
aMimeType.EqualsLiteral("audio/wave; codecs=7") || aMimeType.EqualsLiteral("audio/wave; codecs=7") ||
aMimeType.EqualsLiteral("audio/wave; codecs=65534")) { aMimeType.EqualsLiteral("audio/wave; codecs=65534")) {
return false; return false;
} }
if ((VPXDecoder::IsVPX(aMimeType, VPXDecoder::VP8) && if ((VPXDecoder::IsVPX(aMimeType, VPXDecoder::VP8) &&
!GetFeatureStatus(nsIGfxInfo::FEATURE_VP8_HW_DECODE)) || !GetFeatureStatus(nsIGfxInfo::FEATURE_VP8_HW_DECODE)) ||
@ -285,7 +285,7 @@ AndroidDecoderModule::SupportsMimeType(const nsACString& aMimeType,
already_AddRefed<MediaDataDecoder> already_AddRefed<MediaDataDecoder>
AndroidDecoderModule::CreateVideoDecoder( AndroidDecoderModule::CreateVideoDecoder(
const VideoInfo& aConfig, layers::LayersBackend aLayersBackend, const VideoInfo& aConfig, layers::LayersBackend aLayersBackend,
layers::ImageContainer* aImageContainer, FlushableTaskQueue* aVideoTaskQueue, layers::ImageContainer* aImageContainer, TaskQueue* aTaskQueue,
MediaDataDecoderCallback* aCallback, MediaDataDecoderCallback* aCallback,
DecoderDoctorDiagnostics* aDiagnostics) DecoderDoctorDiagnostics* aDiagnostics)
{ {
@ -305,7 +305,7 @@ AndroidDecoderModule::CreateVideoDecoder(
already_AddRefed<MediaDataDecoder> already_AddRefed<MediaDataDecoder>
AndroidDecoderModule::CreateAudioDecoder( AndroidDecoderModule::CreateAudioDecoder(
const AudioInfo& aConfig, FlushableTaskQueue* aAudioTaskQueue, const AudioInfo& aConfig, TaskQueue* aTaskQueue,
MediaDataDecoderCallback* aCallback, MediaDataDecoderCallback* aCallback,
DecoderDoctorDiagnostics* aDiagnostics) DecoderDoctorDiagnostics* aDiagnostics)
{ {

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

@ -25,13 +25,13 @@ public:
CreateVideoDecoder(const VideoInfo& aConfig, CreateVideoDecoder(const VideoInfo& aConfig,
layers::LayersBackend aLayersBackend, layers::LayersBackend aLayersBackend,
layers::ImageContainer* aImageContainer, layers::ImageContainer* aImageContainer,
FlushableTaskQueue* aVideoTaskQueue, TaskQueue* aTaskQueue,
MediaDataDecoderCallback* aCallback, MediaDataDecoderCallback* aCallback,
DecoderDoctorDiagnostics* aDiagnostics) override; DecoderDoctorDiagnostics* aDiagnostics) override;
already_AddRefed<MediaDataDecoder> already_AddRefed<MediaDataDecoder>
CreateAudioDecoder(const AudioInfo& aConfig, CreateAudioDecoder(const AudioInfo& aConfig,
FlushableTaskQueue* aAudioTaskQueue, TaskQueue* aTaskQueue,
MediaDataDecoderCallback* aCallback, MediaDataDecoderCallback* aCallback,
DecoderDoctorDiagnostics* aDiagnostics) override; DecoderDoctorDiagnostics* aDiagnostics) override;

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

@ -77,7 +77,7 @@ already_AddRefed<MediaDataDecoder>
AppleDecoderModule::CreateVideoDecoder(const VideoInfo& aConfig, AppleDecoderModule::CreateVideoDecoder(const VideoInfo& aConfig,
layers::LayersBackend aLayersBackend, layers::LayersBackend aLayersBackend,
layers::ImageContainer* aImageContainer, layers::ImageContainer* aImageContainer,
FlushableTaskQueue* aVideoTaskQueue, TaskQueue* aTaskQueue,
MediaDataDecoderCallback* aCallback, MediaDataDecoderCallback* aCallback,
DecoderDoctorDiagnostics* aDiagnostics) DecoderDoctorDiagnostics* aDiagnostics)
{ {
@ -86,7 +86,7 @@ AppleDecoderModule::CreateVideoDecoder(const VideoInfo& aConfig,
if (sIsVDAAvailable && (!sIsVTHWAvailable || MediaPrefs::AppleForceVDA())) { if (sIsVDAAvailable && (!sIsVTHWAvailable || MediaPrefs::AppleForceVDA())) {
decoder = decoder =
AppleVDADecoder::CreateVDADecoder(aConfig, AppleVDADecoder::CreateVDADecoder(aConfig,
aVideoTaskQueue, aTaskQueue,
aCallback, aCallback,
aImageContainer); aImageContainer);
if (decoder) { if (decoder) {
@ -97,19 +97,19 @@ AppleDecoderModule::CreateVideoDecoder(const VideoInfo& aConfig,
// supported by the current platform. // supported by the current platform.
if (sIsVTAvailable) { if (sIsVTAvailable) {
decoder = decoder =
new AppleVTDecoder(aConfig, aVideoTaskQueue, aCallback, aImageContainer); new AppleVTDecoder(aConfig, aTaskQueue, aCallback, aImageContainer);
} }
return decoder.forget(); return decoder.forget();
} }
already_AddRefed<MediaDataDecoder> already_AddRefed<MediaDataDecoder>
AppleDecoderModule::CreateAudioDecoder(const AudioInfo& aConfig, AppleDecoderModule::CreateAudioDecoder(const AudioInfo& aConfig,
FlushableTaskQueue* aAudioTaskQueue, TaskQueue* aTaskQueue,
MediaDataDecoderCallback* aCallback, MediaDataDecoderCallback* aCallback,
DecoderDoctorDiagnostics* aDiagnostics) DecoderDoctorDiagnostics* aDiagnostics)
{ {
RefPtr<MediaDataDecoder> decoder = RefPtr<MediaDataDecoder> decoder =
new AppleATDecoder(aConfig, aAudioTaskQueue, aCallback); new AppleATDecoder(aConfig, aTaskQueue, aCallback);
return decoder.forget(); return decoder.forget();
} }

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

@ -23,14 +23,14 @@ public:
CreateVideoDecoder(const VideoInfo& aConfig, CreateVideoDecoder(const VideoInfo& aConfig,
layers::LayersBackend aLayersBackend, layers::LayersBackend aLayersBackend,
layers::ImageContainer* aImageContainer, layers::ImageContainer* aImageContainer,
FlushableTaskQueue* aVideoTaskQueue, TaskQueue* aTaskQueue,
MediaDataDecoderCallback* aCallback, MediaDataDecoderCallback* aCallback,
DecoderDoctorDiagnostics* aDiagnostics) override; DecoderDoctorDiagnostics* aDiagnostics) override;
// Decode thread. // Decode thread.
already_AddRefed<MediaDataDecoder> already_AddRefed<MediaDataDecoder>
CreateAudioDecoder(const AudioInfo& aConfig, CreateAudioDecoder(const AudioInfo& aConfig,
FlushableTaskQueue* aAudioTaskQueue, TaskQueue* aTaskQueue,
MediaDataDecoderCallback* aCallback, MediaDataDecoderCallback* aCallback,
DecoderDoctorDiagnostics* aDiagnostics) override; DecoderDoctorDiagnostics* aDiagnostics) override;

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

@ -15,7 +15,7 @@ namespace mozilla
{ {
FFmpegAudioDecoder<LIBAV_VER>::FFmpegAudioDecoder(FFmpegLibWrapper* aLib, FFmpegAudioDecoder<LIBAV_VER>::FFmpegAudioDecoder(FFmpegLibWrapper* aLib,
FlushableTaskQueue* aTaskQueue, MediaDataDecoderCallback* aCallback, TaskQueue* aTaskQueue, MediaDataDecoderCallback* aCallback,
const AudioInfo& aConfig) const AudioInfo& aConfig)
: FFmpegDataDecoder(aLib, aTaskQueue, aCallback, GetCodecId(aConfig.mMimeType)) : FFmpegDataDecoder(aLib, aTaskQueue, aCallback, GetCodecId(aConfig.mMimeType))
{ {

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

@ -21,7 +21,7 @@ template <>
class FFmpegAudioDecoder<LIBAV_VER> : public FFmpegDataDecoder<LIBAV_VER> class FFmpegAudioDecoder<LIBAV_VER> : public FFmpegDataDecoder<LIBAV_VER>
{ {
public: public:
FFmpegAudioDecoder(FFmpegLibWrapper* aLib, FlushableTaskQueue* aTaskQueue, FFmpegAudioDecoder(FFmpegLibWrapper* aLib, TaskQueue* aTaskQueue,
MediaDataDecoderCallback* aCallback, MediaDataDecoderCallback* aCallback,
const AudioInfo& aConfig); const AudioInfo& aConfig);
virtual ~FFmpegAudioDecoder(); virtual ~FFmpegAudioDecoder();

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

@ -34,19 +34,19 @@ public:
CreateVideoDecoder(const VideoInfo& aConfig, CreateVideoDecoder(const VideoInfo& aConfig,
layers::LayersBackend aLayersBackend, layers::LayersBackend aLayersBackend,
layers::ImageContainer* aImageContainer, layers::ImageContainer* aImageContainer,
FlushableTaskQueue* aVideoTaskQueue, TaskQueue* aTaskQueue,
MediaDataDecoderCallback* aCallback, MediaDataDecoderCallback* aCallback,
DecoderDoctorDiagnostics* aDiagnostics) override DecoderDoctorDiagnostics* aDiagnostics) override
{ {
RefPtr<MediaDataDecoder> decoder = RefPtr<MediaDataDecoder> decoder =
new FFmpegVideoDecoder<V>(mLib, aVideoTaskQueue, aCallback, aConfig, new FFmpegVideoDecoder<V>(mLib, aTaskQueue, aCallback, aConfig,
aImageContainer); aImageContainer);
return decoder.forget(); return decoder.forget();
} }
already_AddRefed<MediaDataDecoder> already_AddRefed<MediaDataDecoder>
CreateAudioDecoder(const AudioInfo& aConfig, CreateAudioDecoder(const AudioInfo& aConfig,
FlushableTaskQueue* aAudioTaskQueue, TaskQueue* aTaskQueue,
MediaDataDecoderCallback* aCallback, MediaDataDecoderCallback* aCallback,
DecoderDoctorDiagnostics* aDiagnostics) override DecoderDoctorDiagnostics* aDiagnostics) override
{ {
@ -54,7 +54,7 @@ public:
return nullptr; return nullptr;
#else #else
RefPtr<MediaDataDecoder> decoder = RefPtr<MediaDataDecoder> decoder =
new FFmpegAudioDecoder<V>(mLib, aAudioTaskQueue, aCallback, aConfig); new FFmpegAudioDecoder<V>(mLib, aTaskQueue, aCallback, aConfig);
return decoder.forget(); return decoder.forget();
#endif #endif
} }

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

@ -101,7 +101,7 @@ FFmpegVideoDecoder<LIBAV_VER>::PtsCorrectionContext::Reset()
} }
FFmpegVideoDecoder<LIBAV_VER>::FFmpegVideoDecoder(FFmpegLibWrapper* aLib, FFmpegVideoDecoder<LIBAV_VER>::FFmpegVideoDecoder(FFmpegLibWrapper* aLib,
FlushableTaskQueue* aTaskQueue, MediaDataDecoderCallback* aCallback, TaskQueue* aTaskQueue, MediaDataDecoderCallback* aCallback,
const VideoInfo& aConfig, const VideoInfo& aConfig,
ImageContainer* aImageContainer) ImageContainer* aImageContainer)
: FFmpegDataDecoder(aLib, aTaskQueue, aCallback, GetCodecId(aConfig.mMimeType)) : FFmpegDataDecoder(aLib, aTaskQueue, aCallback, GetCodecId(aConfig.mMimeType))

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

@ -27,7 +27,7 @@ class FFmpegVideoDecoder<LIBAV_VER> : public FFmpegDataDecoder<LIBAV_VER>
typedef mozilla::layers::ImageContainer ImageContainer; typedef mozilla::layers::ImageContainer ImageContainer;
public: public:
FFmpegVideoDecoder(FFmpegLibWrapper* aLib, FlushableTaskQueue* aTaskQueue, FFmpegVideoDecoder(FFmpegLibWrapper* aLib, TaskQueue* aTaskQueue,
MediaDataDecoderCallback* aCallback, MediaDataDecoderCallback* aCallback,
const VideoInfo& aConfig, const VideoInfo& aConfig,
ImageContainer* aImageContainer); ImageContainer* aImageContainer);

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

@ -22,7 +22,7 @@ already_AddRefed<MediaDataDecoder>
GonkDecoderModule::CreateVideoDecoder(const VideoInfo& aConfig, GonkDecoderModule::CreateVideoDecoder(const VideoInfo& aConfig,
mozilla::layers::LayersBackend aLayersBackend, mozilla::layers::LayersBackend aLayersBackend,
mozilla::layers::ImageContainer* aImageContainer, mozilla::layers::ImageContainer* aImageContainer,
FlushableTaskQueue* aVideoTaskQueue, TaskQueue* aTaskQueue,
MediaDataDecoderCallback* aCallback, MediaDataDecoderCallback* aCallback,
DecoderDoctorDiagnostics* aDiagnostics) DecoderDoctorDiagnostics* aDiagnostics)
{ {
@ -34,7 +34,7 @@ GonkDecoderModule::CreateVideoDecoder(const VideoInfo& aConfig,
already_AddRefed<MediaDataDecoder> already_AddRefed<MediaDataDecoder>
GonkDecoderModule::CreateAudioDecoder(const AudioInfo& aConfig, GonkDecoderModule::CreateAudioDecoder(const AudioInfo& aConfig,
FlushableTaskQueue* aAudioTaskQueue, TaskQueue* aTaskQueue,
MediaDataDecoderCallback* aCallback, MediaDataDecoderCallback* aCallback,
DecoderDoctorDiagnostics* aDiagnostics) DecoderDoctorDiagnostics* aDiagnostics)
{ {

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

@ -21,14 +21,14 @@ public:
CreateVideoDecoder(const VideoInfo& aConfig, CreateVideoDecoder(const VideoInfo& aConfig,
mozilla::layers::LayersBackend aLayersBackend, mozilla::layers::LayersBackend aLayersBackend,
mozilla::layers::ImageContainer* aImageContainer, mozilla::layers::ImageContainer* aImageContainer,
FlushableTaskQueue* aVideoTaskQueue, TaskQueue* aTaskQueue,
MediaDataDecoderCallback* aCallback, MediaDataDecoderCallback* aCallback,
DecoderDoctorDiagnostics* aDiagnostics) override; DecoderDoctorDiagnostics* aDiagnostics) override;
// Decode thread. // Decode thread.
already_AddRefed<MediaDataDecoder> already_AddRefed<MediaDataDecoder>
CreateAudioDecoder(const AudioInfo& aConfig, CreateAudioDecoder(const AudioInfo& aConfig,
FlushableTaskQueue* aAudioTaskQueue, TaskQueue* aTaskQueue,
MediaDataDecoderCallback* aCallback, MediaDataDecoderCallback* aCallback,
DecoderDoctorDiagnostics* aDiagnostics) override; DecoderDoctorDiagnostics* aDiagnostics) override;

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

@ -15,7 +15,7 @@ already_AddRefed<MediaDataDecoder>
OmxDecoderModule::CreateVideoDecoder(const VideoInfo& aConfig, OmxDecoderModule::CreateVideoDecoder(const VideoInfo& aConfig,
mozilla::layers::LayersBackend aLayersBackend, mozilla::layers::LayersBackend aLayersBackend,
mozilla::layers::ImageContainer* aImageContainer, mozilla::layers::ImageContainer* aImageContainer,
FlushableTaskQueue* aVideoTaskQueue, TaskQueue* aTaskQueue,
MediaDataDecoderCallback* aCallback, MediaDataDecoderCallback* aCallback,
DecoderDoctorDiagnostics* aDiagnostics) DecoderDoctorDiagnostics* aDiagnostics)
{ {
@ -25,7 +25,7 @@ OmxDecoderModule::CreateVideoDecoder(const VideoInfo& aConfig,
already_AddRefed<MediaDataDecoder> already_AddRefed<MediaDataDecoder>
OmxDecoderModule::CreateAudioDecoder(const AudioInfo& aConfig, OmxDecoderModule::CreateAudioDecoder(const AudioInfo& aConfig,
FlushableTaskQueue* aAudioTaskQueue, TaskQueue* aTaskQueue,
MediaDataDecoderCallback* aCallback, MediaDataDecoderCallback* aCallback,
DecoderDoctorDiagnostics* aDiagnostics) DecoderDoctorDiagnostics* aDiagnostics)
{ {

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

@ -17,13 +17,13 @@ public:
CreateVideoDecoder(const VideoInfo& aConfig, CreateVideoDecoder(const VideoInfo& aConfig,
mozilla::layers::LayersBackend aLayersBackend, mozilla::layers::LayersBackend aLayersBackend,
mozilla::layers::ImageContainer* aImageContainer, mozilla::layers::ImageContainer* aImageContainer,
FlushableTaskQueue* aVideoTaskQueue, TaskQueue* aTaskQueue,
MediaDataDecoderCallback* aCallback, MediaDataDecoderCallback* aCallback,
DecoderDoctorDiagnostics* aDiagnostics) override; DecoderDoctorDiagnostics* aDiagnostics) override;
already_AddRefed<MediaDataDecoder> already_AddRefed<MediaDataDecoder>
CreateAudioDecoder(const AudioInfo& aConfig, CreateAudioDecoder(const AudioInfo& aConfig,
FlushableTaskQueue* aAudioTaskQueue, TaskQueue* aTaskQueue,
MediaDataDecoderCallback* aCallback, MediaDataDecoderCallback* aCallback,
DecoderDoctorDiagnostics* aDiagnostics) override; DecoderDoctorDiagnostics* aDiagnostics) override;

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

@ -78,7 +78,7 @@ already_AddRefed<MediaDataDecoder>
WMFDecoderModule::CreateVideoDecoder(const VideoInfo& aConfig, WMFDecoderModule::CreateVideoDecoder(const VideoInfo& aConfig,
layers::LayersBackend aLayersBackend, layers::LayersBackend aLayersBackend,
layers::ImageContainer* aImageContainer, layers::ImageContainer* aImageContainer,
FlushableTaskQueue* aVideoTaskQueue, TaskQueue* aTaskQueue,
MediaDataDecoderCallback* aCallback, MediaDataDecoderCallback* aCallback,
DecoderDoctorDiagnostics* aDiagnostics) DecoderDoctorDiagnostics* aDiagnostics)
{ {
@ -93,14 +93,14 @@ WMFDecoderModule::CreateVideoDecoder(const VideoInfo& aConfig,
} }
RefPtr<MediaDataDecoder> decoder = RefPtr<MediaDataDecoder> decoder =
new WMFMediaDataDecoder(manager.forget(), aVideoTaskQueue, aCallback); new WMFMediaDataDecoder(manager.forget(), aTaskQueue, aCallback);
return decoder.forget(); return decoder.forget();
} }
already_AddRefed<MediaDataDecoder> already_AddRefed<MediaDataDecoder>
WMFDecoderModule::CreateAudioDecoder(const AudioInfo& aConfig, WMFDecoderModule::CreateAudioDecoder(const AudioInfo& aConfig,
FlushableTaskQueue* aAudioTaskQueue, TaskQueue* aTaskQueue,
MediaDataDecoderCallback* aCallback, MediaDataDecoderCallback* aCallback,
DecoderDoctorDiagnostics* aDiagnostics) DecoderDoctorDiagnostics* aDiagnostics)
{ {
@ -111,7 +111,7 @@ WMFDecoderModule::CreateAudioDecoder(const AudioInfo& aConfig,
} }
RefPtr<MediaDataDecoder> decoder = RefPtr<MediaDataDecoder> decoder =
new WMFMediaDataDecoder(manager.forget(), aAudioTaskQueue, aCallback); new WMFMediaDataDecoder(manager.forget(), aTaskQueue, aCallback);
return decoder.forget(); return decoder.forget();
} }

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

@ -23,13 +23,13 @@ public:
CreateVideoDecoder(const VideoInfo& aConfig, CreateVideoDecoder(const VideoInfo& aConfig,
layers::LayersBackend aLayersBackend, layers::LayersBackend aLayersBackend,
layers::ImageContainer* aImageContainer, layers::ImageContainer* aImageContainer,
FlushableTaskQueue* aVideoTaskQueue, TaskQueue* aTaskQueue,
MediaDataDecoderCallback* aCallback, MediaDataDecoderCallback* aCallback,
DecoderDoctorDiagnostics* aDiagnostics) override; DecoderDoctorDiagnostics* aDiagnostics) override;
already_AddRefed<MediaDataDecoder> already_AddRefed<MediaDataDecoder>
CreateAudioDecoder(const AudioInfo& aConfig, CreateAudioDecoder(const AudioInfo& aConfig,
FlushableTaskQueue* aAudioTaskQueue, TaskQueue* aTaskQueue,
MediaDataDecoderCallback* aCallback, MediaDataDecoderCallback* aCallback,
DecoderDoctorDiagnostics* aDiagnostics) override; DecoderDoctorDiagnostics* aDiagnostics) override;

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

@ -19,7 +19,7 @@ H264Converter::H264Converter(PlatformDecoderModule* aPDM,
const VideoInfo& aConfig, const VideoInfo& aConfig,
layers::LayersBackend aLayersBackend, layers::LayersBackend aLayersBackend,
layers::ImageContainer* aImageContainer, layers::ImageContainer* aImageContainer,
FlushableTaskQueue* aVideoTaskQueue, TaskQueue* aTaskQueue,
MediaDataDecoderCallback* aCallback, MediaDataDecoderCallback* aCallback,
DecoderDoctorDiagnostics* aDiagnostics) DecoderDoctorDiagnostics* aDiagnostics)
: mPDM(aPDM) : mPDM(aPDM)
@ -27,7 +27,7 @@ H264Converter::H264Converter(PlatformDecoderModule* aPDM,
, mCurrentConfig(aConfig) , mCurrentConfig(aConfig)
, mLayersBackend(aLayersBackend) , mLayersBackend(aLayersBackend)
, mImageContainer(aImageContainer) , mImageContainer(aImageContainer)
, mVideoTaskQueue(aVideoTaskQueue) , mTaskQueue(aTaskQueue)
, mCallback(aCallback) , mCallback(aCallback)
, mDecoder(nullptr) , mDecoder(nullptr)
, mNeedAVCC(aPDM->DecoderNeedsConversion(aConfig) == PlatformDecoderModule::kNeedAVCC) , mNeedAVCC(aPDM->DecoderNeedsConversion(aConfig) == PlatformDecoderModule::kNeedAVCC)
@ -149,7 +149,7 @@ H264Converter::CreateDecoder(DecoderDoctorDiagnostics* aDiagnostics)
mDecoder = mPDM->CreateVideoDecoder(mNeedAVCC ? mCurrentConfig : mOriginalConfig, mDecoder = mPDM->CreateVideoDecoder(mNeedAVCC ? mCurrentConfig : mOriginalConfig,
mLayersBackend, mLayersBackend,
mImageContainer, mImageContainer,
mVideoTaskQueue, mTaskQueue,
mCallback, mCallback,
aDiagnostics); aDiagnostics);
if (!mDecoder) { if (!mDecoder) {

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

@ -25,7 +25,7 @@ public:
const VideoInfo& aConfig, const VideoInfo& aConfig,
layers::LayersBackend aLayersBackend, layers::LayersBackend aLayersBackend,
layers::ImageContainer* aImageContainer, layers::ImageContainer* aImageContainer,
FlushableTaskQueue* aVideoTaskQueue, TaskQueue* aTaskQueue,
MediaDataDecoderCallback* aCallback, MediaDataDecoderCallback* aCallback,
DecoderDoctorDiagnostics* aDiagnostics); DecoderDoctorDiagnostics* aDiagnostics);
virtual ~H264Converter(); virtual ~H264Converter();
@ -65,7 +65,7 @@ private:
VideoInfo mCurrentConfig; VideoInfo mCurrentConfig;
layers::LayersBackend mLayersBackend; layers::LayersBackend mLayersBackend;
RefPtr<layers::ImageContainer> mImageContainer; RefPtr<layers::ImageContainer> mImageContainer;
RefPtr<FlushableTaskQueue> mVideoTaskQueue; const RefPtr<TaskQueue> mTaskQueue;
nsTArray<RefPtr<MediaRawData>> mMediaRawSamples; nsTArray<RefPtr<MediaRawData>> mMediaRawSamples;
MediaDataDecoderCallback* mCallback; MediaDataDecoderCallback* mCallback;
RefPtr<MediaDataDecoder> mDecoder; RefPtr<MediaDataDecoder> mDecoder;