Set is_screencast on NativeVideoSource creation
Makes InternalSource's is_screencast configurable when creating a NativeVideoSource. This improves the stream's latency when vp9 is used for sharing screen content.
it seems like you haven't added any nanpa changeset files to this PR.
if this pull request includes changes to code, make sure to add a changeset, by writing a file to .nanpa/<unique-name>.kdl:
minor type="added" "Introduce frobnication algorithm"
refer to the manpage for more information.
Would it be sufficient to reuse this flag?
I didn't think of this TBH. It could be done by exposing a setter in VideoTrackSource and then set the is_screencast_ member in publish_track. If you are OK with this, I am happy to go with it.
Side note: The only "problem" I see with this, is that NativeVideoSource will require a kind of two stage initialization, which could be error prone. A way to mitigate it would be to create the NativeVideoSource object in publish_track, but I am not sure if this is acceptable.
Something that I had forgotten to mention when I created this, is that when is_screencast is set, libwebrtc limits the FPS to 5. I had to add spatial_layers.back().maxFramerate = video_codec.maxFramerate; here as a workaround.