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

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

Issue 1783263002: Replace scoped_ptr with unique_ptr in webrtc/pc/ (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 9 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') | 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
11 #ifndef WEBRTC_PC_CHANNEL_H_ 11 #ifndef WEBRTC_PC_CHANNEL_H_
12 #define WEBRTC_PC_CHANNEL_H_ 12 #define WEBRTC_PC_CHANNEL_H_
13 13
14 #include <map> 14 #include <map>
15 #include <memory>
15 #include <set> 16 #include <set>
16 #include <string> 17 #include <string>
17 #include <utility> 18 #include <utility>
18 #include <vector> 19 #include <vector>
19 20
20 #include "webrtc/audio_sink.h" 21 #include "webrtc/audio_sink.h"
21 #include "webrtc/base/asyncudpsocket.h" 22 #include "webrtc/base/asyncudpsocket.h"
22 #include "webrtc/base/criticalsection.h" 23 #include "webrtc/base/criticalsection.h"
23 #include "webrtc/base/network.h" 24 #include "webrtc/base/network.h"
24 #include "webrtc/base/sigslot.h" 25 #include "webrtc/base/sigslot.h"
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 const std::string content_name_; 298 const std::string content_name_;
298 std::string transport_name_; 299 std::string transport_name_;
299 bool rtcp_transport_enabled_; 300 bool rtcp_transport_enabled_;
300 TransportChannel* transport_channel_; 301 TransportChannel* transport_channel_;
301 std::vector<std::pair<rtc::Socket::Option, int> > socket_options_; 302 std::vector<std::pair<rtc::Socket::Option, int> > socket_options_;
302 TransportChannel* rtcp_transport_channel_; 303 TransportChannel* rtcp_transport_channel_;
303 std::vector<std::pair<rtc::Socket::Option, int> > rtcp_socket_options_; 304 std::vector<std::pair<rtc::Socket::Option, int> > rtcp_socket_options_;
304 SrtpFilter srtp_filter_; 305 SrtpFilter srtp_filter_;
305 RtcpMuxFilter rtcp_mux_filter_; 306 RtcpMuxFilter rtcp_mux_filter_;
306 BundleFilter bundle_filter_; 307 BundleFilter bundle_filter_;
307 rtc::scoped_ptr<ConnectionMonitor> connection_monitor_; 308 std::unique_ptr<ConnectionMonitor> connection_monitor_;
308 bool enabled_; 309 bool enabled_;
309 bool writable_; 310 bool writable_;
310 bool rtp_ready_to_send_; 311 bool rtp_ready_to_send_;
311 bool rtcp_ready_to_send_; 312 bool rtcp_ready_to_send_;
312 bool was_ever_writable_; 313 bool was_ever_writable_;
313 MediaContentDirection local_content_direction_; 314 MediaContentDirection local_content_direction_;
314 MediaContentDirection remote_content_direction_; 315 MediaContentDirection remote_content_direction_;
315 bool has_received_packet_; 316 bool has_received_packet_;
316 bool dtls_keyed_; 317 bool dtls_keyed_;
317 bool secure_required_; 318 bool secure_required_;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 // Returns if the telephone-event has been negotiated. 353 // Returns if the telephone-event has been negotiated.
353 bool CanInsertDtmf(); 354 bool CanInsertDtmf();
354 // Send and/or play a DTMF |event| according to the |flags|. 355 // Send and/or play a DTMF |event| according to the |flags|.
355 // The DTMF out-of-band signal will be used on sending. 356 // The DTMF out-of-band signal will be used on sending.
356 // The |ssrc| should be either 0 or a valid send stream ssrc. 357 // The |ssrc| should be either 0 or a valid send stream ssrc.
357 // The valid value for the |event| are 0 which corresponding to DTMF 358 // The valid value for the |event| are 0 which corresponding to DTMF
358 // event 0-9, *, #, A-D. 359 // event 0-9, *, #, A-D.
359 bool InsertDtmf(uint32_t ssrc, int event_code, int duration); 360 bool InsertDtmf(uint32_t ssrc, int event_code, int duration);
360 bool SetOutputVolume(uint32_t ssrc, double volume); 361 bool SetOutputVolume(uint32_t ssrc, double volume);
361 void SetRawAudioSink(uint32_t ssrc, 362 void SetRawAudioSink(uint32_t ssrc,
362 rtc::scoped_ptr<webrtc::AudioSinkInterface> sink); 363 std::unique_ptr<webrtc::AudioSinkInterface> sink);
363 364
364 // Get statistics about the current media session. 365 // Get statistics about the current media session.
365 bool GetStats(VoiceMediaInfo* stats); 366 bool GetStats(VoiceMediaInfo* stats);
366 367
367 // Monitoring functions 368 // Monitoring functions
368 sigslot::signal2<VoiceChannel*, const std::vector<ConnectionInfo>&> 369 sigslot::signal2<VoiceChannel*, const std::vector<ConnectionInfo>&>
369 SignalConnectionMonitor; 370 SignalConnectionMonitor;
370 371
371 void StartMediaMonitor(int cms); 372 void StartMediaMonitor(int cms);
372 void StopMediaMonitor(); 373 void StopMediaMonitor();
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 virtual void GetSrtpCryptoSuites(std::vector<int>* crypto_suites) const; 405 virtual void GetSrtpCryptoSuites(std::vector<int>* crypto_suites) const;
405 virtual void OnConnectionMonitorUpdate( 406 virtual void OnConnectionMonitorUpdate(
406 ConnectionMonitor* monitor, const std::vector<ConnectionInfo>& infos); 407 ConnectionMonitor* monitor, const std::vector<ConnectionInfo>& infos);
407 virtual void OnMediaMonitorUpdate( 408 virtual void OnMediaMonitorUpdate(
408 VoiceMediaChannel* media_channel, const VoiceMediaInfo& info); 409 VoiceMediaChannel* media_channel, const VoiceMediaInfo& info);
409 void OnAudioMonitorUpdate(AudioMonitor* monitor, const AudioInfo& info); 410 void OnAudioMonitorUpdate(AudioMonitor* monitor, const AudioInfo& info);
410 411
411 static const int kEarlyMediaTimeout = 1000; 412 static const int kEarlyMediaTimeout = 1000;
412 MediaEngineInterface* media_engine_; 413 MediaEngineInterface* media_engine_;
413 bool received_media_; 414 bool received_media_;
414 rtc::scoped_ptr<VoiceMediaMonitor> media_monitor_; 415 std::unique_ptr<VoiceMediaMonitor> media_monitor_;
415 rtc::scoped_ptr<AudioMonitor> audio_monitor_; 416 std::unique_ptr<AudioMonitor> audio_monitor_;
416 417
417 // Last AudioSendParameters sent down to the media_channel() via 418 // Last AudioSendParameters sent down to the media_channel() via
418 // SetSendParameters. 419 // SetSendParameters.
419 AudioSendParameters last_send_params_; 420 AudioSendParameters last_send_params_;
420 // Last AudioRecvParameters sent down to the media_channel() via 421 // Last AudioRecvParameters sent down to the media_channel() via
421 // SetRecvParameters. 422 // SetRecvParameters.
422 AudioRecvParameters last_recv_params_; 423 AudioRecvParameters last_recv_params_;
423 }; 424 };
424 425
425 // VideoChannel is a specialization for video. 426 // VideoChannel is a specialization for video.
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 std::string* error_desc); 465 std::string* error_desc);
465 bool GetStats_w(VideoMediaInfo* stats); 466 bool GetStats_w(VideoMediaInfo* stats);
466 467
467 virtual void OnMessage(rtc::Message* pmsg); 468 virtual void OnMessage(rtc::Message* pmsg);
468 virtual void GetSrtpCryptoSuites(std::vector<int>* crypto_suites) const; 469 virtual void GetSrtpCryptoSuites(std::vector<int>* crypto_suites) const;
469 virtual void OnConnectionMonitorUpdate( 470 virtual void OnConnectionMonitorUpdate(
470 ConnectionMonitor* monitor, const std::vector<ConnectionInfo>& infos); 471 ConnectionMonitor* monitor, const std::vector<ConnectionInfo>& infos);
471 virtual void OnMediaMonitorUpdate( 472 virtual void OnMediaMonitorUpdate(
472 VideoMediaChannel* media_channel, const VideoMediaInfo& info); 473 VideoMediaChannel* media_channel, const VideoMediaInfo& info);
473 474
474 rtc::scoped_ptr<VideoMediaMonitor> media_monitor_; 475 std::unique_ptr<VideoMediaMonitor> media_monitor_;
475 476
476 // Last VideoSendParameters sent down to the media_channel() via 477 // Last VideoSendParameters sent down to the media_channel() via
477 // SetSendParameters. 478 // SetSendParameters.
478 VideoSendParameters last_send_params_; 479 VideoSendParameters last_send_params_;
479 // Last VideoRecvParameters sent down to the media_channel() via 480 // Last VideoRecvParameters sent down to the media_channel() via
480 // SetRecvParameters. 481 // SetRecvParameters.
481 VideoRecvParameters last_recv_params_; 482 VideoRecvParameters last_recv_params_;
482 }; 483 };
483 484
484 // DataChannel is a specialization for data. 485 // DataChannel is a specialization for data.
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
580 ConnectionMonitor* monitor, const std::vector<ConnectionInfo>& infos); 581 ConnectionMonitor* monitor, const std::vector<ConnectionInfo>& infos);
581 virtual void OnMediaMonitorUpdate( 582 virtual void OnMediaMonitorUpdate(
582 DataMediaChannel* media_channel, const DataMediaInfo& info); 583 DataMediaChannel* media_channel, const DataMediaInfo& info);
583 virtual bool ShouldSetupDtlsSrtp() const; 584 virtual bool ShouldSetupDtlsSrtp() const;
584 void OnDataReceived( 585 void OnDataReceived(
585 const ReceiveDataParams& params, const char* data, size_t len); 586 const ReceiveDataParams& params, const char* data, size_t len);
586 void OnDataChannelError(uint32_t ssrc, DataMediaChannel::Error error); 587 void OnDataChannelError(uint32_t ssrc, DataMediaChannel::Error error);
587 void OnDataChannelReadyToSend(bool writable); 588 void OnDataChannelReadyToSend(bool writable);
588 void OnStreamClosedRemotely(uint32_t sid); 589 void OnStreamClosedRemotely(uint32_t sid);
589 590
590 rtc::scoped_ptr<DataMediaMonitor> media_monitor_; 591 std::unique_ptr<DataMediaMonitor> media_monitor_;
591 // TODO(pthatcher): Make a separate SctpDataChannel and 592 // TODO(pthatcher): Make a separate SctpDataChannel and
592 // RtpDataChannel instead of using this. 593 // RtpDataChannel instead of using this.
593 DataChannelType data_channel_type_; 594 DataChannelType data_channel_type_;
594 bool ready_to_send_data_; 595 bool ready_to_send_data_;
595 596
596 // Last DataSendParameters sent down to the media_channel() via 597 // Last DataSendParameters sent down to the media_channel() via
597 // SetSendParameters. 598 // SetSendParameters.
598 DataSendParameters last_send_params_; 599 DataSendParameters last_send_params_;
599 // Last DataRecvParameters sent down to the media_channel() via 600 // Last DataRecvParameters sent down to the media_channel() via
600 // SetRecvParameters. 601 // SetRecvParameters.
601 DataRecvParameters last_recv_params_; 602 DataRecvParameters last_recv_params_;
602 }; 603 };
603 604
604 } // namespace cricket 605 } // namespace cricket
605 606
606 #endif // WEBRTC_PC_CHANNEL_H_ 607 #endif // WEBRTC_PC_CHANNEL_H_
OLDNEW
« no previous file with comments | « webrtc/api/webrtcsession.cc ('k') | webrtc/pc/channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698