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

Side by Side Diff: webrtc/api/peerconnectioninterface.h

Issue 2110113003: Reland of "Move RtcEventLog object from inside VoiceEngine to Call.", "Fix to make the start/stop f… (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase. Created 4 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 | « webrtc/api/peerconnectionfactoryproxy.h ('k') | webrtc/api/peerconnectionproxy.h » ('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 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2012 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 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 // Returns the current SignalingState. 486 // Returns the current SignalingState.
487 virtual SignalingState signaling_state() = 0; 487 virtual SignalingState signaling_state() = 0;
488 488
489 // TODO(bemasc): Remove ice_state when callers are changed to 489 // TODO(bemasc): Remove ice_state when callers are changed to
490 // IceConnection/GatheringState. 490 // IceConnection/GatheringState.
491 // Returns the current IceState. 491 // Returns the current IceState.
492 virtual IceState ice_state() = 0; 492 virtual IceState ice_state() = 0;
493 virtual IceConnectionState ice_connection_state() = 0; 493 virtual IceConnectionState ice_connection_state() = 0;
494 virtual IceGatheringState ice_gathering_state() = 0; 494 virtual IceGatheringState ice_gathering_state() = 0;
495 495
496 // Starts RtcEventLog using existing file. Takes ownership of |file| and
497 // passes it on to Call, which will take the ownership. If the
498 // operation fails the file will be closed. The logging will stop
499 // automatically after 10 minutes have passed, or when the StopRtcEventLog
500 // function is called.
501 // TODO(ivoc): Make this pure virtual when Chrome is updated.
502 virtual bool StartRtcEventLog(rtc::PlatformFile file,
503 int64_t max_size_bytes) {
504 return false;
505 }
506
507 // Stops logging the RtcEventLog.
508 // TODO(ivoc): Make this pure virtual when Chrome is updated.
509 virtual void StopRtcEventLog() {}
510
496 // Terminates all media and closes the transport. 511 // Terminates all media and closes the transport.
497 virtual void Close() = 0; 512 virtual void Close() = 0;
498 513
499 protected: 514 protected:
500 // Dtor protected as objects shouldn't be deleted via this interface. 515 // Dtor protected as objects shouldn't be deleted via this interface.
501 ~PeerConnectionInterface() {} 516 ~PeerConnectionInterface() {}
502 }; 517 };
503 518
504 // PeerConnection callback interface. Application should implement these 519 // PeerConnection callback interface. Application should implement these
505 // methods. 520 // methods.
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
652 // the ownerhip. If the operation fails, the file will be closed. 667 // the ownerhip. If the operation fails, the file will be closed.
653 // A maximum file size in bytes can be specified. When the file size limit is 668 // A maximum file size in bytes can be specified. When the file size limit is
654 // reached, logging is stopped automatically. If max_size_bytes is set to a 669 // reached, logging is stopped automatically. If max_size_bytes is set to a
655 // value <= 0, no limit will be used, and logging will continue until the 670 // value <= 0, no limit will be used, and logging will continue until the
656 // StopAecDump function is called. 671 // StopAecDump function is called.
657 virtual bool StartAecDump(rtc::PlatformFile file, int64_t max_size_bytes) = 0; 672 virtual bool StartAecDump(rtc::PlatformFile file, int64_t max_size_bytes) = 0;
658 673
659 // Stops logging the AEC dump. 674 // Stops logging the AEC dump.
660 virtual void StopAecDump() = 0; 675 virtual void StopAecDump() = 0;
661 676
662 // Starts RtcEventLog using existing file. Takes ownership of |file| and 677 // This function is deprecated and will be removed when Chrome is updated to
663 // passes it on to VoiceEngine, which will take the ownership. If the 678 // use the equivalent function on PeerConnectionInterface.
664 // operation fails the file will be closed. The logging will stop 679 // TODO(ivoc) Remove after Chrome is updated.
665 // automatically after 10 minutes have passed, or when the StopRtcEventLog
666 // function is called. A maximum filesize in bytes can be set, the logging
667 // will be stopped before exceeding this limit. If max_size_bytes is set to a
668 // value <= 0, no limit will be used.
669 // This function as well as the StopRtcEventLog don't really belong on this
670 // interface, this is a temporary solution until we move the logging object
671 // from inside voice engine to webrtc::Call, which will happen when the VoE
672 // restructuring effort is further along.
673 // TODO(ivoc): Move this into being:
674 // PeerConnection => MediaController => webrtc::Call.
675 virtual bool StartRtcEventLog(rtc::PlatformFile file, 680 virtual bool StartRtcEventLog(rtc::PlatformFile file,
676 int64_t max_size_bytes) = 0; 681 int64_t max_size_bytes) = 0;
677 // Deprecated, use the version above. 682 // This function is deprecated and will be removed when Chrome is updated to
683 // use the equivalent function on PeerConnectionInterface.
684 // TODO(ivoc) Remove after Chrome is updated.
678 virtual bool StartRtcEventLog(rtc::PlatformFile file) = 0; 685 virtual bool StartRtcEventLog(rtc::PlatformFile file) = 0;
679 686
680 // Stops logging the RtcEventLog. 687 // This function is deprecated and will be removed when Chrome is updated to
688 // use the equivalent function on PeerConnectionInterface.
689 // TODO(ivoc) Remove after Chrome is updated.
681 virtual void StopRtcEventLog() = 0; 690 virtual void StopRtcEventLog() = 0;
682 691
683 protected: 692 protected:
684 // Dtor and ctor protected as objects shouldn't be created or deleted via 693 // Dtor and ctor protected as objects shouldn't be created or deleted via
685 // this interface. 694 // this interface.
686 PeerConnectionFactoryInterface() {} 695 PeerConnectionFactoryInterface() {}
687 ~PeerConnectionFactoryInterface() {} // NOLINT 696 ~PeerConnectionFactoryInterface() {} // NOLINT
688 }; 697 };
689 698
690 // Create a new instance of PeerConnectionFactoryInterface. 699 // Create a new instance of PeerConnectionFactoryInterface.
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
725 cricket::WebRtcVideoEncoderFactory* encoder_factory, 734 cricket::WebRtcVideoEncoderFactory* encoder_factory,
726 cricket::WebRtcVideoDecoderFactory* decoder_factory) { 735 cricket::WebRtcVideoDecoderFactory* decoder_factory) {
727 return CreatePeerConnectionFactory( 736 return CreatePeerConnectionFactory(
728 worker_and_network_thread, worker_and_network_thread, signaling_thread, 737 worker_and_network_thread, worker_and_network_thread, signaling_thread,
729 default_adm, encoder_factory, decoder_factory); 738 default_adm, encoder_factory, decoder_factory);
730 } 739 }
731 740
732 } // namespace webrtc 741 } // namespace webrtc
733 742
734 #endif // WEBRTC_API_PEERCONNECTIONINTERFACE_H_ 743 #endif // WEBRTC_API_PEERCONNECTIONINTERFACE_H_
OLDNEW
« no previous file with comments | « webrtc/api/peerconnectionfactoryproxy.h ('k') | webrtc/api/peerconnectionproxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698