Use bandwidth in muxer options

Change-Id: Ic284528d44c5159af0c1495114556e06991b81f5
This commit is contained in:
Rintaro Kuroiwa 2014-06-27 18:11:57 -07:00
parent efe52e62dc
commit 5a6d95b330
1 changed files with 8 additions and 2 deletions

View File

@ -165,6 +165,9 @@ bool GenerateMediaInfo(const MuxerOptions& muxer_options,
SetMediaInfoStreamInfo(stream_infos, media_info);
media_info->set_reference_time_scale(reference_time_scale);
SetMediaInfoContainerType(container_type, media_info);
if (muxer_options.bandwidth > 0)
media_info->set_bandwidth(muxer_options.bandwidth);
return true;
}
@ -198,8 +201,11 @@ bool SetVodInformation(bool has_init_range,
media_info);
media_info->set_media_duration_seconds(duration_seconds);
if (!media_info->has_bandwidth()) {
media_info->set_bandwidth(
EstimateRequiredBandwidth(file_size, duration_seconds));
}
return true;
}