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

Side by Side Diff: remoting/protocol/host_video_stats_dispatcher.cc

Issue 2176443002: Add client and host dispatchers for video_stats channel to send video stats from host to client. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@simple_channel
Patch Set: . Created 4 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 unified diff | Download patch
OLDNEW
(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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698