//实时视频流发送线程
UINT RealSendThread(LPVOID pParam)
{
int temp;
//发送缓冲区
LPWSABUF RealSendBuf = (LPWSABUF)pParam;
//开始实时发送
g_eventRealSend.ResetEvent();
//发送数据
temp=SendData(RealSendBuf);
//实时保存视频流到指定文件中
if(hmmioSendOutput)
mmioWrite(hmmioSendOutput, (LPSTR) RealSendBuf->buf,temp);
free(RealSendBuf->buf);
GlobalFreePtr(RealSendBuf);
g_eventRealSend.SetEvent();
return 0;
}
/
// CPlayView
IMPLEMENT_DYNCREATE(CPlayView, CView)
BEGIN_MESSAGE_MAP(CPlayView, CView)
//{{AFX_MSG_MAP(CPlayView)
ON_WM_SIZE()
ON_WM_CONTEXTMENU()
ON_COMMAND(ID_POP_FILE_SEND, OnPopFileSend)
ON_COMMAND(ID_POP_REAL_SEND, OnPopRealSend)
ON_COMMAND(ID_POP_SEND_STOP, OnPopSendStop)
ON_COMMAND(ID_CAPTURE_SAVE, OnCaptureSave)
ON_COMMAND(ID_BEGIN_CAPTURE, OnBeginCapture)
ON_COMMAND(ID_STOP_CAPTURE, OnStopCapture)
ON_COMMAND(ID_OPEN_PLAYFILE, OnOpenPlayfile)
ON_COMMAND(ID_PLAYFILE, OnPlayfile)
ON_COMMAND(ID_FILE_STOP, OnFileStop)
ON_COMMAND(ID_REALPLAY, OnRealplay)
ON_COMMAND(ID_REAL_STOP, OnRealStop)
ON_WM_TIMER()
ON_COMMAND(ID_PAUSE_PLAY, OnPausePlay)
ON_COMMAND(ID_RESUME_PLAY, OnResumePlay)
ON_WM_ERASEBKGND()
ON_COMMAND(ID_PAUSE_CAPTURE, OnPauseCapture)
ON_COMMAND(ID_RESUME_CAPTURE, OnResumeCapture)
//}}AFX_MSG_MAP
ON_MESSAGE(WM_VIEW_OUTBAR_NOTIFY, OnOutbarNotify)
ON_MESSAGE(WM_PLAYOVER,OnPlayOver)
ON_MESSAGE(WM_READYSEND,OnReadyRealSend)
ON_MESSAGE(WM_PREPARE_CLOSE,OnPrepareClose)
ON_MESSAGE(WM_CAPTURE_STOP,OnCaptureStop)
END_MESSAGE_MAP()