[Solved] Video not shown. Change alpha value of a plane
-
Hi,
I am a beginner in Qt + OpenGL. I am working with a browser, built using QT and OpenGL, on an ARM machine with customized Embedded Linux OS. My browser works fine with the UI part, it needs to render. But I need to play some video when a particular URL is loaded, Since my platform doesnt support video tag(I'll need to modify driver, which is not recommended for my requirement), what I do now is parse the URL loaded, and if it matches with the one, of the video, my browser invokes the mediaplayer. But I can hear the audio, video is not shown. What I see on the screen is the UI of the previous URL loaded. I am afraid it gets played on the background. Such a conclusion because, the mediaplayer logs show the state as playing, and audio is well played. I need to change the transparecy of the graphics plane and make it completely transparent. If there are any opengl calls to change the alpha value, please do help.
I have tried using setwindowopacity(), but it doesnt work.
Req: Change the transparency of graphics plane
Please do help....
-
Hi,
on app's init try this:
QScreen* pFrameBuffer = NULL;
pFrameBuffer = QScreen::instance () ;if( pFrameBuffer)
pFrameBuffer->blank(true);hope this helps!
now you've just made me curious on your web browser on ARM linux embedded : I did something similar and I would appreciate if you could share some of your design ideas: you mentioned qt + opengl(es), are you using QGLWidget and/or QGraphicsView?
Thanks!
-
Hi and thanks NlcuPopescu...
I'll try that code snippet and update the result ASAP. Can you please explain what is being done with that?? The screen instance is made blank?
Yeah, My application uses both QGLWidget and QGraphicsView.
It also uses QGraphicsWebView... May I know if you need any more details... :)
Thanks again...
-
I think, it set the frame buffer's color map to rgba(0,0,0,0) ... at least it thouchs the cmap's transparency and set it to 0 ... cmap could be also modified by ioctls and we used that till we found a qt solution
I use Qt 4.8.0 too ... in 5.0 as far as I can see is there a QScreen class too, but its API has changed