1 Star 1 Fork 1

cNull/player-cpp-ffmpeg-sdl

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Player.h 976 Bytes
一键复制 编辑 原始数据 按行查看 历史
#include "stdafx.h"
class Player
{
public:
static Player* get_instance();
void run(std::string, std::string window_name="");
void clear();
static int getAudioPacket(AudioPacket*, AVPacket*, int);
private:
static Player* instance;
Player() {}
void open();
int malloc(void);
int display_video(void);
int create_display(void);
int get_video_stream(void);
int read_audio_video_codec(void);
std::string video_addr;
std::string window_name;
int videoStream = 0;
int audioStream = 0;
AVFormatContext* pFormatCtx = NULL;
AVCodecParameters* pCodecParameters = NULL;
AVCodecParameters* pCodecAudioParameters = NULL;
AVCodecContext* pCodecCtx = NULL;
AVCodecContext* pCodecAudioCtx = NULL;
AVCodec* pCodec = NULL;
AVCodec* pAudioCodec = NULL;
AVFrame* pFrame = NULL;
AVFrame* pFrameRGB = NULL;
uint8_t* buffer = NULL;
SDL_Window* screen = NULL;
SDL_Renderer* renderer = NULL;
SDL_Texture* bmp = NULL;
struct SwsContext* sws_ctx = NULL;
};
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/cnull_project/player-cpp-ffmpeg-sdl.git
git@gitee.com:cnull_project/player-cpp-ffmpeg-sdl.git
cnull_project
player-cpp-ffmpeg-sdl
player-cpp-ffmpeg-sdl
master

搜索帮助