basler / gst-plugin-pylon

The official GStreamer plug-in for Basler cameras
BSD 3-Clause "New" or "Revised" License
42 stars 10 forks source link

Set capabilities using PFS file directly #47

Open mkaivs opened 1 year ago

mkaivs commented 1 year ago

At the moment, when I need to set the capabilities (pixel format, image width, image height and acquisition framerate), I need to use a capsfilter. Even though this approach work fines, it's redundant when the provided .pfs file has all of these configurations as well. I don't want to hard-code any of these values so the work-around is to read these values from the .pfs file to set the capsfilter.

Is there currently a way to make plugin uses the provided .pfs file to set pixel format, image width, image height and acquisition framerate instead of having to use a capsfilter?

I suggest that when user provide a .pfs file, it's used to set the capabilities, however, if the user also provide a capsfilter then the capsfilter takes precedence over what is set in the .pfs file.

thiesmoeller commented 1 year ago

Hi @mkaivs,

thanks for bringing up this request for a usability enhancement! This is already in our development pipeline, so it's good to take the chance to collect some comments from you :-)

The plugin will get a new property that limits the caps during negotiation process to only what is given

Question: If in this case the camera is configured e.g. to a PixelFormat that is not even supported in the gst-plugin-pylon ( e.g. Mono12p),

what would be your expected behaviour to handle this behaviour.

The case, where the camera is configured to a Pixelformat that is not supported in the pipeline, would simply lead to a negotiation failed error.

mkaivs commented 1 year ago

It's amazing that what I suggested is already in the work!

In my opinion, if the camera is configured by the user to output in a Pixelformat that is not support by the next plugin in the pipeline, e.g., a video converter, then it's an user error and a negotiation failed error is good to me, it's also the behaviour I see from other source plugin.