Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(184)

Unified Diff: webrtc/modules/video_coding/codecs/h264/h264_encoder_impl.cc

Issue 1964913002: Revert of Rename OpenH264 frame-type conversion function. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/video_coding/codecs/h264/h264_encoder_impl.cc
diff --git a/webrtc/modules/video_coding/codecs/h264/h264_encoder_impl.cc b/webrtc/modules/video_coding/codecs/h264/h264_encoder_impl.cc
index 3ec42362ab3f32f18a6bcc04af250f4b0cef4e6a..a6325a90704dca90b86ced8b94e9d198d9aa90b8 100644
--- a/webrtc/modules/video_coding/codecs/h264/h264_encoder_impl.cc
+++ b/webrtc/modules/video_coding/codecs/h264/h264_encoder_impl.cc
@@ -50,8 +50,12 @@
return 1;
}
-FrameType ConvertToVideoFrameType(EVideoFrameType type) {
+} // namespace
+
+static FrameType EVideoFrameType_to_FrameType(EVideoFrameType type) {
switch (type) {
+ case videoFrameTypeInvalid:
+ return kEmptyFrame;
case videoFrameTypeIDR:
return kVideoFrameKey;
case videoFrameTypeSkip:
@@ -59,14 +63,11 @@
case videoFrameTypeP:
case videoFrameTypeIPMixed:
return kVideoFrameDelta;
- case videoFrameTypeInvalid:
- break;
- }
- RTC_NOTREACHED() << "Unexpected/invalid frame type: " << type;
- return kEmptyFrame;
-}
-
-} // namespace
+ default:
+ LOG(LS_WARNING) << "Unknown EVideoFrameType: " << type;
+ return kVideoFrameDelta;
+ }
+}
// Helper method used by H264EncoderImpl::Encode.
// Copies the encoded bytes from |info| to |encoded_image| and updates the
@@ -385,7 +386,7 @@
encoded_image_.ntp_time_ms_ = frame.ntp_time_ms();
encoded_image_.capture_time_ms_ = frame.render_time_ms();
encoded_image_.rotation_ = frame.rotation();
- encoded_image_._frameType = ConvertToVideoFrameType(info.eFrameType);
+ encoded_image_._frameType = EVideoFrameType_to_FrameType(info.eFrameType);
// Split encoded image up into fragments. This also updates |encoded_image_|.
RTPFragmentationHeader frag_header;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698