Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(388)

Issue 8574029: Microphone support for Pepper Flash. (Closed)

Created:
9 years, 1 month ago by viettrungluu
Modified:
9 years, 1 month ago
CC:
chromium-reviews, jam, yzshen+watch_chromium.org, dpranke-watch+content_chromium.org, joi+watch-content_chromium.org, darin-cc_chromium.org, piman+watch_chromium.org, ihf+watch_chromium.org, brettw, ilja
Visibility:
Public.

Description

Microphone support for Pepper Flash. [Committing for pbrophy@adobe.com. Original review: http://codereview.chromium.org/8138008/ .] This change supports audio capture from the microphone and supplies the data through a Pepper interface. Its enumeration is limited to the default audio device that uses mono 44.1kHz. TBR=tony@chromium.org Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=110587

Patch Set 1 #

Patch Set 2 : style (mostly whitespace) fixes #

Patch Set 3 : refactor, part 1 #

Total comments: 2

Patch Set 4 : MessageLoop -> base::MessageLoopProxy #

Total comments: 28

Patch Set 5 : rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1966 lines, -107 lines) Patch
M content/renderer/pepper_plugin_delegate_impl.h View 1 2 3 4 1 chunk +5 lines, -1 line 0 comments Download
M content/renderer/pepper_plugin_delegate_impl.cc View 1 2 3 8 chunks +192 lines, -9 lines 0 comments Download
A ppapi/api/dev/ppb_audio_input_dev.idl View 1 chunk +94 lines, -0 lines 0 comments Download
A ppapi/api/trusted/ppb_audio_input_trusted_dev.idl View 1 1 chunk +53 lines, -0 lines 0 comments Download
A ppapi/c/dev/ppb_audio_input_dev.h View 1 chunk +112 lines, -0 lines 0 comments Download
A ppapi/c/trusted/ppb_audio_input_trusted_dev.h View 1 chunk +69 lines, -0 lines 0 comments Download
A ppapi/cpp/dev/audio_input_dev.h View 1 1 chunk +48 lines, -0 lines 0 comments Download
A ppapi/cpp/dev/audio_input_dev.cc View 1 1 chunk +44 lines, -0 lines 0 comments Download
M ppapi/ppapi_cpp.gypi View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M ppapi/ppapi_proxy.gypi View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M ppapi/ppapi_shared.gypi View 1 2 3 4 2 chunks +5 lines, -0 lines 0 comments Download
M ppapi/proxy/interface_list.cc View 1 2 3 4 2 chunks +2 lines, -0 lines 0 comments Download
M ppapi/proxy/ppapi_messages.h View 1 2 3 4 2 chunks +18 lines, -0 lines 0 comments Download
A ppapi/proxy/ppb_audio_input_proxy.h View 1 1 chunk +86 lines, -0 lines 0 comments Download
A ppapi/proxy/ppb_audio_input_proxy.cc View 1 1 chunk +334 lines, -0 lines 0 comments Download
M ppapi/proxy/resource_creation_proxy.h View 1 2 3 4 2 chunks +8 lines, -0 lines 0 comments Download
M ppapi/proxy/resource_creation_proxy.cc View 1 2 3 4 2 chunks +17 lines, -0 lines 0 comments Download
M ppapi/shared_impl/api_id.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
A ppapi/shared_impl/audio_input_impl.h View 1 1 chunk +88 lines, -0 lines 0 comments Download
A ppapi/shared_impl/audio_input_impl.cc View 1 1 chunk +94 lines, -0 lines 0 comments Download
M ppapi/shared_impl/resource.h View 1 2 3 4 1 chunk +3 lines, -1 line 0 comments Download
M ppapi/thunk/interfaces_ppb_public_dev.h View 2 chunks +3 lines, -0 lines 0 comments Download
A ppapi/thunk/ppb_audio_input_api.h View 1 1 chunk +33 lines, -0 lines 0 comments Download
A ppapi/thunk/ppb_audio_input_thunk.cc View 1 1 chunk +74 lines, -0 lines 0 comments Download
A ppapi/thunk/ppb_audio_input_trusted_thunk.cc View 1 1 chunk +67 lines, -0 lines 0 comments Download
M ppapi/thunk/resource_creation_api.h View 1 2 3 4 2 chunks +8 lines, -1 line 0 comments Download
M ppapi/thunk/thunk.h View 1 2 3 4 2 chunks +3 lines, -0 lines 0 comments Download
M webkit/glue/webkit_glue.gypi View 1 2 3 4 2 chunks +4 lines, -0 lines 0 comments Download
A webkit/plugins/ppapi/audio_helper.h View 1 2 1 chunk +67 lines, -0 lines 0 comments Download
A webkit/plugins/ppapi/audio_helper.cc View 1 2 1 chunk +95 lines, -0 lines 0 comments Download
M webkit/plugins/ppapi/mock_plugin_delegate.h View 1 2 1 chunk +5 lines, -1 line 0 comments Download
M webkit/plugins/ppapi/mock_plugin_delegate.cc View 1 2 1 chunk +8 lines, -1 line 0 comments Download
M webkit/plugins/ppapi/plugin_delegate.h View 1 2 3 4 3 chunks +38 lines, -12 lines 0 comments Download
M webkit/plugins/ppapi/plugin_module.cc View 1 2 3 4 3 chunks +4 lines, -0 lines 0 comments Download
M webkit/plugins/ppapi/ppb_audio_impl.h View 1 2 4 chunks +6 lines, -19 lines 0 comments Download
M webkit/plugins/ppapi/ppb_audio_impl.cc View 1 2 3 chunks +9 lines, -61 lines 0 comments Download
A webkit/plugins/ppapi/ppb_audio_input_impl.h View 1 2 1 chunk +83 lines, -0 lines 0 comments Download
A webkit/plugins/ppapi/ppb_audio_input_impl.cc View 1 2 1 chunk +160 lines, -0 lines 0 comments Download
M webkit/plugins/ppapi/resource_creation_impl.h View 1 2 3 4 1 chunk +7 lines, -1 line 0 comments Download
M webkit/plugins/ppapi/resource_creation_impl.cc View 1 2 3 4 2 chunks +15 lines, -0 lines 0 comments Download

Messages

Total messages: 15 (0 generated)
viettrungluu
Peter, please have a look at the (small) changes I've made. jam, dmichael: I'll need ...
9 years, 1 month ago (2011-11-16 19:31:47 UTC) #1
jam
content lgtm http://codereview.chromium.org/8574029/diff/8001/content/renderer/pepper_plugin_delegate_impl.cc File content/renderer/pepper_plugin_delegate_impl.cc (right): http://codereview.chromium.org/8574029/diff/8001/content/renderer/pepper_plugin_delegate_impl.cc#newcode398 content/renderer/pepper_plugin_delegate_impl.cc:398: MessageLoop* main_message_loop_; nit: better to use MessageLoopProxy
9 years, 1 month ago (2011-11-16 20:49:52 UTC) #2
viettrungluu
Thanks, John. Dave -- friendly ping? http://codereview.chromium.org/8574029/diff/8001/content/renderer/pepper_plugin_delegate_impl.cc File content/renderer/pepper_plugin_delegate_impl.cc (right): http://codereview.chromium.org/8574029/diff/8001/content/renderer/pepper_plugin_delegate_impl.cc#newcode398 content/renderer/pepper_plugin_delegate_impl.cc:398: MessageLoop* main_message_loop_; On ...
9 years, 1 month ago (2011-11-16 23:51:17 UTC) #3
dmichael (off chromium)
Mostly nits so far... I'll finish reviewing tomorrow. http://codereview.chromium.org/8574029/diff/18001/content/renderer/pepper_plugin_delegate_impl.cc File content/renderer/pepper_plugin_delegate_impl.cc (right): http://codereview.chromium.org/8574029/diff/18001/content/renderer/pepper_plugin_delegate_impl.cc#newcode367 content/renderer/pepper_plugin_delegate_impl.cc:367: virtual ...
9 years, 1 month ago (2011-11-17 04:05:21 UTC) #4
ilja
http://codereview.chromium.org/8574029/diff/18001/ppapi/api/dev/ppb_audio_input_dev.idl File ppapi/api/dev/ppb_audio_input_dev.idl (right): http://codereview.chromium.org/8574029/diff/18001/ppapi/api/dev/ppb_audio_input_dev.idl#newcode28 ppapi/api/dev/ppb_audio_input_dev.idl:28: [version=0.1, macro="PPB_AUDIO_INPUT_DEV_INTERFACE"] On 2011/11/17 04:05:21, dmichael wrote: > nit: ...
9 years, 1 month ago (2011-11-17 04:55:29 UTC) #5
dmichael (off chromium)
Mostly nits. Looks pretty good overall, I guess that's because it already had a thorough ...
9 years, 1 month ago (2011-11-17 18:24:04 UTC) #6
dmichael (off chromium)
LGTM I think we should do some style cleanup and add a test in a ...
9 years, 1 month ago (2011-11-17 19:06:40 UTC) #7
viettrungluu
+tony for OWNERS review of webkit_glue.gypi.
9 years, 1 month ago (2011-11-17 22:52:08 UTC) #8
viettrungluu
+tony for OWNERS review of webkit_glue.gypi.
9 years, 1 month ago (2011-11-17 22:52:08 UTC) #9
tony
webkit/glue lgtm.
9 years, 1 month ago (2011-11-18 00:26:15 UTC) #10
James Cook
This appears to have broken Win builder (dbg)(shared).
9 years, 1 month ago (2011-11-18 05:22:39 UTC) #11
James Cook
On 2011/11/18 05:22:39, James Cook (Chromium) wrote: > This appears to have broken Win builder ...
9 years, 1 month ago (2011-11-18 05:34:19 UTC) #12
seriesrover
> add a test in a separate CL Agreed. I'm working on this atm.
9 years, 1 month ago (2011-11-18 18:59:42 UTC) #13
viettrungluu
Nits mentioned here fixed in this CL: http://codereview.chromium.org/8489002 (or deferred, in the case of .idl ...
9 years, 1 month ago (2011-11-21 20:55:21 UTC) #14
viettrungluu
9 years, 1 month ago (2011-11-21 21:26:13 UTC) #15
Oops, stupid "Reply" doesn't send draft comments; sending for completeness.

