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

Issue 526113002: AudioSharedBuffer (Closed)

Created:
6 years, 3 months ago by burnik
Modified:
6 years, 2 months ago
CC:
chromium-reviews, feature-media-reviews_chromium.org, no longer working on chromium
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

A simple buffer struct for synchronizing audio buses on separate processes without needing to block. So far, |AudioInputBuffer|'s |AudioInputBufferParameters| are used for such a purpose. This struct would potentially introduce more reusability and make more sense to what's actually being done for synchronization. Example use case: ================= Delivering audio data from renderer to browser using |SyncSocket| and |SharedMemory| without blocking the audio capture thread on the renderer. 1. Renderer reads the |buffer_index| from shared memory and compares to local counter. If matched, continue, otherwise try to recover (just store to FIFO) or raise an error event. 2. Renderer gets audio data on the audio capture thread, stores it to a FIFO and releases it to the output bus on the shared memory. Signals the client (browser) the data is ready via |SyncSocket::Send(...)| and increments local buffer counter. 3. Browser receives on SyncSocket, consumes the shared audio bus and increments the |buffer_index| by 1 in shared memory. Both counters matching indicate everything is in sync, with additional counting feature. Blocking is done only on the separate browser thread. Out of sync is detected by mismatched counters. ---

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+7 lines, -0 lines) Patch
M media/audio/audio_parameters.h View 1 chunk +7 lines, -0 lines 0 comments Download

Messages

Total messages: 17 (2 generated)
burnik
Please take a look.
6 years, 3 months ago (2014-09-01 14:20:59 UTC) #2
no longer working on chromium
On 2014/09/01 14:20:59, burnik wrote: > Please take a look. I am going to defer ...
6 years, 3 months ago (2014-09-01 14:38:53 UTC) #3
DaleCurtis
I don't follow what problem this is solving? What do you mean by blocking the ...
6 years, 3 months ago (2014-09-03 21:53:23 UTC) #5
burnik
To answer about blocking: The point is that if we call SyncSocket's |Receive(...)| on the ...
6 years, 3 months ago (2014-09-04 08:46:59 UTC) #6
DaleCurtis
It only blocks if there's nothing to do though right? If it blocks there's no ...
6 years, 3 months ago (2014-09-04 18:14:58 UTC) #7
burnik
On 2014/09/04 18:14:58, DaleCurtis wrote: > It only blocks if there's nothing to do though ...
6 years, 3 months ago (2014-09-04 18:42:52 UTC) #8
DaleCurtis
I must be missing something fundamental about what you're trying to do... As I understand ...
6 years, 3 months ago (2014-09-04 19:24:42 UTC) #9
burnik
On 2014/09/04 19:24:42, DaleCurtis wrote: > I must be missing something fundamental about what you're ...
6 years, 3 months ago (2014-09-04 20:05:04 UTC) #10
tommi (sloooow) - chröme
(caveat: I haven't fully grokked everything on this thread yet) This scheme sounds pretty fragile ...
6 years, 3 months ago (2014-09-04 20:17:21 UTC) #11
DaleCurtis
On 2014/09/04 20:05:04, burnik wrote: > On 2014/09/04 19:24:42, DaleCurtis wrote: > > I must ...
6 years, 3 months ago (2014-09-04 21:03:21 UTC) #12
chromium-reviews
On Thu, Sep 4, 2014 at 11:03 PM, <dalecurtis@chromium.org> wrote: > On 2014/09/04 20:05:04, burnik ...
6 years, 3 months ago (2014-09-05 08:10:42 UTC) #13
DaleCurtis
Sorry, I don't follow any of this discussion. I defer to tommi@ to assess this ...
6 years, 3 months ago (2014-09-05 23:13:44 UTC) #14
burnik
tommi: Any new comments on this struct?
6 years, 3 months ago (2014-09-22 08:05:30 UTC) #15
tommi (sloooow) - chröme
sorry, I don't see much point in checking this struct in without any functionality, tests ...
6 years, 3 months ago (2014-09-22 20:31:36 UTC) #16
burnik
6 years, 3 months ago (2014-09-23 09:06:50 UTC) #17
On 2014/09/22 20:31:36, tommi wrote:
> sorry,  I don't see much point in checking this struct in without any
> functionality, tests etc :-/

Ok, please see CL http://crrev.com/594063002. See diff of patchset 2 against 1.
At least, the functionality would surely be there.

Powered by Google App Engine
This is Rietveld 408576698