Chromium Code Reviews| Index: chromecast/renderer/media/video_pipeline_proxy.h |
| diff --git a/chromecast/renderer/media/video_pipeline_proxy.h b/chromecast/renderer/media/video_pipeline_proxy.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..3cde3b48c18847d2d8f7e14184cb16675d511b6c |
| --- /dev/null |
| +++ b/chromecast/renderer/media/video_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_VIDEO_PIPELINE_PROXY_H_ |
| +#define CHROMECAST_RENDERER_MEDIA_VIDEO_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/video_pipeline.h" |
| +#include "media/base/pipeline_status.h" |
| + |
| +namespace base { |
| +class MessageLoopProxy; |
| +class SharedMemory; |
| +} |
| + |
| +namespace media { |
| +class VideoDecoderConfig; |
| +} |
| + |
| +namespace chromecast { |
| +namespace media { |
| +class AvStreamerProxy; |
| +struct AvPipelineClient; |
| +class CodedFrameProvider; |
| +} |
| +} |
| + |
| +namespace chromecast { |
| +namespace cma { |
|
gunsch
2014/12/20 22:41:34
chromecast::media
erickung1
2014/12/21 11:10:48
Done.
|
| +class VideoPipelineProxyInternal; |
| +class MediaChannelProxy; |
| + |
| +class VideoPipelineProxy : public chromecast::media::VideoPipeline { |
| + public: |
| + VideoPipelineProxy( |
| + scoped_refptr<base::MessageLoopProxy> io_message_loop_proxy, |
| + scoped_refptr<MediaChannelProxy> media_channel_proxy); |
| + virtual ~VideoPipelineProxy(); |
| + |
| + void Initialize( |
| + const ::media::VideoDecoderConfig& 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::VideoPipeline implementation. |
| + void SetClient( |
| + const chromecast::media::VideoPipelineClient& video_client) override; |
| + |
| + private: |
| + base::ThreadChecker thread_checker_; |
| + |
| + void OnAvPipeCreated( |
| + const ::media::VideoDecoderConfig& 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<VideoPipelineProxyInternal> proxy_; |
| + |
| + scoped_ptr<chromecast::media::AvStreamerProxy> video_streamer_; |
| + |
| + base::WeakPtrFactory<VideoPipelineProxy> weak_factory_; |
|
gunsch
2014/12/20 22:41:34
WeakPtrFactory should be last
erickung1
2014/12/21 11:10:48
Done.
|
| + base::WeakPtr<VideoPipelineProxy> weak_this_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(VideoPipelineProxy); |
|
gunsch
2014/12/20 22:41:34
base/macros.h
erickung1
2014/12/21 11:10:48
Done.
|
| +}; |
| + |
| +} // namespace cma |
| +} // namespace chromecast |
| + |
| +#endif // CHROMECAST_RENDERER_MEDIA_VIDEO_PIPELINE_PROXY_H_ |
| + |