From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tomasz Figa Subject: Re: [PATCH 10/10] venus: dec: make decoder compliant with stateful codec API Date: Wed, 30 Jan 2019 15:17:46 +0900 Message-ID: References: <20190117162008.25217-1-stanimir.varbanov@linaro.org> <20190117162008.25217-11-stanimir.varbanov@linaro.org> <28069a44-b188-6b89-2687-542fa762c00e@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: Nicolas Dufresne 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 List-Id: linux-arm-msm@vger.kernel.org On Wed, Jan 30, 2019 at 1:21 PM Nicolas Dufresne wro= te: > > Le mercredi 30 janvier 2019 =C3=A0 12:38 +0900, Tomasz Figa a =C3=A9crit = : > > > Yes, unfortunately, GStreamer still rely on G_FMT waiting a minimal > > > amount of time of the headers to be processed. This was how things wa= s > > > created back in 2011, I could not program GStreamer for the future. I= f > > > 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). Hmm, was that ffmpeg then? So would it just set the OUTPUT width and height to 0? Does it mean that gstreamer doesn't work with coda and mtk-vcodec, which don't have such wait in their g_fmt implementations? > > 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 ? > I don't want and my understanding was that we could workaround it by the propagation of format from OUTPUT to CAPTURE. Also see above. Best regards, Tomasz