[Qt-interest] embedding video in QGraphicsView
Pritam Ghanghas
pritam_ghanghas at infosys.com
Wed Nov 11 10:58:43 CET 2009
Hi
This is my second mail about the same topic. I didn't realize and posted
last time in HTML.
I am having trouble with embedding video in QGraphicsView with qt4.5.
After some fruitless efforts with 4.5 I downloaded 4.6 preview and
the same code works fine.
with 4.5 I even tried the code provided in this post
http://labs.trolltech.com/blogs/2008/11/28/videos-get-pimped/
but it didnt work. Surprisingly even this one works with 4.6. I even
tried the embedding the mediaplayer provided in qtdemos like this
#include "mediaplayer.h"
#include <QtGui>
int main(int argc, char *argv[])
{
Q_INIT_RESOURCE(mediaplayer);
QApplication app(argc, argv);
QGraphicsScene scene(10,10,600,600);
QGraphicsView view(&scene);
view.setGeometry(0,0,800,600);
MediaPlayer *player = new
MediaPlayer(QString("/home/user/Desktop/meet.ogv"));
QGraphicsProxyWidget *embedded_player = scene.addWidget(player);
view.show();
return app.exec();
}
This also works fine in 4.6 but plays only audio in 4.5.
All this works fine with 4.5 standalone ( ie when I dont embed it into a
QGV).
Regards,
Pritam
--
Thanks & Regards,
Pritam Ghanghas
PIE-DCS, InfyCity,
Bangalore
**************** CAUTION - Disclaimer *****************
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely
for the use of the addressee(s). If you are not the intended recipient, please
notify the sender by e-mail and delete the original message. Further, you are not
to copy, disclose, or distribute this e-mail or its contents to any other person and
any such actions are unlawful. This e-mail may contain viruses. Infosys has taken
every reasonable precaution to minimize this risk, but is not liable for any damage
you may sustain as a result of any virus in this e-mail. You should carry out your
own virus checks before opening the e-mail or attachment. Infosys reserves the
right to monitor and review the content of all messages sent to or from this e-mail
address. Messages sent to or from this e-mail address may be stored on the
Infosys e-mail system.
***INFOSYS******** End of Disclaimer ********INFOSYS***
More information about the Qt-interest-old
mailing list