Well I am please, and confused at the same time. It works, but I have concerns.
1. I'm trying to work with video here. you keep mentioning audio, but how does
QVideoProbe work with audio-derived classes?
2. When:
2a. using a Video element I try the code you supplied player is null after the
cast.
2b. using a MediaPlayer element, it works and i get frames!
2c. using (passing) a Camera element as sourceObj, what will happen?
________________________________
From: Lopes Yoann <yoann.lo...@digia.com>
To: Jason H <scorp...@yahoo.com>
Cc: Interests Qt <interest@qt-project.org>
Sent: Friday, February 7, 2014 7:05 AM
Subject: Re: [Interest] QVideoProbe Woes
On Feb 6, 2014, at 10:07 PM, Jason H wrote:
So I made a basic wrapper class (included below) for QVideoProbe to expose it
to QML. I can set the source property, but when I do it reports it gets a
QDeclaritiveAudio class instance, ans the setSource() call fails. How can I get
the video part of it?
The reason is that both the MediaPlayer and Audio QML types are backed by the
QDeclarativeAudio C++ class...
What you need is the QMediaPlayer instance, you can get it with the
'mediaObject' property of QDeclarativeAudio:
VideoProbe::setSource(QObject* sourceObj)
{
QMediaPlayer *player =
qvariant_cast<QMediaPlayer*>(sourceObj->property("mediaObject"));
}
Yoann Lopes
Senior Software Engineer - Digia, Qt
Visit us on: http://qt.digia.com
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest