Remove the type parameter to NetEq::GetAudio
The type is included in the AudioFrame output parameter. Rename the type NetEqOutputType to just OutputType, since it is now internal to NetEq. BUG=webrtc:5607 Review URL: https://codereview.webrtc.org/1769883002 Cr-Commit-Position: refs/heads/master@{#11903}
This commit is contained in:
committed by
Commit bot
parent
500c04bc86
commit
55480f5efa
@ -43,10 +43,9 @@ void NetEqExternalDecoderTest::InsertPacket(
|
||||
neteq_->InsertPacket(rtp_header, payload, receive_timestamp));
|
||||
}
|
||||
|
||||
void NetEqExternalDecoderTest::GetOutputAudio(AudioFrame* output,
|
||||
NetEqOutputType* output_type) {
|
||||
void NetEqExternalDecoderTest::GetOutputAudio(AudioFrame* output) {
|
||||
// Get audio from regular instance.
|
||||
EXPECT_EQ(NetEq::kOK, neteq_->GetAudio(output, output_type));
|
||||
EXPECT_EQ(NetEq::kOK, neteq_->GetAudio(output));
|
||||
EXPECT_EQ(channels_, output->num_channels_);
|
||||
EXPECT_EQ(static_cast<size_t>(kOutputLengthMs * sample_rate_hz_ / 1000),
|
||||
output->samples_per_channel_);
|
||||
|
||||
@ -43,7 +43,7 @@ class NetEqExternalDecoderTest {
|
||||
uint32_t receive_timestamp);
|
||||
|
||||
// Get 10 ms of audio data.
|
||||
void GetOutputAudio(AudioFrame* output, NetEqOutputType* output_type);
|
||||
void GetOutputAudio(AudioFrame* output);
|
||||
|
||||
NetEq* neteq() { return neteq_.get(); }
|
||||
|
||||
|
||||
@ -105,7 +105,7 @@ int64_t NetEqPerformanceTest::Run(int runtime_ms,
|
||||
|
||||
// Get output audio, but don't do anything with it.
|
||||
AudioFrame out_frame;
|
||||
int error = neteq->GetAudio(&out_frame, NULL);
|
||||
int error = neteq->GetAudio(&out_frame);
|
||||
if (error != NetEq::kOK)
|
||||
return -1;
|
||||
|
||||
|
||||
@ -391,7 +391,7 @@ int NetEqQualityTest::Transmit() {
|
||||
}
|
||||
|
||||
int NetEqQualityTest::DecodeBlock() {
|
||||
int ret = neteq_->GetAudio(&out_frame_, NULL);
|
||||
int ret = neteq_->GetAudio(&out_frame_);
|
||||
|
||||
if (ret != NetEq::kOK) {
|
||||
return -1;
|
||||
|
||||
@ -605,7 +605,7 @@ int main(int argc, char* argv[]) {
|
||||
// Check if it is time to get output audio.
|
||||
while (time_now_ms >= next_output_time_ms && output_event_available) {
|
||||
webrtc::AudioFrame out_frame;
|
||||
int error = neteq->GetAudio(&out_frame, NULL);
|
||||
int error = neteq->GetAudio(&out_frame);
|
||||
if (error != NetEq::kOK) {
|
||||
std::cerr << "GetAudio returned error code " <<
|
||||
neteq->LastError() << std::endl;
|
||||
|
||||
Reference in New Issue
Block a user