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

Unified Diff: webrtc/video/send_statistics_proxy_unittest.cc

Issue 1903193002: Revert of Deprecate VCMPacketizationCallback::SendData and use EncodedImageCallback instead. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 8 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 | « webrtc/video/send_statistics_proxy.cc ('k') | webrtc/video/video_receive_stream.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/send_statistics_proxy_unittest.cc
diff --git a/webrtc/video/send_statistics_proxy_unittest.cc b/webrtc/video/send_statistics_proxy_unittest.cc
index eb77a278877050ff8804c8e97ee5f168665a2875..dae0b46a4547de43543d1cae1f71682d58c8137f 100644
--- a/webrtc/video/send_statistics_proxy_unittest.cc
+++ b/webrtc/video/send_statistics_proxy_unittest.cc
@@ -334,16 +334,16 @@
TEST_F(SendStatisticsProxyTest, VerifyQpHistogramStats_Vp8) {
test::ClearHistograms();
EncodedImage encoded_image;
- CodecSpecificInfo codec_info;
- codec_info.codecType = kVideoCodecVP8;
+ RTPVideoHeader rtp_video_header;
+ rtp_video_header.codec = kRtpVideoVp8;
for (int i = 0; i < kMinRequiredSamples; ++i) {
- codec_info.codecSpecific.VP8.simulcastIdx = 0;
+ rtp_video_header.simulcastIdx = 0;
encoded_image.qp_ = kQpIdx0;
- statistics_proxy_->OnSendEncodedImage(encoded_image, &codec_info);
- codec_info.codecSpecific.VP8.simulcastIdx = 1;
+ statistics_proxy_->OnSendEncodedImage(encoded_image, &rtp_video_header);
+ rtp_video_header.simulcastIdx = 1;
encoded_image.qp_ = kQpIdx1;
- statistics_proxy_->OnSendEncodedImage(encoded_image, &codec_info);
+ statistics_proxy_->OnSendEncodedImage(encoded_image, &rtp_video_header);
}
statistics_proxy_.reset();
EXPECT_EQ(1, test::NumHistogramSamples("WebRTC.Video.Encoded.Qp.Vp8.S0"));
@@ -362,13 +362,13 @@
test::ClearHistograms();
EncodedImage encoded_image;
- CodecSpecificInfo codec_info;
- codec_info.codecType = kVideoCodecVP8;
+ RTPVideoHeader rtp_video_header;
+ rtp_video_header.codec = kRtpVideoVp8;
for (int i = 0; i < kMinRequiredSamples; ++i) {
- codec_info.codecSpecific.VP8.simulcastIdx = 0;
+ rtp_video_header.simulcastIdx = 0;
encoded_image.qp_ = kQpIdx0;
- statistics_proxy_->OnSendEncodedImage(encoded_image, &codec_info);
+ statistics_proxy_->OnSendEncodedImage(encoded_image, &rtp_video_header);
}
statistics_proxy_.reset();
EXPECT_EQ(1, test::NumHistogramSamples("WebRTC.Video.Encoded.Qp.Vp8"));
@@ -378,17 +378,18 @@
TEST_F(SendStatisticsProxyTest, VerifyQpHistogramStats_Vp9) {
test::ClearHistograms();
EncodedImage encoded_image;
- CodecSpecificInfo codec_info;
- codec_info.codecType = kVideoCodecVP9;
- codec_info.codecSpecific.VP9.num_spatial_layers = 2;
+ RTPVideoHeader rtp_video_header;
+ rtp_video_header.simulcastIdx = 0;
+ rtp_video_header.codec = kRtpVideoVp9;
+ rtp_video_header.codecHeader.VP9.num_spatial_layers = 2;
for (int i = 0; i < kMinRequiredSamples; ++i) {
encoded_image.qp_ = kQpIdx0;
- codec_info.codecSpecific.VP9.spatial_idx = 0;
- statistics_proxy_->OnSendEncodedImage(encoded_image, &codec_info);
+ rtp_video_header.codecHeader.VP9.spatial_idx = 0;
+ statistics_proxy_->OnSendEncodedImage(encoded_image, &rtp_video_header);
encoded_image.qp_ = kQpIdx1;
- codec_info.codecSpecific.VP9.spatial_idx = 1;
- statistics_proxy_->OnSendEncodedImage(encoded_image, &codec_info);
+ rtp_video_header.codecHeader.VP9.spatial_idx = 1;
+ statistics_proxy_->OnSendEncodedImage(encoded_image, &rtp_video_header);
}
statistics_proxy_.reset();
EXPECT_EQ(1, test::NumHistogramSamples("WebRTC.Video.Encoded.Qp.Vp9.S0"));
@@ -407,14 +408,15 @@
test::ClearHistograms();
EncodedImage encoded_image;
- CodecSpecificInfo codec_info;
- codec_info.codecType = kVideoCodecVP9;
- codec_info.codecSpecific.VP9.num_spatial_layers = 1;
+ RTPVideoHeader rtp_video_header;
+ rtp_video_header.simulcastIdx = 0;
+ rtp_video_header.codec = kRtpVideoVp9;
+ rtp_video_header.codecHeader.VP9.num_spatial_layers = 1;
for (int i = 0; i < kMinRequiredSamples; ++i) {
encoded_image.qp_ = kQpIdx0;
- codec_info.codecSpecific.VP9.spatial_idx = 0;
- statistics_proxy_->OnSendEncodedImage(encoded_image, &codec_info);
+ rtp_video_header.codecHeader.VP9.spatial_idx = 0;
+ statistics_proxy_->OnSendEncodedImage(encoded_image, &rtp_video_header);
}
statistics_proxy_.reset();
EXPECT_EQ(1, test::NumHistogramSamples("WebRTC.Video.Encoded.Qp.Vp9"));
@@ -456,13 +458,12 @@
encoded_image._encodedWidth = kEncodedWidth;
encoded_image._encodedHeight = kEncodedHeight;
- CodecSpecificInfo codec_info;
- codec_info.codecType = kVideoCodecVP8;
- codec_info.codecSpecific.VP8.simulcastIdx = 0;
-
- statistics_proxy_->OnSendEncodedImage(encoded_image, &codec_info);
- codec_info.codecSpecific.VP8.simulcastIdx = 1;
- statistics_proxy_->OnSendEncodedImage(encoded_image, &codec_info);
+ RTPVideoHeader rtp_video_header;
+
+ rtp_video_header.simulcastIdx = 0;
+ statistics_proxy_->OnSendEncodedImage(encoded_image, &rtp_video_header);
+ rtp_video_header.simulcastIdx = 1;
+ statistics_proxy_->OnSendEncodedImage(encoded_image, &rtp_video_header);
VideoSendStream::Stats stats = statistics_proxy_->GetStats();
EXPECT_EQ(kEncodedWidth, stats.substreams[config_.rtp.ssrcs[0]].width);
@@ -484,8 +485,8 @@
// Report stats for second SSRC to make sure it's not outdated along with the
// first SSRC.
- codec_info.codecSpecific.VP8.simulcastIdx = 1;
- statistics_proxy_->OnSendEncodedImage(encoded_image, &codec_info);
+ rtp_video_header.simulcastIdx = 1;
+ statistics_proxy_->OnSendEncodedImage(encoded_image, &rtp_video_header);
// Forward 1 ms, reach timeout, substream 0 should have no resolution
// reported, but substream 1 should.
@@ -504,13 +505,12 @@
encoded_image._encodedWidth = kEncodedWidth;
encoded_image._encodedHeight = kEncodedHeight;
- CodecSpecificInfo codec_info;
- codec_info.codecType = kVideoCodecVP8;
- codec_info.codecSpecific.VP8.simulcastIdx = 0;
-
- statistics_proxy_->OnSendEncodedImage(encoded_image, &codec_info);
- codec_info.codecSpecific.VP8.simulcastIdx = 1;
- statistics_proxy_->OnSendEncodedImage(encoded_image, &codec_info);
+ RTPVideoHeader rtp_video_header;
+
+ rtp_video_header.simulcastIdx = 0;
+ statistics_proxy_->OnSendEncodedImage(encoded_image, &rtp_video_header);
+ rtp_video_header.simulcastIdx = 1;
+ statistics_proxy_->OnSendEncodedImage(encoded_image, &rtp_video_header);
statistics_proxy_->OnInactiveSsrc(config_.rtp.ssrcs[1]);
VideoSendStream::Stats stats = statistics_proxy_->GetStats();
« no previous file with comments | « webrtc/video/send_statistics_proxy.cc ('k') | webrtc/video/video_receive_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698