From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id ED5C5402DF for ; Mon, 20 Dec 2021 09:54:41 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 6724B68ADF2; Mon, 20 Dec 2021 11:54:40 +0200 (EET) Received: from mail-ua1-f54.google.com (mail-ua1-f54.google.com [209.85.222.54]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 62F056806A3 for ; Mon, 20 Dec 2021 11:54:33 +0200 (EET) Received: by mail-ua1-f54.google.com with SMTP id p2so16566854uad.11 for ; Mon, 20 Dec 2021 01:54:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=HPsZwWd7L9NWt38m0X1Rw0Ksh4HeyZMhF94Ow6q/eXU=; b=MyWqrL4qMubyfe9Zo/TF8tnKqUyWp/EAX7TxqkjcvNMpr9FqTru437CwyhcPiv6wC4 p/CuoPsLQBHADtIsEElYf9sVt4loJS3BCPWeAYz7yPWFpRHGGUE0iI2NSanqbwZlgR6H rmC5J8SD5DAGXYQIAXiLakY40Fj/nGH/hDjuOI4cLQkZOkndqPp4zlbb8fluEKxnBUb2 zT5h2hW/sxL+RXa6qqklQQKI6FsX0bymdxznifGbmZtmB8KQpyeR/pJWHkRS0CTIhgRL 3liFZOBa4Dmz+kzlu4bk764e+yz/AmBdztX/k6rn+gOHl8UxFLhpSlW+w0hpaA0NJAk6 ARhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=HPsZwWd7L9NWt38m0X1Rw0Ksh4HeyZMhF94Ow6q/eXU=; b=CRv8Ju87jTwa0hK5Wd4qq8FcGdRrlzGbwOEN2VDxXBj89N0Uuc8cNjyzTHlBk3vIeA PAmX/Ohe0w1kM2G3v03ytZMpvteXbNucLMZOV1eI5FOcapMrQvJunpKYZceIyDz+B1t+ 2B8UFLAwhDMHEEnXEe8MJxhctQUWJAYWswgfo2HLg1uPEHABIGS8lQXPRFjX3EX5Jrl+ Zasbb9F5JWK1Rs/ZshXM8FdIZavEasgeubfYKgpV9pyDEhHBPLAyCGjjU74ePTgHzUvb D3BU/DfM6779bFgxP9oxahc7yuarJm69hm+3KrU5azWOyJAeC2r2tZFFopyU8L+S/HeI 60jQ== X-Gm-Message-State: AOAM531blIeaehbKd8FYft7vvQewHeIUFbHuHKJCjNc/dKaQTOpc/0QK cB9N2x4fjJ0pYi1IQcBH9XLRlQqVKaXCMikftUI1ljjtCmk= X-Google-Smtp-Source: ABdhPJyqlNllHWp+9BRBmDdOw/9DLb/fy9hSF45Zwkh3YKwoiNS5RUaqkQ7HAa+cGq+ZKQwGPWpuMw1hKsJUHj7ruvY= X-Received: by 2002:ab0:5a0e:: with SMTP id l14mr4710767uad.8.1639994071085; Mon, 20 Dec 2021 01:54:31 -0800 (PST) MIME-Version: 1.0 References: <20211219192134.1296-1-dcnieho@gmail.com> <20211219192134.1296-10-dcnieho@gmail.com> In-Reply-To: From: "Diederick C. Niehorster" Date: Mon, 20 Dec 2021 10:54:15 +0100 Message-ID: To: FFmpeg development discussions and patches Subject: Re: [FFmpeg-devel] [PATCH v5 09/13] avdevice: add info about media types(s) to AVDeviceInfo X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: Hi Andreas, On Mon, Dec 20, 2021 at 1:59 AM Andreas Rheinhardt wrote: > > Diederick Niehorster: > > diff --git a/libavdevice/avdevice.h b/libavdevice/avdevice.h > > index 8370bbc7f2..6f24976dcc 100644 > > --- a/libavdevice/avdevice.h > > +++ b/libavdevice/avdevice.h > > @@ -457,6 +457,8 @@ void avdevice_capabilities_free(AVDeviceCapabilitiesQuery **caps, AVFormatContex > > typedef struct AVDeviceInfo { > > char *device_name; /**< device name, format depends on device */ > > char *device_description; /**< human friendly name */ > > + enum AVMediaType *media_types; /**< array indicating what media types(s), if any, a device can provide. If null, cannot provide any */ > > + int nb_media_types; /**< length of media_types array, 0 if device cannot provide any media types */ > > Personally, I'd prefer it if this were unsigned given that negative > values don't make sense. But this is just a personal preference. I agree with you, but almost all nb_ in ffmpeg are int, so I guess its best to use that here too and avoid any surprises. I have applied all your comments, except the two i asked questions about, and you comment on patch 8 to allocate media_types on the stack, since it is to be returned to caller as you noticed yourself later. Thanks for the comments! Dee _______________________________________________ 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".