支持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

@@ -68,8 +68,11 @@ const string& MediaSource::getId() const {
return _stream_id;
}
int MediaSource::getBytesSpeed(){
return _speed.getSpeed();
int MediaSource::getBytesSpeed(TrackType type){
if(type == TrackInvalid){
return _speed[TrackVideo].getSpeed() + _speed[TrackAudio].getSpeed();
}
return _speed[type].getSpeed();
}
uint64_t MediaSource::getCreateStamp() const {