mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-20 02:04:13 +00:00
FS-7499 adding some more refactoring towards better rtcp
This commit is contained in:
1 parent
930d8aea39
commit
81094b3a0c
7 files changed
+88
-58
No files matched your search
@@ -132,7 +132,7 @@ static switch_status_t init_x264(h264_codec_context_t *context, uint32_t width,
|
||||
if (context->codec_settings.video.bandwidth) {
|
||||
context->bandwidth = context->codec_settings.video.bandwidth;
|
||||
} else {
|
||||
context->bandwidth = context->codec_settings.video.width * context->codec_settings.video.height / 1024;
|
||||
context->bandwidth = switch_calc_bitrate(context->codec_settings.video.width, context->codec_settings.video.height, 0, 0);
|
||||
}
|
||||
|
||||
if (context->bandwidth > 5120) {
|
||||
|
||||
@@ -95,7 +95,7 @@ int FillSpecificParameters(h264_codec_context_t *context) {
|
||||
if (context->codec_settings.video.bandwidth) {
|
||||
context->bandwidth = context->codec_settings.video.bandwidth;
|
||||
} else {
|
||||
context->bandwidth = context->codec_settings.video.width * context->codec_settings.video.height / 1024;
|
||||
context->bandwidth = switch_calc_bitrate(context->codec_settings.video.width, context->codec_settings.video.height, 0, 0);
|
||||
}
|
||||
|
||||
if (context->bandwidth > 5120) {
|
||||
|
||||
@@ -312,7 +312,7 @@ static switch_status_t init_encoder(switch_codec_t *codec)
|
||||
if (context->codec_settings.video.bandwidth) {
|
||||
context->bandwidth = context->codec_settings.video.bandwidth;
|
||||
} else {
|
||||
context->bandwidth = ((context->codec_settings.video.width * context->codec_settings.video.height) / 900);
|
||||
context->bandwidth = switch_calc_bitrate(context->codec_settings.video.width, context->codec_settings.video.height, 0, 0);
|
||||
}
|
||||
|
||||
if (context->bandwidth > 40960) {
|
||||
|
||||
Reference in new issue
Block a user