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

Side by Side Diff: webrtc/pc/channel.h

Issue 2980923002: SignalPacketReceived should pass packet as a pointer instead of a non-const reference. (Closed)
Patch Set: Created 3 years, 5 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
« no previous file with comments | « no previous file | webrtc/pc/channel.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 /* 1 /*
2 * Copyright 2004 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2004 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 size_t len); 264 size_t len);
265 bool SendPacket(bool rtcp, 265 bool SendPacket(bool rtcp,
266 rtc::CopyOnWriteBuffer* packet, 266 rtc::CopyOnWriteBuffer* packet,
267 const rtc::PacketOptions& options); 267 const rtc::PacketOptions& options);
268 268
269 bool WantsPacket(bool rtcp, const rtc::CopyOnWriteBuffer* packet); 269 bool WantsPacket(bool rtcp, const rtc::CopyOnWriteBuffer* packet);
270 void HandlePacket(bool rtcp, rtc::CopyOnWriteBuffer* packet, 270 void HandlePacket(bool rtcp, rtc::CopyOnWriteBuffer* packet,
271 const rtc::PacketTime& packet_time); 271 const rtc::PacketTime& packet_time);
272 // TODO(zstein): packet can be const once the RtpTransport handles protection. 272 // TODO(zstein): packet can be const once the RtpTransport handles protection.
273 virtual void OnPacketReceived(bool rtcp, 273 virtual void OnPacketReceived(bool rtcp,
274 rtc::CopyOnWriteBuffer& packet, 274 rtc::CopyOnWriteBuffer* packet,
275 const rtc::PacketTime& packet_time); 275 const rtc::PacketTime& packet_time);
276 void ProcessPacket(bool rtcp, 276 void ProcessPacket(bool rtcp,
277 const rtc::CopyOnWriteBuffer& packet, 277 const rtc::CopyOnWriteBuffer& packet,
278 const rtc::PacketTime& packet_time); 278 const rtc::PacketTime& packet_time);
279 279
280 void EnableMedia_w(); 280 void EnableMedia_w();
281 void DisableMedia_w(); 281 void DisableMedia_w();
282 282
283 // Performs actions if the RTP/RTCP writable state changed. This should 283 // Performs actions if the RTP/RTCP writable state changed. This should
284 // be called whenever a channel's writable state changes or when RTCP muxing 284 // be called whenever a channel's writable state changes or when RTCP muxing
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 webrtc::RtpParameters GetRtpSendParameters_w(uint32_t ssrc) const; 498 webrtc::RtpParameters GetRtpSendParameters_w(uint32_t ssrc) const;
499 bool SetRtpSendParameters_w(uint32_t ssrc, webrtc::RtpParameters parameters); 499 bool SetRtpSendParameters_w(uint32_t ssrc, webrtc::RtpParameters parameters);
500 webrtc::RtpParameters GetRtpReceiveParameters_w(uint32_t ssrc) const; 500 webrtc::RtpParameters GetRtpReceiveParameters_w(uint32_t ssrc) const;
501 bool SetRtpReceiveParameters_w(uint32_t ssrc, 501 bool SetRtpReceiveParameters_w(uint32_t ssrc,
502 webrtc::RtpParameters parameters); 502 webrtc::RtpParameters parameters);
503 cricket::MediaType media_type() override { return cricket::MEDIA_TYPE_AUDIO; } 503 cricket::MediaType media_type() override { return cricket::MEDIA_TYPE_AUDIO; }
504 504
505 private: 505 private:
506 // overrides from BaseChannel 506 // overrides from BaseChannel
507 void OnPacketReceived(bool rtcp, 507 void OnPacketReceived(bool rtcp,
508 rtc::CopyOnWriteBuffer& packet, 508 rtc::CopyOnWriteBuffer* packet,
509 const rtc::PacketTime& packet_time) override; 509 const rtc::PacketTime& packet_time) override;
510 void UpdateMediaSendRecvState_w() override; 510 void UpdateMediaSendRecvState_w() override;
511 const ContentInfo* GetFirstContent(const SessionDescription* sdesc) override; 511 const ContentInfo* GetFirstContent(const SessionDescription* sdesc) override;
512 bool SetLocalContent_w(const MediaContentDescription* content, 512 bool SetLocalContent_w(const MediaContentDescription* content,
513 ContentAction action, 513 ContentAction action,
514 std::string* error_desc) override; 514 std::string* error_desc) override;
515 bool SetRemoteContent_w(const MediaContentDescription* content, 515 bool SetRemoteContent_w(const MediaContentDescription* content,
516 ContentAction action, 516 ContentAction action,
517 std::string* error_desc) override; 517 std::string* error_desc) override;
518 void HandleEarlyMediaTimeout(); 518 void HandleEarlyMediaTimeout();
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
728 // SetSendParameters. 728 // SetSendParameters.
729 DataSendParameters last_send_params_; 729 DataSendParameters last_send_params_;
730 // Last DataRecvParameters sent down to the media_channel() via 730 // Last DataRecvParameters sent down to the media_channel() via
731 // SetRecvParameters. 731 // SetRecvParameters.
732 DataRecvParameters last_recv_params_; 732 DataRecvParameters last_recv_params_;
733 }; 733 };
734 734
735 } // namespace cricket 735 } // namespace cricket
736 736
737 #endif // WEBRTC_PC_CHANNEL_H_ 737 #endif // WEBRTC_PC_CHANNEL_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/pc/channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698