| 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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 | 206 |
| 207 // From TransportChannel | 207 // From TransportChannel |
| 208 void OnWritableState(TransportChannel* channel); | 208 void OnWritableState(TransportChannel* channel); |
| 209 virtual void OnChannelRead(TransportChannel* channel, | 209 virtual void OnChannelRead(TransportChannel* channel, |
| 210 const char* data, | 210 const char* data, |
| 211 size_t len, | 211 size_t len, |
| 212 const rtc::PacketTime& packet_time, | 212 const rtc::PacketTime& packet_time, |
| 213 int flags); | 213 int flags); |
| 214 void OnReadyToSend(TransportChannel* channel); | 214 void OnReadyToSend(TransportChannel* channel); |
| 215 | 215 |
| 216 void OnDtlsState(TransportChannel* channel, DtlsTransportState state); |
| 217 |
| 216 bool PacketIsRtcp(const TransportChannel* channel, const char* data, | 218 bool PacketIsRtcp(const TransportChannel* channel, const char* data, |
| 217 size_t len); | 219 size_t len); |
| 218 bool SendPacket(bool rtcp, | 220 bool SendPacket(bool rtcp, |
| 219 rtc::Buffer* packet, | 221 rtc::Buffer* packet, |
| 220 const rtc::PacketOptions& options); | 222 const rtc::PacketOptions& options); |
| 221 virtual bool WantsPacket(bool rtcp, rtc::Buffer* packet); | 223 virtual bool WantsPacket(bool rtcp, rtc::Buffer* packet); |
| 222 void HandlePacket(bool rtcp, rtc::Buffer* packet, | 224 void HandlePacket(bool rtcp, rtc::Buffer* packet, |
| 223 const rtc::PacketTime& packet_time); | 225 const rtc::PacketTime& packet_time); |
| 224 | 226 |
| 225 void EnableMedia_w(); | 227 void EnableMedia_w(); |
| 226 void DisableMedia_w(); | 228 void DisableMedia_w(); |
| 227 void UpdateWritableState_w(); | 229 void UpdateWritableState_w(); |
| 228 void ChannelWritable_w(); | 230 void ChannelWritable_w(); |
| 229 void ChannelNotWritable_w(); | 231 void ChannelNotWritable_w(); |
| 230 bool AddRecvStream_w(const StreamParams& sp); | 232 bool AddRecvStream_w(const StreamParams& sp); |
| 231 bool RemoveRecvStream_w(uint32_t ssrc); | 233 bool RemoveRecvStream_w(uint32_t ssrc); |
| 232 bool AddSendStream_w(const StreamParams& sp); | 234 bool AddSendStream_w(const StreamParams& sp); |
| 233 bool RemoveSendStream_w(uint32_t ssrc); | 235 bool RemoveSendStream_w(uint32_t ssrc); |
| 234 virtual bool ShouldSetupDtlsSrtp() const; | 236 virtual bool ShouldSetupDtlsSrtp() const; |
| 235 // Do the DTLS key expansion and impose it on the SRTP/SRTCP filters. | 237 // Do the DTLS key expansion and impose it on the SRTP/SRTCP filters. |
| 236 // |rtcp_channel| indicates whether to set up the RTP or RTCP filter. | 238 // |rtcp_channel| indicates whether to set up the RTP or RTCP filter. |
| 237 bool SetupDtlsSrtp(bool rtcp_channel); | 239 bool SetupDtlsSrtp(bool rtcp_channel); |
| 240 void MaybeSetupDtlsSrtp_w(); |
| 238 // Set the DTLS-SRTP cipher policy on this channel as appropriate. | 241 // Set the DTLS-SRTP cipher policy on this channel as appropriate. |
| 239 bool SetDtlsSrtpCryptoSuites(TransportChannel* tc, bool rtcp); | 242 bool SetDtlsSrtpCryptoSuites(TransportChannel* tc, bool rtcp); |
| 240 | 243 |
| 241 virtual void ChangeState() = 0; | 244 virtual void ChangeState() = 0; |
| 242 | 245 |
| 243 // Gets the content info appropriate to the channel (audio or video). | 246 // Gets the content info appropriate to the channel (audio or video). |
| 244 virtual const ContentInfo* GetFirstContent( | 247 virtual const ContentInfo* GetFirstContent( |
| 245 const SessionDescription* sdesc) = 0; | 248 const SessionDescription* sdesc) = 0; |
| 246 bool UpdateLocalStreams_w(const std::vector<StreamParams>& streams, | 249 bool UpdateLocalStreams_w(const std::vector<StreamParams>& streams, |
| 247 ContentAction action, | 250 ContentAction action, |
| (...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 633 // SetSendParameters. | 636 // SetSendParameters. |
| 634 DataSendParameters last_send_params_; | 637 DataSendParameters last_send_params_; |
| 635 // Last DataRecvParameters sent down to the media_channel() via | 638 // Last DataRecvParameters sent down to the media_channel() via |
| 636 // SetRecvParameters. | 639 // SetRecvParameters. |
| 637 DataRecvParameters last_recv_params_; | 640 DataRecvParameters last_recv_params_; |
| 638 }; | 641 }; |
| 639 | 642 |
| 640 } // namespace cricket | 643 } // namespace cricket |
| 641 | 644 |
| 642 #endif // TALK_SESSION_MEDIA_CHANNEL_H_ | 645 #endif // TALK_SESSION_MEDIA_CHANNEL_H_ |
| OLD | NEW |