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 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 bool ShouldReportCsrcChanges(uint8_t payload_type) const override; | 57 bool ShouldReportCsrcChanges(uint8_t payload_type) const override; |
58 | 58 |
59 int32_t OnNewPayloadTypeCreated(const CodecInst& audio_codec) override; | 59 int32_t OnNewPayloadTypeCreated(const CodecInst& audio_codec) override; |
60 | 60 |
61 int32_t InvokeOnInitializeDecoder( | 61 int32_t InvokeOnInitializeDecoder( |
62 RtpFeedback* callback, | 62 RtpFeedback* callback, |
63 int8_t payload_type, | 63 int8_t payload_type, |
64 const char payload_name[RTP_PAYLOAD_NAME_SIZE], | 64 const char payload_name[RTP_PAYLOAD_NAME_SIZE], |
65 const PayloadUnion& specific_payload) const override; | 65 const PayloadUnion& specific_payload) const override; |
66 | 66 |
| 67 // We do not allow codecs to have multiple payload types for audio, so we |
| 68 // need to override the default behavior (which is to do nothing). |
| 69 void PossiblyRemoveExistingPayloadType( |
| 70 RtpUtility::PayloadTypeMap* payload_type_map, |
| 71 const char payload_name[RTP_PAYLOAD_NAME_SIZE], |
| 72 size_t payload_name_length, |
| 73 uint32_t frequency, |
| 74 uint8_t channels, |
| 75 uint32_t rate) const; |
| 76 |
67 // We need to look out for special payload types here and sometimes reset | 77 // We need to look out for special payload types here and sometimes reset |
68 // statistics. In addition we sometimes need to tweak the frequency. | 78 // statistics. In addition we sometimes need to tweak the frequency. |
69 void CheckPayloadChanged(int8_t payload_type, | 79 void CheckPayloadChanged(int8_t payload_type, |
70 PayloadUnion* specific_payload, | 80 PayloadUnion* specific_payload, |
71 bool* should_discard_changes) override; | 81 bool* should_discard_changes) override; |
72 | 82 |
73 int Energy(uint8_t array_of_energy[kRtpCsrcSize]) const override; | 83 int Energy(uint8_t array_of_energy[kRtpCsrcSize]) const override; |
74 | 84 |
75 private: | 85 private: |
76 int32_t ParseAudioCodecSpecific(WebRtcRTPHeader* rtp_header, | 86 int32_t ParseAudioCodecSpecific(WebRtcRTPHeader* rtp_header, |
77 const uint8_t* payload_data, | 87 const uint8_t* payload_data, |
78 size_t payload_length, | 88 size_t payload_length, |
79 const AudioPayload& audio_specific, | 89 const AudioPayload& audio_specific, |
80 bool is_red); | 90 bool is_red); |
81 | 91 |
| 92 uint32_t last_received_frequency_; |
| 93 |
82 bool telephone_event_forward_to_decoder_; | 94 bool telephone_event_forward_to_decoder_; |
83 int8_t telephone_event_payload_type_; | 95 int8_t telephone_event_payload_type_; |
84 std::set<uint8_t> telephone_event_reported_; | 96 std::set<uint8_t> telephone_event_reported_; |
85 | 97 |
86 int8_t cng_nb_payload_type_; | 98 int8_t cng_nb_payload_type_; |
87 int8_t cng_wb_payload_type_; | 99 int8_t cng_wb_payload_type_; |
88 int8_t cng_swb_payload_type_; | 100 int8_t cng_swb_payload_type_; |
89 int8_t cng_fb_payload_type_; | 101 int8_t cng_fb_payload_type_; |
90 | 102 |
91 uint8_t num_energy_; | 103 uint8_t num_energy_; |
92 uint8_t current_remote_energy_[kRtpCsrcSize]; | 104 uint8_t current_remote_energy_[kRtpCsrcSize]; |
93 | 105 |
94 ThreadUnsafeOneTimeEvent first_packet_received_; | 106 ThreadUnsafeOneTimeEvent first_packet_received_; |
95 }; | 107 }; |
96 } // namespace webrtc | 108 } // namespace webrtc |
97 | 109 |
98 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_RECEIVER_AUDIO_H_ | 110 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_RECEIVER_AUDIO_H_ |
OLD | NEW |