|
@@ -141,24 +141,12 @@ void RtpSender::sendAAC(uint8_t * buffer, int len, uint32_t pts)
|
|
|
|
|
|
//fprintf(stderr, "%s size=%d pts=%d\n", __FUNCTION__, len, pts);
|
|
|
|
|
|
- bool isSucceed = false;
|
|
|
+///打包AAC的还有问题,暂未实现。
|
|
|
|
|
|
uint8_t sendbuf[1500] = {0};
|
|
|
|
|
|
int aacBufLen = len;
|
|
|
|
|
|
-////rtp固定包头,为12字节,该句将sendbuf[0]的地址赋给rtp_hdr,以后对rtp_hdr的写入操作将直接写入sendbuf。
|
|
|
-// RTP_FIXED_HEADER* rtp_hdr =(RTP_FIXED_HEADER*)sendbuf; //设置RTP HEADER,
|
|
|
-// rtp_hdr->payload = AAC; //负载类型号,
|
|
|
-// rtp_hdr->version = 2; //版本号,此版本固定为2
|
|
|
-// rtp_hdr->marker = 0; //标志位,由具体协议规定其值。
|
|
|
-// rtp_hdr->ssrc = htonl(ssrc); //在本RTP会话中全局唯一
|
|
|
-// rtp_hdr->seq_no = htons(seq_num ++); //序列号,每发送一个RTP包增1
|
|
|
-// rtp_hdr->timestamp = htonl(rtp_ts);
|
|
|
-
|
|
|
- //将要发送的数据填入sendbuf[12]
|
|
|
-// memcpy(&sendbuf[RTP_HEADER_SIZE], frame + pos, aacBufLen);
|
|
|
-
|
|
|
sendbuf[0] = 0x00;
|
|
|
sendbuf[1] = 0x10;
|
|
|
|
|
@@ -169,8 +157,8 @@ void RtpSender::sendAAC(uint8_t * buffer, int len, uint32_t pts)
|
|
|
|
|
|
int sendLen = len + 4;
|
|
|
|
|
|
- memcpy(sendbuf, buffer, aacBufLen);
|
|
|
- sendLen = len;
|
|
|
+// memcpy(sendbuf, buffer, aacBufLen);
|
|
|
+// sendLen = len;
|
|
|
|
|
|
// if (aacBufLen < POCKT_MAX_LEN)
|
|
|
// {
|
|
@@ -190,7 +178,6 @@ void RtpSender::sendAAC(uint8_t * buffer, int len, uint32_t pts)
|
|
|
|
|
|
sendRtpPacket(sendbuf, sendLen, AAC, pts, seq_num++, marker); //打包rtp发送数据
|
|
|
|
|
|
-// return isSucceed;
|
|
|
}
|
|
|
|
|
|
void RtpSender::sendRtpPacket(uint8_t * buffer, const int &len, const uint8_t &payloadType, const uint32_t &pts, const uint16_t &seqNum, const bool &mark)
|