mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-07-01 23:57:37 +08:00
支持bitrate
This commit is contained in:
@@ -48,9 +48,12 @@ public:
|
||||
G711Sdp(CodecId codecId,
|
||||
int sample_rate,
|
||||
int channels,
|
||||
int payload_type = 98,
|
||||
int bitrate = 128) : Sdp(sample_rate,payload_type), _codecId(codecId){
|
||||
int bitrate = 128,
|
||||
int payload_type = 98) : Sdp(sample_rate,payload_type), _codecId(codecId){
|
||||
_printer << "m=audio 0 RTP/AVP " << payload_type << "\r\n";
|
||||
if (bitrate) {
|
||||
_printer << "b=AS:" << bitrate << "\r\n";
|
||||
}
|
||||
_printer << "a=rtpmap:" << payload_type << (codecId == CodecG711A ? " PCMA/" : " PCMU/") << sample_rate << "/" << channels << "\r\n";
|
||||
_printer << "a=control:trackID=" << (int)TrackAudio << "\r\n";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user