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

Side by Side Diff: media/renderers/video_renderer_impl.h

Issue 2815303006: Convert MediaLog from being ref counted to owned by WebMediaPlayer. (Closed)
Patch Set: Rebase. Created 3 years, 8 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/renderers/default_renderer_factory.cc ('k') | media/renderers/video_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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_RENDERERS_VIDEO_RENDERER_IMPL_H_ 5 #ifndef MEDIA_RENDERERS_VIDEO_RENDERER_IMPL_H_
6 #define MEDIA_RENDERERS_VIDEO_RENDERER_IMPL_H_ 6 #define MEDIA_RENDERERS_VIDEO_RENDERER_IMPL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 // down the video thread may result in losing synchronization with audio. 53 // down the video thread may result in losing synchronization with audio.
54 // 54 //
55 // Setting |drop_frames_| to true causes the renderer to drop expired frames. 55 // Setting |drop_frames_| to true causes the renderer to drop expired frames.
56 VideoRendererImpl( 56 VideoRendererImpl(
57 const scoped_refptr<base::SingleThreadTaskRunner>& media_task_runner, 57 const scoped_refptr<base::SingleThreadTaskRunner>& media_task_runner,
58 const scoped_refptr<base::TaskRunner>& worker_task_runner, 58 const scoped_refptr<base::TaskRunner>& worker_task_runner,
59 VideoRendererSink* sink, 59 VideoRendererSink* sink,
60 const CreateVideoDecodersCB& create_video_decoders_cb, 60 const CreateVideoDecodersCB& create_video_decoders_cb,
61 bool drop_frames, 61 bool drop_frames,
62 GpuVideoAcceleratorFactories* gpu_factories, 62 GpuVideoAcceleratorFactories* gpu_factories,
63 const scoped_refptr<MediaLog>& media_log); 63 MediaLog* media_log);
64 ~VideoRendererImpl() override; 64 ~VideoRendererImpl() override;
65 65
66 // VideoRenderer implementation. 66 // VideoRenderer implementation.
67 void Initialize(DemuxerStream* stream, 67 void Initialize(DemuxerStream* stream,
68 CdmContext* cdm_context, 68 CdmContext* cdm_context,
69 RendererClient* client, 69 RendererClient* client,
70 const TimeSource::WallClockTimeCB& wall_clock_time_cb, 70 const TimeSource::WallClockTimeCB& wall_clock_time_cb,
71 const PipelineStatusCB& init_cb) override; 71 const PipelineStatusCB& init_cb) override;
72 void Flush(const base::Closure& callback) override; 72 void Flush(const base::Closure& callback) override;
73 void StartPlayingFrom(base::TimeDelta timestamp) override; 73 void StartPlayingFrom(base::TimeDelta timestamp) override;
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 base::Lock lock_; 201 base::Lock lock_;
202 202
203 RendererClient* client_; 203 RendererClient* client_;
204 204
205 // Provides video frames to VideoRendererImpl. 205 // Provides video frames to VideoRendererImpl.
206 std::unique_ptr<VideoFrameStream> video_frame_stream_; 206 std::unique_ptr<VideoFrameStream> video_frame_stream_;
207 207
208 // Pool of GpuMemoryBuffers and resources used to create hardware frames. 208 // Pool of GpuMemoryBuffers and resources used to create hardware frames.
209 std::unique_ptr<GpuMemoryBufferVideoFramePool> gpu_memory_buffer_pool_; 209 std::unique_ptr<GpuMemoryBufferVideoFramePool> gpu_memory_buffer_pool_;
210 210
211 scoped_refptr<MediaLog> media_log_; 211 MediaLog* media_log_;
212 212
213 // Flag indicating low-delay mode. 213 // Flag indicating low-delay mode.
214 bool low_delay_; 214 bool low_delay_;
215 215
216 // Keeps track of whether we received the end of stream buffer and finished 216 // Keeps track of whether we received the end of stream buffer and finished
217 // rendering. 217 // rendering.
218 bool received_end_of_stream_; 218 bool received_end_of_stream_;
219 bool rendered_end_of_stream_; 219 bool rendered_end_of_stream_;
220 220
221 // Important detail: being in kPlaying doesn't imply that video is being 221 // Important detail: being in kPlaying doesn't imply that video is being
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 // want to discard video frames that might be received after the stream has 313 // want to discard video frames that might be received after the stream has
314 // been reset. 314 // been reset.
315 base::WeakPtrFactory<VideoRendererImpl> frame_callback_weak_factory_; 315 base::WeakPtrFactory<VideoRendererImpl> frame_callback_weak_factory_;
316 316
317 DISALLOW_COPY_AND_ASSIGN(VideoRendererImpl); 317 DISALLOW_COPY_AND_ASSIGN(VideoRendererImpl);
318 }; 318 };
319 319
320 } // namespace media 320 } // namespace media
321 321
322 #endif // MEDIA_RENDERERS_VIDEO_RENDERER_IMPL_H_ 322 #endif // MEDIA_RENDERERS_VIDEO_RENDERER_IMPL_H_
OLDNEW
« no previous file with comments | « media/renderers/default_renderer_factory.cc ('k') | media/renderers/video_renderer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698