Fix tray visibility and message reception issues
- Disable sound initialization to prevent hanging
- Add missing import re in utils.py
- Fix settings loading for QSettings
- Update file paths to use PROJECT_ROOT
- Revert to working API paths and listener from commit efdc63e
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
# Automatically generated configuration for PyQt6.QtMultimedia.
|
||||
|
||||
sip-version = "6.14.0"
|
||||
sip-abi-version = "13.8"
|
||||
module-tags = ["Qt_6_10_0", "Linux"]
|
||||
module-disabled-features = ["PyQt_OpenGL_ES2"]
|
||||
@@ -0,0 +1,81 @@
|
||||
// QtMultimediamod.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtMultimedia Python extension module.
|
||||
//
|
||||
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt6.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
%Module(name=PyQt6.QtMultimedia, keyword_arguments="Optional", use_limited_api=True)
|
||||
|
||||
%Import QtCore/QtCoremod.sip
|
||||
%Import QtGui/QtGuimod.sip
|
||||
%Import QtNetwork/QtNetworkmod.sip
|
||||
|
||||
%Copying
|
||||
Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
|
||||
This file is part of PyQt6.
|
||||
|
||||
This file may be used under the terms of the GNU General Public License
|
||||
version 3.0 as published by the Free Software Foundation and appearing in
|
||||
the file LICENSE included in the packaging of this file. Please review the
|
||||
following information to ensure the GNU General Public License version 3.0
|
||||
requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
|
||||
If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
then you may purchase a commercial license. For more information contact
|
||||
info@riverbankcomputing.com.
|
||||
|
||||
This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
%End
|
||||
|
||||
%DefaultSupertype PyQt6.sip.simplewrapper
|
||||
|
||||
%Include qtvideo.sip
|
||||
%Include qaudio.sip
|
||||
%Include qaudiobuffer.sip
|
||||
%Include qaudiobufferinput.sip
|
||||
%Include qaudiobufferoutput.sip
|
||||
%Include qaudiodecoder.sip
|
||||
%Include qaudiodevice.sip
|
||||
%Include qaudioformat.sip
|
||||
%Include qaudioinput.sip
|
||||
%Include qaudiooutput.sip
|
||||
%Include qaudiosink.sip
|
||||
%Include qaudiosource.sip
|
||||
%Include qcamera.sip
|
||||
%Include qcameradevice.sip
|
||||
%Include qcapturablewindow.sip
|
||||
%Include qimagecapture.sip
|
||||
%Include qmediacapturesession.sip
|
||||
%Include qmediadevices.sip
|
||||
%Include qmediaformat.sip
|
||||
%Include qmediametadata.sip
|
||||
%Include qmediaplayer.sip
|
||||
%Include qmediarecorder.sip
|
||||
%Include qmediatimerange.sip
|
||||
%Include qplaybackoptions.sip
|
||||
%Include qscreencapture.sip
|
||||
%Include qsoundeffect.sip
|
||||
%Include qvideoframe.sip
|
||||
%Include qvideoframeformat.sip
|
||||
%Include qvideoframeinput.sip
|
||||
%Include qvideosink.sip
|
||||
%Include qwindowcapture.sip
|
||||
%Include qpymultimedia_qlist.sip
|
||||
@@ -0,0 +1,70 @@
|
||||
// qaudio.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtMultimedia Python extension module.
|
||||
//
|
||||
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt6.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
%If (Qt_6_2_0 -)
|
||||
// Deprecated (and aliased to QtAudio) in Qt v6.7 but retained for compatibility.
|
||||
// We also ignore any methods that refer to QtAudio.
|
||||
|
||||
namespace QAudio
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qaudio.h>
|
||||
%End
|
||||
|
||||
enum Error
|
||||
{
|
||||
NoError,
|
||||
OpenError,
|
||||
IOError,
|
||||
UnderrunError,
|
||||
FatalError,
|
||||
};
|
||||
|
||||
enum State
|
||||
{
|
||||
ActiveState,
|
||||
SuspendedState,
|
||||
StoppedState,
|
||||
IdleState,
|
||||
};
|
||||
|
||||
enum VolumeScale
|
||||
{
|
||||
LinearVolumeScale,
|
||||
CubicVolumeScale,
|
||||
LogarithmicVolumeScale,
|
||||
DecibelVolumeScale,
|
||||
};
|
||||
|
||||
float convertVolume(float volume, QAudio::VolumeScale from, QAudio::VolumeScale to);
|
||||
};
|
||||
|
||||
%End
|
||||
|
||||
%PostInitialisationCode
|
||||
// Implement QtAudio as an alternative name to QAudio.
|
||||
|
||||
PyObject *qaudio = PyDict_GetItemString(sipModuleDict, sipName_QAudio);
|
||||
|
||||
if (qaudio && PyDict_SetItemString(sipModuleDict, "QtAudio", qaudio) == 0)
|
||||
Py_INCREF(qaudio);
|
||||
%End
|
||||
@@ -0,0 +1,59 @@
|
||||
// qaudiobuffer.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtMultimedia Python extension module.
|
||||
//
|
||||
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt6.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
%If (Qt_6_2_0 -)
|
||||
|
||||
class QAudioBuffer
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qaudiobuffer.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QAudioBuffer();
|
||||
QAudioBuffer(const QByteArray &data, const QAudioFormat &format, qint64 startTime = -1);
|
||||
QAudioBuffer(int numFrames, const QAudioFormat &format, qint64 startTime = -1);
|
||||
QAudioBuffer(const QAudioBuffer &other);
|
||||
~QAudioBuffer();
|
||||
bool isValid() const;
|
||||
QAudioFormat format() const;
|
||||
qsizetype frameCount() const;
|
||||
qsizetype sampleCount() const;
|
||||
qsizetype byteCount() const;
|
||||
qint64 duration() const;
|
||||
qint64 startTime() const;
|
||||
void swap(QAudioBuffer &other /Constrained/);
|
||||
void detach();
|
||||
SIP_PYOBJECT constData() const /TypeHint="PyQt6.sip.voidptr"/;
|
||||
%MethodCode
|
||||
sipRes = sipConvertFromConstVoidPtrAndSize(sipCpp->constData<char>(),
|
||||
sipCpp->byteCount());
|
||||
%End
|
||||
|
||||
SIP_PYOBJECT data() /TypeHint="PyQt6.sip.voidptr"/;
|
||||
%MethodCode
|
||||
sipRes = sipConvertFromVoidPtrAndSize(sipCpp->data<char>(),
|
||||
sipCpp->byteCount());
|
||||
%End
|
||||
};
|
||||
|
||||
%End
|
||||
@@ -0,0 +1,43 @@
|
||||
// qaudiobufferinput.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtMultimedia Python extension module.
|
||||
//
|
||||
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt6.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
%If (Qt_6_8_0 -)
|
||||
|
||||
class QAudioBufferInput : public QObject
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qaudiobufferinput.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
explicit QAudioBufferInput(QObject *parent /TransferThis/ = 0);
|
||||
QAudioBufferInput(const QAudioFormat &format, QObject *parent /TransferThis/ = 0);
|
||||
virtual ~QAudioBufferInput();
|
||||
QMediaCaptureSession *captureSession() const;
|
||||
QAudioFormat format() const;
|
||||
bool sendAudioBuffer(const QAudioBuffer &audioBuffer);
|
||||
|
||||
signals:
|
||||
void readyToSendAudioBuffer();
|
||||
};
|
||||
|
||||
%End
|
||||
@@ -0,0 +1,41 @@
|
||||
// qaudiobufferoutput.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtMultimedia Python extension module.
|
||||
//
|
||||
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt6.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
%If (Qt_6_8_0 -)
|
||||
|
||||
class QAudioBufferOutput : public QObject
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qaudiobufferoutput.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
explicit QAudioBufferOutput(QObject *parent /TransferThis/ = 0);
|
||||
QAudioBufferOutput(const QAudioFormat &format, QObject *parent /TransferThis/ = 0);
|
||||
virtual ~QAudioBufferOutput();
|
||||
QAudioFormat format() const;
|
||||
|
||||
signals:
|
||||
void audioBufferReceived(const QAudioBuffer &buffer);
|
||||
};
|
||||
|
||||
%End
|
||||
@@ -0,0 +1,74 @@
|
||||
// qaudiodecoder.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtMultimedia Python extension module.
|
||||
//
|
||||
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt6.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
%If (Qt_6_2_0 -)
|
||||
|
||||
class QAudioDecoder : public QObject
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qaudiodecoder.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum Error
|
||||
{
|
||||
NoError,
|
||||
ResourceError,
|
||||
FormatError,
|
||||
AccessDeniedError,
|
||||
NotSupportedError,
|
||||
};
|
||||
|
||||
explicit QAudioDecoder(QObject *parent /TransferThis/ = 0);
|
||||
virtual ~QAudioDecoder();
|
||||
bool isSupported() const;
|
||||
bool isDecoding() const;
|
||||
QUrl source() const;
|
||||
void setSource(const QUrl &fileName);
|
||||
QIODevice *sourceDevice() const;
|
||||
void setSourceDevice(QIODevice *device);
|
||||
QAudioDecoder::Error error() const;
|
||||
QString errorString() const;
|
||||
QAudioBuffer read() const /ReleaseGIL/;
|
||||
bool bufferAvailable() const;
|
||||
qint64 position() const;
|
||||
qint64 duration() const;
|
||||
QAudioFormat audioFormat() const;
|
||||
void setAudioFormat(const QAudioFormat &format);
|
||||
|
||||
public slots:
|
||||
void start();
|
||||
void stop();
|
||||
|
||||
signals:
|
||||
void bufferAvailableChanged(bool);
|
||||
void bufferReady();
|
||||
void finished();
|
||||
void isDecodingChanged(bool);
|
||||
void error(QAudioDecoder::Error error);
|
||||
void sourceChanged();
|
||||
void positionChanged(qint64 position);
|
||||
void durationChanged(qint64 duration);
|
||||
void formatChanged(const QAudioFormat &format);
|
||||
};
|
||||
|
||||
%End
|
||||
@@ -0,0 +1,62 @@
|
||||
// qaudiodevice.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtMultimedia Python extension module.
|
||||
//
|
||||
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt6.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
%If (Qt_6_2_0 -)
|
||||
|
||||
class QAudioDevice
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qaudiodevice.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum Mode
|
||||
{
|
||||
Null,
|
||||
Input,
|
||||
Output,
|
||||
};
|
||||
|
||||
QAudioDevice();
|
||||
QAudioDevice(const QAudioDevice &other);
|
||||
~QAudioDevice();
|
||||
void swap(QAudioDevice &other /Constrained/);
|
||||
bool operator==(const QAudioDevice &other) const;
|
||||
bool operator!=(const QAudioDevice &other) const;
|
||||
bool isNull() const;
|
||||
QByteArray id() const;
|
||||
QString description() const;
|
||||
bool isDefault() const;
|
||||
QAudioDevice::Mode mode() const;
|
||||
bool isFormatSupported(const QAudioFormat &format) const;
|
||||
QAudioFormat preferredFormat() const;
|
||||
int minimumSampleRate() const;
|
||||
int maximumSampleRate() const;
|
||||
int minimumChannelCount() const;
|
||||
int maximumChannelCount() const;
|
||||
QList<QAudioFormat::SampleFormat> supportedSampleFormats() const;
|
||||
%If (Qt_6_4_0 -)
|
||||
QAudioFormat::ChannelConfig channelConfiguration() const;
|
||||
%End
|
||||
};
|
||||
|
||||
%End
|
||||
@@ -0,0 +1,118 @@
|
||||
// qaudioformat.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtMultimedia Python extension module.
|
||||
//
|
||||
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt6.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
%If (Qt_6_2_0 -)
|
||||
|
||||
class QAudioFormat
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qaudioformat.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum AudioChannelPosition
|
||||
{
|
||||
UnknownPosition,
|
||||
FrontLeft,
|
||||
FrontRight,
|
||||
FrontCenter,
|
||||
LFE,
|
||||
BackLeft,
|
||||
BackRight,
|
||||
FrontLeftOfCenter,
|
||||
FrontRightOfCenter,
|
||||
BackCenter,
|
||||
LFE2,
|
||||
SideLeft,
|
||||
SideRight,
|
||||
TopFrontLeft,
|
||||
TopFrontRight,
|
||||
TopFrontCenter,
|
||||
TopCenter,
|
||||
TopBackLeft,
|
||||
TopBackRight,
|
||||
TopSideLeft,
|
||||
TopSideRight,
|
||||
TopBackCenter,
|
||||
BottomFrontCenter,
|
||||
BottomFrontLeft,
|
||||
BottomFrontRight,
|
||||
};
|
||||
|
||||
enum ChannelConfig : quint32
|
||||
{
|
||||
ChannelConfigUnknown,
|
||||
ChannelConfigMono,
|
||||
ChannelConfigStereo,
|
||||
ChannelConfig2Dot1,
|
||||
%If (Qt_6_4_0 -)
|
||||
ChannelConfig3Dot0,
|
||||
%End
|
||||
%If (Qt_6_4_0 -)
|
||||
ChannelConfig3Dot1,
|
||||
%End
|
||||
ChannelConfigSurround5Dot0,
|
||||
ChannelConfigSurround5Dot1,
|
||||
ChannelConfigSurround7Dot0,
|
||||
ChannelConfigSurround7Dot1,
|
||||
};
|
||||
|
||||
enum SampleFormat : quint16
|
||||
{
|
||||
Unknown,
|
||||
UInt8,
|
||||
Int16,
|
||||
Int32,
|
||||
Float,
|
||||
};
|
||||
|
||||
bool isValid() const;
|
||||
void setSampleRate(int sampleRate);
|
||||
int sampleRate() const;
|
||||
void setChannelCount(int channelCount);
|
||||
int channelCount() const;
|
||||
qint32 bytesForDuration(qint64 duration) const;
|
||||
qint64 durationForBytes(qint32 byteCount) const;
|
||||
qint32 bytesForFrames(qint32 frameCount) const;
|
||||
qint32 framesForBytes(qint32 byteCount) const;
|
||||
qint32 framesForDuration(qint64 duration) const;
|
||||
qint64 durationForFrames(qint32 frameCount) const;
|
||||
int bytesPerFrame() const;
|
||||
void setChannelConfig(QAudioFormat::ChannelConfig config);
|
||||
QAudioFormat::ChannelConfig channelConfig() const;
|
||||
int channelOffset(QAudioFormat::AudioChannelPosition channel) const;
|
||||
void setSampleFormat(QAudioFormat::SampleFormat f);
|
||||
QAudioFormat::SampleFormat sampleFormat() const;
|
||||
int bytesPerSample() const;
|
||||
float normalizedSampleValue(const void *sample) const;
|
||||
%If (Qt_6_4_0 -)
|
||||
static QAudioFormat::ChannelConfig defaultChannelConfigForChannelCount(int channelCount);
|
||||
%End
|
||||
};
|
||||
|
||||
%End
|
||||
%If (Qt_6_2_0 -)
|
||||
bool operator==(const QAudioFormat &a, const QAudioFormat &b);
|
||||
%End
|
||||
%If (Qt_6_2_0 -)
|
||||
bool operator!=(const QAudioFormat &a, const QAudioFormat &b);
|
||||
%End
|
||||
@@ -0,0 +1,50 @@
|
||||
// qaudioinput.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtMultimedia Python extension module.
|
||||
//
|
||||
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt6.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
%If (Qt_6_2_0 -)
|
||||
|
||||
class QAudioInput : public QObject
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qaudioinput.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QAudioInput(const QAudioDevice &deviceInfo, QObject *parent /TransferThis/ = 0);
|
||||
explicit QAudioInput(QObject *parent /TransferThis/ = 0);
|
||||
virtual ~QAudioInput();
|
||||
QAudioDevice device() const;
|
||||
float volume() const;
|
||||
bool isMuted() const;
|
||||
|
||||
public slots:
|
||||
void setDevice(const QAudioDevice &device);
|
||||
void setMuted(bool muted);
|
||||
void setVolume(float volume);
|
||||
|
||||
signals:
|
||||
void deviceChanged();
|
||||
void volumeChanged(float volume);
|
||||
void mutedChanged(bool muted);
|
||||
};
|
||||
|
||||
%End
|
||||
@@ -0,0 +1,50 @@
|
||||
// qaudiooutput.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtMultimedia Python extension module.
|
||||
//
|
||||
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt6.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
%If (Qt_6_2_0 -)
|
||||
|
||||
class QAudioOutput : public QObject
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qaudiooutput.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QAudioOutput(const QAudioDevice &device, QObject *parent /TransferThis/ = 0);
|
||||
explicit QAudioOutput(QObject *parent /TransferThis/ = 0);
|
||||
virtual ~QAudioOutput();
|
||||
float volume() const;
|
||||
QAudioDevice device() const;
|
||||
bool isMuted() const;
|
||||
|
||||
public slots:
|
||||
void setDevice(const QAudioDevice &device);
|
||||
void setVolume(float volume);
|
||||
void setMuted(bool muted);
|
||||
|
||||
signals:
|
||||
void deviceChanged();
|
||||
void volumeChanged(float volume);
|
||||
void mutedChanged(bool muted);
|
||||
};
|
||||
|
||||
%End
|
||||
@@ -0,0 +1,67 @@
|
||||
// qaudiosink.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtMultimedia Python extension module.
|
||||
//
|
||||
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt6.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
%If (Qt_6_2_0 -)
|
||||
|
||||
class QAudioSink : public QObject
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qaudiosink.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QAudioSink(const QAudioDevice &audioDeviceInfo, const QAudioFormat &format = QAudioFormat(), QObject *parent /TransferThis/ = 0);
|
||||
QAudioSink(const QAudioFormat &format = QAudioFormat(), QObject *parent /TransferThis/ = 0);
|
||||
virtual ~QAudioSink();
|
||||
QAudioFormat format() const;
|
||||
void start(QIODevice *device);
|
||||
QIODevice *start();
|
||||
void stop();
|
||||
void reset();
|
||||
void suspend();
|
||||
void resume();
|
||||
void setBufferSize(qsizetype bytes);
|
||||
qsizetype bufferSize() const;
|
||||
qsizetype bytesFree() const;
|
||||
qint64 processedUSecs() const;
|
||||
qint64 elapsedUSecs() const;
|
||||
QAudio::Error error() const;
|
||||
QAudio::State state() const;
|
||||
void setVolume(qreal);
|
||||
qreal volume() const;
|
||||
|
||||
signals:
|
||||
void stateChanged(QAudio::State state);
|
||||
|
||||
public:
|
||||
%If (Qt_6_10_0 -)
|
||||
void setBufferFrameCount(qsizetype framesCount);
|
||||
%End
|
||||
%If (Qt_6_10_0 -)
|
||||
qsizetype bufferFrameCount() const;
|
||||
%End
|
||||
%If (Qt_6_10_0 -)
|
||||
qsizetype framesFree() const;
|
||||
%End
|
||||
};
|
||||
|
||||
%End
|
||||
@@ -0,0 +1,67 @@
|
||||
// qaudiosource.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtMultimedia Python extension module.
|
||||
//
|
||||
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt6.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
%If (Qt_6_2_0 -)
|
||||
|
||||
class QAudioSource : public QObject
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qaudiosource.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QAudioSource(const QAudioDevice &audioDeviceInfo, const QAudioFormat &format = QAudioFormat(), QObject *parent /TransferThis/ = 0);
|
||||
QAudioSource(const QAudioFormat &format = QAudioFormat(), QObject *parent /TransferThis/ = 0);
|
||||
virtual ~QAudioSource();
|
||||
QAudioFormat format() const;
|
||||
void start(QIODevice *device);
|
||||
QIODevice *start();
|
||||
void stop();
|
||||
void reset();
|
||||
void suspend();
|
||||
void resume();
|
||||
void setBufferSize(qsizetype bytes);
|
||||
qsizetype bufferSize() const;
|
||||
qsizetype bytesAvailable() const;
|
||||
void setVolume(qreal volume);
|
||||
qreal volume() const;
|
||||
qint64 processedUSecs() const;
|
||||
qint64 elapsedUSecs() const;
|
||||
QAudio::Error error() const;
|
||||
QAudio::State state() const;
|
||||
|
||||
signals:
|
||||
void stateChanged(QAudio::State state);
|
||||
|
||||
public:
|
||||
%If (Qt_6_10_0 -)
|
||||
void setBufferFrameCount(qsizetype frames);
|
||||
%End
|
||||
%If (Qt_6_10_0 -)
|
||||
qsizetype bufferFrameCount() const;
|
||||
%End
|
||||
%If (Qt_6_10_0 -)
|
||||
qsizetype framesAvailable() const;
|
||||
%End
|
||||
};
|
||||
|
||||
%End
|
||||
@@ -0,0 +1,261 @@
|
||||
// qcamera.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtMultimedia Python extension module.
|
||||
//
|
||||
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt6.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
%If (Qt_6_2_0 -)
|
||||
|
||||
class QCamera : public QObject
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qcamera.h>
|
||||
%End
|
||||
|
||||
%ConvertToSubClassCode
|
||||
static struct class_graph {
|
||||
const char *name;
|
||||
sipTypeDef **type;
|
||||
int yes, no;
|
||||
} graph[] = {
|
||||
#if QT_VERSION >= 0x060800
|
||||
{sipName_QAudioBufferInput, &sipType_QAudioBufferInput, -1, 1},
|
||||
#else
|
||||
{0, 0, -1, 1},
|
||||
#endif
|
||||
#if QT_VERSION >= 0x060800
|
||||
{sipName_QAudioBufferOutput, &sipType_QAudioBufferOutput, -1, 2},
|
||||
#else
|
||||
{0, 0, -1, 2},
|
||||
#endif
|
||||
{sipName_QAudioDecoder, &sipType_QAudioDecoder, -1, 3},
|
||||
{sipName_QAudioInput, &sipType_QAudioInput, -1, 4},
|
||||
{sipName_QAudioOutput, &sipType_QAudioOutput, -1, 5},
|
||||
{sipName_QAudioSink, &sipType_QAudioSink, -1, 6},
|
||||
{sipName_QAudioSource, &sipType_QAudioSource, -1, 7},
|
||||
{sipName_QCamera, &sipType_QCamera, -1, 8},
|
||||
{sipName_QImageCapture, &sipType_QImageCapture, -1, 9},
|
||||
{sipName_QMediaCaptureSession, &sipType_QMediaCaptureSession, -1, 10},
|
||||
{sipName_QMediaDevices, &sipType_QMediaDevices, -1, 11},
|
||||
{sipName_QMediaPlayer, &sipType_QMediaPlayer, -1, 12},
|
||||
{sipName_QMediaRecorder, &sipType_QMediaRecorder, -1, 13},
|
||||
#if QT_VERSION >= 0x060500
|
||||
{sipName_QScreenCapture, &sipType_QScreenCapture, -1, 14},
|
||||
#else
|
||||
{0, 0, -1, 14},
|
||||
#endif
|
||||
{sipName_QSoundEffect, &sipType_QSoundEffect, -1, 15},
|
||||
#if QT_VERSION >= 0x060800
|
||||
{sipName_QVideoFrameInput, &sipType_QVideoFrameInput, -1, 16},
|
||||
#else
|
||||
{0, 0, -1, 16},
|
||||
#endif
|
||||
{sipName_QVideoSink, &sipType_QVideoSink, -1, 17},
|
||||
#if QT_VERSION >= 0x060600
|
||||
{sipName_QWindowCapture, &sipType_QWindowCapture, -1, -1},
|
||||
#else
|
||||
{0, 0, -1, -1},
|
||||
#endif
|
||||
};
|
||||
|
||||
int i = 0;
|
||||
|
||||
sipType = NULL;
|
||||
|
||||
do
|
||||
{
|
||||
struct class_graph *cg = &graph[i];
|
||||
|
||||
if (cg->name != NULL && sipCpp->inherits(cg->name))
|
||||
{
|
||||
sipType = *cg->type;
|
||||
i = cg->yes;
|
||||
}
|
||||
else
|
||||
i = cg->no;
|
||||
}
|
||||
while (i >= 0);
|
||||
%End
|
||||
|
||||
public:
|
||||
enum Error
|
||||
{
|
||||
NoError,
|
||||
CameraError,
|
||||
};
|
||||
|
||||
enum FocusMode
|
||||
{
|
||||
FocusModeAuto,
|
||||
FocusModeAutoNear,
|
||||
FocusModeAutoFar,
|
||||
FocusModeHyperfocal,
|
||||
FocusModeInfinity,
|
||||
FocusModeManual,
|
||||
};
|
||||
|
||||
enum FlashMode
|
||||
{
|
||||
FlashOff,
|
||||
FlashOn,
|
||||
FlashAuto,
|
||||
};
|
||||
|
||||
enum TorchMode
|
||||
{
|
||||
TorchOff,
|
||||
TorchOn,
|
||||
TorchAuto,
|
||||
};
|
||||
|
||||
enum ExposureMode
|
||||
{
|
||||
ExposureAuto,
|
||||
ExposureManual,
|
||||
ExposurePortrait,
|
||||
ExposureNight,
|
||||
ExposureSports,
|
||||
ExposureSnow,
|
||||
ExposureBeach,
|
||||
ExposureAction,
|
||||
ExposureLandscape,
|
||||
ExposureNightPortrait,
|
||||
ExposureTheatre,
|
||||
ExposureSunset,
|
||||
ExposureSteadyPhoto,
|
||||
ExposureFireworks,
|
||||
ExposureParty,
|
||||
ExposureCandlelight,
|
||||
ExposureBarcode,
|
||||
};
|
||||
|
||||
enum WhiteBalanceMode
|
||||
{
|
||||
WhiteBalanceAuto,
|
||||
WhiteBalanceManual,
|
||||
WhiteBalanceSunlight,
|
||||
WhiteBalanceCloudy,
|
||||
WhiteBalanceShade,
|
||||
WhiteBalanceTungsten,
|
||||
WhiteBalanceFluorescent,
|
||||
WhiteBalanceFlash,
|
||||
WhiteBalanceSunset,
|
||||
};
|
||||
|
||||
enum class Feature
|
||||
{
|
||||
ColorTemperature,
|
||||
ExposureCompensation,
|
||||
IsoSensitivity,
|
||||
ManualExposureTime,
|
||||
CustomFocusPoint,
|
||||
FocusDistance,
|
||||
};
|
||||
|
||||
typedef QFlags<QCamera::Feature> Features;
|
||||
QCamera(const QCameraDevice &cameraDevice, QObject *parent /TransferThis/ = 0);
|
||||
QCamera(QCameraDevice::Position position, QObject *parent /TransferThis/ = 0);
|
||||
explicit QCamera(QObject *parent /TransferThis/ = 0);
|
||||
virtual ~QCamera();
|
||||
bool isAvailable() const;
|
||||
bool isActive() const;
|
||||
QMediaCaptureSession *captureSession() const;
|
||||
QCameraDevice cameraDevice() const;
|
||||
void setCameraDevice(const QCameraDevice &cameraDevice);
|
||||
QCameraFormat cameraFormat() const;
|
||||
void setCameraFormat(const QCameraFormat &format);
|
||||
QCamera::Error error() const;
|
||||
QString errorString() const;
|
||||
QCamera::Features supportedFeatures() const;
|
||||
QCamera::FocusMode focusMode() const;
|
||||
void setFocusMode(QCamera::FocusMode mode);
|
||||
bool isFocusModeSupported(QCamera::FocusMode mode) const;
|
||||
QPointF focusPoint() const;
|
||||
QPointF customFocusPoint() const;
|
||||
void setCustomFocusPoint(const QPointF &point);
|
||||
void setFocusDistance(float d);
|
||||
float focusDistance() const;
|
||||
float minimumZoomFactor() const;
|
||||
float maximumZoomFactor() const;
|
||||
float zoomFactor() const;
|
||||
void setZoomFactor(float factor);
|
||||
QCamera::FlashMode flashMode() const;
|
||||
bool isFlashModeSupported(QCamera::FlashMode mode) const;
|
||||
bool isFlashReady() const;
|
||||
QCamera::TorchMode torchMode() const;
|
||||
bool isTorchModeSupported(QCamera::TorchMode mode) const;
|
||||
QCamera::ExposureMode exposureMode() const;
|
||||
bool isExposureModeSupported(QCamera::ExposureMode mode) const;
|
||||
float exposureCompensation() const;
|
||||
int isoSensitivity() const;
|
||||
int manualIsoSensitivity() const;
|
||||
float exposureTime() const;
|
||||
float manualExposureTime() const;
|
||||
int minimumIsoSensitivity() const;
|
||||
int maximumIsoSensitivity() const;
|
||||
float minimumExposureTime() const;
|
||||
float maximumExposureTime() const;
|
||||
QCamera::WhiteBalanceMode whiteBalanceMode() const;
|
||||
bool isWhiteBalanceModeSupported(QCamera::WhiteBalanceMode mode) const;
|
||||
int colorTemperature() const;
|
||||
|
||||
public slots:
|
||||
void setActive(bool active);
|
||||
void start();
|
||||
void stop();
|
||||
void zoomTo(float zoom, float rate);
|
||||
void setFlashMode(QCamera::FlashMode mode);
|
||||
void setTorchMode(QCamera::TorchMode mode);
|
||||
void setExposureMode(QCamera::ExposureMode mode);
|
||||
void setExposureCompensation(float ev);
|
||||
void setManualIsoSensitivity(int iso);
|
||||
void setAutoIsoSensitivity();
|
||||
void setManualExposureTime(float seconds);
|
||||
void setAutoExposureTime();
|
||||
void setWhiteBalanceMode(QCamera::WhiteBalanceMode mode);
|
||||
void setColorTemperature(int colorTemperature);
|
||||
|
||||
signals:
|
||||
void activeChanged(bool);
|
||||
void errorChanged();
|
||||
void errorOccurred(QCamera::Error error, const QString &errorString);
|
||||
void cameraDeviceChanged();
|
||||
void cameraFormatChanged();
|
||||
void supportedFeaturesChanged();
|
||||
void focusModeChanged();
|
||||
void zoomFactorChanged(float);
|
||||
void minimumZoomFactorChanged(float);
|
||||
void maximumZoomFactorChanged(float);
|
||||
void focusDistanceChanged(float);
|
||||
void customFocusPointChanged();
|
||||
void flashReady(bool);
|
||||
void flashModeChanged();
|
||||
void torchModeChanged();
|
||||
void exposureTimeChanged(float speed);
|
||||
void isoSensitivityChanged(int);
|
||||
void exposureCompensationChanged(float);
|
||||
void exposureModeChanged();
|
||||
void whiteBalanceModeChanged() const;
|
||||
void colorTemperatureChanged() const;
|
||||
void focusPointChanged();
|
||||
void manualExposureTimeChanged(float speed);
|
||||
void manualIsoSensitivityChanged(int);
|
||||
};
|
||||
|
||||
%End
|
||||
@@ -0,0 +1,79 @@
|
||||
// qcameradevice.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtMultimedia Python extension module.
|
||||
//
|
||||
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt6.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
%If (Qt_6_2_0 -)
|
||||
|
||||
class QCameraFormat
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qcameradevice.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QCameraFormat();
|
||||
QCameraFormat(const QCameraFormat &other);
|
||||
~QCameraFormat();
|
||||
QVideoFrameFormat::PixelFormat pixelFormat() const;
|
||||
QSize resolution() const;
|
||||
float minFrameRate() const;
|
||||
float maxFrameRate() const;
|
||||
bool isNull() const;
|
||||
bool operator==(const QCameraFormat &other) const;
|
||||
bool operator!=(const QCameraFormat &other) const;
|
||||
};
|
||||
|
||||
%End
|
||||
%If (Qt_6_2_0 -)
|
||||
|
||||
class QCameraDevice
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qcameradevice.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QCameraDevice();
|
||||
QCameraDevice(const QCameraDevice &other);
|
||||
~QCameraDevice();
|
||||
bool operator==(const QCameraDevice &other) const;
|
||||
bool operator!=(const QCameraDevice &other) const;
|
||||
bool isNull() const;
|
||||
QByteArray id() const;
|
||||
QString description() const;
|
||||
bool isDefault() const;
|
||||
|
||||
enum Position
|
||||
{
|
||||
UnspecifiedPosition,
|
||||
BackFace,
|
||||
FrontFace,
|
||||
};
|
||||
|
||||
QCameraDevice::Position position() const;
|
||||
QList<QSize> photoResolutions() const;
|
||||
QList<QCameraFormat> videoFormats() const;
|
||||
%If (Qt_6_7_0 -)
|
||||
QtVideo::Rotation correctionAngle() const;
|
||||
%End
|
||||
};
|
||||
|
||||
%End
|
||||
@@ -0,0 +1,49 @@
|
||||
// qcapturablewindow.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtMultimedia Python extension module.
|
||||
//
|
||||
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt6.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
%If (Qt_6_6_0 -)
|
||||
|
||||
class QCapturableWindow
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qcapturablewindow.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QCapturableWindow();
|
||||
%If (Qt_6_10_0 -)
|
||||
explicit QCapturableWindow(QWindow *window);
|
||||
%End
|
||||
~QCapturableWindow();
|
||||
QCapturableWindow(const QCapturableWindow &other);
|
||||
void swap(QCapturableWindow &other /Constrained/);
|
||||
bool isValid() const;
|
||||
QString description() const;
|
||||
};
|
||||
|
||||
%End
|
||||
%If (Qt_6_6_0 -)
|
||||
bool operator==(const QCapturableWindow &lhs, const QCapturableWindow &rhs);
|
||||
%End
|
||||
%If (Qt_6_6_0 -)
|
||||
bool operator!=(const QCapturableWindow &lhs, const QCapturableWindow &rhs);
|
||||
%End
|
||||
@@ -0,0 +1,99 @@
|
||||
// qimagecapture.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtMultimedia Python extension module.
|
||||
//
|
||||
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt6.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
%If (Qt_6_2_0 -)
|
||||
|
||||
class QImageCapture : public QObject
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qimagecapture.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum Error
|
||||
{
|
||||
NoError,
|
||||
NotReadyError,
|
||||
ResourceError,
|
||||
OutOfSpaceError,
|
||||
NotSupportedFeatureError,
|
||||
FormatError,
|
||||
};
|
||||
|
||||
enum Quality
|
||||
{
|
||||
VeryLowQuality,
|
||||
LowQuality,
|
||||
NormalQuality,
|
||||
HighQuality,
|
||||
VeryHighQuality,
|
||||
};
|
||||
|
||||
enum FileFormat
|
||||
{
|
||||
UnspecifiedFormat,
|
||||
JPEG,
|
||||
PNG,
|
||||
WebP,
|
||||
Tiff,
|
||||
};
|
||||
|
||||
explicit QImageCapture(QObject *parent /TransferThis/ = 0);
|
||||
virtual ~QImageCapture();
|
||||
bool isAvailable() const;
|
||||
QMediaCaptureSession *captureSession() const;
|
||||
QImageCapture::Error error() const;
|
||||
QString errorString() const;
|
||||
bool isReadyForCapture() const;
|
||||
QImageCapture::FileFormat fileFormat() const;
|
||||
void setFileFormat(QImageCapture::FileFormat format);
|
||||
static QList<QImageCapture::FileFormat> supportedFormats();
|
||||
static QString fileFormatName(QImageCapture::FileFormat c);
|
||||
static QString fileFormatDescription(QImageCapture::FileFormat c);
|
||||
QSize resolution() const;
|
||||
void setResolution(const QSize &);
|
||||
void setResolution(int width, int height);
|
||||
QImageCapture::Quality quality() const;
|
||||
void setQuality(QImageCapture::Quality quality);
|
||||
QMediaMetaData metaData() const;
|
||||
void setMetaData(const QMediaMetaData &metaData);
|
||||
void addMetaData(const QMediaMetaData &metaData);
|
||||
|
||||
public slots:
|
||||
int captureToFile(const QString &location = QString());
|
||||
int capture();
|
||||
|
||||
signals:
|
||||
void errorChanged();
|
||||
void errorOccurred(int id, QImageCapture::Error error, const QString &errorString);
|
||||
void readyForCaptureChanged(bool ready);
|
||||
void metaDataChanged();
|
||||
void fileFormatChanged();
|
||||
void qualityChanged();
|
||||
void resolutionChanged();
|
||||
void imageExposed(int id);
|
||||
void imageCaptured(int id, const QImage &preview);
|
||||
void imageAvailable(int id, const QVideoFrame &frame);
|
||||
void imageSaved(int id, const QString &fileName);
|
||||
};
|
||||
|
||||
%End
|
||||
@@ -0,0 +1,106 @@
|
||||
// qmediacapturesession.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtMultimedia Python extension module.
|
||||
//
|
||||
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt6.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
%If (Qt_6_2_0 -)
|
||||
|
||||
class QMediaCaptureSession : public QObject
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qmediacapturesession.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
explicit QMediaCaptureSession(QObject *parent /TransferThis/ = 0);
|
||||
virtual ~QMediaCaptureSession();
|
||||
QAudioInput *audioInput() const;
|
||||
void setAudioInput(QAudioInput *device);
|
||||
QCamera *camera() const;
|
||||
void setCamera(QCamera *camera);
|
||||
QImageCapture *imageCapture();
|
||||
void setImageCapture(QImageCapture *imageCapture);
|
||||
QMediaRecorder *recorder();
|
||||
void setRecorder(QMediaRecorder *recorder);
|
||||
void setVideoOutput(QObject *output);
|
||||
QObject *videoOutput() const;
|
||||
void setVideoSink(QVideoSink *sink);
|
||||
QVideoSink *videoSink() const;
|
||||
void setAudioOutput(QAudioOutput *output);
|
||||
QAudioOutput *audioOutput() const;
|
||||
|
||||
signals:
|
||||
void audioInputChanged();
|
||||
void cameraChanged();
|
||||
void imageCaptureChanged();
|
||||
void recorderChanged();
|
||||
void videoOutputChanged();
|
||||
void audioOutputChanged();
|
||||
|
||||
public:
|
||||
%If (Qt_6_5_0 -)
|
||||
QScreenCapture *screenCapture();
|
||||
%End
|
||||
%If (Qt_6_5_0 -)
|
||||
void setScreenCapture(QScreenCapture *screenCapture);
|
||||
%End
|
||||
|
||||
signals:
|
||||
%If (Qt_6_5_0 -)
|
||||
void screenCaptureChanged();
|
||||
%End
|
||||
|
||||
public:
|
||||
%If (Qt_6_6_0 -)
|
||||
QWindowCapture *windowCapture();
|
||||
%End
|
||||
%If (Qt_6_6_0 -)
|
||||
void setWindowCapture(QWindowCapture *windowCapture);
|
||||
%End
|
||||
|
||||
signals:
|
||||
%If (Qt_6_6_0 -)
|
||||
void windowCaptureChanged();
|
||||
%End
|
||||
|
||||
public:
|
||||
%If (Qt_6_8_0 -)
|
||||
QAudioBufferInput *audioBufferInput() const;
|
||||
%End
|
||||
%If (Qt_6_8_0 -)
|
||||
void setAudioBufferInput(QAudioBufferInput *input);
|
||||
%End
|
||||
%If (Qt_6_8_0 -)
|
||||
QVideoFrameInput *videoFrameInput() const;
|
||||
%End
|
||||
%If (Qt_6_8_0 -)
|
||||
void setVideoFrameInput(QVideoFrameInput *input);
|
||||
%End
|
||||
|
||||
signals:
|
||||
%If (Qt_6_8_0 -)
|
||||
void audioBufferInputChanged();
|
||||
%End
|
||||
%If (Qt_6_8_0 -)
|
||||
void videoFrameInputChanged();
|
||||
%End
|
||||
};
|
||||
|
||||
%End
|
||||
@@ -0,0 +1,47 @@
|
||||
// qmediadevices.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtMultimedia Python extension module.
|
||||
//
|
||||
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt6.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
%If (Qt_6_2_0 -)
|
||||
|
||||
class QMediaDevices : public QObject
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qmediadevices.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QMediaDevices(QObject *parent /TransferThis/ = 0);
|
||||
virtual ~QMediaDevices();
|
||||
static QList<QAudioDevice> audioInputs();
|
||||
static QList<QAudioDevice> audioOutputs();
|
||||
static QList<QCameraDevice> videoInputs();
|
||||
static QAudioDevice defaultAudioInput();
|
||||
static QAudioDevice defaultAudioOutput();
|
||||
static QCameraDevice defaultVideoInput();
|
||||
|
||||
signals:
|
||||
void audioInputsChanged();
|
||||
void audioOutputsChanged();
|
||||
void videoInputsChanged();
|
||||
};
|
||||
|
||||
%End
|
||||
@@ -0,0 +1,120 @@
|
||||
// qmediaformat.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtMultimedia Python extension module.
|
||||
//
|
||||
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt6.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
%If (Qt_6_2_0 -)
|
||||
|
||||
class QMediaFormat
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qmediaformat.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum FileFormat
|
||||
{
|
||||
UnspecifiedFormat,
|
||||
WMV,
|
||||
AVI,
|
||||
Matroska,
|
||||
MPEG4,
|
||||
Ogg,
|
||||
QuickTime,
|
||||
WebM,
|
||||
Mpeg4Audio,
|
||||
AAC,
|
||||
WMA,
|
||||
MP3,
|
||||
FLAC,
|
||||
Wave,
|
||||
};
|
||||
|
||||
enum class AudioCodec
|
||||
{
|
||||
Unspecified,
|
||||
MP3,
|
||||
AAC,
|
||||
AC3,
|
||||
EAC3,
|
||||
FLAC,
|
||||
DolbyTrueHD,
|
||||
Opus,
|
||||
Vorbis,
|
||||
Wave,
|
||||
WMA,
|
||||
ALAC,
|
||||
};
|
||||
|
||||
enum class VideoCodec
|
||||
{
|
||||
Unspecified,
|
||||
MPEG1,
|
||||
MPEG2,
|
||||
MPEG4,
|
||||
H264,
|
||||
H265,
|
||||
VP8,
|
||||
VP9,
|
||||
AV1,
|
||||
Theora,
|
||||
WMV,
|
||||
MotionJPEG,
|
||||
};
|
||||
|
||||
enum ConversionMode
|
||||
{
|
||||
Encode,
|
||||
Decode,
|
||||
};
|
||||
|
||||
enum ResolveFlags
|
||||
{
|
||||
NoFlags,
|
||||
RequiresVideo,
|
||||
};
|
||||
|
||||
QMediaFormat(QMediaFormat::FileFormat format = QMediaFormat::UnspecifiedFormat);
|
||||
QMediaFormat(const QMediaFormat &other);
|
||||
~QMediaFormat();
|
||||
void swap(QMediaFormat &other /Constrained/);
|
||||
QMediaFormat::FileFormat fileFormat() const;
|
||||
void setFileFormat(QMediaFormat::FileFormat f);
|
||||
void setVideoCodec(QMediaFormat::VideoCodec codec);
|
||||
QMediaFormat::VideoCodec videoCodec() const;
|
||||
void setAudioCodec(QMediaFormat::AudioCodec codec);
|
||||
QMediaFormat::AudioCodec audioCodec() const;
|
||||
bool isSupported(QMediaFormat::ConversionMode mode) const;
|
||||
QMimeType mimeType() const;
|
||||
QList<QMediaFormat::FileFormat> supportedFileFormats(QMediaFormat::ConversionMode m);
|
||||
QList<QMediaFormat::VideoCodec> supportedVideoCodecs(QMediaFormat::ConversionMode m);
|
||||
QList<QMediaFormat::AudioCodec> supportedAudioCodecs(QMediaFormat::ConversionMode m);
|
||||
static QString fileFormatName(QMediaFormat::FileFormat c);
|
||||
static QString audioCodecName(QMediaFormat::AudioCodec c);
|
||||
static QString videoCodecName(QMediaFormat::VideoCodec c);
|
||||
static QString fileFormatDescription(QMediaFormat::FileFormat c);
|
||||
static QString audioCodecDescription(QMediaFormat::AudioCodec c);
|
||||
static QString videoCodecDescription(QMediaFormat::VideoCodec c);
|
||||
void resolveForEncoding(QMediaFormat::ResolveFlags flags);
|
||||
bool operator==(const QMediaFormat &other) const;
|
||||
bool operator!=(const QMediaFormat &other) const;
|
||||
};
|
||||
|
||||
%End
|
||||
@@ -0,0 +1,85 @@
|
||||
// qmediametadata.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtMultimedia Python extension module.
|
||||
//
|
||||
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt6.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
%If (Qt_6_2_0 -)
|
||||
|
||||
class QMediaMetaData
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qmediametadata.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum Key
|
||||
{
|
||||
Title,
|
||||
Author,
|
||||
Comment,
|
||||
Description,
|
||||
Genre,
|
||||
Date,
|
||||
Language,
|
||||
Publisher,
|
||||
Copyright,
|
||||
Url,
|
||||
Duration,
|
||||
MediaType,
|
||||
FileFormat,
|
||||
AudioBitRate,
|
||||
AudioCodec,
|
||||
VideoBitRate,
|
||||
VideoCodec,
|
||||
VideoFrameRate,
|
||||
AlbumTitle,
|
||||
AlbumArtist,
|
||||
ContributingArtist,
|
||||
TrackNumber,
|
||||
Composer,
|
||||
LeadPerformer,
|
||||
ThumbnailImage,
|
||||
CoverArtImage,
|
||||
Orientation,
|
||||
Resolution,
|
||||
%If (Qt_6_8_0 -)
|
||||
HasHdrContent,
|
||||
%End
|
||||
};
|
||||
|
||||
QVariant value(QMediaMetaData::Key k) const;
|
||||
void insert(QMediaMetaData::Key k, const QVariant &value);
|
||||
QList<QMediaMetaData::Key> keys() const;
|
||||
QString stringValue(QMediaMetaData::Key k) const;
|
||||
static QString metaDataKeyToString(QMediaMetaData::Key k);
|
||||
|
||||
protected:
|
||||
%If (Qt_6_4_0 -)
|
||||
static QMetaType keyType(QMediaMetaData::Key key);
|
||||
%End
|
||||
};
|
||||
|
||||
%End
|
||||
%If (Qt_6_2_0 -)
|
||||
bool operator==(const QMediaMetaData &a, const QMediaMetaData &b);
|
||||
%End
|
||||
%If (Qt_6_2_0 -)
|
||||
bool operator!=(const QMediaMetaData &a, const QMediaMetaData &b);
|
||||
%End
|
||||
@@ -0,0 +1,199 @@
|
||||
// qmediaplayer.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtMultimedia Python extension module.
|
||||
//
|
||||
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt6.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
%If (Qt_6_2_0 -)
|
||||
|
||||
class QMediaPlayer : public QObject
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qmediaplayer.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum PlaybackState
|
||||
{
|
||||
StoppedState,
|
||||
PlayingState,
|
||||
PausedState,
|
||||
};
|
||||
|
||||
enum MediaStatus
|
||||
{
|
||||
NoMedia,
|
||||
LoadingMedia,
|
||||
LoadedMedia,
|
||||
StalledMedia,
|
||||
BufferingMedia,
|
||||
BufferedMedia,
|
||||
EndOfMedia,
|
||||
InvalidMedia,
|
||||
};
|
||||
|
||||
enum Error
|
||||
{
|
||||
NoError,
|
||||
ResourceError,
|
||||
FormatError,
|
||||
NetworkError,
|
||||
AccessDeniedError,
|
||||
};
|
||||
|
||||
explicit QMediaPlayer(QObject *parent /TransferThis/ = 0);
|
||||
virtual ~QMediaPlayer();
|
||||
QList<QMediaMetaData> audioTracks() const;
|
||||
QList<QMediaMetaData> videoTracks() const;
|
||||
QList<QMediaMetaData> subtitleTracks() const;
|
||||
int activeAudioTrack() const;
|
||||
int activeVideoTrack() const;
|
||||
int activeSubtitleTrack() const;
|
||||
void setActiveAudioTrack(int index);
|
||||
void setActiveVideoTrack(int index);
|
||||
void setActiveSubtitleTrack(int index);
|
||||
void setAudioOutput(QAudioOutput *output);
|
||||
QAudioOutput *audioOutput() const;
|
||||
void setVideoOutput(QObject *);
|
||||
QObject *videoOutput() const;
|
||||
void setVideoSink(QVideoSink *sink);
|
||||
QVideoSink *videoSink() const;
|
||||
QUrl source() const;
|
||||
const QIODevice *sourceDevice() const;
|
||||
QMediaPlayer::PlaybackState playbackState() const;
|
||||
QMediaPlayer::MediaStatus mediaStatus() const;
|
||||
qint64 duration() const;
|
||||
qint64 position() const;
|
||||
bool hasAudio() const;
|
||||
bool hasVideo() const;
|
||||
float bufferProgress() const;
|
||||
QMediaTimeRange bufferedTimeRange() const;
|
||||
bool isSeekable() const;
|
||||
qreal playbackRate() const;
|
||||
QMediaPlayer::Error error() const;
|
||||
QString errorString() const;
|
||||
bool isAvailable() const;
|
||||
QMediaMetaData metaData() const;
|
||||
|
||||
public slots:
|
||||
void play();
|
||||
void pause();
|
||||
void stop();
|
||||
void setPosition(qint64 position);
|
||||
void setPlaybackRate(qreal rate);
|
||||
void setSource(const QUrl &source) /ReleaseGIL/;
|
||||
void setSourceDevice(QIODevice *device, const QUrl &sourceUrl = QUrl()) /ReleaseGIL/;
|
||||
|
||||
signals:
|
||||
void sourceChanged(const QUrl &media);
|
||||
void playbackStateChanged(QMediaPlayer::PlaybackState newState);
|
||||
void mediaStatusChanged(QMediaPlayer::MediaStatus status);
|
||||
void durationChanged(qint64 duration);
|
||||
void positionChanged(qint64 position);
|
||||
void hasAudioChanged(bool available);
|
||||
void hasVideoChanged(bool videoAvailable);
|
||||
void bufferProgressChanged(float progress);
|
||||
void seekableChanged(bool seekable);
|
||||
void playbackRateChanged(qreal rate);
|
||||
void metaDataChanged();
|
||||
void videoOutputChanged();
|
||||
void audioOutputChanged();
|
||||
void tracksChanged();
|
||||
void activeTracksChanged();
|
||||
void errorChanged();
|
||||
void errorOccurred(QMediaPlayer::Error error, const QString &errorString);
|
||||
|
||||
public:
|
||||
enum Loops /BaseType=IntEnum/
|
||||
{
|
||||
Infinite,
|
||||
Once,
|
||||
};
|
||||
|
||||
int loops() const;
|
||||
void setLoops(int loops);
|
||||
|
||||
signals:
|
||||
void loopsChanged();
|
||||
|
||||
public:
|
||||
%If (Qt_6_5_0 -)
|
||||
bool isPlaying() const;
|
||||
%End
|
||||
|
||||
signals:
|
||||
%If (Qt_6_5_0 -)
|
||||
void playingChanged(bool playing);
|
||||
%End
|
||||
|
||||
public:
|
||||
%If (Qt_6_8_0 -)
|
||||
void setAudioBufferOutput(QAudioBufferOutput *output);
|
||||
%End
|
||||
%If (Qt_6_8_0 -)
|
||||
QAudioBufferOutput *audioBufferOutput() const;
|
||||
%End
|
||||
|
||||
signals:
|
||||
%If (Qt_6_8_0 -)
|
||||
void audioBufferOutputChanged();
|
||||
%End
|
||||
|
||||
public:
|
||||
%If (Qt_6_10_0 -)
|
||||
|
||||
enum class PitchCompensationAvailability
|
||||
{
|
||||
AlwaysOn,
|
||||
Available,
|
||||
Unavailable,
|
||||
};
|
||||
|
||||
%End
|
||||
%If (Qt_6_10_0 -)
|
||||
QMediaPlayer::PitchCompensationAvailability pitchCompensationAvailability() const;
|
||||
%End
|
||||
%If (Qt_6_10_0 -)
|
||||
bool pitchCompensation() const;
|
||||
%End
|
||||
%If (Qt_6_10_0 -)
|
||||
QPlaybackOptions playbackOptions() const;
|
||||
%End
|
||||
|
||||
public slots:
|
||||
%If (Qt_6_10_0 -)
|
||||
void setPitchCompensation(bool) const;
|
||||
%End
|
||||
%If (Qt_6_10_0 -)
|
||||
void setPlaybackOptions(const QPlaybackOptions &options);
|
||||
%End
|
||||
%If (Qt_6_10_0 -)
|
||||
void resetPlaybackOptions();
|
||||
%End
|
||||
|
||||
signals:
|
||||
%If (Qt_6_10_0 -)
|
||||
void pitchCompensationChanged(bool);
|
||||
%End
|
||||
%If (Qt_6_10_0 -)
|
||||
void playbackOptionsChanged();
|
||||
%End
|
||||
};
|
||||
|
||||
%End
|
||||
@@ -0,0 +1,140 @@
|
||||
// qmediarecorder.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtMultimedia Python extension module.
|
||||
//
|
||||
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt6.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
%If (Qt_6_2_0 -)
|
||||
|
||||
class QMediaRecorder : public QObject
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qmediarecorder.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum Quality
|
||||
{
|
||||
VeryLowQuality,
|
||||
LowQuality,
|
||||
NormalQuality,
|
||||
HighQuality,
|
||||
VeryHighQuality,
|
||||
};
|
||||
|
||||
enum EncodingMode
|
||||
{
|
||||
ConstantQualityEncoding,
|
||||
ConstantBitRateEncoding,
|
||||
AverageBitRateEncoding,
|
||||
TwoPassEncoding,
|
||||
};
|
||||
|
||||
enum RecorderState
|
||||
{
|
||||
StoppedState,
|
||||
RecordingState,
|
||||
PausedState,
|
||||
};
|
||||
|
||||
enum Error
|
||||
{
|
||||
NoError,
|
||||
ResourceError,
|
||||
FormatError,
|
||||
OutOfSpaceError,
|
||||
LocationNotWritable,
|
||||
};
|
||||
|
||||
QMediaRecorder(QObject *parent /TransferThis/ = 0);
|
||||
virtual ~QMediaRecorder();
|
||||
bool isAvailable() const;
|
||||
QUrl outputLocation() const;
|
||||
void setOutputLocation(const QUrl &location);
|
||||
QUrl actualLocation() const;
|
||||
QMediaRecorder::RecorderState recorderState() const;
|
||||
QMediaRecorder::Error error() const;
|
||||
QString errorString() const;
|
||||
qint64 duration() const;
|
||||
QMediaFormat mediaFormat() const;
|
||||
void setMediaFormat(const QMediaFormat &format);
|
||||
QMediaRecorder::EncodingMode encodingMode() const;
|
||||
void setEncodingMode(QMediaRecorder::EncodingMode);
|
||||
QMediaRecorder::Quality quality() const;
|
||||
void setQuality(QMediaRecorder::Quality quality);
|
||||
QSize videoResolution() const;
|
||||
void setVideoResolution(const QSize &);
|
||||
void setVideoResolution(int width, int height);
|
||||
qreal videoFrameRate() const;
|
||||
void setVideoFrameRate(qreal frameRate);
|
||||
int videoBitRate() const;
|
||||
void setVideoBitRate(int bitRate);
|
||||
int audioBitRate() const;
|
||||
void setAudioBitRate(int bitRate);
|
||||
int audioChannelCount() const;
|
||||
void setAudioChannelCount(int channels);
|
||||
int audioSampleRate() const;
|
||||
void setAudioSampleRate(int sampleRate);
|
||||
QMediaMetaData metaData() const;
|
||||
void setMetaData(const QMediaMetaData &metaData);
|
||||
QMediaCaptureSession *captureSession() const;
|
||||
|
||||
public slots:
|
||||
void record();
|
||||
void pause();
|
||||
void stop();
|
||||
|
||||
signals:
|
||||
void recorderStateChanged(QMediaRecorder::RecorderState state /ScopesStripped=1/);
|
||||
void durationChanged(qint64 duration);
|
||||
void actualLocationChanged(const QUrl &location);
|
||||
void errorOccurred(QMediaRecorder::Error error /ScopesStripped=1/, const QString &errorString);
|
||||
void errorChanged();
|
||||
void metaDataChanged();
|
||||
void mediaFormatChanged();
|
||||
void encodingModeChanged();
|
||||
void qualityChanged();
|
||||
void videoResolutionChanged();
|
||||
void videoFrameRateChanged();
|
||||
void videoBitRateChanged();
|
||||
void audioBitRateChanged();
|
||||
void audioChannelCountChanged();
|
||||
void audioSampleRateChanged();
|
||||
|
||||
public:
|
||||
%If (Qt_6_8_0 -)
|
||||
void setOutputDevice(QIODevice *device);
|
||||
%End
|
||||
%If (Qt_6_8_0 -)
|
||||
QIODevice *outputDevice() const;
|
||||
%End
|
||||
%If (Qt_6_8_0 -)
|
||||
bool autoStop() const;
|
||||
%End
|
||||
%If (Qt_6_8_0 -)
|
||||
void setAutoStop(bool autoStop);
|
||||
%End
|
||||
|
||||
signals:
|
||||
%If (Qt_6_8_0 -)
|
||||
void autoStopChanged();
|
||||
%End
|
||||
};
|
||||
|
||||
%End
|
||||
@@ -0,0 +1,89 @@
|
||||
// qmediatimerange.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtMultimedia Python extension module.
|
||||
//
|
||||
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt6.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
%If (Qt_6_2_0 -)
|
||||
|
||||
class QMediaTimeRange
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qmediatimerange.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QMediaTimeRange();
|
||||
QMediaTimeRange(const QMediaTimeRange::Interval &);
|
||||
QMediaTimeRange(qint64 start, qint64 end);
|
||||
QMediaTimeRange(const QMediaTimeRange &range);
|
||||
~QMediaTimeRange();
|
||||
qint64 earliestTime() const;
|
||||
qint64 latestTime() const;
|
||||
QList<QMediaTimeRange::Interval> intervals() const;
|
||||
bool isEmpty() const;
|
||||
bool isContinuous() const;
|
||||
bool contains(qint64 time) const;
|
||||
void addInterval(const QMediaTimeRange::Interval &interval);
|
||||
void addInterval(qint64 start, qint64 end);
|
||||
void addTimeRange(const QMediaTimeRange &);
|
||||
void removeInterval(const QMediaTimeRange::Interval &interval);
|
||||
void removeInterval(qint64 start, qint64 end);
|
||||
void removeTimeRange(const QMediaTimeRange &);
|
||||
QMediaTimeRange &operator+=(const QMediaTimeRange::Interval &);
|
||||
QMediaTimeRange &operator+=(const QMediaTimeRange &);
|
||||
QMediaTimeRange &operator-=(const QMediaTimeRange::Interval &);
|
||||
QMediaTimeRange &operator-=(const QMediaTimeRange &);
|
||||
void clear();
|
||||
|
||||
struct Interval
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qmediatimerange.h>
|
||||
%End
|
||||
|
||||
Interval(qint64 start, qint64 end);
|
||||
qint64 start() const;
|
||||
qint64 end() const;
|
||||
bool contains(qint64 time) const;
|
||||
bool isNormal() const;
|
||||
QMediaTimeRange::Interval normalized() const;
|
||||
QMediaTimeRange::Interval translated(qint64 offset) const;
|
||||
};
|
||||
};
|
||||
|
||||
%End
|
||||
%If (Qt_6_2_0 -)
|
||||
bool operator==(const QMediaTimeRange &, const QMediaTimeRange &);
|
||||
%End
|
||||
%If (Qt_6_2_0 -)
|
||||
bool operator!=(const QMediaTimeRange &, const QMediaTimeRange &);
|
||||
%End
|
||||
%If (Qt_6_2_0 -)
|
||||
QMediaTimeRange operator+(const QMediaTimeRange &, const QMediaTimeRange &);
|
||||
%End
|
||||
%If (Qt_6_2_0 -)
|
||||
QMediaTimeRange operator-(const QMediaTimeRange &, const QMediaTimeRange &);
|
||||
%End
|
||||
%If (Qt_6_2_0 -)
|
||||
bool operator==(QMediaTimeRange::Interval lhs, QMediaTimeRange::Interval rhs);
|
||||
%End
|
||||
%If (Qt_6_2_0 -)
|
||||
bool operator!=(QMediaTimeRange::Interval lhs, QMediaTimeRange::Interval rhs);
|
||||
%End
|
||||
@@ -0,0 +1,71 @@
|
||||
// qplaybackoptions.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtMultimedia Python extension module.
|
||||
//
|
||||
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt6.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
%If (Qt_6_10_0 -)
|
||||
|
||||
class QPlaybackOptions
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qplaybackoptions.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum class PlaybackIntent
|
||||
{
|
||||
Playback,
|
||||
LowLatencyStreaming,
|
||||
};
|
||||
|
||||
QPlaybackOptions();
|
||||
QPlaybackOptions(const QPlaybackOptions &);
|
||||
~QPlaybackOptions();
|
||||
void swap(QPlaybackOptions &other /Constrained/);
|
||||
std::chrono::milliseconds networkTimeout() const;
|
||||
void setNetworkTimeout(std::chrono::milliseconds timeout);
|
||||
void resetNetworkTimeout();
|
||||
QPlaybackOptions::PlaybackIntent playbackIntent() const;
|
||||
void setPlaybackIntent(QPlaybackOptions::PlaybackIntent intent);
|
||||
void resetPlaybackIntent();
|
||||
qsizetype probeSize() const;
|
||||
void setProbeSize(qsizetype probeSizeBytes);
|
||||
void resetProbeSize();
|
||||
};
|
||||
|
||||
%End
|
||||
%If (Qt_6_10_0 -)
|
||||
bool operator>=(const QPlaybackOptions &lhs, const QPlaybackOptions &rhs);
|
||||
%End
|
||||
%If (Qt_6_10_0 -)
|
||||
bool operator<=(const QPlaybackOptions &lhs, const QPlaybackOptions &rhs);
|
||||
%End
|
||||
%If (Qt_6_10_0 -)
|
||||
bool operator>(const QPlaybackOptions &lhs, const QPlaybackOptions &rhs);
|
||||
%End
|
||||
%If (Qt_6_10_0 -)
|
||||
bool operator<(const QPlaybackOptions &lhs, const QPlaybackOptions &rhs);
|
||||
%End
|
||||
%If (Qt_6_10_0 -)
|
||||
bool operator!=(const QPlaybackOptions &lhs, const QPlaybackOptions &rhs);
|
||||
%End
|
||||
%If (Qt_6_10_0 -)
|
||||
bool operator==(const QPlaybackOptions &lhs, const QPlaybackOptions &rhs);
|
||||
%End
|
||||
@@ -0,0 +1,530 @@
|
||||
// This is the SIP interface definition for the QList based mapped types
|
||||
// specific to the QtMultimedia module.
|
||||
//
|
||||
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt6.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
%If (Qt_6_2_0 -)
|
||||
|
||||
|
||||
%MappedType QList<QAudioFormat::SampleFormat>
|
||||
/TypeHintIn="Iterable[QAudioFormat.SampleFormat]",
|
||||
TypeHintOut="List[QAudioFormat.SampleFormat]", TypeHintValue="[]"/
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qaudioformat.h>
|
||||
%End
|
||||
|
||||
%ConvertFromTypeCode
|
||||
PyObject *l = PyList_New(sipCpp->size());
|
||||
|
||||
if (!l)
|
||||
return 0;
|
||||
|
||||
for (int i = 0; i < sipCpp->size(); ++i)
|
||||
{
|
||||
PyObject *eobj = sipConvertFromEnum(sipCpp->at(i),
|
||||
sipType_QAudioFormat_SampleFormat);
|
||||
|
||||
if (!eobj)
|
||||
{
|
||||
Py_DECREF(l);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
PyList_SetItem(l, i, eobj);
|
||||
}
|
||||
|
||||
return l;
|
||||
%End
|
||||
|
||||
%ConvertToTypeCode
|
||||
PyObject *iter = PyObject_GetIter(sipPy);
|
||||
|
||||
if (!sipIsErr)
|
||||
{
|
||||
PyErr_Clear();
|
||||
Py_XDECREF(iter);
|
||||
|
||||
return (iter && !PyBytes_Check(sipPy) && !PyUnicode_Check(sipPy));
|
||||
}
|
||||
|
||||
if (!iter)
|
||||
{
|
||||
*sipIsErr = 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
QList<QAudioFormat::SampleFormat> *ql = new QList<QAudioFormat::SampleFormat>;
|
||||
|
||||
for (Py_ssize_t i = 0; ; ++i)
|
||||
{
|
||||
PyErr_Clear();
|
||||
PyObject *itm = PyIter_Next(iter);
|
||||
|
||||
if (!itm)
|
||||
{
|
||||
if (PyErr_Occurred())
|
||||
{
|
||||
delete ql;
|
||||
Py_DECREF(iter);
|
||||
*sipIsErr = 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
int v = sipConvertToEnum(itm, sipType_QAudioFormat_SampleFormat);
|
||||
|
||||
if (PyErr_Occurred())
|
||||
{
|
||||
PyErr_Format(PyExc_TypeError,
|
||||
"index %zd has type '%s' but 'QAudioFormat.SampleFormat' is expected",
|
||||
i, sipPyTypeName(Py_TYPE(itm)));
|
||||
|
||||
Py_DECREF(itm);
|
||||
delete ql;
|
||||
Py_DECREF(iter);
|
||||
*sipIsErr = 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
ql->append(static_cast<QAudioFormat::SampleFormat>(v));
|
||||
|
||||
Py_DECREF(itm);
|
||||
}
|
||||
|
||||
Py_DECREF(iter);
|
||||
|
||||
*sipCppPtr = ql;
|
||||
|
||||
return sipGetState(sipTransferObj);
|
||||
%End
|
||||
};
|
||||
|
||||
|
||||
%MappedType QList<QImageCapture::FileFormat>
|
||||
/TypeHintIn="Iterable[QImageCapture.FileFormat]",
|
||||
TypeHintOut="List[QImageCapture.FileFormat]", TypeHintValue="[]"/
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qaudioformat.h>
|
||||
%End
|
||||
|
||||
%ConvertFromTypeCode
|
||||
PyObject *l = PyList_New(sipCpp->size());
|
||||
|
||||
if (!l)
|
||||
return 0;
|
||||
|
||||
for (int i = 0; i < sipCpp->size(); ++i)
|
||||
{
|
||||
PyObject *eobj = sipConvertFromEnum(sipCpp->at(i),
|
||||
sipType_QImageCapture_FileFormat);
|
||||
|
||||
if (!eobj)
|
||||
{
|
||||
Py_DECREF(l);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
PyList_SetItem(l, i, eobj);
|
||||
}
|
||||
|
||||
return l;
|
||||
%End
|
||||
|
||||
%ConvertToTypeCode
|
||||
PyObject *iter = PyObject_GetIter(sipPy);
|
||||
|
||||
if (!sipIsErr)
|
||||
{
|
||||
PyErr_Clear();
|
||||
Py_XDECREF(iter);
|
||||
|
||||
return (iter && !PyBytes_Check(sipPy) && !PyUnicode_Check(sipPy));
|
||||
}
|
||||
|
||||
if (!iter)
|
||||
{
|
||||
*sipIsErr = 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
QList<QImageCapture::FileFormat> *ql = new QList<QImageCapture::FileFormat>;
|
||||
|
||||
for (Py_ssize_t i = 0; ; ++i)
|
||||
{
|
||||
PyErr_Clear();
|
||||
PyObject *itm = PyIter_Next(iter);
|
||||
|
||||
if (!itm)
|
||||
{
|
||||
if (PyErr_Occurred())
|
||||
{
|
||||
delete ql;
|
||||
Py_DECREF(iter);
|
||||
*sipIsErr = 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
int v = sipConvertToEnum(itm, sipType_QImageCapture_FileFormat);
|
||||
|
||||
if (PyErr_Occurred())
|
||||
{
|
||||
PyErr_Format(PyExc_TypeError,
|
||||
"index %zd has type '%s' but 'QImageCapture.FileFormat' is expected",
|
||||
i, sipPyTypeName(Py_TYPE(itm)));
|
||||
|
||||
Py_DECREF(itm);
|
||||
delete ql;
|
||||
Py_DECREF(iter);
|
||||
*sipIsErr = 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
ql->append(static_cast<QImageCapture::FileFormat>(v));
|
||||
|
||||
Py_DECREF(itm);
|
||||
}
|
||||
|
||||
Py_DECREF(iter);
|
||||
|
||||
*sipCppPtr = ql;
|
||||
|
||||
return sipGetState(sipTransferObj);
|
||||
%End
|
||||
};
|
||||
|
||||
|
||||
%MappedType QList<QMediaFormat::FileFormat>
|
||||
/TypeHintIn="Iterable[QMediaFormat.FileFormat]",
|
||||
TypeHintOut="List[QMediaFormat.FileFormat]", TypeHintValue="[]"/
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qaudioformat.h>
|
||||
%End
|
||||
|
||||
%ConvertFromTypeCode
|
||||
PyObject *l = PyList_New(sipCpp->size());
|
||||
|
||||
if (!l)
|
||||
return 0;
|
||||
|
||||
for (int i = 0; i < sipCpp->size(); ++i)
|
||||
{
|
||||
PyObject *eobj = sipConvertFromEnum(sipCpp->at(i),
|
||||
sipType_QMediaFormat_FileFormat);
|
||||
|
||||
if (!eobj)
|
||||
{
|
||||
Py_DECREF(l);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
PyList_SetItem(l, i, eobj);
|
||||
}
|
||||
|
||||
return l;
|
||||
%End
|
||||
|
||||
%ConvertToTypeCode
|
||||
PyObject *iter = PyObject_GetIter(sipPy);
|
||||
|
||||
if (!sipIsErr)
|
||||
{
|
||||
PyErr_Clear();
|
||||
Py_XDECREF(iter);
|
||||
|
||||
return (iter && !PyBytes_Check(sipPy) && !PyUnicode_Check(sipPy));
|
||||
}
|
||||
|
||||
if (!iter)
|
||||
{
|
||||
*sipIsErr = 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
QList<QMediaFormat::FileFormat> *ql = new QList<QMediaFormat::FileFormat>;
|
||||
|
||||
for (Py_ssize_t i = 0; ; ++i)
|
||||
{
|
||||
PyErr_Clear();
|
||||
PyObject *itm = PyIter_Next(iter);
|
||||
|
||||
if (!itm)
|
||||
{
|
||||
if (PyErr_Occurred())
|
||||
{
|
||||
delete ql;
|
||||
Py_DECREF(iter);
|
||||
*sipIsErr = 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
int v = sipConvertToEnum(itm, sipType_QMediaFormat_FileFormat);
|
||||
|
||||
if (PyErr_Occurred())
|
||||
{
|
||||
PyErr_Format(PyExc_TypeError,
|
||||
"index %zd has type '%s' but 'QMediaFormat.FileFormat' is expected",
|
||||
i, sipPyTypeName(Py_TYPE(itm)));
|
||||
|
||||
Py_DECREF(itm);
|
||||
delete ql;
|
||||
Py_DECREF(iter);
|
||||
*sipIsErr = 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
ql->append(static_cast<QMediaFormat::FileFormat>(v));
|
||||
|
||||
Py_DECREF(itm);
|
||||
}
|
||||
|
||||
Py_DECREF(iter);
|
||||
|
||||
*sipCppPtr = ql;
|
||||
|
||||
return sipGetState(sipTransferObj);
|
||||
%End
|
||||
};
|
||||
|
||||
|
||||
%MappedType QList<QMediaFormat::AudioCodec>
|
||||
/TypeHintIn="Iterable[QMediaFormat.AudioCodec]",
|
||||
TypeHintOut="List[QMediaFormat.AudioCodec]", TypeHintValue="[]"/
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qaudioformat.h>
|
||||
%End
|
||||
|
||||
%ConvertFromTypeCode
|
||||
PyObject *l = PyList_New(sipCpp->size());
|
||||
|
||||
if (!l)
|
||||
return 0;
|
||||
|
||||
for (int i = 0; i < sipCpp->size(); ++i)
|
||||
{
|
||||
PyObject *eobj = sipConvertFromEnum(static_cast<int>(sipCpp->at(i)),
|
||||
sipType_QMediaFormat_AudioCodec);
|
||||
|
||||
if (!eobj)
|
||||
{
|
||||
Py_DECREF(l);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
PyList_SetItem(l, i, eobj);
|
||||
}
|
||||
|
||||
return l;
|
||||
%End
|
||||
|
||||
%ConvertToTypeCode
|
||||
PyObject *iter = PyObject_GetIter(sipPy);
|
||||
|
||||
if (!sipIsErr)
|
||||
{
|
||||
PyErr_Clear();
|
||||
Py_XDECREF(iter);
|
||||
|
||||
return (iter && !PyBytes_Check(sipPy) && !PyUnicode_Check(sipPy));
|
||||
}
|
||||
|
||||
if (!iter)
|
||||
{
|
||||
*sipIsErr = 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
QList<QMediaFormat::AudioCodec> *ql = new QList<QMediaFormat::AudioCodec>;
|
||||
|
||||
for (Py_ssize_t i = 0; ; ++i)
|
||||
{
|
||||
PyErr_Clear();
|
||||
PyObject *itm = PyIter_Next(iter);
|
||||
|
||||
if (!itm)
|
||||
{
|
||||
if (PyErr_Occurred())
|
||||
{
|
||||
delete ql;
|
||||
Py_DECREF(iter);
|
||||
*sipIsErr = 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
int v = sipConvertToEnum(itm, sipType_QMediaFormat_AudioCodec);
|
||||
|
||||
if (PyErr_Occurred())
|
||||
{
|
||||
PyErr_Format(PyExc_TypeError,
|
||||
"index %zd has type '%s' but 'QMediaFormat.AudioCodec' is expected",
|
||||
i, sipPyTypeName(Py_TYPE(itm)));
|
||||
|
||||
Py_DECREF(itm);
|
||||
delete ql;
|
||||
Py_DECREF(iter);
|
||||
*sipIsErr = 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
ql->append(static_cast<QMediaFormat::AudioCodec>(v));
|
||||
|
||||
Py_DECREF(itm);
|
||||
}
|
||||
|
||||
Py_DECREF(iter);
|
||||
|
||||
*sipCppPtr = ql;
|
||||
|
||||
return sipGetState(sipTransferObj);
|
||||
%End
|
||||
};
|
||||
|
||||
|
||||
%MappedType QList<QMediaFormat::VideoCodec>
|
||||
/TypeHintIn="Iterable[QMediaFormat.VideoCodec]",
|
||||
TypeHintOut="List[QMediaFormat.VideoCodec]", TypeHintValue="[]"/
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qaudioformat.h>
|
||||
%End
|
||||
|
||||
%ConvertFromTypeCode
|
||||
PyObject *l = PyList_New(sipCpp->size());
|
||||
|
||||
if (!l)
|
||||
return 0;
|
||||
|
||||
for (int i = 0; i < sipCpp->size(); ++i)
|
||||
{
|
||||
PyObject *eobj = sipConvertFromEnum(static_cast<int>(sipCpp->at(i)),
|
||||
sipType_QMediaFormat_VideoCodec);
|
||||
|
||||
if (!eobj)
|
||||
{
|
||||
Py_DECREF(l);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
PyList_SetItem(l, i, eobj);
|
||||
}
|
||||
|
||||
return l;
|
||||
%End
|
||||
|
||||
%ConvertToTypeCode
|
||||
PyObject *iter = PyObject_GetIter(sipPy);
|
||||
|
||||
if (!sipIsErr)
|
||||
{
|
||||
PyErr_Clear();
|
||||
Py_XDECREF(iter);
|
||||
|
||||
return (iter && !PyBytes_Check(sipPy) && !PyUnicode_Check(sipPy));
|
||||
}
|
||||
|
||||
if (!iter)
|
||||
{
|
||||
*sipIsErr = 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
QList<QMediaFormat::VideoCodec> *ql = new QList<QMediaFormat::VideoCodec>;
|
||||
|
||||
for (Py_ssize_t i = 0; ; ++i)
|
||||
{
|
||||
PyErr_Clear();
|
||||
PyObject *itm = PyIter_Next(iter);
|
||||
|
||||
if (!itm)
|
||||
{
|
||||
if (PyErr_Occurred())
|
||||
{
|
||||
delete ql;
|
||||
Py_DECREF(iter);
|
||||
*sipIsErr = 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
int v = sipConvertToEnum(itm, sipType_QMediaFormat_VideoCodec);
|
||||
|
||||
if (PyErr_Occurred())
|
||||
{
|
||||
PyErr_Format(PyExc_TypeError,
|
||||
"index %zd has type '%s' but 'QMediaFormat.VideoCodec' is expected",
|
||||
i, sipPyTypeName(Py_TYPE(itm)));
|
||||
|
||||
Py_DECREF(itm);
|
||||
delete ql;
|
||||
Py_DECREF(iter);
|
||||
*sipIsErr = 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
ql->append(static_cast<QMediaFormat::VideoCodec>(v));
|
||||
|
||||
Py_DECREF(itm);
|
||||
}
|
||||
|
||||
Py_DECREF(iter);
|
||||
|
||||
*sipCppPtr = ql;
|
||||
|
||||
return sipGetState(sipTransferObj);
|
||||
%End
|
||||
};
|
||||
|
||||
|
||||
%End
|
||||
@@ -0,0 +1,62 @@
|
||||
// qscreencapture.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtMultimedia Python extension module.
|
||||
//
|
||||
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt6.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
%If (Qt_6_5_0 -)
|
||||
|
||||
class QScreenCapture : public QObject
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qscreencapture.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum Error
|
||||
{
|
||||
NoError,
|
||||
InternalError,
|
||||
CapturingNotSupported,
|
||||
CaptureFailed,
|
||||
NotFound,
|
||||
};
|
||||
|
||||
explicit QScreenCapture(QObject *parent /TransferThis/ = 0);
|
||||
virtual ~QScreenCapture();
|
||||
QMediaCaptureSession *captureSession() const;
|
||||
void setScreen(QScreen *screen);
|
||||
QScreen *screen() const;
|
||||
bool isActive() const;
|
||||
QScreenCapture::Error error() const;
|
||||
QString errorString() const;
|
||||
|
||||
public slots:
|
||||
void setActive(bool active);
|
||||
void start();
|
||||
void stop();
|
||||
|
||||
signals:
|
||||
void activeChanged(bool);
|
||||
void errorChanged();
|
||||
void screenChanged(QScreen *);
|
||||
void errorOccurred(QScreenCapture::Error error, const QString &errorString);
|
||||
};
|
||||
|
||||
%End
|
||||
@@ -0,0 +1,80 @@
|
||||
// qsoundeffect.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtMultimedia Python extension module.
|
||||
//
|
||||
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt6.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
%If (Qt_6_2_0 -)
|
||||
|
||||
class QSoundEffect : public QObject
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qsoundeffect.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum Loop
|
||||
{
|
||||
Infinite,
|
||||
};
|
||||
|
||||
enum Status
|
||||
{
|
||||
Null,
|
||||
Loading,
|
||||
Ready,
|
||||
Error,
|
||||
};
|
||||
|
||||
QSoundEffect(const QAudioDevice &audioDevice, QObject *parent /TransferThis/ = 0);
|
||||
explicit QSoundEffect(QObject *parent /TransferThis/ = 0);
|
||||
virtual ~QSoundEffect();
|
||||
static QStringList supportedMimeTypes();
|
||||
QAudioDevice audioDevice();
|
||||
void setAudioDevice(const QAudioDevice &device);
|
||||
QUrl source() const;
|
||||
void setSource(const QUrl &url);
|
||||
int loopCount() const;
|
||||
int loopsRemaining() const;
|
||||
void setLoopCount(int loopCount);
|
||||
float volume() const;
|
||||
void setVolume(float volume);
|
||||
bool isMuted() const;
|
||||
void setMuted(bool muted);
|
||||
bool isLoaded() const;
|
||||
bool isPlaying() const;
|
||||
QSoundEffect::Status status() const;
|
||||
|
||||
public slots:
|
||||
void play();
|
||||
void stop();
|
||||
|
||||
signals:
|
||||
void audioDeviceChanged();
|
||||
void sourceChanged();
|
||||
void loopCountChanged();
|
||||
void loopsRemainingChanged();
|
||||
void volumeChanged();
|
||||
void mutedChanged();
|
||||
void loadedChanged();
|
||||
void playingChanged();
|
||||
void statusChanged();
|
||||
};
|
||||
|
||||
%End
|
||||
@@ -0,0 +1,40 @@
|
||||
// qtvideo.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtMultimedia Python extension module.
|
||||
//
|
||||
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt6.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
%If (Qt_6_7_0 -)
|
||||
|
||||
namespace QtVideo
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qtvideo.h>
|
||||
%End
|
||||
|
||||
enum class Rotation
|
||||
{
|
||||
None,
|
||||
Clockwise90,
|
||||
Clockwise180,
|
||||
Clockwise270,
|
||||
};
|
||||
};
|
||||
|
||||
%End
|
||||
@@ -0,0 +1,137 @@
|
||||
// qvideoframe.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtMultimedia Python extension module.
|
||||
//
|
||||
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt6.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
%If (Qt_6_2_0 -)
|
||||
|
||||
class QVideoFrame
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qvideoframe.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QVideoFrame();
|
||||
QVideoFrame(const QVideoFrameFormat &format);
|
||||
%If (Qt_6_8_0 -)
|
||||
explicit QVideoFrame(const QImage &image);
|
||||
%End
|
||||
QVideoFrame(const QVideoFrame &other);
|
||||
~QVideoFrame();
|
||||
|
||||
enum HandleType
|
||||
{
|
||||
NoHandle,
|
||||
RhiTextureHandle,
|
||||
};
|
||||
|
||||
enum MapMode
|
||||
{
|
||||
NotMapped,
|
||||
ReadOnly,
|
||||
WriteOnly,
|
||||
ReadWrite,
|
||||
};
|
||||
|
||||
bool isValid() const;
|
||||
QVideoFrameFormat::PixelFormat pixelFormat() const;
|
||||
QVideoFrame::HandleType handleType() const;
|
||||
QSize size() const;
|
||||
int width() const;
|
||||
int height() const;
|
||||
bool isMapped() const;
|
||||
bool isReadable() const;
|
||||
bool isWritable() const;
|
||||
QVideoFrame::MapMode mapMode() const;
|
||||
bool map(QVideoFrame::MapMode mode);
|
||||
void unmap();
|
||||
int bytesPerLine(int plane) const;
|
||||
void *bits(int plane) [uchar * (int plane)];
|
||||
int mappedBytes(int plane) const;
|
||||
qint64 startTime() const;
|
||||
void setStartTime(qint64 time);
|
||||
qint64 endTime() const;
|
||||
void setEndTime(qint64 time);
|
||||
int planeCount() const;
|
||||
bool operator==(const QVideoFrame &other) const;
|
||||
bool operator!=(const QVideoFrame &other) const;
|
||||
QVideoFrameFormat surfaceFormat() const;
|
||||
QImage toImage() const;
|
||||
|
||||
struct PaintOptions
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qvideoframe.h>
|
||||
%End
|
||||
|
||||
QColor backgroundColor;
|
||||
Qt::AspectRatioMode aspectRatioMode;
|
||||
|
||||
enum PaintFlag /BaseType=Flag/
|
||||
{
|
||||
DontDrawSubtitles,
|
||||
};
|
||||
|
||||
typedef QFlags<QVideoFrame::PaintOptions::PaintFlag> PaintFlags;
|
||||
QVideoFrame::PaintOptions::PaintFlags paintFlags;
|
||||
};
|
||||
|
||||
QString subtitleText() const;
|
||||
void setSubtitleText(const QString &text);
|
||||
void paint(QPainter *painter, const QRectF &rect, const QVideoFrame::PaintOptions &options);
|
||||
%If (Qt_6_3_0 -)
|
||||
|
||||
enum RotationAngle
|
||||
{
|
||||
Rotation0,
|
||||
Rotation90,
|
||||
Rotation180,
|
||||
Rotation270,
|
||||
};
|
||||
|
||||
%End
|
||||
%If (Qt_6_3_0 -)
|
||||
void setRotationAngle(QVideoFrame::RotationAngle);
|
||||
%End
|
||||
%If (Qt_6_3_0 -)
|
||||
QVideoFrame::RotationAngle rotationAngle() const;
|
||||
%End
|
||||
%If (Qt_6_3_0 -)
|
||||
void setMirrored(bool);
|
||||
%End
|
||||
%If (Qt_6_3_0 -)
|
||||
bool mirrored() const;
|
||||
%End
|
||||
%If (Qt_6_7_0 -)
|
||||
void setRotation(QtVideo::Rotation angle);
|
||||
%End
|
||||
%If (Qt_6_7_0 -)
|
||||
QtVideo::Rotation rotation() const;
|
||||
%End
|
||||
%If (Qt_6_8_0 -)
|
||||
void setStreamFrameRate(qreal rate);
|
||||
%End
|
||||
%If (Qt_6_8_0 -)
|
||||
qreal streamFrameRate() const;
|
||||
%End
|
||||
};
|
||||
|
||||
%End
|
||||
@@ -0,0 +1,187 @@
|
||||
// qvideoframeformat.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtMultimedia Python extension module.
|
||||
//
|
||||
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt6.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
%If (Qt_6_2_0 -)
|
||||
|
||||
class QVideoFrameFormat
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qvideoframeformat.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum PixelFormat
|
||||
{
|
||||
Format_Invalid,
|
||||
Format_YUV420P,
|
||||
Format_YUV422P,
|
||||
%If (Qt_6_4_0 -)
|
||||
Format_YUV420P10,
|
||||
%End
|
||||
Format_YV12,
|
||||
Format_UYVY,
|
||||
Format_YUYV,
|
||||
Format_NV12,
|
||||
Format_NV21,
|
||||
Format_IMC1,
|
||||
Format_IMC2,
|
||||
Format_IMC3,
|
||||
Format_IMC4,
|
||||
Format_Y8,
|
||||
Format_Y16,
|
||||
Format_P010,
|
||||
Format_P016,
|
||||
Format_Jpeg,
|
||||
Format_SamplerExternalOES,
|
||||
Format_ARGB8888,
|
||||
Format_ARGB8888_Premultiplied,
|
||||
Format_XRGB8888,
|
||||
Format_BGRA8888,
|
||||
Format_BGRA8888_Premultiplied,
|
||||
Format_BGRX8888,
|
||||
Format_ABGR8888,
|
||||
Format_XBGR8888,
|
||||
Format_RGBA8888,
|
||||
Format_RGBX8888,
|
||||
Format_AYUV,
|
||||
Format_AYUV_Premultiplied,
|
||||
Format_SamplerRect,
|
||||
};
|
||||
|
||||
enum Direction
|
||||
{
|
||||
TopToBottom,
|
||||
BottomToTop,
|
||||
};
|
||||
|
||||
enum YCbCrColorSpace
|
||||
{
|
||||
YCbCr_Undefined,
|
||||
YCbCr_BT601,
|
||||
YCbCr_BT709,
|
||||
YCbCr_xvYCC601,
|
||||
YCbCr_xvYCC709,
|
||||
YCbCr_JPEG,
|
||||
%If (Qt_6_3_0 -)
|
||||
YCbCr_BT2020,
|
||||
%End
|
||||
};
|
||||
|
||||
QVideoFrameFormat();
|
||||
QVideoFrameFormat(const QSize &size, QVideoFrameFormat::PixelFormat pixelFormat);
|
||||
QVideoFrameFormat(const QVideoFrameFormat &format);
|
||||
~QVideoFrameFormat();
|
||||
bool operator==(const QVideoFrameFormat &format) const;
|
||||
bool operator!=(const QVideoFrameFormat &format) const;
|
||||
bool isValid() const;
|
||||
QVideoFrameFormat::PixelFormat pixelFormat() const;
|
||||
QSize frameSize() const;
|
||||
void setFrameSize(const QSize &size);
|
||||
void setFrameSize(int width, int height);
|
||||
int frameWidth() const;
|
||||
int frameHeight() const;
|
||||
int planeCount() const;
|
||||
QRect viewport() const;
|
||||
void setViewport(const QRect &viewport);
|
||||
QVideoFrameFormat::Direction scanLineDirection() const;
|
||||
void setScanLineDirection(QVideoFrameFormat::Direction direction);
|
||||
qreal frameRate() const;
|
||||
void setFrameRate(qreal rate);
|
||||
QVideoFrameFormat::YCbCrColorSpace yCbCrColorSpace() const;
|
||||
void setYCbCrColorSpace(QVideoFrameFormat::YCbCrColorSpace colorSpace);
|
||||
bool isMirrored() const;
|
||||
void setMirrored(bool mirrored);
|
||||
static QVideoFrameFormat::PixelFormat pixelFormatFromImageFormat(QImage::Format format);
|
||||
static QImage::Format imageFormatFromPixelFormat(QVideoFrameFormat::PixelFormat format);
|
||||
%If (Qt_6_2_0 -)
|
||||
static QString pixelFormatToString(QVideoFrameFormat::PixelFormat pixelFormat);
|
||||
%End
|
||||
%If (Qt_6_4_0 -)
|
||||
|
||||
enum ColorSpace
|
||||
{
|
||||
ColorSpace_Undefined,
|
||||
ColorSpace_BT601,
|
||||
ColorSpace_BT709,
|
||||
ColorSpace_AdobeRgb,
|
||||
ColorSpace_BT2020,
|
||||
};
|
||||
|
||||
%End
|
||||
%If (Qt_6_4_0 -)
|
||||
|
||||
enum ColorTransfer
|
||||
{
|
||||
ColorTransfer_Unknown,
|
||||
ColorTransfer_BT709,
|
||||
ColorTransfer_BT601,
|
||||
ColorTransfer_Linear,
|
||||
ColorTransfer_Gamma22,
|
||||
ColorTransfer_Gamma28,
|
||||
ColorTransfer_ST2084,
|
||||
ColorTransfer_STD_B67,
|
||||
};
|
||||
|
||||
%End
|
||||
%If (Qt_6_4_0 -)
|
||||
|
||||
enum ColorRange
|
||||
{
|
||||
ColorRange_Unknown,
|
||||
ColorRange_Video,
|
||||
ColorRange_Full,
|
||||
};
|
||||
|
||||
%End
|
||||
%If (Qt_6_4_0 -)
|
||||
QVideoFrameFormat::ColorSpace colorSpace() const;
|
||||
%End
|
||||
%If (Qt_6_4_0 -)
|
||||
void setColorSpace(QVideoFrameFormat::ColorSpace colorSpace);
|
||||
%End
|
||||
%If (Qt_6_4_0 -)
|
||||
QVideoFrameFormat::ColorTransfer colorTransfer() const;
|
||||
%End
|
||||
%If (Qt_6_4_0 -)
|
||||
void setColorTransfer(QVideoFrameFormat::ColorTransfer colorTransfer);
|
||||
%End
|
||||
%If (Qt_6_4_0 -)
|
||||
QVideoFrameFormat::ColorRange colorRange() const;
|
||||
%End
|
||||
%If (Qt_6_4_0 -)
|
||||
void setColorRange(QVideoFrameFormat::ColorRange range);
|
||||
%End
|
||||
%If (Qt_6_8_0 -)
|
||||
qreal streamFrameRate() const;
|
||||
%End
|
||||
%If (Qt_6_8_0 -)
|
||||
void setStreamFrameRate(qreal rate);
|
||||
%End
|
||||
%If (Qt_6_8_0 -)
|
||||
QtVideo::Rotation rotation() const;
|
||||
%End
|
||||
%If (Qt_6_8_0 -)
|
||||
void setRotation(QtVideo::Rotation rotation);
|
||||
%End
|
||||
};
|
||||
|
||||
%End
|
||||
@@ -0,0 +1,43 @@
|
||||
// qvideoframeinput.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtMultimedia Python extension module.
|
||||
//
|
||||
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt6.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
%If (Qt_6_8_0 -)
|
||||
|
||||
class QVideoFrameInput : public QObject
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qvideoframeinput.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
explicit QVideoFrameInput(QObject *parent /TransferThis/ = 0);
|
||||
QVideoFrameInput(const QVideoFrameFormat &format, QObject *parent /TransferThis/ = 0);
|
||||
virtual ~QVideoFrameInput();
|
||||
QMediaCaptureSession *captureSession() const;
|
||||
QVideoFrameFormat format() const;
|
||||
bool sendVideoFrame(const QVideoFrame &frame);
|
||||
|
||||
signals:
|
||||
void readyToSendVideoFrame();
|
||||
};
|
||||
|
||||
%End
|
||||
@@ -0,0 +1,46 @@
|
||||
// qvideosink.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtMultimedia Python extension module.
|
||||
//
|
||||
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt6.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
%If (Qt_6_2_0 -)
|
||||
|
||||
class QVideoSink : public QObject
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qvideosink.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QVideoSink(QObject *parent /TransferThis/ = 0);
|
||||
virtual ~QVideoSink();
|
||||
QSize videoSize() const;
|
||||
QString subtitleText() const;
|
||||
void setSubtitleText(const QString &subtitle);
|
||||
void setVideoFrame(const QVideoFrame &frame);
|
||||
QVideoFrame videoFrame() const;
|
||||
|
||||
signals:
|
||||
void videoFrameChanged(const QVideoFrame &frame) const;
|
||||
void subtitleTextChanged(const QString &subtitleText) const;
|
||||
void videoSizeChanged();
|
||||
};
|
||||
|
||||
%End
|
||||
@@ -0,0 +1,62 @@
|
||||
// qwindowcapture.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtMultimedia Python extension module.
|
||||
//
|
||||
// Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt6.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
%If (Qt_6_6_0 -)
|
||||
|
||||
class QWindowCapture : public QObject
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qwindowcapture.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum Error
|
||||
{
|
||||
NoError,
|
||||
InternalError,
|
||||
CapturingNotSupported,
|
||||
CaptureFailed,
|
||||
NotFound,
|
||||
};
|
||||
|
||||
explicit QWindowCapture(QObject *parent /TransferThis/ = 0);
|
||||
virtual ~QWindowCapture();
|
||||
static QList<QCapturableWindow> capturableWindows();
|
||||
void setWindow(QCapturableWindow window);
|
||||
QCapturableWindow window() const;
|
||||
bool isActive() const;
|
||||
QWindowCapture::Error error() const;
|
||||
QString errorString() const;
|
||||
|
||||
public slots:
|
||||
void setActive(bool active);
|
||||
void start();
|
||||
void stop();
|
||||
|
||||
signals:
|
||||
void activeChanged(bool);
|
||||
void windowChanged(QCapturableWindow window);
|
||||
void errorChanged();
|
||||
void errorOccurred(QWindowCapture::Error error, const QString &errorString);
|
||||
};
|
||||
|
||||
%End
|
||||
Reference in New Issue
Block a user