H.323Api.h

/** @file h323msapi.h
 * /brief      the file brief
 *
 * /version 1.0.0 
 * /author  lianhy
 * /date  2004/03/29
 *
 * /note       the detail of file
 * /note      
 * /note       version 2.0.0
 *              2004.12.02 lianhy 添加位图采集相关的函数
 *              2006.05.10 lianhy 添加使用JRtpRecvideo作为视频采集的操作
 * /warning
 */

#ifndef __H323MSAPI_H__
#define __H323MSAPI_H__

#pragma pack(push, 8)

#ifdef H323Ms_EXPORTS
#define _Ms_DLLEXPORT_ __declspec(dllexport)
#define MSCALLCONV  __stdcall
#else
#define _Ms_DLLEXPORT_ __declspec(dllimport)
#define MSCALLCONV  __stdcall
#endif

typedef enum _enumPayLoadType
{
    PCMU  =  0,
 GSM   =  3,
    G7231 =  4,
    PCMA  =  8,
    G722  =  9,   
    G729  = 18,
    H261  = 31,
    H263  = 34,
 MPEG4 = 150,
 DIVX  = 200,
 OVERTYPE = 300
} E_PAYLOADTYPE;
typedef enum _enumCaptureType
{
 GENERAL_CAP1 = 0,
 GENERAL_CAP2 = 1,
 GENERAL_CAP3 = 2,
 GENERAL_CAP4 = 3,
 GENERAL_CAP5 = 4,
    MS_IMAGE     = 200,
 MS_CAP_JRTP      = 1000
}MsCapType;

typedef struct _tagVideoFormat
{
    LONG           lWidth;            
    LONG           lHeight;          
}T_VIDEOSIZE,VIDEOSIZE,FAR* LPVIDEOSIZE; 
typedef enum _enumVideoResolutionFormat
{
 FORMAT_CIF4 = 1,
 FORMAT_CIF = 2,
 FORMAT_QCIF = 3,
 FORMAT_SQCIF = 4
} VIDEO_FORMAT;

typedef enum _enumFilterVideoCodecType
{
 CODEC_H261  = 0,
 CODEC_H263 = 1,
 CODEC_MPEG4 = 2,
 CODEC_NC20  = 3
} VIDEO_CODEC_TYPE;

typedef enum _enumFilterAudioCodecType
{
 CODEC_G711A     = 0,
 CODEC_G711U     = 1,
 CODEC_G722_14   = 2,
 CODEC_G722_16   = 3,
 CODEC_G723_53   = 4,
 CODEC_G723_63   = 5,
 CODEC_G729       = 6
}AUDIO_CODEC_TYPE;

typedef struct _tagVideoCodecParam
{
 MsCapType   eVideoCap;
 T_VIDEOSIZE tVideoSize;
 VIDEO_FORMAT eVideoResolution;
 int nBandwidth;
 int nFrameRate;
 int nKeyFrameInterval;
}T_VIDEO_CODEC_PARAM;

typedef struct _tagAudioCodecParam
{
 MsCapType eAudioCap;
 int  nSampleRate; 
}T_AUDIO_CODEC_PARAM;

typedef enum _enumVideoFormat
{
 MS_FORMAT_CIF4 = 1,
 MS_FORMAT_CIF  = 2,
 MS_FORMAT_QCIF = 3,
 MS_FORMAT_SQCIF= 4
}MS_VIDEO_FORMAT;

typedef enum _enumVideoCodecType
{
 MS_H261  = 31,
 MS_H263  = 34,
 MS_MPEG4 = 100,
 MS_NC20  = 3

}MsVideoCodecType;

typedef struct _tagRtpParam
{
 BYTE          ePayloadType;
 int           nBaseVideoPort;
 int           nBaseAudioPort;
 char          pDestIpAddr[16];
 int           nDestPort;
 int           nAddOrRemove;//1表示添加,0表示删除
 T_VIDEO_CODEC_PARAM tVideoCodecParam;
 T_AUDIO_CODEC_PARAM tAudioCodecParam;
}T_RTPPARAM;

typedef struct _tagVideoEncodeParam
{
 MsCapType           nCapType;  /**< video source catpture type */
 MsVideoCodecType    nVCodecType; /**< video codec type */
 MS_VIDEO_FORMAT     nVideoFormat; /**< video resolution */
 int                 nFrameRate;  /**< video codec frame rate */
 int                 nBandwidth;  /**< video codec bandwidth */
 T_RTPPARAM          tRtpParam;   /**< video send rtp handle */
 HWND    hWnd;   /**< video display wnd */
}MsVideoEncodeParam;

typedef struct _tagVideoDecodeParam
{
 MsVideoCodecType    nVCodecType;
 MS_VIDEO_FORMAT     nVideoFormat;
 HWND                hWnd;
 T_RTPPARAM          tRtpParam;
}MsVideoDecodeParam;

typedef enum _enumAudioCodecType
{
 MS_G711A     = 8,
 MS_G711U     = 0,
 MS_G729      = 18,
 MS_G722_14   = 2,
 MS_G722_16   = 3,
 MS_G723_53   = 4,
 MS_G723_63   = 5,
    MS_G722      = 6
}MsAudioCodecType;

