summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dom/media/fmp4/MP4Decoder.cpp3
-rw-r--r--dom/media/mediasource/ContainerParser.cpp3
-rw-r--r--dom/media/mediasource/MediaSource.cpp6
-rw-r--r--dom/media/mediasource/TrackBuffersManager.cpp2
-rw-r--r--dom/media/webm/WebMDecoder.cpp12
-rw-r--r--dom/media/webm/WebMDemuxer.cpp24
-rw-r--r--media/libnestegg/include/nestegg.h1
-rw-r--r--media/libnestegg/src/nestegg.c7
-rw-r--r--toolkit/content/aboutSupport.js22
-rw-r--r--toolkit/content/aboutSupport.xhtml9
-rw-r--r--toolkit/locales/en-US/chrome/global/aboutSupport.dtd2
-rw-r--r--toolkit/locales/en-US/chrome/global/aboutSupport.properties17
-rw-r--r--toolkit/modules/Troubleshoot.jsm12
-rw-r--r--toolkit/modules/tests/browser/browser_Troubleshoot.js7
14 files changed, 51 insertions, 76 deletions
diff --git a/dom/media/fmp4/MP4Decoder.cpp b/dom/media/fmp4/MP4Decoder.cpp
index 6954e9757..b293c251b 100644
--- a/dom/media/fmp4/MP4Decoder.cpp
+++ b/dom/media/fmp4/MP4Decoder.cpp
@@ -172,7 +172,8 @@ bool
MP4Decoder::IsH264(const nsACString& aMimeType)
{
return aMimeType.EqualsLiteral("video/mp4") ||
- aMimeType.EqualsLiteral("video/avc");
+ aMimeType.EqualsLiteral("video/avc") ||
+ aMimeType.EqualsLiteral("video/webm; codecs=avc1");
}
/* static */
diff --git a/dom/media/mediasource/ContainerParser.cpp b/dom/media/mediasource/ContainerParser.cpp
index 4ae37d7e9..b4dcfde8a 100644
--- a/dom/media/mediasource/ContainerParser.cpp
+++ b/dom/media/mediasource/ContainerParser.cpp
@@ -697,6 +697,9 @@ ContainerParser::CreateForMIMEType(const nsACString& aType)
if (aType.LowerCaseEqualsLiteral("video/webm") || aType.LowerCaseEqualsLiteral("audio/webm")) {
return new WebMContainerParser(aType);
}
+ if (aType.LowerCaseEqualsLiteral("video/x-matroska") || aType.LowerCaseEqualsLiteral("audio/x-matroska")) {
+ return new WebMContainerParser(aType);
+ }
#ifdef MOZ_FMP4
if (aType.LowerCaseEqualsLiteral("video/mp4") || aType.LowerCaseEqualsLiteral("audio/mp4")) {
diff --git a/dom/media/mediasource/MediaSource.cpp b/dom/media/mediasource/MediaSource.cpp
index 152c0085a..1c276cdc1 100644
--- a/dom/media/mediasource/MediaSource.cpp
+++ b/dom/media/mediasource/MediaSource.cpp
@@ -110,14 +110,16 @@ MediaSource::IsTypeSupported(const nsAString& aType, DecoderDoctorDiagnostics* a
}
return NS_OK;
}
- if (mimeType.EqualsASCII("video/webm")) {
+ if (mimeType.EqualsASCII("video/webm") ||
+ mimeType.EqualsASCII("video/x-matroska")) {
if (!(Preferences::GetBool("media.mediasource.webm.enabled", false) ||
IsWebMForced(aDiagnostics))) {
return NS_ERROR_DOM_NOT_SUPPORTED_ERR;
}
return NS_OK;
}
- if (mimeType.EqualsASCII("audio/webm")) {
+ if (mimeType.EqualsASCII("audio/webm") ||
+ mimeType.EqualsASCII("audio/x-matroska")) {
if (!(Preferences::GetBool("media.mediasource.webm.enabled", false) ||
Preferences::GetBool("media.mediasource.webm.audio.enabled", true))) {
return NS_ERROR_DOM_NOT_SUPPORTED_ERR;
diff --git a/dom/media/mediasource/TrackBuffersManager.cpp b/dom/media/mediasource/TrackBuffersManager.cpp
index ac6d82411..21fb158b5 100644
--- a/dom/media/mediasource/TrackBuffersManager.cpp
+++ b/dom/media/mediasource/TrackBuffersManager.cpp
@@ -814,6 +814,8 @@ TrackBuffersManager::CreateDemuxerforMIMEType()
ShutdownDemuxers();
if (mType.LowerCaseEqualsLiteral("video/webm") ||
+ mType.LowerCaseEqualsLiteral("video/x-matroska") ||
+ mType.LowerCaseEqualsLiteral("audio/x-matroska") ||
mType.LowerCaseEqualsLiteral("audio/webm")) {
mInputDemuxer = new WebMDemuxer(mCurrentInputBuffer, true /* IsMediaSource*/ );
return;
diff --git a/dom/media/webm/WebMDecoder.cpp b/dom/media/webm/WebMDecoder.cpp
index 9575d6e42..5cb943742 100644
--- a/dom/media/webm/WebMDecoder.cpp
+++ b/dom/media/webm/WebMDecoder.cpp
@@ -42,7 +42,10 @@ WebMDecoder::CanHandleMediaType(const nsACString& aMIMETypeExcludingCodecs,
const bool isWebMAudio = aMIMETypeExcludingCodecs.EqualsASCII("audio/webm");
const bool isWebMVideo = aMIMETypeExcludingCodecs.EqualsASCII("video/webm");
- if (!isWebMAudio && !isWebMVideo) {
+ const bool isMatroskaAudio = aMIMETypeExcludingCodecs.EqualsASCII("audio/x-matroska") ;
+ const bool isMatroskaVideo = aMIMETypeExcludingCodecs.EqualsASCII("video/x-matroska") ;
+
+ if (!isWebMAudio && !isWebMVideo && !isMatroskaAudio && !isMatroskaVideo) {
return false;
}
@@ -63,7 +66,7 @@ WebMDecoder::CanHandleMediaType(const nsACString& aMIMETypeExcludingCodecs,
}
// Note: Only accept VP8/VP9 in a video content type, not in an audio
// content type.
- if (isWebMVideo &&
+ if ((isWebMVideo || isMatroskaVideo) &&
(codec.EqualsLiteral("vp8") || codec.EqualsLiteral("vp8.0") ||
codec.EqualsLiteral("vp9") || codec.EqualsLiteral("vp9.0"))) {
@@ -74,6 +77,11 @@ WebMDecoder::CanHandleMediaType(const nsACString& aMIMETypeExcludingCodecs,
continue;
}
#endif
+
+ if (IsH264CodecString(codec)) {
+ continue;
+ }
+
// Some unsupported codec.
return false;
}
diff --git a/dom/media/webm/WebMDemuxer.cpp b/dom/media/webm/WebMDemuxer.cpp
index 013da9b2c..2b6d46186 100644
--- a/dom/media/webm/WebMDemuxer.cpp
+++ b/dom/media/webm/WebMDemuxer.cpp
@@ -326,6 +326,20 @@ WebMDemuxer::ReadMetadata()
case NESTEGG_CODEC_AV1:
mInfo.mVideo.mMimeType = "video/webm; codecs=av1";
break;
+ case NESTEGG_CODEC_AVC1: {
+ mInfo.mVideo.mMimeType = "video/webm; codecs=avc1";
+
+ unsigned char* data = 0;
+ size_t length = 0;
+ r = nestegg_track_codec_data(context, track, 0, &data, &length);
+ if (r == -1) {
+ return NS_ERROR_FAILURE;
+ }
+
+ mInfo.mVideo.mExtraData = new MediaByteBuffer(length);
+ mInfo.mVideo.mExtraData->AppendElements(data, length);
+ break;
+ }
default:
NS_WARNING("Unknown WebM video codec");
return NS_ERROR_FAILURE;
@@ -662,6 +676,9 @@ WebMDemuxer::GetNextPacket(TrackInfo::TrackType aType, MediaRawDataQueue *aSampl
isKeyframe = AOMDecoder::IsKeyframe(sample);
break;
#endif
+ case NESTEGG_CODEC_AVC1:
+ isKeyframe = nestegg_packet_has_keyframe(holder->Packet());
+ break;
default:
NS_WARNING("Cannot detect keyframes in unknown WebM video codec");
return NS_ERROR_FAILURE;
@@ -682,7 +699,7 @@ WebMDemuxer::GetNextPacket(TrackInfo::TrackType aType, MediaRawDataQueue *aSampl
dimensions = AOMDecoder::GetFrameSize(sample);
break;
#endif
- }
+ }
if (mLastSeenFrameSize.isSome()
&& (dimensions != mLastSeenFrameSize.value())) {
mInfo.mVideo.mDisplay = dimensions;
@@ -749,6 +766,11 @@ WebMDemuxer::GetNextPacket(TrackInfo::TrackType aType, MediaRawDataQueue *aSampl
if (aType == TrackInfo::kVideoTrack) {
sample->mTrackInfo = mSharedVideoTrackInfo;
}
+
+ if (mVideoCodec == NESTEGG_CODEC_AVC1) {
+ sample->mExtraData = mInfo.mVideo.mExtraData;
+ }
+
aSamples->Push(sample);
}
return NS_OK;
diff --git a/media/libnestegg/include/nestegg.h b/media/libnestegg/include/nestegg.h
index 2baa50bc5..777555f7b 100644
--- a/media/libnestegg/include/nestegg.h
+++ b/media/libnestegg/include/nestegg.h
@@ -72,6 +72,7 @@ extern "C" {
#define NESTEGG_CODEC_VP9 2 /**< Track uses Google On2 VP9 codec. */
#define NESTEGG_CODEC_OPUS 3 /**< Track uses Xiph Opus codec. */
#define NESTEGG_CODEC_AV1 4 /**< Track uses AOMedia AV1 codec. */
+#define NESTEGG_CODEC_AVC1 5 /**< Track uses AVC1 'h264' */
#define NESTEGG_CODEC_UNKNOWN INT_MAX /**< Track uses unknown codec. */
#define NESTEGG_VIDEO_MONO 0 /**< Track is mono video. */
diff --git a/media/libnestegg/src/nestegg.c b/media/libnestegg/src/nestegg.c
index 61c30ec6b..6f0d55b46 100644
--- a/media/libnestegg/src/nestegg.c
+++ b/media/libnestegg/src/nestegg.c
@@ -157,6 +157,7 @@ enum ebml_type_enum {
#define TRACK_ID_AV1 "V_AV1"
#define TRACK_ID_VORBIS "A_VORBIS"
#define TRACK_ID_OPUS "A_OPUS"
+#define TRACK_ID_AVC1 "V_MPEG4/ISO/AVC"
/* Track Encryption */
#define CONTENT_ENC_ALGO_AES 5
@@ -2401,6 +2402,9 @@ nestegg_track_codec_id(nestegg * ctx, unsigned int track)
if (strcmp(codec_id, TRACK_ID_OPUS) == 0)
return NESTEGG_CODEC_OPUS;
+ if (strcmp(codec_id, TRACK_ID_AVC1) == 0)
+ return NESTEGG_CODEC_AVC1;
+
return NESTEGG_CODEC_UNKNOWN;
}
@@ -2459,7 +2463,8 @@ nestegg_track_codec_data(nestegg * ctx, unsigned int track, unsigned int item,
return -1;
if (nestegg_track_codec_id(ctx, track) != NESTEGG_CODEC_VORBIS &&
- nestegg_track_codec_id(ctx, track) != NESTEGG_CODEC_OPUS)
+ nestegg_track_codec_id(ctx, track) != NESTEGG_CODEC_OPUS &&
+ nestegg_track_codec_id(ctx, track) != NESTEGG_CODEC_AVC1)
return -1;
if (ne_get_binary(entry->codec_private, &codec_private) != 0)
diff --git a/toolkit/content/aboutSupport.js b/toolkit/content/aboutSupport.js
index 8908a0f80..06470f966 100644
--- a/toolkit/content/aboutSupport.js
+++ b/toolkit/content/aboutSupport.js
@@ -53,28 +53,6 @@ var snapshotFormatters = {
if (data.updateChannel)
$("updatechannel-box").textContent = data.updateChannel;
- let statusText = stringBundle().GetStringFromName("multiProcessStatus.unknown");
-
- // Whitelist of known values with string descriptions:
- switch (data.autoStartStatus) {
- case 0:
- case 1:
- case 2:
- case 4:
- case 6:
- case 7:
- case 8:
- statusText = stringBundle().GetStringFromName("multiProcessStatus." + data.autoStartStatus);
- break;
-
- case 10:
- statusText = (Services.appinfo.OS == "Darwin" ? "OS X 10.6 - 10.8" : "Windows XP");
- break;
- }
-
- $("multiprocess-box").textContent = stringBundle().formatStringFromName("multiProcessWindows",
- [data.numRemoteWindows, data.numTotalWindows, statusText], 3);
-
$("safemode-box").textContent = data.safeMode;
},
diff --git a/toolkit/content/aboutSupport.xhtml b/toolkit/content/aboutSupport.xhtml
index 5e6319182..fff86dff6 100644
--- a/toolkit/content/aboutSupport.xhtml
+++ b/toolkit/content/aboutSupport.xhtml
@@ -236,15 +236,6 @@
<tr>
<th class="column">
- &aboutSupport.appBasicsMultiProcessSupport;
- </th>
-
- <td id="multiprocess-box">
- </td>
- </tr>
-
- <tr>
- <th class="column">
&aboutSupport.appBasicsSafeMode;
</th>
diff --git a/toolkit/locales/en-US/chrome/global/aboutSupport.dtd b/toolkit/locales/en-US/chrome/global/aboutSupport.dtd
index a2477fb2e..34db4e4c4 100644
--- a/toolkit/locales/en-US/chrome/global/aboutSupport.dtd
+++ b/toolkit/locales/en-US/chrome/global/aboutSupport.dtd
@@ -64,8 +64,6 @@ Windows/Mac use the term "Folder" instead of "Directory" -->
<!ENTITY aboutSupport.appBasicsProfiles "Profiles">
-<!ENTITY aboutSupport.appBasicsMultiProcessSupport "Multiprocess Windows">
-
<!ENTITY aboutSupport.appBasicsSafeMode "Safe Mode">
<!ENTITY aboutSupport.showDir.label "Open Directory">
diff --git a/toolkit/locales/en-US/chrome/global/aboutSupport.properties b/toolkit/locales/en-US/chrome/global/aboutSupport.properties
index 564292e3d..be9ce5f33 100644
--- a/toolkit/locales/en-US/chrome/global/aboutSupport.properties
+++ b/toolkit/locales/en-US/chrome/global/aboutSupport.properties
@@ -99,23 +99,6 @@ gpuProcessKillButton = Terminate GPU Process
minLibVersions = Expected minimum version
loadedLibVersions = Version in use
-# LOCALIZATION NOTE %1$S and %2$S will be replaced with the number of remote and the total number
-# of windows, respectively, while %3$S will be replaced with one of the status strings below,
-# which contains a description of the multi-process preference and status.
-# Note: multiProcessStatus.3 doesn't exist because status=3 was deprecated.
-multiProcessWindows = %1$S/%2$S (%3$S)
-multiProcessStatus.0 = Enabled by user
-multiProcessStatus.1 = Enabled by default
-multiProcessStatus.2 = Disabled
-multiProcessStatus.4 = Disabled by accessibility tools
-multiProcessStatus.5 = Disabled by lack of graphics hardware acceleration on Mac OS X
-multiProcessStatus.6 = Disabled by unsupported text input
-multiProcessStatus.7 = Disabled by add-ons
-multiProcessStatus.8 = Disabled forcibly
-# No longer in use (bug 1296353) but we might bring this back.
-multiProcessStatus.9 = Disabled by graphics hardware acceleration on Windows XP
-multiProcessStatus.unknown = Unknown status
-
asyncPanZoom = Asynchronous Pan/Zoom
apzNone = none
wheelEnabled = wheel input enabled
diff --git a/toolkit/modules/Troubleshoot.jsm b/toolkit/modules/Troubleshoot.jsm
index 8d84eec8c..6ee6cb54e 100644
--- a/toolkit/modules/Troubleshoot.jsm
+++ b/toolkit/modules/Troubleshoot.jsm
@@ -220,18 +220,6 @@ var dataProviders = {
}
}
- data.remoteAutoStart = Services.appinfo.browserTabsRemoteAutostart;
-
- try {
- let e10sStatus = Cc["@mozilla.org/supports-PRUint64;1"]
- .createInstance(Ci.nsISupportsPRUint64);
- let appinfo = Services.appinfo.QueryInterface(Ci.nsIObserver);
- appinfo.observe(e10sStatus, "getE10SBlocked", "");
- data.autoStartStatus = e10sStatus.data;
- } catch (e) {
- data.autoStartStatus = -1;
- }
-
done(data);
},
diff --git a/toolkit/modules/tests/browser/browser_Troubleshoot.js b/toolkit/modules/tests/browser/browser_Troubleshoot.js
index 4124be1fb..ebc4de1f9 100644
--- a/toolkit/modules/tests/browser/browser_Troubleshoot.js
+++ b/toolkit/modules/tests/browser/browser_Troubleshoot.js
@@ -126,13 +126,6 @@ const SNAPSHOT_SCHEMA = {
supportURL: {
type: "string",
},
- remoteAutoStart: {
- type: "boolean",
- required: true,
- },
- autoStartStatus: {
- type: "number",
- },
numTotalWindows: {
type: "number",
},