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}
diff --git a/modules/audio_coding/acm2/acm_receiver_unittest.cc b/modules/audio_coding/acm2/acm_receiver_unittest.cc
index e5a7684..7667b71 100644
--- a/modules/audio_coding/acm2/acm_receiver_unittest.cc
+++ b/modules/audio_coding/acm2/acm_receiver_unittest.cc
@@ -103,7 +103,7 @@
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 @@
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)
diff --git a/modules/audio_coding/acm2/acm_send_test.cc b/modules/audio_coding/acm2/acm_send_test.cc
index b6110b6..4c34e41 100644
--- a/modules/audio_coding/acm2/acm_send_test.cc
+++ b/modules/audio_coding/acm2/acm_send_test.cc
@@ -123,7 +123,7 @@
// 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,
diff --git a/modules/audio_coding/acm2/acm_send_test.h b/modules/audio_coding/acm2/acm_send_test.h
index 24d230b..744d015 100644
--- a/modules/audio_coding/acm2/acm_send_test.h
+++ b/modules/audio_coding/acm2/acm_send_test.h
@@ -50,7 +50,7 @@
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 @@
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_;
diff --git a/modules/audio_coding/acm2/audio_coding_module.cc b/modules/audio_coding/acm2/audio_coding_module.cc
index 1547b37..a4b64b1 100644
--- a/modules/audio_coding/acm2/audio_coding_module.cc
+++ b/modules/audio_coding/acm2/audio_coding_module.cc
@@ -393,7 +393,7 @@
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;
diff --git a/modules/audio_coding/acm2/audio_coding_module_unittest.cc b/modules/audio_coding/acm2/audio_coding_module_unittest.cc
index 4ee9add..797b9b1 100644
--- a/modules/audio_coding/acm2/audio_coding_module_unittest.cc
+++ b/modules/audio_coding/acm2/audio_coding_module_unittest.cc
@@ -104,7 +104,7 @@
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 @@
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 @@
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 @@
// 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},