Skip to content

Conversation

@paulpv
Copy link
Member

@paulpv paulpv commented Aug 8, 2024

NDI5 changed the hardware acceleration request from <ndi_hwaccel enabled="true"/> to <ndi_video_codec type="hardware"/>.
We've never updated our code,
I'm updating our code. :)

Adding a long extensive comment in the code.

See also:

@paulpv paulpv force-pushed the 6.0.0_ndi5+_hardware_acceleration branch from 1ee4236 to 64ac9ea Compare August 9, 2024 21:04
@paulpv paulpv requested a review from Trouffman August 9, 2024 21:16
@paulpv paulpv self-assigned this Aug 9, 2024
@paulpv paulpv force-pushed the 6.0.0_ndi5+_hardware_acceleration branch from 64ac9ea to 602e774 Compare August 9, 2024 21:17
@paulpv paulpv force-pushed the 6.0.0_ndi5+_hardware_acceleration branch from 602e774 to 306ee04 Compare August 9, 2024 21:19
@paulpv
Copy link
Member Author

paulpv commented Aug 9, 2024

@Trouffman As mentioned in Discord, this "feature" is a little silly and never worked in NDI5 and somehow we survived.

Options:

  1. Use this PR's code as written when sends a working metadata when Allow hardware acceleration is checked and send a fake non-working metadata when it is unchecked.
    Sending fake metadata to turn off hardware acceleration is effectively no worse than not sending any metadata.
    If NewTek ever fixes/adds this ability then we either magically start working or just need to make a simple change the the metadata.
  2. Change this PR's code to only send the working documented metadata only when the Allow hardware acceleration is checked (ie: don't send a fake non-working metadata).
  3. Not have any UI option and just always send a request to enable hardware acceleration.

I think an option is best.
I could see some users wanting to legitimately reserve all of their GPU compute for gaming/whatever and never want NDI to always automatically use their GPU.

@Trouffman
Copy link
Collaborator

Option 2.

@paulpv paulpv force-pushed the 6.0.0_ndi5+_hardware_acceleration branch from 38780e7 to 762aa9b Compare August 10, 2024 00:44
@paulpv
Copy link
Member Author

paulpv commented Aug 10, 2024

I considered turning this on by default, but I do not think that we should because there is no way to directly turn this off for someone who does not want this enabled.

The only way I can think of to turn this off is to maybe reset the receiver, which is not intuitive how to do.
We could make it so that any settings change stops and restarts the receiver.

One other way is to require the user to close and reopen OBS! 😦

@Trouffman
Copy link
Collaborator

"Forcing" a receiver reset on a settings change could be the way, this is already the case for some of them.

@paulpv
Copy link
Member Author

paulpv commented Aug 14, 2024

"Forcing" a receiver reset on a settings change could be the way, this is already the case for some of them.

I have a solution for that in another PR, so I will go ahead and merge this relatively tiny PR.

@paulpv paulpv merged commit f205c65 into 6.0.0_actual Aug 14, 2024
@paulpv paulpv deleted the 6.0.0_ndi5+_hardware_acceleration branch August 14, 2024 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants