PDA

View Full Version : Qt android videoSurface



Viper666
3rd February 2014, 18:07
hey guys,
i need your help,
i made app for android where i use QCamera and custom VideoSurface(nothing special just edited present function) and the problem is present function in VideoSurface never get called
Thanks for any help

ChrisW67
3rd February 2014, 21:32
It seems likely you are not using an instance of your subclass. If you had failed to implement present() with the correct signature, the most common problem, then the compiler would have advised it could not create an instance of your class for want of the missing pure virtual.

Viper666
4th February 2014, 09:58
Thank you for answer but this is not it. The app works on Pc but doesnt on Phone. After some test I think the problem is in function
VideoSurface::supportedPixelFormats(
QAbstractVideoBuffer::HandleType handleType) const

Because when I don't add any supported pixel formats and run app on PC I get same result(blank screen) as on phone. I tried add all formats but still nothing.
Any other tips?
Thanks

Viper666
7th February 2014, 20:20
Hey
i made some changes and i have new problem, forget about everything before this
i use QCameraViewFinder and i can change its settings with QCameraViewFinderSettingsControl class and i get pointer on it with this:

QCameraViewfinderSettingsControl *control = qobject_cast<QCameraViewfinderSettingsControl*>(
viewfinder->mediaObject()->service()->requestControl(QCameraViewfinderSettingsControl_ii d));

that's work on Pc perfectly but on Android Device i get null pointer and i dont know o.O
Android Version: 4.4.2
Qt Version: 5.2.1

Thanks