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

Unified Diff: content/renderer/media/webmediaplayer_ms.cc

Issue 1265433003: Preliminary change for new rtc rendering algorithm (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: content/renderer/media/webmediaplayer_ms.cc
diff --git a/content/renderer/media/webmediaplayer_ms.cc b/content/renderer/media/webmediaplayer_ms.cc
index 80bd723099090ab737278b2bbc21ffd751554805..9c753fc0b7f7338032c04c2876bfa03ae717e0e7 100644
--- a/content/renderer/media/webmediaplayer_ms.cc
+++ b/content/renderer/media/webmediaplayer_ms.cc
@@ -451,14 +451,24 @@ void WebMediaPlayerMS::SetVideoFrameProviderClient(
if (video_frame_provider_client_)
video_frame_provider_client_->StopUsingProvider();
video_frame_provider_client_ = client;
+ if (client) {
+ client->StartRendering();
+ }
mcasas 2015/07/30 08:40:24 no need for {}
qiangchen 2015/07/30 17:40:26 Done.
}
bool WebMediaPlayerMS::UpdateCurrentFrame(base::TimeTicks deadline_min,
base::TimeTicks deadline_max) {
mcasas 2015/07/30 08:40:24 Suggestion: change base::TimeTicks to base::TimeDe
DaleCurtis 2015/07/30 16:26:04 These are values forwarded from the compositor Beg
qiangchen 2015/07/30 17:40:26 Did you mean deadline_min and deadline_max? Updat
mcasas 2015/07/31 08:41:31 Yes, it would mean changing base class and derived
DaleCurtis 2015/07/31 16:05:07 TimeTicks is the correct usage here since these va
+ TRACE_EVENT_BEGIN2("webrtc", "WebMediaPlayerMS::UpdateCurrentFrame",
+ "Actual Render Begin", deadline_min.ToInternalValue(),
+ "Actual Render End", deadline_max.ToInternalValue());
+
// TODO(dalecurtis): This should make use of the deadline interval to ensure
// the painted frame is correct for the given interval.
- NOTREACHED();
- return false;
+
+ base::TimeTicks render_time = current_frame_->render_time();
mcasas 2015/07/30 08:40:24 const
qiangchen 2015/07/30 17:40:26 Done.
qiangchen 2015/07/31 17:15:33 N/A
+ TRACE_EVENT_END1("webrtc", "WebMediaPlayerMS::UpdateCurrentFrame",
+ "Ideal Render Instant", render_time.ToInternalValue());
+ return !current_frame_used_;
}
bool WebMediaPlayerMS::HasCurrentFrame() {
@@ -483,6 +493,10 @@ void WebMediaPlayerMS::OnFrameAvailable(
const scoped_refptr<media::VideoFrame>& frame) {
DVLOG(3) << "WebMediaPlayerMS::OnFrameAvailable";
DCHECK(thread_checker_.CalledOnValidThread());
+
+ TRACE_EVENT1("webrtc", "WebMediaPlayerMS::OnFrameAvailable",
+ "Ideal Render Instant", frame->render_time().ToInternalValue());
+
++total_frame_count_;
if (!received_first_frame_) {
received_first_frame_ = true;
@@ -522,8 +536,6 @@ void WebMediaPlayerMS::OnFrameAvailable(
if (size_changed)
GetClient()->sizeChanged();
-
- GetClient()->repaint();
}
void WebMediaPlayerMS::RepaintInternal() {

Powered by Google App Engine
This is Rietveld 408576698