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

Side by Side Diff: talk/session/media/channel.h

Issue 1363573002: Wire up transport sequence number / send time callbacks to webrtc via libjingle. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: . Created 5 years, 2 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 /* 1 /*
2 * libjingle 2 * libjingle
3 * Copyright 2004 Google Inc. 3 * Copyright 2004 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 virtual bool SendRtcp(rtc::Buffer* packet, 206 virtual bool SendRtcp(rtc::Buffer* packet,
207 rtc::DiffServCodePoint dscp); 207 rtc::DiffServCodePoint dscp);
208 208
209 // From TransportChannel 209 // From TransportChannel
210 void OnWritableState(TransportChannel* channel); 210 void OnWritableState(TransportChannel* channel);
211 virtual void OnChannelRead(TransportChannel* channel, 211 virtual void OnChannelRead(TransportChannel* channel,
212 const char* data, 212 const char* data,
213 size_t len, 213 size_t len,
214 const rtc::PacketTime& packet_time, 214 const rtc::PacketTime& packet_time,
215 int flags); 215 int flags);
216 void OnPacketSent(TransportChannel* channel,
217 const rtc::SentPacket& packet_sent);
216 void OnReadyToSend(TransportChannel* channel); 218 void OnReadyToSend(TransportChannel* channel);
217 219
218 bool PacketIsRtcp(const TransportChannel* channel, const char* data, 220 bool PacketIsRtcp(const TransportChannel* channel, const char* data,
219 size_t len); 221 size_t len);
220 bool SendPacket(bool rtcp, rtc::Buffer* packet, 222 bool SendPacket(bool rtcp, rtc::Buffer* packet,
221 rtc::DiffServCodePoint dscp); 223 rtc::DiffServCodePoint dscp);
222 virtual bool WantsPacket(bool rtcp, rtc::Buffer* packet); 224 virtual bool WantsPacket(bool rtcp, rtc::Buffer* packet);
223 void HandlePacket(bool rtcp, rtc::Buffer* packet, 225 void HandlePacket(bool rtcp, rtc::Buffer* packet,
224 const rtc::PacketTime& packet_time); 226 const rtc::PacketTime& packet_time);
225 227
(...skipping 28 matching lines...) Expand all
254 ContentAction action, 256 ContentAction action,
255 std::string* error_desc) = 0; 257 std::string* error_desc) = 0;
256 virtual bool SetRemoteContent_w(const MediaContentDescription* content, 258 virtual bool SetRemoteContent_w(const MediaContentDescription* content,
257 ContentAction action, 259 ContentAction action,
258 std::string* error_desc) = 0; 260 std::string* error_desc) = 0;
259 bool SetRtpTransportParameters_w(const MediaContentDescription* content, 261 bool SetRtpTransportParameters_w(const MediaContentDescription* content,
260 ContentAction action, 262 ContentAction action,
261 ContentSource src, 263 ContentSource src,
262 std::string* error_desc); 264 std::string* error_desc);
263 265
264 // Helper method to get RTP Absoulute SendTime extension header id if 266 // Helper method to store a subset of the RTP header extensions, if
265 // present in remote supported extensions list. 267 // present in the remote supported extensions list.
266 void MaybeCacheRtpAbsSendTimeHeaderExtension( 268 void MaybeCacheRtpHeaderExtensions(
267 const std::vector<RtpHeaderExtension>& extensions); 269 const std::vector<RtpHeaderExtension>& extensions);
268 270
269 bool CheckSrtpConfig(const std::vector<CryptoParams>& cryptos, 271 bool CheckSrtpConfig(const std::vector<CryptoParams>& cryptos,
270 bool* dtls, 272 bool* dtls,
271 std::string* error_desc); 273 std::string* error_desc);
272 bool SetSrtp_w(const std::vector<CryptoParams>& params, 274 bool SetSrtp_w(const std::vector<CryptoParams>& params,
273 ContentAction action, 275 ContentAction action,
274 ContentSource src, 276 ContentSource src,
275 std::string* error_desc); 277 std::string* error_desc);
276 void ActivateRtcpMux_w(); 278 void ActivateRtcpMux_w();
277 bool SetRtcpMux_w(bool enable, 279 bool SetRtcpMux_w(bool enable,
(...skipping 10 matching lines...) Expand all
288 virtual void OnConnectionMonitorUpdate(ConnectionMonitor* monitor, 290 virtual void OnConnectionMonitorUpdate(ConnectionMonitor* monitor,
289 const std::vector<ConnectionInfo>& infos) = 0; 291 const std::vector<ConnectionInfo>& infos) = 0;
290 292
291 // Helper function for invoking bool-returning methods on the worker thread. 293 // Helper function for invoking bool-returning methods on the worker thread.
292 template <class FunctorT> 294 template <class FunctorT>
293 bool InvokeOnWorker(const FunctorT& functor) { 295 bool InvokeOnWorker(const FunctorT& functor) {
294 return worker_thread_->Invoke<bool>(functor); 296 return worker_thread_->Invoke<bool>(functor);
295 } 297 }
296 298
297 private: 299 private:
300 int32_t ParseTransportSequenceNumberHeaderExtension(uint8_t* data,
301 size_t length) const;
302
298 rtc::Thread* worker_thread_; 303 rtc::Thread* worker_thread_;
299 TransportController* transport_controller_; 304 TransportController* transport_controller_;
300 MediaChannel* media_channel_; 305 MediaChannel* media_channel_;
301 std::vector<StreamParams> local_streams_; 306 std::vector<StreamParams> local_streams_;
302 std::vector<StreamParams> remote_streams_; 307 std::vector<StreamParams> remote_streams_;
303 308
304 const std::string content_name_; 309 const std::string content_name_;
305 std::string transport_name_; 310 std::string transport_name_;
306 bool rtcp_transport_enabled_; 311 bool rtcp_transport_enabled_;
307 TransportChannel* transport_channel_; 312 TransportChannel* transport_channel_;
308 std::vector<std::pair<rtc::Socket::Option, int> > socket_options_; 313 std::vector<std::pair<rtc::Socket::Option, int> > socket_options_;
309 TransportChannel* rtcp_transport_channel_; 314 TransportChannel* rtcp_transport_channel_;
310 std::vector<std::pair<rtc::Socket::Option, int> > rtcp_socket_options_; 315 std::vector<std::pair<rtc::Socket::Option, int> > rtcp_socket_options_;
311 SrtpFilter srtp_filter_; 316 SrtpFilter srtp_filter_;
312 RtcpMuxFilter rtcp_mux_filter_; 317 RtcpMuxFilter rtcp_mux_filter_;
313 BundleFilter bundle_filter_; 318 BundleFilter bundle_filter_;
314 rtc::scoped_ptr<ConnectionMonitor> connection_monitor_; 319 rtc::scoped_ptr<ConnectionMonitor> connection_monitor_;
315 bool enabled_; 320 bool enabled_;
316 bool writable_; 321 bool writable_;
317 bool rtp_ready_to_send_; 322 bool rtp_ready_to_send_;
318 bool rtcp_ready_to_send_; 323 bool rtcp_ready_to_send_;
319 bool was_ever_writable_; 324 bool was_ever_writable_;
320 MediaContentDirection local_content_direction_; 325 MediaContentDirection local_content_direction_;
321 MediaContentDirection remote_content_direction_; 326 MediaContentDirection remote_content_direction_;
322 bool has_received_packet_; 327 bool has_received_packet_;
323 bool dtls_keyed_; 328 bool dtls_keyed_;
324 bool secure_required_; 329 bool secure_required_;
325 int rtp_abs_sendtime_extn_id_; 330 int rtp_abs_sendtime_extn_id_;
331 int rtp_transport_sequence_number_extn_id_;
326 }; 332 };
327 333
328 // VoiceChannel is a specialization that adds support for early media, DTMF, 334 // VoiceChannel is a specialization that adds support for early media, DTMF,
329 // and input/output level monitoring. 335 // and input/output level monitoring.
330 class VoiceChannel : public BaseChannel { 336 class VoiceChannel : public BaseChannel {
331 public: 337 public:
332 VoiceChannel(rtc::Thread* thread, 338 VoiceChannel(rtc::Thread* thread,
333 MediaEngineInterface* media_engine, 339 MediaEngineInterface* media_engine,
334 VoiceMediaChannel* channel, 340 VoiceMediaChannel* channel,
335 TransportController* transport_controller, 341 TransportController* transport_controller,
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
658 // SetSendParameters. 664 // SetSendParameters.
659 DataSendParameters last_send_params_; 665 DataSendParameters last_send_params_;
660 // Last DataRecvParameters sent down to the media_channel() via 666 // Last DataRecvParameters sent down to the media_channel() via
661 // SetRecvParameters. 667 // SetRecvParameters.
662 DataRecvParameters last_recv_params_; 668 DataRecvParameters last_recv_params_;
663 }; 669 };
664 670
665 } // namespace cricket 671 } // namespace cricket
666 672
667 #endif // TALK_SESSION_MEDIA_CHANNEL_H_ 673 #endif // TALK_SESSION_MEDIA_CHANNEL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698