Usage of 'format' in video/x-h264(any)
Matthew Waters
ystreet00 at gmail.com
Wed Aug 8 13:53:56 UTC 2018
gltransformation takes RGBA as an input from GLMemory. The
memory:GLMemory part of the caps are significant and will cause a
negotiation failure if they do not match between the elements.
avdec_h264 is most likely producing a YUV variant.
Therefore you need two steps to 1. upload the data and then 2. convert
it to RGBA.
These are the elements glupload and glcolorconvert respectively.
The reason glimagesink works is that glimagesink is actually a bin of
glupload ! glcolorconvert ! actual-sink-element.
Cheers
-Matt
On 08/08/18 23:46, vk_gst wrote:
> Hello,
>
> I am trying to understand the usage of format in the caps - video/x-raw.
> I have the following pipeline :
> v4l2src -> queue -> video/x-raw -> h264parse -> avdec_h264 ->
> gltransformation -> glimagesink
>
> #root at linux-GP60-2PE:~# GST_DEBUG=3 gst-launch-1.0 -v -e v4l2src
> device=/dev/video0 ! queue !
> video/x-h264,width=640,height=480,framerate=30/1 ! h264parse ! avdec_h264 !
> gltransformation ! glimagesink
>
> However, the above fails with the following error:
>
> 0:00:00.070642932 13328 0x558be86e3a10 ERROR GST_PIPELINE
> grammar.y:740:gst_parse_perform_link: could not link avdec_h264-0 to
> gltransformation0
> WARNING: erroneous pipeline: could not link avdec_h264-0 to
> gltransformation0
>
> I also tried setting the caps, after avdec_h264(not sure if it is the right
> thing to do)
>
> #root at linux-GP60-2PE:~# GST_DEBUG=3 gst-launch-1.0 -v -e v4l2src
> device=/dev/video0 ! queue !
> video/x-h264,width=640,height=480,framerate=30/1 ! h264parse ! avdec_h264 !
> video/x-raw,width=640,height=480,framerate=30/1,format=RGBA !
> gltransformation ! glimagesink
>
> #0:00:00.065133323 13359 0x55b36ce37720 ERROR GST_PIPELINE
> grammar.y:726:gst_parse_perform_link: could not link avdec_h264-0 to
> gltransformation0, gltransformation0 can't handle caps video/x-raw,
> width=(int)640, height=(int)480, framerate=(fraction)30/1,
> format=(string)RGBA
> WARNING: erroneous pipeline: could not link avdec_h264-0 to
> gltransformation0, gltransformation0 can't handle caps video/x-raw,
> width=(int)640, height=(int)480, framerate=(fraction)30/1,
> format=(string)RGBA
>
> Now the source and sink pads for gltransformation and avdec_h264 supports
> 'video/x-raw, format=RGBA'.
>
> I am trying to understand how the 'format' affects the behaviour in the
> above command. The below line works perfectly fine :
>
> #root at linux-GP60-2PE:~# GST_DEBUG=3 gst-launch-1.0 -v -e v4l2src
> device=/dev/video0 ! queue !
> video/x-h264,width=640,height=480,framerate=30/1 ! h264parse ! avdec_h264
> ! glimagesink
>
> Can anyone explain the behaviour here?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20180808/a9621513/attachment.sig>
More information about the gstreamer-devel
mailing list