⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 vmport.h

📁 基于NMS的video access 3.1编写的DEMO程序 实现2个功能 1) H324握手 2) VIDEO MAIL
💻 H
字号:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <conio.h>
#include <process.h>
#include <windows.h>

#include <ctadef.h>
#include <adidef.h>
#include <swidef.h>
#include <mspdef.h>
#include <mspcmd.h>
#include <endian.h>
#include <mmfi.h>

#ifndef VMPORT_H
#define VMPORT_H

#define MAX_FILE_INFO_SIZE 5000

#define MAX_BUFFER_SIZE 16000

typedef struct
{
	CTAHD  ctahd;
	MSPHD  msphd;
	DWORD  filterhd;
	char   playbuffer[MAX_BUFFER_SIZE];
	char   recordbuffer[MAX_BUFFER_SIZE];
	int    codec, streamID;
	MMSTREAM  mmstream;
	bool   done;
}VIDEO_CNXT_INFO;

#define AUDIO_CNXT_INFO VIDEO_CNXT_INFO

class TVMPort
{
public:
	int OpenServices(int board, int userid, const char *ip);
	void FreeRes();

	bool StartMSP(int localport, int remoteport);
	bool StopMSP();
	bool CreateVideoEp();
	bool CreateAudioEp();
	void OnMspEvent(CTA_EVENT *pEvent);

	bool Play3GP(char *filename);
	bool ContinuePlay(CTA_EVENT *pEvent);
	bool Record3GP(char *filename);
	bool ContinueRecord(CTA_EVENT *pEvent);
	bool StopRP();
	void OnPlayDone(CTA_EVENT *pEvent);
	void OnRecordDone(CTA_EVENT *pEvent);

public:
	CTAQUEUEHD m_quehd;
	CTAHD m_ctahd;
	int m_board;
	int m_userid;
	char m_LocalIP[20];
	int m_localport, m_remoteport;
	int m_vmstate;

	VIDEO_CNXT_INFO m_VideoCtx;
	AUDIO_CNXT_INFO m_AudioCtx;
	MMFILE m_mmfile; //record和play不支持同时进行
};

#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -