[GStreamer] Add audio/speex MIME type as supported
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 25 Apr 2013 14:52:27 +0000 (14:52 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 25 Apr 2013 14:52:27 +0000 (14:52 +0000)
https://bugs.webkit.org/show_bug.cgi?id=115032

Patch by Adrian Perez de Castro <aperez@igalia.com> on 2013-04-25
Reviewed by Philippe Normand.

Source/WebCore:

GStreamer has support for the Speex codec (http://www.speex.org).
Speex streams may be embedded in a Ogg container, or standalone.
The case of the Ogg container is already covered by the "*/ogg"
MIME types declared as supported by the GStreamer media playing
code, but for standalone streams to work, "audio/speex" has to
be added.

With this, and the needed GStreamer plugin installed, the GTK+
launcher is able to correctly play Speex streams served with
"Content-type: audio/speex".

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

LayoutTests:

Speex (http://www.speex.org) streams can be embedded into Ogg
Ogg containers, so add a check for it in the test case.

* media/media-can-play-ogg-expected.txt:
* media/media-can-play-ogg.html:
* platform/blackberry/media/media-can-play-ogg-expected.txt:
* platform/mac/media/media-can-play-ogg-expected.txt:
* platform/qt-linux/media/media-can-play-ogg-expected.txt:
* platform/win/media/media-can-play-ogg-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@149111 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/media/media-can-play-ogg-expected.txt
LayoutTests/media/media-can-play-ogg.html
LayoutTests/platform/blackberry/media/media-can-play-ogg-expected.txt
LayoutTests/platform/mac/media/media-can-play-ogg-expected.txt [new file with mode: 0644]
LayoutTests/platform/qt-linux/media/media-can-play-ogg-expected.txt
LayoutTests/platform/win/media/media-can-play-ogg-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp

index f90d4b9..c60b622 100644 (file)
@@ -1,3 +1,20 @@
+2013-04-25  Adrian Perez de Castro  <aperez@igalia.com>
+
+        [GStreamer] Add audio/speex MIME type as supported
+        https://bugs.webkit.org/show_bug.cgi?id=115032
+
+        Reviewed by Philippe Normand.
+
+        Speex (http://www.speex.org) streams can be embedded into Ogg
+        Ogg containers, so add a check for it in the test case.
+
+        * media/media-can-play-ogg-expected.txt:
+        * media/media-can-play-ogg.html:
+        * platform/blackberry/media/media-can-play-ogg-expected.txt:
+        * platform/mac/media/media-can-play-ogg-expected.txt:
+        * platform/qt-linux/media/media-can-play-ogg-expected.txt:
+        * platform/win/media/media-can-play-ogg-expected.txt:
+
 2013-04-25  Andreas Kling  <akling@apple.com>
 
         CSS parser: Add error recovery while parsing @-webkit-keyframes key values.
 2013-04-25  Andreas Kling  <akling@apple.com>
 
         CSS parser: Add error recovery while parsing @-webkit-keyframes key values.
index fd7942c..f0f0cf5 100644 (file)
@@ -5,7 +5,8 @@ These tests may be expected to fail if the WebKit port does not support the form
 EXPECTED (video.canPlayType('audio/ogg') == 'maybe') OK
 EXPECTED (video.canPlayType('video/ogg') == 'maybe') OK
 EXPECTED (video.canPlayType('audio/ogg; codecs=vorbis') == 'probably') OK
 EXPECTED (video.canPlayType('audio/ogg') == 'maybe') OK
 EXPECTED (video.canPlayType('video/ogg') == 'maybe') OK
 EXPECTED (video.canPlayType('audio/ogg; codecs=vorbis') == 'probably') OK
-EXPECTED (video.canPlayType('audio/ogg; codecs=opus') == 'probably'), OBSERVED '' FAIL
+EXPECTED (video.canPlayType('audio/ogg; codecs=opus') == 'probably') OK
+EXPECTED (video.canPlayType('audio/ogg; codecs=speex') == 'probably') OK
 EXPECTED (video.canPlayType('video/ogg; codecs=theora') == 'probably') OK
 EXPECTED (video.canPlayType('video/ogg; codecs=theora,vorbis') == 'probably') OK
 END OF TEST
 EXPECTED (video.canPlayType('video/ogg; codecs=theora') == 'probably') OK
 EXPECTED (video.canPlayType('video/ogg; codecs=theora,vorbis') == 'probably') OK
 END OF TEST
index 6f0214a..d4c5880 100644 (file)
@@ -11,6 +11,7 @@
 
                 testExpected("video.canPlayType('audio/ogg; codecs=vorbis')", "probably");
                 testExpected("video.canPlayType('audio/ogg; codecs=opus')", "probably");
 
                 testExpected("video.canPlayType('audio/ogg; codecs=vorbis')", "probably");
                 testExpected("video.canPlayType('audio/ogg; codecs=opus')", "probably");
+                testExpected("video.canPlayType('audio/ogg; codecs=speex')", "probably");
                 testExpected("video.canPlayType('video/ogg; codecs=theora')", "probably");
                 testExpected("video.canPlayType('video/ogg; codecs=theora,vorbis')", "probably");
 
                 testExpected("video.canPlayType('video/ogg; codecs=theora')", "probably");
                 testExpected("video.canPlayType('video/ogg; codecs=theora,vorbis')", "probably");
 
index fd7942c..459d5cd 100644 (file)
@@ -6,6 +6,7 @@ EXPECTED (video.canPlayType('audio/ogg') == 'maybe') OK
 EXPECTED (video.canPlayType('video/ogg') == 'maybe') OK
 EXPECTED (video.canPlayType('audio/ogg; codecs=vorbis') == 'probably') OK
 EXPECTED (video.canPlayType('audio/ogg; codecs=opus') == 'probably'), OBSERVED '' FAIL
 EXPECTED (video.canPlayType('video/ogg') == 'maybe') OK
 EXPECTED (video.canPlayType('audio/ogg; codecs=vorbis') == 'probably') OK
 EXPECTED (video.canPlayType('audio/ogg; codecs=opus') == 'probably'), OBSERVED '' FAIL
+EXPECTED (video.canPlayType('audio/ogg; codecs=speex') == 'probably'), OBSERVED '' FAIL
 EXPECTED (video.canPlayType('video/ogg; codecs=theora') == 'probably') OK
 EXPECTED (video.canPlayType('video/ogg; codecs=theora,vorbis') == 'probably') OK
 END OF TEST
 EXPECTED (video.canPlayType('video/ogg; codecs=theora') == 'probably') OK
 EXPECTED (video.canPlayType('video/ogg; codecs=theora,vorbis') == 'probably') OK
 END OF TEST
diff --git a/LayoutTests/platform/mac/media/media-can-play-ogg-expected.txt b/LayoutTests/platform/mac/media/media-can-play-ogg-expected.txt
new file mode 100644 (file)
index 0000000..459d5cd
--- /dev/null
@@ -0,0 +1,13 @@
+Test HTMLMediaElement canPlayType() method for ogg media containers.
+
+These tests may be expected to fail if the WebKit port does not support the format.
+
+EXPECTED (video.canPlayType('audio/ogg') == 'maybe') OK
+EXPECTED (video.canPlayType('video/ogg') == 'maybe') OK
+EXPECTED (video.canPlayType('audio/ogg; codecs=vorbis') == 'probably') OK
+EXPECTED (video.canPlayType('audio/ogg; codecs=opus') == 'probably'), OBSERVED '' FAIL
+EXPECTED (video.canPlayType('audio/ogg; codecs=speex') == 'probably'), OBSERVED '' FAIL
+EXPECTED (video.canPlayType('video/ogg; codecs=theora') == 'probably') OK
+EXPECTED (video.canPlayType('video/ogg; codecs=theora,vorbis') == 'probably') OK
+END OF TEST
+
index fd7942c..d4c9aae 100644 (file)
@@ -6,6 +6,7 @@ EXPECTED (video.canPlayType('audio/ogg') == 'maybe') OK
 EXPECTED (video.canPlayType('video/ogg') == 'maybe') OK
 EXPECTED (video.canPlayType('audio/ogg; codecs=vorbis') == 'probably') OK
 EXPECTED (video.canPlayType('audio/ogg; codecs=opus') == 'probably'), OBSERVED '' FAIL
 EXPECTED (video.canPlayType('video/ogg') == 'maybe') OK
 EXPECTED (video.canPlayType('audio/ogg; codecs=vorbis') == 'probably') OK
 EXPECTED (video.canPlayType('audio/ogg; codecs=opus') == 'probably'), OBSERVED '' FAIL
+EXPECTED (video.canPlayType('audio/ogg; codecs=speex') == 'probably') OK
 EXPECTED (video.canPlayType('video/ogg; codecs=theora') == 'probably') OK
 EXPECTED (video.canPlayType('video/ogg; codecs=theora,vorbis') == 'probably') OK
 END OF TEST
 EXPECTED (video.canPlayType('video/ogg; codecs=theora') == 'probably') OK
 EXPECTED (video.canPlayType('video/ogg; codecs=theora,vorbis') == 'probably') OK
 END OF TEST
index fd7942c..459d5cd 100644 (file)
@@ -6,6 +6,7 @@ EXPECTED (video.canPlayType('audio/ogg') == 'maybe') OK
 EXPECTED (video.canPlayType('video/ogg') == 'maybe') OK
 EXPECTED (video.canPlayType('audio/ogg; codecs=vorbis') == 'probably') OK
 EXPECTED (video.canPlayType('audio/ogg; codecs=opus') == 'probably'), OBSERVED '' FAIL
 EXPECTED (video.canPlayType('video/ogg') == 'maybe') OK
 EXPECTED (video.canPlayType('audio/ogg; codecs=vorbis') == 'probably') OK
 EXPECTED (video.canPlayType('audio/ogg; codecs=opus') == 'probably'), OBSERVED '' FAIL
+EXPECTED (video.canPlayType('audio/ogg; codecs=speex') == 'probably'), OBSERVED '' FAIL
 EXPECTED (video.canPlayType('video/ogg; codecs=theora') == 'probably') OK
 EXPECTED (video.canPlayType('video/ogg; codecs=theora,vorbis') == 'probably') OK
 END OF TEST
 EXPECTED (video.canPlayType('video/ogg; codecs=theora') == 'probably') OK
 EXPECTED (video.canPlayType('video/ogg; codecs=theora,vorbis') == 'probably') OK
 END OF TEST
index b967b65..0d82429 100644 (file)
@@ -1,3 +1,23 @@
+2013-04-25  Adrian Perez de Castro  <aperez@igalia.com>
+
+        [GStreamer] Add audio/speex MIME type as supported
+        https://bugs.webkit.org/show_bug.cgi?id=115032
+
+        Reviewed by Philippe Normand.
+
+        GStreamer has support for the Speex codec (http://www.speex.org).
+        Speex streams may be embedded in a Ogg container, or standalone.
+        The case of the Ogg container is already covered by the "*/ogg"
+        MIME types declared as supported by the GStreamer media playing
+        code, but for standalone streams to work, "audio/speex" has to
+        be added.
+
+        With this, and the needed GStreamer plugin installed, the GTK+
+        launcher is able to correctly play Speex streams served with
+        "Content-type: audio/speex".
+
+        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
+
 2013-04-25  Andreas Kling  <akling@apple.com>
 
         Add FINAL decorators to the InlineBox class hierarchy.
 2013-04-25  Andreas Kling  <akling@apple.com>
 
         Add FINAL decorators to the InlineBox class hierarchy.
index 940ff85..7076ae6 100644 (file)
@@ -1435,6 +1435,7 @@ static HashSet<String> mimeTypeCache()
         "audio/opus",
         "audio/qcelp",
         "audio/riff-midi",
         "audio/opus",
         "audio/qcelp",
         "audio/riff-midi",
+        "audio/speex",
         "audio/wav",
         "audio/webm",
         "audio/x-ac3",
         "audio/wav",
         "audio/webm",
         "audio/x-ac3",