OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 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 24 matching lines...) Expand all Loading... |
35 class RateLimiter; | 35 class RateLimiter; |
36 class Timing; | 36 class Timing; |
37 } | 37 } |
38 | 38 |
39 namespace webrtc { | 39 namespace webrtc { |
40 class AudioSinkInterface; | 40 class AudioSinkInterface; |
41 } | 41 } |
42 | 42 |
43 namespace cricket { | 43 namespace cricket { |
44 | 44 |
45 class AudioRenderer; | 45 class AudioSource; |
46 class ScreencastId; | 46 class ScreencastId; |
47 class VideoCapturer; | 47 class VideoCapturer; |
48 class VideoFrame; | 48 class VideoFrame; |
49 struct RtpHeader; | 49 struct RtpHeader; |
50 struct VideoFormat; | 50 struct VideoFormat; |
51 | 51 |
52 const int kMinRtpHeaderExtensionId = 1; | 52 const int kMinRtpHeaderExtensionId = 1; |
53 const int kMaxRtpHeaderExtensionId = 255; | 53 const int kMaxRtpHeaderExtensionId = 255; |
54 const int kScreencastDefaultFps = 5; | 54 const int kScreencastDefaultFps = 5; |
55 | 55 |
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
441 } | 441 } |
442 | 442 |
443 const bool enable_dscp_; | 443 const bool enable_dscp_; |
444 // |network_interface_| can be accessed from the worker_thread and | 444 // |network_interface_| can be accessed from the worker_thread and |
445 // from any MediaEngine threads. This critical section is to protect accessing | 445 // from any MediaEngine threads. This critical section is to protect accessing |
446 // of network_interface_ object. | 446 // of network_interface_ object. |
447 rtc::CriticalSection network_interface_crit_; | 447 rtc::CriticalSection network_interface_crit_; |
448 NetworkInterface* network_interface_; | 448 NetworkInterface* network_interface_; |
449 }; | 449 }; |
450 | 450 |
451 enum SendFlags { | |
452 SEND_NOTHING, | |
453 SEND_MICROPHONE | |
454 }; | |
455 | |
456 // The stats information is structured as follows: | 451 // The stats information is structured as follows: |
457 // Media are represented by either MediaSenderInfo or MediaReceiverInfo. | 452 // Media are represented by either MediaSenderInfo or MediaReceiverInfo. |
458 // Media contains a vector of SSRC infos that are exclusively used by this | 453 // Media contains a vector of SSRC infos that are exclusively used by this |
459 // media. (SSRCs shared between media streams can't be represented.) | 454 // media. (SSRCs shared between media streams can't be represented.) |
460 | 455 |
461 // Information about an SSRC. | 456 // Information about an SSRC. |
462 // This data may be locally recorded, or received in an RTCP SR or RR. | 457 // This data may be locally recorded, or received in an RTCP SR or RR. |
463 struct SsrcSenderInfo { | 458 struct SsrcSenderInfo { |
464 SsrcSenderInfo() | 459 SsrcSenderInfo() |
465 : ssrc(0), | 460 : ssrc(0), |
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
894 }; | 889 }; |
895 | 890 |
896 VoiceMediaChannel() {} | 891 VoiceMediaChannel() {} |
897 VoiceMediaChannel(const MediaConfig& config) : MediaChannel(config) {} | 892 VoiceMediaChannel(const MediaConfig& config) : MediaChannel(config) {} |
898 virtual ~VoiceMediaChannel() {} | 893 virtual ~VoiceMediaChannel() {} |
899 virtual bool SetSendParameters(const AudioSendParameters& params) = 0; | 894 virtual bool SetSendParameters(const AudioSendParameters& params) = 0; |
900 virtual bool SetRecvParameters(const AudioRecvParameters& params) = 0; | 895 virtual bool SetRecvParameters(const AudioRecvParameters& params) = 0; |
901 // Starts or stops playout of received audio. | 896 // Starts or stops playout of received audio. |
902 virtual bool SetPlayout(bool playout) = 0; | 897 virtual bool SetPlayout(bool playout) = 0; |
903 // Starts or stops sending (and potentially capture) of local audio. | 898 // Starts or stops sending (and potentially capture) of local audio. |
904 virtual bool SetSend(SendFlags flag) = 0; | 899 virtual void SetSend(bool send) = 0; |
905 // Configure stream for sending. | 900 // Configure stream for sending. |
906 virtual bool SetAudioSend(uint32_t ssrc, | 901 virtual bool SetAudioSend(uint32_t ssrc, |
907 bool enable, | 902 bool enable, |
908 const AudioOptions* options, | 903 const AudioOptions* options, |
909 AudioRenderer* renderer) = 0; | 904 AudioSource* source) = 0; |
910 // Gets current energy levels for all incoming streams. | 905 // Gets current energy levels for all incoming streams. |
911 virtual bool GetActiveStreams(AudioInfo::StreamList* actives) = 0; | 906 virtual bool GetActiveStreams(AudioInfo::StreamList* actives) = 0; |
912 // Get the current energy level of the stream sent to the speaker. | 907 // Get the current energy level of the stream sent to the speaker. |
913 virtual int GetOutputLevel() = 0; | 908 virtual int GetOutputLevel() = 0; |
914 // Get the time in milliseconds since last recorded keystroke, or negative. | 909 // Get the time in milliseconds since last recorded keystroke, or negative. |
915 virtual int GetTimeSinceLastTyping() = 0; | 910 virtual int GetTimeSinceLastTyping() = 0; |
916 // Temporarily exposed field for tuning typing detect options. | 911 // Temporarily exposed field for tuning typing detect options. |
917 virtual void SetTypingDetectionParameters(int time_window, | 912 virtual void SetTypingDetectionParameters(int time_window, |
918 int cost_per_typing, int reporting_threshold, int penalty_decay, | 913 int cost_per_typing, int reporting_threshold, int penalty_decay, |
919 int type_event_delay) = 0; | 914 int type_event_delay) = 0; |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1110 // Signal when the media channel is ready to send the stream. Arguments are: | 1105 // Signal when the media channel is ready to send the stream. Arguments are: |
1111 // writable(bool) | 1106 // writable(bool) |
1112 sigslot::signal1<bool> SignalReadyToSend; | 1107 sigslot::signal1<bool> SignalReadyToSend; |
1113 // Signal for notifying that the remote side has closed the DataChannel. | 1108 // Signal for notifying that the remote side has closed the DataChannel. |
1114 sigslot::signal1<uint32_t> SignalStreamClosedRemotely; | 1109 sigslot::signal1<uint32_t> SignalStreamClosedRemotely; |
1115 }; | 1110 }; |
1116 | 1111 |
1117 } // namespace cricket | 1112 } // namespace cricket |
1118 | 1113 |
1119 #endif // WEBRTC_MEDIA_BASE_MEDIACHANNEL_H_ | 1114 #endif // WEBRTC_MEDIA_BASE_MEDIACHANNEL_H_ |
OLD | NEW |