PSA: PeerConnectionFactoryDependencies changes how media support is enabled

310 views
Skip to first unread message

Danil Chapovalov

unread,
Nov 6, 2023, 9:39:25 AM11/6/23
to discuss-webrtc
If you are creating PeerConnectionFactory using CreateModularPeerConnectionFactory, you would need to change how media related dependencies are injected.

If you do not use media (i.e. data channel only peer connection), no change is needed.

With this change following is deprecated and will be removed:
`call_factory` and `media_engine` members in 
webrtc::PeerConnectionFactoryDependencies.
webrtc::CreateCallFactory and cricket::CreateMediaEngine functions
Instead use `EnableMedia` 

struct cricket::MediaEngineDependencies
Instead inject media dependencies into PeerConnectionFactoryDependencies

function webrtc::SetMediaEngineDefaults
Instead replace `EnableMedia` with `EnableMediaWithDefaults`

test specific helper CreateTimeControllerBasedCallFactory
Instead replace `EnableMedia` with `EnableMediaWithDefaultsAndTimeController`

Example how code can be transformed to use `EnableMedia`:

Example how code can be transformed from using SetMediaEngineDefaults to use `EnableMediaWithDefaults`:

See http://bugs.webrtc.org/15574 for the progress of this migration.
Reply all
Reply to author
Forward
0 new messages