PDA

View Full Version : How to play .swf files in QT?



ranjithrajrrr
1st September 2016, 13:34
Dear All,

Since I am new to QT programming i am not aware of how to play .swf files in QT widget. Please explain me with a small program so that it will be easy to understand. Any help is appreciated.

Thanks,
Ranjith

d_stranz
1st September 2016, 17:43
I am sure you can find plenty of information in the Qt Multimedia examples (http://doc.qt.io/qt-5/multimedia-examples.html), especially the Video Widget example (http://doc.qt.io/qt-5/qtmultimedia-multimediawidgets-videowidget-example.html).

ranjithrajrrr
2nd September 2016, 07:50
Thanks for ur reply.. But i dont see any option for playinf .swf in those examples.. Please help..

d_stranz
2nd September 2016, 17:14
Sorry. After investigating some more, it looks like swf is not supported by Qt. There is an old open-source project called "gameswf" that is supposed to render using OpenGL. You might be able to integrate that to play swf in a QOpenGLWidget. Find it here. (https://sourceforge.net/projects/tu-testbed/)

anda_skoa
2nd September 2016, 17:52
Sorry. After investigating some more, it looks like swf is not supported by Qt.

It will depend on the multimedia framework used by Qt, e.g. platform dependent and even dependent on installed codecs.

Obviously that only works for videos, not interactive content, even if supported.



There is an old open-source project called "gameswf" that is supposed to render using OpenGL

There are various flash implementations, which might or might not be integratable into an application,
Alternatively an application can theoretically provide the host side of the browser plugin interfaces used by the Adobe Flash plugin or use a web render engine that supports loading such plugins.

Since Flash is a dead technology, it is questionable if any of that effort is really worthwhile.

Cheers,
_

d_stranz
3rd September 2016, 17:47
It will depend on the multimedia framework used by Qt, e.g. platform dependent and even dependent on installed codecs.

My googling didn't lead me to anything that suggested codecs were available. Most of what I found was web browser plugins. gameswf was the closest thing I could find to a codec and it isn't really.


Since Flash is a dead technology, it is questionable if any of that effort is really worthwhile.

True.