| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
Qt Multimedia has now some generic helper functions to upload
the video data into textures. This way, we can greatly simplify
the rendering code in qtmultimediaquicktools.
Change-Id: I5b0e3eb96cbcf79fe5e9757697f11b0183132b17
Reviewed-by: Doris Verria <doris.verria@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
frame mapping is still done in qtmultimediaquicktools, but once
that's moved as well, we can radically simplify the rendering
code there.
Change-Id: Ia56c8b62c5726f1bfea0b0c4c46a81e103141e9e
Reviewed-by: Doris Verria <doris.verria@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The shader layout is pretty generic, and QVideoSurfaceFormat
can give us both the shaders and uniform data that we need
to render the video.
All the user needs to do then is to provide geometry with a
2D texture coordinate to render the video onto any surface.
Change-Id: I95006eaf4a6f039006b8a5da0f53143da03e1ecb
Reviewed-by: Doris Verria <doris.verria@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Request GL textures from the pipeline for now. Some initial code
to also use the texture upload meta functionality in gstreamer,
but that will require some more work so we don't make the GL
context current in the wrong thread.
The gstreamer VAAPI elements on AMD hardware (or in general...)
seem to have some bugs. Converting a VASurface to a GL texture
using the texture upload meta doesn't create an ARGB texture as
promised, but does write some YUV data into the texture. And
trying to map a SW buffer received from the VAAPI decoders fails.
Change-Id: I9b629eb84f3f32adc23ae2e2fd1cd3e42e6afbc0
Reviewed-by: Doris Verria <doris.verria@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We're using RHI here, as that's what we need for Qt Quick anyway.
You can now set a QRhi object on QVideoSink. This can then be
used internally to create textures of the required format instead
of memory buffers.
QVideoSurfaceFormat will now tell you how many planes are required
for the format, and you can retrieve the textures for each plane
from QVideoFrame.
Change-Id: I86430db60a8f1aba07ec3b38e22b977cdaefaa0a
Reviewed-by: Doris Verria <doris.verria@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Those are HDR formats with 10 bit color depth. But since our
target surface has only 8 bits of color depth, we can simply
ignore the two least significant bits when rendering.
Fortunately, the format makes it rather easy to do that as it
always uses 16bits per channel.
Change-Id: I20490b4641715903797068b9af13ebbfcbea63e5
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Doris Verria <doris.verria@qt.io>
|
|
|
|
|
|
| |
Change-Id: Ifa888c74c397c640b19387a9ce624dfcf8269c2c
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Doris Verria <doris.verria@qt.io>
|
|
|
|
|
|
|
|
|
| |
This is a property of the individual QVideoFrame, and doesn't
belong here.
Change-Id: I85f180ff46023f6a48ef856a356d9c45c3f6be1b
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Doris Verria <doris.verria@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
QAbstractVideoBuffer is a class that is only required inside our
implementation, so we can make it private. This change prepares
for it.
Change-Id: I4ba4542c1eab742f2fc93231e2e5063dbc5d5e94
Reviewed-by: Doris Verria <doris.verria@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
Use clang-modernize to modernize the code base
* Use = default where applicable
* Use nullptr
Change-Id: I88b307e76b7f7dde090354ff4b292cea76f5c60c
Reviewed-by: Doris Verria <doris.verria@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
| |
Run clang-tidy over the code base with some code modernization
options.
Change-Id: I9e74d1225bce333e74224e3b92c02c7e9884d8f5
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Doris Verria <doris.verria@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For QVideoFrame::Format_NV12 and Format_NV21 formats
added a possibility to provide the video frames in
QAbstractVideoBuffer::GLTextureHandle, MTLTextureHandle multiple textures.
Currently QVideoFrame::handle() is used to have only one texture.
Which limits the video frames only for RGBA format.
NV12/NV21 requires 2 textures, one for chroma and for luma components.
So QVideoFrane::handle() must return a list with 2 native handlers.
The patch allows to render the video frames in NV12/NV21 formats
with multiple textures, using current QSGTexture's to avoid
uploading/downloading the data.
Change-Id: I3e6e734948a43dc77bfd2dcacb69cf8ffefdb813
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
|
|
|
|
|
|
|
| |
Since compare() can be called before updateUniformData()
Change-Id: I7a1e0a08926cbf6d5629468b8bf64dcd7602b399
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
|
|
|
|
|
| |
Change-Id: I463d3a1541cee1fcf4a6b6d1e2e1eac85fbfc682
Reviewed-by: Val Doroshchuk <valentyn.doroshchuk@qt.io>
|
|
|
|
|
| |
Change-Id: I625bb06f81ce9860d49d7998cc49c304f2d6b848
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
|
|
|
|
|
|
|
|
| |
Now QSGMaterialShader handles rhi textures too.
Task-number: QTBUG-78678
Change-Id: I410185c80bd104741fd5b52deeb87eb97531410a
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
|
|
|
|
|
|
|
|
| |
Added RHI shaders for RGB*, YUV* and opengl texture video frames.
Task-number: QTBUG-78678
Change-Id: I045d6a806fea059a80b8e5d9817b6997af8d0f41
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
|
|
|
|
|
|
|
|
|
| |
- Adapt to QOpenGLWidgets split
- Use new Q_MOC_INCLUDE directive where required
- Fix QtConcurrent usage
Change-Id: I9de650ae4fbbd397ef4fd4650c8aa5a0443d566f
Reviewed-by: Vitaly Fanaskov <vitaly.fanaskov@qt.io>
|
|
|
|
|
|
|
|
|
| |
[ChangeLog] Added QVideoFrame::Format_YUV422P.
Change-Id: If7741db00cf0b628d7fc4b1cd3a6e424e0f8e2c0
Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
|
|
|
|
|
|
|
|
|
| |
The comment contains information which makes it misleading to understand
how the components are passed.
Change-Id: I29cdb5eec1e8014fa7f0ca3f1a0f54258fdb431f
Reviewed-by: Tomasz Olszak <olszak.tomasz@gmail.com>
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
When requesting a OGL Core profile via QSurfaceFormat::setDefaultFormat (e.g. to use Qt3D advanced features),
it is no longer possible to render QML Video items. This is because the requested shaders should be _core versions.
This patch adds the core shaders so QtMultimedia stops whining, and bind textures with the proper
format, since GL_LUMINANCE and GL_LUMINANCE_ALPHA are no longer valid in OGL 4.
Task-number: QTBUG-51064
Change-Id: I909e01e7dc7be07549e9ecf0a6425b309af38ea1
Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
Reviewed-by: Christian Stromme <christian.stromme@qt.io>
|
|\
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/plugins/avfoundation/mediaplayer/avfmediaplayersession.h
src/plugins/avfoundation/mediaplayer/avfmediaplayersession.mm
Change-Id: Ic43fb2a805ed9f0f2ea48993d47859716f1f11b4
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Idea is to upload YUYV/UYVY data as 2 textures and use GL_LINEAR like
in biplanar formats. Having proper interpolation of only one texture
(using e.g. mix function) resulted in vertical and horizontal 1 pixel
stripes depending on scale. The reason was float precision and
unexpected value of fract function. Additionally branching in shader
is expensive so this solution should be more performant.
Task-number: QTBUG-62155
Change-Id: I7ceeb09b4a54eecd16640a626b499d638b52c127
Reviewed-by: Christian Stromme <christian.stromme@qt.io>
|
|/
|
|
|
| |
Change-Id: I17b3650a3df5688274151c1f2c4629e4a5062028
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
| |
Change-Id: Ifd439abf21877adff57080489324bea729ee5279
Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
This patch implements support for rendering of UYVY and YUYV sources when using
QtQuick for preview.
[ChangeLog][QtQuick][Rendering] Support for YUV 4:2:2 8bit has
been implemented for the QtQuick viewfinder.
Change-Id: I4d98f3c44240ee53f7708bc6bd84e7fb83aac069
Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see
http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/
Updated license headers to use new LGPL header instead of LGPL21 one
(in those files which will be under LGPL v3)
Change-Id: I324f65c61171f36641472964d095d72e452afb3a
Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
|
|
|
|
|
|
|
|
|
| |
- Add missing "We mean it" comment
- Add missing '_p' suffix for QtMultimediaQuick_p headers
Task-number: QTBUG-49480
Change-Id: I1fd4f8b2fdffecebaebaedaf1b78e1da62c08156
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
|
|
|
|
|
|
|
|
|
| |
Don't consider a material equal to another when their texture IDs
are not available yet.
Change-Id: Id4127d71abb2db33950a206dc722b24ab626e960
Task-number: QTBUG-47205
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
|
|
|
|
|
|
|
|
|
|
| |
fe13f5bb introduced a bug which could leave the active texture unit set
to GL_TEXTURE1 or GL_TEXTURE2. When the material is done updating its
state, it needs to make sure the active texture unit is reset to 0
since other materials might assume that's the current value.
Change-Id: I64a6a0cd9fcecdf0fa483909193f70045ff0e9fe
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
| |
- Load shader source from resource files.
- Correctly report material types: each material can use different
shaders depending on the video pixel format but it was reporting
a unique material type. This was causing the node to keep using
the same shader even if its pixel format changed.
Change-Id: Ib903ecd6e7dd1dd56d7cefe255ab7049933df17d
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
|
|
Add new fragment shaders and update declarative render (video node) to support NV12/NV21
pixel format.
Task-number: QTBUG-45021
Change-Id: I5d52007f0da56165752268d06efca156f7496b42
Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
|