i'm trying alpha-blending effect in qml video in rgba.
now problem video item supplied qtmultimedia actualy opens overlaying window in qtquick scene, don't think it's possible alpha-blend other qml elements video element (i sure hope i'm wrong, can't find solution).
so way rendering video myself in class inherits qquickitem, in updatepaintnode method.
has seen before? possible if guys behind qtmultimedia couldn't achieve it?
can maybe change background of mediaplayer element, maybe transparent or color in qml?
so far thinking qabstractvideosurface , qvideoframe have no idea how render onto qsg, or how should geometrynode video.
the best solution alpha-blending other qml elements example in:
rectangle { width: 1024 height: 768 color: "yellow" focus: true video { id: video anchors.fill: parent source: "alpha-video.mov" autoplay: true } } thanks in advance!
i tried few things, in end used qt example called videowidget uses qabstractvideosurface , qvideoframe, , painted frames in qquickpainteditem, using mediaplayer load data qml.
it's important put argb32 on top of qlist describes supported pixel formats in qabstractvideosurface, unfortunately qt logic take first availibe format , that's why native video element doesn't show alpha channel (it plays video in rgb32, either or it's thing overlaying window in native element instead of painting in qtquick scene graph).
Comments
Post a Comment