OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CONTENT_PUBLIC_RENDERER_MEDIA_STREAM_AUDIO_SINK_H_ | |
6 #define CONTENT_PUBLIC_RENDERER_MEDIA_STREAM_AUDIO_SINK_H_ | |
7 | |
8 #include <vector> | |
9 | |
10 #include "base/basictypes.h" | |
11 #include "content/common/content_export.h" | |
12 | |
13 namespace blink { | |
14 class WebMediaStreamTrack; | |
15 } | |
16 | |
17 namespace media { | |
18 class AudioParameters; | |
19 } | |
20 | |
21 namespace content { | |
22 | |
23 class CONTENT_EXPORT MediaStreamAudioSink { | |
24 public: | |
25 // Callback on delivering the interleaved audio data. | |
26 // |audio_data| is the pointer to the audio data. | |
27 // |sample_rate| is the sample frequency of |audio_data|. | |
28 // |number_of_channels| is the number of audio channels of |audio_data|. | |
29 // |number_of_frames| is the number of audio frames in the |audio_data|. | |
30 virtual void OnData(const int16* audio_data, | |
perkj_chrome
2013/12/02 14:57:39
Please document on what thread this is called on.
no longer working on chromium
2013/12/03 11:45:45
Done.
| |
31 int sample_rate, | |
32 int number_of_channels, | |
33 int number_of_frames) = 0; | |
34 | |
35 // Callback called when the format of the audio stream has changed. | |
36 // This is called on the same thread as calling OnData(). | |
37 virtual void OnSetFormat(const media::AudioParameters& params) = 0; | |
perkj_chrome
2013/12/02 14:57:39
Are there no overlap between |params| and the para
no longer working on chromium
2013/12/03 11:45:45
We discussed this together in our piranha plant me
perkj_chrome
2013/12/03 13:38:53
So should sample_rate and number_of channel be rem
no longer working on chromium
2013/12/03 13:50:29
No, I am afraid we can't remove them.
They are nee
| |
38 | |
39 protected: | |
40 virtual ~MediaStreamAudioSink() {} | |
41 }; | |
42 | |
43 CONTENT_EXPORT void AddToAudioTrack( | |
perkj_chrome
2013/12/02 14:57:39
Document what thread this need to be called on.
no longer working on chromium
2013/12/03 11:45:45
Done.
| |
44 MediaStreamAudioSink* sink, const blink::WebMediaStreamTrack& track); | |
45 | |
46 CONTENT_EXPORT void RemoveFromAudioTrack( | |
47 MediaStreamAudioSink* sink, const blink::WebMediaStreamTrack& track); | |
48 | |
49 } // namespace content | |
50 | |
51 #endif // CONTENT_PUBLIC_RENDERER_MEDIA_STREAM_AUDIO_SINK_H_ | |
OLD | NEW |