mirror of
https://github.com/pion/webrtc.git
synced 2025-10-07 08:01:27 +08:00
Tweak g722 support code
* allow GST examples to use g722 * Assume G722 is mono -- that's what chrome likes, and i don't know if anyone's doing stereo g722 anyway Relates to #283
This commit is contained in:

committed by
Woodrow Douglass

parent
7cc44ba79b
commit
c1bfcc8367
@@ -27,7 +27,7 @@ const (
|
||||
|
||||
// RegisterDefaultCodecs is a helper that registers the default codecs supported by pions-webrtc
|
||||
func RegisterDefaultCodecs() {
|
||||
RegisterCodec(NewRTCRtpG722Codec(DefaultPayloadTypeG722, 8000, 1))
|
||||
RegisterCodec(NewRTCRtpG722Codec(DefaultPayloadTypeG722, 8000))
|
||||
RegisterCodec(NewRTCRtpOpusCodec(DefaultPayloadTypeOpus, 48000, 2))
|
||||
RegisterCodec(NewRTCRtpVP8Codec(DefaultPayloadTypeVP8, 90000))
|
||||
RegisterCodec(NewRTCRtpH264Codec(DefaultPayloadTypeH264, 90000))
|
||||
@@ -96,11 +96,11 @@ const (
|
||||
)
|
||||
|
||||
// NewRTCRtpG722Codec is a helper to create a G722 codec
|
||||
func NewRTCRtpG722Codec(payloadType uint8, clockrate uint32, channels uint16) *RTCRtpCodec {
|
||||
func NewRTCRtpG722Codec(payloadType uint8, clockrate uint32) *RTCRtpCodec {
|
||||
c := NewRTCRtpCodec(RTCRtpCodecTypeAudio,
|
||||
G722,
|
||||
clockrate,
|
||||
channels,
|
||||
0,
|
||||
"",
|
||||
payloadType,
|
||||
&codecs.G722Payloader{})
|
||||
|
Reference in New Issue
Block a user