1 Star 1 Fork 1

Devin / XPlay3

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
XResample.h 1.39 KB
一键复制 编辑 原始数据 按行查看 历史
Devin 提交于 2021-10-23 13:08 . 提交工程
#ifndef XRESAMPLE_H
#define XRESAMPLE_H
#include "Xffmepg.h"
#include <QMutex>
class XResample
{
public:
XResample();
~XResample();
/******************************************
* 函数名: Open
* 描述:打开重采样
* 输入参数:_avcodeParam:解码参数,_blIsClearPara:是否释放param
* 输出参数:无
* 返回值:true:成功,false:失败
* 其他:
*******************************************/
bool Open(AVCodecParameters *_avcodeParam,bool _blIsClearPara = false);
/******************************************
* 函数名: Close
* 描述:关闭重采样
* 输入参数:无
* 输出参数:无
* 返回值:无
* 其他:
*******************************************/
void Close();
/******************************************
* 函数名: Resample
* 描述:重采样
* 输入参数:_pavFrame:输入一帧的数据
* 输出参数:_pcOutData输出重采样后的数据
* 返回值:重采样数据大小
* 其他:
*******************************************/
int Resample(AVFrame *_pavFrame, unsigned char *_pcOutData);
private:
int m_iOutFromat = AV_SAMPLE_FMT_S16; //输出重采样位数
QMutex m_qmutResample; //重采样的锁
SwrContext *m_swrContext = nullptr; //重采样上下文
};
#endif // XRESAMPLE_H
1
https://gitee.com/yixinglong/xplay3.git
git@gitee.com:yixinglong/xplay3.git
yixinglong
xplay3
XPlay3
master

搜索帮助