Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 1

Qt-interest Archive, January 2008
Trying to use Phonon in 4.4-tp1

Pages: Prev | 1 | 2 | Next

Message 1 in thread

Hi,

I've used the technology preview 1 of the upcoming 4.4 version of Qt for a 
week or so and it's been working very nicely so far. Tonight I decided to try 
out Phonon for a small app but there I ran into problems.

I installed all the needed GStreamer packages (for Kubuntu 7.10) and the 
Phonon part compiled ok and I see a libphonon.so.5 library among the other Qt 
libraries. So far so good.

Then I compiled the "Music Player Example" app and it compiled just fine and 
starts somewhat ok except for this warning:

Phonon::createPath: Cannot connect Phonon::MediaObject(no objectName) to 
Phonon::AudioOutput(no objectName).

The music player then does absolutely nothing and does not allow for any 
playback. I can load files but no meta data is shown and they can't be played 
(mp3, wav or ogg). So, something is broken.

Then I tried the "Capabilities Example" too and it also compiles cleanly but 
when executed all the windows remain completely empty. So, something is very 
clearly broken.

I don't use GStreamer for anything at all on my system (afaik) as I only run 
KDE and Qt apps, so perhaps something isn't running or not configured? The 
docs for installing Phonon didn't mention that anything needs to be 
configured or running (perhaps they assume everyone is running a Gnome 
desktop with a configured GStreamer?).

I can play stuff using GStreamer's commandline tools, like this:

% gst-launch filesrc location=song.mp3 ! mad ! audioconvert ! audioresample ! 	
alsasink

and it works as it should, audio works ok. All the "tests" in the document 
here work ok:

http://gstreamer.freedesktop.org/data/doc/gstreamer/head/faq/html/chapter-using.html

Some furious Googling didn't turn up anything at all and this list has 
apparently never even mentioned Phonon so I'm at a loss as to where I should 
start digging. And getting a newer snapshot of 4.4 is probably useless until 
Phonon is next time sync:ed into the Qt sources, right?

Any hints for a frustrated little newbie?

Best regards,
    Jan Ekholm

-- 
 [ signature omitted ] 

Message 2 in thread

Quoting Jan Ekholm <jan.ekholm@xxxxxxxxxxxx>:

I have not used Phonon from Qt 4.4 yet but it should work fine as KDE  
4.0 is using that code (with Qt 4.3).

