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

Unified Diff: media/cast/sender/h264_vt_encoder.cc

Issue 2113783002: Refactoring: Merge VideoSenderConfig and AudioSenderConfig. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed mek's comment. Created 4 years, 5 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 | « media/cast/sender/h264_vt_encoder.h ('k') | media/cast/sender/size_adaptable_video_encoder_base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cast/sender/h264_vt_encoder.cc
diff --git a/media/cast/sender/h264_vt_encoder.cc b/media/cast/sender/h264_vt_encoder.cc
index 7031c547bf9f63c9aef6cf29d9ba4c4187af47b0..c11f6db861391f20732e30a23863330c67409fa5 100644
--- a/media/cast/sender/h264_vt_encoder.cc
+++ b/media/cast/sender/h264_vt_encoder.cc
@@ -147,13 +147,13 @@ class H264VideoToolboxEncoder::VideoFrameFactoryImpl::Proxy
// static
bool H264VideoToolboxEncoder::IsSupported(
- const VideoSenderConfig& video_config) {
+ const FrameSenderConfig& video_config) {
return video_config.codec == CODEC_VIDEO_H264 && VideoToolboxGlue::Get();
}
H264VideoToolboxEncoder::H264VideoToolboxEncoder(
const scoped_refptr<CastEnvironment>& cast_environment,
- const VideoSenderConfig& video_config,
+ const FrameSenderConfig& video_config,
const StatusChangeCallback& status_change_cb)
: cast_environment_(cast_environment),
videotoolbox_glue_(VideoToolboxGlue::Get()),
@@ -322,7 +322,7 @@ void H264VideoToolboxEncoder::ConfigureCompressionSession() {
(video_config_.min_bitrate + video_config_.max_bitrate) / 2);
session_property_setter.Set(
videotoolbox_glue_->kVTCompressionPropertyKey_ExpectedFrameRate(),
- video_config_.max_frame_rate);
+ static_cast<int>(video_config_.max_frame_rate + 0.5));
// Keep these attachment settings in-sync with those in Initialize().
session_property_setter.Set(
videotoolbox_glue_->kVTCompressionPropertyKey_ColorPrimaries(),
@@ -333,10 +333,10 @@ void H264VideoToolboxEncoder::ConfigureCompressionSession() {
session_property_setter.Set(
videotoolbox_glue_->kVTCompressionPropertyKey_YCbCrMatrix(),
kCVImageBufferYCbCrMatrix_ITU_R_709_2);
- if (video_config_.max_number_of_video_buffers_used > 0) {
+ if (video_config_.video_codec_params.max_number_of_video_buffers_used > 0) {
session_property_setter.Set(
videotoolbox_glue_->kVTCompressionPropertyKey_MaxFrameDelayCount(),
- video_config_.max_number_of_video_buffers_used);
+ video_config_.video_codec_params.max_number_of_video_buffers_used);
}
}
« no previous file with comments | « media/cast/sender/h264_vt_encoder.h ('k') | media/cast/sender/size_adaptable_video_encoder_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698