[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

kov at webkit.org kov at webkit.org
Thu Apr 8 00:21:56 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit fd9c36e9343d2a3c572b321f48259e1834190094
Author: kov at webkit.org <kov at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sun Dec 6 01:50:28 2009 +0000

    WebCore
    
    2009-12-03  Philippe Normand  <pnormand at igalia.com>
    
            Reviewed by Gustavo Noronha.
    
            Advertize audio/ogg correctly and refactored mime-type cache
            building.
    
            [GTK] Recognize oga as audio/ogg
            https://bugs.webkit.org/show_bug.cgi?id=31990
    
            Test: media/media-can-play-ogg.html
    
            * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
            (WebCore::mimeTypeCache):
    
    LayoutTests
    
    2009-12-05  Philippe Normand  <pnormand at igalia.com>
    
            Reviewed by Gustavo Noronha.
    
            New test for video.canPlayType and ogg containers.
    
            [GTK] Recognize oga as audio/ogg
            https://bugs.webkit.org/show_bug.cgi?id=31990
    
            * media/media-can-play-ogg-expected.txt: Added.
            * media/media-can-play-ogg.html: Added.
            * platform/mac-leopard/Skipped:
            * platform/mac-snowleopard/Skipped:
            * platform/mac-tiger/Skipped:
            * platform/mac/Skipped:
            * platform/qt-mac/Skipped:
            * platform/qt-win/Skipped:
            * platform/qt/Skipped:
            * platform/win/Skipped:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@51734 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 9ac57fb..8fb56df 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,23 @@
+2009-12-05  Philippe Normand  <pnormand at igalia.com>
+
+        Reviewed by Gustavo Noronha.
+
+        New test for video.canPlayType and ogg containers.
+
+        [GTK] Recognize oga as audio/ogg
+        https://bugs.webkit.org/show_bug.cgi?id=31990
+
+        * media/media-can-play-ogg-expected.txt: Added.
+        * media/media-can-play-ogg.html: Added.
+        * platform/mac-leopard/Skipped:
+        * platform/mac-snowleopard/Skipped:
+        * platform/mac-tiger/Skipped:
+        * platform/mac/Skipped:
+        * platform/qt-mac/Skipped:
+        * platform/qt-win/Skipped:
+        * platform/qt/Skipped:
+        * platform/win/Skipped:
+
 2009-12-05  Dan Bernstein  <mitz at apple.com>
 
         Rubber-stamped by Mark Rowe.
diff --git a/LayoutTests/platform/mac-leopard/Skipped b/LayoutTests/platform/mac-leopard/Skipped
index 05bf9d3..c5877aa 100644
--- a/LayoutTests/platform/mac-leopard/Skipped
+++ b/LayoutTests/platform/mac-leopard/Skipped
@@ -27,3 +27,6 @@ media/media-fullscreen-not-in-document.html
 
 # Tests of accessibility functionality not supported on Leopard
 accessibility/aria-list-and-listitem.html
+
+# This test requires ogg codecs
+media/media-can-play-ogg.html
diff --git a/LayoutTests/platform/mac-snowleopard/Skipped b/LayoutTests/platform/mac-snowleopard/Skipped
index 06ddf1f..9ba2b40 100644
--- a/LayoutTests/platform/mac-snowleopard/Skipped
+++ b/LayoutTests/platform/mac-snowleopard/Skipped
@@ -49,3 +49,5 @@ svg/css/glyph-orientation-rounding-test.xhtml
 # thrown
 plugins/netscape-invoke-failure.html
 
+# This test requires ogg codecs
+media/media-can-play-ogg.html
diff --git a/LayoutTests/platform/mac-tiger/Skipped b/LayoutTests/platform/mac-tiger/Skipped
index 1dd7a88..51ffb13 100644
--- a/LayoutTests/platform/mac-tiger/Skipped
+++ b/LayoutTests/platform/mac-tiger/Skipped
@@ -77,3 +77,6 @@ inspector/console-dirxml.html
 inspector/console-format-collections.html
 inspector/console-format.html
 inspector/console-tests.html
+
+# This test requires ogg codecs
+media/media-can-play-ogg.html
diff --git a/LayoutTests/platform/mac/Skipped b/LayoutTests/platform/mac/Skipped
index a362e94..5ca9c6b 100644
--- a/LayoutTests/platform/mac/Skipped
+++ b/LayoutTests/platform/mac/Skipped
@@ -108,3 +108,7 @@ plugins/reloadplugins-no-pages.html
 
 # These test require Qt Widgets
 plugins/qt-qwidget-plugin.html
+
+# This test requires ogg codecs
+media/media-can-play-ogg.html
+
diff --git a/LayoutTests/platform/qt-mac/Skipped b/LayoutTests/platform/qt-mac/Skipped
index e69de29..4148f87 100644
--- a/LayoutTests/platform/qt-mac/Skipped
+++ b/LayoutTests/platform/qt-mac/Skipped
@@ -0,0 +1,3 @@
+
+# This test requires ogg codecs
+media/media-can-play-ogg.html
diff --git a/LayoutTests/platform/qt-win/Skipped b/LayoutTests/platform/qt-win/Skipped
index e69de29..4148f87 100644
--- a/LayoutTests/platform/qt-win/Skipped
+++ b/LayoutTests/platform/qt-win/Skipped
@@ -0,0 +1,3 @@
+
+# This test requires ogg codecs
+media/media-can-play-ogg.html
diff --git a/LayoutTests/platform/qt/Skipped b/LayoutTests/platform/qt/Skipped
index 5fe287b..02b2146 100644
--- a/LayoutTests/platform/qt/Skipped
+++ b/LayoutTests/platform/qt/Skipped
@@ -5164,3 +5164,6 @@ http/tests/security/dataURL/xss-DENIED-from-data-url-in-foreign-domain-window-op
 http/tests/security/dataURL/xss-DENIED-from-javascript-url-window-open.html
 http/tests/security/javascriptURL/xss-ALLOWED-from-javascript-url-window-open.html
 http/tests/security/javascriptURL/xss-DENIED-from-javascript-url-in-foreign-domain-window-open.html
+
+# This test requires ogg codecs
+media/media-can-play-ogg.html
diff --git a/LayoutTests/platform/win/Skipped b/LayoutTests/platform/win/Skipped
index f255c38..c5de754 100644
--- a/LayoutTests/platform/win/Skipped
+++ b/LayoutTests/platform/win/Skipped
@@ -723,3 +723,6 @@ inspector/timeline-network-resource.html
 
 # https://bugs.webkit.org/show_bug.cgi?id=32038 - Flaky on Windows
 http/tests/cache/subresource-failover-to-network.html
+
+# This test requires ogg codecs
+media/media-can-play-ogg.html
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 72bfcc2..f0e98c7 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,18 @@
+2009-12-03  Philippe Normand  <pnormand at igalia.com>
+
+        Reviewed by Gustavo Noronha.
+
+        Advertize audio/ogg correctly and refactored mime-type cache
+        building.
+
+        [GTK] Recognize oga as audio/ogg
+        https://bugs.webkit.org/show_bug.cgi?id=31990
+
+        Test: media/media-can-play-ogg.html
+
+        * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
+        (WebCore::mimeTypeCache):
+
 2009-12-05  Alexey Proskuryakov  <ap at apple.com>
 
         Reviewed by Eric Seidel.
diff --git a/WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp b/WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp
index 92de392..d30c942 100644
--- a/WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp
+++ b/WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp
@@ -777,56 +777,78 @@ static HashSet<String> mimeTypeCache()
             GstTypeFindFactory* factory = GST_TYPE_FIND_FACTORY(iterator->data);
             GstCaps* caps = gst_type_find_factory_get_caps(factory);
 
-            // Splitting the capability by comma and taking the first part
-            // as capability can be something like "audio/x-wavpack, framed=(boolean)false"
-            GOwnPtr<gchar> capabilityString(gst_caps_to_string(caps));
-            gchar** capability = g_strsplit(capabilityString.get(), ",", 2);
-            gchar** mimetype = g_strsplit(capability[0], "/", 2);
-
-            // GStreamer plugins can be capable of supporting types which WebKit supports
-            // by default. In that case, we should not consider these types supportable by GStreamer.
-            // Examples of what GStreamer can support but should not be added:
-            // text/plain, text/html, image/jpeg, application/xml
-            if (g_str_equal(mimetype[0], "audio")
-                || g_str_equal(mimetype[0], "video")
-                || (g_str_equal(mimetype[0], "application")
-                    && !ignoredApplicationSubtypes.contains(String(mimetype[1])))) {
-                cache.add(String(capability[0]));
-
-                // These formats are supported by GStreamer, but not correctly advertised
-                if (g_str_equal(capability[0], "video/x-h264")
-                    || g_str_equal(capability[0], "audio/x-m4a")) {
+            if (!caps)
+                continue;
+
+            for (guint structureIndex = 0; structureIndex < gst_caps_get_size(caps); structureIndex++) {
+                GstStructure* structure = gst_caps_get_structure(caps, structureIndex);
+                const gchar* name = gst_structure_get_name(structure);
+                bool cached = false;
+
+                // These formats are supported by GStreamer, but not
+                // correctly advertised.
+                if (g_str_equal(name, "video/x-h264")
+                    || g_str_equal(name, "audio/x-m4a")) {
                     cache.add(String("video/mp4"));
                     cache.add(String("audio/aac"));
+                    cached = true;
                 }
 
-                if (g_str_equal(capability[0], "video/x-theora"))
+                if (g_str_equal(name, "video/x-theora")) {
                     cache.add(String("video/ogg"));
+                    cached = true;
+                }
 
-                if (g_str_equal(capability[0], "audio/x-wav"))
-                    cache.add(String("audio/wav"));
+                if (g_str_equal(name, "audio/x-vorbis")) {
+                    cache.add(String("audio/ogg"));
+                    cached = true;
+                }
 
-                if (g_str_equal(capability[0], "audio/mpeg")) {
-                    // This is what we are handling: mpegversion=(int)1, layer=(int)[ 1, 3 ]
-                    gchar** versionAndLayer = g_strsplit(capability[1], ",", 2);
+                if (g_str_equal(name, "audio/x-wav")) {
+                    cache.add(String("audio/wav"));
+                    cached = true;
+                }
 
-                    if (g_str_has_suffix(versionAndLayer[0], "(int)1")) {
-                        for (int i = 0; versionAndLayer[1][i] != '\0'; i++) {
-                            if (versionAndLayer[1][i] == '1')
+                if (g_str_equal(name, "audio/mpeg")) {
+                    cache.add(String(name));
+                    cached = true;
+
+                    // This is what we are handling:
+                    // mpegversion=(int)1, layer=(int)[ 1, 3 ]
+                    gint mpegVersion = 0;
+                    if (gst_structure_get_int(structure, "mpegversion", &mpegVersion) && (mpegVersion == 1)) {
+                        const GValue* layer = gst_structure_get_value(structure, "layer");
+                        if (G_VALUE_TYPE(layer) == GST_TYPE_INT_RANGE) {
+                            gint minLayer = gst_value_get_int_range_min(layer);
+                            gint maxLayer = gst_value_get_int_range_max(layer);
+                            if (minLayer <= 1 <= maxLayer)
                                 cache.add(String("audio/mp1"));
-                            else if (versionAndLayer[1][i] == '2')
+                            if (minLayer <= 2 <= maxLayer)
                                 cache.add(String("audio/mp2"));
-                            else if (versionAndLayer[1][i] == '3')
+                            if (minLayer <= 3 <= maxLayer)
                                 cache.add(String("audio/mp3"));
                         }
                     }
+                }
 
-                    g_strfreev(versionAndLayer);
+                if (!cached) {
+                    // GStreamer plugins can be capable of supporting
+                    // types which WebKit supports by default. In that
+                    // case, we should not consider these types
+                    // supportable by GStreamer.  Examples of what
+                    // GStreamer can support but should not be added:
+                    // text/plain, text/html, image/jpeg,
+                    // application/xml
+                    gchar** mimetype = g_strsplit(name, "/", 2);
+                    if (g_str_equal(mimetype[0], "audio")
+                        || g_str_equal(mimetype[0], "video")
+                        || (g_str_equal(mimetype[0], "application")
+                            && !ignoredApplicationSubtypes.contains(String(mimetype[1]))))
+                        cache.add(String(name));
+
+                    g_strfreev(mimetype);
                 }
             }
-
-            g_strfreev(capability);
-            g_strfreev(mimetype);
         }
 
         gst_plugin_feature_list_free(factories);

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list