Commit af97fc86 authored by tfarina's avatar tfarina Committed by Commit bot

remoting: remove usage of CapturedFrame.elapsed_time in CastVideoCapturerAdapter

cricket::CapturedFrame.elapsed_time is deprecated since
https://codereview.webrtc.org/1324263004/.

BUG=544125
R=perkj@chromium.org,sergeyu@chromium.org

Review URL: https://codereview.chromium.org/1456083002

Cr-Commit-Position: refs/heads/master@{#360563}
parent 568075bb
...@@ -45,8 +45,6 @@ void CastVideoCapturerAdapter::OnCaptureCompleted(webrtc::DesktopFrame* frame) { ...@@ -45,8 +45,6 @@ void CastVideoCapturerAdapter::OnCaptureCompleted(webrtc::DesktopFrame* frame) {
captured_frame.width = owned_frame->size().width(); captured_frame.width = owned_frame->size().width();
captured_frame.height = owned_frame->size().height(); captured_frame.height = owned_frame->size().height();
base::TimeTicks current_time = base::TimeTicks::Now(); base::TimeTicks current_time = base::TimeTicks::Now();
captured_frame.elapsed_time = (current_time - start_time_).InMicroseconds() *
base::Time::kNanosecondsPerMicrosecond;
captured_frame.time_stamp = captured_frame.time_stamp =
current_time.ToInternalValue() * base::Time::kNanosecondsPerMicrosecond; current_time.ToInternalValue() * base::Time::kNanosecondsPerMicrosecond;
captured_frame.data = owned_frame->data(); captured_frame.data = owned_frame->data();
...@@ -91,10 +89,6 @@ cricket::CaptureState CastVideoCapturerAdapter::Start( ...@@ -91,10 +89,6 @@ cricket::CaptureState CastVideoCapturerAdapter::Start(
desktop_capturer_->Start(this); desktop_capturer_->Start(this);
// Save the Start() time of |desktop_capturer_|. This will be used
// to estimate the creation time of the frame source, to set the elapsed_time
// of future CapturedFrames in OnCaptureCompleted().
start_time_ = base::TimeTicks::Now();
capture_timer_.reset(new base::RepeatingTimer()); capture_timer_.reset(new base::RepeatingTimer());
capture_timer_->Start(FROM_HERE, capture_timer_->Start(FROM_HERE,
base::TimeDelta::FromMicroseconds( base::TimeDelta::FromMicroseconds(
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#include <vector> #include <vector>
#include "base/macros.h"
#include "base/memory/scoped_ptr.h" #include "base/memory/scoped_ptr.h"
#include "base/threading/thread_checker.h" #include "base/threading/thread_checker.h"
#include "base/timer/timer.h" #include "base/timer/timer.h"
...@@ -69,9 +70,6 @@ class CastVideoCapturerAdapter : public cricket::VideoCapturer, ...@@ -69,9 +70,6 @@ class CastVideoCapturerAdapter : public cricket::VideoCapturer,
// Used to schedule periodic screen captures. // Used to schedule periodic screen captures.
scoped_ptr<base::RepeatingTimer> capture_timer_; scoped_ptr<base::RepeatingTimer> capture_timer_;
// Used to set the elapsed_time attribute of captured frames.
base::TimeTicks start_time_;
DISALLOW_COPY_AND_ASSIGN(CastVideoCapturerAdapter); DISALLOW_COPY_AND_ASSIGN(CastVideoCapturerAdapter);
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment