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 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
422 // Returns the current SignalingState. | 422 // Returns the current SignalingState. |
423 virtual SignalingState signaling_state() = 0; | 423 virtual SignalingState signaling_state() = 0; |
424 | 424 |
425 // TODO(bemasc): Remove ice_state when callers are changed to | 425 // TODO(bemasc): Remove ice_state when callers are changed to |
426 // IceConnection/GatheringState. | 426 // IceConnection/GatheringState. |
427 // Returns the current IceState. | 427 // Returns the current IceState. |
428 virtual IceState ice_state() = 0; | 428 virtual IceState ice_state() = 0; |
429 virtual IceConnectionState ice_connection_state() = 0; | 429 virtual IceConnectionState ice_connection_state() = 0; |
430 virtual IceGatheringState ice_gathering_state() = 0; | 430 virtual IceGatheringState ice_gathering_state() = 0; |
431 | 431 |
| 432 // Starts RtcEventLog using existing file. Takes ownership of |file| and |
| 433 // passes it on to Call, which will take the ownership. If the |
| 434 // operation fails the file will be closed. The logging will stop |
| 435 // automatically after 10 minutes have passed, or when the StopRtcEventLog |
| 436 // function is called. |
| 437 virtual bool StartRtcEventLog(rtc::PlatformFile file) = 0; |
| 438 |
| 439 // Stops logging the RtcEventLog. |
| 440 virtual void StopRtcEventLog() = 0; |
| 441 |
432 // Terminates all media and closes the transport. | 442 // Terminates all media and closes the transport. |
433 virtual void Close() = 0; | 443 virtual void Close() = 0; |
434 | 444 |
435 protected: | 445 protected: |
436 // Dtor protected as objects shouldn't be deleted via this interface. | 446 // Dtor protected as objects shouldn't be deleted via this interface. |
437 ~PeerConnectionInterface() {} | 447 ~PeerConnectionInterface() {} |
438 }; | 448 }; |
439 | 449 |
440 // PeerConnection callback interface. Application should implement these | 450 // PeerConnection callback interface. Application should implement these |
441 // methods. | 451 // methods. |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
555 // the ownerhip. If the operation fails, the file will be closed. | 565 // the ownerhip. If the operation fails, the file will be closed. |
556 // A maximum file size in bytes can be specified. When the file size limit is | 566 // A maximum file size in bytes can be specified. When the file size limit is |
557 // reached, logging is stopped automatically. If max_size_bytes is set to a | 567 // reached, logging is stopped automatically. If max_size_bytes is set to a |
558 // value <= 0, no limit will be used, and logging will continue until the | 568 // value <= 0, no limit will be used, and logging will continue until the |
559 // StopAecDump function is called. | 569 // StopAecDump function is called. |
560 virtual bool StartAecDump(rtc::PlatformFile file, int64_t max_size_bytes) = 0; | 570 virtual bool StartAecDump(rtc::PlatformFile file, int64_t max_size_bytes) = 0; |
561 | 571 |
562 // Stops logging the AEC dump. | 572 // Stops logging the AEC dump. |
563 virtual void StopAecDump() = 0; | 573 virtual void StopAecDump() = 0; |
564 | 574 |
565 // Starts RtcEventLog using existing file. Takes ownership of |file| and | 575 // This function is deprecated and will be removed when Chrome is updated to |
566 // passes it on to VoiceEngine, which will take the ownership. If the | 576 // use the equivalent function on PeerConnectionInterface. |
567 // operation fails the file will be closed. The logging will stop | 577 // TODO(ivoc) Remove after Chrome is updated. |
568 // automatically after 10 minutes have passed, or when the StopRtcEventLog | |
569 // function is called. | |
570 // This function as well as the StopRtcEventLog don't really belong on this | |
571 // interface, this is a temporary solution until we move the logging object | |
572 // from inside voice engine to webrtc::Call, which will happen when the VoE | |
573 // restructuring effort is further along. | |
574 // TODO(ivoc): Move this into being: | |
575 // PeerConnection => MediaController => webrtc::Call. | |
576 virtual bool StartRtcEventLog(rtc::PlatformFile file) = 0; | 578 virtual bool StartRtcEventLog(rtc::PlatformFile file) = 0; |
577 | 579 |
578 // Stops logging the RtcEventLog. | 580 // This function is deprecated and will be removed when Chrome is updated to |
| 581 // use the equivalent function on PeerConnectionInterface. |
| 582 // TODO(ivoc) Remove after Chrome is updated. |
579 virtual void StopRtcEventLog() = 0; | 583 virtual void StopRtcEventLog() = 0; |
580 | 584 |
581 protected: | 585 protected: |
582 // Dtor and ctor protected as objects shouldn't be created or deleted via | 586 // Dtor and ctor protected as objects shouldn't be created or deleted via |
583 // this interface. | 587 // this interface. |
584 PeerConnectionFactoryInterface() {} | 588 PeerConnectionFactoryInterface() {} |
585 ~PeerConnectionFactoryInterface() {} // NOLINT | 589 ~PeerConnectionFactoryInterface() {} // NOLINT |
586 }; | 590 }; |
587 | 591 |
588 // Create a new instance of PeerConnectionFactoryInterface. | 592 // Create a new instance of PeerConnectionFactoryInterface. |
589 rtc::scoped_refptr<PeerConnectionFactoryInterface> | 593 rtc::scoped_refptr<PeerConnectionFactoryInterface> |
590 CreatePeerConnectionFactory(); | 594 CreatePeerConnectionFactory(); |
591 | 595 |
592 // Create a new instance of PeerConnectionFactoryInterface. | 596 // Create a new instance of PeerConnectionFactoryInterface. |
593 // Ownership of |factory|, |default_adm|, and optionally |encoder_factory| and | 597 // Ownership of |factory|, |default_adm|, and optionally |encoder_factory| and |
594 // |decoder_factory| transferred to the returned factory. | 598 // |decoder_factory| transferred to the returned factory. |
595 rtc::scoped_refptr<PeerConnectionFactoryInterface> | 599 rtc::scoped_refptr<PeerConnectionFactoryInterface> |
596 CreatePeerConnectionFactory( | 600 CreatePeerConnectionFactory( |
597 rtc::Thread* worker_thread, | 601 rtc::Thread* worker_thread, |
598 rtc::Thread* signaling_thread, | 602 rtc::Thread* signaling_thread, |
599 AudioDeviceModule* default_adm, | 603 AudioDeviceModule* default_adm, |
600 cricket::WebRtcVideoEncoderFactory* encoder_factory, | 604 cricket::WebRtcVideoEncoderFactory* encoder_factory, |
601 cricket::WebRtcVideoDecoderFactory* decoder_factory); | 605 cricket::WebRtcVideoDecoderFactory* decoder_factory); |
602 | 606 |
603 } // namespace webrtc | 607 } // namespace webrtc |
604 | 608 |
605 #endif // WEBRTC_API_PEERCONNECTIONINTERFACE_H_ | 609 #endif // WEBRTC_API_PEERCONNECTIONINTERFACE_H_ |
OLD | NEW |