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

Side by Side Diff: media/filters/renderer_impl.h

Issue 591203003: media: Pass DemuxerStreamProvider in Renderer::Initialize(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase only Created 6 years, 2 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
« no previous file with comments | « media/filters/pipeline_integration_test_base.cc ('k') | media/filters/renderer_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MEDIA_FILTERS_RENDERER_IMPL_H_ 5 #ifndef MEDIA_FILTERS_RENDERER_IMPL_H_
6 #define MEDIA_FILTERS_RENDERER_IMPL_H_ 6 #define MEDIA_FILTERS_RENDERER_IMPL_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 13 matching lines...) Expand all
24 namespace media { 24 namespace media {
25 25
26 class AudioRenderer; 26 class AudioRenderer;
27 class DemuxerStreamProvider; 27 class DemuxerStreamProvider;
28 class TimeSource; 28 class TimeSource;
29 class VideoRenderer; 29 class VideoRenderer;
30 class WallClockTimeSource; 30 class WallClockTimeSource;
31 31
32 class MEDIA_EXPORT RendererImpl : public Renderer { 32 class MEDIA_EXPORT RendererImpl : public Renderer {
33 public: 33 public:
34 // Renders audio/video streams in |demuxer_stream_provider| using 34 // Renders audio/video streams using |audio_renderer| and |video_renderer|
35 // |audio_renderer| and |video_renderer| provided. All methods except for 35 // provided. All methods except for GetMediaTime() run on the |task_runner|.
36 // GetMediaTime() run on the |task_runner|. GetMediaTime() runs on the render 36 // GetMediaTime() runs on the render main thread because it's part of JS sync
37 // main thread because it's part of JS sync API. 37 // API.
38 RendererImpl(const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, 38 RendererImpl(const scoped_refptr<base::SingleThreadTaskRunner>& task_runner,
39 DemuxerStreamProvider* demuxer_stream_provider,
40 scoped_ptr<AudioRenderer> audio_renderer, 39 scoped_ptr<AudioRenderer> audio_renderer,
41 scoped_ptr<VideoRenderer> video_renderer); 40 scoped_ptr<VideoRenderer> video_renderer);
42 41
43 virtual ~RendererImpl(); 42 virtual ~RendererImpl();
44 43
45 // Renderer implementation. 44 // Renderer implementation.
46 virtual void Initialize(const base::Closure& init_cb, 45 virtual void Initialize(DemuxerStreamProvider* demuxer_stream_provider,
46 const base::Closure& init_cb,
47 const StatisticsCB& statistics_cb, 47 const StatisticsCB& statistics_cb,
48 const base::Closure& ended_cb, 48 const base::Closure& ended_cb,
49 const PipelineStatusCB& error_cb, 49 const PipelineStatusCB& error_cb,
50 const BufferingStateCB& buffering_state_cb) OVERRIDE; 50 const BufferingStateCB& buffering_state_cb) OVERRIDE;
51 virtual void Flush(const base::Closure& flush_cb) OVERRIDE; 51 virtual void Flush(const base::Closure& flush_cb) OVERRIDE;
52 virtual void StartPlayingFrom(base::TimeDelta time) OVERRIDE; 52 virtual void StartPlayingFrom(base::TimeDelta time) OVERRIDE;
53 virtual void SetPlaybackRate(float playback_rate) OVERRIDE; 53 virtual void SetPlaybackRate(float playback_rate) OVERRIDE;
54 virtual void SetVolume(float volume) OVERRIDE; 54 virtual void SetVolume(float volume) OVERRIDE;
55 virtual base::TimeDelta GetMediaTime() OVERRIDE; 55 virtual base::TimeDelta GetMediaTime() OVERRIDE;
56 virtual bool HasAudio() OVERRIDE; 56 virtual bool HasAudio() OVERRIDE;
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 // NOTE: Weak pointers must be invalidated before all other member variables. 154 // NOTE: Weak pointers must be invalidated before all other member variables.
155 base::WeakPtrFactory<RendererImpl> weak_factory_; 155 base::WeakPtrFactory<RendererImpl> weak_factory_;
156 base::WeakPtr<RendererImpl> weak_this_; 156 base::WeakPtr<RendererImpl> weak_this_;
157 157
158 DISALLOW_COPY_AND_ASSIGN(RendererImpl); 158 DISALLOW_COPY_AND_ASSIGN(RendererImpl);
159 }; 159 };
160 160
161 } // namespace media 161 } // namespace media
162 162
163 #endif // MEDIA_FILTERS_RENDERER_IMPL_H_ 163 #endif // MEDIA_FILTERS_RENDERER_IMPL_H_
OLDNEW
« no previous file with comments | « media/filters/pipeline_integration_test_base.cc ('k') | media/filters/renderer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698