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 1206977: P1. Remove unused PDM function members. r=cpearce (3ff104135b) - Bug 1193670: P1. Remove use of SharedDecoderManager. r=cpearce (adb5606e3e) - Bug 1193670: P2. Remove use of SharedDecoderManager from MediaDecoderReader. r=cpearce (61b9170c51) - Bug 1194612: P1. Dont reject init promise when initialising H264Converter. r=alfredo (d7d9e81361) - Bug 1194612: P2. Don't drop first sample with SPS/PPS NALs. r=alfredo (ea42652155) - Bug 1194612: P3. Remove redundant member. r=alfredo (2d30f940c9) - Bug 1195625 - Use correct TaskQueue in SharedDecoderManager and H264Converter promise. r=jya (87e52cd322) - Bug 1194518 - Part 1: Passthrough decoder wrapper, useful to spy on MediaFormatReader-decoder calls. r=jya (8e6f7df905) - Bug 1194518 - Part 2: Using passthrough wrapper if pref 'media.fuzz.vdeo-decode-passthrough' is true. r=jya (2a50be71f0) - Bug 1194518 - Part 3: Delaying decoder wrapper, ensures a decoder appears consistently slow. r=jya (9d461352e5) - Bug 1194518 - Part 4: Using delaying wrapper according to pref 'media.fuzz.video-decode-minimum-frame-interval-ms'. r=jya (9ec9684024) - Bug 1194518 - Part 5: Using std::deque instead of nsTArray to store delayed frames. r=jya (6f3f26578c) - Bug 1197145 - Added BaseTimeDuration::IsZero(), BaseTimeDuration::operator bool(), TimeStamp::operator bool(). r=nfroyd (1ba008c9fa) - Bug 1202556 - Detect underflow in TimeStamp addition/subtraction operators; r=froydnj (864a288877) - Bug 1176731 - Don't mark static inline functions as MFBT_API in TimeStamp.h. r=Waldo (6c94439c61) - bug 1170586 - Make TimeStamp::FromSystemTime available on iOS. r=froydnj (f9ae7bd8b8) - Bug 1193670: P3. Remove no longer needed SharedDecoderManager class. r=cpearce (c56ef98e6d) - Bug 1206977: P2. Wrap PDM creation in a new PDMFactory class. r=cpearce (6425ab58ca) - Bug 1206977: P3. Allow PDM fallback. r=cpearce (6cce420063) - Bug 1206977: P4. Add AgnosticDecoderModule object. r=cpearce (1d4581f74c) - Bug 1206977: P5. Update PlatformDecoderModule documentation. r=cpearce (af14651d29) - Bug 1206977: P6. Make PlatformDecoderModule::SupportsMimeType pure virtual. r=cpearce (f328eb0a48) - Bug 1146086: Properly marking overridden member with override keyword. a=bustage (c809b2311c) - Bug 1204776: P1. Have the PlatformDecoderModules use their own log. r=cpearce (b8565d268b) - Bug 1204776: P2. Make Apple PDM use PlatformDecoderModule log. r=cpearce (74b9985af8) - Bug 1204776: P3. Have FFmpeg PDM use PlatformDecoderModule log. r=cpearce (caa498a139) - Bug 1204776: P4. Have VPX/Opus/Vorbis decoder use PlatformDecoderModule log. r=cpearce (f2fce6c79a) - fix (215c918930) - Bug 1206977: [webm] P7. Remove IntelWebMVideoDecoder. r=kinetik (c455347fe1) - Bug 1206977: P8. Have PDMFactory directly manage the EMEDecoderModule. r=cpearce (d830cbe570) - Bug 1212164: Prevent use of demuxer before initialization completes. r=cpearce (99c268d31d) - Bug 1152652: Part1. Use mStandardMozillaStyle for crypto classes. r=edwin (af58e4e822) - Bug 1206977: P9. Ensure PDMs are only ever created through the PDMFactory. r=cpearce (4d7375ea3d) - Bug 1206977: P10. Remove redundant code. r=cpearce (8abd18ffe1) - Bug 1206977: P11. Don't rely on SupportsMimeType to determine if a track can be played. r=cpearce (b569a8f5e1) - Bug 1212246. Part 1 - remove the aBorrowedTaskQueue parameter from the MediaDecoderReader constructor. r=jya. (0f481aa22b) - Bug 1212246. Part 2 - remove mTaskQueueIsBorrowed and unnecessary checks for mTaskQueue is never null. r=jya. (27ec74d634) - Bug 1212723. Part 1 - don't share mBufferedState per bug 1212723 comment 6. r=jya. (59e1b89bee) - Bug 1212723. Part 2 - remove unused argument aCloneDonor from MediaDecoderReader::Init(). r=jya. (45bc778f41)
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim:set ts=2 sw=2 sts=2 et cindent: */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "AgnosticDecoderModule.h"
|
||||
#include "OpusDecoder.h"
|
||||
#include "VorbisDecoder.h"
|
||||
#include "VPXDecoder.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
bool
|
||||
AgnosticDecoderModule::SupportsMimeType(const nsACString& aMimeType)
|
||||
{
|
||||
return VPXDecoder::IsVPX(aMimeType) ||
|
||||
OpusDataDecoder::IsOpus(aMimeType) ||
|
||||
VorbisDataDecoder::IsVorbis(aMimeType);
|
||||
}
|
||||
|
||||
already_AddRefed<MediaDataDecoder>
|
||||
AgnosticDecoderModule::CreateVideoDecoder(const VideoInfo& aConfig,
|
||||
layers::LayersBackend aLayersBackend,
|
||||
layers::ImageContainer* aImageContainer,
|
||||
FlushableTaskQueue* aVideoTaskQueue,
|
||||
MediaDataDecoderCallback* aCallback)
|
||||
{
|
||||
nsRefPtr<MediaDataDecoder> m;
|
||||
|
||||
if (VPXDecoder::IsVPX(aConfig.mMimeType)) {
|
||||
m = new VPXDecoder(*aConfig.GetAsVideoInfo(),
|
||||
aImageContainer,
|
||||
aVideoTaskQueue,
|
||||
aCallback);
|
||||
}
|
||||
|
||||
return m.forget();
|
||||
}
|
||||
|
||||
already_AddRefed<MediaDataDecoder>
|
||||
AgnosticDecoderModule::CreateAudioDecoder(const AudioInfo& aConfig,
|
||||
FlushableTaskQueue* aAudioTaskQueue,
|
||||
MediaDataDecoderCallback* aCallback)
|
||||
{
|
||||
nsRefPtr<MediaDataDecoder> m;
|
||||
|
||||
if (VorbisDataDecoder::IsVorbis(aConfig.mMimeType)) {
|
||||
m = new VorbisDataDecoder(*aConfig.GetAsAudioInfo(),
|
||||
aAudioTaskQueue,
|
||||
aCallback);
|
||||
} else if (OpusDataDecoder::IsOpus(aConfig.mMimeType)) {
|
||||
m = new OpusDataDecoder(*aConfig.GetAsAudioInfo(),
|
||||
aAudioTaskQueue,
|
||||
aCallback);
|
||||
}
|
||||
|
||||
return m.forget();
|
||||
}
|
||||
|
||||
} // namespace mozilla
|
||||
Reference in New Issue
Block a user