[Live-devel] How to extract the VOP Coding (I, P, B) type from the MPEG4 RTP Packet at client side ?
Nitin Jain
jnitin at ssdi.sharp.co.in
Mon Oct 22 03:33:34 PDT 2007
We tried to parse the data received in
Boolean MPEG4ESVideoRTPSource::processSpecialHeader() in MPEG4ESVideoRTPSource.cpp file
to find the vop coding type as below:-
*************************************************************************************************************************************************
// The packet begins a frame iff its data begins with a system code // (i.e., 0x000001??)
fCurrentPacketBeginsFrame = packet->dataSize() >= 4 && (packet->data())[0] == 0 && (packet->data())[1] == 0 && (packet->data())[2] == 1;
if(fCurrentPacketBeginsFrame){
/*check for VOP start Code*/
if((packet->data())[3] == 0xB6){
unsigned char vop_coding_type = (packet->data())[4];
vop_coding_type = vop_coding_type>>6;
}
}
***************************************************************************************************************************************************
However this always results in the vop_coding_type of 1 which is predictive-coded (P) type.Also outermost loop executes no of frames times but innermost loop does not execute that many no of times.
Please give your suggestions.
Regards
Nitin
-----Original Message-----
From: live-devel-bounces at ns.live555.com [mailto:live-devel-bounces at ns.live555.com]On Behalf Of Ross Finlayson
Sent: Thursday, October 18, 2007 8:46 PM
To: LIVE555 Streaming Media - development & use
Subject: Re: [Live-devel] How to extract the VOP Coding (I, P,B) type from the MPEG4 RTP Packet at client side ?
We have RTP packet with MPEG4 payload in it, then how to extract the Frame type information from it at the client side?
Do we need to look for VOP_START_CODE( 0x000001B6) in each RTP Packet after RTP Header and if present then next two bits will determine the VOP Coding type.
This has nothing to do with "RTP"; the information that you're looking for will be in the data that's received by your client's "RTPSource" subclass. If you just inspect the data that you receive from your "RTPSource" subclass, you will find this.
--
Ross Finlayson
Live Networks, Inc.
http://www.live555.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.live555.com/pipermail/live-devel/attachments/20071022/308a5663/attachment.html
More information about the live-devel
mailing list