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

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

Issue 870693002: Require Renderer::Initialize() to return a status code via callback. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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
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 26 matching lines...) Expand all
37 // GetMediaTime() runs on the render main thread because it's part of JS sync 37 // GetMediaTime() runs on the render main thread because it's part of JS sync
38 // API. 38 // API.
39 RendererImpl(const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, 39 RendererImpl(const scoped_refptr<base::SingleThreadTaskRunner>& task_runner,
40 scoped_ptr<AudioRenderer> audio_renderer, 40 scoped_ptr<AudioRenderer> audio_renderer,
41 scoped_ptr<VideoRenderer> video_renderer); 41 scoped_ptr<VideoRenderer> video_renderer);
42 42
43 ~RendererImpl() final; 43 ~RendererImpl() final;
44 44
45 // Renderer implementation. 45 // Renderer implementation.
46 void Initialize(DemuxerStreamProvider* demuxer_stream_provider, 46 void Initialize(DemuxerStreamProvider* demuxer_stream_provider,
47 const base::Closure& init_cb, 47 const PipelineStatusCB& init_cb,
48 const StatisticsCB& statistics_cb, 48 const StatisticsCB& statistics_cb,
49 const BufferingStateCB& buffering_state_cb, 49 const BufferingStateCB& buffering_state_cb,
50 const PaintCB& paint_cb, 50 const PaintCB& paint_cb,
51 const base::Closure& ended_cb, 51 const base::Closure& ended_cb,
52 const PipelineStatusCB& error_cb) final; 52 const PipelineStatusCB& error_cb) final;
53 void SetCdm(CdmContext* cdm_context, 53 void SetCdm(CdmContext* cdm_context,
54 const CdmAttachedCB& cdm_attached_cb) final; 54 const CdmAttachedCB& cdm_attached_cb) final;
55 void Flush(const base::Closure& flush_cb) final; 55 void Flush(const base::Closure& flush_cb) final;
56 void StartPlayingFrom(base::TimeDelta time) final; 56 void StartPlayingFrom(base::TimeDelta time) final;
57 void SetPlaybackRate(float playback_rate) final; 57 void SetPlaybackRate(float playback_rate) final;
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 DemuxerStreamProvider* demuxer_stream_provider_; 130 DemuxerStreamProvider* demuxer_stream_provider_;
131 131
132 // Permanent callbacks to notify various renderer states/stats. 132 // Permanent callbacks to notify various renderer states/stats.
133 StatisticsCB statistics_cb_; 133 StatisticsCB statistics_cb_;
134 base::Closure ended_cb_; 134 base::Closure ended_cb_;
135 PipelineStatusCB error_cb_; 135 PipelineStatusCB error_cb_;
136 BufferingStateCB buffering_state_cb_; 136 BufferingStateCB buffering_state_cb_;
137 PaintCB paint_cb_; 137 PaintCB paint_cb_;
138 138
139 // Temporary callback used for Initialize() and Flush(). 139 // Temporary callback used for Initialize() and Flush().
140 base::Closure init_cb_; 140 PipelineStatusCB init_cb_;
141 base::Closure flush_cb_; 141 base::Closure flush_cb_;
142 142
143 scoped_ptr<AudioRenderer> audio_renderer_; 143 scoped_ptr<AudioRenderer> audio_renderer_;
144 scoped_ptr<VideoRenderer> video_renderer_; 144 scoped_ptr<VideoRenderer> video_renderer_;
145 145
146 // Renderer-provided time source used to control playback. 146 // Renderer-provided time source used to control playback.
147 TimeSource* time_source_; 147 TimeSource* time_source_;
148 scoped_ptr<WallClockTimeSource> wall_clock_time_source_; 148 scoped_ptr<WallClockTimeSource> wall_clock_time_source_;
149 bool time_ticking_; 149 bool time_ticking_;
150 150
(...skipping 22 matching lines...) Expand all
173 173
174 base::WeakPtr<RendererImpl> weak_this_; 174 base::WeakPtr<RendererImpl> weak_this_;
175 base::WeakPtrFactory<RendererImpl> weak_factory_; 175 base::WeakPtrFactory<RendererImpl> weak_factory_;
176 176
177 DISALLOW_COPY_AND_ASSIGN(RendererImpl); 177 DISALLOW_COPY_AND_ASSIGN(RendererImpl);
178 }; 178 };
179 179
180 } // namespace media 180 } // namespace media
181 181
182 #endif // MEDIA_FILTERS_RENDERER_IMPL_H_ 182 #endif // MEDIA_FILTERS_RENDERER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698