summaryrefslogtreecommitdiffstats
path: root/content/browser/renderer_host/media
Commit message (Collapse)AuthorAgeFilesLines
* Move BrowserMessageFilter to public, and into content namespace.joi@chromium.org2011-12-168-12/+16
| | | | | | | | | | TBR=abodenha@chromium.org for chrome/browser/printing/OWNERS BUG=98716 Review URL: http://codereview.chromium.org/8912009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@114758 0039d316-1c4b-4281-b951-d872f2087c98
* Added size check for MediaStreamDeviceSettings fake UI.mflodman@chromium.org2011-12-131-2/+2
| | | | | | | | | When running the fake ui, behind the media stream flag, there is a missing check for available devices. Review URL: http://codereview.chromium.org/8883042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@114205 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the AudioManager singleton.tommi@chromium.org2011-12-1210-38/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unit tests now instantiate their own AudioManager and can choose to use the default one or provide their own mock implementation without having to worry about conflicting with the singleton. The teardown sequence of the AudioManager and its thread has been cleaned up significantly and I don't think it has been completely tested before as the audio thread was terminated before all objects that belonged to the thread had a chance to do cleanup. The AudioManager unit tests do not use the actual audio thread, so this part seems to have been left out. In Chrome, the AudioManager instance is now owned by BrowserProcessImpl and always constructed on the UI thread. This instance is then shared in the same way that several other 'manager' type objects are shared to 'content' code, via content::ResourceContext. Audio specific classes do though receive a direct pointer to the AudioManager and are required to do proper reference counting if they need to hold onto the instance. I chose to use the ResourceContext rather than direct use of g_browser_process to avoid requiring another singleton when writing relatively simple tests that touch the AudioManager. I added a couple of safeguards to guard against future regressions: - Not more than one instance of the AudioManager should be created. - The AudioManager should not be addrefed by its own thread. This can basically become a circular reference and prevent deterministic shutdown. Reviewers: Of course you're free to review everything, but here's the breakdown in terms of the bare minimum from the standpoint of "Owners approval". I'm asking Henrik to be the main reviewer of the entire patch (sorry!). Henrik: Everything minus the below, but it would be great if you could take a look at the whole thing, specifically media/audio. Pawel: I'd like you to take a generic look at this approach. The key areas as far as the singleton itself goes are in media/audio/audio_manager[_base].* and chrome/browser/browser_process*.* Satish: content/browser/speech/* media/audio/audio_manager_base.* (new reference counting code) Andrew: content/browser/renderer_host/media/* content/renderer/media/webrtc_audio_device_unittest.cc (Owner) Avi: content/browser/renderer_host/render_process_host_impl.cc content/browser/resource_context.* William: chrome/browser/profiles/profile_io_data.cc chrome/browser/browser_process*.* Robert: This is basically a heads up. I hope that I didn't break the OpenBSD implementation, but unfortunately I have no way of knowing for sure. Shijing: Please take a look at AudioManagerLinux. I replaced the set of active streams with a simple counter. BUG=105249 TEST=content_unittests, media_unittests, browser_tests. Review URL: http://codereview.chromium.org/8818012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@114084 0039d316-1c4b-4281-b951-d872f2087c98
* Removing MessageLoop::QuitTask() from content/dcheng@chromium.org2011-12-105-11/+11
| | | | | | | | | | | | base/task.h is going away and being replaced by base/bind.h and base/callback.h. This CL was automatically generated by sed. BUG=none TEST=none Review URL: http://codereview.chromium.org/8872030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113894 0039d316-1c4b-4281-b951-d872f2087c98
* Webcam ppapi flash fix.ihf@chromium.org2011-12-071-0/+8
| | | | | | | | | | Return buffers that are in flight during shutdown and make sure to issue defered stop. BUG=106369 Review URL: http://codereview.chromium.org/8819010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113467 0039d316-1c4b-4281-b951-d872f2087c98
* Let fake UI allow a video capture device to be opened several times.mflodman@chromium.org2011-12-052-4/+43
| | | | | | Review URL: http://codereview.chromium.org/8695004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112977 0039d316-1c4b-4281-b951-d872f2087c98
* Update media-related OWNERS.scherkus@chromium.org2011-12-021-1/+3
| | | | | | Review URL: http://codereview.chromium.org/8773023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112579 0039d316-1c4b-4281-b951-d872f2087c98
* Add OVERRIDE to content/.avi@chromium.org2011-11-281-2/+4
| | | | | | | | | BUG=104314 TEST=no change Review URL: http://codereview.chromium.org/8678021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111755 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor the AudioInputDeviceManager by removing the device thread. xians@chromium.org2011-11-263-374/+258
| | | | | | | | | With this patch, all the work will be done in the IO thread instead, this is needed by WASAPI. Review URL: http://codereview.chromium.org/8677012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111641 0039d316-1c4b-4281-b951-d872f2087c98
* fix a racing condition when renderer process requests StopCapture before ↵wjia@chromium.org2011-11-235-71/+106
| | | | | | | | | | | | host gets controller fix a typo (thanks ihf@) BUG=104581 TEST=trybots Review URL: http://codereview.chromium.org/8549010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111373 0039d316-1c4b-4281-b951-d872f2087c98
* Enable the device selection for linux and mac by passing a device unique id ↵xians@chromium.org2011-11-226-39/+49
| | | | | | | | | | | | | | | from renderer down to the browser. With this patch, users should be able to create a audio stream with a non-default device, and feature is only available for low-latency audio. TEST=media_unittests, webrtc test app BUG=None Review URL: http://codereview.chromium.org/8491044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111153 0039d316-1c4b-4281-b951-d872f2087c98
* Close video capture devices on the device thread.mflodman@chromium.org2011-11-182-8/+24
| | | | | | Review URL: http://codereview.chromium.org/8589018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110780 0039d316-1c4b-4281-b951-d872f2087c98
* Add OVERRIDE to content/.avi@chromium.org2011-11-179-58/+62
| | | | | | | | | BUG=104314 TEST=no change Review URL: http://codereview.chromium.org/8587009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110544 0039d316-1c4b-4281-b951-d872f2087c98
* Add CONTENT_EXPORT AudioInputRendererHost to fix the shared build.tommi@chromium.org2011-11-112-2/+4
| | | | | | | TBR=henrika Review URL: http://codereview.chromium.org/8463010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109613 0039d316-1c4b-4281-b951-d872f2087c98
* switch to DVLOG from VLOG, and move struct definition to cc file.wjia@chromium.org2011-11-114-69/+67
| | | | | | | | | | Clean up the code a bit. BUG=none TEST=trybots Review URL: http://codereview.chromium.org/8525018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109572 0039d316-1c4b-4281-b951-d872f2087c98
* allow device sharable inside VideoCaptureManager.wjia@chromium.org2011-11-103-22/+40
| | | | | | | | | | After the device is opened, any following Open() call will get the opened device. The device will be closed only when all users have called Close(). BUG=none TEST=trybots Review URL: http://codereview.chromium.org/8467032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109467 0039d316-1c4b-4281-b951-d872f2087c98
* make sure MediaStreamManager's requester gets a label before it receives any ↵wjia@chromium.org2011-11-101-3/+12
| | | | | | | | | | | | event. Since all events (including error events) are identified by label, it's important that MediaStreamManager's requester (i.e., MediaStreamDispatcherHost) should have the label before it receives any event. This can be done by calling device_settings_->RequestCaptureDeviceUsage asynchronously. BUG=none TEST=trybots Review URL: http://codereview.chromium.org/8495026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109466 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup: Remove unneeded forward declarations in content/browser.thestig@chromium.org2011-11-101-2/+0
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/8499042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109363 0039d316-1c4b-4281-b951-d872f2087c98
* fix racing condition by setting frame_info_ on caller thread.wjia@chromium.org2011-11-052-1/+5
| | | | | | | | | BUG=103004 TEST=trybots Review URL: http://codereview.chromium.org/8477006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108772 0039d316-1c4b-4281-b951-d872f2087c98
* refactor video capture in browser process to support device sharing across ↵wjia@chromium.org2011-11-039-176/+729
| | | | | | | | | | | | | | | | | multiple renderer processes This is a split of http://codereview.chromium.org/8304017/ 1. VideoCaptureController is owned by VideoCaptureManager. 2. VideoCaptureHost obtains an instance of controller from manager. 3. The largest resolution is used for the device capturing. Clients should expect frame buffers with larger resolution that they requsted. All cropping/resampling is done by clients. 4. Frame buffers are shared between renderer processes and browser process. The buffer received by clients are shared buffers. Clients are recommended to copy pixel data into their local storage. A client can slow down capture frame rate if it returns buffers slowly. 5. This patch only supported the default device. More change in media stream is needed to support user selected device. That will be a different patch. BUG=none TEST=trybots Review URL: http://codereview.chromium.org/8417046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108533 0039d316-1c4b-4281-b951-d872f2087c98
* Move BrowserThread to content namespace.joi@chromium.org2011-11-0217-3/+24
| | | | | | | | | TBR=owners BUG=98716 Review URL: http://codereview.chromium.org/8437002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108270 0039d316-1c4b-4281-b951-d872f2087c98
* Switch content tests to use BrowserThreadImpl directly.joi@chromium.org2011-10-315-29/+39
| | | | | | | | | BUG=98716 Review URL: http://codereview.chromium.org/8400060 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107964 0039d316-1c4b-4281-b951-d872f2087c98
* Split BrowserThread into public API and private implementation, step 1.joi@chromium.org2011-10-2812-27/+36
| | | | | | | | | | | | | | | | | | | | | Only content/ now has the ability to create BrowserThread objects, with the exception that tests can create the content::TestBrowserThread subclass, and (temporarily) code in chrome/ can create the DeprecatedBrowserThread subclass. A follow-up change will make content/ take care of its own thread creation, remove DeprecatedBrowserThread, and move all state and non-trivial constructors from BrowserThread down to BrowserThreadImpl. Also moved BrowserProcessSubThread into content/ namespace. As part of follow-up cleanup, chrome/ will stop using this class. BUG=98716 TEST=existing Review URL: http://codereview.chromium.org/8392042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107718 0039d316-1c4b-4281-b951-d872f2087c98
* Fix race condition in audio output controller and audio sync reader.enal@chromium.org2011-10-192-2/+16
| | | | | | | | | | | | | | | | Reader can be called after controller stopped, causing hang and/or crash. Fix consits of 2 parts: (1) In low latency mode output controller should check its state, exactly like in the high latency mode, and do not call reader if it is not playing anymore. (2) Reader should not touch socket after it is closed, and socket-related operations should be under the lock to avoid race with Close(). BUG=chromium-os:21130 BUG=chromium-os:17357 Review URL: http://codereview.chromium.org/8347004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106326 0039d316-1c4b-4281-b951-d872f2087c98
* Fix problem when we did not play beginning of HTML5 audio stream in low ↵enal@chromium.org2011-10-132-1/+15
| | | | | | | | | | | | | | | | | | | | | | | latency mode. Problem manifested itself on Mac because Mac code is especially sensitive to timing, and because Mac code ignores length of data in buffer -- it assumes buffer is always full, and gives to OS the entire buffer (zeroed out in that case). Fix consists of 2 parts: * When starting audio stream, send request for the data -- previously code depended on data length in the buffer being 0, so it assumed no data would be played, and data would be returned starting from 2nd request. * Implement polling "is data ready?" when starting new stream. Start physical stream only after first chunk data is available (or after ~9ms had passed, to correctly handle "old" clients not writing metadata into buffer). Polling is not continuous, it is done by task delayed by 3ms. Fix is definitely not necessary on Windows, where we have mechanism that handles "bad" timing when requesting new data, but I decided it is better to implement it on all platforms. Added test. BUG=98674 TEST=Go to http://www.jimmysparkle.me/dump/chrome-bug/ and listen to the audio stream. Review URL: http://codereview.chromium.org/8229013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105311 0039d316-1c4b-4281-b951-d872f2087c98
* remove NewRunnableMethod and switch to base::Bindwjia@chromium.org2011-10-0713-140/+124
| | | | | | | | | | for content/browser/renderer_host/media/ BUG=none TEST=trybots Review URL: http://codereview.chromium.org/8184006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104598 0039d316-1c4b-4281-b951-d872f2087c98
* Connecting MediaStreamManager and AudioInputRenderHost/AudioInputDeviceManager.mflodman@chromium.org2011-09-304-25/+29
| | | | | | | | | BUG= TEST= Review URL: http://codereview.chromium.org/8065011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103433 0039d316-1c4b-4281-b951-d872f2087c98
* Here are more exports needed for content_unittests to link in the component ↵dpranke@chromium.org2011-09-3010-13/+22
| | | | | | | | | | | | build. R=jam@chromium.org, darin@chromium.org BUG=90442 TEST= Review URL: http://codereview.chromium.org/8054037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103394 0039d316-1c4b-4281-b951-d872f2087c98
* Convert all of media/ over to the new base::{Bind,Callback} hotness.fischman@chromium.org2011-09-291-1/+2
| | | | | | | | | | | | | | | | | | | Mostly this was a rote conversion, replacing: - Pass-by-pointer CallbackN<>'s become pass-by-const-ref Callback<>'s. - scoped_ptr<CallbackN<>> members become Callback<> members. - several dedicated FooCallback typedefs became base::Closure. Because it was only used in a small handful of places and only in one place profitably, I deleted AutoCallbackRunner. Because it tickles a Bind bug I disabled mfdecoder in .gyp (about to get deleted in a scherkus CL). BUG=none TEST=media_tests, trybots Review URL: http://codereview.chromium.org/8071007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103376 0039d316-1c4b-4281-b951-d872f2087c98
* Add yet more CONTENT_EXPORTed symbols for the content component build.dpranke@chromium.org2011-09-271-1/+2
| | | | | | | | | | R=jam@chromium.org BUG=90442 TEST=none Review URL: http://codereview.chromium.org/8037041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102852 0039d316-1c4b-4281-b951-d872f2087c98
* Removing singelton property of MediaStreamManager.mflodman@chromium.org2011-09-2212-96/+219
| | | | | | | | | | This is almost the same patch [1] as was reverted last week due to flakiness in one of the Win tests, but for one change: MediaStreamManager is not called from MediaStreamDispatcherHost::OnChannelClosing, to avoid shut-down crash. This will be changed as soon as the shut-down issue is solved. [1] http://codereview.chromium.org/7649016/ Review URL: http://codereview.chromium.org/7948004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102255 0039d316-1c4b-4281-b951-d872f2087c98
* Hooking up AudioInputDeviceManager to AudioInputRendererHost and ↵xians@chromium.org2011-09-207-31/+185
| | | | | | | | MediaStreamManager. Review URL: http://codereview.chromium.org/7462012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101975 0039d316-1c4b-4281-b951-d872f2087c98
* Windows-only change -- issue is worst on Windows because of pre-buffering. ↵enal@chromium.org2011-09-152-2/+25
| | | | | | | | | | | | | | | | | On Linux problem is much milder, and on Mac we cannot yield high-priority audio thread... Very short-term change: while working on proper long-term solution, workaround for race condition that causes clicks and bad audio stream. Yield if reader was called too quickly after previous call, as there are good chances renderer thread did not fill the buffer yet. BUG=http://code.google.com/p/chromium/issues/detail?id=61022 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=99236 Review URL: http://codereview.chromium.org/7755001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101231 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 101063 - Removing singleton property of MediaStreamManager and ↵mad@chromium.org2011-09-1410-168/+88
| | | | | | | | | | | | | | | | creating thread first when needed. Most likely cause of new Flakiness in PrerenderBrowserTest.PrerenderUnload... BUG=92125 TEST= Review URL: http://codereview.chromium.org/7649016 TBR=mflodman@chromium.org Review URL: http://codereview.chromium.org/7885034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101107 0039d316-1c4b-4281-b951-d872f2087c98
* Removing singleton property of MediaStreamManager and creating thread first ↵mflodman@chromium.org2011-09-1410-88/+168
| | | | | | | | | | | when needed. BUG=92125 TEST= Review URL: http://codereview.chromium.org/7649016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101063 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a couple of data races found by TSAN Race Verifier in ↵fischman@chromium.org2011-09-091-4/+5
| | | | | | | | | | | | | | | | VideoCaptureController. Tested by removing the suppression and verifying that this command-line fails before and passes after the .cc file change: ./tools/valgrind/chrome_tests.sh --build_dir=ninja/Debug --test content --tool tsan_rv --gtest_filter=VideoCaptureHostTest.StartCaptureErrorStop BUG=86507 TEST=see above Review URL: http://codereview.chromium.org/7859018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100446 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 99236 - Very short-term change: while working on proper long-term ↵crogers@google.com2011-09-022-22/+2
| | | | | | | | | | | | | | | | | | | solution, workaround for race condition that causes clicks and bad audio stream. Yield if reader was called too quickly after previous call, as there are good chances renderer thread did not fill the buffer yet. This breaks the Web Audio API completely on Mac OS X, and hoses audio for ALL applications, requiring reboot. BUG=http://code.google.com/p/chromium/issues/detail?id=61022 Review URL: http://codereview.chromium.org/7755001 TBR=scherkus@chromium.org Review URL: http://codereview.chromium.org/7831050 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99446 0039d316-1c4b-4281-b951-d872f2087c98
* Very short-term change: while working on proper long-term solution,enal@chromium.org2011-09-012-2/+22
| | | | | | | | | | | | workaround for race condition that causes clicks and bad audio stream. Yield if reader was called too quickly after previous call, as there are good chances renderer thread did not fill the buffer yet. BUG=http://code.google.com/p/chromium/issues/detail?id=61022 Review URL: http://codereview.chromium.org/7755001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99236 0039d316-1c4b-4281-b951-d872f2087c98
* Fix audio glitch when audio stream first starts up.crogers@google.com2011-08-261-0/+4
| | | | | | | | | BUG=none TEST=none (tested locally on Mac OS X) Review URL: http://codereview.chromium.org/7762012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98523 0039d316-1c4b-4281-b951-d872f2087c98
* Fix problem when 'ended' event was fired before stream really ended.enal@chromium.org2011-08-234-8/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | That caused impression that rewind does not work. With that change small JS program var a = new Audio("file:///home/enal/temp/click2/click2.wav"); var num_played = 0; a.addEventListener('canplaythrough', function() { a.play(); }); a.addEventListener('ended', function() { num_played ++; if (num_played < 10) { a.currentTime = 0; a.play(); } }); works correctly, you hear 10 clicks one after another, and it takes ~1.5 seconds to play all 10 sounds (one click is 146ms). Current Chrome plays only beginnings of the first 9 clicks and then entire 10th click -- 'ended' event fires too early, so rewind stops audio playback for all clicks but last one. With that fix you can easily create pool of audio objects -- on 'ended' event just add audio object to the pool. Fix consists of 2 parts: 1) When using low-latency code path renderer not only fills the buffer with data, but also writes length of data at the end of buffer. That allows host process to pass correct byte counts to renderer. Counter is written at the endo of buffer, and by default it is set to buffer length, so no changes to existing clients are necessary. 3) Renderer now keeps track of the earliest time playback can end based on the number of rendered bytes, and will not call 'ended' callback till that time. PS. After several comments I changed chrome code to make it much harder for code to get buffer overrun. I was pointed that native client can write bogus size of data into buffer, so function in chrome that reads size of data now has extra argument -- max size of buffer, and returns min(max size of buffer, size of data reported by client). This way min() is always called. PPS. That is much scaled down version of the CL, it does not affect lot of audio code paths... BUG=http://code.google.com/p/chromium/issues/detail?id=78992 http://codereview.chromium.org/7328030 Review URL: http://codereview.chromium.org/7328030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97905 0039d316-1c4b-4281-b951-d872f2087c98
* Make AudioRendererHost store its own pointer to the MediaObserver.scottfr@chromium.org2011-08-172-17/+25
| | | | | | | | | | BUG=91397 TEST= Review URL: http://codereview.chromium.org/7637008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97168 0039d316-1c4b-4281-b951-d872f2087c98
* Remove some unneeded uses of wstring.torne@chromium.org2011-08-091-5/+2
| | | | | | | | | | | | | | The automation proxy launcher is only producing ASCII log messages, so regular strings are fine. In the process, fix an unwanted & in one of the log messages which causes a format string error. The video capture test is generating a filename and should be using FILE_PATH_LITERAL to get the right kind of string for the platform. Review URL: http://codereview.chromium.org/7519028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96022 0039d316-1c4b-4281-b951-d872f2087c98
* Plumb media data from renderers up to MediaInternals in the browser process.scottfr@chromium.org2011-08-052-0/+11
| | | | | | | | | | | Relanding 95542. Reverted due to issue caused by 95496. BUG=none TEST=manually Review URL: http://codereview.chromium.org/7480032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95685 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 95542 - Plumb media data from renderers up to MediaInternals in the ↵yzshen@chromium.org2011-08-052-11/+0
| | | | | | | | | | | | | | | browser process. BUG=none TEST=manually Review URL: http://codereview.chromium.org/7480032 TBR=scottfr@chromium.org Review URL: http://codereview.chromium.org/7566054 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95545 0039d316-1c4b-4281-b951-d872f2087c98
* Plumb media data from renderers up to MediaInternals in the browser process.scottfr@chromium.org2011-08-052-0/+11
| | | | | | | | | | BUG=none TEST=manually Review URL: http://codereview.chromium.org/7480032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95542 0039d316-1c4b-4281-b951-d872f2087c98
* Adding AudioInputDeviceManager.mflodman@google.com2011-07-204-0/+855
| | | | | | | | | | | | | | | | | AudioIndputDeviceManager is responsible for tracking which devices has been opened, normally by WebKit. AudioInputDeviceManager is called from MediaStreamManager when a user has approved a webpage to use the audio input device. AudioInputRendererHost will call AudioInputDeviceManager asking for which device to start, given the session id created when opening the device. This patch is one of the patches to add support for WhatWG peer connection API. This patch replaces 7081002 previously uploaded by xians. BUG=none TEST=unit_tests Review URL: http://codereview.chromium.org/7307021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93224 0039d316-1c4b-4281-b951-d872f2087c98
* some cleanup for base/stl_utildilmah@chromium.org2011-07-194-4/+4
| | | | | | | | | | | | | removed unused/irrelevant functions removed irrelevant comments Moved stl_util-inl.h => stl_util.h BUG=None TEST=None Review URL: http://codereview.chromium.org/7342047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93110 0039d316-1c4b-4281-b951-d872f2087c98
* Fix media code to use initializer-list style for inheritance.scherkus@chromium.org2011-07-184-8/+12
| | | | | | Review URL: http://codereview.chromium.org/7400013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92826 0039d316-1c4b-4281-b951-d872f2087c98
* [Reverted due to check_deps failure]zea@chromium.org2011-07-155-46/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Revert 92749 - Fix problem when 'ended' event was fired before stream really ended. That caused impression that rewind does not work. With that change small JS program var a = new Audio("file:///home/enal/temp/click2/click2.wav"); var num_played = 0; a.addEventListener('canplaythrough', function() { a.play(); }); a.addEventListener('ended', function() { num_played ++; if (num_played < 10) { a.currentTime = 0; a.play(); } }); works correctly, you hear 10 clicks one after another, and it takes ~1.5 seconds to play all 10 sounds (one click is 146ms). Current Chrome plays only beginnings of the first 9 clicks and then entire 10th click -- 'ended' event fires too early, so rewind stops audio playback for all clicks but last one. With that fix you can easily create pool of audio objects -- on 'ended' event just add audio object to the pool. Fix consists of 3 parts: 1) For low-latency code path pass entire "audio state" object to the renderer process. That allows renderer take into account number of pending bytes in the buffer. 2) When using low-latency code path renderer not only fills the buffer with data, but also writes length of data into first word of the buffer. That allows host process to pass correct byte counts to renderer. 3) Renderer now keeps track of the earliest time playback can end based on the number of rendered bytes, and will not call 'ended' callback till that time. BUG=http://code.google.com/p/chromium/issues/detail?id=78992 http://codereview.chromium.org/7328030 Review URL: http://codereview.chromium.org/7328030 TBR=enal@chromium.org Review URL: http://codereview.chromium.org/7395014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92753 0039d316-1c4b-4281-b951-d872f2087c98
* Fix problem when 'ended' event was fired before stream really ended.enal@chromium.org2011-07-155-13/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | That caused impression that rewind does not work. With that change small JS program var a = new Audio("file:///home/enal/temp/click2/click2.wav"); var num_played = 0; a.addEventListener('canplaythrough', function() { a.play(); }); a.addEventListener('ended', function() { num_played ++; if (num_played < 10) { a.currentTime = 0; a.play(); } }); works correctly, you hear 10 clicks one after another, and it takes ~1.5 seconds to play all 10 sounds (one click is 146ms). Current Chrome plays only beginnings of the first 9 clicks and then entire 10th click -- 'ended' event fires too early, so rewind stops audio playback for all clicks but last one. With that fix you can easily create pool of audio objects -- on 'ended' event just add audio object to the pool. Fix consists of 3 parts: 1) For low-latency code path pass entire "audio state" object to the renderer process. That allows renderer take into account number of pending bytes in the buffer. 2) When using low-latency code path renderer not only fills the buffer with data, but also writes length of data into first word of the buffer. That allows host process to pass correct byte counts to renderer. 3) Renderer now keeps track of the earliest time playback can end based on the number of rendered bytes, and will not call 'ended' callback till that time. BUG=http://code.google.com/p/chromium/issues/detail?id=78992 http://codereview.chromium.org/7328030 Review URL: http://codereview.chromium.org/7328030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92749 0039d316-1c4b-4281-b951-d872f2087c98