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

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

Issue 1999853002: Forward the SignalFirstPacketReceived to RtpReceiver. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Modification based on CR comments. Modified the peerconnection_unittest. Rename some parameters. Created 4 years, 6 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
« webrtc/api/rtpreceiver.h ('K') | « webrtc/api/webrtcsession.cc ('k') | no next file » | 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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 // Made public for easier testing. 161 // Made public for easier testing.
162 void SetReadyToSend(bool rtcp, bool ready); 162 void SetReadyToSend(bool rtcp, bool ready);
163 163
164 // Only public for unit tests. Otherwise, consider protected. 164 // Only public for unit tests. Otherwise, consider protected.
165 int SetOption(SocketType type, rtc::Socket::Option o, int val) 165 int SetOption(SocketType type, rtc::Socket::Option o, int val)
166 override; 166 override;
167 int SetOption_n(SocketType type, rtc::Socket::Option o, int val); 167 int SetOption_n(SocketType type, rtc::Socket::Option o, int val);
168 168
169 SrtpFilter* srtp_filter() { return &srtp_filter_; } 169 SrtpFilter* srtp_filter() { return &srtp_filter_; }
170 170
171 virtual cricket::MediaType media_type() = 0;
172
171 protected: 173 protected:
172 virtual MediaChannel* media_channel() const { return media_channel_; } 174 virtual MediaChannel* media_channel() const { return media_channel_; }
173 // Sets the |transport_channel_| (and |rtcp_transport_channel_|, if |rtcp_| is 175 // Sets the |transport_channel_| (and |rtcp_transport_channel_|, if |rtcp_| is
174 // true). Gets the transport channels from |transport_controller_|. 176 // true). Gets the transport channels from |transport_controller_|.
175 bool SetTransport_n(const std::string& transport_name); 177 bool SetTransport_n(const std::string& transport_name);
176 178
177 void SetTransportChannel_n(TransportChannel* transport); 179 void SetTransportChannel_n(TransportChannel* transport);
178 void SetRtcpTransportChannel_n(TransportChannel* transport, 180 void SetRtcpTransportChannel_n(TransportChannel* transport,
179 bool update_writablity); 181 bool update_writablity);
180 182
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 sigslot::signal2<VoiceChannel*, const AudioInfo&> SignalAudioMonitor; 430 sigslot::signal2<VoiceChannel*, const AudioInfo&> SignalAudioMonitor;
429 431
430 int GetInputLevel_w(); 432 int GetInputLevel_w();
431 int GetOutputLevel_w(); 433 int GetOutputLevel_w();
432 void GetActiveStreams_w(AudioInfo::StreamList* actives); 434 void GetActiveStreams_w(AudioInfo::StreamList* actives);
433 webrtc::RtpParameters GetRtpSendParameters_w(uint32_t ssrc) const; 435 webrtc::RtpParameters GetRtpSendParameters_w(uint32_t ssrc) const;
434 bool SetRtpSendParameters_w(uint32_t ssrc, webrtc::RtpParameters parameters); 436 bool SetRtpSendParameters_w(uint32_t ssrc, webrtc::RtpParameters parameters);
435 webrtc::RtpParameters GetRtpReceiveParameters_w(uint32_t ssrc) const; 437 webrtc::RtpParameters GetRtpReceiveParameters_w(uint32_t ssrc) const;
436 bool SetRtpReceiveParameters_w(uint32_t ssrc, 438 bool SetRtpReceiveParameters_w(uint32_t ssrc,
437 webrtc::RtpParameters parameters); 439 webrtc::RtpParameters parameters);
440 cricket::MediaType media_type() override { return cricket::MEDIA_TYPE_AUDIO; }
438 441
439 private: 442 private:
440 // overrides from BaseChannel 443 // overrides from BaseChannel
441 void OnChannelRead(TransportChannel* channel, 444 void OnChannelRead(TransportChannel* channel,
442 const char* data, 445 const char* data,
443 size_t len, 446 size_t len,
444 const rtc::PacketTime& packet_time, 447 const rtc::PacketTime& packet_time,
445 int flags) override; 448 int flags) override;
446 void ChangeState_w() override; 449 void ChangeState_w() override;
447 const ContentInfo* GetFirstContent(const SessionDescription* sdesc) override; 450 const ContentInfo* GetFirstContent(const SessionDescription* sdesc) override;
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
514 bool SetVideoSend(uint32_t ssrc, 517 bool SetVideoSend(uint32_t ssrc,
515 bool enable, 518 bool enable,
516 const VideoOptions* options, 519 const VideoOptions* options,
517 rtc::VideoSourceInterface<cricket::VideoFrame>* source); 520 rtc::VideoSourceInterface<cricket::VideoFrame>* source);
518 webrtc::RtpParameters GetRtpSendParameters(uint32_t ssrc) const; 521 webrtc::RtpParameters GetRtpSendParameters(uint32_t ssrc) const;
519 bool SetRtpSendParameters(uint32_t ssrc, 522 bool SetRtpSendParameters(uint32_t ssrc,
520 const webrtc::RtpParameters& parameters); 523 const webrtc::RtpParameters& parameters);
521 webrtc::RtpParameters GetRtpReceiveParameters(uint32_t ssrc) const; 524 webrtc::RtpParameters GetRtpReceiveParameters(uint32_t ssrc) const;
522 bool SetRtpReceiveParameters(uint32_t ssrc, 525 bool SetRtpReceiveParameters(uint32_t ssrc,
523 const webrtc::RtpParameters& parameters); 526 const webrtc::RtpParameters& parameters);
527 cricket::MediaType media_type() override { return cricket::MEDIA_TYPE_VIDEO; }
524 528
525 private: 529 private:
526 // overrides from BaseChannel 530 // overrides from BaseChannel
527 void ChangeState_w() override; 531 void ChangeState_w() override;
528 const ContentInfo* GetFirstContent(const SessionDescription* sdesc) override; 532 const ContentInfo* GetFirstContent(const SessionDescription* sdesc) override;
529 bool SetLocalContent_w(const MediaContentDescription* content, 533 bool SetLocalContent_w(const MediaContentDescription* content,
530 ContentAction action, 534 ContentAction action,
531 std::string* error_desc) override; 535 std::string* error_desc) override;
532 bool SetRemoteContent_w(const MediaContentDescription* content, 536 bool SetRemoteContent_w(const MediaContentDescription* content,
533 ContentAction action, 537 ContentAction action,
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
585 sigslot::signal2<DataChannel*, const std::vector<ConnectionInfo>&> 589 sigslot::signal2<DataChannel*, const std::vector<ConnectionInfo>&>
586 SignalConnectionMonitor; 590 SignalConnectionMonitor;
587 sigslot::signal3<DataChannel*, const ReceiveDataParams&, 591 sigslot::signal3<DataChannel*, const ReceiveDataParams&,
588 const rtc::CopyOnWriteBuffer&> SignalDataReceived; 592 const rtc::CopyOnWriteBuffer&> SignalDataReceived;
589 // Signal for notifying when the channel becomes ready to send data. 593 // Signal for notifying when the channel becomes ready to send data.
590 // That occurs when the channel is enabled, the transport is writable, 594 // That occurs when the channel is enabled, the transport is writable,
591 // both local and remote descriptions are set, and the channel is unblocked. 595 // both local and remote descriptions are set, and the channel is unblocked.
592 sigslot::signal1<bool> SignalReadyToSendData; 596 sigslot::signal1<bool> SignalReadyToSendData;
593 // Signal for notifying that the remote side has closed the DataChannel. 597 // Signal for notifying that the remote side has closed the DataChannel.
594 sigslot::signal1<uint32_t> SignalStreamClosedRemotely; 598 sigslot::signal1<uint32_t> SignalStreamClosedRemotely;
599 cricket::MediaType media_type() override { return cricket::MEDIA_TYPE_DATA; }
595 600
596 protected: 601 protected:
597 // downcasts a MediaChannel. 602 // downcasts a MediaChannel.
598 DataMediaChannel* media_channel() const override { 603 DataMediaChannel* media_channel() const override {
599 return static_cast<DataMediaChannel*>(BaseChannel::media_channel()); 604 return static_cast<DataMediaChannel*>(BaseChannel::media_channel());
600 } 605 }
601 606
602 private: 607 private:
603 struct SendDataMessageData : public rtc::MessageData { 608 struct SendDataMessageData : public rtc::MessageData {
604 SendDataMessageData(const SendDataParams& params, 609 SendDataMessageData(const SendDataParams& params,
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
675 // SetSendParameters. 680 // SetSendParameters.
676 DataSendParameters last_send_params_; 681 DataSendParameters last_send_params_;
677 // Last DataRecvParameters sent down to the media_channel() via 682 // Last DataRecvParameters sent down to the media_channel() via
678 // SetRecvParameters. 683 // SetRecvParameters.
679 DataRecvParameters last_recv_params_; 684 DataRecvParameters last_recv_params_;
680 }; 685 };
681 686
682 } // namespace cricket 687 } // namespace cricket
683 688
684 #endif // WEBRTC_PC_CHANNEL_H_ 689 #endif // WEBRTC_PC_CHANNEL_H_
OLDNEW
« webrtc/api/rtpreceiver.h ('K') | « webrtc/api/webrtcsession.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698