| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include <utility> | 5 #include <utility> |
| 6 | 6 |
| 7 #include "base/base64.h" | 7 #include "base/base64.h" |
| 8 #include "base/files/file_util.h" | 8 #include "base/files/file_util.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 const protocol::PairingResponse& pairing_response) override {} | 116 const protocol::PairingResponse& pairing_response) override {} |
| 117 void DeliverHostMessage(const protocol::ExtensionMessage& message) override {} | 117 void DeliverHostMessage(const protocol::ExtensionMessage& message) override {} |
| 118 protocol::ClipboardStub* GetClipboardStub() override { return nullptr; } | 118 protocol::ClipboardStub* GetClipboardStub() override { return nullptr; } |
| 119 protocol::CursorShapeStub* GetCursorShapeStub() override { | 119 protocol::CursorShapeStub* GetCursorShapeStub() override { |
| 120 return &cursor_shape_stub_; | 120 return &cursor_shape_stub_; |
| 121 } | 121 } |
| 122 | 122 |
| 123 // VideoRenderer interface. | 123 // VideoRenderer interface. |
| 124 void OnSessionConfig(const protocol::SessionConfig& config) override {} | 124 void OnSessionConfig(const protocol::SessionConfig& config) override {} |
| 125 protocol::VideoStub* GetVideoStub() override { return this; } | 125 protocol::VideoStub* GetVideoStub() override { return this; } |
| 126 protocol::FrameConsumer* GetFrameConsumer() override { |
| 127 NOTREACHED(); |
| 128 return nullptr; |
| 129 } |
| 126 | 130 |
| 127 // protocol::VideoStub interface. | 131 // protocol::VideoStub interface. |
| 128 void ProcessVideoPacket(scoped_ptr<VideoPacket> video_packet, | 132 void ProcessVideoPacket(scoped_ptr<VideoPacket> video_packet, |
| 129 const base::Closure& done) override { | 133 const base::Closure& done) override { |
| 130 if (video_packet->data().empty()) { | 134 if (video_packet->data().empty()) { |
| 131 // Ignore keep-alive packets | 135 // Ignore keep-alive packets |
| 132 done.Run(); | 136 done.Run(); |
| 133 return; | 137 return; |
| 134 } | 138 } |
| 135 | 139 |
| (...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 482 << "ms Encode: " << last_video_packet_->encode_time_ms() | 486 << "ms Encode: " << last_video_packet_->encode_time_ms() |
| 483 << "ms Capture: " << last_video_packet_->capture_time_ms() | 487 << "ms Capture: " << last_video_packet_->capture_time_ms() |
| 484 << "ms"; | 488 << "ms"; |
| 485 sum += latency; | 489 sum += latency; |
| 486 } | 490 } |
| 487 | 491 |
| 488 LOG(INFO) << "Average: " << (sum / kFrames).InMillisecondsF(); | 492 LOG(INFO) << "Average: " << (sum / kFrames).InMillisecondsF(); |
| 489 } | 493 } |
| 490 | 494 |
| 491 } // namespace remoting | 495 } // namespace remoting |
| OLD | NEW |