Chromium Code Reviews| Index: chromecast/renderer/media/audio_pipeline_proxy.h |
| diff --git a/chromecast/renderer/media/audio_pipeline_proxy.h b/chromecast/renderer/media/audio_pipeline_proxy.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..36b9cec66ee7b8e3b5ebb79f5889d58bb840d31e |
| --- /dev/null |
| +++ b/chromecast/renderer/media/audio_pipeline_proxy.h |
| @@ -0,0 +1,83 @@ |
| +// Copyright 2014 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 CHROMECAST_RENDERER_MEDIA_AUDIO_PIPELINE_PROXY_H_ |
| +#define CHROMECAST_RENDERER_MEDIA_AUDIO_PIPELINE_PROXY_H_ |
| + |
| +#include "base/memory/ref_counted.h" |
| +#include "base/memory/scoped_ptr.h" |
| +#include "base/memory/weak_ptr.h" |
| +#include "base/threading/thread_checker.h" |
| +#include "chromecast/media/cma/pipeline/audio_pipeline.h" |
| +#include "media/base/pipeline_status.h" |
| + |
| +namespace base { |
| +class MessageLoopProxy; |
| +class SharedMemory; |
| +} |
| + |
| +namespace media { |
| +class AudioDecoderConfig; |
| +} |
| + |
| +namespace chromecast { |
| +namespace media { |
| +class AvStreamerProxy; |
| +struct AvPipelineClient; |
| +class CodedFrameProvider; |
| +} |
| +} |
| + |
| +namespace chromecast { |
| +namespace cma { |
|
gunsch
2014/12/20 22:41:33
note: this should just all be chromecast::media .
erickung1
2014/12/21 11:10:46
Done.
|
| +class AudioPipelineProxyInternal; |
| +class MediaChannelProxy; |
| + |
| +class AudioPipelineProxy : public chromecast::media::AudioPipeline { |
| + public: |
| + AudioPipelineProxy( |
| + scoped_refptr<base::MessageLoopProxy> io_message_loop_proxy, |
| + scoped_refptr<MediaChannelProxy> media_channel_proxy); |
| + virtual ~AudioPipelineProxy(); |
| + |
| + void Initialize( |
| + const ::media::AudioDecoderConfig& config, |
| + scoped_ptr<chromecast::media::CodedFrameProvider> frame_provider, |
| + const ::media::PipelineStatusCB& status_cb); |
| + void StartFeeding(); |
| + void Flush(const base::Closure& done_cb); |
| + void Stop(); |
| + |
| + // chromecast::media::AudioPipeline implementation. |
| + void SetClient(const chromecast::media::AvPipelineClient& client) override; |
| + void SetVolume(float volume) override; |
| + |
| + private: |
| + base::ThreadChecker thread_checker_; |
| + |
| + void OnAvPipeCreated( |
| + const ::media::AudioDecoderConfig& config, |
| + const ::media::PipelineStatusCB& status_cb, |
| + scoped_ptr<base::SharedMemory> shared_memory); |
| + void OnPipeWrite(); |
| + void OnPipeRead(); |
| + |
| + scoped_refptr<base::MessageLoopProxy> io_message_loop_proxy_; |
| + |
| + // |proxy_| main goal is to convert function calls to IPC messages. |
| + scoped_ptr<AudioPipelineProxyInternal> proxy_; |
| + |
| + scoped_ptr<chromecast::media::AvStreamerProxy> audio_streamer_; |
| + |
| + base::WeakPtrFactory<AudioPipelineProxy> weak_factory_; |
| + base::WeakPtr<AudioPipelineProxy> weak_this_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(AudioPipelineProxy); |
|
gunsch
2014/12/20 22:41:33
include base/macros.h
erickung1
2014/12/21 11:10:46
Done.
|
| +}; |
| + |
| +} // namespace cma |
| +} // namespace chromecast |
| + |
| +#endif // CHROMECAST_RENDERER_MEDIA_AUDIO_PIPELINE_PROXY_H_ |
| + |