http://codereview.chromium.org/8574029/diff/18001/ppapi/api/dev/ppb_audio_inp...
File ppapi/api/dev/ppb_audio_input_dev.idl (right):

http://codereview.chromium.org/8574029/diff/18001/ppapi/api/dev/ppb_audio_inp...
ppapi/api/dev/ppb_audio_input_dev.idl:50: [in] PP_Resource audio_input);
On 2011/11/17 04:05:21, dmichael wrote:
> nit: It seems like this could all be 1 line (same below)

This is currently the style consistently in the .idl files. If we change it, we
should go ahead and change all instances, but I'll hold off on it for now.

http://codereview.chromium.org/8574029/diff/18001/ppapi/api/trusted/ppb_audio...
File ppapi/api/trusted/ppb_audio_input_trusted_dev.idl (right):

http://codereview.chromium.org/8574029/diff/18001/ppapi/api/trusted/ppb_audio...
ppapi/api/trusted/ppb_audio_input_trusted_dev.idl:16: * resource returned is an
Audio input esource; most of the PPB_Audio
On 2011/11/17 04:05:21, dmichael wrote:
> nit: esource -> resource

Done.

http://codereview.chromium.org/8574029/diff/18001/ppapi/api/trusted/ppb_audio...
ppapi/api/trusted/ppb_audio_input_trusted_dev.idl:23: [in] PP_Instance
instance);
On 2011/11/17 04:05:21, dmichael wrote:
> Why do we need a separate 'Create' function? Can't we use the same
> PPB_AudioInput_Dev.Create function, and allow passing a PPB_AudioInput_Dev
> resource to the functions below?

I'd have to check whether anything special is done before |Open()| is called,
but in any case this is consistent with the PPB_AudioTrusted interface (FWIW).

http://codereview.chromium.org/8574029/diff/18001/ppapi/api/trusted/ppb_audio...
ppapi/api/trusted/ppb_audio_input_trusted_dev.idl:35: [in] PP_CompletionCallback
create_callback);
On 2011/11/17 04:05:21, dmichael wrote:
> nit: it seems like the params could align right after the 'Open(', with the
> first param on the same line as Open. (Same for functions below)

Also currently the style in all the .idl files.

http://codereview.chromium.org/8574029/diff/18001/webkit/plugins/ppapi/ppb_au...
File webkit/plugins/ppapi/ppb_audio_input_impl.cc (right):

http://codereview.chromium.org/8574029/diff/18001/webkit/plugins/ppapi/ppb_au...
webkit/plugins/ppapi/ppb_audio_input_impl.cc:52: audio_input(new
PPB_AudioInput_Impl(instance));
On 2011/11/17 18:24:04, dmichael wrote:
> nit: I'm used to seeing 4 space indent here ^^^

Done.

http://codereview.chromium.org/8574029/diff/18001/webkit/plugins/ppapi/ppb_au...
File webkit/plugins/ppapi/ppb_audio_input_impl.h (right):

http://codereview.chromium.org/8574029/diff/18001/webkit/plugins/ppapi/ppb_au...
webkit/plugins/ppapi/ppb_audio_input_impl.h:47: // Initialization function for
non-trusted init.
On 2011/11/17 18:24:04, dmichael wrote:
> This seems to disagree with the comments on the constructor above. Should it
say
> 'trusted' instead?

Done.

http://codereview.chromium.org/8574029/diff/18001/webkit/plugins/ppapi/ppb_au...
webkit/plugins/ppapi/ppb_audio_input_impl.h:49: PPB_AudioInput_Callback
callback, void* user_data);
On 2011/11/17 18:24:04, dmichael wrote:
> nit: this is an unusual way to break the line & indent. It should probably be
> either:
> (a) On one line, if it can fit (guess it can't)
> (b) each param on its own line, indented to line up:
> bool Init(PP_Resource config_id,
>           PPB_AudioInput_Callback callback,
>           void* user_data);
> (c) break the line at the first param that *won't* fit, and indent to the same
> level:
> bool Init(PP_Resource config_id, PPB_AudioInput_Callback callback,
>           void* user_data);

Done.

Also, note that (c) is at least moderately frowned upon, AFAIK (with (b) being
preferred).

Powered by Google App Engine
This is Rietveld 408576698