Hi,
I'm trying to control the equalizer gamma on the C# example.
I've tried with no results.
DoMpvCommand("set", "gamma", "50");
and
_mpvSetOptionString(_mpvHandle, GetUtf8Bytes("gamma"), GetUtf8Bytes("50"));
The point is trying to fade de video to black by using a timer. Is there any way to achieve this?
Thanks.
Try to set it as property instead of option.
Thanks for the quick response.
I've tried it:
var bytes = GetUtf8Bytes("100");
_mpvSetProperty(_mpvHandle, GetUtf8Bytes("gamma"), MpvFormatString, ref bytes);
still no luck.
The "qml" mpv example actually sets gamma the same way, and it works. "100" is the default value, btw. You can also try to enable verbose logging, which AFAIK logs property set calls and their result.
Hi,
Well, yes i already did came across that exemple last week. But i can't see the difference from that to my c# code.
var bytes = GetUtf8Bytes("50");
_mpvSetProperty(_mpvHandle, GetUtf8Bytes("gamma"), MpvFormatString, ref bytes);
Nothing happens, and when I read the property it returns "0", by doing:
var lpBuffer = IntPtr.Zero;
_mpvGetPropertyString(_mpvHandle, GetUtf8Bytes("gamma"), MpvFormatString, ref lpBuffer);
Console.WriteLine(lpBuffer);
I've tried changing the MpvFormatString to Int64 (4) but still clueless on why it doesn't work.
Thank you
Ok, so figured out that:
_mpvSetProperty(_mpvHandle, GetUtf8Bytes("gamma"), MpvFormatString, ref bytes);
return -10 - MPV_ERROR_PROPERTY_UNAVAILABLE
FOUND IT!
So apparently I can't use gamma with direct3d, tested t with opengl and it Works ;)
Thank you!
There's no reason to use vo_direct3d anyway.