[*] 码率
This commit is contained in:
@@ -342,6 +342,8 @@ namespace acgist {
|
|||||||
}
|
}
|
||||||
this->factory = factory;
|
this->factory = factory;
|
||||||
this->rtcConfiguration = new webrtc::PeerConnectionInterface::RTCConfiguration(rtcConfiguration);
|
this->rtcConfiguration = new webrtc::PeerConnectionInterface::RTCConfiguration(rtcConfiguration);
|
||||||
|
// this->rtcConfiguration->set_cpu_adaptation(false);
|
||||||
|
// this->rtcConfiguration->set_experiment_cpu_load_estimator(false);
|
||||||
mediasoupclient::PeerConnection::Options options;
|
mediasoupclient::PeerConnection::Options options;
|
||||||
options.config = rtcConfiguration;
|
options.config = rtcConfiguration;
|
||||||
options.factory = factory;
|
options.factory = factory;
|
||||||
@@ -418,7 +420,7 @@ namespace acgist {
|
|||||||
nlohmann::json codecOptions =
|
nlohmann::json codecOptions =
|
||||||
{
|
{
|
||||||
// x-google-start-bitrate
|
// x-google-start-bitrate
|
||||||
{ "videoGoogleStartBitrate", 400 },
|
{ "videoGoogleStartBitrate", 1200 },
|
||||||
// x-google-min-bitrate
|
// x-google-min-bitrate
|
||||||
{ "videoGoogleMinBitrate", 800 },
|
{ "videoGoogleMinBitrate", 800 },
|
||||||
// x-google-max-bitrate
|
// x-google-max-bitrate
|
||||||
@@ -581,7 +583,7 @@ namespace acgist {
|
|||||||
++iterator
|
++iterator
|
||||||
) {
|
) {
|
||||||
if(maxFramerate > 0) {
|
if(maxFramerate > 0) {
|
||||||
LOG_I("当前最大帧率:%d - %d - %f", maxFramerate, iterator->max_framerate, iterator->scale_resolution_down_by);
|
LOG_I("当前最大帧率:%d - %d", maxFramerate, iterator->max_framerate);
|
||||||
iterator->max_framerate = maxFramerate;
|
iterator->max_framerate = maxFramerate;
|
||||||
}
|
}
|
||||||
if(minBitrate > 0) {
|
if(minBitrate > 0) {
|
||||||
@@ -592,6 +594,9 @@ namespace acgist {
|
|||||||
LOG_I("当前最大码率:%d - %d", maxBitrate, iterator->max_bitrate_bps);
|
LOG_I("当前最大码率:%d - %d", maxBitrate, iterator->max_bitrate_bps);
|
||||||
iterator->max_bitrate_bps = maxBitrate;
|
iterator->max_bitrate_bps = maxBitrate;
|
||||||
}
|
}
|
||||||
|
// iterator->bitrate_priority = 4.0;
|
||||||
|
// iterator->network_priority = webrtc::Priority::kHigh;
|
||||||
|
// iterator->scale_resolution_down_by = 2;
|
||||||
}
|
}
|
||||||
rtpSender->SetParameters(rtpParameters);
|
rtpSender->SetParameters(rtpParameters);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -208,7 +208,6 @@ public class Room extends CloseableClient implements RouterCallback {
|
|||||||
}
|
}
|
||||||
this.rtcConfiguration = new PeerConnection.RTCConfiguration(iceServers);
|
this.rtcConfiguration = new PeerConnection.RTCConfiguration(iceServers);
|
||||||
// this.rtcConfiguration.enableCpuOveruseDetection = true;
|
// this.rtcConfiguration.enableCpuOveruseDetection = true;
|
||||||
|
|
||||||
// 开始协商
|
// 开始协商
|
||||||
return this.taoyao.requestFuture(
|
return this.taoyao.requestFuture(
|
||||||
this.taoyao.buildMessage("media::router::rtp::capabilities", "roomId", this.roomId),
|
this.taoyao.buildMessage("media::router::rtp::capabilities", "roomId", this.roomId),
|
||||||
|
|||||||
Reference in New Issue
Block a user