mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-06 07:48:38 +09:00
Add av1 to MediaSource.isTypeSupported
When av1 video playback is enabled, declare it as supported in the webm container in MediaSource.IsTypeSupported. Also support special mime types of the form video/webm; codecs=vp9.experimental.<git-commit-id> so test sites can verify playback support of particular encodings while the av1 bitstream is under development.
This commit is contained in:
parent
dc0970c312
commit
1c8af26369
3 changed files with 24 additions and 0 deletions
|
|
@ -5,6 +5,9 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "mozilla/Preferences.h"
|
||||
#ifdef MOZ_AV1
|
||||
#include "AOMDecoder.h"
|
||||
#endif
|
||||
#include "MediaDecoderStateMachine.h"
|
||||
#include "WebMDemuxer.h"
|
||||
#include "WebMDecoder.h"
|
||||
|
|
@ -65,6 +68,11 @@ WebMDecoder::CanHandleMediaType(const nsACString& aMIMETypeExcludingCodecs,
|
|||
|
||||
continue;
|
||||
}
|
||||
#ifdef MOZ_AV1
|
||||
if (isVideo && AOMDecoder::IsSupportedCodec(codec)) {
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
// Some unsupported codec.
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue