mirror of
https://github.com/pion/webrtc.git
synced 2025-10-05 15:16:52 +08:00
Made multi codec the default
This commit is contained in:

committed by
Nils Ohlmeier

parent
be8800d522
commit
a561371028
@@ -156,7 +156,7 @@ func (api *API) NewPeerConnection(configuration Configuration) (*PeerConnection,
|
|||||||
pc.api.mediaEngine = api.mediaEngine
|
pc.api.mediaEngine = api.mediaEngine
|
||||||
} else {
|
} else {
|
||||||
pc.api.mediaEngine = api.mediaEngine.copy()
|
pc.api.mediaEngine = api.mediaEngine.copy()
|
||||||
pc.api.mediaEngine.SetMultiCodecNegotiation(api.settingEngine.enableMediaEngineMultipleCodecs)
|
pc.api.mediaEngine.SetMultiCodecNegotiation(!api.settingEngine.disableMediaEngineMultipleCodecs)
|
||||||
}
|
}
|
||||||
|
|
||||||
if err = pc.initConfiguration(configuration); err != nil {
|
if err = pc.initConfiguration(configuration); err != nil {
|
||||||
|
@@ -99,7 +99,7 @@ type SettingEngine struct {
|
|||||||
iceDisableActiveTCP bool
|
iceDisableActiveTCP bool
|
||||||
iceBindingRequestHandler func(m *stun.Message, local, remote ice.Candidate, pair *ice.CandidatePair) bool //nolint:lll
|
iceBindingRequestHandler func(m *stun.Message, local, remote ice.Candidate, pair *ice.CandidatePair) bool //nolint:lll
|
||||||
disableMediaEngineCopy bool
|
disableMediaEngineCopy bool
|
||||||
enableMediaEngineMultipleCodecs bool
|
disableMediaEngineMultipleCodecs bool
|
||||||
srtpProtectionProfiles []dtls.SRTPProtectionProfile
|
srtpProtectionProfiles []dtls.SRTPProtectionProfile
|
||||||
receiveMTU uint
|
receiveMTU uint
|
||||||
iceMaxBindingRequests *uint16
|
iceMaxBindingRequests *uint16
|
||||||
@@ -402,8 +402,8 @@ func (e *SettingEngine) DisableMediaEngineCopy(isDisabled bool) {
|
|||||||
// Pion used to negotiate things so far without this setting. The value of this setting will
|
// Pion used to negotiate things so far without this setting. The value of this setting will
|
||||||
// get copied to every copy of the MediaEngine generated for new PeerConnections (assuming
|
// get copied to every copy of the MediaEngine generated for new PeerConnections (assuming
|
||||||
// DisableMediaEngineCopy is set to false).
|
// DisableMediaEngineCopy is set to false).
|
||||||
func (e *SettingEngine) EnableMediaEngineMultipleCodecs(enable bool) {
|
func (e *SettingEngine) DisableMediaEngineMultipleCodecs(enable bool) {
|
||||||
e.enableMediaEngineMultipleCodecs = enable
|
e.disableMediaEngineMultipleCodecs = enable
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetReceiveMTU sets the size of read buffer that copies incoming packets. This is optional.
|
// SetReceiveMTU sets the size of read buffer that copies incoming packets. This is optional.
|
||||||
|
Reference in New Issue
Block a user