I have an app heavily dependent on Multimedia.
it took me about a week and a half total
i created a header "Qt6Bridge.h" that defines a bunch of stuff one way or
another depending on qt5 or qt6 (have to keep qt5 build alive until Qt6 has all
the functionality in need).
eg:
#ifndef _H_Qt6Bridge
#define _H_Qt6Bridge
#if _QT_
#include "CFUtils.h"
#include
#if _QT6_
#include
#include
#include
#include
#include
#include
#include
#include
typedef QVideoFrameFormat QtVideoFrameFormat;
typedef QVideoFrameFormat::PixelFormat QtVideoFramePixFormat;
typedef QVideoSink QtAbstractVideoSurface;
#define getVideoSurface() videoSink()
#define getAvailableVideoDevices() QMediaDevices::videoInputs()
#define setMediaSoure setSource
#define QMediaPlayer_PlaybackState QMediaPlayer::PlaybackState
#define getPlaybackState() playbackState()
//
typedef QAudioDeviceQtAudioDevice;
typedef QAudioDevice::Mode QtAudioDeviceMode;
#define QtAudioDeviceMode_Input QAudioDevice::Input
#define QtAudioDeviceMode_OutputQAudioDevice::Output
QList
getAvailableAudioDevices(QtAudioDeviceMode ioMode);
#define getDefaultAudioDevice()
QMediaDevices::defaultAudioOutput()
#define QAudioFormat_SampleType QAudioFormat::SampleFormat
#define getSampleType() sampleFormat()
#define getSupportedSampleTypes() supportedSampleFormats()
#define bitsPerSample() bytesPerSample() * 8
typedef QAudioSink QtAudioSink;
namespace QSound {
voidplay(const QString& path);
};
//
typedef QCameraDevice QtCameraDevice;
//
#define getDeviceName() description()
#else // _QT6_
#include
#include
#include
#include
#include
typedef QVideoSurfaceFormat QtVideoFrameFormat;
typedef QVideoFrame::PixelFormatQtVideoFramePixFormat;
typedef QAbstractVideoSurface QtAbstractVideoSurface;
#define getVideoSurface() videoSurface()
#define getAvailableVideoDevices() QCameraInfo::availableCameras()
#define setMediaSoure setMedia
#define QMediaPlayer_PlaybackState QMediaPlayer::State
#define getPlaybackState() state()
//
typedef QAudioDeviceInfoQtAudioDevice;
typedef QAudio::ModeQtAudioDeviceMode;
#define QtAudioDeviceMode_Input QAudio::AudioInput
#define QtAudioDeviceMode_OutputQAudio::AudioOutput
#define getAvailableAudioDevices(_type)
QAudioDeviceInfo::availableDevices(_type)
#define getDefaultAudioDevice()
QAudioDeviceInfo::defaultOutputDevice()
#define QAudioFormat_SampleType QAudioFormat::SampleType
#define getSampleType() sampleType()
#define getSupportedSampleTypes() supportedSampleTypes()
#define bitsPerSample() sampleSize()
typedef QAudioOutputQtAudioSink;
//
typedef QCameraInfo QtCameraDevice;
//
#define getDeviceName() deviceName()
#endif // !_QT6_
#endif // _QT_
#endif // _H_Qt6Bridge
I also had to write my own "QVideoFrame_fromImage()" cuz that func no longer
exists
the rest was working around the fact that you can't multiplex video frames any
more:
https://bugreports.qt.io/browse/QTBUG-95127
https://bugreports.qt.io/browse/QTBUG-95542
and i'm waiting still on the ability to get predictable audio samples from the
decoder:
https://bugreports.qt.io/browse/QTBUG-95766
> On Aug 30, 2021, at 9:30 AM, Nuno Santos wrote:
>
> Thiago,
>
> Thanks for the clarification.
>
> I was convinced that qmake was not available anymore. My bad! :/
>
> Still, I think 10 days of evaluation is a really short period of time.
>
> I would love to hear feedback from people who have started porting their
> software to Qt 6 and how the effort of such migration.
>
> Regards,
>
> Nuno
>
>> On 30 Aug 2021, at 17:16, Thiago Macieira wrote:
>>
>> On Monday, 30 August 2021 04:22:52 PDT Nuno Santos wrote:
>>> I would say that taking into account the fact that Qt has a new building
>>> system and qmake is not available anymore, porting an existing project
>>> takes much