[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

philn at webkit.org philn at webkit.org
Wed Dec 22 12:55:59 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 2932b70141badbe9941283a6da1534b3052b7800
Author: philn at webkit.org <philn at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Sep 2 07:07:27 2010 +0000

    2010-08-31  Philippe Normand  <pnormand at igalia.com>
    
            Reviewed by Eric Carlson.
    
            [GStreamer] can't play m4v videos
            https://bugs.webkit.org/show_bug.cgi?id=44951
    
            Fixed registration of the m4v media type in the hashtable used by
            the player to report if it supports a given media type.
    
            Test: media/media-can-play-mpeg4-video.html
    
            * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
            (WebCore::mimeTypeCache):
    
    LayoutTests:
    
            Reviewed by Eric Carlson.
    
            [GStreamer] can't play m4v videos
            https://bugs.webkit.org/show_bug.cgi?id=44951
    
            Test similar to media-can-play-mpeg-audio.html but for videos. For
            now only m4v and mp4 types are tested.
    
            * media/media-can-play-mpeg4-video-expected.txt: Added.
            * media/media-can-play-mpeg4-video.html: Added.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@66646 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 2fbb1c1..ccdc01d 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,16 @@
+2010-08-31  Philippe Normand  <pnormand at igalia.com>
+
+        Reviewed by Eric Carlson.
+
+        [GStreamer] can't play m4v videos
+        https://bugs.webkit.org/show_bug.cgi?id=44951
+
+        Test similar to media-can-play-mpeg-audio.html but for videos. For
+        now only m4v and mp4 types are tested.
+
+        * media/media-can-play-mpeg4-video-expected.txt: Added.
+        * media/media-can-play-mpeg4-video.html: Added.
+
 2010-09-01  Mihai Parparita  <mihaip at chromium.org>
 
         Reviewed by Chris Marrin.
diff --git a/LayoutTests/media/media-can-play-mpeg4-video-expected.txt b/LayoutTests/media/media-can-play-mpeg4-video-expected.txt
new file mode 100644
index 0000000..5bd0861
--- /dev/null
+++ b/LayoutTests/media/media-can-play-mpeg4-video-expected.txt
@@ -0,0 +1,6 @@
+Test HTMLMediaElement canPlayType() method with multiple video mpeg4 MIME types.
+
+EXPECTED (video.canPlayType('video/x-m4v') == 'maybe') OK
+EXPECTED (video.canPlayType('video/mp4') == 'maybe') OK
+END OF TEST
+
diff --git a/LayoutTests/media/media-can-play-mpeg4-video.html b/LayoutTests/media/media-can-play-mpeg4-video.html
new file mode 100644
index 0000000..7a9e67f
--- /dev/null
+++ b/LayoutTests/media/media-can-play-mpeg4-video.html
@@ -0,0 +1,28 @@
+<html>
+    <head>
+        <style>
+            video { background-color: yellow; width: 320px; height: 240px;}
+        </style>
+        <script src=video-test.js></script>
+        <script>
+            function start()
+            {
+                video = mediaElement = document.getElementsByTagName('video')[0];
+
+                testExpected("video.canPlayType('video/x-m4v')", "maybe");
+                testExpected("video.canPlayType('video/mp4')", "maybe");
+
+                endTest();
+            }
+        </script>
+
+    </head>
+    <body onload="start()">
+
+        <video controls ></video>
+
+        <p>Test HTMLMediaElement <em>canPlayType()</em> method with
+        multiple video mpeg4 MIME types.</p>
+
+    </body>
+</html>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 186fafe..34d72b1 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,18 @@
+2010-08-31  Philippe Normand  <pnormand at igalia.com>
+
+        Reviewed by Eric Carlson.
+
+        [GStreamer] can't play m4v videos
+        https://bugs.webkit.org/show_bug.cgi?id=44951
+
+        Fixed registration of the m4v media type in the hashtable used by
+        the player to report if it supports a given media type.
+
+        Test: media/media-can-play-mpeg4-video.html
+
+        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
+        (WebCore::mimeTypeCache):
+
 2010-09-01  Philippe Normand  <pnormand at igalia.com>
 
         Reviewed by Martin Robinson.
diff --git a/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp b/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
index d9d2d97..5628eb3 100644
--- a/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
+++ b/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
@@ -1239,6 +1239,7 @@ static HashSet<String> mimeTypeCache()
         for (GList* iterator = factories; iterator; iterator = iterator->next) {
             GstTypeFindFactory* factory = GST_TYPE_FIND_FACTORY(iterator->data);
             GstCaps* caps = gst_type_find_factory_get_caps(factory);
+            gchar** extensions;
 
             if (!caps)
                 continue;
@@ -1316,6 +1317,16 @@ static HashSet<String> mimeTypeCache()
 
                     g_strfreev(mimetype);
                 }
+
+                // As a last resort try some special cases depending
+                // on the file extensions registered with the typefind
+                // factory.
+                if (!cached && (extensions = gst_type_find_factory_get_extensions(factory))) {
+                    for (int index = 0; extensions[index]; index++) {
+                        if (g_str_equal(extensions[index], "m4v"))
+                            cache.add(String("video/x-m4v"));
+                    }
+                }
             }
         }
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list