typedef struct _tagAudioEncodeParam
{
 MsCapType           nCapType;  /**< audio source capture type */
 MsAudioCodecType    nACodecType; /**< audio codec type */
 int                 nSampleRate; /**< audio codec sample rate */
 int                 nBitRate;  /**< audio codec bitrate */
 T_RTPPARAM          tRtpParam;   /**< audio send rtp handle */
}MsAudioEncodeParam;

typedef struct _tagAudioDecodeParam
{
 MsAudioCodecType   nACodecType;
 T_RTPPARAM         tRtpParam;
}MsAudioDecodeParam;

typedef enum _enumMsControlStatus
{
 MS_CONTROL_GENERAL_LOCAL_TEST  = 0, /**< general capture local test */
 MS_CONTROL_GENERAL_ROUND_TEST  = 1, /**< general capture round test */
 MS_CONTROL_GENERAL_CONF        = 2, /**< general capture in conference */
 MS_CONTROL_IMAGE_CAP_LOCAL_TEST = 5, /**< ImageCap capture local test */
 MS_CONTROL_IMAGE_CAP_ROUND_TEST = 6, /**< ImageCap capture round test */
    Ms_CONTROL_IDLE                = 100
}MsControlStatus;


#ifdef __cplusplus
extern "C" {
#endif

_Ms_DLLEXPORT_ HRESULT MSCALLCONV Ms_BaseInitialize();
_Ms_DLLEXPORT_ HRESULT MSCALLCONV Ms_BaseUninitialize();

//_Ms_DLLEXPORT_ HRESULT MSCALLCONV Ms_Initialize();
//_Ms_DLLEXPORT_ HRESULT MSCALLCONV Ms_Uninitialize();


/* 2004.12.02 lianhy 添加位图采集Filter的参数设置接口 begin*/
_Ms_DLLEXPORT_ HRESULT MSCALLCONV Ms_SetImageCapParam(MS_VIDEO_FORMAT nVideoFormat,char* filePath);

/******************************** end *************************/

_Ms_DLLEXPORT_ HRESULT MSCALLCONV Ms_AudioLocalTest();
_Ms_DLLEXPORT_ HRESULT MSCALLCONV Ms_AudioRoundTest(MsCapType nCapType, MsAudioCodecType nCodecType);

_Ms_DLLEXPORT_ HRESULT MSCALLCONV Ms_AudioLocalTestStop();
_Ms_DLLEXPORT_ HRESULT MSCALLCONV Ms_AudioRoundTestStop(MsCapType nCapType, MsAudioCodecType nCodecType);

_Ms_DLLEXPORT_ HRESULT MSCALLCONV Ms_VideoLocalTest(MsCapType nCapType,HWND hWnd);

_Ms_DLLEXPORT_ HRESULT MSCALLCONV Ms_VideoRoundTest(MsCapType nCapType, MsVideoCodecType nCodecType, MS_VIDEO_FORMAT enumVideoFormat,int nBandwidth, HWND hWnd);

_Ms_DLLEXPORT_ HRESULT MSCALLCONV Ms_VideoLocalTestStop();
_Ms_DLLEXPORT_ HRESULT MSCALLCONV Ms_VideoRoundTestStop(MsCapType nCapType, MsVideoCodecType nCodecType);

//20060825 lianhy 添加新的接口
_Ms_DLLEXPORT_ HRESULT MSCALLCONV Ms_E_VideoEncodeInit();
_Ms_DLLEXPORT_ HRESULT MSCALLCONV Ms_E_VideoEncodeUninit();
_Ms_DLLEXPORT_ HRESULT MSCALLCONV Ms_E_VideoEncodePlay();
_Ms_DLLEXPORT_ HRESULT MSCALLCONV Ms_E_VideoEncodePlayStop();
_Ms_DLLEXPORT_ int     MSCALLCONV Ms_E_VideoEncodeGetRtpSocket();
_Ms_DLLEXPORT_ int     MSCALLCONV Ms_E_VideoEncodeGetRtcpSocket();

_Ms_DLLEXPORT_ HRESULT MSCALLCONV Ms_E_VideoEncodeStart(MsVideoEncodeParam nwVideoParam,T_RTPPARAM tRtpParam);
_Ms_DLLEXPORT_ HRESULT MSCALLCONV Ms_E_VideoEncodeStop(MsCapType nCapType, MsVideoCodecType nVCodecType);
_Ms_DLLEXPORT_ HRESULT MSCALLCONV Ms_E_VideoEncodeAddDestAddr(T_RTPPARAM tRtpParam);
_Ms_DLLEXPORT_ HRESULT MSCALLCONV Ms_E_VideoEncodeIFrame(MsVideoCodecType nVideoCodecType,int nCountIFrame);

//20060825 lianhy 添加新的接口
_Ms_DLLEXPORT_ HRESULT MSCALLCONV Ms_E_AudioEncodeInit();
_Ms_DLLEXPORT_ HRESULT MSCALLCONV Ms_E_AudioEncodeUninit();
_Ms_DLLEXPORT_ HRESULT MSCALLCONV Ms_E_AudioEncodePlay();
_Ms_DLLEXPORT_ HRESULT MSCALLCONV Ms_E_AudioEncodePlayStop();
_Ms_DLLEXPORT_ int     MSCALLCONV Ms_E_AudioEncodeGetRtpSocket();
_Ms_DLLEXPORT_ int     MSCALLCONV Ms_E_AudioEncodeGetRtcpSocket();

_Ms_DLLEXPORT_ HRESULT MSCALLCONV Ms_E_AudioEncodeStart(MsAudioEncodeParam nwAudioParam,T_RTPPARAM tRtpParam);
_Ms_DLLEXPORT_ HRESULT MSCALLCONV Ms_E_AudioEncodeStop(MsCapType nCapType, MsAudioCodecType nACodecType);
_Ms_DLLEXPORT_ HRESULT MSCALLCONV Ms_E_AudioEncodeAddDestAddr(T_RTPPARAM tRtpParam);

//20060825 lianhy 添加新的接口
_Ms_DLLEXPORT_ HRESULT MSCALLCONV Ms_D_VideoDecodeInit(int nChannelId);
_Ms_DLLEXPORT_ HRESULT MSCALLCONV Ms_D_VideoDecodeUninit(int nChannelId);
_Ms_DLLEXPORT_ HRESULT MSCALLCONV Ms_D_VideoDecodePlay(int nChannelId);
_Ms_DLLEXPORT_ HRESULT MSCALLCONV Ms_D_VideoDecodePlayStop(int nChannelId);
_Ms_DLLEXPORT_ int     MSCALLCONV Ms_D_VideoDecodeGetRtpSocket(int nChannelId);
_Ms_DLLEXPORT_ int     MSCALLCONV Ms_D_VideoDecodeGetRtcpSocket(int nChannelId);

_Ms_DLLEXPORT_ HRESULT MSCALLCONV Ms_D_VideoDecodeStart(MsVideoDecodeParam tVideoDecodeParam,int nChannelId);
_Ms_DLLEXPORT_ HRESULT MSCALLCONV Ms_D_VideoDecodeStop(MsVideoCodecType nVCodecType,int nChannelId);

//20060825 lianhy 添加新的接口
_Ms_DLLEXPORT_ HRESULT MSCALLCONV Ms_D_AudioDecodeInit(int nChannelId);
_Ms_DLLEXPORT_ HRESULT MSCALLCONV Ms_D_AudioDecodeUninit(int nChannelId);
_Ms_DLLEXPORT_ HRESULT MSCALLCONV Ms_D_AudioDecodePlay(int nChannelId);
_Ms_DLLEXPORT_ HRESULT MSCALLCONV Ms_D_AudioDecodePlayStop(int nChannelId);
_Ms_DLLEXPORT_ int     MSCALLCONV Ms_D_AudioDecodeGetRtpSocket(int nChannelId);
_Ms_DLLEXPORT_ int     MSCALLCONV Ms_D_AudioDecodeGetRtcpSocket(int nChannelId);

_Ms_DLLEXPORT_ HRESULT MSCALLCONV Ms_D_AudioDecodeStart(MsAudioDecodeParam tAudioDecodeParam,int nChannelId);
_Ms_DLLEXPORT_ HRESULT MSCALLCONV Ms_D_AudioDecodeStop(MsAudioCodecType nACodecType,int nChannelId);

_Ms_DLLEXPORT_ HRESULT MSCALLCONV Ms_D_SetPip(BOOL bPip);
_Ms_DLLEXPORT_ HRESULT MSCALLCONV Ms_D_SetFullScreen(BOOL bFullScreen);
_Ms_DLLEXPORT_ HRESULT MSCALLCONV Ms_D_SnapPic(const char* filePath);
_Ms_DLLEXPORT_ HRESULT MSCALLCONV Ms_D_Record(const char* filePath);

_Ms_DLLEXPORT_ HRESULT MSCALLCONV Ms_GetGeneralVideoCaptureProp(MsCapType nCapType);
_Ms_DLLEXPORT_ HRESULT MSCALLCONV Ms_GetGeneralAudioCaptureProp();

_Ms_DLLEXPORT_ HRESULT MSCALLCONV Ms_GetSysAudioProp();

_Ms_DLLEXPORT_ HRESULT MSCALLCONV Ms_GetSysSpeakerControl();
_Ms_DLLEXPORT_ HRESULT MSCALLCONV Ms_GetSysRecordAudioControl();

_Ms_DLLEXPORT_ int MSCALLCONV Ms_GetSysVideoDeviceNum();
_Ms_DLLEXPORT_ int MSCALLCONV Ms_GetSysVideoDeviceName(int nIndexDev,char* pDevName);

_Ms_DLLEXPORT_ int MSCALLCONV Ms_GetSysAudioDeviceNum();

_Ms_DLLEXPORT_ int MSCALLCONV Ms_ResizeDisplayWnd(HWND hWnd,int nIndexSize);

#ifdef __cplusplus
};
#endif /* __cplusplus */

#endif /* __H323MSAPI_H__ */

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值