diff options
author | Rob Clark <robdclark@gmail.com> | 2017-03-15 09:54:04 -0400 |
---|---|---|
committer | Rob Clark <robdclark@gmail.com> | 2017-03-27 11:19:16 -0400 |
commit | 961c85f6eb42e4445513044c9944c83a0d9cb324 (patch) | |
tree | 910f4ac4d44599c6e335e7e6625ddff8ca305a34 /cube-tex.c | |
parent | 4f4801b2b1f1aa00914f0c79fd3ab5ae8db2d284 (diff) | |
download | kmscube-961c85f6eb42e4445513044c9944c83a0d9cb324.tar.gz |
add video cube
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>
Diffstat (limited to 'cube-tex.c')
-rw-r--r-- | cube-tex.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -46,7 +46,7 @@ struct { GLuint tex[2]; } gl; -static const struct egl *egl = &gl.egl; +const struct egl *egl = &gl.egl; static const GLfloat vVertices[] = { // front @@ -81,7 +81,7 @@ static const GLfloat vVertices[] = { +1.0f, -1.0f, +1.0f, }; -static const GLfloat vTexCoords[] = { +GLfloat vTexCoords[] = { //front 1.0f, 1.0f, 0.0f, 1.0f, @@ -443,6 +443,7 @@ static int init_tex(enum mode mode) case NV12_1IMG: return init_tex_nv12_1img(); case SMOOTH: + case VIDEO: assert(!"unreachable"); return -1; } |