From a31c0374b0ae402ec5ea0238e1fc7cac4ecd57b9 Mon Sep 17 00:00:00 2001 From: Shawn Landden Date: Thu, 17 May 2012 17:20:15 -0700 Subject: [PATCH] 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 | 1 + uriloader/exthandler/nsExternalHelperAppService.cpp | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/netwerk/mime/nsMimeTypes.h b/netwerk/mime/nsMimeTypes.h index c6080d9d657a..925e86fef48d 100644 --- a/netwerk/mime/nsMimeTypes.h +++ b/netwerk/mime/nsMimeTypes.h @@ -161,6 +161,7 @@ #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" diff --git a/uriloader/exthandler/nsExternalHelperAppService.cpp b/uriloader/exthandler/nsExternalHelperAppService.cpp index 1e044026a9b5..e8f919aff45f 100644 --- a/uriloader/exthandler/nsExternalHelperAppService.cpp +++ b/uriloader/exthandler/nsExternalHelperAppService.cpp @@ -440,6 +440,9 @@ static nsDefaultMimeTypeEntry defaultMimeEntries [] = { VIDEO_WEBM, "webm" }, { AUDIO_WEBM, "webm" }, #endif +#ifdef MOZ_GSTREAMER + { VIDEO_MP4, "mp4" }, +#endif #ifdef MOZ_RAW { VIDEO_RAW, "yuv" } #endif @@ -511,6 +514,7 @@ static nsExtraMimeTypeEntry extraMimeEntries [] = { 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" } };