SplitmediaLabsLimited / xjs

XSplit JS Framework. Make plugins for XSplit Broadcaster, quickly and easily.
Other
39 stars 11 forks source link

Additional control over native camera Video Output settings #242

Open mikeybanez opened 5 years ago

mikeybanez commented 5 years ago

In an older issue (#207) we supplied a read-only way to get a camera's current "native" resolution.

We have made a number of improvements with our API since, and should now have the ability to expose more camera-related functionality to developers.

We are able to set resolution, frame rate, and format through the global:width, global:height, global:frametime, global:subtype properties. Let's discuss the best way to provide these properties to developers. I can think of two requirements right now:

  1. Provide a way to request for a list of supported formats given a camera. This is important because different colorspaces can support a differing set of resolutions and frame rates. My preference here is to be able to get supported formats without having to add a camera to a scene first. What arguments does the developer need to provide?
  2. Provide a single method to set all or some of these properties together. It is necessary to refresh the camera to apply these settings, so I think it's important that we do not expose separate methods, each performing their own refresh.

@dcefram, let's start a discussion with @SML-MeSo .

dcefram commented 5 years ago

I'm not familiar with the colorspace <-> resolution + frame rate relation, is the details required for this already possible to get through the underlying XSplit APIs? Or is the plan going to be simply hardcoding it?

I agree that we should just expose one method for setting all of the video output settings. I do not see any immediate concerns with this one, it should be pretty straightforward.

mikeybanez commented 5 years ago

I believe we have some calls already that require some camera identifier (possibly the PID?) but @SML-MeSo will know more about this. IIRC, the call simply outputs a table of supported formats.