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

Side by Side Diff: chromecast/renderer/media/media_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 5 years, 12 months 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_MEDIA_PIPELINE_PROXY_H_
6 #define CHROMECAST_RENDERER_MEDIA_MEDIA_PIPELINE_PROXY_H_
7
8 #include "base/macros.h"
9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h"
11 #include "base/memory/weak_ptr.h"
12 #include "base/threading/thread_checker.h"
13 #include "chromecast/media/cma/pipeline/load_type.h"
14 #include "chromecast/media/cma/pipeline/media_pipeline.h"
15 #include "chromecast/media/cma/pipeline/media_pipeline_client.h"
16 #include "media/base/serial_runner.h"
17
18 namespace base {
19 class MessageLoopProxy;
20 }
21
22 namespace chromecast {
23 namespace media {
24 class AudioPipelineProxy;
25 class MediaChannelProxy;
26 class MediaPipelineProxyInternal;
27 class VideoPipelineProxy;
28
29 class MediaPipelineProxy : public MediaPipeline {
30 public:
31 MediaPipelineProxy(
32 int render_frame_id,
33 scoped_refptr<base::MessageLoopProxy> message_loop_proxy,
34 LoadType load_type);
35 ~MediaPipelineProxy() override;
36
37 // MediaPipeline implementation.
38 void SetClient(const MediaPipelineClient& client) override;
39 void SetCdm(int cdm_id) override;
40 AudioPipeline* GetAudioPipeline() const override;
41 VideoPipeline* GetVideoPipeline() const override;
42 void InitializeAudio(
43 const ::media::AudioDecoderConfig& config,
44 scoped_ptr<CodedFrameProvider> frame_provider,
45 const ::media::PipelineStatusCB& status_cb) override;
46 void InitializeVideo(
47 const ::media::VideoDecoderConfig& config,
48 scoped_ptr<CodedFrameProvider> frame_provider,
49 const ::media::PipelineStatusCB& status_cb) override;
50 void StartPlayingFrom(base::TimeDelta time) override;
51 void Flush(const ::media::PipelineStatusCB& status_cb) override;
52 void Stop() override;
53 void SetPlaybackRate(float playback_rate) override;
54
55 private:
56 void OnProxyFlushDone(const ::media::PipelineStatusCB& status_cb,
57 ::media::PipelineStatus status);
58
59 base::ThreadChecker thread_checker_;
60
61 scoped_refptr<base::MessageLoopProxy> io_message_loop_proxy_;
62
63 const int render_frame_id_;
64
65 // CMA channel to convey IPC messages.
66 scoped_refptr<MediaChannelProxy> const media_channel_proxy_;
67
68 scoped_ptr<MediaPipelineProxyInternal> proxy_;
69
70 bool has_audio_;
71 bool has_video_;
72 scoped_ptr<AudioPipelineProxy> audio_pipeline_;
73 scoped_ptr<VideoPipelineProxy> video_pipeline_;
74 scoped_ptr< ::media::SerialRunner> pending_callbacks_;
75
76 base::WeakPtr<MediaPipelineProxy> weak_this_;
77 base::WeakPtrFactory<MediaPipelineProxy> weak_factory_;
78
79 DISALLOW_COPY_AND_ASSIGN(MediaPipelineProxy);
80 };
81
82 } // namespace media
83 } // namespace chromecast
84
85 #endif // CHROMECAST_RENDERER_MEDIA_MEDIA_PIPELINE_PROXY_H_
OLDNEW
« no previous file with comments | « chromecast/renderer/media/media_channel_proxy.cc ('k') | chromecast/renderer/media/media_pipeline_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698