[sushi] Use Totem provided mime-types list in Gst viewer



commit ac70340b42639c5a61057b1f23cd70087306f000
Author: Bastien Nocera <hadess hadess net>
Date:   Tue Apr 17 16:51:57 2012 +0100

    Use Totem provided mime-types list in Gst viewer

 src/Makefile-js.am            |    5 +-
 src/js/util/totemMimeTypes.js |  119 +++++++++++++++++++++++++++++++++++++++++
 src/js/viewers/gst.js         |   60 +--------------------
 3 files changed, 124 insertions(+), 60 deletions(-)
---
diff --git a/src/Makefile-js.am b/src/Makefile-js.am
index 82d7edb..27abb98 100644
--- a/src/Makefile-js.am
+++ b/src/Makefile-js.am
@@ -23,7 +23,8 @@ dist_jsviewers_DATA = \
 jsutildir = $(pkgdatadir)/js/util
 dist_jsutil_DATA = \
     js/util/constants.js \
-    js/util/format.js
+    js/util/format.js \
+    js/util/totemMimeTypes.js
 
 jsutil_built_sources = \
     $(srcdir)/js/util/features.js \
@@ -45,4 +46,4 @@ CLEANFILES += \
 
 EXTRA_DIST += \
     js/util/features.js.in \
-    js/util/path.js.in
\ No newline at end of file
+    js/util/path.js.in
diff --git a/src/js/util/totemMimeTypes.js b/src/js/util/totemMimeTypes.js
new file mode 100644
index 0000000..5496e92
--- /dev/null
+++ b/src/js/util/totemMimeTypes.js
@@ -0,0 +1,119 @@
+/* generated with mime-type-imports.sh in the totem module, don't edit or
+   commit in the sushi module without filing a bug against totem */
+let videoTypes = [
+    "application/mxf",
+    "application/ogg",
+    "application/ram",
+    "application/sdp",
+    "application/smil",
+    "application/smil+xml",
+    "application/vnd.apple.mpegurl",
+    "application/vnd.ms-wpl",
+    "application/vnd.rn-realmedia",
+    "application/x-extension-m4a",
+    "application/x-extension-mp4",
+    "application/x-flac",
+    "application/x-flash-video",
+    "application/x-matroska",
+    "application/x-netshow-channel",
+    "application/x-ogg",
+    "application/x-quicktime-media-link",
+    "application/x-quicktimeplayer",
+    "application/x-shorten",
+    "application/x-smil",
+    "application/xspf+xml",
+    "audio/3gpp",
+    "audio/ac3",
+    "audio/AMR",
+    "audio/AMR-WB",
+    "audio/basic",
+    "audio/flac",
+    "audio/midi",
+    "audio/mp2",
+    "audio/mp4",
+    "audio/mpeg",
+    "audio/mpegurl",
+    "audio/ogg",
+    "audio/prs.sid",
+    "audio/vnd.rn-realaudio",
+    "audio/x-aiff",
+    "audio/x-ape",
+    "audio/x-flac",
+    "audio/x-gsm",
+    "audio/x-it",
+    "audio/x-m4a",
+    "audio/x-matroska",
+    "audio/x-mod",
+    "audio/x-mp3",
+    "audio/x-mpeg",
+    "audio/x-mpegurl",
+    "audio/x-ms-asf",
+    "audio/x-ms-asx",
+    "audio/x-ms-wax",
+    "audio/x-ms-wma",
+    "audio/x-musepack",
+    "audio/x-pn-aiff",
+    "audio/x-pn-au",
+    "audio/x-pn-realaudio",
+    "audio/x-pn-realaudio-plugin",
+    "audio/x-pn-wav",
+    "audio/x-pn-windows-acm",
+    "audio/x-realaudio",
+    "audio/x-real-audio",
+    "audio/x-s3m",
+    "audio/x-sbc",
+    "audio/x-scpls",
+    "audio/x-speex",
+    "audio/x-stm",
+    "audio/x-tta",
+    "audio/x-wav",
+    "audio/x-wavpack",
+    "audio/x-vorbis",
+    "audio/x-vorbis+ogg",
+    "audio/x-xm",
+    "image/vnd.rn-realpix",
+    "image/x-pict",
+    "misc/ultravox",
+    "text/google-video-pointer",
+    "text/x-google-video-pointer",
+    "video/3gp",
+    "video/3gpp",
+    "video/dv",
+    "video/divx",
+    "video/fli",
+    "video/flv",
+    "video/mp2t",
+    "video/mp4",
+    "video/mp4v-es",
+    "video/mpeg",
+    "video/msvideo",
+    "video/ogg",
+    "video/quicktime",
+    "video/vivo",
+    "video/vnd.divx",
+    "video/vnd.mpegurl",
+    "video/vnd.rn-realvideo",
+    "video/vnd.vivo",
+    "video/webm",
+    "video/x-anim",
+    "video/x-avi",
+    "video/x-flc",
+    "video/x-fli",
+    "video/x-flic",
+    "video/x-flv",
+    "video/x-m4v",
+    "video/x-matroska",
+    "video/x-mpeg",
+    "video/x-mpeg2",
+    "video/x-ms-asf",
+    "video/x-ms-asx",
+    "video/x-msvideo",
+    "video/x-ms-wm",
+    "video/x-ms-wmv",
+    "video/x-ms-wmx",
+    "video/x-ms-wvx",
+    "video/x-nsv",
+    "video/x-ogm+ogg",
+    "video/x-theora+ogg",
+    "video/x-totem-stream",
+];
diff --git a/src/js/viewers/gst.js b/src/js/viewers/gst.js
index ba2c595..398522f 100644
--- a/src/js/viewers/gst.js
+++ b/src/js/viewers/gst.js
@@ -35,6 +35,7 @@ let Lang = imports.lang;
 
 let Utils = imports.ui.utils;
 let Constants = imports.util.constants;
