📄 rtpappsession.cpp
字号:
#pragma comment(lib, "jrtplib.lib")
#pragma comment(lib, "jthread.lib")
#pragma comment(lib, "WS2_32.lib")
#include "stdafx.h"
#include "rtpsession.h"
#include "rtpappsession.h"
#include "rtppacket.h"
#include "rtpudpv4transmitter.h"
#include "rtpipv4address.h"
#include "rtpsessionparams.h"
#include "rtperrors.h"
#ifndef WIN32
#include <netinet/in.h>
#include <arpa/inet.h>
#else
#include <winsock2.h>
#endif // WIN32
#include <stdlib.h>
#include <stdio.h>
#include <iostream>
#include <string>
/*------------------------------------------*/
/* OnRTPPacket
/*------------------------------------------*/
void RTPAppSession::OnRTPPacket(RTPPacket *pack, const RTPTime &receivetime, const RTPAddress *senderaddress)
{
// printf("%d bytes of data received\n", pack->GetPayloadLength());
// BYTE *pfBuffer;
// BYTE *pBuffer;
// int length = pack->GetPayloadLength();
// printf("%d bytes of data received\n", pack->GetPayloadLength());
// pfBuffer = (unsigned char*)pack->GetPayloadData();
// pBuffer = new BYTE[length+1];
// memcpy(pBuffer,pfBuffer,length);
// pBuffer[length] = 0;
// printf("%s",pBuffer);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -