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

Side by Side Diff: remoting/protocol/webrtc_connection_to_host.h

Issue 1580823003: Implement client-side video stream support for WebRTC-based protocol. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@packet_options_rem
Patch Set: Created 4 years, 11 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
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #ifndef REMOTING_PROTOCOL_WEBRTC_CONNECTION_TO_HOST_H_ 5 #ifndef REMOTING_PROTOCOL_WEBRTC_CONNECTION_TO_HOST_H_
6 #define REMOTING_PROTOCOL_WEBRTC_CONNECTION_TO_HOST_H_ 6 #define REMOTING_PROTOCOL_WEBRTC_CONNECTION_TO_HOST_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "remoting/protocol/channel_dispatcher_base.h" 12 #include "remoting/protocol/channel_dispatcher_base.h"
13 #include "remoting/protocol/clipboard_filter.h" 13 #include "remoting/protocol/clipboard_filter.h"
14 #include "remoting/protocol/connection_to_host.h" 14 #include "remoting/protocol/connection_to_host.h"
15 #include "remoting/protocol/errors.h" 15 #include "remoting/protocol/errors.h"
16 #include "remoting/protocol/input_filter.h" 16 #include "remoting/protocol/input_filter.h"
17 #include "remoting/protocol/session.h" 17 #include "remoting/protocol/session.h"
18 #include "remoting/protocol/webrtc_transport.h" 18 #include "remoting/protocol/webrtc_transport.h"
19 19
20 namespace remoting { 20 namespace remoting {
21 namespace protocol { 21 namespace protocol {
22 22
23 class ClientControlDispatcher; 23 class ClientControlDispatcher;
24 class ClientEventDispatcher; 24 class ClientEventDispatcher;
25 class SessionConfig; 25 class SessionConfig;
26 class WebrtcVideoRendererAdapter;
26 27
27 class WebrtcConnectionToHost : public ConnectionToHost, 28 class WebrtcConnectionToHost : public ConnectionToHost,
28 public Session::EventHandler, 29 public Session::EventHandler,
29 public WebrtcTransport::EventHandler, 30 public WebrtcTransport::EventHandler,
30 public ChannelDispatcherBase::EventHandler { 31 public ChannelDispatcherBase::EventHandler {
31 public: 32 public:
32 WebrtcConnectionToHost(); 33 WebrtcConnectionToHost();
33 ~WebrtcConnectionToHost() override; 34 ~WebrtcConnectionToHost() override;
34 35
35 // ConnectionToHost interface. 36 // ConnectionToHost interface.
(...skipping 11 matching lines...) Expand all
47 State state() const override; 48 State state() const override;
48 49
49 private: 50 private:
50 // Session::EventHandler interface. 51 // Session::EventHandler interface.
51 void OnSessionStateChange(Session::State state) override; 52 void OnSessionStateChange(Session::State state) override;
52 53
53 // WebrtcTransport::EventHandler interface. 54 // WebrtcTransport::EventHandler interface.
54 void OnWebrtcTransportConnecting() override; 55 void OnWebrtcTransportConnecting() override;
55 void OnWebrtcTransportConnected() override; 56 void OnWebrtcTransportConnected() override;
56 void OnWebrtcTransportError(ErrorCode error) override; 57 void OnWebrtcTransportError(ErrorCode error) override;
58 void OnWebrtcTransportMediaStreamAdded(
59 scoped_refptr<webrtc::MediaStreamInterface> stream) override;
60 void OnWebrtcTransportMediaStreamRemoved(
61 scoped_refptr<webrtc::MediaStreamInterface> stream) override;
57 62
58 // ChannelDispatcherBase::EventHandler interface. 63 // ChannelDispatcherBase::EventHandler interface.
59 void OnChannelInitialized(ChannelDispatcherBase* channel_dispatcher) override; 64 void OnChannelInitialized(ChannelDispatcherBase* channel_dispatcher) override;
60 void OnChannelError(ChannelDispatcherBase* channel_dispatcher, 65 void OnChannelError(ChannelDispatcherBase* channel_dispatcher,
61 ErrorCode error) override; 66 ErrorCode error) override;
62 67
63 void NotifyIfChannelsReady(); 68 void NotifyIfChannelsReady();
64 69
65 void CloseChannels(); 70 void CloseChannels();
66 71
67 void SetState(State state, ErrorCode error); 72 void SetState(State state, ErrorCode error);
68 73
69 HostEventCallback* event_callback_ = nullptr; 74 HostEventCallback* event_callback_ = nullptr;
70 75
71 // Stub for incoming messages. 76 // Stub for incoming messages.
72 ClientStub* client_stub_ = nullptr; 77 ClientStub* client_stub_ = nullptr;
78 VideoRenderer* video_renderer_ = nullptr;
73 ClipboardStub* clipboard_stub_ = nullptr; 79 ClipboardStub* clipboard_stub_ = nullptr;
74 80
75 scoped_ptr<Session> session_; 81 scoped_ptr<Session> session_;
76 scoped_ptr<WebrtcTransport> transport_; 82 scoped_ptr<WebrtcTransport> transport_;
77 83
78 scoped_ptr<ClientControlDispatcher> control_dispatcher_; 84 scoped_ptr<ClientControlDispatcher> control_dispatcher_;
79 scoped_ptr<ClientEventDispatcher> event_dispatcher_; 85 scoped_ptr<ClientEventDispatcher> event_dispatcher_;
80 ClipboardFilter clipboard_forwarder_; 86 ClipboardFilter clipboard_forwarder_;
81 InputFilter event_forwarder_; 87 InputFilter event_forwarder_;
82 88
89 scoped_ptr<WebrtcVideoRendererAdapter> video_adapter_;
90
83 // Internal state of the connection. 91 // Internal state of the connection.
84 State state_ = INITIALIZING; 92 State state_ = INITIALIZING;
85 ErrorCode error_ = OK; 93 ErrorCode error_ = OK;
86 94
87 private: 95 private:
88 DISALLOW_COPY_AND_ASSIGN(WebrtcConnectionToHost); 96 DISALLOW_COPY_AND_ASSIGN(WebrtcConnectionToHost);
89 }; 97 };
90 98
91 } // namespace protocol 99 } // namespace protocol
92 } // namespace remoting 100 } // namespace remoting
93 101
94 #endif // REMOTING_PROTOCOL_WEBRTC_CONNECTION_TO_HOST_H_ 102 #endif // REMOTING_PROTOCOL_WEBRTC_CONNECTION_TO_HOST_H_
OLDNEW
« no previous file with comments | « remoting/protocol/webrtc_connection_to_client.cc ('k') | remoting/protocol/webrtc_connection_to_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698