[FFmpeg-devel] libavdevice/gdigrab: fix ffmpeg -devices doesn't show gdigrab

Submitted by Jun Zhao on May 17, 2019, 8:53 a.m.

Details

Message ID 1558083229-31726-1-git-send-email-mypopydev@gmail.com
State Accepted
Commit 206f72d0f2a9a5423343ce2df6e03143f5a6cc48
Headers show

Commit Message

Jun Zhao May 17, 2019, 8:53 a.m.
From: Jun Zhao <barryjzhao@tencent.com>

missed the category AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT lead to
ffmpeg -devices doesn't show gdigrab as a input device

FIx #7848

Found-by: dangibson
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
---
 libavdevice/gdigrab.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

Comments

Paul B Mahol May 17, 2019, 11:33 a.m.
On 5/17/19, Jun Zhao <mypopydev@gmail.com> wrote:
> From: Jun Zhao <barryjzhao@tencent.com>
>
> missed the category AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT lead to
> ffmpeg -devices doesn't show gdigrab as a input device
>
> FIx #7848
>
> Found-by: dangibson
> Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
> ---
>  libavdevice/gdigrab.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/libavdevice/gdigrab.c b/libavdevice/gdigrab.c
> index b226bd0..f444440 100644
> --- a/libavdevice/gdigrab.c
> +++ b/libavdevice/gdigrab.c
> @@ -647,6 +647,7 @@ static const AVClass gdigrab_class = {
>      .item_name  = av_default_item_name,
>      .option     = options,
>      .version    = LIBAVUTIL_VERSION_INT,
> +    .category   = AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT,
>  };
>
>  /** gdi grabber device demuxer declaration */
> --
> 1.7.1
>
> _______________________________________________
> 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".

lgtm
mypopy@gmail.com May 18, 2019, 4:57 a.m.
On Fri, May 17, 2019 at 7:33 PM Paul B Mahol <onemda@gmail.com> wrote:
>
> On 5/17/19, Jun Zhao <mypopydev@gmail.com> wrote:
> > From: Jun Zhao <barryjzhao@tencent.com>
> >
> > missed the category AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT lead to
> > ffmpeg -devices doesn't show gdigrab as a input device
> >
> > FIx #7848
> >
> > Found-by: dangibson
> > Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
> > ---
> >  libavdevice/gdigrab.c |    1 +
> >  1 files changed, 1 insertions(+), 0 deletions(-)
> >
> > diff --git a/libavdevice/gdigrab.c b/libavdevice/gdigrab.c
> > index b226bd0..f444440 100644
> > --- a/libavdevice/gdigrab.c
> > +++ b/libavdevice/gdigrab.c
> > @@ -647,6 +647,7 @@ static const AVClass gdigrab_class = {
> >      .item_name  = av_default_item_name,
> >      .option     = options,
> >      .version    = LIBAVUTIL_VERSION_INT,
> > +    .category   = AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT,
> >  };
> >
> >  /** gdi grabber device demuxer declaration */
> > --
> > 1.7.1
> >
> > _______________________________________________
> > 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".
>
> lgtm
Pushed´╝î Thanks

Patch hide | download patch | download mbox

diff --git a/libavdevice/gdigrab.c b/libavdevice/gdigrab.c
index b226bd0..f444440 100644
--- a/libavdevice/gdigrab.c
+++ b/libavdevice/gdigrab.c
@@ -647,6 +647,7 @@  static const AVClass gdigrab_class = {
     .item_name  = av_default_item_name,
     .option     = options,
     .version    = LIBAVUTIL_VERSION_INT,
+    .category   = AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT,
 };
 
 /** gdi grabber device demuxer declaration */