Bug 169609

Summary: Optionally capture audio in the UIProcess
Product: WebKit Reporter: Jer Noble <jer.noble>
Component: New BugsAssignee: Jer Noble <jer.noble>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, eric.carlson
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 169567, 169591    
Bug Blocks:    
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch for landing
none
Patch for landing
none
Patch for landing
none
Patch for landing
none
Patch for landing
none
Patch for landing
none
Patch for landing none

Jer Noble
Reported 2017-03-14 08:36:30 PDT
Optionally capture audio in the UIProcess
Attachments
Patch (64.20 KB, patch)
2017-03-14 09:01 PDT, Jer Noble
no flags
Patch (64.14 KB, patch)
2017-03-14 14:46 PDT, Jer Noble
no flags
Patch (65.05 KB, patch)
2017-03-14 16:11 PDT, Jer Noble
no flags
Patch (65.13 KB, patch)
2017-03-14 16:50 PDT, Jer Noble
no flags
Patch (71.23 KB, patch)
2017-03-14 17:37 PDT, Jer Noble
no flags
Patch for landing (71.23 KB, patch)
2017-03-15 08:33 PDT, Jer Noble
no flags
Patch for landing (70.64 KB, patch)
2017-03-15 09:27 PDT, Jer Noble
no flags
Patch for landing (69.75 KB, patch)
2017-03-15 10:12 PDT, Jer Noble
no flags
Patch for landing (67.00 KB, patch)
2017-03-15 12:49 PDT, Jer Noble
no flags
Patch for landing (65.87 KB, patch)
2017-03-15 13:32 PDT, Jer Noble
no flags
Patch for landing (65.83 KB, patch)
2017-03-15 13:42 PDT, Jer Noble
no flags
Patch for landing (65.85 KB, patch)
2017-03-15 16:36 PDT, Jer Noble
no flags
Jer Noble
Comment 1 2017-03-14 09:01:16 PDT
Jer Noble
Comment 2 2017-03-14 14:46:12 PDT
Jer Noble
Comment 3 2017-03-14 16:11:47 PDT
Jer Noble
Comment 4 2017-03-14 16:50:52 PDT
Eric Carlson
Comment 5 2017-03-14 16:53:07 PDT
Comment on attachment 304438 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=304438&action=review > Source/WebKit2/ChangeLog:9 > + requested in a WebProcess to be created in the UIProcess in the UIProcess and push its audio Nit: "in the UIProcess in the UIProcess" > Source/WebKit2/UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:87 > + m_numberOfFrames = m_description.sampleRate() * 2; This magic number would benefit a const so it is clear what it means. > Source/WebKit2/UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:98 > + m_manager.process().send(Messages::UserMediaCaptureManager::RingBufferFrameBoundsChanged(m_id, startFrame, endFrame), 0); > + > + m_manager.process().send(Messages::UserMediaCaptureManager::AudioSamplesAvailable(m_id, time, numberOfFrames), 0); Why not pass startFrame and endFrame in the AudioSamplesAvailable message since they are always needed.
Jer Noble
Comment 6 2017-03-14 17:14:57 PDT
(In reply to comment #5) > Comment on attachment 304438 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=304438&action=review > > > Source/WebKit2/ChangeLog:9 > > + requested in a WebProcess to be created in the UIProcess in the UIProcess and push its audio > > Nit: "in the UIProcess in the UIProcess" Whoops. > > Source/WebKit2/UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:87 > > + m_numberOfFrames = m_description.sampleRate() * 2; > > This magic number would benefit a const so it is clear what it means. We use this magic multiplier many places, and everywhere it means "two seconds". But I don't know that the right thing to do would be to make this something like "static const int kTwoSeconds = 2"; adding a comment might be sufficient. WDYT? > > Source/WebKit2/UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:98 > > + m_manager.process().send(Messages::UserMediaCaptureManager::RingBufferFrameBoundsChanged(m_id, startFrame, endFrame), 0); > > + > > + m_manager.process().send(Messages::UserMediaCaptureManager::AudioSamplesAvailable(m_id, time, numberOfFrames), 0); > > Why not pass startFrame and endFrame in the AudioSamplesAvailable message > since they are always needed. Sure.
Eric Carlson
Comment 7 2017-03-14 17:28:48 PDT
(In reply to comment #6) > > We use this magic multiplier many places, and everywhere it means "two > seconds". But I don't know that the right thing to do would be to make this > something like "static const int kTwoSeconds = 2"; adding a comment might be > sufficient. WDYT? > That will work.
Jer Noble
Comment 8 2017-03-14 17:37:27 PDT
WebKit Commit Bot
Comment 9 2017-03-14 17:39:54 PDT
Attachment 304451 [details] did not pass style-queue: ERROR: Source/WTF/wtf/persistence/Encoder.h:104: More than one command on the same line [whitespace/newline] [4] Total errors found: 1 in 31 files If any of these errors are false positives, please file a bug against check-webkit-style.
Alex Christensen
Comment 10 2017-03-14 19:04:50 PDT
Comment on attachment 304451 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=304451&action=review > Source/WTF/wtf/persistence/Encoder.h:81 > + WTF_EXPORT_PRIVATE void encode(unsigned long); Unrelated: why do we use SHA1 in this class?
Alex Christensen
Comment 11 2017-03-14 19:06:35 PDT
Comment on attachment 304451 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=304451&action=review > Source/WebKit2/CMakeLists.txt:662 > + WebProcess/MediaStream/UserMediaCaptureSessionManager.messages.in GTK bot doesn't like this.
Jer Noble
Comment 12 2017-03-14 20:18:06 PDT
(In reply to comment #11) > Comment on attachment 304451 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=304451&action=review > > > Source/WebKit2/CMakeLists.txt:662 > > + WebProcess/MediaStream/UserMediaCaptureSessionManager.messages.in > > GTK bot doesn't like this. Looks like a misspelling: it's from an earlier name for this file. Should be an easy fix.
Eric Carlson
Comment 13 2017-03-15 07:52:29 PDT
Comment on attachment 304451 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=304451&action=review >> Source/WTF/wtf/persistence/Encoder.h:81 >> + WTF_EXPORT_PRIVATE void encode(unsigned long); > > Unrelated: why do we use SHA1 in this class? To generate data checksums.
Jer Noble
Comment 14 2017-03-15 08:33:32 PDT
Created attachment 304502 [details] Patch for landing
Jer Noble
Comment 15 2017-03-15 09:27:40 PDT
Created attachment 304506 [details] Patch for landing
WebKit Commit Bot
Comment 16 2017-03-15 09:29:13 PDT
Attachment 304506 [details] did not pass style-queue: ERROR: Source/WTF/wtf/persistence/Encoder.h:104: More than one command on the same line [whitespace/newline] [4] Total errors found: 1 in 31 files If any of these errors are false positives, please file a bug against check-webkit-style.
Jer Noble
Comment 17 2017-03-15 10:12:39 PDT
Created attachment 304511 [details] Patch for landing
WebKit Commit Bot
Comment 18 2017-03-15 10:33:08 PDT
Attachment 304511 [details] did not pass style-queue: ERROR: Source/WTF/wtf/persistence/Encoder.h:104: More than one command on the same line [whitespace/newline] [4] Total errors found: 1 in 30 files If any of these errors are false positives, please file a bug against check-webkit-style.
Jer Noble
Comment 19 2017-03-15 12:49:24 PDT
Created attachment 304531 [details] Patch for landing
Jer Noble
Comment 20 2017-03-15 13:32:13 PDT
Created attachment 304537 [details] Patch for landing
Jer Noble
Comment 21 2017-03-15 13:42:38 PDT
Created attachment 304539 [details] Patch for landing
Jer Noble
Comment 22 2017-03-15 16:36:56 PDT
Created attachment 304578 [details] Patch for landing
WebKit Commit Bot
Comment 23 2017-03-15 21:10:58 PDT
Comment on attachment 304578 [details] Patch for landing Clearing flags on attachment: 304578 Committed r214027: <http://trac.webkit.org/changeset/214027>
WebKit Commit Bot
Comment 24 2017-03-15 21:11:06 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.