Repository navigation
Canvases - Part One (libobs) - #11823
Conversation
0d9e66b to
38c060f
Compare
PatTheMav
left a comment
There was a problem hiding this comment.
Finished first round of reviews. No conceptual issues from my point of view, mainly code style/architectural.
I'd prefer all conditional blocks use curly braces to clearly mark the block, but IIRC the Linux kernel style guide allows it.
38c060f to
63f97a8
Compare
PatTheMav
left a comment
There was a problem hiding this comment.
Did a bit of testing with this code and ran into no functional changes (as intended). Scene items were always scaled and positioned correctly when canvas/output sizes changed.
63f97a8 to
fa1ec1f
Compare
|
I made a few updates based on feedback, I'll update the docs again once there are no more libobs changes planned before merging. |
Can you close the feedback comments that were addressed by the changes? The rebase obviously introduced lots of changes unrelated to the PR in the direct comparison between commits. |
fa1ec1f to
946de86
Compare
Sure, I closed a few that I would consider resolved given that they have not received further responses for now. Today's update was just a little bugfix for an oversight when it comes to renaming private canvases. Yesterday's one just added the |
946de86 to
0d4a0e9
Compare
|
Updated the docs and squashed commits where appropiate. |
0d4a0e9 to
9c55c97
Compare
PatTheMav
left a comment
There was a problem hiding this comment.
Looks like there were just documentation changes in the last push?
|
Yup, it only addressed Ryan's nits.
…On Wed, 5 Mar 2025, 21:23 Patrick Heyer, ***@***.***> wrote:
***@***.**** commented on this pull request.
Looks like there were just documentation changes in the last push?
—
Reply to this email directly, view it on GitHub
<#11823 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADULBJLF5SMFG4WVYLBYDXD2S5MMTAVCNFSM6AAAAABWOM45BSVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDMNRSGQYDIOBRHE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
PatTheMav
left a comment
There was a problem hiding this comment.
Should be fine. I'm not happy with some architectural details but those are either necessary due to how libobs works or necessary until later PRs are fully merged.
Allos creating additional views that act like a MAIN_VIEW instead of AUX_VIEW.
Signals when a video reset has completed. This is mainly useful when canvases or views are used, whose mixes will have been freed or recreated during the reset.
This adds a new obs_canvas object that acts as a shareable (reference-counted) owner of views, mixes, and (optionally) scenes. This is a step towards faciliatating multi-canvas and multi-output features in OBS Studio. It solves a number of complications that exist with the manual approach of using views, such as audio mixing, source active-state tracking, and scenes not havinga reliable way of identifying the actual available canvas size.
Since scenes now can have non-unique names by being part of different canvases, use UUIDs instead.
9c55c97 to
3551f1d
Compare
|
I missed it, but the docs commit could have been squashed into the commit that added the functions so that each commit had complete documentation. The |
Description
Adds canvases to libobs.
In this first iteration a canvas is a reference-counted object that contains scene sources (Scenes and Groups) and has an associated view and video mix.
Unlike views, canvases can be shared and ensure their video mixes persist across video resets. They can also be saved and loaded like sources, and solve various issues of using views (audio mixing, activation, scene rendering, etc.).
Motivation and Context
The end goal of this work is to superseede #10635 with something that is more generic and safer, and should make features that rely on rendering individual sources separately (e.g. ISO recording or virtual cam) easier to implement.
In the long term we want to deprecate views and refactor more things to be canvas-aware, to provide greater flexibility in the libobs world for multiple outputs. For instance, I would like to rework how GPU scaling for encoders works by explicitly making the created "submixes" part of and managed by a canvas. Also maybe transitions should become public sources associated with a canvas, so that they can actually be accessed and modified via the libobs API.
How Has This Been Tested?
OBS boots up and behaves normally.
Types of changes
Checklist: