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

Side by Side Diff: remoting/host/session_manager.h

Issue 4136010: Cleanups in the video encoding decoding code. Reenable VP8. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed arm build Created 10 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « remoting/host/mock_objects.h ('k') | remoting/host/session_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_HOST_RECORD_SESSION_H_ 5 #ifndef REMOTING_HOST_RECORD_SESSION_H_
6 #define REMOTING_HOST_RECORD_SESSION_H_ 6 #define REMOTING_HOST_RECORD_SESSION_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/message_loop.h" 11 #include "base/message_loop.h"
12 #include "base/ref_counted.h" 12 #include "base/ref_counted.h"
13 #include "base/scoped_ptr.h" 13 #include "base/scoped_ptr.h"
14 #include "base/time.h" 14 #include "base/time.h"
15 #include "remoting/base/encoder.h" 15 #include "remoting/base/encoder.h"
16 #include "remoting/host/capturer.h" 16 #include "remoting/host/capturer.h"
17 // TODO(hclam): This class should not know the internal protobuf types. 17 #include "remoting/proto/video.pb.h"
18 #include "remoting/proto/internal.pb.h"
19 18
20 namespace remoting { 19 namespace remoting {
21 20
22 class CaptureData; 21 class CaptureData;
23 class ClientConnection; 22 class ClientConnection;
24 23
25 // A class for controlling and coordinate Capturer, Encoder 24 // A class for controlling and coordinate Capturer, Encoder
26 // and NetworkChannel in a record session. 25 // and NetworkChannel in a record session.
27 // 26 //
28 // THREADING 27 // THREADING
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 118
120 void DoStartRateControl(); 119 void DoStartRateControl();
121 void DoPauseRateControl(); 120 void DoPauseRateControl();
122 121
123 // Helper method to schedule next rate regulation task. 122 // Helper method to schedule next rate regulation task.
124 void ScheduleNextRateControl(); 123 void ScheduleNextRateControl();
125 124
126 void DoRateControl(); 125 void DoRateControl();
127 126
128 // DoSendUpdate takes ownership of header and is responsible for deleting it. 127 // DoSendUpdate takes ownership of header and is responsible for deleting it.
129 void DoSendUpdate(ChromotingHostMessage* message, 128 void DoSendVideoPacket(VideoPacket* packet);
130 Encoder::EncodingState state);
131 void DoSendInit(scoped_refptr<ClientConnection> client, 129 void DoSendInit(scoped_refptr<ClientConnection> client,
132 int width, int height); 130 int width, int height);
133 131
134 void DoAddClient(scoped_refptr<ClientConnection> client); 132 void DoAddClient(scoped_refptr<ClientConnection> client);
135 void DoRemoveClient(scoped_refptr<ClientConnection> client); 133 void DoRemoveClient(scoped_refptr<ClientConnection> client);
136 void DoRemoveAllClients(); 134 void DoRemoveAllClients();
137 135
138 // Encoder thread ----------------------------------------------------------- 136 // Encoder thread -----------------------------------------------------------
139 137
140 void DoEncode(scoped_refptr<CaptureData> capture_data); 138 void DoEncode(scoped_refptr<CaptureData> capture_data);
141 139
142 // EncodeDataAvailableTask takes ownership of header and is responsible for 140 // EncodeDataAvailableTask takes ownership of header and is responsible for
143 // deleting it. 141 // deleting it.
144 void EncodeDataAvailableTask(ChromotingHostMessage* message, 142 void EncodeDataAvailableTask(VideoPacket* packet);
145 Encoder::EncodingState state);
146 143
147 // Message loops used by this class. 144 // Message loops used by this class.
148 MessageLoop* capture_loop_; 145 MessageLoop* capture_loop_;
149 MessageLoop* encode_loop_; 146 MessageLoop* encode_loop_;
150 MessageLoop* network_loop_; 147 MessageLoop* network_loop_;
151 148
152 // Reference to the capturer. This member is always accessed on the capture 149 // Reference to the capturer. This member is always accessed on the capture
153 // thread. 150 // thread.
154 scoped_ptr<Capturer> capturer_; 151 scoped_ptr<Capturer> capturer_;
155 152
(...skipping 21 matching lines...) Expand all
177 174
178 // The following member is accessed on the network thread. 175 // The following member is accessed on the network thread.
179 bool rate_control_started_; 176 bool rate_control_started_;
180 177
181 DISALLOW_COPY_AND_ASSIGN(SessionManager); 178 DISALLOW_COPY_AND_ASSIGN(SessionManager);
182 }; 179 };
183 180
184 } // namespace remoting 181 } // namespace remoting
185 182
186 #endif // REMOTING_HOST_RECORD_SESSION_H_ 183 #endif // REMOTING_HOST_RECORD_SESSION_H_
OLDNEW
« no previous file with comments | « remoting/host/mock_objects.h ('k') | remoting/host/session_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698