Deprecate RTPFragmentationHeader argument to AudioPacketizationCallback::SendData
It appears unused everywhere. It will be deleted in a followup cl. Bug: webrtc:6471 Change-Id: Ief992db6e52aee3cf1bc77ffd659ffbc072672ba Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/134212 Reviewed-by: Oskar Sundbom <ossu@webrtc.org> Commit-Queue: Niels Moller <nisse@webrtc.org> Cr-Commit-Position: refs/heads/master@{#27787}
This commit is contained in:
@ -282,28 +282,6 @@ int UpMix(const AudioFrame& frame, size_t length_out_buff, int16_t* out_buff) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
void ConvertEncodedInfoToFragmentationHeader(
|
||||
const AudioEncoder::EncodedInfo& info,
|
||||
RTPFragmentationHeader* frag) {
|
||||
if (info.redundant.empty()) {
|
||||
frag->fragmentationVectorSize = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
frag->VerifyAndAllocateFragmentationHeader(
|
||||
static_cast<uint16_t>(info.redundant.size()));
|
||||
frag->fragmentationVectorSize = static_cast<uint16_t>(info.redundant.size());
|
||||
size_t offset = 0;
|
||||
for (size_t i = 0; i < info.redundant.size(); ++i) {
|
||||
frag->fragmentationOffset[i] = offset;
|
||||
offset += info.redundant[i].encoded_bytes;
|
||||
frag->fragmentationLength[i] = info.redundant[i].encoded_bytes;
|
||||
frag->fragmentationTimeDiff[i] = rtc::dchecked_cast<uint16_t>(
|
||||
info.encoded_timestamp - info.redundant[i].encoded_timestamp);
|
||||
frag->fragmentationPlType[i] = info.redundant[i].payload_type;
|
||||
}
|
||||
}
|
||||
|
||||
void AudioCodingModuleImpl::ChangeLogger::MaybeLog(int value) {
|
||||
if (value != last_value_ || first_time_) {
|
||||
first_time_ = false;
|
||||
@ -391,8 +369,6 @@ int32_t AudioCodingModuleImpl::Encode(const InputData& input_data) {
|
||||
}
|
||||
}
|
||||
|
||||
RTPFragmentationHeader my_fragmentation;
|
||||
ConvertEncodedInfoToFragmentationHeader(encoded_info, &my_fragmentation);
|
||||
AudioFrameType frame_type;
|
||||
if (encode_buffer_.size() == 0 && encoded_info.send_even_if_empty) {
|
||||
frame_type = AudioFrameType::kEmptyFrame;
|
||||
@ -408,9 +384,7 @@ int32_t AudioCodingModuleImpl::Encode(const InputData& input_data) {
|
||||
if (packetization_callback_) {
|
||||
packetization_callback_->SendData(
|
||||
frame_type, encoded_info.payload_type, encoded_info.encoded_timestamp,
|
||||
encode_buffer_.data(), encode_buffer_.size(),
|
||||
my_fragmentation.fragmentationVectorSize > 0 ? &my_fragmentation
|
||||
: nullptr);
|
||||
encode_buffer_.data(), encode_buffer_.size());
|
||||
}
|
||||
|
||||
if (vad_callback_) {
|
||||
|
||||
Reference in New Issue
Block a user