vps、sps、pps信息见上图:
获取代码如下:
void getH265Head(char* extradata,int len)
{
LOGD("getH265Head width : %d,height : %d,len : %d",mWidth,mHeight,len);
if(extradata != NULL && len>22)
{
char* vps=NULL;
char* sps=NULL;
char* pps=NULL;
int vpsLen,spsLen,ppsLen;
int numArrays = extradata[22];
char* extraData = extradata;
int offset =0;
for (int j=0; j < numArrays; j++) {
int currentNalOffset = offset;
int array_completeness =(extraData[23+offset] & 0x80) >>7;
unsigned int reserved =(extraData[23+offset] & 0x40) >>6;
unsigned int NAL_unit_type = extraData[23+offset] & 0x3