Make VideoFrameType an enum class, and move to separate file and target
Bug: webrtc:5876, webrtc:6883
Change-Id: I1435cfa9e8e54c4ba2978261048ff3fbb993ce0e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126225
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27239}
diff --git a/modules/video_coding/decoding_state.cc b/modules/video_coding/decoding_state.cc
index 1d54063..16266cb 100644
--- a/modules/video_coding/decoding_state.cc
+++ b/modules/video_coding/decoding_state.cc
@@ -100,7 +100,7 @@
uint16_t frame_index = picture_id_ % kFrameDecodedLength;
if (in_initial_state_) {
frame_decoded_cleared_to_ = frame_index;
- } else if (frame->FrameType() == kVideoFrameKey) {
+ } else if (frame->FrameType() == VideoFrameType::kVideoFrameKey) {
memset(frame_decoded_, 0, sizeof(frame_decoded_));
frame_decoded_cleared_to_ = frame_index;
} else {
@@ -176,7 +176,8 @@
if (frame->TemporalId() == kNoTemporalIdx ||
frame->Tl0PicId() == kNoTl0PicIdx) {
full_sync_ = true;
- } else if (frame->FrameType() == kVideoFrameKey || frame->LayerSync()) {
+ } else if (frame->FrameType() == VideoFrameType::kVideoFrameKey ||
+ frame->LayerSync()) {
full_sync_ = true;
} else if (full_sync_) {
// Verify that we are still in sync.
@@ -207,7 +208,7 @@
// A key frame is always considered continuous as it doesn't refer to any
// frames and therefore won't introduce any errors even if prior frames are
// missing.
- if (frame->FrameType() == kVideoFrameKey &&
+ if (frame->FrameType() == VideoFrameType::kVideoFrameKey &&
HaveSpsAndPps(frame->GetNaluInfos())) {
return true;
}