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

Unified Diff: webrtc/sdk/objc/Framework/Classes/h264_video_toolbox_encoder.mm

Issue 2577043003: Initialize packetization mode in VideoToolbox (Closed)
Patch Set: Always set packetization mode to NonInterleaved Created 4 years 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/sdk/objc/Framework/Classes/h264_video_toolbox_encoder.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/sdk/objc/Framework/Classes/h264_video_toolbox_encoder.mm
diff --git a/webrtc/sdk/objc/Framework/Classes/h264_video_toolbox_encoder.mm b/webrtc/sdk/objc/Framework/Classes/h264_video_toolbox_encoder.mm
index 01f6d1172f5b41346b45730e087f98cbc532f659..dafb14e2f3879d3dbeded9ebf8bf28c4d6831b0c 100644
--- a/webrtc/sdk/objc/Framework/Classes/h264_video_toolbox_encoder.mm
+++ b/webrtc/sdk/objc/Framework/Classes/h264_video_toolbox_encoder.mm
@@ -342,13 +342,14 @@ namespace webrtc {
// drastically reduced bitrate, so we want to avoid that. In steady state
// conditions, 0.95 seems to give us better overall bitrate over long periods
// of time.
-H264VideoToolboxEncoder::H264VideoToolboxEncoder(
- const cricket::VideoCodec& codec)
+H264VideoToolboxEncoder::H264VideoToolboxEncoder(const cricket::VideoCodec& codec)
: callback_(nullptr),
compression_session_(nullptr),
bitrate_adjuster_(Clock::GetRealTimeClock(), .5, .95),
+ packetization_mode_(H264PacketizationMode::NonInterleaved),
profile_(internal::ExtractProfile(codec)) {
LOG(LS_INFO) << "Using profile " << internal::CFStringToString(profile_);
+ RTC_CHECK(cricket::CodecNamesEq(codec.name, cricket::kH264CodecName));
}
H264VideoToolboxEncoder::~H264VideoToolboxEncoder() {
@@ -471,6 +472,9 @@ int H264VideoToolboxEncoder::Encode(
this, codec_specific_info, width_, height_, frame.render_time_ms(),
frame.timestamp(), frame.rotation()));
+ encode_params->codec_specific_info.codecSpecific.H264.packetization_mode =
+ packetization_mode_;
hta-webrtc 2016/12/15 14:29:01 This is OK as a first-order fix; if internal::Fram
kthelgason 2016/12/15 14:38:13 In the implementation of this method in h264_encod
+
// Update the bitrate if needed.
SetBitrateBps(bitrate_adjuster_.GetAdjustedBitrateBps());
« no previous file with comments | « webrtc/sdk/objc/Framework/Classes/h264_video_toolbox_encoder.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698