// 解码单路视频,并保存解码后的yuv数据到文件中去
// cudaDecode.lib是静态库文件,本程序实例展示如何调用此库文件相应接口实现解码功能
#include "iostream"
#include <tchar.h>
#include "windows.h"
#include "../header/cudaDecodeInterface.h"
//#pragma comment(lib,"cudaDecode.lib") // 链接到cudaDecode.lib
using namespace std;
HANDLE hand_cuda = NULL;
bool cuda_decodeEnd = false;
FILE *fp = fopen("../decodePic/VideoSingle/videoSingle.yuv","wb");
int number = 0;
int CudaDecodeNotify(unsigned char* pDecodeData,int nDataSize,DWORD timestamp,int nEof)
{
// fwrite(pDecodeData,1,nDataSize,fp);
if(nEof)
{
OutputDebugString("thread 1 读包结束!!!\n");
printf("-->thread 1 读包结束!!!\n");
// fclose(fp);
cuda_decodeEnd = true;
}
return 0;
}
void OnCuda()
{
bool nstate = Cuda_SupportDecode();
hand_cuda =