OLD | NEW |
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 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
482 // Returns the current SignalingState. | 482 // Returns the current SignalingState. |
483 virtual SignalingState signaling_state() = 0; | 483 virtual SignalingState signaling_state() = 0; |
484 | 484 |
485 // TODO(bemasc): Remove ice_state when callers are changed to | 485 // TODO(bemasc): Remove ice_state when callers are changed to |
486 // IceConnection/GatheringState. | 486 // IceConnection/GatheringState. |
487 // Returns the current IceState. | 487 // Returns the current IceState. |
488 virtual IceState ice_state() = 0; | 488 virtual IceState ice_state() = 0; |
489 virtual IceConnectionState ice_connection_state() = 0; | 489 virtual IceConnectionState ice_connection_state() = 0; |
490 virtual IceGatheringState ice_gathering_state() = 0; | 490 virtual IceGatheringState ice_gathering_state() = 0; |
491 | 491 |
| 492 // Starts RtcEventLog using existing file. Takes ownership of |file| and |
| 493 // passes it on to Call, which will take the ownership. If the |
| 494 // operation fails the file will be closed. The logging will stop |
| 495 // automatically after 10 minutes have passed, or when the StopRtcEventLog |
| 496 // function is called. |
| 497 virtual bool StartRtcEventLog(rtc::PlatformFile file, |
| 498 int64_t max_size_bytes) = 0; |
| 499 |
| 500 // Stops logging the RtcEventLog. |
| 501 virtual void StopRtcEventLog() = 0; |
| 502 |
492 // Terminates all media and closes the transport. | 503 // Terminates all media and closes the transport. |
493 virtual void Close() = 0; | 504 virtual void Close() = 0; |
494 | 505 |
495 protected: | 506 protected: |
496 // Dtor protected as objects shouldn't be deleted via this interface. | 507 // Dtor protected as objects shouldn't be deleted via this interface. |
497 ~PeerConnectionInterface() {} | 508 ~PeerConnectionInterface() {} |
498 }; | 509 }; |
499 | 510 |
500 // PeerConnection callback interface. Application should implement these | 511 // PeerConnection callback interface. Application should implement these |
501 // methods. | 512 // methods. |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
648 // the ownerhip. If the operation fails, the file will be closed. | 659 // the ownerhip. If the operation fails, the file will be closed. |
649 // A maximum file size in bytes can be specified. When the file size limit is | 660 // A maximum file size in bytes can be specified. When the file size limit is |
650 // reached, logging is stopped automatically. If max_size_bytes is set to a | 661 // reached, logging is stopped automatically. If max_size_bytes is set to a |
651 // value <= 0, no limit will be used, and logging will continue until the | 662 // value <= 0, no limit will be used, and logging will continue until the |
652 // StopAecDump function is called. | 663 // StopAecDump function is called. |
653 virtual bool StartAecDump(rtc::PlatformFile file, int64_t max_size_bytes) = 0; | 664 virtual bool StartAecDump(rtc::PlatformFile file, int64_t max_size_bytes) = 0; |
654 | 665 |
655 // Stops logging the AEC dump. | 666 // Stops logging the AEC dump. |
656 virtual void StopAecDump() = 0; | 667 virtual void StopAecDump() = 0; |
657 | 668 |
658 // Starts RtcEventLog using existing file. Takes ownership of |file| and | 669 // This function is deprecated and will be removed when Chrome is updated to |
659 // passes it on to VoiceEngine, which will take the ownership. If the | 670 // use the equivalent function on PeerConnectionInterface. |
660 // operation fails the file will be closed. The logging will stop | 671 // TODO(ivoc) Remove after Chrome is updated. |
661 // automatically after 10 minutes have passed, or when the StopRtcEventLog | |
662 // function is called. A maximum filesize in bytes can be set, the logging | |
663 // will be stopped before exceeding this limit. If max_size_bytes is set to a | |
664 // value <= 0, no limit will be used. | |
665 // This function as well as the StopRtcEventLog don't really belong on this | |
666 // interface, this is a temporary solution until we move the logging object | |
667 // from inside voice engine to webrtc::Call, which will happen when the VoE | |
668 // restructuring effort is further along. | |
669 // TODO(ivoc): Move this into being: | |
670 // PeerConnection => MediaController => webrtc::Call. | |
671 virtual bool StartRtcEventLog(rtc::PlatformFile file, | 672 virtual bool StartRtcEventLog(rtc::PlatformFile file, |
672 int64_t max_size_bytes) = 0; | 673 int64_t max_size_bytes) = 0; |
673 // Deprecated, use the version above. | 674 // This function is deprecated and will be removed when Chrome is updated to |
| 675 // use the equivalent function on PeerConnectionInterface. |
| 676 // TODO(ivoc) Remove after Chrome is updated. |
674 virtual bool StartRtcEventLog(rtc::PlatformFile file) = 0; | 677 virtual bool StartRtcEventLog(rtc::PlatformFile file) = 0; |
675 | 678 |
676 // Stops logging the RtcEventLog. | 679 // This function is deprecated and will be removed when Chrome is updated to |
| 680 // use the equivalent function on PeerConnectionInterface. |
| 681 // TODO(ivoc) Remove after Chrome is updated. |
677 virtual void StopRtcEventLog() = 0; | 682 virtual void StopRtcEventLog() = 0; |
678 | 683 |
679 protected: | 684 protected: |
680 // Dtor and ctor protected as objects shouldn't be created or deleted via | 685 // Dtor and ctor protected as objects shouldn't be created or deleted via |
681 // this interface. | 686 // this interface. |
682 PeerConnectionFactoryInterface() {} | 687 PeerConnectionFactoryInterface() {} |
683 ~PeerConnectionFactoryInterface() {} // NOLINT | 688 ~PeerConnectionFactoryInterface() {} // NOLINT |
684 }; | 689 }; |
685 | 690 |
686 // Create a new instance of PeerConnectionFactoryInterface. | 691 // Create a new instance of PeerConnectionFactoryInterface. |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
721 cricket::WebRtcVideoEncoderFactory* encoder_factory, | 726 cricket::WebRtcVideoEncoderFactory* encoder_factory, |
722 cricket::WebRtcVideoDecoderFactory* decoder_factory) { | 727 cricket::WebRtcVideoDecoderFactory* decoder_factory) { |
723 return CreatePeerConnectionFactory( | 728 return CreatePeerConnectionFactory( |
724 worker_and_network_thread, worker_and_network_thread, signaling_thread, | 729 worker_and_network_thread, worker_and_network_thread, signaling_thread, |
725 default_adm, encoder_factory, decoder_factory); | 730 default_adm, encoder_factory, decoder_factory); |
726 } | 731 } |
727 | 732 |
728 } // namespace webrtc | 733 } // namespace webrtc |
729 | 734 |
730 #endif // WEBRTC_API_PEERCONNECTIONINTERFACE_H_ | 735 #endif // WEBRTC_API_PEERCONNECTIONINTERFACE_H_ |
OLD | NEW |