зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1394591 - P6. Simplify some internal codec mimetype. r=gerald
The codec mimetype is now shown in the media devtools. May as well make it readable. MozReview-Commit-ID: 6rccDiTR24m --HG-- extra : rebase_source : 7b8d1da8f05d0c46d5fd57b5e604ec3aed36a5f2
This commit is contained in:
Родитель
e23a2d9405
Коммит
9b2818843f
|
@ -309,8 +309,7 @@ AOMDecoder::Drain()
|
|||
bool
|
||||
AOMDecoder::IsAV1(const nsACString& aMimeType)
|
||||
{
|
||||
return aMimeType.EqualsLiteral("video/webm; codecs=av1")
|
||||
|| aMimeType.EqualsLiteral("video/av1");
|
||||
return aMimeType.EqualsLiteral("video/av1");
|
||||
}
|
||||
|
||||
/* static */
|
||||
|
|
|
@ -25,10 +25,8 @@ using namespace layers;
|
|||
|
||||
static VPXDecoder::Codec MimeTypeToCodec(const nsACString& aMimeType)
|
||||
{
|
||||
if (aMimeType.EqualsLiteral("video/webm; codecs=vp8")) {
|
||||
if (aMimeType.EqualsLiteral("video/vp8")) {
|
||||
return VPXDecoder::Codec::VP8;
|
||||
} else if (aMimeType.EqualsLiteral("video/webm; codecs=vp9")) {
|
||||
return VPXDecoder::Codec::VP9;
|
||||
} else if (aMimeType.EqualsLiteral("video/vp9")) {
|
||||
return VPXDecoder::Codec::VP9;
|
||||
}
|
||||
|
@ -288,9 +286,7 @@ bool
|
|||
VPXDecoder::IsVPX(const nsACString& aMimeType, uint8_t aCodecMask)
|
||||
{
|
||||
return ((aCodecMask & VPXDecoder::VP8)
|
||||
&& aMimeType.EqualsLiteral("video/webm; codecs=vp8"))
|
||||
|| ((aCodecMask & VPXDecoder::VP9)
|
||||
&& aMimeType.EqualsLiteral("video/webm; codecs=vp9"))
|
||||
&& aMimeType.EqualsLiteral("video/vp8"))
|
||||
|| ((aCodecMask & VPXDecoder::VP9)
|
||||
&& aMimeType.EqualsLiteral("video/vp9"));
|
||||
}
|
||||
|
|
|
@ -323,13 +323,13 @@ WebMDemuxer::ReadMetadata()
|
|||
mVideoCodec = nestegg_track_codec_id(context, track);
|
||||
switch(mVideoCodec) {
|
||||
case NESTEGG_CODEC_VP8:
|
||||
mInfo.mVideo.mMimeType = "video/webm; codecs=vp8";
|
||||
mInfo.mVideo.mMimeType = "video/vp8";
|
||||
break;
|
||||
case NESTEGG_CODEC_VP9:
|
||||
mInfo.mVideo.mMimeType = "video/webm; codecs=vp9";
|
||||
mInfo.mVideo.mMimeType = "video/vp9";
|
||||
break;
|
||||
case NESTEGG_CODEC_AV1:
|
||||
mInfo.mVideo.mMimeType = "video/webm; codecs=av1";
|
||||
mInfo.mVideo.mMimeType = "video/av1";
|
||||
break;
|
||||
default:
|
||||
NS_WARNING("Unknown WebM video codec");
|
||||
|
|
|
@ -36,10 +36,10 @@ WebrtcMediaDataDecoder::InitDecode(const webrtc::VideoCodec* aCodecSettings,
|
|||
nsCString codec;
|
||||
switch (aCodecSettings->codecType) {
|
||||
case webrtc::VideoCodecType::kVideoCodecVP8:
|
||||
codec = "video/webm; codecs=vp8";
|
||||
codec = "video/vp8";
|
||||
break;
|
||||
case webrtc::VideoCodecType::kVideoCodecVP9:
|
||||
codec = "video/webm; codecs=vp9";
|
||||
codec = "video/vp9";
|
||||
break;
|
||||
case webrtc::VideoCodecType::kVideoCodecH264:
|
||||
codec = "video/avc";
|
||||
|
|
Загрузка…
Ссылка в новой задаче