[feat] support FIR

This commit is contained in:
dijunkun
2025-03-07 18:36:55 +08:00
parent 19fc8cda89
commit de0386f08a
21 changed files with 247 additions and 32 deletions

View File

@@ -223,7 +223,7 @@ int OpenH264Encoder::Encode(
video_frame->height, yuv420p_frame_);
VideoFrameType frame_type;
if (0 == seq_++ % 300) {
if (0 == seq_++ % key_frame_interval_) {
ForceIdr();
frame_type = VideoFrameType::kVideoFrameKey;
} else {

View File

@@ -33,9 +33,9 @@ class OpenH264Encoder : public VideoEncoder {
int SetTargetBitrate(int bitrate);
int GetResolution(int& width, int& height) {
width = frame_width_;
height = frame_height_;
int GetResolution(int* width, int* height) {
*width = frame_width_;
*height = frame_height_;
return 0;
}
@@ -50,7 +50,7 @@ class OpenH264Encoder : public VideoEncoder {
private:
uint32_t frame_width_ = 1280;
uint32_t frame_height_ = 720;
int key_frame_interval_ = 300;
int key_frame_interval_ = 3000;
int target_bitrate_ = 10000000;
int max_bitrate_ = 10000000;
int max_payload_size_ = 1400;