mirror of
https://github.com/kunkundi/crossdesk.git
synced 2025-10-27 12:45:35 +08:00
[feat] enable congestion controller set target bitrate to video encoder
This commit is contained in:
@@ -359,6 +359,13 @@ int OpenH264Encoder::ForceIdr() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int OpenH264Encoder::SetTargetBitrate(int bitrate) {
|
||||
target_bitrate_ = bitrate;
|
||||
encoder_params_.iTargetBitrate = target_bitrate_;
|
||||
|
||||
return openh264_encoder_->SetOption(ENCODER_OPTION_BITRATE, &target_bitrate_);
|
||||
}
|
||||
|
||||
int OpenH264Encoder::Release() {
|
||||
if (openh264_encoder_) {
|
||||
openh264_encoder_->Uninitialize();
|
||||
|
||||
@@ -31,6 +31,8 @@ class OpenH264Encoder : public VideoEncoder {
|
||||
|
||||
int ForceIdr();
|
||||
|
||||
int SetTargetBitrate(int bitrate);
|
||||
|
||||
std::string GetEncoderName() { return "OpenH264"; }
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user