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},
|
||||
|
||||
Reference in New Issue
Block a user