Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Demuxer丢帧机制优化 #352

Open
liyuming1978 opened this issue Mar 15, 2023 · 0 comments
Open

Demuxer丢帧机制优化 #352

liyuming1978 opened this issue Mar 15, 2023 · 0 comments

Comments

@liyuming1978
Copy link

  1. 目前demuxer在发现是rtsp的时候,会有一个丢帧机制,最小帧buffer 32,目前我在解码后面加了一个帧率控制, 但是有可能控制不精准,可能会导致demuxer这里直接丢帧, 会导致这一个gop的帧无法被处理。
  2. 希望这么修改: (设置一个session的bool变量)
    auto has_packet = std::make_shared<std::atomic>();
    *has_packet = false;
    data_ctx->GetSessionContext()->SetPrivate(HAS_PACKET_FLAG, has_packet);

如果packet_cache_.size 大于(比如3),那么设置*has_packet =true, 否则 *has_packet =false
我在后面的帧率控制单元,读这个变量, 微调帧率限制值

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant