From: Zebediah Figura zfigura@codeweavers.com
--- dlls/qcap/v4l.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/qcap/v4l.c b/dlls/qcap/v4l.c index 577cc829329..1b8a3658dcf 100644 --- a/dlls/qcap/v4l.c +++ b/dlls/qcap/v4l.c @@ -387,8 +387,8 @@ static void fill_caps(__u32 pixelformat, __u32 width, __u32 height, caps->media_type.cbFormat = sizeof(VIDEOINFOHEADER); /* We reallocate the caps array, so pbFormat has to be set after all caps * have been enumerated. */ - caps->config.MaxFrameInterval = 10000000 * max_fps; - caps->config.MinFrameInterval = 10000000 * min_fps; + caps->config.MaxFrameInterval = 10000000 / max_fps; + caps->config.MinFrameInterval = 10000000 / min_fps; caps->config.MaxOutputSize.cx = width; caps->config.MaxOutputSize.cy = height; caps->config.MinOutputSize.cx = width;
From: Zebediah Figura zfigura@codeweavers.com
The maximum FPS is the inverse of the minimum frame time, not the maximum frame time, and vice versa. --- dlls/qcap/v4l.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/qcap/v4l.c b/dlls/qcap/v4l.c index 1b8a3658dcf..b2ccaa6c53e 100644 --- a/dlls/qcap/v4l.c +++ b/dlls/qcap/v4l.c @@ -528,8 +528,8 @@ static NTSTATUS v4l_device_create( void *args ) else if (frmival.type == V4L2_FRMIVAL_TYPE_STEPWISE || frmival.type == V4L2_FRMIVAL_TYPE_CONTINUOUS) { - max_fps = frmival.stepwise.max.denominator / frmival.stepwise.max.numerator; - min_fps = frmival.stepwise.min.denominator / frmival.stepwise.min.numerator; + min_fps = frmival.stepwise.max.denominator / frmival.stepwise.max.numerator; + max_fps = frmival.stepwise.min.denominator / frmival.stepwise.min.numerator; } } else
From: Zebediah Figura zfigura@codeweavers.com
OpenSeeFace depends on this. --- dlls/qcap/tests/videocapture.c | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-)
diff --git a/dlls/qcap/tests/videocapture.c b/dlls/qcap/tests/videocapture.c index 41b2cbc6a3f..cb74c20481f 100644 --- a/dlls/qcap/tests/videocapture.c +++ b/dlls/qcap/tests/videocapture.c @@ -353,6 +353,7 @@ struct testfilter { struct strmbase_filter filter; struct strmbase_sink sink; + HANDLE got_sample; };
static inline struct testfilter *impl_from_strmbase_filter(struct strmbase_filter *iface) @@ -371,6 +372,8 @@ static struct strmbase_pin *testfilter_get_pin(struct strmbase_filter *iface, un static void testfilter_destroy(struct strmbase_filter *iface) { struct testfilter *filter = impl_from_strmbase_filter(iface); + + CloseHandle(filter->got_sample); strmbase_sink_cleanup(&filter->sink); strmbase_filter_cleanup(&filter->filter); } @@ -396,6 +399,17 @@ static HRESULT testsink_query_interface(struct strmbase_pin *iface, REFIID iid,
static HRESULT WINAPI testsink_Receive(struct strmbase_sink *iface, IMediaSample *sample) { + struct testfilter *filter = impl_from_strmbase_filter(iface->pin.filter); + REFERENCE_TIME start, end; + HRESULT hr; + + if (winetest_debug > 1) trace("Receive()\n"); + + hr = IMediaSample_GetTime(sample, &start, &end); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); + + SetEvent(filter->got_sample); + return S_OK; }
@@ -411,13 +425,16 @@ static void testfilter_init(struct testfilter *filter) memset(filter, 0, sizeof(*filter)); strmbase_filter_init(&filter->filter, NULL, &clsid, &testfilter_ops); strmbase_sink_init(&filter->sink, &filter->filter, L"sink", &testsink_ops, NULL); + filter->got_sample = CreateEventW(NULL, FALSE, FALSE, NULL); }
-static void test_filter_state(IMediaControl *control, IMemAllocator *allocator) +static void test_filter_state(IMediaControl *control, struct testfilter *filter) { + IMemAllocator *allocator = filter->sink.pAllocator; IMediaSample *sample; OAFilterState state; HRESULT hr; + DWORD ret;
hr = IMediaControl_GetState(control, 0, &state); ok(hr == S_OK, "Got hr %#lx.\n", hr); @@ -440,6 +457,13 @@ static void test_filter_state(IMediaControl *control, IMemAllocator *allocator) hr = IMediaControl_Run(control); ok(hr == S_OK, "Got hr %#lx.\n", hr);
+ /* starting up the webcam can be a little slow */ + ret = WaitForSingleObject(filter->got_sample, 5000); + ok(!ret, "Got %lu.\n", ret); + + ret = WaitForSingleObject(filter->got_sample, 1000); + ok(!ret, "Got %lu.\n", ret); + hr = IMediaControl_GetState(control, 0, &state); ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Running, "Got state %lu.\n", state); @@ -547,7 +571,7 @@ static void test_connect_pin(IBaseFilter *filter, IPin *source)
ok(!!testsink.sink.pAllocator, "Expected to be assigned an allocator.\n");
- test_filter_state(control, testsink.sink.pAllocator); + test_filter_state(control, &testsink);
hr = IPin_ConnectedTo(source, &peer); ok(hr == S_OK, "Got hr %#lx.\n", hr);
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=124912
Your paranoid android.
=== debian11 (build log) ===
Use of uninitialized value $Flaky in addition (+) at /home/testbot/lib/WineTestBot/LogUtils.pm line 720, <$LogFile> line 24695. Use of uninitialized value $Flaky in addition (+) at /home/testbot/lib/WineTestBot/LogUtils.pm line 720, <$LogFile> line 24695. Use of uninitialized value $Flaky in addition (+) at /home/testbot/lib/WineTestBot/LogUtils.pm line 720, <$LogFile> line 24695.