Hi,
I am looking for an option where I can embed a movie (small) with my widget and play whenever required. Pls. let me know if its possible.
Thanks in Advance
Hi,
I am looking for an option where I can embed a movie (small) with my widget and play whenever required. Pls. let me know if its possible.
Thanks in Advance
Dear Isa!
You can use QX11EmbedContainer widget and play movie with the help of MPlayer application using with QProcess.
In Qt there is no Movie Player widget.Qt Code:
connect(mp, SIGNAL(finished(int)),this,SLOT(endPlayProcess())); QStringList arguments; arguments<<"-vo"<<"gl2" <<"-wid" << windowId << "-slave" <<mediaPath[currentIndex] << "n"; mp->start(program,arguments);To copy to clipboard, switch view to plain text mode
Last edited by ashukla; 21st January 2008 at 10:33. Reason: line missing
Anurag Shukla
A man who never makes mistake is the man who never does anything! Theodre Rosvelt!
Here mediaPath[currentIndex] means file Name with path which you want to play.
Last edited by ashukla; 21st January 2008 at 10:49.
Anurag Shukla
A man who never makes mistake is the man who never does anything! Theodre Rosvelt!
I have a problem embedding mplayer inside Qt Widget, in kde works fine, but it doesn't work under gnome, the player doesn't show.
Qt Code:
QStringList arguments; arguments << finalVideo << "-wid"<<QString::number(previewBox->winId())<<"-nosound"; mplayerProcess->start(program,arguments);To copy to clipboard, switch view to plain text mode
previewBox is a GroupBox inside a QWidget.
Any help ?
Have you seen Media Player example in Qt 4.4. It plays movie files using phonon
Yes, use Phonon instead of XEmbed. It is included in Qt 4.4.0, and is meant for exactly this solution.
Hi!!
One question, Can i Play a video stream URL with Phonon?
Thanks!
Cheers.
Gustavo A. DÃ*az
artistic.gdnet.com.ar
Yes, Phonon-MediaSource takes a QUrl as its argument.
Hi,
I did:
And it complains "MediaObject.setCurrentSource() has an invalid type"self.mediaObject = Phonon.MediaObject(self)
self.webcamUrl = QUrl("http://gdnet.com.ar:8081")
self.mediaObject.setCurrentSource(self.webcamUrl)
I am using PyQt as well.
I saw in the example that sets the media source for url like that, so i Don't know which is the error :S
Even if I set an url to a ogg file, the same happens.
Any tip? Thanks.
Cheers.
EDIT: never mind, i was doing it wrong. Now i wrote:
self.mediaObject.setCurrentSource(Phonon.MediaSour ce(self.webcamUrl))
Last edited by GuS; 2nd August 2008 at 12:37.
Gustavo A. DÃ*az
artistic.gdnet.com.ar
Bookmarks