initial h265 implementation.

This commit is contained in:
Miroslav Šedivý
2021-12-08 20:01:47 +01:00
parent d3711ab3ba
commit 3e67e44c61
3 changed files with 20 additions and 0 deletions

View File

@ -317,6 +317,10 @@ func (manager *WebRTCManager) createTrack(codecName string) (*webrtc.TrackLocalS
case "H264":
codec = webrtc.RTPCodecParameters{RTPCodecCapability: webrtc.RTPCodecCapability{MimeType: webrtc.MimeTypeH264, ClockRate: 90000, Channels: 0, SDPFmtpLine: "level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f", RTCPFeedback: fb}, PayloadType: 102}
id = "video"
case "H265":
// TODO: Fix this (correct payload type and SDPFmtpLine if needed).
codec = webrtc.RTPCodecParameters{RTPCodecCapability: webrtc.RTPCodecCapability{MimeType: "video/H265", ClockRate: 90000, Channels: 0, SDPFmtpLine: "", RTCPFeedback: fb}, PayloadType: 0}
id = "video"
case "Opus":
codec = webrtc.RTPCodecParameters{RTPCodecCapability: webrtc.RTPCodecCapability{MimeType: webrtc.MimeTypeOpus, ClockRate: 48000, Channels: 2, SDPFmtpLine: "", RTCPFeedback: fb}, PayloadType: 111}
id = "audio"