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

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: Modified the unit test. 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
« no previous file with comments | « 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 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 sigslot::signal2<VoiceChannel*, const AudioInfo&> SignalAudioMonitor; 431 sigslot::signal2<VoiceChannel*, const AudioInfo&> SignalAudioMonitor;
430 432
431 int GetInputLevel_w(); 433 int GetInputLevel_w();
432 int GetOutputLevel_w(); 434 int GetOutputLevel_w();
433 void GetActiveStreams_w(AudioInfo::StreamList* actives); 435 void GetActiveStreams_w(AudioInfo::StreamList* actives);
434 webrtc::RtpParameters GetRtpSendParameters_w(uint32_t ssrc) const; 436 webrtc::RtpParameters GetRtpSendParameters_w(uint32_t ssrc) const;
435 bool SetRtpSendParameters_w(uint32_t ssrc, webrtc::RtpParameters parameters); 437 bool SetRtpSendParameters_w(uint32_t ssrc, webrtc::RtpParameters parameters);
436 webrtc::RtpParameters GetRtpReceiveParameters_w(uint32_t ssrc) const; 438 webrtc::RtpParameters GetRtpReceiveParameters_w(uint32_t ssrc) const;
437 bool SetRtpReceiveParameters_w(uint32_t ssrc, 439 bool SetRtpReceiveParameters_w(uint32_t ssrc,
438 webrtc::RtpParameters parameters); 440 webrtc::RtpParameters parameters);
441 cricket::MediaType media_type() override { return cricket::MEDIA_TYPE_AUDIO; }
439 442
440 private: 443 private:
441 // overrides from BaseChannel 444 // overrides from BaseChannel
442 void OnChannelRead(TransportChannel* channel, 445 void OnChannelRead(TransportChannel* channel,
443 const char* data, 446 const char* data,
444 size_t len, 447 size_t len,
445 const rtc::PacketTime& packet_time, 448 const rtc::PacketTime& packet_time,
446 int flags) override; 449 int flags) override;
447 void ChangeState_w() override; 450 void ChangeState_w() override;
448 const ContentInfo* GetFirstContent(const SessionDescription* sdesc) override; 451 const ContentInfo* GetFirstContent(const SessionDescription* sdesc) override;
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
513 bool SetVideoSend(uint32_t ssrc, 516 bool SetVideoSend(uint32_t ssrc,
514 bool enable, 517 bool enable,
515 const VideoOptions* options, 518 const VideoOptions* options,
516 rtc::VideoSourceInterface<cricket::VideoFrame>* source); 519 rtc::VideoSourceInterface<cricket::VideoFrame>* source);
517 webrtc::RtpParameters GetRtpSendParameters(uint32_t ssrc) const; 520 webrtc::RtpParameters GetRtpSendParameters(uint32_t ssrc) const;
518 bool SetRtpSendParameters(uint32_t ssrc, 521 bool SetRtpSendParameters(uint32_t ssrc,
519 const webrtc::RtpParameters& parameters); 522 const webrtc::RtpParameters& parameters);
520 webrtc::RtpParameters GetRtpReceiveParameters(uint32_t ssrc) const; 523 webrtc::RtpParameters GetRtpReceiveParameters(uint32_t ssrc) const;
521 bool SetRtpReceiveParameters(uint32_t ssrc, 524 bool SetRtpReceiveParameters(uint32_t ssrc,
522 const webrtc::RtpParameters& parameters); 525 const webrtc::RtpParameters& parameters);
526 cricket::MediaType media_type() override { return cricket::MEDIA_TYPE_VIDEO; }
523 527
524 private: 528 private:
525 // overrides from BaseChannel 529 // overrides from BaseChannel
526 void ChangeState_w() override; 530 void ChangeState_w() override;
527 const ContentInfo* GetFirstContent(const SessionDescription* sdesc) override; 531 const ContentInfo* GetFirstContent(const SessionDescription* sdesc) override;
528 bool SetLocalContent_w(const MediaContentDescription* content, 532 bool SetLocalContent_w(const MediaContentDescription* content,
529 ContentAction action, 533 ContentAction action,
530 std::string* error_desc) override; 534 std::string* error_desc) override;
531 bool SetRemoteContent_w(const MediaContentDescription* content, 535 bool SetRemoteContent_w(const MediaContentDescription* content,
532 ContentAction action, 536 ContentAction action,
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
584 sigslot::signal2<DataChannel*, const std::vector<ConnectionInfo>&> 588 sigslot::signal2<DataChannel*, const std::vector<ConnectionInfo>&>
585 SignalConnectionMonitor; 589 SignalConnectionMonitor;
586 sigslot::signal3<DataChannel*, const ReceiveDataParams&, 590 sigslot::signal3<DataChannel*, const ReceiveDataParams&,
587 const rtc::CopyOnWriteBuffer&> SignalDataReceived; 591 const rtc::CopyOnWriteBuffer&> SignalDataReceived;
588 // Signal for notifying when the channel becomes ready to send data. 592 // Signal for notifying when the channel becomes ready to send data.
589 // That occurs when the channel is enabled, the transport is writable, 593 // That occurs when the channel is enabled, the transport is writable,
590 // both local and remote descriptions are set, and the channel is unblocked. 594 // both local and remote descriptions are set, and the channel is unblocked.
591 sigslot::signal1<bool> SignalReadyToSendData; 595 sigslot::signal1<bool> SignalReadyToSendData;
592 // Signal for notifying that the remote side has closed the DataChannel. 596 // Signal for notifying that the remote side has closed the DataChannel.
593 sigslot::signal1<uint32_t> SignalStreamClosedRemotely; 597 sigslot::signal1<uint32_t> SignalStreamClosedRemotely;
598 cricket::MediaType media_type() override { return cricket::MEDIA_TYPE_DATA; }
594 599
595 protected: 600 protected:
596 // downcasts a MediaChannel. 601 // downcasts a MediaChannel.
597 DataMediaChannel* media_channel() const override { 602 DataMediaChannel* media_channel() const override {
598 return static_cast<DataMediaChannel*>(BaseChannel::media_channel()); 603 return static_cast<DataMediaChannel*>(BaseChannel::media_channel());
599 } 604 }
600 605
601 private: 606 private:
602 struct SendDataMessageData : public rtc::MessageData { 607 struct SendDataMessageData : public rtc::MessageData {
603 SendDataMessageData(const SendDataParams& params, 608 SendDataMessageData(const SendDataParams& params,
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
674 // SetSendParameters. 679 // SetSendParameters.
675 DataSendParameters last_send_params_; 680 DataSendParameters last_send_params_;
676 // Last DataRecvParameters sent down to the media_channel() via 681 // Last DataRecvParameters sent down to the media_channel() via
677 // SetRecvParameters. 682 // SetRecvParameters.
678 DataRecvParameters last_recv_params_; 683 DataRecvParameters last_recv_params_;
679 }; 684 };
680 685
681 } // namespace cricket 686 } // namespace cricket
682 687
683 #endif // WEBRTC_PC_CHANNEL_H_ 688 #endif // WEBRTC_PC_CHANNEL_H_
OLDNEW
« no previous file with comments | « webrtc/api/webrtcsession.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698