[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: A newbie question about QXEmbed
From:       "koos vriezen" <koos.vriezen () gmail ! com>
Date:       2008-06-08 12:51:34
Message-ID: d4e708d60806080551y92ac6eajc431817a7dbb61c3 () mail ! gmail ! com
[Download RAW message or body]

2008/6/8 Otávio Souza <aragao.otavio@gmail.com>:
> You didn't forget the QProcess::start(), you did it at if ( !mp->start() )
>
> Try to show up the window first, than you start the mplayer process, you can
> try to start another app, like kwrite ou anything else
>
> If this doesn't work, try to qDebug the QXEmbed winId, and do mplayer by
> hand, copy and paste with the command

Really, you don't need QXEmbed. Here is a minimalistic mplayer frontend:

#include <qapplication.h>
#include <qwidget.h>

int main( int argc, char **argv ) {
    QApplication app( argc, argv );
    QWidget *window = new QWidget;
    window->show();
    window->setUpdatesEnabled( false ); //call this when you start the
mplayer process
    qDebug( "Window id=%d", window->winId() );
    app.exec();
    return 0;
}

g++ -o qmplayer qmplayer.cpp -I/usr/share/qt3/include -lqt-mt

run ./qmplayer
and from another shell
mplayer -wid <id-that-is-printed> moviefile



> And now, try to see if mplayer is running
>
> Em Sáb, 2008-06-07 às 21:39 +0200, koos vriezen escreveu:
>
> 2008/6/7 Robert Wood <robert.wood@apostrophe.co.uk>:
>> I'm trying to develop a little open source application to set-up and use
>> Hauppauge boxes on Linux. I'm using KDevelop and have got to the stage
>> where I can set-up the box and alter its settings just fine. However,
>> what I would now like to do is embed a small mplayer Window within my
>> application.
>>
>> It looks like QXEmbed is what I need to use, but no matter what I have
>> tried I cannot get it to work.
>
> mplayer -wid option is for outputting video in an existing window,
> where the X Window is passed with the wid option.
> You assume however that mplayer creates a window that then needs to be
> embedded. Which is wrong.
>
> Br.
> Koos
>
>>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe
>>> <<
>
> --
> Otávio Souza
>
> * MSLC-SE
> * Representante Fedora-SE
> * Criador do KinuX Linux
> * Promotor KDE
> * lunatiKo
>
>>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe
>>> <<
>
>
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic