支持bitrate

This commit is contained in:
xiongziliang
2020-12-05 12:22:17 +08:00
parent 42679cdf98
commit 55cf411c1e
23 changed files with 102 additions and 52 deletions

View File

@@ -157,7 +157,7 @@ public:
* @param keyPos 该包是否为关键帧的第一个包
*/
void onWrite(RtpPacket::Ptr rtp, bool keyPos) override {
_speed += rtp->size();
_speed[rtp->type] += rtp->size();
assert(rtp->type >= 0 && rtp->type < TrackMax);
auto &track = _tracks[rtp->type];
if (track) {