Bug 49557

Summary: Add loadPlatformAudioResource() and decodeAudioFileData() to ChromiumBridge
Product: WebKit Reporter: Chris Rogers <crogers>
Component: New BugsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, commit-queue, dglazkov, eric, peter, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Other   
OS: OS X 10.5   
Attachments:
Description Flags
Patch
none
Patch none

Chris Rogers
Reported 2010-11-15 12:25:15 PST
Add loadPlatformAudioResource() and decodeAudioFileData() to ChromiumBridge
Attachments
Patch (12.21 KB, patch)
2010-11-15 12:48 PST, Chris Rogers
no flags
Patch (12.27 KB, patch)
2010-11-15 14:25 PST, Chris Rogers
no flags
Chris Rogers
Comment 1 2010-11-15 12:48:25 PST
WebKit Review Bot
Comment 2 2010-11-15 13:11:33 PST
Chris Rogers
Comment 3 2010-11-15 14:25:28 PST
Dimitri Glazkov (Google)
Comment 4 2010-11-17 12:37:35 PST
Comment on attachment 73930 [details] Patch ok.
WebKit Commit Bot
Comment 5 2010-11-17 20:57:37 PST
The commit-queue encountered the following flaky tests while processing attachment 73930 [details]: animations/play-state-suspend.html animations/suspend-resume-animation.html Please file bugs against the tests. These tests were authored by cmarrin@apple.com. The commit-queue is continuing to process your patch.
WebKit Commit Bot
Comment 6 2010-11-17 21:37:59 PST
The commit-queue encountered the following flaky tests while processing attachment 73930 [details]: fast/blockflow/vertical-font-fallback.html animations/combo-transform-translate+scale.html Please file bugs against the tests. These tests were authored by cmarrin@apple.com, darin@apple.com, hyatt@apple.com, ojan@chromium.org, and pol@apple.com. The commit-queue is continuing to process your patch.
WebKit Commit Bot
Comment 7 2010-11-17 23:11:29 PST
The commit-queue encountered the following flaky tests while processing attachment 73930 [details]: compositing/iframes/overlapped-nested-iframes.html animations/combo-transform-translate+scale.html Please file bugs against the tests. These tests were authored by cmarrin@apple.com, darin@apple.com, ojan@chromium.org, pol@apple.com, and simon.fraser@apple.com. The commit-queue is continuing to process your patch.
WebKit Commit Bot
Comment 8 2010-11-17 23:29:41 PST
The commit-queue encountered the following flaky tests while processing attachment 73930 [details]: compositing/iframes/overlapped-nested-iframes.html fast/blockflow/vertical-font-fallback.html Please file bugs against the tests. These tests were authored by hyatt@apple.com and simon.fraser@apple.com. The commit-queue is continuing to process your patch.
WebKit Commit Bot
Comment 9 2010-11-18 03:42:49 PST
The commit-queue encountered the following flaky tests while processing attachment 73930 [details]: compositing/iframes/overlapped-nested-iframes.html Please file bugs against the tests. These tests were authored by simon.fraser@apple.com. The commit-queue is continuing to process your patch.
WebKit Commit Bot
Comment 10 2010-11-18 03:55:40 PST
Comment on attachment 73930 [details] Patch Clearing flags on attachment: 73930 Committed r72281: <http://trac.webkit.org/changeset/72281>
WebKit Commit Bot
Comment 11 2010-11-18 03:55:46 PST
All reviewed patches have been landed. Closing bug.
WebKit Review Bot
Comment 12 2010-11-18 04:47:54 PST
http://trac.webkit.org/changeset/72281 might have broken GTK Linux 64-bit Debug
Darin Fisher (:fishd, Google)
Comment 13 2010-11-23 09:04:24 PST
Comment on attachment 73930 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=73930&action=review > WebKit/chromium/public/WebAudioBus.h:46 > + ~WebAudioBus(); so any public method of a WebKit API class that is not inline needs to be decorated with WEBKIT_API. otherwise, it will break the Chromium multi-DLL build if Chromium code tries to call one of these methods. now, stepping back... i don't think you actually intend for Chromium to call the destructor or the initialize method. this suggests that they should be hidden from Chromium, so that Chromium cannot possibly call them. since your goal is to pass data to Chromium in the scope of a decodeAudioFileData call, I suspect that you would be better served defining WebAudioBus as an interface, like WebVideoFrame. then, in chromium/src/, just define a WebAudioBusImpl class that implements the interface and provides methods for initialization and releasing the contained AudioBus object. > WebKit/chromium/public/WebAudioBus.h:63 > + WebAudioBus(const WebAudioBus& d) : m_private(0) { } you also want to implement an assignment operator, and it is not necessary to actually implement this copy constructor since you never intend for anyone to call it. you basically want the equivalent of DISALLOW_COPY_AND_ASSIGN from base/basictypes.h in the Chromium code base. > WebKit/chromium/public/WebKitClient.h:226 > + virtual bool decodeAudioFileData(WebAudioBus* destinationBus, const char* audioFileData, size_t dataSize, double sampleRate) { return false; } since audioFileData is intended to refer to an in-memory audio file, it would be more consistent with API terminology to not call it a file. instead, call it a resource. then, i would suggest naming this method loadAudioResource, which matches up with loadResource. (i don't think it is helpful to include the name "decode" in the function since there is no way to fetch the undecoded form.)
Chris Rogers
Comment 14 2010-11-23 10:32:19 PST
Comment on attachment 73930 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=73930&action=review >> WebKit/chromium/public/WebAudioBus.h:46 >> + ~WebAudioBus(); > > so any public method of a WebKit API class that is not inline needs to be decorated with WEBKIT_API. > otherwise, it will break the Chromium multi-DLL build if Chromium code tries to call one of these > methods. > > now, stepping back... i don't think you actually intend for Chromium to call the destructor or the > initialize method. this suggests that they should be hidden from Chromium, so that Chromium cannot > possibly call them. > > since your goal is to pass data to Chromium in the scope of a decodeAudioFileData call, I suspect > that you would be better served defining WebAudioBus as an interface, like WebVideoFrame. then, > in chromium/src/, just define a WebAudioBusImpl class that implements the interface and provides > methods for initialization and releasing the contained AudioBus object. Actually, the initialize() method is called from within Chromium. This is how Chromium passes the decoded PCM audio data back to WebKit. But, the destructor is not called in Chromium. If you believe that adding the WEBKIT_API prefix to the destructor and initialize() method is not a good solution, then I'll have a look at the WebAudioBusImpl as you suggest.
Note You need to log in before you can comment on or make changes to this bug.