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

Unified Diff: webrtc/test/frame_generator_capturer.cc

Issue 2772033002: Add content type information to encoded images and corresponding rtp extension header (Closed)
Patch Set: Set EncodedImage content_type from vie_encoder Created 3 years, 9 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
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();
}

Powered by Google App Engine
This is Rietveld 408576698