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

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: Fix Mac CE 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 9e74e40d18bf072b85ab23c2283ded7a2660bc6c..505f5c9c051d3fb2670b69ad543816829e870507 100644
--- a/webrtc/test/frame_generator_capturer.cc
+++ b/webrtc/test/frame_generator_capturer.cc
@@ -126,6 +126,11 @@ void FrameGeneratorCapturer::SetFakeRotation(VideoRotation rotation) {
fake_rotation_ = rotation;
}
+void FrameGeneratorCapturer::SetFakeContentType(VideoContentType 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.
@@ -147,6 +152,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