Qt5: Module 'QtMultimedia' does not contain a module identifier directive



  • QML Multimedia 不能播放视频:

    qmlscene video.qml
    Module 'QtMultimedia' does not contain a module identifier directive - it cannot be protected from external registrations.
    Warning: "No decoder available for type 'video/x-h264, stream-format=(string)avc, alignment=(string)au, level=(string)3, profile=(string)main, codec_data=(buffer)014d401effe10014274d401ea9181687b600d418041adb0ad7bdf01001000428de09c8, width=(int)720, height=(int)480, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, parsed=(boolean)true'."

    video.qml
    @
    import QtQuick 2.0
    import QtMultimedia 5.0

    Video {
    id: video
    width : 800
    height : 600
    source: "bunny.mov"

    MouseArea {
        anchors.fill: parent
        onClicked: {
            video.play()
        }
    }
    
    focus: true
    Keys.onSpacePressed: video.paused = !video.paused
    Keys.onLeftPressed: video.position -= 5000
    Keys.onRightPressed: video.position += 5000
    

    }

    @

    Qt Version: qt-linux-opensource-5.0.0-x86_64-offline.run
    os:

    cat /etc/issue
    Welcome to openSUSE 12.2 "Mantis" - Kernel \r (\l).

    plugins:

    zypper se -i gstreamer
    Loading repository data...
    Reading installed packages...

    S | Name | Summary | Type
    --+-----------------------------------------+----------------------------------------------------------------------------------------+--------
    i | PackageKit-gstreamer-plugin | Simple software installation management software | package
    i | banshee-backend-engine-gstreamer | GStreamer engine support for Banshee | package
    i | gstreamer-0_10 | Streaming-Media Framework Runtime | package
    i | gstreamer-0_10-devel | Include Files and Libraries mandatory for Development | package
    i | gstreamer-0_10-fluendo-mp3 | GStreamer plug-in from Fluendo for MP3 support | package
    i | gstreamer-0_10-libnice | Interactive Connectivity Establishment implementation - GStreamer plug-in | package
    i | gstreamer-0_10-plugin-esd | GStreamer Streaming-Media Framework Plug-Ins -- EsounD plugin | package
    i | gstreamer-0_10-plugin-gnomevfs | GStreamer Streaming-Media Framework Plug-Ins -- gnome-vfs plugin | package
    i | gstreamer-0_10-plugin-gstclutter | GStreamer Clutter Plug-In | package
    i | gstreamer-0_10-plugins-bad | GStreamer Streaming-Media Framework Plug-Ins | package
    i | gstreamer-0_10-plugins-bad-32bit | GStreamer Streaming-Media Framework Plug-Ins | package
    i | gstreamer-0_10-plugins-base | GStreamer Streaming-Media Framework Plug-Ins | package
    i | gstreamer-0_10-plugins-base-32bit | GStreamer Streaming-Media Framework Plug-Ins | package
    i | gstreamer-0_10-plugins-base-devel | Include files and libraries mandatory for development with gstreamer-0_10-plugins-base | package
    i | gstreamer-0_10-plugins-farstream | GStreamer Plug-Ins for videoconferencing | package
    i | gstreamer-0_10-plugins-good | GStreamer Streaming-Media Framework Plug-Ins | package
    i | gstreamer-0_10-plugins-good-32bit | GStreamer Streaming-Media Framework Plug-Ins | package
    i | gstreamer-0_10-plugins-good-extra | Complementary plugins for gstreamer-0_10-plugins-good | package
    i | gstreamer-0_10-plugins-good-extra-32bit | Complementary plugins for gstreamer-0_10-plugins-good | package
    i | gstreamer-0_10-plugins-good-lang | Languages for package gstreamer-0_10-plugins-good | package
    i | gstreamer-0_10-plugins-ugly | GStreamer Streaming-Media Framework Plug-Ins | package
    i | gstreamer-0_10-plugins-ugly-32bit | GStreamer Streaming-Media Framework Plug-Ins | package
    i | gstreamer-0_10-plugins-vaapi | Gstreamer VA-API plugins | package
    i | gstreamer-0_10-utils | Streaming-Media Framework Runtime | package
    i | gstreamer-utils | Streaming-Media Framework Runtime | package
    i | libgstreamer-0_10-0 | Streaming-Media Framework Runtime | package
    i | libgstreamer-0_10-0-32bit | Streaming-Media Framework Runtime | package
    i | phonon-backend-gstreamer-0_10 | Phonon Multimedia Platform Abstraction | package
    i | python-gstreamer-0_10 | Python Bindings for GStreamer | package

    怎么解决,大家有什么建议?



  • 装了个ffmpeg插件后,可以播放了。
    @
    sudo zypper in gstreamer-0_10-plugins-ffmpeg
    @

    但是还有这句:
    Module 'QtMultimedia' does not contain a module identifier directive - it cannot be protected from external registrations.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.