首页 > 其他分享 >视频长宽的获得

视频长宽的获得

时间:2022-11-25 15:46:13浏览次数:36  
标签:视频 长宽 读取 int bs uint8 获得 read ._

一、ABLMediaServer

bool CMediaStreamSource::PushVideo(unsigned char* szVideo, int nLength, char* szVideoCodec)

                     |

                                                                           |

    GetVideoWidthHeight(m_mediaCodecInfo.szVideoName,szVideo, nLength);

                                                                           |

                                                                           |

GetWidthHeightFromSPS(pVideoData + nPos, nDataLength - nPos, nWidth, nHeight);

                                                                           |

                                                                          |

int   CSPSReader::Do_Read_SPS( bs_t *s, int *width, int *height)

1.关键结构
typedef struct tag_bs_s
{
uint8_t *p_start;
uint8_t *p;
uint8_t *p_end;

int i_left; // i_count number of available bits
int i_bits_encoded; // RD only
} bs_t;

2._bs_read( s, 1 );读取指定位数

3._bs_read_ue;读取无符号一个字节

4._bs_read_ue读取有符号一个字节

                                                       

标签:视频,长宽,读取,int,bs,uint8,获得,read,._
From: https://www.cnblogs.com/zeliangzhang/p/16925366.html

相关文章