Commit fd65c4b6 by xiongziliang

完善Rtmp Metedata对象

parent 37dc3c29
...@@ -91,9 +91,28 @@ public: ...@@ -91,9 +91,28 @@ public:
_metedata.set("height", video->getVideoHeight()); _metedata.set("height", video->getVideoHeight());
_metedata.set("videodatarate", datarate); _metedata.set("videodatarate", datarate);
_metedata.set("framerate", video->getVideoFps()); _metedata.set("framerate", video->getVideoFps());
_metedata.set("videocodecid", Factory::getAmfByCodecId(video->getCodecId())); //h.264 _codecId = video->getCodecId();
_metedata.set("videocodecid", Factory::getAmfByCodecId(_codecId));
} }
virtual ~VideoMete(){} virtual ~VideoMete(){}
/**
* 返回音频或视频类型
* @return
*/
TrackType getTrackType() const override {
return TrackVideo;
}
/**
* 返回编码器id
* @return
*/
CodecId getCodecId() const override{
return _codecId;
}
private:
CodecId _codecId;
}; };
...@@ -105,9 +124,28 @@ public: ...@@ -105,9 +124,28 @@ public:
_metedata.set("audiosamplesize", audio->getAudioSampleBit()); _metedata.set("audiosamplesize", audio->getAudioSampleBit());
_metedata.set("audiochannels", audio->getAudioChannel()); _metedata.set("audiochannels", audio->getAudioChannel());
_metedata.set("stereo", audio->getAudioChannel() > 1); _metedata.set("stereo", audio->getAudioChannel() > 1);
_metedata.set("audiocodecid", Factory::getAmfByCodecId(audio->getCodecId())); //aac _codecId = audio->getCodecId();
_metedata.set("audiocodecid", Factory::getAmfByCodecId(_codecId));
} }
virtual ~AudioMete(){} virtual ~AudioMete(){}
/**
* 返回音频或视频类型
* @return
*/
TrackType getTrackType() const override {
return TrackAudio;
}
/**
* 返回编码器id
* @return
*/
CodecId getCodecId() const override{
return _codecId;
}
private:
CodecId _codecId;
}; };
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论