Hi, I am working with QMediaPlayer on Microsoft Windows using VS2015, with the Media Foundation Backend Where I am trying to read the QMediaMetadata:Orientation parameter.
I have loaded several test files that were generated from various iPhone and Android Phones, and although I can read Resolution, VideoFrameRate, Duration and so forth, but I cannot access the Orientation parameter. Is this not implemented for this platform, or is there another method to read this data. Thanks Steve Code Samples and Additional info: ---------------------------------------------- To attempt to read the rotation, I successfully connect to the mediaStatusChanged signal, and receive QMediaPlayer::LoadedMedia status, . E.g. this code succeeds: QVariant var = mPlayer->metaData(QMediaMetaData::Resolution); if (var.isValid() && var.canConvert<QSize>() && var.toSize() != mNativeSize) { mNativeSize = var.toSize(); mImage = QImage(mNativeSize.width(), mNativeSize.height(), QImage::Format_ARGB32_Premultiplied); mImage.fill(Qt::white); // Video surface is used with VideoRendering::Software if (mVideoSurface) { mVideoSurface->SetNativeSize(mNativeSize); } } If I query mPlayer->availableMetaData(), it returns the following attributes: Duration AudioBitRate ChannelCount AudioCode SampleRate VideoBitRate Resolution VideoFrameRate VideoCodec PixelAspectRatio Date MediaType Obviously, Orientation is missing, so this code fails: QStringList metaData = mPlayer->availableMetaData(); if (metaData.contains(QMediaMetaData::Orientation)) { var = mPlayer->metaData(QMediaMetaData::Orientation); if (var.isValid()) { mRotation = var.toInt(); } } Steve Schilz Software Engineer III PASCO scientific www.pasco.com<http://www.pasco.com/> think science
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest