{"id":570,"url":"https://patchwork.libcamera.org/api/patches/570/?format=json","web_url":"https://patchwork.libcamera.org/patch/570/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20190213151027.6376-2-kieran.bingham@ideasonboard.com>","date":"2019-02-13T15:10:20","name":"[libcamera-devel,v2,1/8] test: v4l2_device: Use VIVID capture stream","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"34cd89f2cb818d9b55b732dfd08a8bd9509237a1","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/?format=json","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/570/mbox/","series":[{"id":181,"url":"https://patchwork.libcamera.org/api/series/181/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=181","date":"2019-02-13T15:10:19","name":"libcamera: v4l2_device buffer sharing","version":2,"mbox":"https://patchwork.libcamera.org/series/181/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/570/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/570/checks/","tags":{},"headers":{"Return-Path":"<kieran.bingham@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id BF37A610B3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 13 Feb 2019 16:10:32 +0100 (CET)","from localhost.localdomain\n\t(cpc89242-aztw30-2-0-cust488.18-1.cable.virginm.net [86.31.129.233])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 44A6E304;\n\tWed, 13 Feb 2019 16:10:32 +0100 (CET)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1550070632;\n\tbh=JDJkQKVftxyHKXfzTyUZcfrR0M385BwFp4tQhRu6w+o=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=jLevdvJnVCX+6zFiTkPAJOM3UbaY9N/zQERORRyKX/E1BP/PcN9VSnVsjSghkzf/Z\n\tpvTI1Lzfybl/b86wyee0L+RO92K+Opvmgquh2u/stzj6NVf3ZlDdGKvDp6C8nUUU2l\n\tbx1ZSFKf8PTJQxBLTCN9mbdnT8v87YDnFLCCVkKg=","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","To":"LibCamera Devel <libcamera-devel@lists.libcamera.org>","Date":"Wed, 13 Feb 2019 15:10:20 +0000","Message-Id":"<20190213151027.6376-2-kieran.bingham@ideasonboard.com>","X-Mailer":"git-send-email 2.19.1","In-Reply-To":"<20190213151027.6376-1-kieran.bingham@ideasonboard.com>","References":"<20190213151027.6376-1-kieran.bingham@ideasonboard.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v2 1/8] test: v4l2_device: Use VIVID\n\tcapture stream","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.23","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","X-List-Received-Date":"Wed, 13 Feb 2019 15:10:32 -0000"},"content":"Utilise the VIVID capture device for testing the V4L2Device objects.\n\nSigned-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\n test/v4l2_device/v4l2_device_test.cpp | 18 +++++++++---------\n 1 file changed, 9 insertions(+), 9 deletions(-)","diff":"diff --git a/test/v4l2_device/v4l2_device_test.cpp b/test/v4l2_device/v4l2_device_test.cpp\nindex 18d014caf4c8..a2a7ba82612d 100644\n--- a/test/v4l2_device/v4l2_device_test.cpp\n+++ b/test/v4l2_device/v4l2_device_test.cpp\n@@ -39,22 +39,22 @@ int V4L2DeviceTest::init()\n \t\treturn TestFail;\n \t}\n \n-\tDeviceMatch dm(\"uvcvideo\");\n-\tmedia_ = std::move(enumerator_->search(dm));\n+\tDeviceMatch dm(\"vivid\");\n+\tdm.add(\"vivid-000-vid-cap\");\n+\n+\tmedia_ = enumerator_->search(dm);\n \tif (!media_)\n \t\treturn TestSkip;\n \n \tmedia_->acquire();\n \n-\tfor (MediaEntity *entity : media_->entities()) {\n-\t\tif (entity->flags() & MEDIA_ENT_FL_DEFAULT) {\n-\t\t\tdev_ = new V4L2Device(entity);\n-\t\t\tbreak;\n-\t\t}\n-\t}\n+\tMediaEntity *entity = media_->getEntityByName(\"vivid-000-vid-cap\");\n+\tif (!entity)\n+\t\treturn TestSkip;\n \n+\tdev_ = new V4L2Device(entity);\n \tif (!dev_)\n-\t\treturn TestSkip;\n+\t\treturn TestFail;\n \n \treturn dev_->open();\n }\n","prefixes":["libcamera-devel","v2","1/8"]}