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

Unified Diff: webrtc/video/video_send_stream_tests.cc

Issue 2337453002: H.264 packetization mode 0 (try 2) (Closed)
Patch Set: Upload try 2 (with rebase) Created 4 years, 1 month 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/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 2b5c6e690976d8a4472ec0c00819ba6f9444543d..a601a10f60ba7546abba2b834722eaae7fde925c 100644
--- a/webrtc/video/video_send_stream_tests.cc
+++ b/webrtc/video/video_send_stream_tests.cc
@@ -1970,6 +1970,7 @@ class VideoCodecConfigObserver : public test::SendTest,
num_initializations_(0),
stream_(nullptr) {
memset(&encoder_settings_, 0, sizeof(encoder_settings_));
+ InitCodecSpecifics();
}
private:
@@ -1993,6 +1994,8 @@ class VideoCodecConfigObserver : public test::SendTest,
}
};
+ void InitCodecSpecifics();
+
void ModifyVideoConfigs(
VideoSendStream::Config* send_config,
std::vector<VideoReceiveStream::Config>* receive_configs,
@@ -2057,11 +2060,20 @@ 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.H264().packetization_mode);
}
template <>
« no previous file with comments | « webrtc/video/payload_router.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698