mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-05-26 14:18:48 +00:00
import changes from `dev' branch of rmottola/Arctic-Fox:
- Bug 1146086: use promise to Init() in PlatformDecoderModule. r=jya,r=cpearce (aed679865) - partial of Bug 1128380: Add IsHardwareAccelerated implementation for AVCC and mac decoder. r=cpearce (8b376df05) - Bug 1192675: P1. Ensure VDA/VT APIs are only ever accessed from the same thread. r=cpearce (fa9c8de6a) - Bug 1178098 - Report why DXVA initialization failed to about:support. r=cpearce (0b06a28e9) - Bug 1167690 - Part 1: Hook up NPPVpluginIsPlayingAudio to the plugin process; r=josh (30df04ca2) - Bug 1167690 - Add NPAPI:AudioControl enums to npapi.h. r=josh (5369f6fa9) - Bug 1167690 - Part 2: Integrate plugins which support the NPAPI audio extensions with the Audio Channel Service; r=BenWa (145cecdc4) - Bug 1167690 - Part 3: Hook up NPNVmuteAudioBool to the plugin process; r=josh (36558b729) - Bug 1167690 - Part 4: Add support for testing plugin audio channel integration to the test plugin; r=josh (04af51882)
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
#include "WMFDecoderModule.h"
|
||||
#include "WMFVideoMFTManager.h"
|
||||
#include "WMFAudioMFTManager.h"
|
||||
#include "MFTDecoder.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "mozilla/DebugOnly.h"
|
||||
#include "mozilla/Services.h"
|
||||
@@ -98,13 +99,21 @@ WMFDecoderModule::CreateVideoDecoder(const VideoInfo& aConfig,
|
||||
FlushableTaskQueue* aVideoTaskQueue,
|
||||
MediaDataDecoderCallback* aCallback)
|
||||
{
|
||||
nsAutoPtr<WMFVideoMFTManager> manager =
|
||||
new WMFVideoMFTManager(aConfig,
|
||||
aLayersBackend,
|
||||
aImageContainer,
|
||||
sDXVAEnabled && ShouldUseDXVA(aConfig));
|
||||
|
||||
nsRefPtr<MFTDecoder> mft = manager->Init();
|
||||
|
||||
if (!mft) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
nsRefPtr<MediaDataDecoder> decoder =
|
||||
new WMFMediaDataDecoder(new WMFVideoMFTManager(aConfig,
|
||||
aLayersBackend,
|
||||
aImageContainer,
|
||||
sDXVAEnabled && ShouldUseDXVA(aConfig)),
|
||||
aVideoTaskQueue,
|
||||
aCallback);
|
||||
new WMFMediaDataDecoder(manager.forget(), mft, aVideoTaskQueue, aCallback);
|
||||
|
||||
return decoder.forget();
|
||||
}
|
||||
|
||||
@@ -113,10 +122,15 @@ WMFDecoderModule::CreateAudioDecoder(const AudioInfo& aConfig,
|
||||
FlushableTaskQueue* aAudioTaskQueue,
|
||||
MediaDataDecoderCallback* aCallback)
|
||||
{
|
||||
nsAutoPtr<WMFAudioMFTManager> manager = new WMFAudioMFTManager(aConfig);
|
||||
nsRefPtr<MFTDecoder> mft = manager->Init();
|
||||
|
||||
if (!mft) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
nsRefPtr<MediaDataDecoder> decoder =
|
||||
new WMFMediaDataDecoder(new WMFAudioMFTManager(aConfig),
|
||||
aAudioTaskQueue,
|
||||
aCallback);
|
||||
new WMFMediaDataDecoder(manager.forget(), mft, aAudioTaskQueue, aCallback);
|
||||
return decoder.forget();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user