videoenc.h
来自「从FFMPEG转换而来的H264解码程序,VC下编译..」· C头文件 代码 · 共 76 行
H
76 行
//*@@@+++@@@@******************************************************************
//
// Copyright (C) Microsoft Corporation. All rights reserved.
//
//*@@@---@@@@******************************************************************
#ifndef VIDEOENC_H
#define VIDEOENC_H
#include <dmo.h>
#include <tchar.h>
enum { S_RESOURCE, S_MC };
#define SAFERELEASE(x) if((x)){ (x)->Release(); (x) = NULL;}
#define SAFEDELETE(x) if((x)){ delete [] (x); (x) = NULL;}
#define SAFEDELETES(x) if((x)){ delete (x); (x) = NULL;}
#define SAFEFREE(x) if((x)){ free(x); (x) = NULL;}
class CHandlingMediaBuffer;
//////////////////////////////////////////////////////////////////////////////
//
// Video FOURCCs
//
//////////////////////////////////////////////////////////////////////////////
enum { P_MAIN = 0, P_SIMPLE, P_COMPLEX };
//////////////////////////////////////////////////////////////////////////////
//
// Video params struct
//
//////////////////////////////////////////////////////////////////////////////
struct VideoEncParams
{
int nBitrate;
int nWidth;
int nHeight;
double dFrameRate;
int nKeyDist;
int nBufferDelay;
int nQuality;
int nCrisp;
int nVBRQuality;
int nPeakBuffer;
int nPeakBitrate;
TCHAR *pszProfileString;
int nComplexity;
int nProfile;
#ifdef SUPPORT_INTERLACE
BOOL fIsInterlaced;
#endif //SUPPORT_INTERLACE
BOOL fIsVBR;
BOOL fIsConstrained;
int nPasses;
DWORD dwTag;
VideoEncParams()
{
memset( this, 0, sizeof( VideoEncParams ) );
}
};
// some prototypes
HRESULT InitializeVideoEncoder( AM_MEDIA_TYPE *pmtInput, \
VideoEncParams *pParams, \
IMediaObject **ppDMO, \
AM_MEDIA_TYPE *pmtOutPut,
CHandlingMediaBuffer *pMBIn);
#endif /*VIDEOENC_H*/
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?