rygel r721 - trunk/src/rygel



Author: zeeshanak
Date: Sat Mar 21 13:56:59 2009
New Revision: 721
URL: http://svn.gnome.org/viewvc/rygel?rev=721&view=rev

Log:
Use g_content_type_is_a to compare mimetypes.

Modified:
   trunk/src/rygel/rygel-transcode-manager.vala

Modified: trunk/src/rygel/rygel-transcode-manager.vala
==============================================================================
--- trunk/src/rygel/rygel-transcode-manager.vala	(original)
+++ trunk/src/rygel/rygel-transcode-manager.vala	Sat Mar 21 13:56:59 2009
@@ -49,7 +49,7 @@
             dlna_profile = MP2TSTranscoder.dlna_profile;
         }
 
-        if (item.mime_type == mime_type) {
+        if (TranscodeManager.mime_type_is_a (item.mime_type, mime_type)) {
             return;
         }
 
@@ -80,5 +80,12 @@
                             target);
         }
     }
+
+    private static bool mime_type_is_a (string mime_type1, string mime_type2) {
+        string content_type1 = g_content_type_from_mime_type (mime_type1);
+        string content_type2 = g_content_type_from_mime_type (mime_type2);
+
+        return g_content_type_is_a (content_type1, content_type2);
+    }
 }
 



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