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

Side by Side Diff: chromecast/renderer/media/video_pipeline_proxy.h

Issue 814403002: [Chromecast] Add CmaMediaRendererFactory and IPC proxy components (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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
OLDNEW
(Empty)
1 // Copyright 2014 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 CHROMECAST_RENDERER_MEDIA_VIDEO_PIPELINE_PROXY_H_
6 #define CHROMECAST_RENDERER_MEDIA_VIDEO_PIPELINE_PROXY_H_
7
8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "base/memory/weak_ptr.h"
11 #include "base/threading/thread_checker.h"
12 #include "chromecast/media/cma/pipeline/video_pipeline.h"
13 #include "media/base/pipeline_status.h"
14
15 namespace base {
16 class MessageLoopProxy;
17 class SharedMemory;
18 }
19
20 namespace media {
21 class VideoDecoderConfig;
22 }
23
24 namespace chromecast {
25 namespace media {
26 class AvStreamerProxy;
27 struct AvPipelineClient;
28 class CodedFrameProvider;
29 }
30 }
31
32 namespace chromecast {
33 namespace cma {
gunsch 2014/12/20 22:41:34 chromecast::media
erickung1 2014/12/21 11:10:48 Done.
34 class VideoPipelineProxyInternal;
35 class MediaChannelProxy;
36
37 class VideoPipelineProxy : public chromecast::media::VideoPipeline {
38 public:
39 VideoPipelineProxy(
40 scoped_refptr<base::MessageLoopProxy> io_message_loop_proxy,
41 scoped_refptr<MediaChannelProxy> media_channel_proxy);
42 virtual ~VideoPipelineProxy();
43
44 void Initialize(
45 const ::media::VideoDecoderConfig& config,
46 scoped_ptr<chromecast::media::CodedFrameProvider> frame_provider,
47 const ::media::PipelineStatusCB& status_cb);
48 void StartFeeding();
49 void Flush(const base::Closure& done_cb);
50 void Stop();
51
52 // chromecast::media::VideoPipeline implementation.
53 void SetClient(
54 const chromecast::media::VideoPipelineClient& video_client) override;
55
56 private:
57 base::ThreadChecker thread_checker_;
58
59 void OnAvPipeCreated(
60 const ::media::VideoDecoderConfig& config,
61 const ::media::PipelineStatusCB& status_cb,
62 scoped_ptr<base::SharedMemory> shared_memory);
63 void OnPipeWrite();
64 void OnPipeRead();
65
66 scoped_refptr<base::MessageLoopProxy> io_message_loop_proxy_;
67
68 // |proxy_| main goal is to convert function calls to IPC messages.
69 scoped_ptr<VideoPipelineProxyInternal> proxy_;
70
71 scoped_ptr<chromecast::media::AvStreamerProxy> video_streamer_;
72
73 base::WeakPtrFactory<VideoPipelineProxy> weak_factory_;
gunsch 2014/12/20 22:41:34 WeakPtrFactory should be last
erickung1 2014/12/21 11:10:48 Done.
74 base::WeakPtr<VideoPipelineProxy> weak_this_;
75
76 DISALLOW_COPY_AND_ASSIGN(VideoPipelineProxy);
gunsch 2014/12/20 22:41:34 base/macros.h
erickung1 2014/12/21 11:10:48 Done.
77 };
78
79 } // namespace cma
80 } // namespace chromecast
81
82 #endif // CHROMECAST_RENDERER_MEDIA_VIDEO_PIPELINE_PROXY_H_
83
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698