📄 talk2medlg.h
字号:
// Talk2MeDlg.h : header file
//
#if !defined(AFX_TALK2MEDLG_H__99A1D508_9512_4151_A76E_E8EF7714B991__INCLUDED_)
#define AFX_TALK2MEDLG_H__99A1D508_9512_4151_A76E_E8EF7714B991__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
/////////////////////////////////////////////////////////////////////////////
// CTalk2MeDlg dialog
//RTP支持
#include "RTPSession.h"
#include "RTPIPv4Address.h"
#include "RTPSessionParams.h"
#include "RTPUDPv4Transmitter.h"
#include "RTPAppSession.h"
//音频支持
#include "WaveIn.h"
#include "WaveOut.h"
//G726支持
#include "g726.h"
#define MAX_PACKET_SIZE ((1024 * 64) - 1)
#define PORT_DATA 13600
#define PORT_BASE 13588
#define WM_WAVE_DATA_ARRIVE WM_USER+5
#define WM_NET_DATA_ARRIVED WM_USER+6
struct DataSession
{
RTPSession rtpSend;
RTPAppSession rtpReceive;
};
class CTalk2MeDlg : public CDialog
{
// Construction
public:
CTalk2MeDlg(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CTalk2MeDlg)
enum { IDD = IDD_TALK2ME_DIALOG };
// NOTE: the ClassWizard will add data members here
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CTalk2MeDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
HICON m_hIcon;
// Generated message map functions
//{{AFX_MSG(CTalk2MeDlg)
virtual BOOL OnInitDialog();
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
afx_msg void OnDestroy();
virtual void OnCancel();
virtual void OnOK();
afx_msg LONG OnWaveDataArrivedMsg(WPARAM wParam,LPARAM lParam);
afx_msg LONG OnNetDataArrivedMsg(WPARAM wParam,LPARAM lParam);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
private:
//变量
//RTP传输变量
DataSession m_sessData;
unsigned long intIP;
RTPIPv4Address *rtpAddr;
CString ChatIp;
//音频输入输出变量
CWaveIn *g_pIn;
CWaveOut *g_pOut;
char pin[960],pout[120];
char waveout[960];
BOOL m_bTalking;
//函数
//初始化RTP
void InitRTP();
//录音回调
static void OnWaveDataArrive(char *data,int length,DWORD userdata);
public:
afx_msg void OnBnClickedStartTalking();
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_TALK2MEDLG_H__99A1D508_9512_4151_A76E_E8EF7714B991__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -