Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(92)

Side by Side Diff: webrtc/modules/rtp_rtcp/source/rtp_receiver_audio.h

Issue 2524923002: Remove RTPPayloadStrategy and simplify RTPPayloadRegistry (Closed)
Patch Set: Keep old interface public to allow external code to migrate. Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
77 // We need to look out for special payload types here and sometimes reset 67 // We need to look out for special payload types here and sometimes reset
78 // statistics. In addition we sometimes need to tweak the frequency. 68 // statistics. In addition we sometimes need to tweak the frequency.
79 void CheckPayloadChanged(int8_t payload_type, 69 void CheckPayloadChanged(int8_t payload_type,
80 PayloadUnion* specific_payload, 70 PayloadUnion* specific_payload,
81 bool* should_discard_changes) override; 71 bool* should_discard_changes) override;
82 72
83 int Energy(uint8_t array_of_energy[kRtpCsrcSize]) const override; 73 int Energy(uint8_t array_of_energy[kRtpCsrcSize]) const override;
84 74
85 private: 75 private:
86 int32_t ParseAudioCodecSpecific(WebRtcRTPHeader* rtp_header, 76 int32_t ParseAudioCodecSpecific(WebRtcRTPHeader* rtp_header,
87 const uint8_t* payload_data, 77 const uint8_t* payload_data,
88 size_t payload_length, 78 size_t payload_length,
89 const AudioPayload& audio_specific, 79 const AudioPayload& audio_specific,
90 bool is_red); 80 bool is_red);
91 81
92 uint32_t last_received_frequency_;
93
94 bool telephone_event_forward_to_decoder_; 82 bool telephone_event_forward_to_decoder_;
95 int8_t telephone_event_payload_type_; 83 int8_t telephone_event_payload_type_;
96 std::set<uint8_t> telephone_event_reported_; 84 std::set<uint8_t> telephone_event_reported_;
97 85
98 int8_t cng_nb_payload_type_; 86 int8_t cng_nb_payload_type_;
99 int8_t cng_wb_payload_type_; 87 int8_t cng_wb_payload_type_;
100 int8_t cng_swb_payload_type_; 88 int8_t cng_swb_payload_type_;
101 int8_t cng_fb_payload_type_; 89 int8_t cng_fb_payload_type_;
102 90
103 uint8_t num_energy_; 91 uint8_t num_energy_;
104 uint8_t current_remote_energy_[kRtpCsrcSize]; 92 uint8_t current_remote_energy_[kRtpCsrcSize];
105 93
106 ThreadUnsafeOneTimeEvent first_packet_received_; 94 ThreadUnsafeOneTimeEvent first_packet_received_;
107 }; 95 };
108 } // namespace webrtc 96 } // namespace webrtc
109 97
110 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_RECEIVER_AUDIO_H_ 98 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_RECEIVER_AUDIO_H_
OLDNEW
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtp_payload_registry_unittest.cc ('k') | webrtc/modules/rtp_rtcp/source/rtp_utility.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698