Bug 747257 - Part 2: Add media type mapping for .mp4. r=rillian
authorShawn Landden <shawnlandden@gmail.com>
Thu, 17 May 2012 17:20:15 -0700
changeset 96733 a19f0356c09d336418b97c1be4b90ce89ebe0db2
parent 96732 45118cc6518bbe29688877983c32acf92fd1834d
child 96734 022dfc84028c87dda82496c82f471ec059082315
push id1439
push userlsblakk@mozilla.com
push dateMon, 04 Jun 2012 20:19:22 +0000
treeherdermozilla-aurora@ea74834dccd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrillian
bugs747257
milestone15.0a1
Bug 747257 - Part 2: Add media type mapping for .mp4. r=rillian Associate .mp4 files with the "video/mp4" mime type so that we can open them directly via file://
netwerk/mime/nsMimeTypes.h
uriloader/exthandler/nsExternalHelperAppService.cpp
--- a/netwerk/mime/nsMimeTypes.h
+++ b/netwerk/mime/nsMimeTypes.h
@@ -156,16 +156,17 @@
 #define TEXT_RDF                            "text/rdf"
 #define TEXT_XUL                            "application/vnd.mozilla.xul+xml"
 #define TEXT_ECMASCRIPT                     "text/ecmascript"
 #define TEXT_JAVASCRIPT                     "text/javascript"
 #define TEXT_XSL                            "text/xsl"
 #define TEXT_EVENT_STREAM                   "text/event-stream"
 
 #define VIDEO_MPEG                          "video/mpeg"
+#define VIDEO_MP4                           "video/mp4"
 #define VIDEO_RAW                           "video/x-raw-yuv"
 #define VIDEO_OGG                           "video/ogg"
 #define VIDEO_WEBM                          "video/webm"
 #define APPLICATION_OGG                     "application/ogg"
 
 /* x-uuencode-apple-single. QuickMail made me do this. */
 #define UUENCODE_APPLE_SINGLE               "x-uuencode-apple-single"
 
--- a/uriloader/exthandler/nsExternalHelperAppService.cpp
+++ b/uriloader/exthandler/nsExternalHelperAppService.cpp
@@ -435,16 +435,19 @@ static nsDefaultMimeTypeEntry defaultMim
 #ifdef MOZ_OPUS
   { AUDIO_OGG, "opus" },
 #endif
 #endif
 #ifdef MOZ_WEBM
   { VIDEO_WEBM, "webm" },
   { AUDIO_WEBM, "webm" },
 #endif
+#ifdef MOZ_GSTREAMER
+  { VIDEO_MP4, "mp4" },
+#endif
 #ifdef MOZ_RAW
   { VIDEO_RAW, "yuv" }
 #endif
 };
 
 /**
  * This is a small private struct used to help us initialize some
  * default mime types.
@@ -506,16 +509,17 @@ static nsExtraMimeTypeEntry extraMimeEnt
   { TEXT_CSS, "css", "Style Sheet" },
   { VIDEO_OGG, "ogv", "Ogg Video" },
   { VIDEO_OGG, "ogg", "Ogg Video" },
   { APPLICATION_OGG, "ogg", "Ogg Video"},
   { AUDIO_OGG, "oga", "Ogg Audio" },
   { AUDIO_OGG, "opus", "Opus Audio" },
   { VIDEO_WEBM, "webm", "Web Media Video" },
   { AUDIO_WEBM, "webm", "Web Media Audio" },
+  { VIDEO_MP4, "mp4", "MPEG-4 Video" },
   { VIDEO_RAW, "yuv", "Raw YUV Video" },
   { AUDIO_WAV, "wav", "Waveform Audio" }
 };
 
 #undef MAC_TYPE
 
 /**
  * File extensions for which decoding should be disabled.