[Qt-qml] import QtMultimedia 5.0

505 views
Skip to first unread message

Robinson, David

unread,
Mar 29, 2012, 6:50:58 AM3/29/12
to qt-...@qt.nokia.com
Having tried the QtMultimedia examples in Qt5 and read the 'Changes in
QtMultimedia' online documentation. I was expecting that the Video QML
element in my existing code would work 'as is' if I updated to import
QtQuick2 & QtMultimedia 5.0.

The qmlvideo example works fine but every time I try to run a QML2 only
application using qmlscene.exe on Windows 7 I get:

plugin cannot be loaded for module "QtMultimedia": Cannot load library
C:/Qt/qt5/qtbase/imports/QtMultimedia/declarative_multimediad.dll: The
specified module could not be found.
import QtMultimedia 5.0

Well it is there, the import path is correct, all the necessary dll
dependencies are met and it loads OK with the qmlvideo example which I
confirmed using QML_IMPORT_TRACE=1.

Is there something obvious I've missed?

Regards
David Robinson


Please refer to www.anite.com for individual Anite company details. The contents of this e-mail and any attachments are for the intended recipient only. If you are not the intended recipient, you are not authorised to and must not disclose, copy, distribute, or retain this message or any part of it. It may contain information which is confidential and/or covered by legal professional or other privilege. Contracts cannot be concluded with us nor legal service effected by email.

Anite plc
Registered in England No.1798114
Registered Office: 353 Buckingham Avenue Slough Berks SL1 4PF United Kingdom VAT Registration No. GB 787 418187

Scanned for viruses by Mimecast.

_______________________________________________
Qt-qml mailing list
Qt-...@qt.nokia.com
http://lists.qt.nokia.com/mailman/listinfo/qt-qml

Jason H

unread,
Mar 29, 2012, 9:51:14 AM3/29/12
to Robinson, David, qt-...@qt.nokia.com
Is the import "QtMultimediaKit" like for 4.x?

One thing that needs to be provided is a way for QML to enumerate your library and library versions, so you know what you really have.

 It would be even better if QtCreator gave them to you as code-completions like for #includes...

Robinson, David

unread,
Mar 29, 2012, 11:48:59 AM3/29/12
to Jason H, qt-...@qt.nokia.com
No, I've taken the import as per the Qt5 examples:
import QtMultimedia 5.0

As you have mentioned, what is a bit different in this lib is that it exports no version in the plugin extension code but has 2 versions 4.0 & 5.0 for each element. I have to admit I don't understand how this works?

qmlRegisterType<QDeclarativeVideoOutput>(uri, 4, 0, "VideoOutput");
qmlRegisterType<QDeclarativeVideoOutput>(uri, 5, 0, "VideoOutput");

&

plugin declarative_multimedia
Video 5.0 Video.qml
Video 4.0 Video_4.qml


Regards
David Robinson

Alan Alpert

unread,
Mar 29, 2012, 8:21:07 PM3/29/12
to qt-...@qt.nokia.com, ext Robinson, David
On Fri, 30 Mar 2012 01:48:59 ext Robinson, David wrote:
> No, I've taken the import as per the Qt5 examples:
> import QtMultimedia 5.0
>
> As you have mentioned, what is a bit different in this lib is that it
> exports no version in the plugin extension code but has 2 versions 4.0 &
> 5.0 for each element. I have to admit I don't understand how this works?
>
> qmlRegisterType<QDeclarativeVideoOutput>(uri, 4, 0, "VideoOutput");
> qmlRegisterType<QDeclarativeVideoOutput>(uri, 5, 0, "VideoOutput");
>
> &
>
> plugin declarative_multimedia
> Video 5.0 Video.qml
> Video 4.0 Video_4.qml

How this works is that you get backwards compatibility if you try to import
version 4 (but with the Qt5 plugin installed). So presumably, import
QtMultimedia 4.0 will get you the same API as the previous Video element, but
running with QtQuick 2.0.

Unfortunately that's not the problem you're hitting (because it can't find the
QtMultimedia module at all). And I'm not sure about the import paths on
windows, so I don't think I can help with that. Sorry.

--
Alan Alpert
Senior Engineer
Nokia, Qt Development Frameworks

Reply all
Reply to author
Forward
0 new messages