+let totemMimeTypes = imports.util.totemMimeTypes;
 
 function GstRenderer(args) {
     this._init(args);
@@ -210,61 +211,4 @@ GstRenderer.prototype = {
 let handler = new MimeHandler.MimeHandler();
 let renderer = new GstRenderer();
 
-let videoTypes = [
-    "application/mxf",
-    "application/ogg",
-    "application/ram",
-    "application/sdp",
-    "application/vnd.ms-wpl",
-    "application/vnd.rn-realmedia",
-    "application/x-extension-m4a",
-    "application/x-extension-mp4",
-    "application/x-flash-video",
-    "application/x-matroska",
-    "application/x-netshow-channel",
-    "application/x-ogg",
-    "application/x-quicktimeplayer",
-    "application/x-shorten",
-    "image/vnd.rn-realpix",
-    "image/x-pict",
-    "misc/ultravox",
-    "text/x-google-video-pointer",
-    "video/3gpp",
-    "video/dv",
-    "video/fli",
-    "video/flv",
-    "video/mp2t",
-    "video/mp4",
-    "video/mp4v-es",
-    "video/mpeg",
-    "video/msvideo",
-    "video/ogg",
-    "video/quicktime",
-    "video/vivo",
-    "video/vnd.divx",
-    "video/vnd.rn-realvideo",
-    "video/vnd.vivo",
-    "video/webm",
-    "video/x-anim",
-    "video/x-avi",
-    "video/x-flc",
-    "video/x-fli",
-    "video/x-flic",
-    "video/x-flv",
-    "video/x-m4v",
-    "video/x-matroska",
-    "video/x-mpeg",
-    "video/x-ms-asf",
-    "video/x-ms-asx",
-    "video/x-msvideo",
-    "video/x-ms-wm",
-    "video/x-ms-wmv",
-    "video/x-ms-wmx",
-    "video/x-ms-wvx",
-    "video/x-nsv",
-    "video/x-ogm+ogg",
-    "video/x-theora+ogg",
-    "video/x-totem-stream"
-];
-
-handler.registerMimeTypes(videoTypes, renderer);
+handler.registerMimeTypes(totemMimeTypes.videoTypes, renderer);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]