[frogr] Added support for more video formats: WMV, OGV M2TS and 3GP



commit 3969c1eadbf4457d3f24e6dd025df76cda032051
Author: Mario Sanchez Prada <msanchez gnome org>
Date:   Sat Nov 3 20:08:05 2012 +0100

    Added support for more video formats: WMV, OGV M2TS and 3GP

 src/frogr-file-loader.c |    2 +-
 src/frogr-main-view.c   |    6 +++---
 src/frogr-util.c        |   15 ++++++++++++++-
 3 files changed, 18 insertions(+), 5 deletions(-)
---
diff --git a/src/frogr-file-loader.c b/src/frogr-file-loader.c
index 5c6d028..edd2236 100644
--- a/src/frogr-file-loader.c
+++ b/src/frogr-file-loader.c
@@ -252,7 +252,7 @@ _load_next_file_cb (GObject *object,
         }
 
       mime_type = g_file_info_get_content_type (file_info);
-      is_video = g_str_has_prefix (mime_type, "video");
+      is_video = !g_str_has_prefix (mime_type, "image");
 
       /* Load the pixbuf for the video or the image */
       if (is_video)
diff --git a/src/frogr-main-view.c b/src/frogr-main-view.c
index 45a711c..0c0d59b 100644
--- a/src/frogr-main-view.c
+++ b/src/frogr-main-view.c
@@ -974,10 +974,10 @@ _load_pictures_dialog (FrogrMainView *self)
   supported_mimetypes = frogr_util_get_supported_mimetypes ();
   for (i = 0; supported_mimetypes[i]; i++)
     {
-      if (g_str_has_prefix (supported_mimetypes[i], "video"))
-        gtk_file_filter_add_mime_type (video_filter, supported_mimetypes[i]);
-      else
+      if (g_str_has_prefix (supported_mimetypes[i], "image"))
         gtk_file_filter_add_mime_type (image_filter, supported_mimetypes[i]);
+      else
+        gtk_file_filter_add_mime_type (video_filter, supported_mimetypes[i]);
 
       gtk_file_filter_add_mime_type (all_filter, supported_mimetypes[i]);
     }
diff --git a/src/frogr-util.c b/src/frogr-util.c
index 3a2d9d3..544f6b9 100644
--- a/src/frogr-util.c
+++ b/src/frogr-util.c
@@ -587,7 +587,12 @@ frogr_util_get_supported_videos (void)
     "*.[mM][pP][eE]",
     "*.[mM][pP][eE][gG]",
     "*.[mM][pP][gG]",
-    "*.avi",
+    "*.[aA][vV][iI]",
+    "*.[wW][mM][vV]",
+    "*.[oO][gG][vV]",
+    "*.[oO][gG][gG]",
+    "*.[mM]2[tT][sS]",
+    "*.3[gG][pP]",
     NULL
   };
 
@@ -609,6 +614,14 @@ frogr_util_get_supported_mimetypes (void)
     "video/mp4",
     "video/quicktime",
     "video/x-msvideo",
+    "video/ogg",
+    "video/x-ms-wmv",
+    "video/3gpp",
+    "video/m2ts",
+    "video/avchd-stream",
+    "video/mp2t",
+    "video/vnd.dlna.mpeg-tts",
+    "application/ogg",
     NULL
   };
 



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