2 Star 20 Fork 20

Vanishi/BXC_gb28181Player

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
gb28181Player.h 1.21 KB
一键复制 编辑 原始数据 按行查看 历史
Vanishi 提交于 2023-07-30 19:23 . init
//
// Created by bxc on 2023/4/18.
// 作者:北小菜
// 邮箱:[email protected]
// 西瓜视频主页:https://www.ixigua.com/home/4171970536803763
// 哔哩哔哩主页:https://space.bilibili.com/487906612/
//
#ifndef GB28181PLAYER_GB28181PLAYER_H
#define GB28181PLAYER_GB28181PLAYER_H
#include <windows.h>
#include <atomic>
#define SDL_MAIN_HANDLED
#include <SDL.h>
extern "C"
{
#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>
#include <libswscale/swscale.h>
}
#define GB28181Player_buffer_max_size 4194304 // 4M = 4 * 1024 * 1024 = 4194304 字节
class GB28181Player
{
public:
GB28181Player();
~GB28181Player();
public:
bool probe();//阻塞式探测国标流并获取解码参数
void play();//在探测国标流成功以后,解码并渲染国标视频流
public:
std::atomic<char> buffer[GB28181Player_buffer_max_size];
std::atomic_int bufferSize = 0;
private:
AVFormatContext * mFmtCtx;
AVIOContext * mAvioCtx;
const AVInputFormat* mInputFmt;
int mVideoStream = -1;
AVCodecParameters * mVideoCodecPar;
AVCodecContext * mVideoCodecCtx;
AVDictionary* net_options;//网络连接参数
AVDictionary* codec_options;//编码参数
};
#endif //GB28181PLAYER_GB28181PLAYER_H
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/Vanishi/BXC_gb28181Player.git
[email protected]:Vanishi/BXC_gb28181Player.git
Vanishi
BXC_gb28181Player
BXC_gb28181Player
master

搜索帮助