* [Buildroot] [PATCH v8 1/7] package/opencv: add a choice for selecting gstreamer support
2015-07-05 9:40 [Buildroot] [PATCH v8 0/7] OpenCV bump Samuel Martin
@ 2015-07-05 9:40 ` Samuel Martin
2015-07-05 12:51 ` Thomas Petazzoni
2015-07-05 9:40 ` [Buildroot] [PATCH v8 2/7] package/opencv: add gstreamer-1.x support Samuel Martin
` (5 subsequent siblings)
6 siblings, 1 reply; 18+ messages in thread
From: Samuel Martin @ 2015-07-05 9:40 UTC (permalink / raw)
To: buildroot
OpenCV 3.0 support both gstreamer-0.10 and gstreamer-1.x, but only one
is used at the time.
This patch turns the gstreamer support into a choice, in order to prepare
adding the support for gstreamer-1 in a following patch.
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
changes v7->v8:
- fix depends on comments (Yann)
- fix help text (Yann)
- update a/r/t tags
changes v6->v7:
- move gstreamer comment inside the choice (Yann)
changes v5->v6:
- new patch
---
package/opencv/Config.in | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/package/opencv/Config.in b/package/opencv/Config.in
index 576f667..4838a0c 100644
--- a/package/opencv/Config.in
+++ b/package/opencv/Config.in
@@ -173,8 +173,14 @@ config BR2_PACKAGE_OPENCV_WITH_FFMPEG
help
Use ffmpeg from the target system.
+choice
+ prompt "gstreamer support"
+
+config BR2_PACKAGE_OPENCV_WITHOUT_GSTREAMER
+ bool "none"
+
config BR2_PACKAGE_OPENCV_WITH_GSTREAMER
- bool "gstreamer support"
+ bool "gstreamer-0.10"
depends on BR2_USE_MMU # gstreamer -> libglib2
depends on BR2_USE_WCHAR # gstreamer -> libglib2
depends on BR2_TOOLCHAIN_HAS_THREADS # gstreamer -> libglib2
@@ -182,10 +188,12 @@ config BR2_PACKAGE_OPENCV_WITH_GSTREAMER
select BR2_PACKAGE_GST_PLUGINS_BASE
select BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_APP
-comment "gstreamer support needs a toolchain w/ wchar, threads"
+comment "gstreamer-0.10 support needs a toolchain w/ wchar, threads"
depends on BR2_USE_MMU
depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS
+endchoice
+
config BR2_PACKAGE_OPENCV_WITH_GTK
bool "gtk support"
depends on BR2_PACKAGE_XORG7
--
2.4.5
^ permalink raw reply related [flat|nested] 18+ messages in thread* [Buildroot] [PATCH v8 1/7] package/opencv: add a choice for selecting gstreamer support
2015-07-05 9:40 ` [Buildroot] [PATCH v8 1/7] package/opencv: add a choice for selecting gstreamer support Samuel Martin
@ 2015-07-05 12:51 ` Thomas Petazzoni
0 siblings, 0 replies; 18+ messages in thread
From: Thomas Petazzoni @ 2015-07-05 12:51 UTC (permalink / raw)
To: buildroot
Dear Samuel Martin,
On Sun, 5 Jul 2015 11:40:23 +0200, Samuel Martin wrote:
> OpenCV 3.0 support both gstreamer-0.10 and gstreamer-1.x, but only one
> is used at the time.
>
> This patch turns the gstreamer support into a choice, in order to prepare
> adding the support for gstreamer-1 in a following patch.
>
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
>
> ---
> changes v7->v8:
> - fix depends on comments (Yann)
> - fix help text (Yann)
> - update a/r/t tags
Applied, thanks.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Buildroot] [PATCH v8 2/7] package/opencv: add gstreamer-1.x support
2015-07-05 9:40 [Buildroot] [PATCH v8 0/7] OpenCV bump Samuel Martin
2015-07-05 9:40 ` [Buildroot] [PATCH v8 1/7] package/opencv: add a choice for selecting gstreamer support Samuel Martin
@ 2015-07-05 9:40 ` Samuel Martin
2015-07-05 9:49 ` Yann E. MORIN
2015-07-05 12:51 ` Thomas Petazzoni
2015-07-05 9:40 ` [Buildroot] [PATCH v8 3/7] package/opencv: add a choice for selecting the gui toolkit Samuel Martin
` (4 subsequent siblings)
6 siblings, 2 replies; 18+ messages in thread
From: Samuel Martin @ 2015-07-05 9:40 UTC (permalink / raw)
To: buildroot
Starting with the 2.4.10 release, OpenCV supports both Gstreamer-0.10
and Gstreamer-1, but only one can be enabled at the same time (OpenCV
chooses Gstreamer-1 over Gstreamer-0.10 when both are available).
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Cc: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
changes v7->v8:
- fix depends on comments (Yann)
- fix help text (Yann)
- rework gst/gst1 if-block in opencv.mk (Yann)
changes v6->v7:
- move gstreamer1 comment inside the choice (Yann)
- remove extra endif in opencv.mk (catched by Yann)
changes v5->v6:
- rebase
- use a choice
changes v4->v5:
- rebase
- update a/r/t tags
- rework gst-X backend selection (use similar structure for qt)
- remove patch merged upstream
changes v3->v4:
- new patch
---
package/opencv/Config.in | 15 +++++++++++++++
package/opencv/opencv.mk | 11 +++++++++--
2 files changed, 24 insertions(+), 2 deletions(-)
diff --git a/package/opencv/Config.in b/package/opencv/Config.in
index 4838a0c..079730e 100644
--- a/package/opencv/Config.in
+++ b/package/opencv/Config.in
@@ -175,6 +175,8 @@ config BR2_PACKAGE_OPENCV_WITH_FFMPEG
choice
prompt "gstreamer support"
+ help
+ OpenCV prefers gstreamer-1 over gstreamer-0.10.
config BR2_PACKAGE_OPENCV_WITHOUT_GSTREAMER
bool "none"
@@ -192,6 +194,19 @@ comment "gstreamer-0.10 support needs a toolchain w/ wchar, threads"
depends on BR2_USE_MMU
depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS
+config BR2_PACKAGE_OPENCV_WITH_GSTREAMER1
+ bool "gstreamer-1.x"
+ depends on BR2_USE_MMU # gstreamer1 -> libglib2
+ depends on BR2_USE_WCHAR # gstreamer1 -> libglib2
+ depends on BR2_TOOLCHAIN_HAS_THREADS # gstreamer1 -> libglib2
+ select BR2_PACKAGE_GSTREAMER1
+ select BR2_PACKAGE_GST1_PLUGINS_BASE
+ select BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_APP
+
+comment "gstreamer-1.x support needs a toolchain w/ wchar, threads"
+ depends on BR2_USE_MMU
+ depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS
+
endchoice
config BR2_PACKAGE_OPENCV_WITH_GTK
diff --git a/package/opencv/opencv.mk b/package/opencv/opencv.mk
index 633c2bf..0e5cf77 100644
--- a/package/opencv/opencv.mk
+++ b/package/opencv/opencv.mk
@@ -223,10 +223,17 @@ OPENCV_CONF_OPTS += -DWITH_FFMPEG=OFF
endif
ifeq ($(BR2_PACKAGE_OPENCV_WITH_GSTREAMER),y)
-OPENCV_CONF_OPTS += -DWITH_GSTREAMER=ON -DWITH_GSTREAMER_0_10=ON
+OPENCV_CONF_OPTS += -DWITH_GSTREAMER_0_10=ON
OPENCV_DEPENDENCIES += gstreamer gst-plugins-base
else
-OPENCV_CONF_OPTS += -DWITH_GSTREAMER=OFF -DWITH_GSTREAMER_0_10=OFF
+OPENCV_CONF_OPTS += -DWITH_GSTREAMER_0_10=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_OPENCV_WITH_GSTREAMER1),y)
+OPENCV_CONF_OPTS += -DWITH_GSTREAMER=ON
+OPENCV_DEPENDENCIES += gstreamer1 gst1-plugins-base
+else
+OPENCV_CONF_OPTS += -DWITH_GSTREAMER=OFF
endif
ifeq ($(BR2_PACKAGE_OPENCV_WITH_GTK),y)
--
2.4.5
^ permalink raw reply related [flat|nested] 18+ messages in thread* [Buildroot] [PATCH v8 2/7] package/opencv: add gstreamer-1.x support
2015-07-05 9:40 ` [Buildroot] [PATCH v8 2/7] package/opencv: add gstreamer-1.x support Samuel Martin
@ 2015-07-05 9:49 ` Yann E. MORIN
2015-07-05 12:51 ` Thomas Petazzoni
1 sibling, 0 replies; 18+ messages in thread
From: Yann E. MORIN @ 2015-07-05 9:49 UTC (permalink / raw)
To: buildroot
Samuel, All,
On 2015-07-05 11:40 +0200, Samuel Martin spake thusly:
> Starting with the 2.4.10 release, OpenCV supports both Gstreamer-0.10
> and Gstreamer-1, but only one can be enabled at the same time (OpenCV
> chooses Gstreamer-1 over Gstreamer-0.10 when both are available).
>
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
> Cc: "Yann E. MORIN" <yann.morin.1998@free.fr>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Regards,
Yann E. MORIN.
> ---
> changes v7->v8:
> - fix depends on comments (Yann)
> - fix help text (Yann)
> - rework gst/gst1 if-block in opencv.mk (Yann)
>
> changes v6->v7:
> - move gstreamer1 comment inside the choice (Yann)
> - remove extra endif in opencv.mk (catched by Yann)
>
> changes v5->v6:
> - rebase
> - use a choice
>
> changes v4->v5:
> - rebase
> - update a/r/t tags
> - rework gst-X backend selection (use similar structure for qt)
> - remove patch merged upstream
>
> changes v3->v4:
> - new patch
> ---
> package/opencv/Config.in | 15 +++++++++++++++
> package/opencv/opencv.mk | 11 +++++++++--
> 2 files changed, 24 insertions(+), 2 deletions(-)
>
> diff --git a/package/opencv/Config.in b/package/opencv/Config.in
> index 4838a0c..079730e 100644
> --- a/package/opencv/Config.in
> +++ b/package/opencv/Config.in
> @@ -175,6 +175,8 @@ config BR2_PACKAGE_OPENCV_WITH_FFMPEG
>
> choice
> prompt "gstreamer support"
> + help
> + OpenCV prefers gstreamer-1 over gstreamer-0.10.
>
> config BR2_PACKAGE_OPENCV_WITHOUT_GSTREAMER
> bool "none"
> @@ -192,6 +194,19 @@ comment "gstreamer-0.10 support needs a toolchain w/ wchar, threads"
> depends on BR2_USE_MMU
> depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS
>
> +config BR2_PACKAGE_OPENCV_WITH_GSTREAMER1
> + bool "gstreamer-1.x"
> + depends on BR2_USE_MMU # gstreamer1 -> libglib2
> + depends on BR2_USE_WCHAR # gstreamer1 -> libglib2
> + depends on BR2_TOOLCHAIN_HAS_THREADS # gstreamer1 -> libglib2
> + select BR2_PACKAGE_GSTREAMER1
> + select BR2_PACKAGE_GST1_PLUGINS_BASE
> + select BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_APP
> +
> +comment "gstreamer-1.x support needs a toolchain w/ wchar, threads"
> + depends on BR2_USE_MMU
> + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS
> +
> endchoice
>
> config BR2_PACKAGE_OPENCV_WITH_GTK
> diff --git a/package/opencv/opencv.mk b/package/opencv/opencv.mk
> index 633c2bf..0e5cf77 100644
> --- a/package/opencv/opencv.mk
> +++ b/package/opencv/opencv.mk
> @@ -223,10 +223,17 @@ OPENCV_CONF_OPTS += -DWITH_FFMPEG=OFF
> endif
>
> ifeq ($(BR2_PACKAGE_OPENCV_WITH_GSTREAMER),y)
> -OPENCV_CONF_OPTS += -DWITH_GSTREAMER=ON -DWITH_GSTREAMER_0_10=ON
> +OPENCV_CONF_OPTS += -DWITH_GSTREAMER_0_10=ON
> OPENCV_DEPENDENCIES += gstreamer gst-plugins-base
> else
> -OPENCV_CONF_OPTS += -DWITH_GSTREAMER=OFF -DWITH_GSTREAMER_0_10=OFF
> +OPENCV_CONF_OPTS += -DWITH_GSTREAMER_0_10=OFF
> +endif
> +
> +ifeq ($(BR2_PACKAGE_OPENCV_WITH_GSTREAMER1),y)
> +OPENCV_CONF_OPTS += -DWITH_GSTREAMER=ON
> +OPENCV_DEPENDENCIES += gstreamer1 gst1-plugins-base
> +else
> +OPENCV_CONF_OPTS += -DWITH_GSTREAMER=OFF
> endif
>
> ifeq ($(BR2_PACKAGE_OPENCV_WITH_GTK),y)
> --
> 2.4.5
>
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Buildroot] [PATCH v8 2/7] package/opencv: add gstreamer-1.x support
2015-07-05 9:40 ` [Buildroot] [PATCH v8 2/7] package/opencv: add gstreamer-1.x support Samuel Martin
2015-07-05 9:49 ` Yann E. MORIN
@ 2015-07-05 12:51 ` Thomas Petazzoni
1 sibling, 0 replies; 18+ messages in thread
From: Thomas Petazzoni @ 2015-07-05 12:51 UTC (permalink / raw)
To: buildroot
Dear Samuel Martin,
On Sun, 5 Jul 2015 11:40:24 +0200, Samuel Martin wrote:
> Starting with the 2.4.10 release, OpenCV supports both Gstreamer-0.10
> and Gstreamer-1, but only one can be enabled at the same time (OpenCV
> chooses Gstreamer-1 over Gstreamer-0.10 when both are available).
>
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
> Cc: "Yann E. MORIN" <yann.morin.1998@free.fr>
>
> ---
> changes v7->v8:
> - fix depends on comments (Yann)
> - fix help text (Yann)
> - rework gst/gst1 if-block in opencv.mk (Yann)
Applied, thanks.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Buildroot] [PATCH v8 3/7] package/opencv: add a choice for selecting the gui toolkit
2015-07-05 9:40 [Buildroot] [PATCH v8 0/7] OpenCV bump Samuel Martin
2015-07-05 9:40 ` [Buildroot] [PATCH v8 1/7] package/opencv: add a choice for selecting gstreamer support Samuel Martin
2015-07-05 9:40 ` [Buildroot] [PATCH v8 2/7] package/opencv: add gstreamer-1.x support Samuel Martin
@ 2015-07-05 9:40 ` Samuel Martin
2015-07-05 12:53 ` Thomas Petazzoni
2015-07-05 9:40 ` [Buildroot] [PATCH v8 4/7] package/opencv: add qt5 support Samuel Martin
` (3 subsequent siblings)
6 siblings, 1 reply; 18+ messages in thread
From: Samuel Martin @ 2015-07-05 9:40 UTC (permalink / raw)
To: buildroot
This patch moves the existing Qt4 and gtk2 options in that choice right
after the highgui knob.
In OpenCV, only one GUI toolkik will be actually used at the time by the
highgui module, given priority to Qt4.
Suggested-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
changes v7->v8:
- update a/r/t tags
changes v6->v7:
- move choice right after highgui knob (Yann)
- reword help text and comment (Yann)
changes v5->v6:
- new patch
---
package/opencv/Config.in | 76 +++++++++++++++++++++++++++++++++---------------
1 file changed, 53 insertions(+), 23 deletions(-)
diff --git a/package/opencv/Config.in b/package/opencv/Config.in
index 079730e..d317603 100644
--- a/package/opencv/Config.in
+++ b/package/opencv/Config.in
@@ -52,6 +52,59 @@ config BR2_PACKAGE_OPENCV_LIB_HIGHGUI
Include opencv_highgui (high-level gui and media i/o) module into the
OpenCV build.
+choice
+ prompt "gui toolkit"
+ depends on BR2_PACKAGE_OPENCV_LIB_HIGHGUI
+ help
+ GUI toolkit for opencv_highgui module.
+
+ The best toolkit to work with OpenCV are, in decreasing order of
+ preference by the OpenCV build system):
+ - Qt4
+ - gtk2
+
+ Note that, whatever you choose here will be used by OpenCV, even
+ if you also enabled a more preferred toolkit in your Buildroot
+ configuration.
+
+config BR2_PACKAGE_OPENCV_GUI_NONE
+ bool "none"
+
+config BR2_PACKAGE_OPENCV_WITH_GTK
+ bool "gtk2"
+ depends on BR2_ARCH_HAS_ATOMICS # libgtk2 -> cairo
+ depends on BR2_USE_MMU # libgtk2 -> libglib2
+ depends on BR2_USE_WCHAR # libgtk2 -> libglib2
+ depends on BR2_TOOLCHAIN_HAS_THREADS # libgtk2 -> libglib2
+ depends on BR2_INSTALL_LIBSTDCPP
+ depends on BR2_PACKAGE_XORG7
+ select BR2_PACKAGE_LIBGTK2
+
+comment "gtk2 needs X.org and a toolchain w/ wchar, threads, C++"
+ depends on BR2_USE_MMU # libgtk2 -> glib2
+ depends on BR2_ARCH_HAS_ATOMICS # libgtk2 -> cairo
+ depends on !BR2_PACKAGE_XORG7 || \
+ !BR2_USE_WCHAR || \
+ !BR2_TOOLCHAIN_HAS_THREADS || \
+ !BR2_INSTALL_LIBSTDCPP
+
+config BR2_PACKAGE_OPENCV_WITH_QT
+ bool "qt4"
+ depends on BR2_INSTALL_LIBSTDCPP
+ depends on BR2_USE_MMU # qt
+ select BR2_PACKAGE_QT
+ select BR2_PACKAGE_QT_STL
+ select BR2_PACKAGE_QT_GUI_MODULE
+ select BR2_PACKAGE_QT_TEST
+ help
+ Use Qt with QtTest module and STL support
+
+comment "qt4 needs a toolchain w/ C++"
+ depends on BR2_USE_MMU # qt
+ depends on !BR2_INSTALL_LIBSTDCPP
+
+endchoice
+
config BR2_PACKAGE_OPENCV_LIB_IMGCODECS
bool "imgcodecs"
select BR2_PACKAGE_OPENCV_LIB_IMGPROC
@@ -209,17 +262,6 @@ comment "gstreamer-1.x support needs a toolchain w/ wchar, threads"
endchoice
-config BR2_PACKAGE_OPENCV_WITH_GTK
- bool "gtk support"
- depends on BR2_PACKAGE_XORG7
- depends on BR2_USE_WCHAR # libgtk2 -> libglib2
- depends on BR2_TOOLCHAIN_HAS_THREADS # libgtk2 -> libglib2
- depends on BR2_INSTALL_LIBSTDCPP
- depends on BR2_USE_MMU # libgtk2 -> glib2
- depends on BR2_ARCH_HAS_ATOMICS # libgtk2 -> cairo
- depends on BR2_PACKAGE_OPENCV_LIB_HIGHGUI
- select BR2_PACKAGE_LIBGTK2
-
config BR2_PACKAGE_OPENCV_WITH_JASPER
bool "jpeg2000 support"
select BR2_PACKAGE_JASPER
@@ -242,18 +284,6 @@ config BR2_PACKAGE_OPENCV_WITH_PNG
help
Use shared libpng from the target system.
-config BR2_PACKAGE_OPENCV_WITH_QT
- bool "qt backend support"
- depends on BR2_INSTALL_LIBSTDCPP
- depends on BR2_USE_MMU # qt
- depends on BR2_PACKAGE_OPENCV_LIB_HIGHGUI
- select BR2_PACKAGE_QT
- select BR2_PACKAGE_QT_STL
- select BR2_PACKAGE_QT_GUI_MODULE
- select BR2_PACKAGE_QT_TEST
- help
- Use Qt with QtTest module and STL support
-
config BR2_PACKAGE_OPENCV_WITH_TIFF
bool "tiff support"
select BR2_PACKAGE_TIFF
--
2.4.5
^ permalink raw reply related [flat|nested] 18+ messages in thread* [Buildroot] [PATCH v8 3/7] package/opencv: add a choice for selecting the gui toolkit
2015-07-05 9:40 ` [Buildroot] [PATCH v8 3/7] package/opencv: add a choice for selecting the gui toolkit Samuel Martin
@ 2015-07-05 12:53 ` Thomas Petazzoni
2015-07-05 12:56 ` Samuel Martin
0 siblings, 1 reply; 18+ messages in thread
From: Thomas Petazzoni @ 2015-07-05 12:53 UTC (permalink / raw)
To: buildroot
Dear Samuel Martin,
On Sun, 5 Jul 2015 11:40:25 +0200, Samuel Martin wrote:
> +choice
> + prompt "gui toolkit"
> + depends on BR2_PACKAGE_OPENCV_LIB_HIGHGUI
> + help
> + GUI toolkit for opencv_highgui module.
> +
> + The best toolkit to work with OpenCV are, in decreasing order of
> + preference by the OpenCV build system):
> + - Qt4
> + - gtk2
> +
> + Note that, whatever you choose here will be used by OpenCV, even
> + if you also enabled a more preferred toolkit in your Buildroot
> + configuration.
This comment really doesn't make sense. Why do we care about the
preferred order of OpenCV for GUI toolkit, since we are anyway
overriding it by the below options? Why don't you simply have:
help
GUI toolkit to be used by the opencv_highgui module.
The additional comments about the preferred order by OpenCV build
system are simply confusing and useless, IMO. If you agree, I can apply
this patch after reworking the comment.
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Buildroot] [PATCH v8 3/7] package/opencv: add a choice for selecting the gui toolkit
2015-07-05 12:53 ` Thomas Petazzoni
@ 2015-07-05 12:56 ` Samuel Martin
0 siblings, 0 replies; 18+ messages in thread
From: Samuel Martin @ 2015-07-05 12:56 UTC (permalink / raw)
To: buildroot
Thomas,
On Sun, Jul 5, 2015 at 2:53 PM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Dear Samuel Martin,
>
> On Sun, 5 Jul 2015 11:40:25 +0200, Samuel Martin wrote:
>
>> +choice
>> + prompt "gui toolkit"
>> + depends on BR2_PACKAGE_OPENCV_LIB_HIGHGUI
>> + help
>> + GUI toolkit for opencv_highgui module.
>> +
>> + The best toolkit to work with OpenCV are, in decreasing order of
>> + preference by the OpenCV build system):
>> + - Qt4
>> + - gtk2
>> +
>> + Note that, whatever you choose here will be used by OpenCV, even
>> + if you also enabled a more preferred toolkit in your Buildroot
>> + configuration.
>
> This comment really doesn't make sense. Why do we care about the
> preferred order of OpenCV for GUI toolkit, since we are anyway
> overriding it by the below options? Why don't you simply have:
>
> help
> GUI toolkit to be used by the opencv_highgui module.
>
> The additional comments about the preferred order by OpenCV build
> system are simply confusing and useless, IMO. If you agree, I can apply
> this patch after reworking the comment.
>
I'm fine with this.
Thanks,
--
Samuel
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Buildroot] [PATCH v8 4/7] package/opencv: add qt5 support
2015-07-05 9:40 [Buildroot] [PATCH v8 0/7] OpenCV bump Samuel Martin
` (2 preceding siblings ...)
2015-07-05 9:40 ` [Buildroot] [PATCH v8 3/7] package/opencv: add a choice for selecting the gui toolkit Samuel Martin
@ 2015-07-05 9:40 ` Samuel Martin
2015-07-05 12:57 ` Thomas Petazzoni
2015-07-05 9:40 ` [Buildroot] [PATCH v8 5/7] package/opencv: add gtk3 support Samuel Martin
` (2 subsequent siblings)
6 siblings, 1 reply; 18+ messages in thread
From: Samuel Martin @ 2015-07-05 9:40 UTC (permalink / raw)
To: buildroot
Starting with the 2.4.6 release, OpenCV supports both Qt4 and Qt5 as GUI
toolkit, but only one can be enabled at the same time.
Since Buildroot does not support Qt4/Qt5 co-existence, we make the Qt4
knob depend on BR2_PACKAGE_QT5.
Note that we usually use 'select ...' to express the dependencies
between packages, but in this case, we cannot since the Qt4/Qt5
co-existence exclusion is not handled by a simple choice, but by some
extra dependencies in the choice entries. This makes impossible using
'select ...' for the Qt support knob without triggering a circular
dependency at the kconfig level.
Besides, we already use 'depends on ...' to express the dependencies
with some "big" packages (like xorg or libgtk2). qt or qt5* packages
are fairly big. So, I don't think it will hurt that much to use a
'depends on ...' statement in this case.
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Cc: "Yann E. MORIN" <yann.morin.1998@free.fr>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
changes v7->v8:
- update a/r/t tags
changes v6->v7:
- fix depends on statements and comments (Yann)
changes v5->v6:
- bury BR2_avr32 remains (Yann)
- move knob in a choice (Yann)
- reword commit log
changes v4->v5:
- rebase
changes v3->v4:
- rebase
- rename _OPT -> _OPTS options
- rework qt backend selection (Yann)
changes v2->v3:
- rebase
- remove duplicate qt/qt5 dependencies (Yann)
- add missing 'depends on' to the comment about qt4
changes v1->v2:
- rebase
- update threads support dependency for qt5
---
package/opencv/Config.in | 31 +++++++++++++++++++++++++------
package/opencv/opencv.mk | 11 +++++++++--
2 files changed, 34 insertions(+), 8 deletions(-)
diff --git a/package/opencv/Config.in b/package/opencv/Config.in
index d317603..15f68a2 100644
--- a/package/opencv/Config.in
+++ b/package/opencv/Config.in
@@ -60,6 +60,7 @@ choice
The best toolkit to work with OpenCV are, in decreasing order of
preference by the OpenCV build system):
+ - Qt5
- Qt4
- gtk2
@@ -90,18 +91,36 @@ comment "gtk2 needs X.org and a toolchain w/ wchar, threads, C++"
config BR2_PACKAGE_OPENCV_WITH_QT
bool "qt4"
- depends on BR2_INSTALL_LIBSTDCPP
- depends on BR2_USE_MMU # qt
- select BR2_PACKAGE_QT
+ depends on BR2_PACKAGE_QT
select BR2_PACKAGE_QT_STL
select BR2_PACKAGE_QT_GUI_MODULE
select BR2_PACKAGE_QT_TEST
help
- Use Qt with QtTest module and STL support
+ Use Qt4 with QtTest and QtGui modules and STL support, as GUI toolkit.
+
+# no need for a comment about qt availability WRT the toolchain dependencies
+# because they are included in the opencv's ones, so already met.
-comment "qt4 needs a toolchain w/ C++"
+comment "qt4 support needs qt"
depends on BR2_USE_MMU # qt
- depends on !BR2_INSTALL_LIBSTDCPP
+ depends on !BR2_PACKAGE_QT && !BR2_PACKAGE_QT5
+
+config BR2_PACKAGE_OPENCV_WITH_QT5
+ bool "qt5"
+ depends on BR2_PACKAGE_QT5
+ select BR2_PACKAGE_QT5BASE
+ select BR2_PACKAGE_QT5BASE_CONCURRENT
+ select BR2_PACKAGE_QT5BASE_GUI
+ select BR2_PACKAGE_QT5BASE_WIDGETS
+ help
+ Use Qt5 with base, concurrent, test, gui and widgets components, as GUI
+ toolkit.
+
+# no need for a comment about qt5 availability WRT the toolchain dependencies
+# because they are included in the opencv's ones, so already met.
+
+comment "qt5 support needs qt5"
+ depends on !BR2_PACKAGE_QT && !BR2_PACKAGE_QT5
endchoice
diff --git a/package/opencv/opencv.mk b/package/opencv/opencv.mk
index 0e5cf77..98e1614 100644
--- a/package/opencv/opencv.mk
+++ b/package/opencv/opencv.mk
@@ -266,11 +266,18 @@ else
OPENCV_CONF_OPTS += -DWITH_PNG=OFF
endif
+ifeq ($(BR2_PACKAGE_OPENCV_WITH_QT)$(BR2_PACKAGE_OPENCV_WITH_QT5),)
+OPENCV_CONF_OPTS += -DWITH_QT=OFF
+endif
+
ifeq ($(BR2_PACKAGE_OPENCV_WITH_QT),y)
OPENCV_CONF_OPTS += -DWITH_QT=4
OPENCV_DEPENDENCIES += qt
-else
-OPENCV_CONF_OPTS += -DWITH_QT=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_OPENCV_WITH_QT5),y)
+OPENCV_CONF_OPTS += -DWITH_QT=5
+OPENCV_DEPENDENCIES += qt5base
endif
ifeq ($(BR2_PACKAGE_OPENCV_WITH_TIFF),y)
--
2.4.5
^ permalink raw reply related [flat|nested] 18+ messages in thread* [Buildroot] [PATCH v8 4/7] package/opencv: add qt5 support
2015-07-05 9:40 ` [Buildroot] [PATCH v8 4/7] package/opencv: add qt5 support Samuel Martin
@ 2015-07-05 12:57 ` Thomas Petazzoni
2015-07-05 13:01 ` Samuel Martin
0 siblings, 1 reply; 18+ messages in thread
From: Thomas Petazzoni @ 2015-07-05 12:57 UTC (permalink / raw)
To: buildroot
Dear Samuel Martin,
On Sun, 5 Jul 2015 11:40:26 +0200, Samuel Martin wrote:
> Starting with the 2.4.6 release, OpenCV supports both Qt4 and Qt5 as GUI
> toolkit, but only one can be enabled at the same time.
>
> Since Buildroot does not support Qt4/Qt5 co-existence, we make the Qt4
> knob depend on BR2_PACKAGE_QT5.
>
> Note that we usually use 'select ...' to express the dependencies
> between packages, but in this case, we cannot since the Qt4/Qt5
> co-existence exclusion is not handled by a simple choice, but by some
> extra dependencies in the choice entries. This makes impossible using
> 'select ...' for the Qt support knob without triggering a circular
> dependency at the kconfig level.
Sorry, but parse error here. Since there's a choice between Qt4 and Qt5
in OpenCV, what is the problem?
> Besides, we already use 'depends on ...' to express the dependencies
> with some "big" packages (like xorg or libgtk2). qt or qt5* packages
> are fairly big. So, I don't think it will hurt that much to use a
> 'depends on ...' statement in this case.
Fair enough with using 'depends on', however if you do it for Qt4 and
Qt5, please also do it for libgtk2: instead of doing a select
BR2_PACKAGE_LIBGTK2, do a 'depends on'.
> diff --git a/package/opencv/Config.in b/package/opencv/Config.in
> index d317603..15f68a2 100644
> --- a/package/opencv/Config.in
> +++ b/package/opencv/Config.in
> @@ -60,6 +60,7 @@ choice
>
> The best toolkit to work with OpenCV are, in decreasing order of
> preference by the OpenCV build system):
> + - Qt5
> - Qt4
> - gtk2
>
> @@ -90,18 +91,36 @@ comment "gtk2 needs X.org and a toolchain w/ wchar, threads, C++"
>
> config BR2_PACKAGE_OPENCV_WITH_QT
> bool "qt4"
> - depends on BR2_INSTALL_LIBSTDCPP
> - depends on BR2_USE_MMU # qt
> - select BR2_PACKAGE_QT
> + depends on BR2_PACKAGE_QT
> select BR2_PACKAGE_QT_STL
> select BR2_PACKAGE_QT_GUI_MODULE
> select BR2_PACKAGE_QT_TEST
> help
> - Use Qt with QtTest module and STL support
> + Use Qt4 with QtTest and QtGui modules and STL support, as GUI toolkit.
> +
> +# no need for a comment about qt availability WRT the toolchain dependencies
> +# because they are included in the opencv's ones, so already met.
Why do we have this comment here? We have a "depends on" Qt and not a
"select", so we anyway don't need to replicate the toolchain
dependencies.
>
> -comment "qt4 needs a toolchain w/ C++"
> +comment "qt4 support needs qt"
> depends on BR2_USE_MMU # qt
> - depends on !BR2_INSTALL_LIBSTDCPP
> + depends on !BR2_PACKAGE_QT && !BR2_PACKAGE_QT5
Why !qt && !qt5 ?
Just do depends on !qt. Remember, you are inside a choice, so anyway the
user can only select *either* qt4 *or* qt5.
> +config BR2_PACKAGE_OPENCV_WITH_QT5
> + bool "qt5"
> + depends on BR2_PACKAGE_QT5
> + select BR2_PACKAGE_QT5BASE
> + select BR2_PACKAGE_QT5BASE_CONCURRENT
> + select BR2_PACKAGE_QT5BASE_GUI
> + select BR2_PACKAGE_QT5BASE_WIDGETS
> + help
> + Use Qt5 with base, concurrent, test, gui and widgets components, as GUI
> + toolkit.
> +
> +# no need for a comment about qt5 availability WRT the toolchain dependencies
> +# because they are included in the opencv's ones, so already met.
> +
> +comment "qt5 support needs qt5"
> + depends on !BR2_PACKAGE_QT && !BR2_PACKAGE_QT5
Same comment as above.
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Buildroot] [PATCH v8 4/7] package/opencv: add qt5 support
2015-07-05 12:57 ` Thomas Petazzoni
@ 2015-07-05 13:01 ` Samuel Martin
2015-07-05 13:33 ` Thomas Petazzoni
0 siblings, 1 reply; 18+ messages in thread
From: Samuel Martin @ 2015-07-05 13:01 UTC (permalink / raw)
To: buildroot
Thomas,
On Sun, Jul 5, 2015 at 2:57 PM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Dear Samuel Martin,
>
> On Sun, 5 Jul 2015 11:40:26 +0200, Samuel Martin wrote:
>> Starting with the 2.4.6 release, OpenCV supports both Qt4 and Qt5 as GUI
>> toolkit, but only one can be enabled at the same time.
>>
>> Since Buildroot does not support Qt4/Qt5 co-existence, we make the Qt4
>> knob depend on BR2_PACKAGE_QT5.
>>
>> Note that we usually use 'select ...' to express the dependencies
>> between packages, but in this case, we cannot since the Qt4/Qt5
>> co-existence exclusion is not handled by a simple choice, but by some
>> extra dependencies in the choice entries. This makes impossible using
>> 'select ...' for the Qt support knob without triggering a circular
>> dependency at the kconfig level.
>
> Sorry, but parse error here. Since there's a choice between Qt4 and Qt5
> in OpenCV, what is the problem?
>
>> Besides, we already use 'depends on ...' to express the dependencies
>> with some "big" packages (like xorg or libgtk2). qt or qt5* packages
>> are fairly big. So, I don't think it will hurt that much to use a
>> 'depends on ...' statement in this case.
>
> Fair enough with using 'depends on', however if you do it for Qt4 and
> Qt5, please also do it for libgtk2: instead of doing a select
> BR2_PACKAGE_LIBGTK2, do a 'depends on'.
>
>
>> diff --git a/package/opencv/Config.in b/package/opencv/Config.in
>> index d317603..15f68a2 100644
>> --- a/package/opencv/Config.in
>> +++ b/package/opencv/Config.in
>> @@ -60,6 +60,7 @@ choice
>>
>> The best toolkit to work with OpenCV are, in decreasing order of
>> preference by the OpenCV build system):
>> + - Qt5
>> - Qt4
>> - gtk2
>>
>> @@ -90,18 +91,36 @@ comment "gtk2 needs X.org and a toolchain w/ wchar, threads, C++"
>>
>> config BR2_PACKAGE_OPENCV_WITH_QT
>> bool "qt4"
>> - depends on BR2_INSTALL_LIBSTDCPP
>> - depends on BR2_USE_MMU # qt
>> - select BR2_PACKAGE_QT
>> + depends on BR2_PACKAGE_QT
>> select BR2_PACKAGE_QT_STL
>> select BR2_PACKAGE_QT_GUI_MODULE
>> select BR2_PACKAGE_QT_TEST
>> help
>> - Use Qt with QtTest module and STL support
>> + Use Qt4 with QtTest and QtGui modules and STL support, as GUI toolkit.
>> +
>> +# no need for a comment about qt availability WRT the toolchain dependencies
>> +# because they are included in the opencv's ones, so already met.
>
> Why do we have this comment here? We have a "depends on" Qt and not a
> "select", so we anyway don't need to replicate the toolchain
> dependencies.
>
>>
>> -comment "qt4 needs a toolchain w/ C++"
>> +comment "qt4 support needs qt"
>> depends on BR2_USE_MMU # qt
>> - depends on !BR2_INSTALL_LIBSTDCPP
>> + depends on !BR2_PACKAGE_QT && !BR2_PACKAGE_QT5
>
> Why !qt && !qt5 ?
>
> Just do depends on !qt. Remember, you are inside a choice, so anyway the
> user can only select *either* qt4 *or* qt5.
Because in BR, we don't support both qt4 and qt5 enabled at the same time.
So if Qt5 is already enabled in the package selection, this comment
should not be visible; hence the !qt5
>
>> +config BR2_PACKAGE_OPENCV_WITH_QT5
>> + bool "qt5"
>> + depends on BR2_PACKAGE_QT5
>> + select BR2_PACKAGE_QT5BASE
>> + select BR2_PACKAGE_QT5BASE_CONCURRENT
>> + select BR2_PACKAGE_QT5BASE_GUI
>> + select BR2_PACKAGE_QT5BASE_WIDGETS
>> + help
>> + Use Qt5 with base, concurrent, test, gui and widgets components, as GUI
>> + toolkit.
>> +
>> +# no need for a comment about qt5 availability WRT the toolchain dependencies
>> +# because they are included in the opencv's ones, so already met.
>> +
>> +comment "qt5 support needs qt5"
>> + depends on !BR2_PACKAGE_QT && !BR2_PACKAGE_QT5
>
> Same comment as above.
Same reason ;-)
>
> Thanks,
>
> Thomas
> --
> Thomas Petazzoni, CTO, Free Electrons
> Embedded Linux, Kernel and Android engineering
> http://free-electrons.com
--
Samuel
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Buildroot] [PATCH v8 4/7] package/opencv: add qt5 support
2015-07-05 13:01 ` Samuel Martin
@ 2015-07-05 13:33 ` Thomas Petazzoni
0 siblings, 0 replies; 18+ messages in thread
From: Thomas Petazzoni @ 2015-07-05 13:33 UTC (permalink / raw)
To: buildroot
Dear Samuel Martin,
On Sun, 5 Jul 2015 15:01:40 +0200, Samuel Martin wrote:
> >> -comment "qt4 needs a toolchain w/ C++"
> >> +comment "qt4 support needs qt"
> >> depends on BR2_USE_MMU # qt
> >> - depends on !BR2_INSTALL_LIBSTDCPP
> >> + depends on !BR2_PACKAGE_QT && !BR2_PACKAGE_QT5
> >
> > Why !qt && !qt5 ?
> >
> > Just do depends on !qt. Remember, you are inside a choice, so anyway the
> > user can only select *either* qt4 *or* qt5.
>
> Because in BR, we don't support both qt4 and qt5 enabled at the same time.
> So if Qt5 is already enabled in the package selection, this comment
> should not be visible; hence the !qt5
Hum, ok. One could say that we could use just "depends on !qt", and
then have the user be smart enough to realize that if he wants to
enable qt, he has to disable qt5.
But ok, fair enough. What about the other comments I made on the same
patch?
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Buildroot] [PATCH v8 5/7] package/opencv: add gtk3 support
2015-07-05 9:40 [Buildroot] [PATCH v8 0/7] OpenCV bump Samuel Martin
` (3 preceding siblings ...)
2015-07-05 9:40 ` [Buildroot] [PATCH v8 4/7] package/opencv: add qt5 support Samuel Martin
@ 2015-07-05 9:40 ` Samuel Martin
2015-07-05 12:59 ` Thomas Petazzoni
2015-07-05 9:40 ` [Buildroot] [PATCH v8 6/7] package/opencv: add opengl support Samuel Martin
2015-07-05 9:40 ` [Buildroot] [PATCH v8 7/7] package/vlc: add opencv support Samuel Martin
6 siblings, 1 reply; 18+ messages in thread
From: Samuel Martin @ 2015-07-05 9:40 UTC (permalink / raw)
To: buildroot
Fully rework the GTK support in OpenCV because it now supports gtk-2 and
gtk-3 (but only one at the time).
Note that, in the build-system, the gtk support is only available when
Qt support is disabled; so make sure the menuconfig reflects this.
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
changes v7->v8:
-update a/r/t tags
changes v6->v7:
- update A/R/T tags
- rebase
changes v5->v6:
- update a/r/t tags
- remove unneeded "default ..." (Yann)
changes v4->v5:
- new patch
---
package/opencv/Config.in | 16 ++++++++++++++++
package/opencv/opencv.mk | 11 +++++++++--
2 files changed, 25 insertions(+), 2 deletions(-)
diff --git a/package/opencv/Config.in b/package/opencv/Config.in
index 15f68a2..776fa6d 100644
--- a/package/opencv/Config.in
+++ b/package/opencv/Config.in
@@ -62,6 +62,7 @@ choice
preference by the OpenCV build system):
- Qt5
- Qt4
+ - gtk3
- gtk2
Note that, whatever you choose here will be used by OpenCV, even
@@ -89,6 +90,21 @@ comment "gtk2 needs X.org and a toolchain w/ wchar, threads, C++"
!BR2_TOOLCHAIN_HAS_THREADS || \
!BR2_INSTALL_LIBSTDCPP
+config BR2_PACKAGE_OPENCV_WITH_GTK3
+ bool "gtk3"
+ depends on BR2_ARCH_HAS_ATOMICS # libgtk3 -> cairo
+ depends on BR2_USE_MMU # libgtk3 -> libglib2
+ depends on BR2_USE_WCHAR # libgtk3 -> libglib2
+ depends on BR2_TOOLCHAIN_HAS_THREADS # libgtk3 -> libglib2
+ depends on BR2_INSTALL_LIBSTDCPP
+ select BR2_PACKAGE_LIBGTK3
+
+comment "gtk3 needs a toolchain w/ wchar, threads, C++"
+ depends on BR2_USE_MMU # libgtk3 -> glib2
+ depends on BR2_ARCH_HAS_ATOMICS # libgtk3 -> cairo
+ depends on !(BR2_USE_WCHAR || BR2_TOOLCHAIN_HAS_THREADS || \
+ BR2_INSTALL_LIBSTDCPP)
+
config BR2_PACKAGE_OPENCV_WITH_QT
bool "qt4"
depends on BR2_PACKAGE_QT
diff --git a/package/opencv/opencv.mk b/package/opencv/opencv.mk
index 98e1614..c788aeb 100644
--- a/package/opencv/opencv.mk
+++ b/package/opencv/opencv.mk
@@ -236,11 +236,18 @@ else
OPENCV_CONF_OPTS += -DWITH_GSTREAMER=OFF
endif
+ifeq ($(BR2_PACKAGE_OPENCV_WITH_GTK)$(BR2_PACKAGE_OPENCV_WITH_GTK3),)
+OPENCV_CONF_OPTS += -DWITH_GTK=OFF -DWITH_GTK_2_X=OFF
+endif
+
ifeq ($(BR2_PACKAGE_OPENCV_WITH_GTK),y)
OPENCV_CONF_OPTS += -DWITH_GTK=ON -DWITH_GTK_2_X=ON
OPENCV_DEPENDENCIES += libgtk2
-else
-OPENCV_CONF_OPTS += -DWITH_GTK=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_OPENCV_WITH_GTK3),y)
+OPENCV_CONF_OPTS += -DWITH_GTK=ON -DWITH_GTK_2_X=OFF
+OPENCV_DEPENDENCIES += libgtk3
endif
ifeq ($(BR2_PACKAGE_OPENCV_WITH_JASPER),y)
--
2.4.5
^ permalink raw reply related [flat|nested] 18+ messages in thread* [Buildroot] [PATCH v8 5/7] package/opencv: add gtk3 support
2015-07-05 9:40 ` [Buildroot] [PATCH v8 5/7] package/opencv: add gtk3 support Samuel Martin
@ 2015-07-05 12:59 ` Thomas Petazzoni
2015-07-05 13:07 ` Samuel Martin
0 siblings, 1 reply; 18+ messages in thread
From: Thomas Petazzoni @ 2015-07-05 12:59 UTC (permalink / raw)
To: buildroot
Dear Samuel Martin,
On Sun, 5 Jul 2015 11:40:27 +0200, Samuel Martin wrote:
> Fully rework the GTK support in OpenCV because it now supports gtk-2 and
> gtk-3 (but only one at the time).
> Note that, in the build-system, the gtk support is only available when
> Qt support is disabled; so make sure the menuconfig reflects this.
Nothing in the patch is doing that. You're anyway using a "choice", so
the user can only decide one of gtk2, gtk3, qt4 or qt5. So this comment
in the commit log doesn't make sense.
> +config BR2_PACKAGE_OPENCV_WITH_GTK3
> + bool "gtk3"
> + depends on BR2_ARCH_HAS_ATOMICS # libgtk3 -> cairo
> + depends on BR2_USE_MMU # libgtk3 -> libglib2
> + depends on BR2_USE_WCHAR # libgtk3 -> libglib2
> + depends on BR2_TOOLCHAIN_HAS_THREADS # libgtk3 -> libglib2
> + depends on BR2_INSTALL_LIBSTDCPP
> + select BR2_PACKAGE_LIBGTK3
Please use a depends on BR2_PACKAGE_LIBGTK3, so that things are
consistent with qt4 and qt5 (unless of course you switch to a select
for Qt4/Qt5 following my previous comments). But in any case, be
*consistent*.
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Buildroot] [PATCH v8 5/7] package/opencv: add gtk3 support
2015-07-05 12:59 ` Thomas Petazzoni
@ 2015-07-05 13:07 ` Samuel Martin
0 siblings, 0 replies; 18+ messages in thread
From: Samuel Martin @ 2015-07-05 13:07 UTC (permalink / raw)
To: buildroot
Thomas,
On Sun, Jul 5, 2015 at 2:59 PM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Dear Samuel Martin,
>
> On Sun, 5 Jul 2015 11:40:27 +0200, Samuel Martin wrote:
>> Fully rework the GTK support in OpenCV because it now supports gtk-2 and
>> gtk-3 (but only one at the time).
>> Note that, in the build-system, the gtk support is only available when
>> Qt support is disabled; so make sure the menuconfig reflects this.
>
> Nothing in the patch is doing that. You're anyway using a "choice", so
> the user can only decide one of gtk2, gtk3, qt4 or qt5. So this comment
> in the commit log doesn't make sense.
Right. :-/
>
>
>> +config BR2_PACKAGE_OPENCV_WITH_GTK3
>> + bool "gtk3"
>> + depends on BR2_ARCH_HAS_ATOMICS # libgtk3 -> cairo
>> + depends on BR2_USE_MMU # libgtk3 -> libglib2
>> + depends on BR2_USE_WCHAR # libgtk3 -> libglib2
>> + depends on BR2_TOOLCHAIN_HAS_THREADS # libgtk3 -> libglib2
>> + depends on BR2_INSTALL_LIBSTDCPP
>> + select BR2_PACKAGE_LIBGTK3
>
> Please use a depends on BR2_PACKAGE_LIBGTK3, so that things are
> consistent with qt4 and qt5 (unless of course you switch to a select
> for Qt4/Qt5 following my previous comments). But in any case, be
> *consistent*.
We cannot use select for Qt4/Qt5 because of the way we are handling
their mutual exclusivity in BR. :-/
For the consistency, I fully agree.
I'll rework it.
>
> Thanks,
>
> Thomas
> --
> Thomas Petazzoni, CTO, Free Electrons
> Embedded Linux, Kernel and Android engineering
> http://free-electrons.com
--
Samuel
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Buildroot] [PATCH v8 6/7] package/opencv: add opengl support
2015-07-05 9:40 [Buildroot] [PATCH v8 0/7] OpenCV bump Samuel Martin
` (4 preceding siblings ...)
2015-07-05 9:40 ` [Buildroot] [PATCH v8 5/7] package/opencv: add gtk3 support Samuel Martin
@ 2015-07-05 9:40 ` Samuel Martin
2015-07-05 9:40 ` [Buildroot] [PATCH v8 7/7] package/vlc: add opencv support Samuel Martin
6 siblings, 0 replies; 18+ messages in thread
From: Samuel Martin @ 2015-07-05 9:40 UTC (permalink / raw)
To: buildroot
In OpenCV, OpenGL is only used by highgui module.
OpenGL support is done using extensions from 3rd party framework: either
Qt5OpenGL with Qt5 (with GL support only, not GLES); or gtkglext (which
is not available in Buildroot) with gtk2
So, make OpenGL knob a sub-option of the Qt5 support option.
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
changes v7->v8:
- fix dependencies (Yann)
- update a/r/t tags
changes v6->v7:
- rework comment as sugessted by Yann
- move opengl option close to the gui toolkit choice
changes v5->v6:
- update comments (Yann)
changes v4->v5:
- new patch
---
package/opencv/Config.in | 22 +++++++++++++++++++++-
package/opencv/opencv.mk | 7 +++++++
2 files changed, 28 insertions(+), 1 deletion(-)
diff --git a/package/opencv/Config.in b/package/opencv/Config.in
index 776fa6d..273b00f 100644
--- a/package/opencv/Config.in
+++ b/package/opencv/Config.in
@@ -52,9 +52,10 @@ config BR2_PACKAGE_OPENCV_LIB_HIGHGUI
Include opencv_highgui (high-level gui and media i/o) module into the
OpenCV build.
+if BR2_PACKAGE_OPENCV_LIB_HIGHGUI
+
choice
prompt "gui toolkit"
- depends on BR2_PACKAGE_OPENCV_LIB_HIGHGUI
help
GUI toolkit for opencv_highgui module.
@@ -140,6 +141,25 @@ comment "qt5 support needs qt5"
endchoice
+config BR2_PACKAGE_OPENCV_WITH_OPENGL
+ bool "opengl support"
+ # OpenGL support done using Qt5OpenGL, so depends on WITH_QT5
+ depends on BR2_PACKAGE_OPENCV_WITH_QT5
+ # OpenGL support requires Qt5OpenGL with GL support, not GLES
+ depends on BR2_PACKAGE_QT5_GL_AVAILABLE
+ depends on BR2_PACKAGE_HAS_LIBGL
+ select BR2_PACKAGE_QT5BASE_OPENGL
+ help
+ Enable OpenGL for UI.
+
+comment "opengl support needs an OpenGL provider"
+ depends on BR2_PACKAGE_OPENCV_WITH_QT5
+ depends on !BR2_PACKAGE_QT5_GL_AVAILABLE || \
+ !BR2_PACKAGE_HAS_LIBGL
+
+endif # BR2_PACKAGE_OPENCV_LIB_HIGHGUI
+
+
config BR2_PACKAGE_OPENCV_LIB_IMGCODECS
bool "imgcodecs"
select BR2_PACKAGE_OPENCV_LIB_IMGPROC
diff --git a/package/opencv/opencv.mk b/package/opencv/opencv.mk
index c788aeb..bb1bcd8 100644
--- a/package/opencv/opencv.mk
+++ b/package/opencv/opencv.mk
@@ -264,6 +264,13 @@ else
OPENCV_CONF_OPTS += -DWITH_JPEG=OFF
endif
+ifeq ($(BR2_PACKAGE_OPENCV_WITH_OPENGL),y)
+OPENCV_CONF_OPTS += -DWITH_OPENGL=ON
+OPENCV_DEPENDENCIES += libgl
+else
+OPENCV_CONF_OPTS += -DWITH_OPENGL=OFF
+endif
+
OPENCV_CONF_OPTS += -DWITH_OPENMP=$(if $(BR2_GCC_ENABLE_OPENMP),ON,OFF)
ifeq ($(BR2_PACKAGE_OPENCV_WITH_PNG),y)
--
2.4.5
^ permalink raw reply related [flat|nested] 18+ messages in thread* [Buildroot] [PATCH v8 7/7] package/vlc: add opencv support
2015-07-05 9:40 [Buildroot] [PATCH v8 0/7] OpenCV bump Samuel Martin
` (5 preceding siblings ...)
2015-07-05 9:40 ` [Buildroot] [PATCH v8 6/7] package/opencv: add opengl support Samuel Martin
@ 2015-07-05 9:40 ` Samuel Martin
6 siblings, 0 replies; 18+ messages in thread
From: Samuel Martin @ 2015-07-05 9:40 UTC (permalink / raw)
To: buildroot
This change adds 2 patches (backported from upstream) to vlc fixing the
build against opencv2 APIs.
This allows to select the minimal set of opencv modules when opencv
support is enabled.
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
changes v5->v6:
- update a/r/t tags
- add backport url (Yann)
changes v4->v5:
- new patch
---
...opencv_wrapper-use-opencv2-style-includes.patch | 36 ++++++++++++++++++++++
...cv_example-add-missing-include-statements.patch | 29 +++++++++++++++++
package/vlc/Config.in | 2 ++
package/vlc/vlc.mk | 8 ++++-
4 files changed, 74 insertions(+), 1 deletion(-)
create mode 100644 package/vlc/0008-opencv_wrapper-use-opencv2-style-includes.patch
create mode 100644 package/vlc/0009-opencv_example-add-missing-include-statements.patch
diff --git a/package/vlc/0008-opencv_wrapper-use-opencv2-style-includes.patch b/package/vlc/0008-opencv_wrapper-use-opencv2-style-includes.patch
new file mode 100644
index 0000000..0ce0206
--- /dev/null
+++ b/package/vlc/0008-opencv_wrapper-use-opencv2-style-includes.patch
@@ -0,0 +1,36 @@
+Backport from: https://git.videolan.org/?p=vlc.git;a=commit;h=cc236e4652255902f2c2cee3b18f83367f35a8c7
+
+From cc236e4652255902f2c2cee3b18f83367f35a8c7 Mon Sep 17 00:00:00 2001
+From: Samuel Martin <s.martin49@gmail.com>
+Date: Sun, 24 May 2015 14:30:09 +0200
+Subject: [PATCH 8/9] opencv_wrapper: use opencv2-style includes
+
+If old opencv1-style legacy include directory is available, this change
+becomes purely cosmetic (maybe will compile a bit faster).
+It becomes an FTBFS fix when opencv1-style include directory is missing
+(i.e. from opencv-3.0).
+
+Signed-off-by: Samuel Martin <s.martin49@gmail.com>
+Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
+---
+ modules/video_filter/opencv_wrapper.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/modules/video_filter/opencv_wrapper.c b/modules/video_filter/opencv_wrapper.c
+index e36e1a5..5d74241 100644
+--- a/modules/video_filter/opencv_wrapper.c
++++ b/modules/video_filter/opencv_wrapper.c
+@@ -39,8 +39,8 @@
+ #include <vlc_image.h>
+ #include "filter_picture.h"
+
+-#include <cxcore.h>
+-#include <cv.h>
++#include <opencv2/core/core_c.h>
++#include <opencv2/core/types_c.h>
+
+ /*****************************************************************************
+ * Local prototypes
+--
+2.4.2
+
diff --git a/package/vlc/0009-opencv_example-add-missing-include-statements.patch b/package/vlc/0009-opencv_example-add-missing-include-statements.patch
new file mode 100644
index 0000000..7b7f727
--- /dev/null
+++ b/package/vlc/0009-opencv_example-add-missing-include-statements.patch
@@ -0,0 +1,29 @@
+Backport from: https://git.videolan.org/?p=vlc.git;a=commit;h=b82416d7000a993b33e903095a590fe32212a85e
+
+From b82416d7000a993b33e903095a590fe32212a85e Mon Sep 17 00:00:00 2001
+From: Samuel Martin <s.martin49@gmail.com>
+Date: Sun, 24 May 2015 14:30:10 +0200
+Subject: [PATCH 9/9] opencv_example: add missing #include statements
+
+Signed-off-by: Samuel Martin <s.martin49@gmail.com>
+Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
+---
+ modules/video_filter/opencv_example.cpp | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/modules/video_filter/opencv_example.cpp b/modules/video_filter/opencv_example.cpp
+index ae3af05..998f286 100644
+--- a/modules/video_filter/opencv_example.cpp
++++ b/modules/video_filter/opencv_example.cpp
+@@ -41,6 +41,8 @@
+
+ #include <opencv2/core/core_c.h>
+ #include <opencv2/core/core.hpp>
++#include <opencv2/imgproc/imgproc_c.h>
++#include <opencv2/imgproc/imgproc.hpp>
+ #include <opencv2/objdetect/objdetect.hpp>
+
+ /*****************************************************************************
+--
+2.4.2
+
diff --git a/package/vlc/Config.in b/package/vlc/Config.in
index b030a56..471f4a7 100644
--- a/package/vlc/Config.in
+++ b/package/vlc/Config.in
@@ -11,6 +11,8 @@ config BR2_PACKAGE_VLC
depends on BR2_TOOLCHAIN_HAS_THREADS
depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7
select BR2_PACKAGE_LIBVORBIS if BR2_PACKAGE_OPUS
+ select BR2_PACKAGE_OPENCV_LIB_IMGPROC if BR2_PACKAGE_OPENCV
+ select BR2_PACKAGE_OPENCV_LIB_OBJDETECT if BR2_PACKAGE_OPENCV
help
VLC is a free and open source cross-platform multimedia player
and framework that plays most multimedia files as well as DVD,
diff --git a/package/vlc/vlc.mk b/package/vlc/vlc.mk
index 4ef69aa..a553648 100644
--- a/package/vlc/vlc.mk
+++ b/package/vlc/vlc.mk
@@ -44,7 +44,6 @@ VLC_CONF_OPTS += \
--disable-projectm \
--disable-vsxu \
--disable-mtp \
- --disable-opencv \
--disable-mmal-codec \
--disable-mmal-vout \
--disable-dvdnav \
@@ -148,6 +147,13 @@ else
VLC_CONF_OPTS += --disable-gles2
endif
+ifeq ($(BR2_PACKAGE_OPENCV),y)
+VLC_CONF_OPTS += --enable-opencv
+VLC_DEPENDENCIES += opencv
+else
+VLC_CONF_OPTS += --disable-opencv
+endif
+
ifeq ($(BR2_PACKAGE_OPUS),y)
VLC_CONF_OPTS += --enable-opus
VLC_DEPENDENCIES += libvorbis opus
--
2.4.5
^ permalink raw reply related [flat|nested] 18+ messages in thread