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

Side by Side Diff: content/renderer/media/webmediaplayer_ms_compositor.h

Issue 1930003002: Bug Fix: Rendering stuck due to thread issue of WebMediaPlayerMSCompositor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Function Rename 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_MS_COMPOSITOR_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_MS_COMPOSITOR_H_
6 #define CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_MS_COMPOSITOR_H_ 6 #define CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_MS_COMPOSITOR_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 71
72 // VideoFrameProvider implementation. 72 // VideoFrameProvider implementation.
73 void SetVideoFrameProviderClient( 73 void SetVideoFrameProviderClient(
74 cc::VideoFrameProvider::Client* client) override; 74 cc::VideoFrameProvider::Client* client) override;
75 bool UpdateCurrentFrame(base::TimeTicks deadline_min, 75 bool UpdateCurrentFrame(base::TimeTicks deadline_min,
76 base::TimeTicks deadline_max) override; 76 base::TimeTicks deadline_max) override;
77 bool HasCurrentFrame() override; 77 bool HasCurrentFrame() override;
78 scoped_refptr<media::VideoFrame> GetCurrentFrame() override; 78 scoped_refptr<media::VideoFrame> GetCurrentFrame() override;
79 void PutCurrentFrame() override; 79 void PutCurrentFrame() override;
80 80
81 // Return the current frame being rendered.
82 // Difference between GetCurrentFrame(): GetCurrentFrame() is designed for
83 // chrome compositor to pull frame from WebMediaPlayerMSCompositor, and thus
84 // calling GetCurrentFrame() will affect statistics like |dropped_frames_|
85 // etc. Calling this function has no side effect.
86 scoped_refptr<media::VideoFrame> GetCurrentFrameWithoutUpdatingStatistics();
87
81 void StartRendering(); 88 void StartRendering();
82 void StopRendering(); 89 void StopRendering();
83 void ReplaceCurrentFrameWithACopy(); 90 void ReplaceCurrentFrameWithACopy();
84 91
85 private: 92 private:
86 friend class WebMediaPlayerMSTest; 93 friend class WebMediaPlayerMSTest;
87 94
88 bool MapTimestampsToRenderTimeTicks( 95 bool MapTimestampsToRenderTimeTicks(
89 const std::vector<base::TimeDelta>& timestamps, 96 const std::vector<base::TimeDelta>& timestamps,
90 std::vector<base::TimeTicks>* wall_clock_times); 97 std::vector<base::TimeTicks>* wall_clock_times);
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 base::Lock current_frame_lock_; 157 base::Lock current_frame_lock_;
151 158
152 // Make sure the weak pointer factory member is the last member of the class. 159 // Make sure the weak pointer factory member is the last member of the class.
153 base::WeakPtrFactory<WebMediaPlayerMSCompositor> weak_ptr_factory_; 160 base::WeakPtrFactory<WebMediaPlayerMSCompositor> weak_ptr_factory_;
154 161
155 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerMSCompositor); 162 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerMSCompositor);
156 }; 163 };
157 } // namespace content 164 } // namespace content
158 165
159 #endif // CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_MS_COMPOSITOR_H_ 166 #endif // CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_MS_COMPOSITOR_H_
OLDNEW
« no previous file with comments | « content/renderer/media/webmediaplayer_ms.cc ('k') | content/renderer/media/webmediaplayer_ms_compositor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698