Renegotiate GstVaapiDecode src caps

Danny Cullen Danny.Cullen at datapath.co.uk
Wed Nov 22 07:31:27 UTC 2017


Thanks for the reply Victor.

The issue is that the live video (352x288) appears in the top left corner of the output buffer from vaapidecode, so the input to the postproc element is part live/part garbage data.

I think what I need to do is to get all the downstream elements to renegotiate their caps back upstream so that the sink caps on the vaapidecode element are then correct and the decoded MJPEG data entirely fills a 352x288 buffer rather than being "placed" inside the original 800x600 buffer?

Is that corrent?

My approach at the moment is to unlink the vaapipostproc from the uridecodebin and relink which should renegotiate the caps?  I can do that when I get the notify::caps signal on the src pad of the vaapidecode element.

Unless there is a more dynamic method?

Thanks,

Danny

> On Tue, 21 Nov 2017 at 13:46, Danny Cullen wrote:
> > Hello,
> >
> > I am using a GstURIDecodeBin to access an HTTP MJPEG IP video source.
> > The source sends the first few frames as 800x600 (a black splash
> > screen) JPEG images and then sends the live data as 352x288.
> >
> > When the first frame is decoded I link a GstVaapiPostproc element with
> > the GstURIDecodeBin and the vaapipostproc sink caps are negotiated
> > with the vaapidecode elements src caps as 800x600.
> >
> > When the JPEG images change size, the sink caps of the vaapidecode
> > element receive a GST_EVENT but this does not propagate to any of the
> > downstream elements.
> >
> > I’m assuming that the sink of the vaapipostproc element would need to
> > renegotiate with the src of the vaapidecode element?  Is that correct?
>
> It is tricky since vaapipostproc resize the frame, thus there's no need to renegotiate because resizing is assumed.
>
> >
> > I have connected a notify::caps signal handler to the sink pad of the
> > vaapidecode element however I’m not sure of the best way of getting
> > the downstream elements to renegotiate.  What is the best way of achieving this?
>
> I guess that's is a way to workaround this in your case.
>
> >
> > Thanks in advance,
> >
> > Danny
> >

Danny Cullen
Software Team Leader
[Datapath]<http://www.datapath.co.uk/>
Bemrose House, Bemrose Park, Wayzgoose Drive, Derby, DE21 6XQ, United Kingdom
T: +44 (0)1332 294 441 |  www.datapath.co.uk<http://www.datapath.co.uk>
[Fx4 wall controller (www.datapath.co.uk/fx4)]<http://ow.ly/a4cH300zbGd>
Datapath Ltd.  Registered Number: 1609392.  Registered in England at Bemrose House, Bemrose Park, Wayzgoose Drive, Derby. DE21 6XQ.



_______________________________________________
gstreamer-devel mailing list
gstreamer-devel at lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20171122/9d5ea7d9/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image757443.JPG
Type: image/jpeg
Size: 5394 bytes
Desc: image757443.JPG
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20171122/9d5ea7d9/attachment-0002.jpe>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image7c6d8d.JPG
Type: image/jpeg
Size: 46566 bytes
Desc: image7c6d8d.JPG
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20171122/9d5ea7d9/attachment-0003.jpe>


More information about the gstreamer-devel mailing list