OLD | NEW |
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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 } | 192 } |
193 bool rtcp_transport_enabled() const { return rtcp_transport_enabled_; } | 193 bool rtcp_transport_enabled() const { return rtcp_transport_enabled_; } |
194 | 194 |
195 void ConnectToTransportChannel(TransportChannel* tc); | 195 void ConnectToTransportChannel(TransportChannel* tc); |
196 void DisconnectFromTransportChannel(TransportChannel* tc); | 196 void DisconnectFromTransportChannel(TransportChannel* tc); |
197 | 197 |
198 void FlushRtcpMessages(); | 198 void FlushRtcpMessages(); |
199 | 199 |
200 // NetworkInterface implementation, called by MediaEngine | 200 // NetworkInterface implementation, called by MediaEngine |
201 virtual bool SendPacket(rtc::Buffer* packet, | 201 virtual bool SendPacket(rtc::Buffer* packet, |
202 rtc::DiffServCodePoint dscp); | 202 const rtc::PacketOptions& options); |
203 virtual bool SendRtcp(rtc::Buffer* packet, | 203 virtual bool SendRtcp(rtc::Buffer* packet, const rtc::PacketOptions& options); |
204 rtc::DiffServCodePoint dscp); | |
205 | 204 |
206 // From TransportChannel | 205 // From TransportChannel |
207 void OnWritableState(TransportChannel* channel); | 206 void OnWritableState(TransportChannel* channel); |
208 virtual void OnChannelRead(TransportChannel* channel, | 207 virtual void OnChannelRead(TransportChannel* channel, |
209 const char* data, | 208 const char* data, |
210 size_t len, | 209 size_t len, |
211 const rtc::PacketTime& packet_time, | 210 const rtc::PacketTime& packet_time, |
212 int flags); | 211 int flags); |
213 void OnReadyToSend(TransportChannel* channel); | 212 void OnReadyToSend(TransportChannel* channel); |
214 | 213 |
215 bool PacketIsRtcp(const TransportChannel* channel, const char* data, | 214 bool PacketIsRtcp(const TransportChannel* channel, const char* data, |
216 size_t len); | 215 size_t len); |
217 bool SendPacket(bool rtcp, rtc::Buffer* packet, | 216 bool SendPacket(bool rtcp, |
218 rtc::DiffServCodePoint dscp); | 217 rtc::Buffer* packet, |
| 218 const rtc::PacketOptions& options); |
219 virtual bool WantsPacket(bool rtcp, rtc::Buffer* packet); | 219 virtual bool WantsPacket(bool rtcp, rtc::Buffer* packet); |
220 void HandlePacket(bool rtcp, rtc::Buffer* packet, | 220 void HandlePacket(bool rtcp, rtc::Buffer* packet, |
221 const rtc::PacketTime& packet_time); | 221 const rtc::PacketTime& packet_time); |
222 | 222 |
223 void EnableMedia_w(); | 223 void EnableMedia_w(); |
224 void DisableMedia_w(); | 224 void DisableMedia_w(); |
225 void UpdateWritableState_w(); | 225 void UpdateWritableState_w(); |
226 void ChannelWritable_w(); | 226 void ChannelWritable_w(); |
227 void ChannelNotWritable_w(); | 227 void ChannelNotWritable_w(); |
228 bool AddRecvStream_w(const StreamParams& sp); | 228 bool AddRecvStream_w(const StreamParams& sp); |
(...skipping 25 matching lines...) Expand all Loading... |
254 ContentAction action, | 254 ContentAction action, |
255 std::string* error_desc) = 0; | 255 std::string* error_desc) = 0; |
256 bool SetRtpTransportParameters_w(const MediaContentDescription* content, | 256 bool SetRtpTransportParameters_w(const MediaContentDescription* content, |
257 ContentAction action, | 257 ContentAction action, |
258 ContentSource src, | 258 ContentSource src, |
259 std::string* error_desc); | 259 std::string* error_desc); |
260 | 260 |
261 // Helper method to get RTP Absoulute SendTime extension header id if | 261 // Helper method to get RTP Absoulute SendTime extension header id if |
262 // present in remote supported extensions list. | 262 // present in remote supported extensions list. |
263 void MaybeCacheRtpAbsSendTimeHeaderExtension( | 263 void MaybeCacheRtpAbsSendTimeHeaderExtension( |
264 const std::vector<RtpHeaderExtension>& extensions); | 264 const std::vector<RtpHeaderExtension>& extensions); |
265 | 265 |
266 bool CheckSrtpConfig(const std::vector<CryptoParams>& cryptos, | 266 bool CheckSrtpConfig(const std::vector<CryptoParams>& cryptos, |
267 bool* dtls, | 267 bool* dtls, |
268 std::string* error_desc); | 268 std::string* error_desc); |
269 bool SetSrtp_w(const std::vector<CryptoParams>& params, | 269 bool SetSrtp_w(const std::vector<CryptoParams>& params, |
270 ContentAction action, | 270 ContentAction action, |
271 ContentSource src, | 271 ContentSource src, |
272 std::string* error_desc); | 272 std::string* error_desc); |
273 void ActivateRtcpMux_w(); | 273 void ActivateRtcpMux_w(); |
274 bool SetRtcpMux_w(bool enable, | 274 bool SetRtcpMux_w(bool enable, |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
463 SignalConnectionMonitor; | 463 SignalConnectionMonitor; |
464 | 464 |
465 void StartMediaMonitor(int cms); | 465 void StartMediaMonitor(int cms); |
466 void StopMediaMonitor(); | 466 void StopMediaMonitor(); |
467 sigslot::signal2<VideoChannel*, const VideoMediaInfo&> SignalMediaMonitor; | 467 sigslot::signal2<VideoChannel*, const VideoMediaInfo&> SignalMediaMonitor; |
468 sigslot::signal2<uint32_t, rtc::WindowEvent> SignalScreencastWindowEvent; | 468 sigslot::signal2<uint32_t, rtc::WindowEvent> SignalScreencastWindowEvent; |
469 | 469 |
470 bool SendIntraFrame(); | 470 bool SendIntraFrame(); |
471 bool RequestIntraFrame(); | 471 bool RequestIntraFrame(); |
472 | 472 |
473 // Configure sending media on the stream with SSRC |ssrc| | |
474 // If there is only one sending stream SSRC 0 can be used. | |
475 bool SetVideoSend(uint32_t ssrc, bool enable, const VideoOptions* options); | 473 bool SetVideoSend(uint32_t ssrc, bool enable, const VideoOptions* options); |
476 | 474 |
477 private: | 475 private: |
478 typedef std::map<uint32_t, VideoCapturer*> ScreencastMap; | 476 typedef std::map<uint32_t, VideoCapturer*> ScreencastMap; |
479 struct ScreencastDetailsData; | 477 struct ScreencastDetailsData; |
480 | 478 |
481 // overrides from BaseChannel | 479 // overrides from BaseChannel |
482 virtual void ChangeState(); | 480 virtual void ChangeState(); |
483 virtual const ContentInfo* GetFirstContent(const SessionDescription* sdesc); | 481 virtual const ContentInfo* GetFirstContent(const SessionDescription* sdesc); |
484 virtual bool SetLocalContent_w(const MediaContentDescription* content, | 482 virtual bool SetLocalContent_w(const MediaContentDescription* content, |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
636 // SetSendParameters. | 634 // SetSendParameters. |
637 DataSendParameters last_send_params_; | 635 DataSendParameters last_send_params_; |
638 // Last DataRecvParameters sent down to the media_channel() via | 636 // Last DataRecvParameters sent down to the media_channel() via |
639 // SetRecvParameters. | 637 // SetRecvParameters. |
640 DataRecvParameters last_recv_params_; | 638 DataRecvParameters last_recv_params_; |
641 }; | 639 }; |
642 | 640 |
643 } // namespace cricket | 641 } // namespace cricket |
644 | 642 |
645 #endif // TALK_SESSION_MEDIA_CHANNEL_H_ | 643 #endif // TALK_SESSION_MEDIA_CHANNEL_H_ |
OLD | NEW |