Index: webrtc/test/frame_generator_capturer.cc |
diff --git a/webrtc/test/frame_generator_capturer.cc b/webrtc/test/frame_generator_capturer.cc |
index 98f7a4b0ef83e66bad1d80d94f462ba7227b2cb7..1867bf99a9df6829e729ae6ba109a3d0561afe77 100644 |
--- a/webrtc/test/frame_generator_capturer.cc |
+++ b/webrtc/test/frame_generator_capturer.cc |
@@ -106,6 +106,12 @@ void FrameGeneratorCapturer::SetFakeRotation(VideoRotation rotation) { |
fake_rotation_ = rotation; |
} |
+void FrameGeneratorCapturer::SetFakeContentType( |
+ VideoContentTypeId content_type) { |
+ rtc::CritScope cs(&lock_); |
+ fake_video_content_type_ = content_type; |
+} |
+ |
bool FrameGeneratorCapturer::Init() { |
// This check is added because frame_generator_ might be file based and should |
// not crash because a file moved. |
@@ -127,6 +133,7 @@ void FrameGeneratorCapturer::InsertFrame() { |
VideoFrame* frame = frame_generator_->NextFrame(); |
frame->set_ntp_time_ms(clock_->CurrentNtpInMilliseconds()); |
frame->set_rotation(fake_rotation_); |
+ frame->set_content_type(fake_video_content_type_); |
if (first_frame_capture_time_ == -1) { |
first_frame_capture_time_ = frame->ntp_time_ms(); |
} |