Bug 1706917 Comment 11 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

[VideoCodec::minBitrate](https://searchfox.org/mozilla-central/rev/25997ce8267ec9e3ea4b727e0973bd9ef02bba79/third_party/libwebrtc/api/video_codecs/video_codec.h#115) -> We do not attempt to configure this in our conduit code, since that is not something that we negotiate, or configure from JS. We do use it in [WebrtcGmpVideoEncoder::InitEncode](https://searchfox.org/mozilla-central/rev/25997ce8267ec9e3ea4b727e0973bd9ef02bba79/dom/media/webrtc/libwebrtcglue/WebrtcGmpVideoCodec.cpp#139) and [WebrtcMediaDataEncoder::SetupConfig](https://searchfox.org/mozilla-central/rev/25997ce8267ec9e3ea4b727e0973bd9ef02bba79/dom/media/webrtc/libwebrtcglue/WebrtcMediaDataEncoderCodec.cpp#192)

[VideoCodec::maxFramerate](https://searchfox.org/mozilla-central/rev/25997ce8267ec9e3ea4b727e0973bd9ef02bba79/third_party/libwebrtc/api/video_codecs/video_codec.h#117) -> **We do not set this in our conduit code**, although we do have a field ([EncodingConstraints::maxFps](https://searchfox.org/mozilla-central/rev/25997ce8267ec9e3ea4b727e0973bd9ef02bba79/dom/media/webrtc/common/EncodingConstraints.h#47)) that we set based on SDP negotiation. This ends up being used in [SelectSendFrameRate](https://searchfox.org/mozilla-central/rev/25997ce8267ec9e3ea4b727e0973bd9ef02bba79/dom/media/webrtc/libwebrtcglue/VideoConduit.cpp#1766), which is called by [WebrtcVideoConduit::OnControlConfigChange](https://searchfox.org/mozilla-central/rev/25997ce8267ec9e3ea4b727e0973bd9ef02bba79/dom/media/webrtc/libwebrtcglue/VideoConduit.cpp#683,701-703) and [WebrtcVideoConduit::SelectSendResolution](https://searchfox.org/mozilla-central/rev/25997ce8267ec9e3ea4b727e0973bd9ef02bba79/dom/media/webrtc/libwebrtcglue/VideoConduit.cpp#1291,1296-1297) to set [WebrtcVideoConduit::mSendingFramerate](https://searchfox.org/mozilla-central/rev/25997ce8267ec9e3ea4b727e0973bd9ef02bba79/dom/media/webrtc/libwebrtcglue/VideoConduit.h#391), which is used to set [VideoStreamFactory::mSendingFramerate](https://searchfox.org/mozilla-central/rev/25997ce8267ec9e3ea4b727e0973bd9ef02bba79/dom/media/webrtc/libwebrtcglue/VideoStreamFactory.h#60), which is used by [VideoStreamFactory::CreateEncoderStreams](https://searchfox.org/mozilla-central/rev/25997ce8267ec9e3ea4b727e0973bd9ef02bba79/dom/media/webrtc/libwebrtcglue/VideoStreamFactory.cpp#214) to set the [VideoStream::max_framerate](https://searchfox.org/mozilla-central/rev/25997ce8267ec9e3ea4b727e0973bd9ef02bba79/third_party/libwebrtc/api/video_codecs/video_encoder_config.h#41) in the streams it creates. VideoStream::max_framerate is in turn used:
* By [VideoCodecInitializer::VideoEncoderConfigToVideoCodec](https://searchfox.org/mozilla-central/rev/25997ce8267ec9e3ea4b727e0973bd9ef02bba79/third_party/libwebrtc/modules/video_coding/video_codec_initializer.cc#109,128,140) to init both [SpatialLayer::maxFramerate](https://searchfox.org/mozilla-central/rev/25997ce8267ec9e3ea4b727e0973bd9ef02bba79/third_party/libwebrtc/api/video_codecs/spatial_layer.h#22) and [VideoCodec::maxFramerate](https://searchfox.org/mozilla-central/rev/25997ce8267ec9e3ea4b727e0973bd9ef02bba79/third_party/libwebrtc/api/video_codecs/video_codec.h#117)
* By [VideoStreamEncoder::ReconfigureEncoder](https://searchfox.org/mozilla-central/rev/25997ce8267ec9e3ea4b727e0973bd9ef02bba79/third_party/libwebrtc/video/video_stream_encoder.cc#718,724-725,727) to call [VideoSourceSinkController::SetFrameRateUpperLimit](https://searchfox.org/mozilla-central/rev/25997ce8267ec9e3ea4b727e0973bd9ef02bba79/third_party/libwebrtc/video/video_source_sink_controller.cc#119,122)
[VideoCodec::minBitrate](https://searchfox.org/mozilla-central/rev/25997ce8267ec9e3ea4b727e0973bd9ef02bba79/third_party/libwebrtc/api/video_codecs/video_codec.h#115) -> We do not attempt to configure this in our conduit code, since that is not something that we negotiate, or configure from JS. We do use it in [WebrtcGmpVideoEncoder::InitEncode](https://searchfox.org/mozilla-central/rev/25997ce8267ec9e3ea4b727e0973bd9ef02bba79/dom/media/webrtc/libwebrtcglue/WebrtcGmpVideoCodec.cpp#139) and [WebrtcMediaDataEncoder::SetupConfig](https://searchfox.org/mozilla-central/rev/25997ce8267ec9e3ea4b727e0973bd9ef02bba79/dom/media/webrtc/libwebrtcglue/WebrtcMediaDataEncoderCodec.cpp#192)

[VideoCodec::maxFramerate](https://searchfox.org/mozilla-central/rev/25997ce8267ec9e3ea4b727e0973bd9ef02bba79/third_party/libwebrtc/api/video_codecs/video_codec.h#117) -> **We do not set this in our conduit code**, although we do have a field ([EncodingConstraints::maxFps](https://searchfox.org/mozilla-central/rev/25997ce8267ec9e3ea4b727e0973bd9ef02bba79/dom/media/webrtc/common/EncodingConstraints.h#47)) that we set based on SDP negotiation. This ends up being used in [SelectSendFrameRate](https://searchfox.org/mozilla-central/rev/25997ce8267ec9e3ea4b727e0973bd9ef02bba79/dom/media/webrtc/libwebrtcglue/VideoConduit.cpp#1766), which is called by [WebrtcVideoConduit::OnControlConfigChange](https://searchfox.org/mozilla-central/rev/25997ce8267ec9e3ea4b727e0973bd9ef02bba79/dom/media/webrtc/libwebrtcglue/VideoConduit.cpp#683,701-703) and [WebrtcVideoConduit::SelectSendResolution](https://searchfox.org/mozilla-central/rev/25997ce8267ec9e3ea4b727e0973bd9ef02bba79/dom/media/webrtc/libwebrtcglue/VideoConduit.cpp#1291,1296-1297) to set [WebrtcVideoConduit::mSendingFramerate](https://searchfox.org/mozilla-central/rev/25997ce8267ec9e3ea4b727e0973bd9ef02bba79/dom/media/webrtc/libwebrtcglue/VideoConduit.h#391), which is used to set [VideoStreamFactory::mSendingFramerate](https://searchfox.org/mozilla-central/rev/25997ce8267ec9e3ea4b727e0973bd9ef02bba79/dom/media/webrtc/libwebrtcglue/VideoStreamFactory.h#60), which is used by [VideoStreamFactory::CreateEncoderStreams](https://searchfox.org/mozilla-central/rev/25997ce8267ec9e3ea4b727e0973bd9ef02bba79/dom/media/webrtc/libwebrtcglue/VideoStreamFactory.cpp#214) to set the [VideoStream::max_framerate](https://searchfox.org/mozilla-central/rev/25997ce8267ec9e3ea4b727e0973bd9ef02bba79/third_party/libwebrtc/api/video_codecs/video_encoder_config.h#41) in the streams it creates. VideoStream::max_framerate is in turn used:
* By [VideoCodecInitializer::VideoEncoderConfigToVideoCodec](https://searchfox.org/mozilla-central/rev/25997ce8267ec9e3ea4b727e0973bd9ef02bba79/third_party/libwebrtc/modules/video_coding/video_codec_initializer.cc#109,128,140) to init both [SpatialLayer::maxFramerate](https://searchfox.org/mozilla-central/rev/25997ce8267ec9e3ea4b727e0973bd9ef02bba79/third_party/libwebrtc/api/video_codecs/spatial_layer.h#22) and [VideoCodec::maxFramerate](https://searchfox.org/mozilla-central/rev/25997ce8267ec9e3ea4b727e0973bd9ef02bba79/third_party/libwebrtc/api/video_codecs/video_codec.h#117)
* By [VideoStreamEncoder::ReconfigureEncoder](https://searchfox.org/mozilla-central/rev/25997ce8267ec9e3ea4b727e0973bd9ef02bba79/third_party/libwebrtc/video/video_stream_encoder.cc#718,724-725,727) to call [VideoSourceSinkController::SetFrameRateUpperLimit](https://searchfox.org/mozilla-central/rev/25997ce8267ec9e3ea4b727e0973bd9ef02bba79/third_party/libwebrtc/video/video_source_sink_controller.cc#119,122)

maxFramerate is used in [WebrtcGmpVideoEncoder::InitEncode](https://searchfox.org/mozilla-central/rev/df6434d2ebfdf2b5f89f205fc81d60d64a774fe1/dom/media/webrtc/libwebrtcglue/WebrtcGmpVideoCodec.cpp#141), [WebrtcMediaDataEncoder::SetupConfig](https://searchfox.org/mozilla-central/rev/df6434d2ebfdf2b5f89f205fc81d60d64a774fe1/dom/media/webrtc/libwebrtcglue/WebrtcMediaDataEncoderCodec.cpp#188), and [WebrtcMediaDataEncoder::CreateEncoder](https://searchfox.org/mozilla-central/rev/df6434d2ebfdf2b5f89f205fc81d60d64a774fe1/dom/media/webrtc/libwebrtcglue/WebrtcMediaDataEncoderCodec.cpp#224,229,255)

Back to Bug 1706917 Comment 11