添加网速统计功能

This commit is contained in:
xiongziliang
2020-10-01 11:02:00 +08:00
parent bae52db6ba
commit 7f3877e437
9 changed files with 68 additions and 0 deletions

View File

@@ -119,6 +119,7 @@ public:
* @param pkt rtmp包
*/
void onWrite(const RtmpPacket::Ptr &pkt, bool = true) override {
_speed += pkt->size();
//保存当前时间戳
switch (pkt->type_id) {
case MSG_VIDEO : _track_stamps[TrackVideo] = pkt->time_stamp, _have_video = true; break;