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

Unified Diff: webrtc/test/fake_encoder.cc

Issue 2772033002: Add content type information to encoded images and corresponding rtp extension header (Closed)
Patch Set: Fix android 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/fake_encoder.cc
diff --git a/webrtc/test/fake_encoder.cc b/webrtc/test/fake_encoder.cc
index 1db93eb40e36b6ebc87089a6171b438bfdfa907c..02fda99e1754b02d2f865bdd4d2cf4c547e8af21 100644
--- a/webrtc/test/fake_encoder.cc
+++ b/webrtc/test/fake_encoder.cc
@@ -61,6 +61,7 @@ int32_t FakeEncoder::Encode(const VideoFrame& input_image,
int max_target_bitrate_kbps;
int64_t last_encode_time_ms;
size_t num_encoded_bytes;
+ VideoCodecMode mode;
{
rtc::CritScope cs(&crit_sect_);
max_framerate = config_.maxFramerate;
@@ -73,6 +74,7 @@ int32_t FakeEncoder::Encode(const VideoFrame& input_image,
max_target_bitrate_kbps = max_target_bitrate_kbps_;
last_encode_time_ms = last_encode_time_ms_;
num_encoded_bytes = sizeof(encoded_buffer_);
+ mode = config_.mode;
}
int64_t time_now_ms = clock_->TimeInMilliseconds();
@@ -142,6 +144,10 @@ int32_t FakeEncoder::Encode(const VideoFrame& input_image,
encoded._encodedWidth = simulcast_streams[i].width;
encoded._encodedHeight = simulcast_streams[i].height;
encoded.rotation_ = input_image.rotation();
+ if (mode == kScreensharing)
+ encoded.content_type_ = VideoContentType::kScreenshare;
+ else
+ encoded.content_type_ = VideoContentType::kDefault;
specifics.codec_name = ImplementationName();
RTC_DCHECK(callback);
if (callback->OnEncodedImage(encoded, &specifics, nullptr).error !=

Powered by Google App Engine
This is Rietveld 408576698