obsproject / obs-amd-encoder

AMD Advanced Media Framework Encoder Plugin for Open Broadcaster Studio
https://obsproject.com/forum/threads/amd-advanced-media-framework-encoder-plugin-for-obs-studio.52305/
GNU General Public License v2.0
454 stars 87 forks source link

Add 2.5 second timeout for AMF test process #427

Closed notr1ch closed 2 years ago

notr1ch commented 2 years ago

Description

Adds a 2.5 second timeout to the enc-amf-test on Windows, after which point the process self-terminates.

Motivation and Context

Some users report the OBS UI failing to appear despite obs64.exe running. In one case, this was caused by the AMF test executable freezing, and OBS waiting forever on a pipe ReadFile call. Self-terminating the test executable seemed like an easier implementation than asynchronous pipe I/O and has the benefit of cleaning up the frozen process.

Yes, it is a bit hacky, but AMF is long overdue for a rewrite anyway.

Ref: https://github.com/obsproject/obs-studio/issues/6230

How Has This Been Tested?

Ran enc-amf-test with hardcoded delays and verified it terminated and OBS reported a timeout.

Types of changes

Checklist:

RytoEX commented 2 years ago

Any reason not to use "Fixes #6230"?

notr1ch commented 2 years ago

I wasn't sure that worked across repositories.

RytoEX commented 2 years ago

You can leave it for a submodule update commit if you prefer.

vivi90 commented 2 years ago

pls merge