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; | |
20 class VideoCodec; | |
danilchap
2016/11/23 17:12:50
maybe put VideoCodec after RTPPayloadRegistry for
magjed_webrtc
2016/11/24 09:39:40
Done.
| |
19 class RTPPayloadRegistry; | 21 class RTPPayloadRegistry; |
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 |
(...skipping 20 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. |
59 virtual int32_t RegisterReceivePayload( | 61 virtual int32_t RegisterReceivePayload(const CodecInst& audio_codec) = 0; |
60 const char payload_name[RTP_PAYLOAD_NAME_SIZE], | |
61 const int8_t payload_type, | |
62 const uint32_t frequency, | |
63 const size_t channels, | |
64 const uint32_t rate) = 0; | |
65 | 62 |
66 // De-registers |payload_type| from the payload registry. | 63 // De-registers |payload_type| from the payload registry. |
67 virtual int32_t DeRegisterReceivePayload(const int8_t payload_type) = 0; | 64 virtual int32_t DeRegisterReceivePayload(const int8_t payload_type) = 0; |
68 | 65 |
69 // Parses the media specific parts of an RTP packet and updates the receiver | 66 // Parses the media specific parts of an RTP packet and updates the receiver |
70 // state. This for instance means that any changes in SSRC and payload type is | 67 // state. This for instance means that any changes in SSRC and payload type is |
71 // detected and acted upon. | 68 // detected and acted upon. |
72 virtual bool IncomingRtpPacket(const RTPHeader& rtp_header, | 69 virtual bool IncomingRtpPacket(const RTPHeader& rtp_header, |
73 const uint8_t* payload, | 70 const uint8_t* payload, |
74 size_t payload_length, | 71 size_t payload_length, |
(...skipping 12 matching lines...) Expand all Loading... | |
87 | 84 |
88 // Returns the current remote CSRCs. | 85 // Returns the current remote CSRCs. |
89 virtual int32_t CSRCs(uint32_t array_of_csrc[kRtpCsrcSize]) const = 0; | 86 virtual int32_t CSRCs(uint32_t array_of_csrc[kRtpCsrcSize]) const = 0; |
90 | 87 |
91 // Returns the current energy of the RTP stream received. | 88 // Returns the current energy of the RTP stream received. |
92 virtual int32_t Energy(uint8_t array_of_energy[kRtpCsrcSize]) const = 0; | 89 virtual int32_t Energy(uint8_t array_of_energy[kRtpCsrcSize]) const = 0; |
93 }; | 90 }; |
94 } // namespace webrtc | 91 } // namespace webrtc |
95 | 92 |
96 #endif // WEBRTC_MODULES_RTP_RTCP_INCLUDE_RTP_RECEIVER_H_ | 93 #endif // WEBRTC_MODULES_RTP_RTCP_INCLUDE_RTP_RECEIVER_H_ |
OLD | NEW |