question

AzkielNir-4308 avatar image
0 Votes"
AzkielNir-4308 asked AzkielNir-4308 commented

m_pProcAmp->Set(VideoProcAmp_gain..) get Error code 0x80070079 (The semaphore timeout period has expired.)

Hi,

I am communicating with a UVC device on Windows using Windows Media Foundation,

Sometimes when sending a lot of set gain commands I get HR=0x80070079 (The semaphore timeout period has expired.)

  1. What does this error mean at this context?

  2. Should I use some kind of event callback to set the gain and be notified when the command was preformed? (async control)

I tried looking on "Asynchronous Callback Methods" but failed to understand how they can be connected into a procamp->set method.

Thanks
Nir



windows-api
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

XiaopoYang-MSFT avatar image
0 Votes"
XiaopoYang-MSFT answered

Perhaps the device failed to process because of a lot of commands pending. But According to Configure the Video Quality, IAMVideoProcAmp works fine. It's needed to test whether this property is supported or not before setting video quality for a specified property.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

AzkielNir-4308 avatar image
0 Votes"
AzkielNir-4308 answered AzkielNir-4308 commented

Regarding "It's needed to test whether this property is supported or not before setting video quality for a specified property."

I am testing a loop of setting the gain,
The control is supported cause I only get the error after lots of set/get.

But as this control asynchronous, maybe it's needed to return from the set function only when the operation was finished.

That is why I am searching for a way to register to a set event, currently without success.

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Have you found? It seems DirectShow API doesn’t supply callback version interface that adjusts the qualities of an incoming video signal.

0 Votes 0 ·

I was able to implement the callback on Linux using V4L2 but on Windows Media Foundation I could not find a way to implement it.
I had to use a retry mechanism and ignore this error when it happens (reproduced at low statistics).

0 Votes 0 ·