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

Unified Diff: webrtc/video/video_send_stream_tests.cc

Issue 2337453002: H.264 packetization mode 0 (try 2) (Closed)
Patch Set: Working H.264 test where packetization mode 0 is set Created 4 years, 2 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
« webrtc/video/end_to_end_tests.cc ('K') | « webrtc/video/payload_router.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/video_send_stream_tests.cc
diff --git a/webrtc/video/video_send_stream_tests.cc b/webrtc/video/video_send_stream_tests.cc
index 9d00e007de2f15427e1e3c0c07f13e27c3f40709..4eaa351fce5c770ff2f6e8fd6b503feb07d3df57 100644
--- a/webrtc/video/video_send_stream_tests.cc
+++ b/webrtc/video/video_send_stream_tests.cc
@@ -1897,6 +1897,7 @@ class VideoCodecConfigObserver : public test::SendTest,
num_initializations_(0),
stream_(nullptr) {
memset(&encoder_settings_, 0, sizeof(encoder_settings_));
+ InitCodecSpecifics();
}
private:
@@ -1920,6 +1921,8 @@ class VideoCodecConfigObserver : public test::SendTest,
}
};
+ void InitCodecSpecifics();
+
void ModifyVideoConfigs(
VideoSendStream::Config* send_config,
std::vector<VideoReceiveStream::Config>* receive_configs,
@@ -1989,11 +1992,21 @@ class VideoCodecConfigObserver : public test::SendTest,
VideoEncoderConfig encoder_config_;
};
+template <typename T>
+void VideoCodecConfigObserver<T>::InitCodecSpecifics() {}
+
+template <>
+void VideoCodecConfigObserver<VideoCodecH264>::InitCodecSpecifics() {
+ encoder_settings_.packetization_mode = kH264PacketizationMode1;
+}
template <>
void VideoCodecConfigObserver<VideoCodecH264>::VerifyCodecSpecifics(
const VideoCodec& config) const {
EXPECT_EQ(
0, memcmp(&config.H264(), &encoder_settings_, sizeof(encoder_settings_)));
+ // Check that packetization mode has propagated.
+ EXPECT_EQ(kH264PacketizationMode1,
+ config.codecSpecific.H264.packetization_mode);
}
template <>
« webrtc/video/end_to_end_tests.cc ('K') | « webrtc/video/payload_router.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698