summaryrefslogtreecommitdiffstats
path: root/remoting
diff options
context:
space:
mode:
authoranandc <anandc@google.com>2015-10-30 18:33:49 -0700
committerCommit bot <commit-bot@chromium.org>2015-10-31 01:34:39 +0000
commit6928da07fffc8094df1246feade73ae8ae63fb5c (patch)
tree6d4f5ef9f91f6d28f315f15d87f3ba9df323a3a3 /remoting
parent917cff5ef74aa53a964e6b852602ac51aa5ea838 (diff)
downloadchromium_src-6928da07fffc8094df1246feade73ae8ae63fb5c.zip
chromium_src-6928da07fffc8094df1246feade73ae8ae63fb5c.tar.gz
chromium_src-6928da07fffc8094df1246feade73ae8ae63fb5c.tar.bz2
Set encode-time when done encoding a frame.
BUG= Review URL: https://codereview.chromium.org/1417293004 Cr-Commit-Position: refs/heads/master@{#357252}
Diffstat (limited to 'remoting')
-rw-r--r--remoting/host/video_frame_pump.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/remoting/host/video_frame_pump.cc b/remoting/host/video_frame_pump.cc
index 58b72db..9c82efe 100644
--- a/remoting/host/video_frame_pump.cc
+++ b/remoting/host/video_frame_pump.cc
@@ -162,6 +162,9 @@ scoped_ptr<VideoFramePump::PacketWithTimestamps> VideoFramePump::EncodeFrame(
packet->set_capture_time_ms(frame->capture_time_ms());
timestamps->encode_ended_time = base::TimeTicks::Now();
+ packet->set_encode_time_ms(
+ (timestamps->encode_ended_time - timestamps->encode_started_time)
+ .InMilliseconds());
return make_scoped_ptr(
new PacketWithTimestamps(packet.Pass(), timestamps.Pass()));