完成Rtmp Metedata对象

This commit is contained in:
xiongziliang
2018-10-25 14:49:47 +08:00
parent 1e0db96457
commit 37dc3c2946
5 changed files with 197 additions and 1 deletions

View File

@@ -208,6 +208,18 @@ RtmpCodec::Ptr Factory::getRtmpCodecByTrack(const Track::Ptr &track) {
}
}
AMFValue Factory::getAmfByCodecId(CodecId codecId) {
switch (codecId){
case CodecAAC:{
return AMFValue("mp4a");
}
case CodecH264:{
return AMFValue("avc1");
}
default:
return AMFValue(AMF_NULL);
}
}
}//namespace mediakit

View File

@@ -111,6 +111,14 @@ public:
* @return
*/
static RtmpCodec::Ptr getRtmpCodecByTrack(const Track::Ptr &track);
/**
* 根据codecId获取rtmp的codec描述
* @param codecId
* @return
*/
static AMFValue getAmfByCodecId(CodecId codecId);
};