Skip to content

vtenc: Enable HEVC with alpha encoding

Piotr Brzeziński requested to merge thewildtree/gstreamer:vtenc-hevc-alpha into main
Adds a separate vtenc_h265a element (with a _hw variant as usual) for the HEVCWithAlpha codec type.
Decided to go with a separate element to not break existing uses of the normal HEVC encoder.
The preserve_alpha property is still only used for ProRes, no need for it here because we explicitly say we want alpha
when using the new element.

For now, the HEVCWithAlpha has an issue where it does not throttle the amount of input frames queued internally.
I added a quick workaround where encode_frame() will block until enqueue_frame() callback notifies it that some space
has been freed up in the internal queue. The limit was set to 5, which should be enough I guess? Hopefully this is not
too prone to race conditions.

From my testing this works fine on iOS (17.x) as well. The key is apparently present on iOS 4.0+, so it should be fine without any conditional enabling, as should be AYUV64 input - I removed the separate iOS caps because of that.

Merge request reports