Bug 31990

Summary: [GTK] Recognize oga as audio/ogg
Product: WebKit Reporter: Philippe Normand <pnormand>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, commit-queue, eric, gustavo, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Linux   
Attachments:
Description Flags
advertize audio/ogg correctly
none
advertize audio/ogg correctly
gustavo: review-
advertize audio/ogg correctly and refactored mime-type cache building
none
new test for ogg containers
none
advertize audio/ogg correctly and refactored mime-type cache building
none
advertize audio/ogg correctly and refactored mime-type cache building gustavo: review+, commit-queue: commit-queue-

Philippe Normand
Reported 2009-11-30 11:54:42 PST
GStreamer advertizes oga files as audio/x-vorbis. Our player should handle this case and replace audio/x-vorbis with audio/ogg where appropriate.
Attachments
advertize audio/ogg correctly (1.69 KB, patch)
2009-11-30 11:58 PST, Philippe Normand
no flags
advertize audio/ogg correctly (1.69 KB, patch)
2009-12-01 00:25 PST, Philippe Normand
gustavo: review-
advertize audio/ogg correctly and refactored mime-type cache building (6.95 KB, patch)
2009-12-03 06:26 PST, Philippe Normand
no flags
new test for ogg containers (6.32 KB, patch)
2009-12-03 06:26 PST, Philippe Normand
no flags
advertize audio/ogg correctly and refactored mime-type cache building (13.27 KB, patch)
2009-12-03 07:11 PST, Philippe Normand
no flags
advertize audio/ogg correctly and refactored mime-type cache building (13.35 KB, patch)
2009-12-03 08:57 PST, Philippe Normand
gustavo: review+
commit-queue: commit-queue-
Philippe Normand
Comment 1 2009-11-30 11:58:05 PST
Created attachment 44034 [details] advertize audio/ogg correctly
Adam Barth
Comment 2 2009-11-30 12:53:02 PST
style-queue ran check-webkit-style on attachment 44034 [details] without any errors.
Eric Seidel (no email)
Comment 3 2009-11-30 21:45:14 PST
The patch looks for "video/x-vorbis" instead of autio/x-vorbis. Was that intentional? Is the original bug comment simply wrong? I'm confused.
Philippe Normand
Comment 4 2009-12-01 00:00:15 PST
(In reply to comment #3) > The patch looks for "video/x-vorbis" instead of autio/x-vorbis. Was that > intentional? Is the original bug comment simply wrong? I'm confused. Sorry, indeed the patch is wrong, will attach a new version.
Philippe Normand
Comment 5 2009-12-01 00:25:06 PST
Created attachment 44059 [details] advertize audio/ogg correctly
WebKit Review Bot
Comment 6 2009-12-01 00:28:19 PST
style-queue ran check-webkit-style on attachment 44059 [details] without any errors.
Eric Seidel (no email)
Comment 7 2009-12-01 07:10:47 PST
How do we test this and how did you test this? How do we know that we aren't missing other mappings here? Should we assert in some way that we've mapped all of these capabilities to their web equivalents, or should that not be necessary?
Philippe Normand
Comment 8 2009-12-01 10:18:44 PST
(In reply to comment #7) > How do we test this and how did you test this? How do we know that we aren't > missing other mappings here? Should we assert in some way that we've mapped > all of these capabilities to their web equivalents, or should that not be > necessary? Well I can update media/video-can-play-type.html and add checks for audio/ogg and video/ogg but I'm afraid this would fail on mac for instance. Generally this depends on the platform and if codecs are installed for the given mime-type, it's not a trivial scenario. So I'm not sure what to do exactly :(
Gustavo Noronha (kov)
Comment 9 2009-12-02 10:15:06 PST
Comment on attachment 44059 [details] advertize audio/ogg correctly (In reply to comment #8) > (In reply to comment #7) > Well I can update media/video-can-play-type.html and add checks for audio/ogg > and video/ogg but I'm afraid this would fail on mac for instance. Generally > this depends on the platform and if codecs are installed for the given > mime-type, it's not a trivial scenario. I have a number of recomendations regarding this: First of all, I think we should refactor this code following this recommendation: Nov 05 14:32:29 <slomo> kov: get the GstStructure(s) from them, use the gst_structure_* API :) Perhaps you want to write that patch? As for how to test, I would recommend adding a separate test similar to media/video-can-play-type.html, and add it to the Skipped file for all platforms that are not supposed to pass it right now. I'll say r- for now.
Gustavo Noronha (kov)
Comment 10 2009-12-02 10:16:21 PST
(In reply to comment #9) > Nov 05 14:32:29 <slomo> kov: get the GstStructure(s) from them, use the > gst_structure_* API :) Just to make it clear, this was related to the fact that the current code parses the caps using string manipulation. I didn't know we had a smarter way of doing it back then. Manipulating GstStructure objects should be saner.
Philippe Normand
Comment 11 2009-12-03 06:26:36 PST
Created attachment 44236 [details] advertize audio/ogg correctly and refactored mime-type cache building
Philippe Normand
Comment 12 2009-12-03 06:26:50 PST
Created attachment 44237 [details] new test for ogg containers
WebKit Review Bot
Comment 13 2009-12-03 06:28:10 PST
style-queue ran check-webkit-style on attachment 44236 [details] without any errors.
Philippe Normand
Comment 14 2009-12-03 07:11:18 PST
Created attachment 44240 [details] advertize audio/ogg correctly and refactored mime-type cache building
WebKit Review Bot
Comment 15 2009-12-03 07:14:55 PST
style-queue ran check-webkit-style on attachment 44240 [details] without any errors.
Philippe Normand
Comment 16 2009-12-03 08:57:49 PST
Created attachment 44246 [details] advertize audio/ogg correctly and refactored mime-type cache building explicitely add audio/mpeg in the cache as suggested by Gustavo.
WebKit Review Bot
Comment 17 2009-12-03 08:58:16 PST
style-queue ran check-webkit-style on attachment 44246 [details] without any errors.
Gustavo Noronha (kov)
Comment 18 2009-12-03 09:03:42 PST
Comment on attachment 44246 [details] advertize audio/ogg correctly and refactored mime-type cache building OK, LGTM, thanks!
WebKit Commit Bot
Comment 19 2009-12-03 13:30:18 PST
Comment on attachment 44246 [details] advertize audio/ogg correctly and refactored mime-type cache building Rejecting patch 44246 from commit-queue. Failed to run "['WebKitTools/Scripts/run-webkit-tests', '--no-launch-safari', '--quiet', '--exit-after-n-failures=1']" exit_code: 1 Running build-dumprendertree Running tests from /Users/eseidel/Projects/CommitQueue/LayoutTests Testing 11718 test cases. websocket/tests/simple.html -> failed Exiting early after 1 failures. 11713 tests run. 371.98s total testing time 11712 test cases (99%) succeeded 1 test case (<1%) had incorrect layout 6 test cases (<1%) had stderr output
Gustavo Noronha (kov)
Comment 20 2009-12-03 13:35:27 PST
Comment on attachment 44246 [details] advertize audio/ogg correctly and refactored mime-type cache building Failure not related to the patch/test, so I'm setting cq+ again.
WebKit Commit Bot
Comment 21 2009-12-03 13:37:59 PST
Comment on attachment 44246 [details] advertize audio/ogg correctly and refactored mime-type cache building Rejecting patch 44246 from commit-queue. Failed to run "['/Users/eseidel/Projects/CommitQueue/WebKitTools/Scripts/svn-apply', '--reviewer', 'Gustavo Noronha Silva', '--force']" exit_code: 1 Last 500 characters of output: kipped patching file LayoutTests/platform/mac/Skipped patching file LayoutTests/platform/qt-mac/Skipped patching file LayoutTests/platform/qt-win/Skipped patching file LayoutTests/platform/qt/Skipped patching file LayoutTests/platform/win/Skipped Hunk #1 FAILED at 722. 1 out of 1 hunk FAILED -- saving rejects to file LayoutTests/platform/win/Skipped.rej patching file WebCore/ChangeLog Hunk #1 succeeded at 1 with fuzz 3. patching file WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp
Eric Seidel (no email)
Comment 22 2009-12-03 13:45:10 PST
I'm concerned about the bogus websocket failure. I'll investigate.
Eric Seidel (no email)
Comment 23 2009-12-03 15:09:42 PST
I believe the bogus websocket failure was just bug 30098.
Gustavo Noronha (kov)
Comment 24 2009-12-05 17:50:43 PST
Landed as r51734.
Alexey Proskuryakov
Comment 25 2009-12-07 11:00:17 PST
The test wasn't landed in r51734.
Philippe Normand
Comment 26 2009-12-08 07:15:17 PST
(In reply to comment #25) > The test wasn't landed in r51734. Gustavo, can you commit the html test file please? It is in the patch you reviewed, thanks!
Gustavo Noronha (kov)
Comment 27 2009-12-09 05:54:06 PST
Just saw the replies on the bug now. I had forgotten to add the files, but ap pinged me on IRC, so I landed them, sorry for the trouble =(.
Note You need to log in before you can comment on or make changes to this bug.