File tree 1 file changed +34
-0
lines changed
1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,23 @@ func NewRTPH264Codec(clockrate uint32) *RTPCodec {
37
37
}
38
38
}
39
39
40
+ // NewRTPH265Codec is a helper to create an H265 codec
41
+ func NewRTPH265Codec (clockrate uint32 ) * RTPCodec {
42
+ return & RTPCodec {
43
+ RTPCodecParameters : webrtc.RTPCodecParameters {
44
+ RTPCodecCapability : webrtc.RTPCodecCapability {
45
+ MimeType : webrtc .MimeTypeH265 ,
46
+ ClockRate : 90000 ,
47
+ Channels : 0 ,
48
+ SDPFmtpLine : "" ,
49
+ RTCPFeedback : nil ,
50
+ },
51
+ PayloadType : 125 ,
52
+ },
53
+ Payloader : & codecs.H265Payloader {},
54
+ }
55
+ }
56
+
40
57
// NewRTPVP8Codec is a helper to create an VP8 codec
41
58
func NewRTPVP8Codec (clockrate uint32 ) * RTPCodec {
42
59
return & RTPCodec {
@@ -71,6 +88,23 @@ func NewRTPVP9Codec(clockrate uint32) *RTPCodec {
71
88
}
72
89
}
73
90
91
+ // NewRTPAV1Codec is a helper to create an AV1 codec
92
+ func NewRTPAV1Codec (clockrate uint32 ) * RTPCodec {
93
+ return & RTPCodec {
94
+ RTPCodecParameters : webrtc.RTPCodecParameters {
95
+ RTPCodecCapability : webrtc.RTPCodecCapability {
96
+ MimeType : webrtc .MimeTypeAV1 ,
97
+ ClockRate : 90000 ,
98
+ Channels : 0 ,
99
+ SDPFmtpLine : "level-idx=5;profile=0;tier=0" ,
100
+ RTCPFeedback : nil ,
101
+ },
102
+ PayloadType : 99 ,
103
+ },
104
+ Payloader : & codecs.AV1Payloader {},
105
+ }
106
+ }
107
+
74
108
// NewRTPOpusCodec is a helper to create an Opus codec
75
109
func NewRTPOpusCodec (clockrate uint32 ) * RTPCodec {
76
110
return & RTPCodec {
You can’t perform that action at this time.
0 commit comments