Commit 36ed78ba by xiongziliang

规范函数命名

parent dd80d6a6
...@@ -32,9 +32,6 @@ using namespace toolkit; ...@@ -32,9 +32,6 @@ using namespace toolkit;
namespace mediakit{ namespace mediakit{
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){ bool getAVCInfo(const char * sps,int sps_len,int &iVideoWidth, int &iVideoHeight, float &iVideoFps){
T_GetBitContext tGetBitBuf; T_GetBitContext tGetBitBuf;
T_SPS tH264SpsInfo; T_SPS tH264SpsInfo;
...@@ -51,6 +48,9 @@ bool getAVCInfo(const char * sps,int sps_len,int &iVideoWidth, int &iVideoHeight ...@@ -51,6 +48,9 @@ bool getAVCInfo(const char * sps,int sps_len,int &iVideoWidth, int &iVideoHeight
return true; return true;
} }
bool getAVCInfo(const string& strSps,int &iVideoWidth, int &iVideoHeight, float &iVideoFps) {
return getAVCInfo(strSps.data(),strSps.size(),iVideoWidth,iVideoHeight,iVideoFps);
}
const char *memfind(const char *buf, int len, const char *subbuf, int sublen) { const char *memfind(const char *buf, int len, const char *subbuf, int sublen) {
for (auto i = 0; i < len - sublen; ++i) { for (auto i = 0; i < len - sublen; ++i) {
......
...@@ -36,7 +36,6 @@ using namespace toolkit; ...@@ -36,7 +36,6 @@ using namespace toolkit;
namespace mediakit{ namespace mediakit{
bool getAVCInfo(const string &strSps,int &iVideoWidth, int &iVideoHeight, float &iVideoFps); bool getAVCInfo(const string &strSps,int &iVideoWidth, int &iVideoHeight, float &iVideoFps);
bool getAVCInfo(const char * sps,int sps_len,int &iVideoWidth, int &iVideoHeight, float &iVideoFps);
void splitH264(const char *ptr, int len, const std::function<void(const char *, int)> &cb); void splitH264(const char *ptr, int len, const std::function<void(const char *, int)> &cb);
/** /**
......
...@@ -30,14 +30,7 @@ ...@@ -30,14 +30,7 @@
namespace mediakit{ namespace mediakit{
bool getHEVCInfo(const char * vps, int vps_len,const char * sps,int sps_len,int &iVideoWidth, int &iVideoHeight, float &iVideoFps){
bool getAVCH265Info(const string& strVps, const string& strSps,int &iVideoWidth, int &iVideoHeight, float &iVideoFps) {
return getAVC265Info(strVps.data(),strVps.size(),strSps.data(),strSps.size(),iVideoWidth,iVideoHeight,iVideoFps);
}
bool getAVC265Info(const char * vps, int vps_len,const char * sps,int sps_len,int &iVideoWidth, int &iVideoHeight, float &iVideoFps){
T_GetBitContext tGetBitBuf; T_GetBitContext tGetBitBuf;
T_HEVCSPS tH265SpsInfo; T_HEVCSPS tH265SpsInfo;
T_HEVCVPS tH265VpsInfo; T_HEVCVPS tH265VpsInfo;
...@@ -69,7 +62,9 @@ bool getAVC265Info(const char * vps, int vps_len,const char * sps,int sps_len,in ...@@ -69,7 +62,9 @@ bool getAVC265Info(const char * vps, int vps_len,const char * sps,int sps_len,in
return true; return true;
} }
bool getHEVCInfo(const string &strVps, const string &strSps, int &iVideoWidth, int &iVideoHeight, float &iVideoFps) {
return getHEVCInfo(strVps.data(),strVps.size(),strSps.data(),strSps.size(),iVideoWidth,iVideoHeight,iVideoFps);
}
Sdp::Ptr H265Track::getSdp() { Sdp::Ptr H265Track::getSdp() {
if(!ready()){ if(!ready()){
......
...@@ -36,8 +36,7 @@ using namespace toolkit; ...@@ -36,8 +36,7 @@ using namespace toolkit;
namespace mediakit { namespace mediakit {
bool getAVCH265Info(const string& strVps,const string& strSps,int &iVideoWidth, int &iVideoHeight, float &iVideoFps); bool getHEVCInfo(const string &strVps, const string &strSps, int &iVideoWidth, int &iVideoHeight, float &iVideoFps);
bool getAVC265Info(const char * vps, int vps_len,const char * sps,int sps_len,int &iVideoWidth, int &iVideoHeight, float &iVideoFps);
/** /**
* 265帧类 * 265帧类
...@@ -336,7 +335,7 @@ private: ...@@ -336,7 +335,7 @@ private:
* 解析sps获取宽高fps * 解析sps获取宽高fps
*/ */
void onReady(){ void onReady(){
getAVCH265Info(_vps,_sps,_width,_height,_fps); getHEVCInfo(_vps, _sps, _width, _height, _fps);
} }
Track::Ptr clone() override { Track::Ptr clone() override {
return std::make_shared<std::remove_reference<decltype(*this)>::type>(*this); return std::make_shared<std::remove_reference<decltype(*this)>::type>(*this);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论