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 struct CodecInst; |
19 class RTPPayloadRegistry; | 20 class RTPPayloadRegistry; |
| 21 class VideoCodec; |
20 | 22 |
21 class TelephoneEventHandler { | 23 class TelephoneEventHandler { |
22 public: | 24 public: |
23 virtual ~TelephoneEventHandler() {} | 25 virtual ~TelephoneEventHandler() {} |
24 | 26 |
25 // The following three methods implement the TelephoneEventHandler interface. | 27 // The following three methods implement the TelephoneEventHandler interface. |
26 // Forward DTMFs to decoder for playout. | 28 // Forward DTMFs to decoder for playout. |
27 virtual void SetTelephoneEventForwardToDecoder(bool forward_to_decoder) = 0; | 29 virtual void SetTelephoneEventForwardToDecoder(bool forward_to_decoder) = 0; |
28 | 30 |
29 // Is forwarding of outband telephone events turned on/off? | 31 // Is forwarding of outband telephone events turned on/off? |
(...skipping 19 matching lines...) Expand all Loading... |
49 RtpFeedback* incoming_messages_callback, | 51 RtpFeedback* incoming_messages_callback, |
50 RTPPayloadRegistry* rtp_payload_registry); | 52 RTPPayloadRegistry* rtp_payload_registry); |
51 | 53 |
52 virtual ~RtpReceiver() {} | 54 virtual ~RtpReceiver() {} |
53 | 55 |
54 // Returns a TelephoneEventHandler if available. | 56 // Returns a TelephoneEventHandler if available. |
55 virtual TelephoneEventHandler* GetTelephoneEventHandler() = 0; | 57 virtual TelephoneEventHandler* GetTelephoneEventHandler() = 0; |
56 | 58 |
57 // Registers a receive payload in the payload registry and notifies the media | 59 // Registers a receive payload in the payload registry and notifies the media |
58 // receiver strategy. | 60 // receiver strategy. |
| 61 virtual int32_t RegisterReceivePayload(const CodecInst& audio_codec) = 0; |
| 62 // TODO(magjed): Remove once external code is updated. |
59 virtual int32_t RegisterReceivePayload( | 63 virtual int32_t RegisterReceivePayload( |
60 const char payload_name[RTP_PAYLOAD_NAME_SIZE], | 64 const char payload_name[RTP_PAYLOAD_NAME_SIZE], |
61 const int8_t payload_type, | 65 const int8_t payload_type, |
62 const uint32_t frequency, | 66 const uint32_t frequency, |
63 const size_t channels, | 67 const size_t channels, |
64 const uint32_t rate) = 0; | 68 const uint32_t rate) = 0; |
65 | 69 |
66 // De-registers |payload_type| from the payload registry. | 70 // De-registers |payload_type| from the payload registry. |
67 virtual int32_t DeRegisterReceivePayload(const int8_t payload_type) = 0; | 71 virtual int32_t DeRegisterReceivePayload(const int8_t payload_type) = 0; |
68 | 72 |
(...skipping 18 matching lines...) Expand all Loading... |
87 | 91 |
88 // Returns the current remote CSRCs. | 92 // Returns the current remote CSRCs. |
89 virtual int32_t CSRCs(uint32_t array_of_csrc[kRtpCsrcSize]) const = 0; | 93 virtual int32_t CSRCs(uint32_t array_of_csrc[kRtpCsrcSize]) const = 0; |
90 | 94 |
91 // Returns the current energy of the RTP stream received. | 95 // Returns the current energy of the RTP stream received. |
92 virtual int32_t Energy(uint8_t array_of_energy[kRtpCsrcSize]) const = 0; | 96 virtual int32_t Energy(uint8_t array_of_energy[kRtpCsrcSize]) const = 0; |
93 }; | 97 }; |
94 } // namespace webrtc | 98 } // namespace webrtc |
95 | 99 |
96 #endif // WEBRTC_MODULES_RTP_RTCP_INCLUDE_RTP_RECEIVER_H_ | 100 #endif // WEBRTC_MODULES_RTP_RTCP_INCLUDE_RTP_RECEIVER_H_ |
OLD | NEW |