OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 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 |
11 #ifndef WEBRTC_MODULES_RTP_RTCP_INCLUDE_RTP_RECEIVER_H_ | 11 #ifndef WEBRTC_MODULES_RTP_RTCP_INCLUDE_RTP_RECEIVER_H_ |
12 #define WEBRTC_MODULES_RTP_RTCP_INCLUDE_RTP_RECEIVER_H_ | 12 #define WEBRTC_MODULES_RTP_RTCP_INCLUDE_RTP_RECEIVER_H_ |
13 | 13 |
14 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" | 14 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" |
15 #include "webrtc/typedefs.h" | 15 #include "webrtc/typedefs.h" |
16 | 16 |
17 namespace webrtc { | 17 namespace webrtc { |
18 | 18 |
| 19 class RtpAudioFeedback; |
19 class RTPPayloadRegistry; | 20 class RTPPayloadRegistry; |
20 | 21 |
21 class TelephoneEventHandler { | 22 class TelephoneEventHandler { |
22 public: | 23 public: |
23 virtual ~TelephoneEventHandler() {} | 24 virtual ~TelephoneEventHandler() {} |
24 | 25 |
25 // The following three methods implement the TelephoneEventHandler interface. | 26 // The following three methods implement the TelephoneEventHandler interface. |
26 // Forward DTMFs to decoder for playout. | 27 // Forward DTMFs to decoder for playout. |
27 virtual void SetTelephoneEventForwardToDecoder(bool forward_to_decoder) = 0; | 28 virtual void SetTelephoneEventForwardToDecoder(bool forward_to_decoder) = 0; |
28 | 29 |
29 // Is forwarding of outband telephone events turned on/off? | 30 // Is forwarding of outband telephone events turned on/off? |
30 virtual bool TelephoneEventForwardToDecoder() const = 0; | 31 virtual bool TelephoneEventForwardToDecoder() const = 0; |
31 | 32 |
32 // Is TelephoneEvent configured with payload type payload_type | 33 // Is TelephoneEvent configured with payload type payload_type |
33 virtual bool TelephoneEventPayloadType(const int8_t payload_type) const = 0; | 34 virtual bool TelephoneEventPayloadType(const int8_t payload_type) const = 0; |
34 }; | 35 }; |
35 | 36 |
36 class RtpReceiver { | 37 class RtpReceiver { |
37 public: | 38 public: |
38 // Creates a video-enabled RTP receiver. | 39 // Creates a video-enabled RTP receiver. |
39 static RtpReceiver* CreateVideoReceiver( | 40 static RtpReceiver* CreateVideoReceiver( |
40 Clock* clock, | 41 Clock* clock, |
41 RtpData* incoming_payload_callback, | 42 RtpData* incoming_payload_callback, |
42 RtpFeedback* incoming_messages_callback, | 43 RtpFeedback* incoming_messages_callback, |
43 RTPPayloadRegistry* rtp_payload_registry); | 44 RTPPayloadRegistry* rtp_payload_registry); |
44 | 45 |
45 // Creates an audio-enabled RTP receiver. | 46 // Creates an audio-enabled RTP receiver. |
46 static RtpReceiver* CreateAudioReceiver( | 47 static RtpReceiver* CreateAudioReceiver( |
47 Clock* clock, | 48 Clock* clock, |
| 49 RtpData* incoming_payload_callback, |
| 50 RtpFeedback* incoming_messages_callback, |
| 51 RTPPayloadRegistry* rtp_payload_registry); |
| 52 |
| 53 // DEPRECATED: Creates an audio-enabled RTP receiver. |
| 54 // TODO(solenberg): Remove, after updating downstream code. |
| 55 static RtpReceiver* CreateAudioReceiver( |
| 56 Clock* clock, |
48 RtpAudioFeedback* incoming_audio_feedback, | 57 RtpAudioFeedback* incoming_audio_feedback, |
49 RtpData* incoming_payload_callback, | 58 RtpData* incoming_payload_callback, |
50 RtpFeedback* incoming_messages_callback, | 59 RtpFeedback* incoming_messages_callback, |
51 RTPPayloadRegistry* rtp_payload_registry); | 60 RTPPayloadRegistry* rtp_payload_registry); |
52 | 61 |
53 virtual ~RtpReceiver() {} | 62 virtual ~RtpReceiver() {} |
54 | 63 |
55 // Returns a TelephoneEventHandler if available. | 64 // Returns a TelephoneEventHandler if available. |
56 virtual TelephoneEventHandler* GetTelephoneEventHandler() = 0; | 65 virtual TelephoneEventHandler* GetTelephoneEventHandler() = 0; |
57 | 66 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 | 103 |
95 // Returns the current remote CSRCs. | 104 // Returns the current remote CSRCs. |
96 virtual int32_t CSRCs(uint32_t array_of_csrc[kRtpCsrcSize]) const = 0; | 105 virtual int32_t CSRCs(uint32_t array_of_csrc[kRtpCsrcSize]) const = 0; |
97 | 106 |
98 // Returns the current energy of the RTP stream received. | 107 // Returns the current energy of the RTP stream received. |
99 virtual int32_t Energy(uint8_t array_of_energy[kRtpCsrcSize]) const = 0; | 108 virtual int32_t Energy(uint8_t array_of_energy[kRtpCsrcSize]) const = 0; |
100 }; | 109 }; |
101 } // namespace webrtc | 110 } // namespace webrtc |
102 | 111 |
103 #endif // WEBRTC_MODULES_RTP_RTCP_INCLUDE_RTP_RECEIVER_H_ | 112 #endif // WEBRTC_MODULES_RTP_RTCP_INCLUDE_RTP_RECEIVER_H_ |
OLD | NEW |