* [v4l-utils] utils: media-ctl: Install media-ctl header and library files
@ 2024-06-14 6:51 Neel Gandhi
2024-06-14 10:04 ` Laurent Pinchart
0 siblings, 1 reply; 8+ messages in thread
From: Neel Gandhi @ 2024-06-14 6:51 UTC (permalink / raw)
To: linux-media
Cc: neel.gandhi, hverkuil, laurent.pinchart, sakari.ailus, mark.hatle,
varunkumar.allagadapa, vishal.sagar
Install mediactl and v4l2subdev header and library
files, which may be required by 3rd party applications
to populate and control v4l2subdev device node tree
Signed-off-by: Neel Gandhi <neel.gandhi@amd.com>
---
utils/media-ctl/meson.build | 28 +++++++++++++++++++++-------
1 file changed, 21 insertions(+), 7 deletions(-)
diff --git a/utils/media-ctl/meson.build b/utils/media-ctl/meson.build
index 3a7b0c9a..40669b4c 100644
--- a/utils/media-ctl/meson.build
+++ b/utils/media-ctl/meson.build
@@ -3,14 +3,24 @@ libmediactl_sources = files(
'mediactl-priv.h',
)
+libmediactl_api = files(
+ 'mediactl.h',
+ 'v4l2subdev.h',
+)
+
+install_headers(libmediactl_api, subdir: 'mediactl')
+
libmediactl_deps = [
dep_libudev,
]
-libmediactl = static_library('mediactl',
- libmediactl_sources,
- dependencies : libmediactl_deps,
- include_directories : v4l2_utils_incdir)
+libmediactl = library('mediactl',
+ libmediactl_sources,
+ soversion: '0',
+ version: '0.0.0',
+ install : true,
+ dependencies : libmediactl_deps,
+ include_directories : v4l2_utils_incdir)
dep_libmediactl = declare_dependency(link_with : libmediactl)
@@ -18,9 +28,13 @@ libv4l2subdev_sources = files('libv4l2subdev.c')
libv4l2subdev_sources += media_bus_format_names_h
libv4l2subdev_sources += media_bus_format_codes_h
-libv4l2subdev = static_library('v4l2subdev',
- libv4l2subdev_sources,
- include_directories : v4l2_utils_incdir)
+libv4l2subdev = library('v4l2subdev',
+ libv4l2subdev_sources,
+ soversion: '0',
+ version: '0.0.0',
+ install : true,
+ dependencies : dep_libmediactl,
+ include_directories : v4l2_utils_incdir)
dep_libv4l2subdev = declare_dependency(link_with : libv4l2subdev)
--
2.34.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [v4l-utils] utils: media-ctl: Install media-ctl header and library files
2024-06-14 6:51 [v4l-utils] utils: media-ctl: Install media-ctl header and library files Neel Gandhi
@ 2024-06-14 10:04 ` Laurent Pinchart
2024-06-14 13:07 ` Gandhi, Neel
0 siblings, 1 reply; 8+ messages in thread
From: Laurent Pinchart @ 2024-06-14 10:04 UTC (permalink / raw)
To: Neel Gandhi
Cc: linux-media, hverkuil, sakari.ailus, mark.hatle,
varunkumar.allagadapa, vishal.sagar
Hi Neel,
Thank you for the patch.
On Fri, Jun 14, 2024 at 12:21:20PM +0530, Neel Gandhi wrote:
> Install mediactl and v4l2subdev header and library
> files, which may be required by 3rd party applications
> to populate and control v4l2subdev device node tree
We haven't done so because the API of those libraries is currently
internal, and not guaranteed to be stable.
> Signed-off-by: Neel Gandhi <neel.gandhi@amd.com>
> ---
> utils/media-ctl/meson.build | 28 +++++++++++++++++++++-------
> 1 file changed, 21 insertions(+), 7 deletions(-)
>
> diff --git a/utils/media-ctl/meson.build b/utils/media-ctl/meson.build
> index 3a7b0c9a..40669b4c 100644
> --- a/utils/media-ctl/meson.build
> +++ b/utils/media-ctl/meson.build
> @@ -3,14 +3,24 @@ libmediactl_sources = files(
> 'mediactl-priv.h',
> )
>
> +libmediactl_api = files(
> + 'mediactl.h',
> + 'v4l2subdev.h',
> +)
> +
> +install_headers(libmediactl_api, subdir: 'mediactl')
> +
> libmediactl_deps = [
> dep_libudev,
> ]
>
> -libmediactl = static_library('mediactl',
> - libmediactl_sources,
> - dependencies : libmediactl_deps,
> - include_directories : v4l2_utils_incdir)
> +libmediactl = library('mediactl',
> + libmediactl_sources,
> + soversion: '0',
> + version: '0.0.0',
> + install : true,
> + dependencies : libmediactl_deps,
> + include_directories : v4l2_utils_incdir)
>
> dep_libmediactl = declare_dependency(link_with : libmediactl)
>
> @@ -18,9 +28,13 @@ libv4l2subdev_sources = files('libv4l2subdev.c')
> libv4l2subdev_sources += media_bus_format_names_h
> libv4l2subdev_sources += media_bus_format_codes_h
>
> -libv4l2subdev = static_library('v4l2subdev',
> - libv4l2subdev_sources,
> - include_directories : v4l2_utils_incdir)
> +libv4l2subdev = library('v4l2subdev',
> + libv4l2subdev_sources,
> + soversion: '0',
> + version: '0.0.0',
> + install : true,
> + dependencies : dep_libmediactl,
> + include_directories : v4l2_utils_incdir)
>
> dep_libv4l2subdev = declare_dependency(link_with : libv4l2subdev)
>
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: [v4l-utils] utils: media-ctl: Install media-ctl header and library files
2024-06-14 10:04 ` Laurent Pinchart
@ 2024-06-14 13:07 ` Gandhi, Neel
2024-06-15 0:35 ` Laurent Pinchart
0 siblings, 1 reply; 8+ messages in thread
From: Gandhi, Neel @ 2024-06-14 13:07 UTC (permalink / raw)
To: Laurent Pinchart
Cc: linux-media@vger.kernel.org, hverkuil@xs4all.nl,
sakari.ailus@iki.fi, Hatle, Mark, Allagadapa, Varunkumar,
Sagar, Vishal
Hi Laurent,
Thank you for your quick response. Please see my below inline response.
> -----Original Message-----
> From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Sent: Friday, June 14, 2024 3:35 PM
> To: Gandhi, Neel <neel.gandhi@amd.com>
> Cc: linux-media@vger.kernel.org; hverkuil@xs4all.nl; sakari.ailus@iki.fi; Hatle,
> Mark <mark.hatle@amd.com>; Allagadapa, Varunkumar
> <varunkumar.allagadapa@amd.com>; Sagar, Vishal <vishal.sagar@amd.com>
> Subject: Re: [v4l-utils] utils: media-ctl: Install media-ctl header and library files
>
> Hi Neel,
>
> Thank you for the patch.
>
> On Fri, Jun 14, 2024 at 12:21:20PM +0530, Neel Gandhi wrote:
> > Install mediactl and v4l2subdev header and library files, which may be
> > required by 3rd party applications to populate and control v4l2subdev
> > device node tree
>
> We haven't done so because the API of those libraries is currently internal, and
> not guaranteed to be stable.
>
So, if one's application is developed based on those libraries, then is there any alternative solution for it?
As in the prior versions of v4l-utils package, those libraries are available to use but it was removed from v1.25+ onwards (from meson related changes in c2b91b9c3853b2cbcbe170a542864a3147d179ee commitID). We're using yocto scarthgap, which is using v1.26.
> > Signed-off-by: Neel Gandhi <neel.gandhi@amd.com>
> > ---
> > utils/media-ctl/meson.build | 28 +++++++++++++++++++++-------
> > 1 file changed, 21 insertions(+), 7 deletions(-)
> >
> > diff --git a/utils/media-ctl/meson.build b/utils/media-ctl/meson.build
> > index 3a7b0c9a..40669b4c 100644
> > --- a/utils/media-ctl/meson.build
> > +++ b/utils/media-ctl/meson.build
> > @@ -3,14 +3,24 @@ libmediactl_sources = files(
> > 'mediactl-priv.h',
> > )
> >
> > +libmediactl_api = files(
> > + 'mediactl.h',
> > + 'v4l2subdev.h',
> > +)
> > +
> > +install_headers(libmediactl_api, subdir: 'mediactl')
> > +
> > libmediactl_deps = [
> > dep_libudev,
> > ]
> >
> > -libmediactl = static_library('mediactl',
> > - libmediactl_sources,
> > - dependencies : libmediactl_deps,
> > - include_directories : v4l2_utils_incdir)
> > +libmediactl = library('mediactl',
> > + libmediactl_sources,
> > + soversion: '0',
> > + version: '0.0.0',
> > + install : true,
> > + dependencies : libmediactl_deps,
> > + include_directories : v4l2_utils_incdir)
> >
> > dep_libmediactl = declare_dependency(link_with : libmediactl)
> >
> > @@ -18,9 +28,13 @@ libv4l2subdev_sources = files('libv4l2subdev.c')
> > libv4l2subdev_sources += media_bus_format_names_h
> > libv4l2subdev_sources += media_bus_format_codes_h
> >
> > -libv4l2subdev = static_library('v4l2subdev',
> > - libv4l2subdev_sources,
> > - include_directories : v4l2_utils_incdir)
> > +libv4l2subdev = library('v4l2subdev',
> > + libv4l2subdev_sources,
> > + soversion: '0',
> > + version: '0.0.0',
> > + install : true,
> > + dependencies : dep_libmediactl,
> > + include_directories : v4l2_utils_incdir)
> >
> > dep_libv4l2subdev = declare_dependency(link_with : libv4l2subdev)
> >
>
> --
> Regards,
>
> Laurent Pinchart
Thanks & Regards,
Neel Gandhi
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [v4l-utils] utils: media-ctl: Install media-ctl header and library files
2024-06-14 13:07 ` Gandhi, Neel
@ 2024-06-15 0:35 ` Laurent Pinchart
2024-06-17 7:51 ` sakari.ailus
0 siblings, 1 reply; 8+ messages in thread
From: Laurent Pinchart @ 2024-06-15 0:35 UTC (permalink / raw)
To: Gandhi, Neel
Cc: linux-media@vger.kernel.org, hverkuil@xs4all.nl,
sakari.ailus@iki.fi, Hatle, Mark, Allagadapa, Varunkumar,
Sagar, Vishal
Hi Neel,
On Fri, Jun 14, 2024 at 01:07:24PM +0000, Gandhi, Neel wrote:
> Hi Laurent,
>
> Thank you for your quick response. Please see my below inline response.
>
> On Friday, June 14, 2024 3:35 PM, Laurent Pinchart wrote:
> > On Fri, Jun 14, 2024 at 12:21:20PM +0530, Neel Gandhi wrote:
> > > Install mediactl and v4l2subdev header and library files, which may be
> > > required by 3rd party applications to populate and control v4l2subdev
> > > device node tree
> >
> > We haven't done so because the API of those libraries is currently internal, and
> > not guaranteed to be stable.
>
> So, if one's application is developed based on those libraries, then
> is there any alternative solution for it?
Good question. I personally have no issue with applications using those
libraries, as long as they don't expect a stable API. This means that
any future version of v4l-utils may ship incompatible libraries, and
that won't be considered as a regression, and won't be addressed. If we
want to go that way, I think we should install static versions of the
libraries only, as dynamic linking will really be asking for trouble.
A better option, of course, would be to offer a stable API. That will
require work, the current API will need to be reviewed and improved to
make sure we can then extend it in a backward-compatible way whenever
the kernel APIs get extended. It's not work that I could commit to, so
we would need a volunteer for work on that and then maintain the
libraries.
Hans, Sakari, any opinion ?
Neel, out of curiosity, what do you use those libraries for (if you can
tell publicly) ?
> As in the prior versions of v4l-utils package, those libraries are
> available to use but it was removed from v1.25+ onwards (from meson
> related changes in c2b91b9c3853b2cbcbe170a542864a3147d179ee commitID).
> We're using yocto scarthgap, which is using v1.26.
>
> > > Signed-off-by: Neel Gandhi <neel.gandhi@amd.com>
> > > ---
> > > utils/media-ctl/meson.build | 28 +++++++++++++++++++++-------
> > > 1 file changed, 21 insertions(+), 7 deletions(-)
> > >
> > > diff --git a/utils/media-ctl/meson.build b/utils/media-ctl/meson.build
> > > index 3a7b0c9a..40669b4c 100644
> > > --- a/utils/media-ctl/meson.build
> > > +++ b/utils/media-ctl/meson.build
> > > @@ -3,14 +3,24 @@ libmediactl_sources = files(
> > > 'mediactl-priv.h',
> > > )
> > >
> > > +libmediactl_api = files(
> > > + 'mediactl.h',
> > > + 'v4l2subdev.h',
> > > +)
> > > +
> > > +install_headers(libmediactl_api, subdir: 'mediactl')
> > > +
> > > libmediactl_deps = [
> > > dep_libudev,
> > > ]
> > >
> > > -libmediactl = static_library('mediactl',
> > > - libmediactl_sources,
> > > - dependencies : libmediactl_deps,
> > > - include_directories : v4l2_utils_incdir)
> > > +libmediactl = library('mediactl',
> > > + libmediactl_sources,
> > > + soversion: '0',
> > > + version: '0.0.0',
> > > + install : true,
> > > + dependencies : libmediactl_deps,
> > > + include_directories : v4l2_utils_incdir)
> > >
> > > dep_libmediactl = declare_dependency(link_with : libmediactl)
> > >
> > > @@ -18,9 +28,13 @@ libv4l2subdev_sources = files('libv4l2subdev.c')
> > > libv4l2subdev_sources += media_bus_format_names_h
> > > libv4l2subdev_sources += media_bus_format_codes_h
> > >
> > > -libv4l2subdev = static_library('v4l2subdev',
> > > - libv4l2subdev_sources,
> > > - include_directories : v4l2_utils_incdir)
> > > +libv4l2subdev = library('v4l2subdev',
> > > + libv4l2subdev_sources,
> > > + soversion: '0',
> > > + version: '0.0.0',
> > > + install : true,
> > > + dependencies : dep_libmediactl,
> > > + include_directories : v4l2_utils_incdir)
> > >
> > > dep_libv4l2subdev = declare_dependency(link_with : libv4l2subdev)
> > >
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [v4l-utils] utils: media-ctl: Install media-ctl header and library files
2024-06-15 0:35 ` Laurent Pinchart
@ 2024-06-17 7:51 ` sakari.ailus
2024-06-17 8:38 ` Hans Verkuil
2024-06-17 9:07 ` Laurent Pinchart
0 siblings, 2 replies; 8+ messages in thread
From: sakari.ailus @ 2024-06-17 7:51 UTC (permalink / raw)
To: Laurent Pinchart
Cc: Gandhi, Neel, linux-media@vger.kernel.org, hverkuil@xs4all.nl,
Hatle, Mark, Allagadapa, Varunkumar, Sagar, Vishal
Hi Laurent,
On Sat, Jun 15, 2024 at 03:35:25AM +0300, Laurent Pinchart wrote:
> Hi Neel,
>
> On Fri, Jun 14, 2024 at 01:07:24PM +0000, Gandhi, Neel wrote:
> > Hi Laurent,
> >
> > Thank you for your quick response. Please see my below inline response.
> >
> > On Friday, June 14, 2024 3:35 PM, Laurent Pinchart wrote:
> > > On Fri, Jun 14, 2024 at 12:21:20PM +0530, Neel Gandhi wrote:
> > > > Install mediactl and v4l2subdev header and library files, which may be
> > > > required by 3rd party applications to populate and control v4l2subdev
> > > > device node tree
> > >
> > > We haven't done so because the API of those libraries is currently internal, and
> > > not guaranteed to be stable.
> >
> > So, if one's application is developed based on those libraries, then
> > is there any alternative solution for it?
>
> Good question. I personally have no issue with applications using those
> libraries, as long as they don't expect a stable API. This means that
> any future version of v4l-utils may ship incompatible libraries, and
> that won't be considered as a regression, and won't be addressed. If we
> want to go that way, I think we should install static versions of the
> libraries only, as dynamic linking will really be asking for trouble.
>
> A better option, of course, would be to offer a stable API. That will
> require work, the current API will need to be reviewed and improved to
> make sure we can then extend it in a backward-compatible way whenever
> the kernel APIs get extended. It's not work that I could commit to, so
> we would need a volunteer for work on that and then maintain the
> libraries.
>
> Hans, Sakari, any opinion ?
Given it's been around for a decade without much changes, it wouldn't seem
unreasonable to consider the API stable. A lot of projects copy the code in
verbatim which makes fixing bugs very hard. :-(
I think the API could be improved on and the library could use G_TOPOLOGY
IOCTL. Neither has happened but these don't much affect the value of the
librarisation.
I've already proposed making this a proper library previously and I still
believe it should be one.
>
> Neel, out of curiosity, what do you use those libraries for (if you can
> tell publicly) ?
>
> > As in the prior versions of v4l-utils package, those libraries are
> > available to use but it was removed from v1.25+ onwards (from meson
> > related changes in c2b91b9c3853b2cbcbe170a542864a3147d179ee commitID).
> > We're using yocto scarthgap, which is using v1.26.
> >
> > > > Signed-off-by: Neel Gandhi <neel.gandhi@amd.com>
> > > > ---
> > > > utils/media-ctl/meson.build | 28 +++++++++++++++++++++-------
> > > > 1 file changed, 21 insertions(+), 7 deletions(-)
> > > >
> > > > diff --git a/utils/media-ctl/meson.build b/utils/media-ctl/meson.build
> > > > index 3a7b0c9a..40669b4c 100644
> > > > --- a/utils/media-ctl/meson.build
> > > > +++ b/utils/media-ctl/meson.build
> > > > @@ -3,14 +3,24 @@ libmediactl_sources = files(
> > > > 'mediactl-priv.h',
> > > > )
> > > >
> > > > +libmediactl_api = files(
> > > > + 'mediactl.h',
> > > > + 'v4l2subdev.h',
> > > > +)
> > > > +
> > > > +install_headers(libmediactl_api, subdir: 'mediactl')
> > > > +
> > > > libmediactl_deps = [
> > > > dep_libudev,
> > > > ]
> > > >
> > > > -libmediactl = static_library('mediactl',
> > > > - libmediactl_sources,
> > > > - dependencies : libmediactl_deps,
> > > > - include_directories : v4l2_utils_incdir)
> > > > +libmediactl = library('mediactl',
> > > > + libmediactl_sources,
> > > > + soversion: '0',
> > > > + version: '0.0.0',
> > > > + install : true,
> > > > + dependencies : libmediactl_deps,
> > > > + include_directories : v4l2_utils_incdir)
> > > >
> > > > dep_libmediactl = declare_dependency(link_with : libmediactl)
> > > >
> > > > @@ -18,9 +28,13 @@ libv4l2subdev_sources = files('libv4l2subdev.c')
> > > > libv4l2subdev_sources += media_bus_format_names_h
> > > > libv4l2subdev_sources += media_bus_format_codes_h
> > > >
> > > > -libv4l2subdev = static_library('v4l2subdev',
> > > > - libv4l2subdev_sources,
> > > > - include_directories : v4l2_utils_incdir)
> > > > +libv4l2subdev = library('v4l2subdev',
> > > > + libv4l2subdev_sources,
> > > > + soversion: '0',
> > > > + version: '0.0.0',
> > > > + install : true,
> > > > + dependencies : dep_libmediactl,
> > > > + include_directories : v4l2_utils_incdir)
> > > >
> > > > dep_libv4l2subdev = declare_dependency(link_with : libv4l2subdev)
> > > >
>
--
Kind regards,
Sakari Ailus
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [v4l-utils] utils: media-ctl: Install media-ctl header and library files
2024-06-17 7:51 ` sakari.ailus
@ 2024-06-17 8:38 ` Hans Verkuil
2024-06-17 9:08 ` Laurent Pinchart
2024-06-17 9:07 ` Laurent Pinchart
1 sibling, 1 reply; 8+ messages in thread
From: Hans Verkuil @ 2024-06-17 8:38 UTC (permalink / raw)
To: sakari.ailus@iki.fi, Laurent Pinchart
Cc: Gandhi, Neel, linux-media@vger.kernel.org, Hatle, Mark,
Allagadapa, Varunkumar, Sagar, Vishal
On 17/06/2024 09:51, sakari.ailus@iki.fi wrote:
> Hi Laurent,
>
> On Sat, Jun 15, 2024 at 03:35:25AM +0300, Laurent Pinchart wrote:
>> Hi Neel,
>>
>> On Fri, Jun 14, 2024 at 01:07:24PM +0000, Gandhi, Neel wrote:
>>> Hi Laurent,
>>>
>>> Thank you for your quick response. Please see my below inline response.
>>>
>>> On Friday, June 14, 2024 3:35 PM, Laurent Pinchart wrote:
>>>> On Fri, Jun 14, 2024 at 12:21:20PM +0530, Neel Gandhi wrote:
>>>>> Install mediactl and v4l2subdev header and library files, which may be
>>>>> required by 3rd party applications to populate and control v4l2subdev
>>>>> device node tree
>>>>
>>>> We haven't done so because the API of those libraries is currently internal, and
>>>> not guaranteed to be stable.
>>>
>>> So, if one's application is developed based on those libraries, then
>>> is there any alternative solution for it?
>>
>> Good question. I personally have no issue with applications using those
>> libraries, as long as they don't expect a stable API. This means that
>> any future version of v4l-utils may ship incompatible libraries, and
>> that won't be considered as a regression, and won't be addressed. If we
>> want to go that way, I think we should install static versions of the
>> libraries only, as dynamic linking will really be asking for trouble.
>>
>> A better option, of course, would be to offer a stable API. That will
>> require work, the current API will need to be reviewed and improved to
>> make sure we can then extend it in a backward-compatible way whenever
>> the kernel APIs get extended. It's not work that I could commit to, so
>> we would need a volunteer for work on that and then maintain the
>> libraries.
>>
>> Hans, Sakari, any opinion ?
>
> Given it's been around for a decade without much changes, it wouldn't seem
> unreasonable to consider the API stable. A lot of projects copy the code in
> verbatim which makes fixing bugs very hard. :-(
>
> I think the API could be improved on and the library could use G_TOPOLOGY
> IOCTL. Neither has happened but these don't much affect the value of the
> librarisation.
>
> I've already proposed making this a proper library previously and I still
> believe it should be one.
I quickly looked at the API and I think it needs work before it is suitable
for a generic library API. It is was never meant as a public API.
Making it a proper library is a lot more work and needs someone to maintain
it. I'm not maintaining this code, so it is not up to me, but for what it is
worth, I would recommend against it.
Regards,
Hans
>
>>
>> Neel, out of curiosity, what do you use those libraries for (if you can
>> tell publicly) ?
>>
>>> As in the prior versions of v4l-utils package, those libraries are
>>> available to use but it was removed from v1.25+ onwards (from meson
>>> related changes in c2b91b9c3853b2cbcbe170a542864a3147d179ee commitID).
>>> We're using yocto scarthgap, which is using v1.26.
>>>
>>>>> Signed-off-by: Neel Gandhi <neel.gandhi@amd.com>
>>>>> ---
>>>>> utils/media-ctl/meson.build | 28 +++++++++++++++++++++-------
>>>>> 1 file changed, 21 insertions(+), 7 deletions(-)
>>>>>
>>>>> diff --git a/utils/media-ctl/meson.build b/utils/media-ctl/meson.build
>>>>> index 3a7b0c9a..40669b4c 100644
>>>>> --- a/utils/media-ctl/meson.build
>>>>> +++ b/utils/media-ctl/meson.build
>>>>> @@ -3,14 +3,24 @@ libmediactl_sources = files(
>>>>> 'mediactl-priv.h',
>>>>> )
>>>>>
>>>>> +libmediactl_api = files(
>>>>> + 'mediactl.h',
>>>>> + 'v4l2subdev.h',
>>>>> +)
>>>>> +
>>>>> +install_headers(libmediactl_api, subdir: 'mediactl')
>>>>> +
>>>>> libmediactl_deps = [
>>>>> dep_libudev,
>>>>> ]
>>>>>
>>>>> -libmediactl = static_library('mediactl',
>>>>> - libmediactl_sources,
>>>>> - dependencies : libmediactl_deps,
>>>>> - include_directories : v4l2_utils_incdir)
>>>>> +libmediactl = library('mediactl',
>>>>> + libmediactl_sources,
>>>>> + soversion: '0',
>>>>> + version: '0.0.0',
>>>>> + install : true,
>>>>> + dependencies : libmediactl_deps,
>>>>> + include_directories : v4l2_utils_incdir)
>>>>>
>>>>> dep_libmediactl = declare_dependency(link_with : libmediactl)
>>>>>
>>>>> @@ -18,9 +28,13 @@ libv4l2subdev_sources = files('libv4l2subdev.c')
>>>>> libv4l2subdev_sources += media_bus_format_names_h
>>>>> libv4l2subdev_sources += media_bus_format_codes_h
>>>>>
>>>>> -libv4l2subdev = static_library('v4l2subdev',
>>>>> - libv4l2subdev_sources,
>>>>> - include_directories : v4l2_utils_incdir)
>>>>> +libv4l2subdev = library('v4l2subdev',
>>>>> + libv4l2subdev_sources,
>>>>> + soversion: '0',
>>>>> + version: '0.0.0',
>>>>> + install : true,
>>>>> + dependencies : dep_libmediactl,
>>>>> + include_directories : v4l2_utils_incdir)
>>>>>
>>>>> dep_libv4l2subdev = declare_dependency(link_with : libv4l2subdev)
>>>>>
>>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [v4l-utils] utils: media-ctl: Install media-ctl header and library files
2024-06-17 7:51 ` sakari.ailus
2024-06-17 8:38 ` Hans Verkuil
@ 2024-06-17 9:07 ` Laurent Pinchart
1 sibling, 0 replies; 8+ messages in thread
From: Laurent Pinchart @ 2024-06-17 9:07 UTC (permalink / raw)
To: sakari.ailus@iki.fi
Cc: Gandhi, Neel, linux-media@vger.kernel.org, hverkuil@xs4all.nl,
Hatle, Mark, Allagadapa, Varunkumar, Sagar, Vishal
On Mon, Jun 17, 2024 at 07:51:52AM +0000, Sakari Ailus wrote:
> On Sat, Jun 15, 2024 at 03:35:25AM +0300, Laurent Pinchart wrote:
> > On Fri, Jun 14, 2024 at 01:07:24PM +0000, Gandhi, Neel wrote:
> > > Hi Laurent,
> > >
> > > Thank you for your quick response. Please see my below inline response.
> > >
> > > On Friday, June 14, 2024 3:35 PM, Laurent Pinchart wrote:
> > > > On Fri, Jun 14, 2024 at 12:21:20PM +0530, Neel Gandhi wrote:
> > > > > Install mediactl and v4l2subdev header and library files, which may be
> > > > > required by 3rd party applications to populate and control v4l2subdev
> > > > > device node tree
> > > >
> > > > We haven't done so because the API of those libraries is currently internal, and
> > > > not guaranteed to be stable.
> > >
> > > So, if one's application is developed based on those libraries, then
> > > is there any alternative solution for it?
> >
> > Good question. I personally have no issue with applications using those
> > libraries, as long as they don't expect a stable API. This means that
> > any future version of v4l-utils may ship incompatible libraries, and
> > that won't be considered as a regression, and won't be addressed. If we
> > want to go that way, I think we should install static versions of the
> > libraries only, as dynamic linking will really be asking for trouble.
> >
> > A better option, of course, would be to offer a stable API. That will
> > require work, the current API will need to be reviewed and improved to
> > make sure we can then extend it in a backward-compatible way whenever
> > the kernel APIs get extended. It's not work that I could commit to, so
> > we would need a volunteer for work on that and then maintain the
> > libraries.
> >
> > Hans, Sakari, any opinion ?
>
> Given it's been around for a decade without much changes, it wouldn't seem
> unreasonable to consider the API stable. A lot of projects copy the code in
> verbatim which makes fixing bugs very hard. :-(
Well, I've pushed API-breaking changes not later than last week :-)
Having to preserve the API would have been annoying.
> I think the API could be improved on and the library could use G_TOPOLOGY
> IOCTL. Neither has happened but these don't much affect the value of the
> librarisation.
>
> I've already proposed making this a proper library previously and I still
> believe it should be one.
I agree it would be nice. Someone would have to step up as a maintainer,
and start by desining the API in a way to would allow for future
extensions.
> > Neel, out of curiosity, what do you use those libraries for (if you can
> > tell publicly) ?
> >
> > > As in the prior versions of v4l-utils package, those libraries are
> > > available to use but it was removed from v1.25+ onwards (from meson
> > > related changes in c2b91b9c3853b2cbcbe170a542864a3147d179ee commitID).
> > > We're using yocto scarthgap, which is using v1.26.
> > >
> > > > > Signed-off-by: Neel Gandhi <neel.gandhi@amd.com>
> > > > > ---
> > > > > utils/media-ctl/meson.build | 28 +++++++++++++++++++++-------
> > > > > 1 file changed, 21 insertions(+), 7 deletions(-)
> > > > >
> > > > > diff --git a/utils/media-ctl/meson.build b/utils/media-ctl/meson.build
> > > > > index 3a7b0c9a..40669b4c 100644
> > > > > --- a/utils/media-ctl/meson.build
> > > > > +++ b/utils/media-ctl/meson.build
> > > > > @@ -3,14 +3,24 @@ libmediactl_sources = files(
> > > > > 'mediactl-priv.h',
> > > > > )
> > > > >
> > > > > +libmediactl_api = files(
> > > > > + 'mediactl.h',
> > > > > + 'v4l2subdev.h',
> > > > > +)
> > > > > +
> > > > > +install_headers(libmediactl_api, subdir: 'mediactl')
> > > > > +
> > > > > libmediactl_deps = [
> > > > > dep_libudev,
> > > > > ]
> > > > >
> > > > > -libmediactl = static_library('mediactl',
> > > > > - libmediactl_sources,
> > > > > - dependencies : libmediactl_deps,
> > > > > - include_directories : v4l2_utils_incdir)
> > > > > +libmediactl = library('mediactl',
> > > > > + libmediactl_sources,
> > > > > + soversion: '0',
> > > > > + version: '0.0.0',
> > > > > + install : true,
> > > > > + dependencies : libmediactl_deps,
> > > > > + include_directories : v4l2_utils_incdir)
> > > > >
> > > > > dep_libmediactl = declare_dependency(link_with : libmediactl)
> > > > >
> > > > > @@ -18,9 +28,13 @@ libv4l2subdev_sources = files('libv4l2subdev.c')
> > > > > libv4l2subdev_sources += media_bus_format_names_h
> > > > > libv4l2subdev_sources += media_bus_format_codes_h
> > > > >
> > > > > -libv4l2subdev = static_library('v4l2subdev',
> > > > > - libv4l2subdev_sources,
> > > > > - include_directories : v4l2_utils_incdir)
> > > > > +libv4l2subdev = library('v4l2subdev',
> > > > > + libv4l2subdev_sources,
> > > > > + soversion: '0',
> > > > > + version: '0.0.0',
> > > > > + install : true,
> > > > > + dependencies : dep_libmediactl,
> > > > > + include_directories : v4l2_utils_incdir)
> > > > >
> > > > > dep_libv4l2subdev = declare_dependency(link_with : libv4l2subdev)
> > > > >
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [v4l-utils] utils: media-ctl: Install media-ctl header and library files
2024-06-17 8:38 ` Hans Verkuil
@ 2024-06-17 9:08 ` Laurent Pinchart
0 siblings, 0 replies; 8+ messages in thread
From: Laurent Pinchart @ 2024-06-17 9:08 UTC (permalink / raw)
To: Hans Verkuil
Cc: sakari.ailus@iki.fi, Gandhi, Neel, linux-media@vger.kernel.org,
Hatle, Mark, Allagadapa, Varunkumar, Sagar, Vishal
On Mon, Jun 17, 2024 at 10:38:39AM +0200, Hans Verkuil wrote:
> On 17/06/2024 09:51, sakari.ailus@iki.fi wrote:
> > On Sat, Jun 15, 2024 at 03:35:25AM +0300, Laurent Pinchart wrote:
> >> On Fri, Jun 14, 2024 at 01:07:24PM +0000, Gandhi, Neel wrote:
> >>> Hi Laurent,
> >>>
> >>> Thank you for your quick response. Please see my below inline response.
> >>>
> >>> On Friday, June 14, 2024 3:35 PM, Laurent Pinchart wrote:
> >>>> On Fri, Jun 14, 2024 at 12:21:20PM +0530, Neel Gandhi wrote:
> >>>>> Install mediactl and v4l2subdev header and library files, which may be
> >>>>> required by 3rd party applications to populate and control v4l2subdev
> >>>>> device node tree
> >>>>
> >>>> We haven't done so because the API of those libraries is currently internal, and
> >>>> not guaranteed to be stable.
> >>>
> >>> So, if one's application is developed based on those libraries, then
> >>> is there any alternative solution for it?
> >>
> >> Good question. I personally have no issue with applications using those
> >> libraries, as long as they don't expect a stable API. This means that
> >> any future version of v4l-utils may ship incompatible libraries, and
> >> that won't be considered as a regression, and won't be addressed. If we
> >> want to go that way, I think we should install static versions of the
> >> libraries only, as dynamic linking will really be asking for trouble.
> >>
> >> A better option, of course, would be to offer a stable API. That will
> >> require work, the current API will need to be reviewed and improved to
> >> make sure we can then extend it in a backward-compatible way whenever
> >> the kernel APIs get extended. It's not work that I could commit to, so
> >> we would need a volunteer for work on that and then maintain the
> >> libraries.
> >>
> >> Hans, Sakari, any opinion ?
> >
> > Given it's been around for a decade without much changes, it wouldn't seem
> > unreasonable to consider the API stable. A lot of projects copy the code in
> > verbatim which makes fixing bugs very hard. :-(
> >
> > I think the API could be improved on and the library could use G_TOPOLOGY
> > IOCTL. Neither has happened but these don't much affect the value of the
> > librarisation.
> >
> > I've already proposed making this a proper library previously and I still
> > believe it should be one.
>
> I quickly looked at the API and I think it needs work before it is suitable
> for a generic library API. It is was never meant as a public API.
>
> Making it a proper library is a lot more work and needs someone to maintain
> it. I'm not maintaining this code, so it is not up to me, but for what it is
> worth, I would recommend against it.
I hack on that code occasionally when I need new features, but I'm not
sure that makes me a maintainer. In any case, I won't have time to turn
this into a public API in the near future. If someone wants to volunteer
to do that work, I could at least try to review the proposals.
> >> Neel, out of curiosity, what do you use those libraries for (if you can
> >> tell publicly) ?
> >>
> >>> As in the prior versions of v4l-utils package, those libraries are
> >>> available to use but it was removed from v1.25+ onwards (from meson
> >>> related changes in c2b91b9c3853b2cbcbe170a542864a3147d179ee commitID).
> >>> We're using yocto scarthgap, which is using v1.26.
> >>>
> >>>>> Signed-off-by: Neel Gandhi <neel.gandhi@amd.com>
> >>>>> ---
> >>>>> utils/media-ctl/meson.build | 28 +++++++++++++++++++++-------
> >>>>> 1 file changed, 21 insertions(+), 7 deletions(-)
> >>>>>
> >>>>> diff --git a/utils/media-ctl/meson.build b/utils/media-ctl/meson.build
> >>>>> index 3a7b0c9a..40669b4c 100644
> >>>>> --- a/utils/media-ctl/meson.build
> >>>>> +++ b/utils/media-ctl/meson.build
> >>>>> @@ -3,14 +3,24 @@ libmediactl_sources = files(
> >>>>> 'mediactl-priv.h',
> >>>>> )
> >>>>>
> >>>>> +libmediactl_api = files(
> >>>>> + 'mediactl.h',
> >>>>> + 'v4l2subdev.h',
> >>>>> +)
> >>>>> +
> >>>>> +install_headers(libmediactl_api, subdir: 'mediactl')
> >>>>> +
> >>>>> libmediactl_deps = [
> >>>>> dep_libudev,
> >>>>> ]
> >>>>>
> >>>>> -libmediactl = static_library('mediactl',
> >>>>> - libmediactl_sources,
> >>>>> - dependencies : libmediactl_deps,
> >>>>> - include_directories : v4l2_utils_incdir)
> >>>>> +libmediactl = library('mediactl',
> >>>>> + libmediactl_sources,
> >>>>> + soversion: '0',
> >>>>> + version: '0.0.0',
> >>>>> + install : true,
> >>>>> + dependencies : libmediactl_deps,
> >>>>> + include_directories : v4l2_utils_incdir)
> >>>>>
> >>>>> dep_libmediactl = declare_dependency(link_with : libmediactl)
> >>>>>
> >>>>> @@ -18,9 +28,13 @@ libv4l2subdev_sources = files('libv4l2subdev.c')
> >>>>> libv4l2subdev_sources += media_bus_format_names_h
> >>>>> libv4l2subdev_sources += media_bus_format_codes_h
> >>>>>
> >>>>> -libv4l2subdev = static_library('v4l2subdev',
> >>>>> - libv4l2subdev_sources,
> >>>>> - include_directories : v4l2_utils_incdir)
> >>>>> +libv4l2subdev = library('v4l2subdev',
> >>>>> + libv4l2subdev_sources,
> >>>>> + soversion: '0',
> >>>>> + version: '0.0.0',
> >>>>> + install : true,
> >>>>> + dependencies : dep_libmediactl,
> >>>>> + include_directories : v4l2_utils_incdir)
> >>>>>
> >>>>> dep_libv4l2subdev = declare_dependency(link_with : libv4l2subdev)
> >>>>>
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2024-06-17 9:09 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-14 6:51 [v4l-utils] utils: media-ctl: Install media-ctl header and library files Neel Gandhi
2024-06-14 10:04 ` Laurent Pinchart
2024-06-14 13:07 ` Gandhi, Neel
2024-06-15 0:35 ` Laurent Pinchart
2024-06-17 7:51 ` sakari.ailus
2024-06-17 8:38 ` Hans Verkuil
2024-06-17 9:08 ` Laurent Pinchart
2024-06-17 9:07 ` Laurent Pinchart
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox