📄 callbackfunc.cpp
字号:
#include "stdafx.h"
#include "VideoComm.h"
#include "afxmt.h"
#include "afxtempl.h"
#include "CByteBuffer.h"
#include "CPacker.h"
#include "CChannel.h"
#include "CMultiplex.h"
#include "CDemultiplex.h"
#include "CComm.h"
#include "typedef2.h"
#include "cst2.h"
#include "tab2.h"
#include "coder2.h"
#include "decod2.h"
#include "exc2.h"
#include "util2.h"
#include "codcng2.h"
#include "deccng2.h"
#include "vad2.h"
#include "G723.h"
#include "WaveIO.h"
#include "CCapture.h"
#include "CallBackFunc.h"
#include "LoopElementBuffer.h"
#include "SafeList.h"
#include "color.h"
#include "DBitstream.h"
#include "sactable.h"
#include "sad.h"
#include "Dh263class.h"
#include "commonfunc.h"
#include "ExpandYUV411.h"
#include "h263displayer.h"
#include "CBitstream.h"
#include "sac.h"
#include "Ch263class.h"
#include "h263encoder.h"
#include "InterfaceToBoard.h"
#include "TheInterfaceToBoard.h"
#include "filetransmit.h"
#include "VideoCommDlg.h"
void AudioReceiveChannelCallBack(BYTE* pFrame,int nLength,BOOL bFrameState,LPVOID lpUserData)
{
static CVideoCommDlg* pDlg=(CVideoCommDlg*)lpUserData;
if(bFrameState==FS_VALID)
pDlg->ChannelToAudioDec(pFrame,nLength);
}
void VideoReceiveChannelCallBack(BYTE* pFrame,int nLength,BOOL bFrameState,LPVOID lpUserData)
{
static CVideoCommDlg* pDlg=(CVideoCommDlg*)lpUserData;
if(bFrameState==FS_VALID)
pDlg->ChannelToVideoDec(pFrame, nLength);//
}
//Receive data from other data service
void DataReceiveChannelCallBack(BYTE* pFrame,int nLength,BOOL bFrameState,LPVOID lpUserData)
{
static CVideoCommDlg* pDlg=(CVideoCommDlg*)lpUserData;
if(bFrameState==FS_VALID)
{
//Do something here for data communication
pDlg->ChannelToDataService(pFrame, nLength);
}
}
//We have some data service to send
int DataInCallBack(BYTE* pbyContent,int nLength,DWORD dwUserData)
{
static CVideoCommDlg* pDlg=(CVideoCommDlg*)dwUserData;
pDlg->DataServiceToChannel(pbyContent,nLength);
return 0;
}
void CommandReceiveChannelCallBack(BYTE* pFrame,int nLength,BOOL bFrameState,LPVOID lpUserData)
{
static CVideoCommDlg* pDlg=(CVideoCommDlg*)lpUserData;
if(bFrameState==FS_VALID)
pDlg->CommandCallBack(pFrame,nLength, FS_VALID, COMMANDFROMBOARD);//1------Command from board
}
void FileReceiveChannelCallBack(BYTE* pFrame,int nLength,BOOL bFrameState,LPVOID lpUserData)
{
static CVideoCommDlg* pDlg=(CVideoCommDlg*)lpUserData;
if(bFrameState==FS_VALID)
pDlg->ChannelToFileData(pFrame,nLength);
}
int FileDataSendCallBack(BYTE* pbyContent,int nLength,DWORD dwUserData)
{
static CVideoCommDlg* pDlg=(CVideoCommDlg*)dwUserData;
pDlg->FileDataToChannel(pbyContent,nLength);
return 0;
}
void CommToDemultiplexCallBack(BYTE* pContent,UINT uSize,LPVOID lpUserData)
{
static CVideoCommDlg* pDlg=(CVideoCommDlg*)lpUserData;
pDlg->m_pDemultiplex->InputStream(pContent,uSize);
}
int WaveInCallBack(BYTE* pbyContent,int nLength,DWORD dwUserData)
{
static CVideoCommDlg* pDlg=(CVideoCommDlg*)dwUserData;
return pDlg->WaveInToAudioEnc((char*)pbyContent,nLength);
}
int WaveOutCallBack(BYTE* pbyContent,int nLength,DWORD dwUserData)
{
static CVideoCommDlg* pDlg=(CVideoCommDlg*)dwUserData;
return pDlg->AudioDecToWaveOut((char*)pbyContent,nLength);
}
void VideoCapCallBack(BYTE* pbyContent,UINT nLength,LPVOID dwUserData)
{
static CVideoCommDlg* pDlg=(CVideoCommDlg*)dwUserData;
pDlg->VideoToChannel(pbyContent,nLength);
}
void ChangeButtonText(DWORD dwID, LPCTSTR lpszString, LPVOID dwUserData)
{
CVideoCommDlg* pDlg = (CVideoCommDlg*)dwUserData;
pDlg->SetDlgItemText(dwID, lpszString);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -