java aac rtp封装,aac over rtp live555 打包

void MPEG4GenericRTPSink

::doSpecialFrameHandling(unsigned fragmentationOffset,

unsigned char* frameStart,

unsigned numBytesInFrame,

struct timeval framePresentationTime,

unsigned numRemainingBytes) {

// Set the "AU Header Section".  This is 4 bytes: 2 bytes for the

// initial "AU-headers-length" field, and 2 bytes for the first

// (and only) "AU Header":

unsigned fullFrameSize

= fragmentationOffset + numBytesInFrame + numRemainingBytes;

unsigned char headers[4];

headers[0] = 0; headers[1] = 16 /* bits */; // AU-headers-length

headers[2] = fullFrameSize >> 5; headers[3] = (fullFrameSize&0x1F)<<3;

setSpecialHeaderBytes(headers, sizeof headers);

if (numRemainingBytes == 0) {

// This packet contains the last (or only) fragment of the frame.

// Set the RTP 'M' ('marker') bit:

setMarkerBit();

}

// Important: Also call our base class's doSpecialFrameHandling(),

// to set the packet's timestamp:

MultiFramedRTPSink::doSpecialFrameHandling(fragmentationOffset,

frameStart, numBytesInFrame,

framePresentationTime,

numRemainingBytes);

}

参考rfc 3640

阅读(3232) | 评论(0) | 转发(0) |

0

上一篇:同步方法

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值