mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-07-05 10:58:11 +08:00
添加注释,完善接口
This commit is contained in:
@@ -118,12 +118,15 @@ void getAACInfo(const AACFrame &adts,int &iSampleRate,int &iChannel){
|
||||
iChannel = adts.channel_configuration;
|
||||
}
|
||||
bool getAVCInfo(const string& strSps,int &iVideoWidth, int &iVideoHeight, float &iVideoFps) {
|
||||
return getAVCInfo(strSps.data(),strSps.size(),iVideoWidth,iVideoHeight,iVideoFps);
|
||||
}
|
||||
bool getAVCInfo(const char * sps,int sps_len,int &iVideoWidth, int &iVideoHeight, float &iVideoFps){
|
||||
T_GetBitContext tGetBitBuf;
|
||||
T_SPS tH264SpsInfo;
|
||||
memset(&tGetBitBuf,0,sizeof(tGetBitBuf));
|
||||
memset(&tH264SpsInfo,0,sizeof(tH264SpsInfo));
|
||||
tGetBitBuf.pu8Buf = (uint8_t *)strSps.data() + 1;
|
||||
tGetBitBuf.iBufSize = strSps.size() - 1;
|
||||
tGetBitBuf.pu8Buf = (uint8_t*)sps + 1;
|
||||
tGetBitBuf.iBufSize = sps_len - 1;
|
||||
if(0 != h264DecSeqParameterSet((void *) &tGetBitBuf, &tH264SpsInfo)){
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user