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

Side by Side Diff: content/renderer/media/html_audio_element_capturer_source.h

Issue 2025643002: Fixing HtmlAudioElementCapturerSource::OnAudioBus() to accept delay frames intead of milliseconds. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | content/renderer/media/html_audio_element_capturer_source.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_RENDERER_MEDIA_HTML_AUDIO_ELEMENT_CAPTURER_SOURCE_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_HTML_AUDIO_ELEMENT_CAPTURER_SOURCE_H_
6 #define CONTENT_RENDERER_MEDIA_HTML_AUDIO_ELEMENT_CAPTURER_SOURCE_H_ 6 #define CONTENT_RENDERER_MEDIA_HTML_AUDIO_ELEMENT_CAPTURER_SOURCE_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "base/threading/thread_checker.h" 10 #include "base/threading/thread_checker.h"
(...skipping 25 matching lines...) Expand all
36 media::WebAudioSourceProviderImpl* audio_source); 36 media::WebAudioSourceProviderImpl* audio_source);
37 ~HtmlAudioElementCapturerSource() override; 37 ~HtmlAudioElementCapturerSource() override;
38 38
39 private: 39 private:
40 // MediaStreamAudioSource implementation. 40 // MediaStreamAudioSource implementation.
41 bool EnsureSourceIsStarted() final; 41 bool EnsureSourceIsStarted() final;
42 void EnsureSourceIsStopped() final; 42 void EnsureSourceIsStopped() final;
43 43
44 // To act as an WebAudioSourceProviderImpl::CopyAudioCB. 44 // To act as an WebAudioSourceProviderImpl::CopyAudioCB.
45 void OnAudioBus(std::unique_ptr<media::AudioBus> audio_bus, 45 void OnAudioBus(std::unique_ptr<media::AudioBus> audio_bus,
46 uint32_t delay_milliseconds, 46 uint32_t frames_delayed,
47 int sample_rate); 47 int sample_rate);
48 48
49 scoped_refptr<media::WebAudioSourceProviderImpl> audio_source_; 49 scoped_refptr<media::WebAudioSourceProviderImpl> audio_source_;
50 50
51 bool is_started_; 51 bool is_started_;
52 int last_sample_rate_; 52 int last_sample_rate_;
53 int last_num_channels_; 53 int last_num_channels_;
54 int last_bus_frames_; 54 int last_bus_frames_;
55 55
56 base::ThreadChecker thread_checker_; 56 base::ThreadChecker thread_checker_;
57 57
58 DISALLOW_COPY_AND_ASSIGN(HtmlAudioElementCapturerSource); 58 DISALLOW_COPY_AND_ASSIGN(HtmlAudioElementCapturerSource);
59 }; 59 };
60 60
61 } // namespace content 61 } // namespace content
62 62
63 #endif // CONTENT_RENDERER_MEDIA_HTML_AUDIO_ELEMENT_CAPTURER_SOURCE_H_ 63 #endif // CONTENT_RENDERER_MEDIA_HTML_AUDIO_ELEMENT_CAPTURER_SOURCE_H_
OLDNEW
« no previous file with comments | « no previous file | content/renderer/media/html_audio_element_capturer_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698