My advise:
- Take a look at Dragon Player (http://dragonplayer.org/), a video  
player for KDE 4 using Phonon
- Until Qt 4.4 is released and Trolltech provides official support,  
the IRC channel #phonon in Freenode is the best resource for help.  
Matthias Kretz and the other developers of Phonon are usually there  
and are keen to help. You will also find help in #kde4-devel, as KDE  
4.0 uses Phonon.

>
> Hi,
>
> I've used the technology preview 1 of the upcoming 4.4 version of Qt for a
> week or so and it's been working very nicely so far. Tonight I decided to try
> out Phonon for a small app but there I ran into problems.
>
> I installed all the needed GStreamer packages (for Kubuntu 7.10) and the
> Phonon part compiled ok and I see a libphonon.so.5 library among the other Qt
> libraries. So far so good.
>
> Then I compiled the "Music Player Example" app and it compiled just fine and
> starts somewhat ok except for this warning:
>
> Phonon::createPath: Cannot connect Phonon::MediaObject(no objectName) to
> Phonon::AudioOutput(no objectName).
>
> The music player then does absolutely nothing and does not allow for any
> playback. I can load files but no meta data is shown and they can't be played
> (mp3, wav or ogg). So, something is broken.
>
> Then I tried the "Capabilities Example" too and it also compiles cleanly but
> when executed all the windows remain completely empty. So, something is very
> clearly broken.
>
> I don't use GStreamer for anything at all on my system (afaik) as I only run
> KDE and Qt apps, so perhaps something isn't running or not configured? The
> docs for installing Phonon didn't mention that anything needs to be
> configured or running (perhaps they assume everyone is running a Gnome
> desktop with a configured GStreamer?).
>
> I can play stuff using GStreamer's commandline tools, like this:
>
> % gst-launch filesrc location=song.mp3 ! mad ! audioconvert ! audioresample !
> alsasink
>
> and it works as it should, audio works ok. All the "tests" in the document
> here work ok:
>
> http://gstreamer.freedesktop.org/data/doc/gstreamer/head/faq/html/chapter-using.html
>
> Some furious Googling didn't turn up anything at all and this list has
> apparently never even mentioned Phonon so I'm at a loss as to where I should
> start digging. And getting a newer snapshot of 4.4 is probably useless until
> Phonon is next time sync:ed into the Qt sources, right?
>
> Any hints for a frustrated little newbie?
>
> Best regards,
>     Jan Ekholm
>
> --
>                         "Bingeley bingeley beep!"
>                -- The Personal Disorganizer, Terry Pratchett in Feet of Clay
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx   
> with "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/
>
>



-- 
 [ signature omitted ] 

Message 3 in thread

Is there a way to use in a Qt app a global function as a slot ?

this is what I'm trying to make it work:

void objectDied()
{}

QMap< QObject*, AdditionalObjectProperties* > _objects;

void registerForXxxxx( QObject* pointerToCaller )
{
    QObject::connect( pointerToCaller, SIGNAL(destroyed()), 
[somethingMustGoHere], SLOT(objectDied()) );

    _objects.append( pointerToCaller, new AdditionalObjectProperties() );
}

thanks

--
 [ signature omitted ] 

Message 4 in thread

On torsdag den 3. Januar 2008, Yong Taro wrote:
> Is there a way to use in a Qt app a global function as a slot ?

No. Slots are always on QObject instances.

Bo.

> this is what I'm trying to make it work:
>
> void objectDied()
> {}
>
> QMap< QObject*, AdditionalObjectProperties* > _objects;
>
> void registerForXxxxx( QObject* pointerToCaller )
> {
>     QObject::connect( pointerToCaller, SIGNAL(destroyed()),
> [somethingMustGoHere], SLOT(objectDied()) );
>
>     _objects.append( pointerToCaller, new AdditionalObjectProperties() );
> }
>
> thanks
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with
> "unsubscribe" in the subject or the body. List archive and information:
> http://lists.trolltech.com/qt-interest/



-- 
 [ signature omitted ] 

Message 5 in thread

On Thursday 03 January 2008 01:20:48 Pau Garcia i Quiles wrote:
> Quoting Jan Ekholm <jan.ekholm@xxxxxxxxxxxx>:
>
> I have not used Phonon from Qt 4.4 yet but it should work fine as KDE
> 4.0 is using that code (with Qt 4.3).
>
> My advise:
> - Take a look at Dragon Player (http://dragonplayer.org/), a video
> player for KDE 4 using Phonon

Hm, I don't have a KDE4 development setup, and it sounds like an awful lot of 
work just to see DragonPlayer print the same error message as the "music 
player" sample app:

Phonon::createPath: Cannot connect Phonon::MediaObject(no objectName) to 
Phonon::AudioOutput(no objectName).

To me it seems that Phonon somehow managed to get compiled using my GStreamer 
0.10 stuff but then at runtime doesn't have any idea how to actually "connect 
to" it and use it...

> - Until Qt 4.4 is released and Trolltech provides official support,
> the IRC channel #phonon in Freenode is the best resource for help.
> Matthias Kretz and the other developers of Phonon are usually there
> and are keen to help. You will also find help in #kde4-devel, as KDE
> 4.0 uses Phonon.

Trying #phonon, thanks for the hint!

-- 
 [ signature omitted ] 

Message 6 in thread

Dear All

I want to add a close button on each tab in the QTabWidget. Please suggest
me some ideas. I already created a close button on the top right corner of
the tab widget but i need to have a close button on each tab not in the
right corner but on the tab itself next to its name. Please help

Thanks alot for help.


--
 [ signature omitted ] 

Message 7 in thread

as i remeber,
you need to provide a custom "QTabBar" and then with 
QTabWidget::setTabBar( QTabBar* ) to use it.


rohitj@xxxxxxxxxxxxxx wrote:
> Dear All
>
> I want to add a close button on each tab in the QTabWidget. Please suggest
> me some ideas. I already created a close button on the top right corner of
> the tab widget but i need to have a close button on each tab not in the
> right corner but on the tab itself next to its name. Please help
>
> Thanks alot for help.
>
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/
>
>
>   

--
 [ signature omitted ] 

Message 8 in thread

Thanks for the reply Yong.

I subclassed QTabWidget as myTabWidget as well as QTabBar as myTabBar and
then i used the same way as you suggested like calling setTabBar(myTabBar
) in  the constructor of the myTabWidget. The code for the close button is

QToolButton *closeButton = new QToolButton(this);
closeButton->setIcon(QIcon(":/images/close_tab.png"));
closeButton->adjustSize();
connect(closeButton, SIGNAL(clicked()), this, SLOT(closeCurrentTab()));

but Where i use this code of close function. Silly question but i was
calling it in constructor of myTabWidget but dint work. It just creates
one time on the left side only once for all by default.

I mean...What modificatins shall i do in myTabBar?

Thanks alot...


> as i remeber,
> you need to provide a custom "QTabBar" and then with
> QTabWidget::setTabBar( QTabBar* ) to use it.
>
>
> rohitj@xxxxxxxxxxxxxx wrote:
>> Dear All
>>
>> I want to add a close button on each tab in the QTabWidget. Please
>> suggest
>> me some ideas. I already created a close button on the top right corner
>> of
>> the tab widget but i need to have a close button on each tab not in the
>> right corner but on the tab itself next to its name. Please help
>>
>> Thanks alot for help.
>>
>>
>> --
>> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with
>> "unsubscribe" in the subject or the body.
>> List archive and information: http://lists.trolltech.com/qt-interest/
>>
>>
>>
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with
> "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/
>


--
 [ signature omitted ] 

Message 9 in thread

Didn't do this, but here is a way to implement this if you really want 
to use QTabWidget / QTabBar combination:
http://trac.monkeystudio.org/browser/v2/trunk/fresh/widgets/pTabBar.cpp?rev=1134&format=raw

Or if you wan to use "QToolButton" to put it on the widgets you need 
then i'm afraid QTabWidget/QTabBar is not the way to go.
I think you will need to provide your own widget where you put all you 
need. That widget will be used instead of QTabWidget.

I would choose 2nd, since it allows you free hands and you can QLayout 
them the way you want.

hope this helps.




 rohitj@xxxxxxxxxxxxxx wrote:
> Thanks for the reply Yong.
>
> I subclassed QTabWidget as myTabWidget as well as QTabBar as myTabBar and
> then i used the same way as you suggested like calling setTabBar(myTabBar
> ) in  the constructor of the myTabWidget. The code for the close button is
>
> QToolButton *closeButton = new QToolButton(this);
> closeButton->setIcon(QIcon(":/images/close_tab.png"));
> closeButton->adjustSize();
> connect(closeButton, SIGNAL(clicked()), this, SLOT(closeCurrentTab()));
>
> but Where i use this code of close function. Silly question but i was
> calling it in constructor of myTabWidget but dint work. It just creates
> one time on the left side only once for all by default.
>
> I mean...What modificatins shall i do in myTabBar?
>
> Thanks alot...
>
>
>   
>> as i remeber,
>> you need to provide a custom "QTabBar" and then with
>> QTabWidget::setTabBar( QTabBar* ) to use it.
>>
>>
>> rohitj@xxxxxxxxxxxxxx wrote:
>>     
>>> Dear All
>>>
>>> I want to add a close button on each tab in the QTabWidget. Please
>>> suggest
>>> me some ideas. I already created a close button on the top right corner
>>> of
>>> the tab widget but i need to have a close button on each tab not in the
>>> right corner but on the tab itself next to its name. Please help
>>>
>>> Thanks alot for help.
>>>
>>>
>>> --
>>> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with
>>> "unsubscribe" in the subject or the body.
>>> List archive and information: http://lists.trolltech.com/qt-interest/
>>>
>>>
>>>
>>>       
>> --
>> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with
>> "unsubscribe" in the subject or the body.
>> List archive and information: http://lists.trolltech.com/qt-interest/
>>
>>     
>
>
>
>   

--
 [ signature omitted ] 

Message 10 in thread

hi,
please don't write in private, the mail list is the place to do it.

As for the issue you have, something tells me you don't understand how 
it goes and you missed the basics of building these apps.
Or because another moment here is that there is a kind of limitation for 
the QTabBar that makes people find workarounds, probably this messed 
your plan.

The short answer is to extend "QWidget" or more easy and quick 
"QToolBar" and provide your own "QTabWidget/QTabBar" alike functionality.

for example:
MyTabWidget : public QWidget
       |
       |---QToolBar
       |---QMap<QWidget*,QWidget*>

(1)
//          widget(button or what ever) on the ToolBar,     widget that 
will hold other widgets(space that you populate with other UI controls)
QMap<QWidget*,                                                      
QWidget*> _tabs;

(2)
QToolBar::addWidget( new QToolButton() ) - use to put the buttons you need
or
MyTabWidget ::addTab()
{
    QWidget* widget = new QWidget();
    QLabel* label = new QLabel();
    QToolButton* toolButton = QToolButton();
    toolButton->setIcon( ... );


    QHBoxLayout* horizontalLayout = QHBoxLayout( widget );
    horizontalLayout->addWidget( label );
    horizontalLayout->addWidget( toolButton );

    // at this point you will see a tab with label you need and a 
'close' button with icon on it. you can add here anything you need.
    QToolBar::addWidget( widget );

    connect( toolButton, SIGNAL(clicked), this, SLOT(slot_ActivateTab()) );

    _tabs.append( toolButton, new QWidget() );
}
void MyTabWidget::slot_ActivateTab()
{
       QToolButton* toolButton = qobjct_cast<QToolButton*>( sender() );
       if( 0 == toolButton )
          return;

       _tabs[toolButton]->setVisible( true );
}





Note:
this is a quick idea of a possible direction, and it is a meta code than 
a real code. Just for coincidence because QT is so good you
can use it as a descriptive language also.




rohitj@xxxxxxxxxxxxxx wrote:
> Thanks alot for your suggestions..
>
> I followed your second way to solve the problem by providing my own
> widget. Then i pass that widget in the tab widget addTab function. But how
> to put the close button on the appropriate position. Please see the
> attachement attached with it. I created the close button but dont know how
> to put next to window title "Untitled". It is just putting below it.
>
> regards...
>
>
>
>   
>> Didn't do this, but here is a way to implement this if you really want
>> to use QTabWidget / QTabBar combination:
>> http://trac.monkeystudio.org/browser/v2/trunk/fresh/widgets/pTabBar.cpp?rev=1134&format=raw
>>
>> Or if you wan to use "QToolButton" to put it on the widgets you need
>> then i'm afraid QTabWidget/QTabBar is not the way to go.
>> I think you will need to provide your own widget where you put all you
>> need. That widget will be used instead of QTabWidget.
>>
>> I would choose 2nd, since it allows you free hands and you can QLayout
>> them the way you want.
>>
>> hope this helps.
>>
>>
>>
>>
>>  rohitj@xxxxxxxxxxxxxx wrote:
>>     
>>> Thanks for the reply Yong.
>>>
>>> I subclassed QTabWidget as myTabWidget as well as QTabBar as myTabBar
>>> and
>>> then i used the same way as you suggested like calling
>>> setTabBar(myTabBar
>>> ) in  the constructor of the myTabWidget. The code for the close button
>>> is
>>>
>>> QToolButton *closeButton = new QToolButton(this);
>>> closeButton->setIcon(QIcon(":/images/close_tab.png"));
>>> closeButton->adjustSize();
>>> connect(closeButton, SIGNAL(clicked()), this, SLOT(closeCurrentTab()));
>>>
>>> but Where i use this code of close function. Silly question but i was
>>> calling it in constructor of myTabWidget but dint work. It just creates
>>> one time on the left side only once for all by default.
>>>
>>> I mean...What modificatins shall i do in myTabBar?
>>>
>>> Thanks alot...
>>>
>>>
>>>
>>>       
>>>> as i remeber,
>>>> you need to provide a custom "QTabBar" and then with
>>>> QTabWidget::setTabBar( QTabBar* ) to use it.
>>>>
>>>>
>>>> rohitj@xxxxxxxxxxxxxx wrote:
>>>>
>>>>         
>>>>> Dear All
>>>>>
>>>>> I want to add a close button on each tab in the QTabWidget. Please
>>>>> suggest
>>>>> me some ideas. I already created a close button on the top right
>>>>> corner
>>>>> of
>>>>> the tab widget but i need to have a close button on each tab not in
>>>>> the
>>>>> right corner but on the tab itself next to its name. Please help
>>>>>
>>>>> Thanks alot for help.
>>>>>
>>>>>
>>>>> --
>>>>> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with
>>>>> "unsubscribe" in the subject or the body.
>>>>> List archive and information: http://lists.trolltech.com/qt-interest/
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>           
>>>> --
>>>> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with
>>>> "unsubscribe" in the subject or the body.
>>>> List archive and information: http://lists.trolltech.com/qt-interest/
>>>>
>>>>
>>>>         
>>>
>>>
>>>       
>> --
>> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with
>> "unsubscribe" in the subject or the body.
>> List archive and information: http://lists.trolltech.com/qt-interest/
>>
>>     
>>
>> ------------------------------------------------------------------------
>>

--
 [ signature omitted ] 

Message 11 in thread

Thanks alot for your detailed response.

Sorry by mistake i sent that mail to you only but later i tried to send it
again to the list but i faced some problem in that.

You guessed up right, I lack some basics as well as QTabBar limitation
messed up my plan.

Now if i try to change to QToolBar rather than QTabWidget, i have to
modify alot in my application as i based my application on QTabWidget tabs
list for database handling, Tree Structure window. So, first i have to
find a solution based on modification of MyTabWidget but derived from
QTabWidget only.

The method you suggested in the previous mail by using only QTabWidget and
QTabbar contains handling all the issues manually. But now i go through
that again and try to find a solution!!!!! Will let u know...I will look
for adding close button direclty at the title space of the each tab in the
tab widget. If doesnt work, i will shift to your QToolBar way of
subclassing QWidget.

Thanks again.


> hi,
> please don't write in private, the mail list is the place to do it.
>
> As for the issue you have, something tells me you don't understand how
> it goes and you missed the basics of building these apps.
> Or because another moment here is that there is a kind of limitation for
> the QTabBar that makes people find workarounds, probably this messed
> your plan.
>
> The short answer is to extend "QWidget" or more easy and quick
> "QToolBar" and provide your own "QTabWidget/QTabBar" alike functionality.
>
> for example:
> MyTabWidget : public QWidget
>        |
>        |---QToolBar
>        |---QMap<QWidget*,QWidget*>
>
> (1)
> //          widget(button or what ever) on the ToolBar,     widget that
> will hold other widgets(space that you populate with other UI controls)
> QMap<QWidget*,
> QWidget*> _tabs;
>
> (2)
> QToolBar::addWidget( new QToolButton() ) - use to put the buttons you need
> or
> MyTabWidget ::addTab()
> {
>     QWidget* widget = new QWidget();
>     QLabel* label = new QLabel();
>     QToolButton* toolButton = QToolButton();
>     toolButton->setIcon( ... );
>
>
>     QHBoxLayout* horizontalLayout = QHBoxLayout( widget );
>     horizontalLayout->addWidget( label );
>     horizontalLayout->addWidget( toolButton );
>
>     // at this point you will see a tab with label you need and a
> 'close' button with icon on it. you can add here anything you need.
>     QToolBar::addWidget( widget );
>
>     connect( toolButton, SIGNAL(clicked), this, SLOT(slot_ActivateTab())
> );
>
>     _tabs.append( toolButton, new QWidget() );
> }
> void MyTabWidget::slot_ActivateTab()
> {
>        QToolButton* toolButton = qobjct_cast<QToolButton*>( sender() );
>        if( 0 == toolButton )
>           return;
>
>        _tabs[toolButton]->setVisible( true );
> }
>
>
>
>
>
> Note:
> this is a quick idea of a possible direction, and it is a meta code than
> a real code. Just for coincidence because QT is so good you
> can use it as a descriptive language also.
>
>
>
>
> rohitj@xxxxxxxxxxxxxx wrote:
>> Thanks alot for your suggestions..
>>
>> I followed your second way to solve the problem by providing my own
>> widget. Then i pass that widget in the tab widget addTab function. But
>> how
>> to put the close button on the appropriate position. Please see the
>> attachement attached with it. I created the close button but dont know
>> how
>> to put next to window title "Untitled". It is just putting below it.
>>
>> regards...
>>
>>
>>
>>
>>> Didn't do this, but here is a way to implement this if you really want
>>> to use QTabWidget / QTabBar combination:
>>> http://trac.monkeystudio.org/browser/v2/trunk/fresh/widgets/pTabBar.cpp?rev=1134&format=raw
>>>
>>> Or if you wan to use "QToolButton" to put it on the widgets you need
>>> then i'm afraid QTabWidget/QTabBar is not the way to go.
>>> I think you will need to provide your own widget where you put all you
>>> need. That widget will be used instead of QTabWidget.
>>>
>>> I would choose 2nd, since it allows you free hands and you can QLayout
>>> them the way you want.
>>>
>>> hope this helps.
>>>
>>>
>>>
>>>
>>>  rohitj@xxxxxxxxxxxxxx wrote:
>>>
>>>> Thanks for the reply Yong.
>>>>
>>>> I subclassed QTabWidget as myTabWidget as well as QTabBar as myTabBar
>>>> and
>>>> then i used the same way as you suggested like calling
>>>> setTabBar(myTabBar
>>>> ) in  the constructor of the myTabWidget. The code for the close
>>>> button
>>>> is
>>>>
>>>> QToolButton *closeButton = new QToolButton(this);
>>>> closeButton->setIcon(QIcon(":/images/close_tab.png"));
>>>> closeButton->adjustSize();
>>>> connect(closeButton, SIGNAL(clicked()), this,
>>>> SLOT(closeCurrentTab()));
>>>>
>>>> but Where i use this code of close function. Silly question but i was
>>>> calling it in constructor of myTabWidget but dint work. It just
>>>> creates
>>>> one time on the left side only once for all by default.
>>>>
>>>> I mean...What modificatins shall i do in myTabBar?
>>>>
>>>> Thanks alot...
>>>>
>>>>
>>>>
>>>>
>>>>> as i remeber,
>>>>> you need to provide a custom "QTabBar" and then with
>>>>> QTabWidget::setTabBar( QTabBar* ) to use it.
>>>>>
>>>>>
>>>>> rohitj@xxxxxxxxxxxxxx wrote:
>>>>>
>>>>>
>>>>>> Dear All
>>>>>>
>>>>>> I want to add a close button on each tab in the QTabWidget. Please
>>>>>> suggest
>>>>>> me some ideas. I already created a close button on the top right
>>>>>> corner
>>>>>> of
>>>>>> the tab widget but i need to have a close button on each tab not in
>>>>>> the
>>>>>> right corner but on the tab itself next to its name. Please help
>>>>>>
>>>>>> Thanks alot for help.
>>>>>>
>>>>>>
>>>>>> --
>>>>>> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx
>>>>>> with
>>>>>> "unsubscribe" in the subject or the body.
>>>>>> List archive and information:
>>>>>> http://lists.trolltech.com/qt-interest/
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>> --
>>>>> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx
>>>>> with
>>>>> "unsubscribe" in the subject or the body.
>>>>> List archive and information: http://lists.trolltech.com/qt-interest/
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>> --
>>> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with
>>> "unsubscribe" in the subject or the body.
>>> List archive and information: http://lists.trolltech.com/qt-interest/
>>>
>>>
>>>
>>> ------------------------------------------------------------------------
>>>
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with
> "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/
>


--
 [ signature omitted ] 

Message 12 in thread

On Wednesday 02 January 2008 23:42:21 Jan Ekholm wrote:
> Hi,

...

> Then I compiled the "Music Player Example" app and it compiled just fine
> and starts somewhat ok except for this warning:
>
> Phonon::createPath: Cannot connect Phonon::MediaObject(no objectName) to
> Phonon::AudioOutput(no objectName).

This might indicate that the GStreamer backend is not correctly compiled, 
possibly because the GStreamer development packages are not installed.

When you run the configure script, it will say whether GStreamer support is 
available.

> The music player then does absolutely nothing and does not allow for any
> playback. I can load files but no meta data is shown and they can't be
> played (mp3, wav or ogg). So, something is broken.

That said, we are fixing the Music Player example, which does not use the 
Phonon API correctly and may not work with the latest snapshots. The new 
version will soon be available in the snapshots.

...

--
 [ signature omitted ] 

Message 13 in thread

On Thursday 03 January 2008 12:28:40 Geir Vattekar wrote:
> On Wednesday 02 January 2008 23:42:21 Jan Ekholm wrote:
> > Hi,
>
> ...
>
> > Then I compiled the "Music Player Example" app and it compiled just fine
> > and starts somewhat ok except for this warning:
> >
> > Phonon::createPath: Cannot connect Phonon::MediaObject(no objectName) to
> > Phonon::AudioOutput(no objectName).
>
> This might indicate that the GStreamer backend is not correctly compiled,
> possibly because the GStreamer development packages are not installed.

At first I didn't have them installed, but then I added some missing packages 
and "configure" said "Phonon... yes" and actually compiled the library. 
Otherwise I could of course not have compiled the sample apps.

GStreamer standalone works fine when used through its own commandline tools.

> When you run the configure script, it will say whether GStreamer support is
> available.

It is.

> > The music player then does absolutely nothing and does not allow for any
> > playback. I can load files but no meta data is shown and they can't be
> > played (mp3, wav or ogg). So, something is broken.
>
> That said, we are fixing the Music Player example, which does not use the
> Phonon API correctly and may not work with the latest snapshots. The new
> version will soon be available in the snapshots.

Aha, that could be it. Does the "Capabilities" demo also do it all wrong, as 
it shows absolutely nothing at all nor does it print any kind of errors?

I also found the following minimal snippet of code on the 'net in some Phonon 
document:

#include <QApplication>
#include <QWidget>
#include <QFileInfo>
#include <phonon/mediasource.h>
#include <phonon/mediaobject.h>
#include <phonon/audiooutput.h>
int main(int argc, char** argv)
{
 QApplication a(argc, argv);
 a.setApplicationName("Phonon-Audio-Player");
 Phonon::MediaSource* source = new Phonon::MediaSource( argv[1] );
 Phonon::MediaObject* mediaObject = new Phonon::MediaObject( 0 );
 Phonon::AudioOutput *audioOutput = new  
   Phonon::AudioOutput(Phonon::MusicCategory, 0);
 Phonon::createPath(mediaObject, audioOutput);
 mediaObject->setCurrentSource(*source);
 mediaObject->play();
 QObject::connect(mediaObject, SIGNAL(finished()), &a, SLOT(quit()));
 int ret = a.exec();
 delete source;
 delete mediaObject;
 delete audioOutput;
 return ret;
}

This piece of code also gives me the error:

Phonon::createPath: Cannot connect Phonon::MediaObject(no objectName) to 
Phonon::AudioOutput(no objectName).

Apparently Phonon is extremely hard to use correctly if even the developers 
don't use it correctly? :)

-- 
 [ signature omitted ] 

Message 14 in thread

Hi,

You might want to try out a snapshot.

Note that when you run configure with the snapshot, it must also 
report 'GStreamer... Yes'; if not, the GStreamer back end will not be built. 
If you only have Phonon support, you will just get an 'empty' front end. This 
is why our examples may compile even if the GStreamer backend does not work.

You could also check that the GStreamer backend's library 
(libphonon_gstreamer.so on my system) is present. It will be in the 
$QTDIR/plugins/phonon_backend/ directory.

Both examples work with the tp1.

--
 [ signature omitted ] 

Message 15 in thread

On Thursday 03 January 2008 14:19:39 Geir Vattekar wrote:
> Hi,
>
> You might want to try out a snapshot.
>
> Note that when you run configure with the snapshot, it must also
> report 'GStreamer... Yes'; if not, the GStreamer back end will not be
> built. If you only have Phonon support, you will just get an 'empty' front
> end. This is why our examples may compile even if the GStreamer backend
> does not work.

Phonon module ....... yes
Glib support ........ yes
GStreamer support ... yes


> You could also check that the GStreamer backend's library
> (libphonon_gstreamer.so on my system) is present. It will be in the
> $QTDIR/plugins/phonon_backend/ directory.

No such directory has been made, and no libphonon_gstreamer.so is in the 
installation directory.

However, in the source tree there are:

./plugins/phonon_backend/libphonon_gstreamer.so
./plugins/phonon_backend/libphonon_gstreamer.so.debug

But these aren't installed during a normal "make install". So, the build 
system is at fault.

-- 
 [ signature omitted ] 

Pages: Prev | 1 | 2 | Next