diff mbox series

[FFmpeg-devel] avdevice/dshow: Don't skip audio devices if no video device is present

Message ID DBBPR01MB10433D361F92D7BE0D41B00B2F0A12@DBBPR01MB10433.eurprd01.prod.exchangelabs.com
State New
Headers show
Series [FFmpeg-devel] avdevice/dshow: Don't skip audio devices if no video device is present | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

patches July 15, 2024, 6:51 a.m. UTC
The search of the current DirectShow device list has been customized so
that audio devices are always found even if no video device is connected.

Signed-off-by: Jens Frederich <jens.frederich@vector.com>
---
 libavdevice/dshow.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Roger Pack July 17, 2024, 1:02 a.m. UTC | #1
LGTM

On Mon, Jul 15, 2024 at 12:51 AM patches via ffmpeg-devel
<ffmpeg-devel@ffmpeg.org> wrote:
>
> The search of the current DirectShow device list has been customized so
> that audio devices are always found even if no video device is connected.
>
> Signed-off-by: Jens Frederich <jens.frederich@vector.com>
> ---
>  libavdevice/dshow.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavdevice/dshow.c b/libavdevice/dshow.c
> index 403e56fe13..57d8e1c0af 100644
> --- a/libavdevice/dshow.c
> +++ b/libavdevice/dshow.c
> @@ -645,7 +645,7 @@ static int dshow_get_device_list(AVFormatContext *avctx, AVDeviceInfoList *devic
>      }
>
>      ret = dshow_cycle_devices(avctx, devenum, VideoDevice, VideoSourceDevice, NULL, NULL, &device_list);
> -    if (ret < S_OK)
> +    if (ret < S_OK && ret != AVERROR(EIO))
>          goto error;
>      ret = dshow_cycle_devices(avctx, devenum, AudioDevice, AudioSourceDevice, NULL, NULL, &device_list);
>
> --
> 2.43.0
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
patches July 17, 2024, 7:43 a.m. UTC | #2
-----Original Message-----
From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of Roger Pack
Sent: Wednesday, July 17, 2024 3:03 AM
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH] avdevice/dshow: Don't skip audio devices if no video device is present

> LGTM

I also need this fix in 5.1 release branch, is this possible?

Jens


On Mon, Jul 15, 2024 at 12:51 AM patches via ffmpeg-devel <ffmpeg-devel@ffmpeg.org> wrote:
>
> The search of the current DirectShow device list has been customized 
> so that audio devices are always found even if no video device is connected.
>
> Signed-off-by: Jens Frederich <jens.frederich@vector.com>
> ---
>  libavdevice/dshow.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavdevice/dshow.c b/libavdevice/dshow.c index 
> 403e56fe13..57d8e1c0af 100644
> --- a/libavdevice/dshow.c
> +++ b/libavdevice/dshow.c
> @@ -645,7 +645,7 @@ static int dshow_get_device_list(AVFormatContext *avctx, AVDeviceInfoList *devic
>      }
>
>      ret = dshow_cycle_devices(avctx, devenum, VideoDevice, VideoSourceDevice, NULL, NULL, &device_list);
> -    if (ret < S_OK)
> +    if (ret < S_OK && ret != AVERROR(EIO))
>          goto error;
>      ret = dshow_cycle_devices(avctx, devenum, AudioDevice, 
> AudioSourceDevice, NULL, NULL, &device_list);
>
> --
> 2.43.0
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email 
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
patches July 22, 2024, 5:27 a.m. UTC | #3
Good morning,

can someone merge this little fix?

Best
Jens

-----Original Message-----
From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of Roger Pack
Sent: Wednesday, July 17, 2024 3:03 AM
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH] avdevice/dshow: Don't skip audio devices if no video device is present

[You don't often get email from rogerdpack2@gmail.com. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]

LGTM

On Mon, Jul 15, 2024 at 12:51 AM patches via ffmpeg-devel <ffmpeg-devel@ffmpeg.org> wrote:
>
> The search of the current DirectShow device list has been customized 
> so that audio devices are always found even if no video device is connected.
>
> Signed-off-by: Jens Frederich <jens.frederich@vector.com>
> ---
>  libavdevice/dshow.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavdevice/dshow.c b/libavdevice/dshow.c index 
> 403e56fe13..57d8e1c0af 100644
> --- a/libavdevice/dshow.c
> +++ b/libavdevice/dshow.c
> @@ -645,7 +645,7 @@ static int dshow_get_device_list(AVFormatContext *avctx, AVDeviceInfoList *devic
>      }
>
>      ret = dshow_cycle_devices(avctx, devenum, VideoDevice, VideoSourceDevice, NULL, NULL, &device_list);
> -    if (ret < S_OK)
> +    if (ret < S_OK && ret != AVERROR(EIO))
>          goto error;
>      ret = dshow_cycle_devices(avctx, devenum, AudioDevice, 
> AudioSourceDevice, NULL, NULL, &device_list);
>
> --
> 2.43.0
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email 
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
Roger Pack July 22, 2024, 3:51 p.m. UTC | #4
On Wed, Jul 17, 2024 at 1:43 AM patches <patches@vector.com> wrote:
>
> -----Original Message-----
> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of Roger Pack
> Sent: Wednesday, July 17, 2024 3:03 AM
> To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
> Subject: Re: [FFmpeg-devel] [PATCH] avdevice/dshow: Don't skip audio devices if no video device is present
>
> > LGTM
>
> I also need this fix in 5.1 release branch, is this possible?

Not sure how backports work, but you could make your own fork with it in it?

>
>
> On Mon, Jul 15, 2024 at 12:51 AM patches via ffmpeg-devel <ffmpeg-devel@ffmpeg.org> wrote:
> >
> > The search of the current DirectShow device list has been customized
> > so that audio devices are always found even if no video device is connected.
> >
> > Signed-off-by: Jens Frederich <jens.frederich@vector.com>
> > ---
> >  libavdevice/dshow.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/libavdevice/dshow.c b/libavdevice/dshow.c index
> > 403e56fe13..57d8e1c0af 100644
> > --- a/libavdevice/dshow.c
> > +++ b/libavdevice/dshow.c
> > @@ -645,7 +645,7 @@ static int dshow_get_device_list(AVFormatContext *avctx, AVDeviceInfoList *devic
> >      }
> >
> >      ret = dshow_cycle_devices(avctx, devenum, VideoDevice, VideoSourceDevice, NULL, NULL, &device_list);
> > -    if (ret < S_OK)
> > +    if (ret < S_OK && ret != AVERROR(EIO))
> >          goto error;
> >      ret = dshow_cycle_devices(avctx, devenum, AudioDevice,
> > AudioSourceDevice, NULL, NULL, &device_list);
> >
> > --
> > 2.43.0
> >
> > _______________________________________________
> > ffmpeg-devel mailing list
> > ffmpeg-devel@ffmpeg.org
> > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> >
> > To unsubscribe, visit link above, or email
> > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
patches July 23, 2024, 8:15 a.m. UTC | #5
-----Original Message-----
From: Roger Pack <rogerdpack2@gmail.com> 
Sent: Monday, July 22, 2024 5:52 PM
To: patches <patches@vector.com>
Cc: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH] avdevice/dshow: Don't skip audio devices if no video device is present

On Wed, Jul 17, 2024 at 1:43 AM patches <patches@vector.com> wrote:
>
> -----Original Message-----
> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of 
> Roger Pack
> Sent: Wednesday, July 17, 2024 3:03 AM
> To: FFmpeg development discussions and patches 
> <ffmpeg-devel@ffmpeg.org>
> Subject: Re: [FFmpeg-devel] [PATCH] avdevice/dshow: Don't skip audio 
> devices if no video device is present
>
> > LGTM
>
> I also need this fix in 5.1 release branch, is this possible?

> Not sure how backports work, but you could make your own fork with it in it?

No, that's why we are submitting the fix, so that we don't have to do this.
patches July 23, 2024, 8:21 a.m. UTC | #6
-----Original Message-----
From: Roger Pack <rogerdpack2@gmail.com> 
Sent: Monday, July 22, 2024 5:52 PM
To: patches <patches@vector.com>
Cc: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH] avdevice/dshow: Don't skip audio devices if no video device is present

On Wed, Jul 17, 2024 at 1:43 AM patches <patches@vector.com> wrote:
>
> -----Original Message-----
> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of 
> Roger Pack
> Sent: Wednesday, July 17, 2024 3:03 AM
> To: FFmpeg development discussions and patches 
> <ffmpeg-devel@ffmpeg.org>
> Subject: Re: [FFmpeg-devel] [PATCH] avdevice/dshow: Don't skip audio 
> devices if no video device is present
>
> > LGTM
>
> I also need this fix in 5.1 release branch, is this possible?

> Not sure how backports work, but you could make your own fork with it in it?

Can someone at least commit the fix on the main line?
Michael Niedermayer July 23, 2024, 8:21 p.m. UTC | #7
On Tue, Jul 23, 2024 at 08:21:31AM +0000, patches via ffmpeg-devel wrote:
> 
> -----Original Message-----
> From: Roger Pack <rogerdpack2@gmail.com> 
> Sent: Monday, July 22, 2024 5:52 PM
> To: patches <patches@vector.com>
> Cc: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
> Subject: Re: [FFmpeg-devel] [PATCH] avdevice/dshow: Don't skip audio devices if no video device is present
> 
> On Wed, Jul 17, 2024 at 1:43 AM patches <patches@vector.com> wrote:
> >
> > -----Original Message-----
> > From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of 
> > Roger Pack
> > Sent: Wednesday, July 17, 2024 3:03 AM
> > To: FFmpeg development discussions and patches 
> > <ffmpeg-devel@ffmpeg.org>
> > Subject: Re: [FFmpeg-devel] [PATCH] avdevice/dshow: Don't skip audio 
> > devices if no video device is present
> >
> > > LGTM
> >
> > I also need this fix in 5.1 release branch, is this possible?
> 
> > Not sure how backports work, but you could make your own fork with it in it?
> 
> Can someone at least commit the fix on the main line?

What should be put in the "Author" metadata for this ?

I can put "patches <patches@vector.com>" in it if thats really intended but it
looks like it may be unintended, so iam asking

thx

[...]
patches July 24, 2024, 7:09 a.m. UTC | #8
-----Original Message-----
From: Michael Niedermayer <michael@niedermayer.cc> 
Sent: Tuesday, July 23, 2024 10:22 PM
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Cc: patches <patches@vector.com>
Subject: Re: [FFmpeg-devel] [PATCH] avdevice/dshow: Don't skip audio devices if no video device is present

On Tue, Jul 23, 2024 at 08:21:31AM +0000, patches via ffmpeg-devel wrote:
> 
> -----Original Message-----
> From: Roger Pack <rogerdpack2@gmail.com>
> Sent: Monday, July 22, 2024 5:52 PM
> To: patches <patches@vector.com>
> Cc: FFmpeg development discussions and patches 
> <ffmpeg-devel@ffmpeg.org>
> Subject: Re: [FFmpeg-devel] [PATCH] avdevice/dshow: Don't skip audio 
> devices if no video device is present
> 
> On Wed, Jul 17, 2024 at 1:43 AM patches <patches@vector.com> wrote:
> >
> > -----Original Message-----
> > From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of 
> > Roger Pack
> > Sent: Wednesday, July 17, 2024 3:03 AM
> > To: FFmpeg development discussions and patches 
> > <ffmpeg-devel@ffmpeg.org>
> > Subject: Re: [FFmpeg-devel] [PATCH] avdevice/dshow: Don't skip audio 
> > devices if no video device is present
> >
> > > LGTM
> >
> > I also need this fix in 5.1 release branch, is this possible?
> 
> > Not sure how backports work, but you could make your own fork with it in it?
> 
> Can someone at least commit the fix on the main line?

> What should be put in the "Author" metadata for this ?

> I can put "patches <patches@vector.com>" in it if thats really intended but it looks like it may be unintended, so iam asking

Please use "Jens Frederich". We have a general mailbox for patches at Vector and I can't put a name there, I'll see if I can do better next time when I create a patch. 

Michael, will there be another 5.x release? If so, is it possible to apply the patch there? We are currently using 5.1 and the changeover to 6.x or 7.x is not foreseeable.
Michael Niedermayer July 24, 2024, 12:33 p.m. UTC | #9
On Wed, Jul 24, 2024 at 07:09:45AM +0000, patches via ffmpeg-devel wrote:
> 
> 
> -----Original Message-----
> From: Michael Niedermayer <michael@niedermayer.cc> 
> Sent: Tuesday, July 23, 2024 10:22 PM
> To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
> Cc: patches <patches@vector.com>
> Subject: Re: [FFmpeg-devel] [PATCH] avdevice/dshow: Don't skip audio devices if no video device is present
> 
> On Tue, Jul 23, 2024 at 08:21:31AM +0000, patches via ffmpeg-devel wrote:
> > 
> > -----Original Message-----
> > From: Roger Pack <rogerdpack2@gmail.com>
> > Sent: Monday, July 22, 2024 5:52 PM
> > To: patches <patches@vector.com>
> > Cc: FFmpeg development discussions and patches 
> > <ffmpeg-devel@ffmpeg.org>
> > Subject: Re: [FFmpeg-devel] [PATCH] avdevice/dshow: Don't skip audio 
> > devices if no video device is present
> > 
> > On Wed, Jul 17, 2024 at 1:43 AM patches <patches@vector.com> wrote:
> > >
> > > -----Original Message-----
> > > From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of 
> > > Roger Pack
> > > Sent: Wednesday, July 17, 2024 3:03 AM
> > > To: FFmpeg development discussions and patches 
> > > <ffmpeg-devel@ffmpeg.org>
> > > Subject: Re: [FFmpeg-devel] [PATCH] avdevice/dshow: Don't skip audio 
> > > devices if no video device is present
> > >
> > > > LGTM
> > >
> > > I also need this fix in 5.1 release branch, is this possible?
> > 
> > > Not sure how backports work, but you could make your own fork with it in it?
> > 
> > Can someone at least commit the fix on the main line?
> 
> > What should be put in the "Author" metadata for this ?
> 
> > I can put "patches <patches@vector.com>" in it if thats really intended but it looks like it may be unintended, so iam asking
> 
> Please use "Jens Frederich". We have a general mailbox for patches at Vector and I can't put a name there, I'll see if I can do better next time when I create a patch. 

will do


> 
> Michael, will there be another 5.x release?

yes


> If so, is it possible to apply the patch there?

ill try

thx
diff mbox series

Patch

diff --git a/libavdevice/dshow.c b/libavdevice/dshow.c
index 403e56fe13..57d8e1c0af 100644
--- a/libavdevice/dshow.c
+++ b/libavdevice/dshow.c
@@ -645,7 +645,7 @@  static int dshow_get_device_list(AVFormatContext *avctx, AVDeviceInfoList *devic
     }
 
     ret = dshow_cycle_devices(avctx, devenum, VideoDevice, VideoSourceDevice, NULL, NULL, &device_list);
-    if (ret < S_OK)
+    if (ret < S_OK && ret != AVERROR(EIO))
         goto error;
     ret = dshow_cycle_devices(avctx, devenum, AudioDevice, AudioSourceDevice, NULL, NULL, &device_list);