mirror of
https://github.com/kunkundi/crossdesk.git
synced 2025-10-27 12:45:35 +08:00
[feat] enable resolution downgrading
This commit is contained in:
@@ -367,6 +367,10 @@ int OpenH264Encoder::ForceIdr() {
|
||||
}
|
||||
|
||||
int OpenH264Encoder::SetTargetBitrate(int bitrate) {
|
||||
if (!openh264_encoder_) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
target_bitrate_ = bitrate;
|
||||
encoder_params_.iTargetBitrate = target_bitrate_;
|
||||
|
||||
|
||||
@@ -33,6 +33,12 @@ class OpenH264Encoder : public VideoEncoder {
|
||||
|
||||
int SetTargetBitrate(int bitrate);
|
||||
|
||||
int GetResolution(int& width, int& height) {
|
||||
width = frame_width_;
|
||||
height = frame_height_;
|
||||
return 0;
|
||||
}
|
||||
|
||||
std::string GetEncoderName() { return "OpenH264"; }
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user