I am setting the MIME type explicitly:Sets the current media source.
If a stream is supplied, media data will be read from it instead of resolving the media source. In this case the media source may still be used to resolve additional information about the media such as mime type. The stream must be open and readable.
Code: Select all
QIODevice *m_input = openContainer("1.ogg");
QMediaResource resource (QUrl (), "audio/ogg");
QMediaContent content (resource);
qDebug() << "isNull" << content.isNull(); // is false, by the way
m_player.setMedia (content, m_input);
m_player.play ();
Code: Select all
isNull false
GStreamer; Unable to pause -
Player::newMediaStatus: 2
GStreamer; Unable to pause -
Player::newMediaStatus: 8
Error: Invalid URI "".