Prepare for splitting FrameType into AudioFrameType and VideoFrameType
This cl deprecates the FrameType enum, and adds aliases AudioFrameType and VideoFrameType. After downstream usage is updated, the enums will be separated and be moved out of common_types.h. Bug: webrtc:6883 Change-Id: I2aaf660169da45f22574b4cbb16aea8522cc07a6 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/123184 Commit-Queue: Niels Moller <nisse@webrtc.org> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Cr-Commit-Position: refs/heads/master@{#27011}
This commit is contained in:
@ -103,7 +103,7 @@ class AcmReceiverTestOldApi : public AudioPacketizationCallback,
|
||||
return num_10ms_frames;
|
||||
}
|
||||
|
||||
int SendData(FrameType frame_type,
|
||||
int SendData(AudioFrameType frame_type,
|
||||
uint8_t payload_type,
|
||||
uint32_t timestamp,
|
||||
const uint8_t* payload_data,
|
||||
@ -139,7 +139,7 @@ class AcmReceiverTestOldApi : public AudioPacketizationCallback,
|
||||
uint32_t timestamp_;
|
||||
bool packet_sent_; // Set when SendData is called reset when inserting audio.
|
||||
uint32_t last_packet_send_timestamp_;
|
||||
FrameType last_frame_type_;
|
||||
AudioFrameType last_frame_type_;
|
||||
};
|
||||
|
||||
#if defined(WEBRTC_ANDROID)
|
||||
|
||||
@ -123,7 +123,7 @@ std::unique_ptr<Packet> AcmSendTestOldApi::NextPacket() {
|
||||
|
||||
// This method receives the callback from ACM when a new packet is produced.
|
||||
int32_t AcmSendTestOldApi::SendData(
|
||||
FrameType frame_type,
|
||||
AudioFrameType frame_type,
|
||||
uint8_t payload_type,
|
||||
uint32_t timestamp,
|
||||
const uint8_t* payload_data,
|
||||
|
||||
@ -50,7 +50,7 @@ class AcmSendTestOldApi : public AudioPacketizationCallback,
|
||||
std::unique_ptr<Packet> NextPacket() override;
|
||||
|
||||
// Inherited from AudioPacketizationCallback.
|
||||
int32_t SendData(FrameType frame_type,
|
||||
int32_t SendData(AudioFrameType frame_type,
|
||||
uint8_t payload_type,
|
||||
uint32_t timestamp,
|
||||
const uint8_t* payload_data,
|
||||
@ -75,7 +75,7 @@ class AcmSendTestOldApi : public AudioPacketizationCallback,
|
||||
bool codec_registered_;
|
||||
int test_duration_ms_;
|
||||
// The following member variables are set whenever SendData() is called.
|
||||
FrameType frame_type_;
|
||||
AudioFrameType frame_type_;
|
||||
int payload_type_;
|
||||
uint32_t timestamp_;
|
||||
uint16_t sequence_number_;
|
||||
|
||||
@ -393,7 +393,7 @@ int32_t AudioCodingModuleImpl::Encode(const InputData& input_data) {
|
||||
|
||||
RTPFragmentationHeader my_fragmentation;
|
||||
ConvertEncodedInfoToFragmentationHeader(encoded_info, &my_fragmentation);
|
||||
FrameType frame_type;
|
||||
AudioFrameType frame_type;
|
||||
if (encode_buffer_.size() == 0 && encoded_info.send_even_if_empty) {
|
||||
frame_type = kEmptyFrame;
|
||||
encoded_info.payload_type = previous_pltype;
|
||||
|
||||
@ -104,7 +104,7 @@ class PacketizationCallbackStubOldApi : public AudioPacketizationCallback {
|
||||
last_payload_type_(-1),
|
||||
last_timestamp_(0) {}
|
||||
|
||||
int32_t SendData(FrameType frame_type,
|
||||
int32_t SendData(AudioFrameType frame_type,
|
||||
uint8_t payload_type,
|
||||
uint32_t timestamp,
|
||||
const uint8_t* payload_data,
|
||||
@ -129,7 +129,7 @@ class PacketizationCallbackStubOldApi : public AudioPacketizationCallback {
|
||||
return rtc::checked_cast<int>(last_payload_vec_.size());
|
||||
}
|
||||
|
||||
FrameType last_frame_type() const {
|
||||
AudioFrameType last_frame_type() const {
|
||||
rtc::CritScope lock(&crit_sect_);
|
||||
return last_frame_type_;
|
||||
}
|
||||
@ -151,7 +151,7 @@ class PacketizationCallbackStubOldApi : public AudioPacketizationCallback {
|
||||
|
||||
private:
|
||||
int num_calls_ RTC_GUARDED_BY(crit_sect_);
|
||||
FrameType last_frame_type_ RTC_GUARDED_BY(crit_sect_);
|
||||
AudioFrameType last_frame_type_ RTC_GUARDED_BY(crit_sect_);
|
||||
int last_payload_type_ RTC_GUARDED_BY(crit_sect_);
|
||||
uint32_t last_timestamp_ RTC_GUARDED_BY(crit_sect_);
|
||||
std::vector<uint8_t> last_payload_vec_ RTC_GUARDED_BY(crit_sect_);
|
||||
@ -430,7 +430,7 @@ class AudioCodingModuleTestWithComfortNoiseOldApi
|
||||
// that is contain comfort noise.
|
||||
const struct {
|
||||
int ix;
|
||||
FrameType type;
|
||||
AudioFrameType type;
|
||||
} expectation[] = {
|
||||
{2, kAudioFrameCN}, {5, kEmptyFrame}, {8, kEmptyFrame},
|
||||
{11, kAudioFrameCN}, {14, kEmptyFrame}, {17, kEmptyFrame},
|
||||
|
||||
@ -40,7 +40,7 @@ class AudioPacketizationCallback {
|
||||
public:
|
||||
virtual ~AudioPacketizationCallback() {}
|
||||
|
||||
virtual int32_t SendData(FrameType frame_type,
|
||||
virtual int32_t SendData(AudioFrameType frame_type,
|
||||
uint8_t payload_type,
|
||||
uint32_t timestamp,
|
||||
const uint8_t* payload_data,
|
||||
@ -53,7 +53,7 @@ class ACMVADCallback {
|
||||
public:
|
||||
virtual ~ACMVADCallback() {}
|
||||
|
||||
virtual int32_t InFrameType(FrameType frame_type) = 0;
|
||||
virtual int32_t InFrameType(AudioFrameType frame_type) = 0;
|
||||
};
|
||||
|
||||
class AudioCodingModule {
|
||||
|
||||
@ -107,7 +107,7 @@ class Packetizer : public AudioPacketizationCallback {
|
||||
ssrc_(ssrc),
|
||||
timestamp_rate_hz_(timestamp_rate_hz) {}
|
||||
|
||||
int32_t SendData(FrameType frame_type,
|
||||
int32_t SendData(AudioFrameType frame_type,
|
||||
uint8_t payload_type,
|
||||
uint32_t timestamp,
|
||||
const uint8_t* payload_data,
|
||||
|
||||
@ -18,7 +18,7 @@
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
int32_t Channel::SendData(FrameType frameType,
|
||||
int32_t Channel::SendData(AudioFrameType frameType,
|
||||
uint8_t payloadType,
|
||||
uint32_t timeStamp,
|
||||
const uint8_t* payloadData,
|
||||
|
||||
@ -47,7 +47,7 @@ class Channel : public AudioPacketizationCallback {
|
||||
Channel(int16_t chID = -1);
|
||||
~Channel() override;
|
||||
|
||||
int32_t SendData(FrameType frameType,
|
||||
int32_t SendData(AudioFrameType frameType,
|
||||
uint8_t payloadType,
|
||||
uint32_t timeStamp,
|
||||
const uint8_t* payloadData,
|
||||
|
||||
@ -33,8 +33,10 @@ TestPacketization::~TestPacketization() {
|
||||
}
|
||||
|
||||
int32_t TestPacketization::SendData(
|
||||
const FrameType /* frameType */, const uint8_t payloadType,
|
||||
const uint32_t timeStamp, const uint8_t* payloadData,
|
||||
const AudioFrameType /* frameType */,
|
||||
const uint8_t payloadType,
|
||||
const uint32_t timeStamp,
|
||||
const uint8_t* payloadData,
|
||||
const size_t payloadSize,
|
||||
const RTPFragmentationHeader* /* fragmentation */) {
|
||||
_rtpStream->Write(payloadType, timeStamp, _seqNo++, payloadData, payloadSize,
|
||||
|
||||
@ -28,7 +28,7 @@ class TestPacketization : public AudioPacketizationCallback {
|
||||
public:
|
||||
TestPacketization(RTPStream *rtpStream, uint16_t frequency);
|
||||
~TestPacketization();
|
||||
int32_t SendData(const FrameType frameType,
|
||||
int32_t SendData(const AudioFrameType frameType,
|
||||
const uint8_t payloadType,
|
||||
const uint32_t timeStamp,
|
||||
const uint8_t* payloadData,
|
||||
|
||||
@ -60,7 +60,7 @@ void TestPack::RegisterReceiverACM(AudioCodingModule* acm) {
|
||||
return;
|
||||
}
|
||||
|
||||
int32_t TestPack::SendData(FrameType frame_type,
|
||||
int32_t TestPack::SendData(AudioFrameType frame_type,
|
||||
uint8_t payload_type,
|
||||
uint32_t timestamp,
|
||||
const uint8_t* payload_data,
|
||||
|
||||
@ -25,7 +25,7 @@ class TestPack : public AudioPacketizationCallback {
|
||||
|
||||
void RegisterReceiverACM(AudioCodingModule* acm);
|
||||
|
||||
int32_t SendData(FrameType frame_type,
|
||||
int32_t SendData(AudioFrameType frame_type,
|
||||
uint8_t payload_type,
|
||||
uint32_t timestamp,
|
||||
const uint8_t* payload_data,
|
||||
|
||||
@ -40,7 +40,7 @@ void TestPackStereo::RegisterReceiverACM(AudioCodingModule* acm) {
|
||||
return;
|
||||
}
|
||||
|
||||
int32_t TestPackStereo::SendData(const FrameType frame_type,
|
||||
int32_t TestPackStereo::SendData(const AudioFrameType frame_type,
|
||||
const uint8_t payload_type,
|
||||
const uint32_t timestamp,
|
||||
const uint8_t* payload_data,
|
||||
|
||||
@ -31,7 +31,7 @@ class TestPackStereo : public AudioPacketizationCallback {
|
||||
|
||||
void RegisterReceiverACM(AudioCodingModule* acm);
|
||||
|
||||
int32_t SendData(const FrameType frame_type,
|
||||
int32_t SendData(const AudioFrameType frame_type,
|
||||
const uint8_t payload_type,
|
||||
const uint32_t timestamp,
|
||||
const uint8_t* payload_data,
|
||||
|
||||
@ -33,7 +33,7 @@ ActivityMonitor::ActivityMonitor() {
|
||||
ResetStatistics();
|
||||
}
|
||||
|
||||
int32_t ActivityMonitor::InFrameType(FrameType frame_type) {
|
||||
int32_t ActivityMonitor::InFrameType(AudioFrameType frame_type) {
|
||||
counter_[frame_type]++;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -25,7 +25,7 @@ namespace webrtc {
|
||||
class ActivityMonitor : public ACMVADCallback {
|
||||
public:
|
||||
ActivityMonitor();
|
||||
int32_t InFrameType(FrameType frame_type);
|
||||
int32_t InFrameType(AudioFrameType frame_type);
|
||||
void PrintStatistics();
|
||||
void ResetStatistics();
|
||||
void GetStatistics(uint32_t* stats);
|
||||
|
||||
Reference in New Issue
Block a user