[PATCH 1/2] devenum: Try to create unique keys for different video capture devices.

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH 1/2] devenum: Try to create unique keys for different video capture devices.

Zebediah Figura
Signed-off-by: Zebediah Figura <[hidden email]>
---
 dlls/devenum/createdevenum.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/devenum/createdevenum.c b/dlls/devenum/createdevenum.c
index 2db5491190..b89cac6d39 100644
--- a/dlls/devenum/createdevenum.c
+++ b/dlls/devenum/createdevenum.c
@@ -795,7 +795,7 @@ static void register_avicap_devices(void)
 
         friendlyname[5] = '0' + i;
 
-        hr = register_codec(&CLSID_VideoInputDeviceCategory, name,
+        hr = register_codec(&CLSID_VideoInputDeviceCategory, friendlyname,
                 &CLSID_VfwCapture, friendlyname, &prop_bag);
         if (FAILED(hr))
             continue;
--
2.21.0



Reply | Threaded
Open this post in threaded view
|

[PATCH 2/2] qcap: Use the v4l2 device_caps field if supported.

Zebediah Figura
Signed-off-by: Zebediah Figura <[hidden email]>
---
 dlls/qcap/v4l.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/dlls/qcap/v4l.c b/dlls/qcap/v4l.c
index 32c2c02512..dcc5925164 100644
--- a/dlls/qcap/v4l.c
+++ b/dlls/qcap/v4l.c
@@ -577,6 +577,9 @@ Capture * qcap_driver_init( IPin *pOut, USHORT card )
         goto error;
     }
 
+    if (caps.capabilities & V4L2_CAP_DEVICE_CAPS)
+        caps.capabilities = caps.device_caps;
+
     if (!(caps.capabilities & V4L2_CAP_VIDEO_CAPTURE))
     {
         WARN("Device does not support single-planar video capture.\n");
--
2.21.0



Reply | Threaded
Open this post in threaded view
|

Re: [PATCH 1/2] devenum: Try to create unique keys for different video capture devices.

Damjan Jovanovic-2
In reply to this post by Zebediah Figura


On Sat, Apr 20, 2019 at 7:07 PM Zebediah Figura <[hidden email]> wrote:
Signed-off-by: Zebediah Figura <[hidden email]>
---
 dlls/devenum/createdevenum.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/devenum/createdevenum.c b/dlls/devenum/createdevenum.c
index 2db5491190..b89cac6d39 100644
--- a/dlls/devenum/createdevenum.c
+++ b/dlls/devenum/createdevenum.c
@@ -795,7 +795,7 @@ static void register_avicap_devices(void)

         friendlyname[5] = '0' + i;

-        hr = register_codec(&CLSID_VideoInputDeviceCategory, name,
+        hr = register_codec(&CLSID_VideoInputDeviceCategory, friendlyname,
                 &CLSID_VfwCapture, friendlyname, &prop_bag);
         if (FAILED(hr))
             continue;
--
2.21.0




Currently the "name" is the device description, eg. "KWorld Webcam V2010   : KWorld ".
The "friendlyname" is "video0", "video1".
Shouldn't it be the other way around?

Also instead of passing friendlyname twice to register_codec(), shouldn't we pass them both but in opposite order?

Just a thought.



Reply | Threaded
Open this post in threaded view
|

Re: Re: [PATCH 1/2] devenum: Try to create unique keys for different video capture devices.

Marvin-2
Hi,

While running your changed tests, I think I found new failures.
Being a bot and all I'm not very good at pattern recognition, so I might be
wrong, but could you please double-check?

Full results can be found at:
https://testbot.winehq.org/JobDetails.pl?Key=51226

Your paranoid android.


=== debian9 (build log) ===

error: corrupt patch at line 48
Task: Patch failed to apply

=== debian9 (build log) ===

error: corrupt patch at line 48
Task: Patch failed to apply


Reply | Threaded
Open this post in threaded view
|

Re: [PATCH 1/2] devenum: Try to create unique keys for different video capture devices.

Zebediah Figura
In reply to this post by Damjan Jovanovic-2
On 4/20/19 12:43 PM, Damjan Jovanovic wrote:

>
>
> On Sat, Apr 20, 2019 at 7:07 PM Zebediah Figura <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     Signed-off-by: Zebediah Figura <[hidden email]
>     <mailto:[hidden email]>>
>     ---
>       dlls/devenum/createdevenum.c | 2 +-
>       1 file changed, 1 insertion(+), 1 deletion(-)
>
>     diff --git a/dlls/devenum/createdevenum.c b/dlls/devenum/createdevenum.c
>     index 2db5491190..b89cac6d39 100644
>     --- a/dlls/devenum/createdevenum.c
>     +++ b/dlls/devenum/createdevenum.c
>     @@ -795,7 +795,7 @@ static void register_avicap_devices(void)
>
>               friendlyname[5] = '0' + i;
>
>     -        hr = register_codec(&CLSID_VideoInputDeviceCategory, name,
>     +        hr = register_codec(&CLSID_VideoInputDeviceCategory,
>     friendlyname,
>                       &CLSID_VfwCapture, friendlyname, &prop_bag);
>               if (FAILED(hr))
>                   continue;
>     --
>     2.21.0
>
>
>
>
> Currently the "name" is the device description, eg. "KWorld Webcam
> V2010   : KWorld ".
> The "friendlyname" is "video0", "video1".
> Shouldn't it be the other way around?
>
> Also instead of passing friendlyname twice to register_codec(),
> shouldn't we pass them both but in opposite order?
>
> Just a thought.
>
>
>

I was going to reply that this had been carried over from the previous
code, but no, it looks like I accidentally swapped them in ec16a92b1.
I'll send an updated patch.