From patchwork Sun Mar 8 22:22:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabrice Fontaine X-Patchwork-Id: 1251120 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=je5uT5yt; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48bG6c4CDzz9sPF for ; Mon, 9 Mar 2020 09:21:44 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 4ED0A8887E; Sun, 8 Mar 2020 22:21:42 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BLZYPhp4X789; Sun, 8 Mar 2020 22:21:40 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 29B0F8887C; Sun, 8 Mar 2020 22:21:40 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 34F511BF5B3 for ; Sun, 8 Mar 2020 22:21:38 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 2F34F8814F for ; Sun, 8 Mar 2020 22:21:38 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Ua-vr0eUdZ9J for ; Sun, 8 Mar 2020 22:21:37 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by whitealder.osuosl.org (Postfix) with ESMTPS id 2C49888129 for ; Sun, 8 Mar 2020 22:21:37 +0000 (UTC) Received: by mail-wr1-f65.google.com with SMTP id v9so8720991wrf.10 for ; Sun, 08 Mar 2020 15:21:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=E9XXk3/cWu02O4zrpaPIyT0CIP7jLC9XSQfkFcDZq+4=; b=je5uT5ytVyGwuQioXvsqt84+r1X3kVNwFjjaJwpgcCnL8xeIi1hGh9xpB2xrlvlEiv +hlkNSsPUd5rYtdCH6U3lCQrU1Fx2yKwlzJPPa6vR/4BpkD5u2RsFjvKY1uWLKc8iJt4 Ymqm/0MkUKURdGqwaghGFw0NhdtoLKrOAj3cUNZjGV1JYeE8wq1qJ7RTbNjyL2Nvp+ga xIhsw1RNYl2DfHMu/LhhBRxNJXZTxo5Obnn8PjANjVetVVuf6eI61Otvp8dMySfIW2Jj K/edzMCul7jhWIzsXOIJAIGdn+jLYcqEE8ukSP7B+KYTR2qRl6fcoNVqbVoka5W5lpzG n0Kw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=E9XXk3/cWu02O4zrpaPIyT0CIP7jLC9XSQfkFcDZq+4=; b=YUY76UbAQKpIxrDk+Bw8py5UVwv0zJM64k81Ge+/dVtLVoPi4a7lU638XXt1NwyNzB VFw/EDA2ZOU93XroyYlnwqfwDhVHygOHZW/XaHnHHAz6AymyojeoFIMsIk/jrqUrLDfA YsxwblP8ILrKhgVXzHs14SBNIi9ueUA6VPtqP3kQZ4ZGl+NrRcizIZXkKCM0MImo2IMy aZDoNEHNthYjpVVCUCOsLDgvf25/ZOFBYvbHRLPmB84grchjx401sb6i2LPh3wGxCY64 +hen3x//L57Y4ZeotTIfedEQLokWD3X6XbsfdTeRaCnOur77mAsnXzcYIYetByw093ga Oc1A== X-Gm-Message-State: ANhLgQ090PBWKF/qbm9Md1HyhcHnWAJKgMGkfe/wTU+vY4tU/UketvVM C8Jk9/KNjasneT895aA46HA2176Z X-Google-Smtp-Source: ADFU+vuCdxO8+WVnx9TzuBWe3wKygy5WRdsmcpExR4u3W7Lyju4GNC+DIT4aVtqMirsIVKyeCkaVYw== X-Received: by 2002:adf:b60f:: with SMTP id f15mr17680083wre.372.1583706095234; Sun, 08 Mar 2020 15:21:35 -0700 (PDT) Received: from kali.home (lfbn-ren-1-502-62.w2-10.abo.wanadoo.fr. [2.10.9.62]) by smtp.gmail.com with ESMTPSA id j14sm59059287wrn.32.2020.03.08.15.21.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 Mar 2020 15:21:34 -0700 (PDT) From: Fabrice Fontaine To: buildroot@buildroot.org Date: Sun, 8 Mar 2020 23:22:46 +0100 Message-Id: <20200308222246.1392316-1-fontaine.fabrice@gmail.com> X-Mailer: git-send-email 2.25.0 MIME-Version: 1.0 Subject: [Buildroot] [PATCH v2,1/1] package/vlc: fix build with opencv3 X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bernd Kuhls , Simon Dawson , Fabrice Fontaine Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Fixes: - http://autobuild.buildroot.org/results/210424bd33f660aa0757f62a558e1e03faf0f371 Signed-off-by: Fabrice Fontaine --- Changes v1 -> v2 (after review of Thomas Petazzoni): - Update patch so it does not break the build with OpenCV 2.x ...lter-opencv_example.cpp-fix-build-wi.patch | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 package/vlc/0010-modules-video_filter-opencv_example.cpp-fix-build-wi.patch diff --git a/package/vlc/0010-modules-video_filter-opencv_example.cpp-fix-build-wi.patch b/package/vlc/0010-modules-video_filter-opencv_example.cpp-fix-build-wi.patch new file mode 100644 index 0000000000..952f9fdf51 --- /dev/null +++ b/package/vlc/0010-modules-video_filter-opencv_example.cpp-fix-build-wi.patch @@ -0,0 +1,42 @@ +From 57b1e723b73da4c8d42c20d4e28040ec4c0edd85 Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Fri, 28 Feb 2020 14:29:47 +0100 +Subject: [PATCH] modules/video_filter/opencv_example.cpp: fix build with + opencv 3.4.9 + +Use cvScalar instead of CV_RGB to avoid the following build failure with +opencv 3.4.9: + +In file included from /home/naourr/work/instance-2/output-1/host/x86_64-buildroot-linux-uclibc/sysroot/usr/include/opencv2/imgproc/imgproc.hpp:48, + from video_filter/opencv_example.cpp:46: +video_filter/opencv_example.cpp: In function 'picture_t* Filter(filter_t*, picture_t*)': +video_filter/opencv_example.cpp:200:46: error: could not convert 'cv::Scalar_((double)0, (double)0, (double)0, (double)0)' from 'cv::Scalar' {aka 'cv::Scalar_'} to 'CvScalar' + cvRectangle( p_img[0], pt1, pt2, CV_RGB(0,0,0), 3, 8, 0 ); + ^~~~~~ + +Indeed, CV_RGB is defined as cv::Scalar instead of cvScalar since +version 3.4.2 and +https://github.com/opencv/opencv/commit/7f9253ea0a9fe2635926379420002dbf0c3fce0f + +Signed-off-by: Fabrice Fontaine +[Upstream status: https://patches.videolan.org/patch/26655] +--- + modules/video_filter/opencv_example.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules/video_filter/opencv_example.cpp b/modules/video_filter/opencv_example.cpp +index 1334cd4c36..1a8d574f7a 100644 +--- a/modules/video_filter/opencv_example.cpp ++++ b/modules/video_filter/opencv_example.cpp +@@ -202,7 +202,7 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic ) + pt2.x = (r->x+r->width)*scale; + pt1.y = r->y*scale; + pt2.y = (r->y+r->height)*scale; +- cvRectangle( p_img[0], pt1, pt2, CV_RGB(0,0,0), 3, 8, 0 ); ++ cvRectangle( p_img[0], pt1, pt2, cvScalar(0,0,0,0), 3, 8, 0 ); + + *(CvRect*)(&(p_sys->event_info.p_region[i])) = *r; + p_sys->event_info.p_region[i].i_id = p_sys->i_id++; +-- +2.25.0 +