summaryrefslogtreecommitdiff
path: root/gst-decoder.c
Commit message (Collapse)AuthorAgeFilesLines
* gst-decoder: fix cleanup loopEric Engestrom2018-10-191-1/+1
| | | | | planes[i].fd are opened in a `nplanes` loop, so they should be closed in a same-length loop. Also, the name is a hint :P
* helper to check for egl entrypointsRob Clark2017-05-081-0/+4
| | | | | | | | | | | | Remove some boilerplate and check more specifically for all the entry- points that different modules need. Ok, I guess it isn't likely for a driver to expose eglCreateImageKHR but not eglDeleteImageKHR.. but otoh kmscube is useful for bringing up drivers. Signed-off-by: Rob Clark <robdclark@gmail.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
* gst-decoder.c: improve buffer_to_image() functionCarlos Rafael Giani2017-04-291-77/+119
| | | | | | | | | | | * Make EGL image attribute specification code more generic, and not specific to certain pixel formats, implicitely gaining support for YUY2 * Better handling of gstbuffers with multiple memory blocks * Print out more information about the stream * Use the GST_VIDEO_INFO_* macros instead of directly accessing the GstVideoInfo fields; this is what the GStreamer documentation recommends Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
* gst-decoder.c: advertise support for GstVideoMetaNicolas Dufresne2017-04-291-0/+25
| | | | | | | | This way, upstream decoder the produce frame with special strides and offsets won't have to copy the frames. This also ensure DMABuf can be delivered to kmscube. Signed-off-by: Nicolas Dufresne <nicolas@ndufresne.ca>
* gst-decoder.c: Improve synchronicity of video outputNicolas Dufresne2017-04-291-0/+4
| | | | | | | | | This is done by setting a max-lateness and enable QoS messaging. This will have the effect that buffer arriving late to the appsink won't will be dropped instead of being queued. This is similar to what GstVideoSink base class would do. Signed-off-by: Nicolas Dufresne <nicolas@ndufresne.ca>
* gst-decoder.c: minor cleanupCarlos Rafael Giani2017-04-291-4/+9
| | | | Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
* gst-decoder.c: add bus watchCarlos Rafael Giani2017-04-291-0/+103
| | | | | | | | | | | | | The bus watch is useful for logging state changes, printing out info/warning/error messages and handling common GStreamer activities like latency redistribution and state change requests (that are sent by elements since they are not allowed to directly change the state). State changes and error messages can also cause a dot graph of the pipeline to be generated if the GST_DEBUG_DUMP_DOT_DIR environment variable is set. See the GST_DEBUG_BIN_TO_DOT_FILE documentation for more. Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
* gst-decoder.c: Use element factory name to detect V4L2 video decoderCarlos Rafael Giani2017-04-291-3/+12
| | | | Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
* gst-decoder.c: look at the caps event instead of the allocation queryCarlos Rafael Giani2017-04-291-7/+6
| | | | Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
* gst-decoder.c: add support for YUY2 pixel formatCarlos Rafael Giani2017-04-291-0/+3
| | | | | | This format is used for example by the i.MX6 CODA hardware video codec Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
* add "kmscube" GStreamer debug categoryCarlos Rafael Giani2017-04-291-0/+3
| | | | | | | | Without this, the various GST_* log macros won't output anything. To enable, add "kmscube:<loglevel>" to the GST_DEBUG environment variable. Example: GST_DEBUG=kmscube:5 Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
* add video cubeRob Clark2017-03-271-0/+340
Uses gstreamer for a simple decoder. If decoder can give us dma-buf's directly, we'll directly use that as a texture (zero copy), otherwise memcpy into a buffer from gbm. This should work with both hw and sw decoders. Probably room for improvement. And the interface between gl and the decoder is pretty simple so I suppose other decoders would be possible. (But hopefully they could already be supported via gstreamer.) Signed-off-by: Rob Clark <robdclark@gmail.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>