Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5450538imu; Tue, 29 Jan 2019 20:23:03 -0800 (PST) X-Google-Smtp-Source: ALg8bN4uNCk5S56R7P5JJA7nsLGyaBQVPEqmXQEbEYolhlE2OW1FF84Rht/WuqK6ys1Hof/Sf8sQ X-Received: by 2002:a62:399b:: with SMTP id u27mr29974816pfj.181.1548822183327; Tue, 29 Jan 2019 20:23:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548822183; cv=none; d=google.com; s=arc-20160816; b=ur7Nnd1taBfUJBqtE3/XEiWbNXj+RVf8HteXuX65KY3/c5LiQltymuyUIo5EQ0vap4 ZkX4D4q1Jl+wQcOcOBtK3OG2d64f3cM8if5HEsTNe9wOiCRMUnTov7EqKnYfc4p0cX6x YdmoR17K0nCMjQbS3iVJiQPlaA/OLWLcfXXWMgyrwAyw/ybXzV5m33RjVKPzPhNbOq3k 6j9bGzzmJg45+fMtqhhUY21aZAgYPoteZ9gBytDzkyfzgjtLuKCNH2YbDr7BPJYs8e9U Wm/fKKikFskhHEyFJv46rdbx+0qdmNPzqf3zj5pzLUJyPp4d8GehSsX3oSOLQlJZ0fzp 7q5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature; bh=Twy2/9rCYvnncdoQjvrdkqgOccxaghfH1nzMeT7NIS0=; b=fSsxoDroz39DDfQzFQBztyi844fCIVexQIX630OCum+TvMCpP9hNmjr7zT5h80aN2p a8ftinmagava1NBvsWM8sT7EX/CNj5OVBGaeoUmLKXX/Xkk8lSh9cXGZj7CSRAtBB3Is HG+6+pBQNAVlBu5vmL4EoJAUExbdL8sMAouWudKKHH4Tu5Yqu8YnlSUaZ8IP2hMzJ7Bq +dmnftLjuEo1yk22aA7KzOrx7qxazP7vA7F96hVBKZEUgHwIoABdUJOE+AbU1+oBKk5N l8YuEHVOuJnABZoNL/xwBue88NHvbpiMgCrANBYKnwD/aB4xP6AkgP4kHQDp3RUaOrX1 +cug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ndufresne-ca.20150623.gappssmtp.com header.s=20150623 header.b="elqU6N/D"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 39si416891pla.352.2019.01.29.20.22.48; Tue, 29 Jan 2019 20:23:03 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ndufresne-ca.20150623.gappssmtp.com header.s=20150623 header.b="elqU6N/D"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730022AbfA3EV2 (ORCPT + 99 others); Tue, 29 Jan 2019 23:21:28 -0500 Received: from mail-qt1-f194.google.com ([209.85.160.194]:44741 "EHLO mail-qt1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728196AbfA3EV1 (ORCPT ); Tue, 29 Jan 2019 23:21:27 -0500 Received: by mail-qt1-f194.google.com with SMTP id n32so24841582qte.11 for ; Tue, 29 Jan 2019 20:21:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ndufresne-ca.20150623.gappssmtp.com; s=20150623; h=message-id:subject:from:to:cc:date:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=Twy2/9rCYvnncdoQjvrdkqgOccxaghfH1nzMeT7NIS0=; b=elqU6N/DBFmeSoghEYpngI1Z5D3n5Nclmw0X8bbTkzK/fw67Bxvj1Boz/D3izvuszd ft/jzPEfbkOtDVhIZWTdzThKC7X4pybo8R2Yk3KUZwNwgCQ1HWudwivlorZh6gwQaGaG o7YrelV4b03b0tEZiZUIxenp58it4EncqkaMxTqy6z1jIN5tvCPr8QOQzXAQ0Hh3dGYs apb+lUXMB5FGPum0qkp6uCa3HYY0qi3DLqA2fNd5QUDlSvXo+V1nbd3BUuIcvRVpJtZW OpZX0coC/Aa5t8J1WbSjIMG+j4yShwpMrRT5K7aB7/WJOWUnOYAbM3Wa1HfSe2AbkQqv qcVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=Twy2/9rCYvnncdoQjvrdkqgOccxaghfH1nzMeT7NIS0=; b=ptDEqmihMEHKb/n6+IK4yHZsUpNGvk7Jvlf5R8HRMTCPialsE1lgl9yjF+oK6VtWaU Pnl2ta0FY6+hwdvoW4txE1J/cBa5mueBWOxapkR/0BKgEfsNq8C+NMfCT0rWgrPPmqR/ 8F2MIUgRWU8BsfntAbvFAV7SSwJf8X3AILIm3jrEPR5/KnAeB1Z+X55uf2ltc79mAklE Y0VNCRK6IWwjWobrGdAXMdQQbEZOYLLIH1y3eVNFTKJ7Np6YtmDa6p8FXWSQUNbCW0XY FX/t8HYmdD4WPQhcZbKEMgtseRmuGC7GnsMoaUXf5U+qE/nv8nr7BAMsfE5cRgl4eMXD uD+g== X-Gm-Message-State: AJcUukesMLEpJAkLiISF3EoDRVHczIYK4aOWF+eioWFqqL5U8t99zhI6 olVTeiM+gJR4kITH7p2A/JPiDA== X-Received: by 2002:ac8:2d53:: with SMTP id o19mr27288858qta.21.1548822086512; Tue, 29 Jan 2019 20:21:26 -0800 (PST) Received: from skullcanyon ([192.222.193.21]) by smtp.gmail.com with ESMTPSA id z18sm956499qkz.96.2019.01.29.20.21.25 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 29 Jan 2019 20:21:25 -0800 (PST) Message-ID: Subject: Re: [PATCH 10/10] venus: dec: make decoder compliant with stateful codec API From: Nicolas Dufresne To: Tomasz Figa Cc: Stanimir Varbanov , Linux Media Mailing List , Mauro Carvalho Chehab , Hans Verkuil , Linux Kernel Mailing List , linux-arm-msm , Vikash Garodia , Alexandre Courbot , Malathi Gottam Date: Tue, 29 Jan 2019 23:21:24 -0500 In-Reply-To: References: <20190117162008.25217-1-stanimir.varbanov@linaro.org> <20190117162008.25217-11-stanimir.varbanov@linaro.org> <28069a44-b188-6b89-2687-542fa762c00e@linaro.org> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.4 (3.30.4-1.fc29) Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le mercredi 30 janvier 2019 à 12:38 +0900, Tomasz Figa a écrit : > > Yes, unfortunately, GStreamer still rely on G_FMT waiting a minimal > > amount of time of the headers to be processed. This was how things was > > created back in 2011, I could not program GStreamer for the future. If > > we stop doing this, we do break GStreamer as a valid userspace > > application. > > Does it? Didn't you say earlier that you end up setting the OUTPUT > format with the stream resolution as parsed on your own? If so, that > would actually expose a matching framebuffer format on the CAPTURE > queue, so there is no need to wait for the real parsing to happen. I don't remember saying that, maybe I meant to say there might be a workaround ? For the fact, here we queue the headers (or first frame): https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/blob/master/sys/v4l2/gstv4l2videodec.c#L624 Then few line below this helper does G_FMT internally: https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/blob/master/sys/v4l2/gstv4l2videodec.c#L634 https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/blob/master/sys/v4l2/gstv4l2object.c#L3907 And just plainly fails if G_FMT returns an error of any type. This was how Kamil designed it initially for MFC driver. There was no other alternative back then (no EAGAIN yet either). Nicolas p.s. it's still in my todo's to implement source change event as I believe it is a better mechanism (specially if you header happened to be corrupted, then the driver can consume the stream until it finds a sync). So these sleep or normally wait exist all over to support this legacy thing. It is unfortunate, the question is do you want to break userspace now ? Without having first placed a patch that would maybe warn or something for a while ?