OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "remoting/protocol/host_video_stats_dispatcher.h" |
| 6 |
| 7 #include <utility> |
| 8 |
| 9 #include "base/bind.h" |
| 10 #include "net/socket/stream_socket.h" |
| 11 #include "remoting/base/compound_buffer.h" |
| 12 #include "remoting/base/constants.h" |
| 13 #include "remoting/proto/video_stats.pb.h" |
| 14 #include "remoting/protocol/frame_stats.h" |
| 15 #include "remoting/protocol/message_pipe.h" |
| 16 #include "remoting/protocol/message_serialization.h" |
| 17 #include "remoting/protocol/video_stats_stub.h" |
| 18 |
| 19 namespace remoting { |
| 20 namespace protocol { |
| 21 |
| 22 HostVideoStatsDispatcher::HostVideoStatsDispatcher( |
| 23 const std::string& stream_name) |
| 24 : ChannelDispatcherBase(kVideoStatsChannelNamePrefix + stream_name) {} |
| 25 |
| 26 HostVideoStatsDispatcher::~HostVideoStatsDispatcher() {} |
| 27 |
| 28 void HostVideoStatsDispatcher::OnVideoFrameStats(uint32_t frame_id, |
| 29 const HostFrameStats& stats) { |
| 30 FrameStatsMessage message; |
| 31 message.set_frame_id(frame_id); |
| 32 stats.ToFrameStatsMessage(&message); |
| 33 message_pipe()->Send(&message, base::Closure()); |
| 34 } |
| 35 |
| 36 void HostVideoStatsDispatcher::OnIncomingMessage( |
| 37 std::unique_ptr<CompoundBuffer> message) {} |
| 38 |
| 39 } // namespace protocol |
| 40 } // namespace remoting |
OLD | NEW |