OnValidatedRTPPacket
参数ispackethandled设置为true,表示将不再保存包
/** Allows you to use an RTP packet from the specified source directly.
* Allows you to use an RTP packet from the specified source directly. If
* `ispackethandled` is set to `true`, the packet will no longer be stored in this
* source's packet list. Note that if you do set this flag, you'll need to
* deallocate the packet yourself at an appropriate time.
*
* The difference with RTPSession::OnRTPPacket is that that
* function will always process the RTP packet further and is therefore not
* really suited to actually do something with the data.
*/
virtual void OnValidatedRTPPacket(RTPSourceData *srcdat, RTPPacket *rtppack, bool isonprobation, bool *ispackethandled);
实例
void CVedioRTPSession::OnValidatedRTPPacket(RTPSourceData *srcdat,
RTPPacket *rtppack,
bool isonprobation,
bool *ispackethandled)
{
DeletePacket(rtppack);
*ispackethandled = true;
}