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

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

Issue 1978973002: Moves video frame callbacks from VideoFrameCompositor to Renderer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addresses comments Created 4 years, 7 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/renderer_impl.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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 private: 88 private:
89 // Callback for |video_frame_stream_| initialization. 89 // Callback for |video_frame_stream_| initialization.
90 void OnVideoFrameStreamInitialized(bool success); 90 void OnVideoFrameStreamInitialized(bool success);
91 91
92 // Functions to notify certain events to the RendererClient. 92 // Functions to notify certain events to the RendererClient.
93 void OnPlaybackError(PipelineStatus error); 93 void OnPlaybackError(PipelineStatus error);
94 void OnPlaybackEnded(); 94 void OnPlaybackEnded();
95 void OnStatisticsUpdate(const PipelineStatistics& stats); 95 void OnStatisticsUpdate(const PipelineStatistics& stats);
96 void OnBufferingStateChange(BufferingState state); 96 void OnBufferingStateChange(BufferingState state);
97 void OnWaitingForDecryptionKey(); 97 void OnWaitingForDecryptionKey();
98 void OnVideoNaturalSizeChange(const gfx::Size& size);
99 void OnVideoOpacityChange(bool opaque);
98 100
99 // Callback for |video_frame_stream_| to deliver decoded video frames and 101 // Callback for |video_frame_stream_| to deliver decoded video frames and
100 // report video decoding status. If a frame is available the planes will be 102 // report video decoding status. If a frame is available the planes will be
101 // copied asynchronously and FrameReady will be called once finished copying. 103 // copied asynchronously and FrameReady will be called once finished copying.
102 void FrameReadyForCopyingToGpuMemoryBuffers( 104 void FrameReadyForCopyingToGpuMemoryBuffers(
103 VideoFrameStream::Status status, 105 VideoFrameStream::Status status,
104 const scoped_refptr<VideoFrame>& frame); 106 const scoped_refptr<VideoFrame>& frame);
105 107
106 // Callback for |video_frame_stream_| to deliver decoded video frames and 108 // Callback for |video_frame_stream_| to deliver decoded video frames and
107 // report video decoding status. 109 // report video decoding status.
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 // Indicates that Render() should only render the first frame and then request 280 // Indicates that Render() should only render the first frame and then request
279 // that the sink be stopped. |posted_maybe_stop_after_first_paint_| is used 281 // that the sink be stopped. |posted_maybe_stop_after_first_paint_| is used
280 // to avoid repeated task posts. 282 // to avoid repeated task posts.
281 bool render_first_frame_and_stop_; 283 bool render_first_frame_and_stop_;
282 bool posted_maybe_stop_after_first_paint_; 284 bool posted_maybe_stop_after_first_paint_;
283 285
284 // Memory usage of |algorithm_| recorded during the last UpdateStats_Locked() 286 // Memory usage of |algorithm_| recorded during the last UpdateStats_Locked()
285 // call. 287 // call.
286 int64_t last_video_memory_usage_; 288 int64_t last_video_memory_usage_;
287 289
290 // Indicates if Render() has been called yet.
291 bool have_renderered_frames_;
292 // Tracks last frame properties to detect and notify client of any changes.
293 gfx::Size last_frame_natural_size_;
294 bool last_frame_opaque_;
295
288 // NOTE: Weak pointers must be invalidated before all other member variables. 296 // NOTE: Weak pointers must be invalidated before all other member variables.
289 base::WeakPtrFactory<VideoRendererImpl> weak_factory_; 297 base::WeakPtrFactory<VideoRendererImpl> weak_factory_;
290 298
291 DISALLOW_COPY_AND_ASSIGN(VideoRendererImpl); 299 DISALLOW_COPY_AND_ASSIGN(VideoRendererImpl);
292 }; 300 };
293 301
294 } // namespace media 302 } // namespace media
295 303
296 #endif // MEDIA_RENDERERS_VIDEO_RENDERER_IMPL_H_ 304 #endif // MEDIA_RENDERERS_VIDEO_RENDERER_IMPL_H_
OLDNEW
« no previous file with comments | « media/renderers/renderer_impl.cc ('k') | media/renderers/video_renderer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698