mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-07-04 01:37:33 +08:00
完成Rtmp Metedata对象
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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);
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user