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:
Niels Möller
2019-03-07 10:18:23 +01:00
committed by Commit Bot
parent 0b69826ffb
commit 87e2d785a0
98 changed files with 226 additions and 206 deletions

View File

@ -737,7 +737,7 @@ size_t LibvpxVp8Encoder::SteadyStateSize(int sid, int tid) {
int LibvpxVp8Encoder::Encode(const VideoFrame& frame,
const CodecSpecificInfo* codec_specific_info,
const std::vector<FrameType>* frame_types) {
const std::vector<VideoFrameType>* frame_types) {
RTC_DCHECK_EQ(frame.width(), codec_.width);
RTC_DCHECK_EQ(frame.height(), codec_.height);

View File

@ -47,7 +47,7 @@ class LibvpxVp8Encoder : public VideoEncoder {
int Encode(const VideoFrame& input_image,
const CodecSpecificInfo* codec_specific_info,
const std::vector<FrameType>* frame_types) override;
const std::vector<VideoFrameType>* frame_types) override;
int RegisterEncodeCompleteCallback(EncodedImageCallback* callback) override;

View File

@ -74,11 +74,11 @@ class TestVp8Impl : public VideoCodecUnitTest {
EncodedImage* encoded_frame,
CodecSpecificInfo* codec_specific_info,
bool keyframe = false) {
std::vector<FrameType> frame_types;
std::vector<VideoFrameType> frame_types;
if (keyframe) {
frame_types.emplace_back(FrameType::kVideoFrameKey);
frame_types.emplace_back(VideoFrameType::kVideoFrameKey);
} else {
frame_types.emplace_back(FrameType::kVideoFrameDelta);
frame_types.emplace_back(VideoFrameType::kVideoFrameDelta);
}
EXPECT_EQ(WEBRTC_VIDEO_CODEC_OK,
encoder_->Encode(input_frame, &frame_types));
@ -484,7 +484,7 @@ TEST_F(TestVp8Impl, KeepsTimestampOnReencode) {
.Times(2)
.WillRepeatedly(Return(vpx_codec_err_t::VPX_CODEC_OK));
auto delta_frame = std::vector<FrameType>{kVideoFrameDelta};
auto delta_frame = std::vector<VideoFrameType>{kVideoFrameDelta};
encoder.Encode(*NextInputFrame(), nullptr, &delta_frame);
}