Re: [Mesa-dev] GBM, KMS/DRM, triple buffering

2018-02-09 Thread Carlos Rafael Giani
not supported. But this is odd - is this really not implemented yet for the i.MX6? And why does drmModePageFlip() still work with DRM_MODE_PAGE_FLIP_EVENT ? On 2018-02-09 17:05, Daniel Stone wrote: Hi Carlos, On 9 February 2018 at 08:33, Carlos Rafael Giani wrote: I want to implement

[Mesa-dev] GBM, KMS/DRM, triple buffering

2018-02-09 Thread Carlos Rafael Giani
I want to implement triple buffering instead of double buffering for a program that uses EGL on GBM on a KMS-enabled platform. So far, I used kmscube as an example. However, I do not see where I can specify that I want to have 3 buffers allocated instead of 2. From what I saw, I could try to c

Re: [Mesa-dev] [PATCH kmscube 1/2] gst-decoder.c: set EGL_DMA_BUF attributes upon variable declaration

2017-05-02 Thread Carlos Rafael Giani
On 2017-05-02 15:32, Emil Velikov wrote: Carlos, care to throw a comment why it's using nmem and not something else - say is_dmabuf_mem? Hm, I do see a potential problem now. The code that maps/unmaps the buffer and calls buf_to_fd() should also set nmems to 1. Then the close() loop is corre

Re: [Mesa-dev] [PATCH v3 01/12] output more and improved information about EGL and OpenGL ES 2.x - subject prefix error

2017-04-26 Thread Carlos Rafael Giani
Strange ... for some reason, the prefix is wrong, and "kmscube" is missing. Sorry about that. This set of 12 patches is to be applied against kmscube. Anyway, that's the last patchset version I'll post until it is merged and/or reviewed. On 2017-04-26 20:56, Carlo

[Mesa-dev] [PATCH v3 12/12] cube-video: Add switch for enabling synced playback

2017-04-26 Thread Carlos Rafael Giani
With synced playback, frames may be dropped if the OpenGL ES code does not output the decoded frames in time, thereby making sure the timestamps in the video aren't missed Signed-off-by: Carlos Rafael Giani --- common.h | 8 cube-video.c | 9 ++--- gst-decoder.c

[Mesa-dev] [PATCH v3 09/12] gst-decoder.c: Improve synchronicity of video output

2017-04-26 Thread Carlos Rafael Giani
From: Nicolas Dufresne 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 ---

[Mesa-dev] [PATCH v3 07/12] gst-decoder.c: minor cleanup

2017-04-26 Thread Carlos Rafael Giani
Signed-off-by: Carlos Rafael Giani --- gst-decoder.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/gst-decoder.c b/gst-decoder.c index d1cb18c..768aa1b 100644 --- a/gst-decoder.c +++ b/gst-decoder.c @@ -42,6 +42,8 @@ GST_DEBUG_CATEGORY_EXTERN(kmscube_debug

[Mesa-dev] [PATCH v3 05/12] gst-decoder.c: Use element factory name to detect V4L2 video decoder

2017-04-26 Thread Carlos Rafael Giani
Signed-off-by: Carlos Rafael Giani --- gst-decoder.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/gst-decoder.c b/gst-decoder.c index 51304a2..05d73b7 100644 --- a/gst-decoder.c +++ b/gst-decoder.c @@ -115,15 +115,24 @@ gst_thread_func(void *args) static

[Mesa-dev] [PATCH v3 08/12] gst-decoder.c: improve buffer_to_image() function

2017-04-26 Thread Carlos Rafael Giani
directly accessing the GstVideoInfo fields; this is what the GStreamer documentation recommends Signed-off-by: Carlos Rafael Giani --- gst-decoder.c | 196 +++--- 1 file changed, 119 insertions(+), 77 deletions(-) diff --git a/gst-decoder.c b/gst

[Mesa-dev] [PATCH v3 03/12] gst-decoder.c: add support for YUY2 pixel format

2017-04-26 Thread Carlos Rafael Giani
This format is used for example by the i.MX6 CODA hardware video codec Signed-off-by: Carlos Rafael Giani --- gst-decoder.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gst-decoder.c b/gst-decoder.c index 22dc068..fd28201 100644 --- a/gst-decoder.c +++ b/gst-decoder.c @@ -91,6 +91,9

[Mesa-dev] [PATCH v3 04/12] gst-decoder.c: look at the caps event instead of the allocation query

2017-04-26 Thread Carlos Rafael Giani
Signed-off-by: Carlos Rafael Giani --- gst-decoder.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/gst-decoder.c b/gst-decoder.c index fd28201..51304a2 100644 --- a/gst-decoder.c +++ b/gst-decoder.c @@ -63,24 +63,23 @@ static GstPadProbeReturn pad_probe

[Mesa-dev] [PATCH v3 06/12] gst-decoder.c: add bus watch

2017-04-26 Thread Carlos Rafael Giani
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 --- gst-decoder.c | 103

[Mesa-dev] [PATCH v3 11/12] configure.ac: Make GStreamer 1.6.0 the minimum requirement for cube-video

2017-04-26 Thread Carlos Rafael Giani
Signed-off-by: Carlos Rafael Giani --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index f564ef3..b5a0519 100644 --- a/configure.ac +++ b/configure.ac @@ -41,7 +41,7 @@ PKG_CHECK_MODULES(EGL, egl) PKG_CHECK_MODULES(GLES2, glesv2

[Mesa-dev] [PATCH v3 01/12] output more and improved information about EGL and OpenGL ES 2.x

2017-04-26 Thread Carlos Rafael Giani
Signed-off-by: Carlos Rafael Giani --- common.c | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/common.c b/common.c index 64c4f91..610ff87 100644 --- a/common.c +++ b/common.c @@ -125,9 +125,12 @@ int init_egl(struct egl *egl, const struct gbm *gbm

[Mesa-dev] [PATCH v3 10/12] gst-decoder.c: advertise support for GstVideoMeta

2017-04-26 Thread Carlos Rafael Giani
From: Nicolas Dufresne 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 --- gst-decoder.c | 25 + 1 file changed, 25 insertio

[Mesa-dev] [PATCH v3 02/12] add "kmscube" GStreamer debug category

2017-04-26 Thread Carlos Rafael Giani
Without this, the various GST_* log macros won't output anything. To enable, add "kmscube:" to the GST_DEBUG environment variable. Example: GST_DEBUG=kmscube:5 Signed-off-by: Carlos Rafael Giani --- gst-decoder.c | 3 +++ kmscube.c | 4 +++- 2 files changed, 6 insertions

[Mesa-dev] [PATCH kmscube v2 08/10] gst-decoder.c: use a custom appsink subclass to make sure videometa exists

2017-04-11 Thread Carlos Rafael Giani
Signed-off-by: Carlos Rafael Giani --- Makefile.am | 2 +- gst-decoder.c | 20 - gst-video-appsink.c | 126 gst-video-appsink.h | 31 + kmscube.c | 2 + 5 files changed, 178 insertions(+), 3

[Mesa-dev] [PATCH kmscube v2 07/10] gst-decoder.c: minor cleanup

2017-04-11 Thread Carlos Rafael Giani
Signed-off-by: Carlos Rafael Giani --- gst-decoder.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/gst-decoder.c b/gst-decoder.c index d1cb18c..768aa1b 100644 --- a/gst-decoder.c +++ b/gst-decoder.c @@ -42,6 +42,8 @@ GST_DEBUG_CATEGORY_EXTERN(kmscube_debug

[Mesa-dev] [PATCH kmscube v2 04/10] gst-decoder.c: look at the caps event instead of the allocation query

2017-04-11 Thread Carlos Rafael Giani
Signed-off-by: Carlos Rafael Giani --- gst-decoder.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/gst-decoder.c b/gst-decoder.c index fd28201..51304a2 100644 --- a/gst-decoder.c +++ b/gst-decoder.c @@ -63,24 +63,23 @@ static GstPadProbeReturn pad_probe

[Mesa-dev] [PATCH kmscube v2 01/10] output more and improved information about EGL and OpenGL ES 2.x

2017-04-11 Thread Carlos Rafael Giani
Signed-off-by: Carlos Rafael Giani --- common.c | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/common.c b/common.c index 4bf3c5a..4d29eef 100644 --- a/common.c +++ b/common.c @@ -97,9 +97,12 @@ int init_egl(struct egl *egl, const struct gbm *gbm

[Mesa-dev] [PATCH kmscube v2 09/10] gst-decoder.c: Improve synchronicity of video output

2017-04-11 Thread Carlos Rafael Giani
sync=false causes a sink to output data as fast as it can. This explains why without max-buffers=2 the pipeline used to use up 100's of MB of buffers. Instead, set sync to true, and enable frame dropping, to make sure the video playback speed remains intact. Signed-off-by: Carlos Rafael

[Mesa-dev] [PATCH kmscube v2 06/10] gst-decoder.c: add bus watch

2017-04-11 Thread Carlos Rafael Giani
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 --- gst-decoder.c | 103

[Mesa-dev] [PATCH kmscube v2 10/10] gst-decoder.c: improve buffer_to_image() function

2017-04-11 Thread Carlos Rafael Giani
directly accessing the GstVideoInfo fields; this is what the GStreamer documentation recommends Signed-off-by: Carlos Rafael Giani --- gst-decoder.c | 196 +++--- 1 file changed, 119 insertions(+), 77 deletions(-) diff --git a/gst-decoder.c b/gst

[Mesa-dev] [PATCH kmscube v2 05/10] gst-decoder.c: Use element factory name to detect V4L2 video decoder

2017-04-11 Thread Carlos Rafael Giani
Signed-off-by: Carlos Rafael Giani --- gst-decoder.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/gst-decoder.c b/gst-decoder.c index 51304a2..05d73b7 100644 --- a/gst-decoder.c +++ b/gst-decoder.c @@ -115,15 +115,24 @@ gst_thread_func(void *args) static

[Mesa-dev] [PATCH kmscube v2 02/10] add "kmscube" GStreamer debug category

2017-04-11 Thread Carlos Rafael Giani
Without this, the various GST_* log macros won't output anything. To enable, add "kmscube:" to the GST_DEBUG environment variable. Example: GST_DEBUG=kmscube:5 Signed-off-by: Carlos Rafael Giani --- gst-decoder.c | 3 +++ kmscube.c | 4 +++- 2 files changed, 6 insertions

[Mesa-dev] [PATCH kmscube v2 03/10] gst-decoder.c: add support for YUY2 pixel format

2017-04-11 Thread Carlos Rafael Giani
This format is used for example by the i.MX6 CODA hardware video codec Signed-off-by: Carlos Rafael Giani --- gst-decoder.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gst-decoder.c b/gst-decoder.c index 22dc068..fd28201 100644 --- a/gst-decoder.c +++ b/gst-decoder.c @@ -91,6 +91,9

[Mesa-dev] [PATCH kmscube 1/2] gst-decoder.c: Only gst_is_dmabuf_memory() once

2017-04-10 Thread Carlos Rafael Giani
This prevents potential segfaults in case the buffer was merged and the mem pointer is then no longer valid Signed-off-by: Carlos Rafael Giani --- gst-decoder.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/gst-decoder.c b/gst-decoder.c index e59148a..cc5c3b2

[Mesa-dev] [PATCH kmscube 2/2] gst-video-appsink: Cleanup & add max-lateness & enable QoS

2017-04-10 Thread Carlos Rafael Giani
The QoS and max-lateness settings are copied from GstVideoSink, since here, the appsink subclass specifically handles video Signed-off-by: Carlos Rafael Giani --- gst-video-appsink.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gst-video-appsink.c b/gst-video

[Mesa-dev] [Mesa-dev,kmscube 07/10] gst-decoder.c: minor cleanup

2017-04-07 Thread Carlos Rafael Giani
Signed-off-by: Carlos Rafael Giani --- gst-decoder.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/gst-decoder.c b/gst-decoder.c index d1cb18c..768aa1b 100644 --- a/gst-decoder.c +++ b/gst-decoder.c @@ -42,6 +42,8 @@ GST_DEBUG_CATEGORY_EXTERN(kmscube_debug

[Mesa-dev] [Mesa-dev,kmscube 06/10] gst-decoder.c: add bus watch

2017-04-07 Thread Carlos Rafael Giani
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 --- gst-decoder.c | 103

[Mesa-dev] [Mesa-dev, kmscube 10/10] gst-decoder.c: improve buffer_to_image() function

2017-04-07 Thread Carlos Rafael Giani
directly accessing the GstVideoInfo fields; this is what the GStreamer documentation recommends Signed-off-by: Carlos Rafael Giani --- gst-decoder.c | 191 +++--- 1 file changed, 114 insertions(+), 77 deletions(-) diff --git a/gst-decoder.c b/gst

[Mesa-dev] [Mesa-dev, kmscube 04/10] gst-decoder.c: look at the caps event instead of the allocation query

2017-04-07 Thread Carlos Rafael Giani
Signed-off-by: Carlos Rafael Giani --- gst-decoder.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/gst-decoder.c b/gst-decoder.c index fd28201..51304a2 100644 --- a/gst-decoder.c +++ b/gst-decoder.c @@ -63,24 +63,23 @@ static GstPadProbeReturn pad_probe

[Mesa-dev] [Mesa-dev, kmscube 09/10] gst-decoder.c: Improve synchronicity of video output

2017-04-07 Thread Carlos Rafael Giani
sync=false causes a sink to output data as fast as it can. This explains why without max-buffers=2 the pipeline used to use up 100's of MB of buffers. Instead, set sync to true, and enable frame dropping, to make sure the video playback speed remains intact. Signed-off-by: Carlos Rafael

[Mesa-dev] [Mesa-dev, kmscube 02/10] add "kmscube" GStreamer debug category

2017-04-07 Thread Carlos Rafael Giani
Without this, the various GST_* log macros won't output anything. To enable, add "kmscube:" to the GST_DEBUG environment variable. Example: GST_DEBUG=kmscube:5 Signed-off-by: Carlos Rafael Giani --- gst-decoder.c | 3 +++ kmscube.c | 4 +++- 2 files changed, 6 insertions

[Mesa-dev] [Mesa-dev, kmscube 05/10] gst-decoder.c: Use element factory name to detect V4L2 video decoder

2017-04-07 Thread Carlos Rafael Giani
Signed-off-by: Carlos Rafael Giani --- gst-decoder.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/gst-decoder.c b/gst-decoder.c index 51304a2..05d73b7 100644 --- a/gst-decoder.c +++ b/gst-decoder.c @@ -115,15 +115,24 @@ gst_thread_func(void *args) static

[Mesa-dev] [Mesa-dev, kmscube 03/10] gst-decoder.c: add support for YUY2 pixel format

2017-04-07 Thread Carlos Rafael Giani
This format is used for example by the i.MX6 CODA hardware video codec Signed-off-by: Carlos Rafael Giani --- gst-decoder.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gst-decoder.c b/gst-decoder.c index 22dc068..fd28201 100644 --- a/gst-decoder.c +++ b/gst-decoder.c @@ -91,6 +91,9

[Mesa-dev] [Mesa-dev, kmscube 01/10] output more and improved information about EGL and OpenGL ES 2.x

2017-04-07 Thread Carlos Rafael Giani
Signed-off-by: Carlos Rafael Giani --- common.c | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/common.c b/common.c index 4bf3c5a..4d29eef 100644 --- a/common.c +++ b/common.c @@ -97,9 +97,12 @@ int init_egl(struct egl *egl, const struct gbm *gbm

[Mesa-dev] [Mesa-dev, kmscube 08/10] gst-decoder.c: use a custom appsink subclass to make sure videometa exists

2017-04-07 Thread Carlos Rafael Giani
Signed-off-by: Carlos Rafael Giani --- Makefile.am | 2 +- gst-decoder.c | 20 - gst-video-appsink.c | 126 gst-video-appsink.h | 31 + kmscube.c | 2 + 5 files changed, 178 insertions(+), 3