Chromium Code Reviews| Index: content/public/renderer/media_stream_audio_sink.h |
| diff --git a/content/public/renderer/media_stream_audio_sink.h b/content/public/renderer/media_stream_audio_sink.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..cacb84d2301b9c8760923a16ce2a718f0029e68c |
| --- /dev/null |
| +++ b/content/public/renderer/media_stream_audio_sink.h |
| @@ -0,0 +1,51 @@ |
| +// Copyright 2013 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CONTENT_PUBLIC_RENDERER_MEDIA_STREAM_AUDIO_SINK_H_ |
| +#define CONTENT_PUBLIC_RENDERER_MEDIA_STREAM_AUDIO_SINK_H_ |
| + |
| +#include <vector> |
| + |
| +#include "base/basictypes.h" |
| +#include "content/common/content_export.h" |
| + |
| +namespace blink { |
| +class WebMediaStreamTrack; |
| +} |
| + |
| +namespace media { |
| +class AudioParameters; |
| +} |
| + |
| +namespace content { |
| + |
| +class CONTENT_EXPORT MediaStreamAudioSink { |
|
jochen (gone - plz use gerrit)
2013/12/02 10:24:55
i'm not sure I understand why this interface needs
no longer working on chromium
2013/12/02 10:40:42
This needs to be in public because chrome cast sit
|
| + public: |
| + // Callback on delivering the interleaved audio data. |
| + // |audio_data| is the pointer to the audio data. |
| + // |sample_rate| is the sample frequency of |audio_data|. |
| + // |number_of_channels| is the number of audio channels of |audio_data|. |
| + // |number_of_frames| is the number of audio frames in the |audio_data|. |
| + virtual void OnData(const int16* audio_data, |
| + int sample_rate, |
| + int number_of_channels, |
| + int number_of_frames) = 0; |
| + |
| + // Callback called when the format of the audio stream has changed. |
| + // This is called on the same thread as calling OnData(). |
| + virtual void OnSetFormat(const media::AudioParameters& params) = 0; |
| + |
| + protected: |
| + virtual ~MediaStreamAudioSink() {} |
| +}; |
| + |
| +CONTENT_EXPORT void AddToAudioTrack( |
|
jochen (gone - plz use gerrit)
2013/12/02 10:24:55
why not have those as static methods MediaSreamAud
no longer working on chromium
2013/12/02 10:40:42
Do you mean
#1 putting these two methods into Medi
Jói
2013/12/02 10:45:22
This sink interface will likely be implemented by
|
| + MediaStreamAudioSink* sink, const blink::WebMediaStreamTrack& track); |
| + |
| +CONTENT_EXPORT void RemoveFromAudioTrack( |
| + MediaStreamAudioSink* sink, const blink::WebMediaStreamTrack& track); |
| + |
| +} // namespace content |
| + |
| +#endif // CONTENT_PUBLIC_RENDERER_MEDIA_STREAM_AUDIO_SINK_H_ |