We have successfully been able to semi-transparently overlay Qt widgets on top of video using the below script.
- We use the global_alpha value to obtain the semi-transparent overlay of the widget over the video.
- We use color keying of green (green = 0xff, red and blue both 0)
#!/bin/sh
KEY=255
GREEN_KEY=$((KEY * 256))
echo 1 > /sys/devices/platform/omapdss/manager0/alpha_blending_enabled
echo 200 > /sys/devices/platform/omapdss/overlay0/global_alpha
echo 1 > /sys/devices/platform/omapdss/manager0/trans_key_enabled
echo $GREEN_KEY > /sys/devices/platform/omapdss/manager0/trans_key_value
/opt/qt/demos/mydemo/mydemo -qws
We can clearly see the color-keyed video passed through. However, what we really wanted to do was use the ARGB's alpha value for transparency instead of color keying. We have tried several things, but have been unsuccessful. Does anyone have a simple Qt demo that does that? Any suggestions for what to configure in Qt to allow that to work properly? It seems to work on the Windows desktop using the following code, but not on the OMAP 3530:
#include <QtGui/QApplication>
#include "mainwindow.h"
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
MainWindow w;
w.setWindowFlags(Qt::FramelessWindowHint);
w.setAttribute(Qt::WA_TranslucentBackground, true);
w.show();
return a.exec();
}