[Qt-interest] Playing files from resource files

Tiago Correia tiago at cnotinfor.pt
Wed Dec 17 01:21:25 CET 2008


Hello,

> > It must be and QIODevice, and QBuffer is an QIODevice and QByteArray
> > not.
>
> That's what I thought. So the problem could really be that "buffering Qt
> resources" does not go well with Phonon... (a bug in Qt?)
>

My guess is that it might be a bug. I've to check online bugs list and found
this:
http://trolltech.com/developer/task-tracker/index_html?method=entry&id=223664

It says solved, but I'm using version 4.4.2 and the bug remains.


> > I managed to solve the problem of using the resource file, or at
> > least to load it.
> >
> > My problem was that I was using a library to handle all the playing
> > movie part, and when I added my lirbary to other project I was not
> > able to access the resource files that this library added (this is
> > another problem, quite strange).
>
> Was that a static library? If yes, the following might apply to your
> situation:
>
> http://doc.trolltech.com/4.4/resources.html:
> "If you have resources in a static library, you might need to force
> initialization of your resources by calling Q_INIT_RESOURCE() with the base
> name of the .qrc file. For example: [...]"
>
> I can confirm though that using resources from another DLL works (in fact I
> once had a project which contained a Resource.dll which basically just had
> the icon images embedded).
>

Yes, I've noticed this later, thanks. But it didn't help. The bug remains.


> > Now the problem is when I try to change the centralWidget for the
> > VideoWidget, the application crashed on this line of code
> >
> > setCentralWidget( myWidget );
> >
> > Now this bug only happens when using the QBuffer. If I now use the
> > filename for the MediaSource, it works, but only for the local file.
> Hmmm, where exactly does it crash? Can you show us a stack trace, for
> example?
>

The application just stops. It doesn't crash.

On this method
addChildWidget from QLayout class on line 949, it stops
I've continued to look deeper and it stops on line 588 from the file
qwidget_win.cpp

Here is the stack

QtGuid4.dll!QWidgetPrivate::setParent_sys(QWidget * parent=0x0017fe68,
QFlags<enum Qt::WindowType> f={...})  Line 621 C++
QtGuid4.dll!QWidget::setParent(QWidget * parent=0x0017fe68, QFlags<enum
Qt::WindowType> f={...}) Line 8747 C++
QtGuid4.dll!QWidget::setParent(QWidget * parent=0x0017fe68) Line 8681 C++
QtGuid4.dll!QLayout::addChildWidget(QWidget * w=0x02795988) Line 950 C++
QtGuid4.dll!QMainWindowLayout::setCentralWidget(QWidget * widget=0x02795988)
Line 1958 C++ QtGuid4.dll!QMainWindow::setCentralWidget(QWidget *
widget=0x028e5988)  Line 556 C++
IntroMovie_TestApp_d.exe!IntroMovie_TestApp::IntroMovie_TestApp(QWidget *
parent=0x00000000, QFlags<enum Qt::WindowType> flags={...})  Line 15 C++
IntroMovie_TestApp_d.exe!main(int argc=1, char * * argv=0x028d7988)  Line 9
+ 0x17 bytes C++

But from my search it seems it it is a problem with the phonon_ds9d4.dll
(backend)

I need to create a very simple application and send to support to report the
bug.

-- 
Tiago Correia
chief technology officer

cnoti inovação & desenvolvimento – Aprendizagem enRiquecida pela Tecnologia
www.cnotinfor.pt
Telefone: +351 239 499 231

Subscreva gratuitamente a nossa Newsletter BICA – Boletim informativo de
Interactividade, Comunicação e Aprendizagem
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20081217/320c8de6/attachment.html 


More information about the Qt-interest-old mailing list