Clean up in module_common_types.h by removing the unused struct RTPAudioHeader.
By removing it we can in turn (next CL) get rid of RTPTypeHeader, which is a union that cause some problems. Bug: none Change-Id: I9246ecbfe2c8b7eda27497cccbc5f438958b64bf Reviewed-on: https://webrtc-review.googlesource.com/83985 Reviewed-by: Stefan Holmer <stefan@webrtc.org> Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org> Commit-Queue: Philip Eliasson <philipel@webrtc.org> Cr-Commit-Position: refs/heads/master@{#23666}
This commit is contained in:
@ -40,11 +40,6 @@ int32_t Channel::SendData(FrameType frameType,
|
||||
? timeStamp
|
||||
: static_cast<uint32_t>(external_send_timestamp_);
|
||||
|
||||
if (frameType == kAudioFrameCN) {
|
||||
rtpInfo.type.Audio.isCNG = true;
|
||||
} else {
|
||||
rtpInfo.type.Audio.isCNG = false;
|
||||
}
|
||||
if (frameType == kEmptyFrame) {
|
||||
// When frame is empty, we should not transmit it. The frame size of the
|
||||
// next non-empty frame will be based on the previous frame size.
|
||||
@ -52,7 +47,6 @@ int32_t Channel::SendData(FrameType frameType,
|
||||
return 0;
|
||||
}
|
||||
|
||||
rtpInfo.type.Audio.channel = 1;
|
||||
// Treat fragmentation separately
|
||||
if (fragmentation != NULL) {
|
||||
// If silence for too long, send only new data.
|
||||
@ -89,11 +83,9 @@ int32_t Channel::SendData(FrameType frameType,
|
||||
if (_leftChannel) {
|
||||
memcpy(&_rtpInfo, &rtpInfo, sizeof(WebRtcRTPHeader));
|
||||
_leftChannel = false;
|
||||
rtpInfo.type.Audio.channel = 1;
|
||||
} else {
|
||||
memcpy(&rtpInfo, &_rtpInfo, sizeof(WebRtcRTPHeader));
|
||||
_leftChannel = true;
|
||||
rtpInfo.type.Audio.channel = 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -222,8 +222,6 @@ size_t RTPFile::Read(WebRtcRTPHeader* rtpInfo,
|
||||
|
||||
EXPECT_EQ(1u, fread(rtpHeader, 12, 1, _rtpFile));
|
||||
ParseRTPHeader(rtpInfo, rtpHeader);
|
||||
rtpInfo->type.Audio.isCNG = false;
|
||||
rtpInfo->type.Audio.channel = 1;
|
||||
EXPECT_EQ(lengthBytes, plen + 8);
|
||||
|
||||
if (plen == 0) {
|
||||
|
||||
@ -69,18 +69,13 @@ int32_t TestPack::SendData(FrameType frame_type,
|
||||
rtp_info.header.sequenceNumber = sequence_number_++;
|
||||
rtp_info.header.payloadType = payload_type;
|
||||
rtp_info.header.timestamp = timestamp;
|
||||
if (frame_type == kAudioFrameCN) {
|
||||
rtp_info.type.Audio.isCNG = true;
|
||||
} else {
|
||||
rtp_info.type.Audio.isCNG = false;
|
||||
}
|
||||
|
||||
if (frame_type == kEmptyFrame) {
|
||||
// Skip this frame.
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Only run mono for all test cases.
|
||||
rtp_info.type.Audio.channel = 1;
|
||||
memcpy(payload_data_, payload_data, payload_size);
|
||||
|
||||
status = receiver_acm_->IncomingPacket(payload_data_, payload_size, rtp_info);
|
||||
|
||||
@ -63,13 +63,6 @@ int32_t TestPackStereo::SendData(const FrameType frame_type,
|
||||
}
|
||||
|
||||
if (lost_packet_ == false) {
|
||||
if (frame_type != kAudioFrameCN) {
|
||||
rtp_info.type.Audio.isCNG = false;
|
||||
rtp_info.type.Audio.channel = static_cast<int>(codec_mode_);
|
||||
} else {
|
||||
rtp_info.type.Audio.isCNG = true;
|
||||
rtp_info.type.Audio.channel = static_cast<int>(kMono);
|
||||
}
|
||||
status =
|
||||
receiver_acm_->IncomingPacket(payload_data, payload_size, rtp_info);
|
||||
|
||||
|
||||
@ -43,8 +43,6 @@ class TargetDelayTest : public ::testing::Test {
|
||||
rtp_info_.header.ssrc = 0x12345678;
|
||||
rtp_info_.header.markerBit = false;
|
||||
rtp_info_.header.sequenceNumber = 0;
|
||||
rtp_info_.type.Audio.channel = 1;
|
||||
rtp_info_.type.Audio.isCNG = false;
|
||||
rtp_info_.frameType = kAudioFrameSpeech;
|
||||
|
||||
int16_t audio[kFrameSizeSamples];
|
||||
|
||||
Reference in New Issue
Block a user