Hi @ all,
i´m trying to send an RTP Packet to a Server. My Packet Structure looks like this:
CODE
struct rtppacket
{
unsigned int version:2; /* protocol version */
unsigned int padding:1; /* padding flag */
unsigned int extension:1; /* header extension flag */
unsigned int csrcccount:4; /* CSRC count */
unsigned int marker:1; /* marker bit */
unsigned int payloadtype:7; /* payload type */
unsigned int sequencenumber:16; /* sequence number */
u_int32_t timestamp; /* timestamp */
u_int32_t ssrc; /* synchronization source */
u_int32_t csrc[1];
void* datap;
int datalen;
}
that´s my way to fill and send the structure:
CODE
m_rtpPack.version = 2;
m_rtpPack.sequencenumber = 1;
m_rtpPack.csrc[0] = 0;
m_rtpPack.csrcccount = 0;
m_rtpPack.extension = 0;
m_rtpPack.marker = 1;
m_rtpPack.payloadtype = 0;
m_rtpPack.padding = 0;
m_rtpPack.ssrc = 0;
m_rtpPack.timestamp = GetTickCount();
...
//Buffer füllen
...
m_rtpPack.datap = szBuffer;
m_rtpPack.datalen = sizeof(szBuffer); //= 1024
nSend = sendto(m_Socket, (char*)&m_rtpPack, sizeof(m_rtpPack), 0, (SOCKADDR*)&m_saRemote, sizeof(SOCKADDR));
That doesn´t work. If I take a look of the RTP flow with packetyzer it can read the header information of rtp and the server can´t do something with incoming.
The structure padding compiler option is Zp1. What I do false?
Greetzs
CrazyPlaya