/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qt for Python.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or (at your option) the GNU General
** Public license version 3 or any later version approved by the KDE Free
** Qt Foundation. The licenses are as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
** https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/

//workaround to access protected functions
#define protected public

// default includes
#include <shiboken.h>
#ifndef QT_NO_VERSION_TAGGING
#  define QT_NO_VERSION_TAGGING
#endif
#include <QDebug>
#include <pysidesignal.h>
#include <pysideproperty.h>
#include <pyside.h>
#include <pysideqenum.h>
#include <feature_select.h>
QT_WARNING_DISABLE_DEPRECATED

#include <typeinfo>
#include <signalmanager.h>
#include <pysidemetafunction.h>
#include <iterator>

// module include
#include "pyside6_qtmultimedia_python.h"

// main header
#include "qmediaplayer_wrapper.h"

// inner classes

#include <cctype>
#include <cstring>



template <class T>
static const char *typeNameOf(const T &t)
{
    const char *typeName =  typeid(t).name();
    auto size = std::strlen(typeName);
#if defined(Q_CC_MSVC) // MSVC: "class QPaintDevice * __ptr64"
    if (auto lastStar = strchr(typeName, '*')) {
        // MSVC: "class QPaintDevice * __ptr64"
        while (*--lastStar == ' ') {
        }
        size = lastStar - typeName + 1;
    }
#else // g++, Clang: "QPaintDevice *" -> "P12QPaintDevice"
    if (size > 2 && typeName[0] == 'P' && std::isdigit(typeName[1])) {
        ++typeName;
        --size;
    }
#endif
    char *result = new char[size + 1];
    result[size] = '\0';
    memcpy(result, typeName, size);
    return result;
}

// Native ---------------------------------------------------------

void QMediaPlayerWrapper::resetPyMethodCache()
{
    std::fill_n(m_PyMethodCache, sizeof(m_PyMethodCache) / sizeof(m_PyMethodCache[0]), false);
}

QMediaPlayerWrapper::QMediaPlayerWrapper(QObject * parent) : QMediaPlayer(parent)
{
    resetPyMethodCache();
    // ... middle
}

void QMediaPlayerWrapper::childEvent(QChildEvent * event)
{
    if (m_PyMethodCache[0]) {
        return this->::QObject::childEvent(event);
    }
    Shiboken::GilState gil;
    if (PyErr_Occurred())
        return;
    static PyObject *nameCache[2] = {};
    static const char *funcName = "childEvent";
    Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, nameCache, funcName));
    if (pyOverride.isNull()) {
        gil.release();
        m_PyMethodCache[0] = true;
        return this->::QObject::childEvent(event);
    }

    Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)",
        Shiboken::Conversions::pointerToPython(SbkPySide6_QtCoreTypes[SBK_QCHILDEVENT_IDX], event)
    ));
    bool invalidateArg1 = PyTuple_GET_ITEM(pyArgs, 0)->ob_refcnt == 1;

    Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, nullptr));
    if (invalidateArg1)
        Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 0));
    if (pyResult.isNull()) {
        // An error happened in python code!
        PyErr_Print();
        return;
    }
}

void QMediaPlayerWrapper::connectNotify(const QMetaMethod & signal)
{
    if (m_PyMethodCache[1]) {
        return this->::QObject::connectNotify(signal);
    }
    Shiboken::GilState gil;
    if (PyErr_Occurred())
        return;
    static PyObject *nameCache[2] = {};
    static const char *funcName = "connectNotify";
    Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, nameCache, funcName));
    if (pyOverride.isNull()) {
        gil.release();
        m_PyMethodCache[1] = true;
        return this->::QObject::connectNotify(signal);
    }

    Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)",
        Shiboken::Conversions::copyToPython(SbkPySide6_QtCoreTypes[SBK_QMETAMETHOD_IDX], &signal)
    ));

    Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, nullptr));
    if (pyResult.isNull()) {
        // An error happened in python code!
        PyErr_Print();
        return;
    }
}

void QMediaPlayerWrapper::customEvent(QEvent * event)
{
    if (m_PyMethodCache[2]) {
        return this->::QObject::customEvent(event);
    }
    Shiboken::GilState gil;
    if (PyErr_Occurred())
        return;
    static PyObject *nameCache[2] = {};
    static const char *funcName = "customEvent";
    Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, nameCache, funcName));
    if (pyOverride.isNull()) {
        gil.release();
        m_PyMethodCache[2] = true;
        return this->::QObject::customEvent(event);
    }

    Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)",
        Shiboken::Conversions::pointerToPython(SbkPySide6_QtCoreTypes[SBK_QEVENT_IDX], event)
    ));
    bool invalidateArg1 = PyTuple_GET_ITEM(pyArgs, 0)->ob_refcnt == 1;

    Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, nullptr));
    if (invalidateArg1)
        Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 0));
    if (pyResult.isNull()) {
        // An error happened in python code!
        PyErr_Print();
        return;
    }
}

void QMediaPlayerWrapper::disconnectNotify(const QMetaMethod & signal)
{
    if (m_PyMethodCache[3]) {
        return this->::QObject::disconnectNotify(signal);
    }
    Shiboken::GilState gil;
    if (PyErr_Occurred())
        return;
    static PyObject *nameCache[2] = {};
    static const char *funcName = "disconnectNotify";
    Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, nameCache, funcName));
    if (pyOverride.isNull()) {
        gil.release();
        m_PyMethodCache[3] = true;
        return this->::QObject::disconnectNotify(signal);
    }

    Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)",
        Shiboken::Conversions::copyToPython(SbkPySide6_QtCoreTypes[SBK_QMETAMETHOD_IDX], &signal)
    ));

    Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, nullptr));
    if (pyResult.isNull()) {
        // An error happened in python code!
        PyErr_Print();
        return;
    }
}

bool QMediaPlayerWrapper::event(QEvent * event)
{
    if (m_PyMethodCache[4])
        return this->::QObject::event(event);
    Shiboken::GilState gil;
    if (PyErr_Occurred())
        return false;
    static PyObject *nameCache[2] = {};
    static const char *funcName = "event";
    Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, nameCache, funcName));
    if (pyOverride.isNull()) {
        gil.release();
        m_PyMethodCache[4] = true;
        return this->::QObject::event(event);
    }

    Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)",
        Shiboken::Conversions::pointerToPython(SbkPySide6_QtCoreTypes[SBK_QEVENT_IDX], event)
    ));
    bool invalidateArg1 = PyTuple_GET_ITEM(pyArgs, 0)->ob_refcnt == 1;

    Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, nullptr));
    if (invalidateArg1)
        Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 0));
    if (pyResult.isNull()) {
        // An error happened in python code!
        PyErr_Print();
        return false;
    }
    // Check return type
    Shiboken::Conversions::PythonToCppConversion pythonToCpp =
        Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), pyResult);
    if (!pythonToCpp) {
        Shiboken::warning(PyExc_RuntimeWarning, 2,
            "Invalid return value in function %s, expected %s, got %s.",
            "QMediaPlayer.event",
            "bool",
            Py_TYPE(pyResult)->tp_name);
        return false;
    }
    bool cppResult;
    pythonToCpp(pyResult, &cppResult);
    return cppResult;
}

bool QMediaPlayerWrapper::eventFilter(QObject * watched, QEvent * event)
{
    if (m_PyMethodCache[5])
        return this->::QObject::eventFilter(watched, event);
    Shiboken::GilState gil;
    if (PyErr_Occurred())
        return false;
    static PyObject *nameCache[2] = {};
    static const char *funcName = "eventFilter";
    Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, nameCache, funcName));
    if (pyOverride.isNull()) {
        gil.release();
        m_PyMethodCache[5] = true;
        return this->::QObject::eventFilter(watched, event);
    }

    Shiboken::AutoDecRef pyArgs(Py_BuildValue("(NN)",
        Shiboken::Conversions::pointerToPython(SbkPySide6_QtCoreTypes[SBK_QOBJECT_IDX], watched),
        Shiboken::Conversions::pointerToPython(SbkPySide6_QtCoreTypes[SBK_QEVENT_IDX], event)
    ));
    bool invalidateArg2 = PyTuple_GET_ITEM(pyArgs, 1)->ob_refcnt == 1;

    Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, nullptr));
    if (invalidateArg2)
        Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 1));
    if (pyResult.isNull()) {
        // An error happened in python code!
        PyErr_Print();
        return false;
    }
    // Check return type
    Shiboken::Conversions::PythonToCppConversion pythonToCpp =
        Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), pyResult);
    if (!pythonToCpp) {
        Shiboken::warning(PyExc_RuntimeWarning, 2,
            "Invalid return value in function %s, expected %s, got %s.",
            "QMediaPlayer.eventFilter",
            "bool",
            Py_TYPE(pyResult)->tp_name);
        return false;
    }
    bool cppResult;
    pythonToCpp(pyResult, &cppResult);
    return cppResult;
}

void QMediaPlayerWrapper::timerEvent(QTimerEvent * event)
{
    if (m_PyMethodCache[7]) {
        return this->::QObject::timerEvent(event);
    }
    Shiboken::GilState gil;
    if (PyErr_Occurred())
        return;
    static PyObject *nameCache[2] = {};
    static const char *funcName = "timerEvent";
    Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, nameCache, funcName));
    if (pyOverride.isNull()) {
        gil.release();
        m_PyMethodCache[7] = true;
        return this->::QObject::timerEvent(event);
    }

    Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)",
        Shiboken::Conversions::pointerToPython(SbkPySide6_QtCoreTypes[SBK_QTIMEREVENT_IDX], event)
    ));
    bool invalidateArg1 = PyTuple_GET_ITEM(pyArgs, 0)->ob_refcnt == 1;

    Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, nullptr));
    if (invalidateArg1)
        Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 0));
    if (pyResult.isNull()) {
        // An error happened in python code!
        PyErr_Print();
        return;
    }
}

const QMetaObject *QMediaPlayerWrapper::metaObject() const
{
    if (QObject::d_ptr->metaObject)
        return QObject::d_ptr->dynamicMetaObject();
    SbkObject *pySelf = Shiboken::BindingManager::instance().retrieveWrapper(this);
    if (pySelf == nullptr)
        return QMediaPlayer::metaObject();
    return PySide::SignalManager::retrieveMetaObject(reinterpret_cast<PyObject *>(pySelf));
}

int QMediaPlayerWrapper::qt_metacall(QMetaObject::Call call, int id, void **args)
{
    int result = QMediaPlayer::qt_metacall(call, id, args);
    return result < 0 ? result : PySide::SignalManager::qt_metacall(this, call, id, args);
}

void *QMediaPlayerWrapper::qt_metacast(const char *_clname)
{
    if (!_clname)
        return {};
    SbkObject *pySelf = Shiboken::BindingManager::instance().retrieveWrapper(this);
    if (pySelf && PySide::inherits(Py_TYPE(pySelf), _clname))
        return static_cast<void *>(const_cast< QMediaPlayerWrapper *>(this));
    return QMediaPlayer::qt_metacast(_clname);
}

QMediaPlayerWrapper::~QMediaPlayerWrapper()
{
    SbkObject *wrapper = Shiboken::BindingManager::instance().retrieveWrapper(this);
    Shiboken::Object::destroy(wrapper, this);
}

// Target ---------------------------------------------------------

extern "C" {
static int
Sbk_QMediaPlayer_Init(PyObject *self, PyObject *args, PyObject *kwds)
{
    const QMetaObject *metaObject;
    SbkObject *sbkSelf = reinterpret_cast<SbkObject *>(self);
    PySide::Feature::Select(self);
    if (Shiboken::Object::isUserType(self) && !Shiboken::ObjectType::canCallConstructor(self->ob_type, Shiboken::SbkType< ::QMediaPlayer >()))
        return -1;

    ::QMediaPlayerWrapper *cptr{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtMultimedia.QMediaPlayer.__init__";
    SBK_UNUSED(fullName)
    int overloadId = -1;
    Shiboken::Conversions::PythonToCppConversion pythonToCpp[1];
    SBK_UNUSED(pythonToCpp)
    const Py_ssize_t numArgs = PyTuple_GET_SIZE(args);
    SBK_UNUSED(numArgs)
    PyObject *pyArgs[] = {0};

    // invalid argument lengths


    if (!PyArg_ParseTuple(args, "|O:QMediaPlayer", &(pyArgs[0])))
        return -1;


    // Overloaded function decisor
    // 0: QMediaPlayer::QMediaPlayer(QObject*)
    if (numArgs == 0) {
        overloadId = 0; // QMediaPlayer(QObject*)
    } else if (numArgs >= 1
        && (pythonToCpp[0] = Shiboken::Conversions::pythonToCppPointerConversion(SbkPySide6_QtCoreTypes[SBK_QOBJECT_IDX], (pyArgs[0])))) {
        overloadId = 0; // QMediaPlayer(QObject*)
    }

    // Function signature not found.
    if (overloadId == -1) goto Sbk_QMediaPlayer_Init_TypeError;

    // Call function/method
    {
        if (kwds && PyDict_Size(kwds) > 0) {
            PyObject *value{};
            Shiboken::AutoDecRef kwds_dup(PyDict_Copy(kwds));
            static PyObject *const key_parent = Shiboken::String::createStaticString("parent");
            if (PyDict_Contains(kwds, key_parent)) {
                value = PyDict_GetItem(kwds, key_parent);
                if (value && pyArgs[0]) {
                    errInfo.reset(key_parent);
                    Py_INCREF(errInfo.object());
                    goto Sbk_QMediaPlayer_Init_TypeError;
                }
                if (value) {
                    pyArgs[0] = value;
                    if (!(pythonToCpp[0] = Shiboken::Conversions::pythonToCppPointerConversion(SbkPySide6_QtCoreTypes[SBK_QOBJECT_IDX], (pyArgs[0]))))
                        goto Sbk_QMediaPlayer_Init_TypeError;
                }
                PyDict_DelItem(kwds_dup, key_parent);
            }
            if (PyDict_Size(kwds_dup) > 0) {
                errInfo.reset(kwds_dup.release());
                // fall through to handle extra keyword signals and properties
            }
        }
        if (!Shiboken::Object::isValid(pyArgs[0]))
            return -1;
        ::QObject *cppArg0 = nullptr;
        if (pythonToCpp[0])
            pythonToCpp[0](pyArgs[0], &cppArg0);

        if (!PyErr_Occurred()) {
            // QMediaPlayer(QObject*)
            void *addr = PySide::nextQObjectMemoryAddr();
            if (addr) {
                cptr = new (addr) ::QMediaPlayerWrapper(cppArg0);
                PySide::setNextQObjectMemoryAddr(0);
            } else {
                cptr = new ::QMediaPlayerWrapper(cppArg0);
            }

            Shiboken::Object::setParent(pyArgs[0], self);
        }
    }

    if (PyErr_Occurred() || !Shiboken::Object::setCppPointer(sbkSelf, Shiboken::SbkType< ::QMediaPlayer >(), cptr)) {
        delete cptr;
        return -1;
    }
    if (!cptr) goto Sbk_QMediaPlayer_Init_TypeError;

    Shiboken::Object::setValidCpp(sbkSelf, true);
    Shiboken::Object::setHasCppWrapper(sbkSelf, true);
    if (Shiboken::BindingManager::instance().hasWrapper(cptr)) {
        Shiboken::BindingManager::instance().releaseWrapper(Shiboken::BindingManager::instance().retrieveWrapper(cptr));
    }
    Shiboken::BindingManager::instance().registerWrapper(sbkSelf, cptr);

    // QObject setup
    PySide::Signal::updateSourceObject(self);
    metaObject = cptr->metaObject(); // <- init python qt properties
    if (!errInfo.isNull() && PyDict_Check(errInfo.object())) {
        if (!PySide::fillQtProperties(self, metaObject, errInfo))
            goto Sbk_QMediaPlayer_Init_TypeError;
    };


    return 1;

    Sbk_QMediaPlayer_Init_TypeError:
        Shiboken::setErrorAboutWrongArguments(args, fullName, errInfo);
        return -1;
}

static PyObject *Sbk_QMediaPlayerFunc_activeAudioTrack(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QMediaPlayer *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtMultimedia.QMediaPlayer.activeAudioTrack";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // activeAudioTrack()const
            int cppResult = const_cast<const ::QMediaPlayer *>(cppSelf)->activeAudioTrack();
            pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<int>(), &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}

static PyObject *Sbk_QMediaPlayerFunc_activeSubtitleTrack(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QMediaPlayer *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtMultimedia.QMediaPlayer.activeSubtitleTrack";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // activeSubtitleTrack()const
            int cppResult = const_cast<const ::QMediaPlayer *>(cppSelf)->activeSubtitleTrack();
            pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<int>(), &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}

static PyObject *Sbk_QMediaPlayerFunc_activeVideoTrack(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QMediaPlayer *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtMultimedia.QMediaPlayer.activeVideoTrack";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // activeVideoTrack()const
            int cppResult = const_cast<const ::QMediaPlayer *>(cppSelf)->activeVideoTrack();
            pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<int>(), &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}

static PyObject *Sbk_QMediaPlayerFunc_audioOutput(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QMediaPlayer *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtMultimedia.QMediaPlayer.audioOutput";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // audioOutput()const
            QAudioOutput * cppResult = const_cast<const ::QMediaPlayer *>(cppSelf)->audioOutput();
            pyResult = Shiboken::Conversions::pointerToPython(SbkPySide6_QtMultimediaTypes[SBK_QAUDIOOUTPUT_IDX], cppResult);
            Shiboken::Object::setParent(self, pyResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}

static PyObject *Sbk_QMediaPlayerFunc_audioTracks(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QMediaPlayer *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtMultimedia.QMediaPlayer.audioTracks";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // audioTracks()const
            QList<QMediaMetaData > cppResult = const_cast<const ::QMediaPlayer *>(cppSelf)->audioTracks();
            pyResult = Shiboken::Conversions::copyToPython(SbkPySide6_QtMultimediaTypeConverters[SBK_QTMULTIMEDIA_QLIST_QMEDIAMETADATA_IDX], &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}

static PyObject *Sbk_QMediaPlayerFunc_bufferProgress(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QMediaPlayer *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtMultimedia.QMediaPlayer.bufferProgress";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // bufferProgress()const
            float cppResult = const_cast<const ::QMediaPlayer *>(cppSelf)->bufferProgress();
            pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<float>(), &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}

static PyObject *Sbk_QMediaPlayerFunc_bufferedTimeRange(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QMediaPlayer *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtMultimedia.QMediaPlayer.bufferedTimeRange";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // bufferedTimeRange()const
            QMediaTimeRange cppResult = const_cast<const ::QMediaPlayer *>(cppSelf)->bufferedTimeRange();
            pyResult = Shiboken::Conversions::copyToPython(SbkPySide6_QtMultimediaTypes[SBK_QMEDIATIMERANGE_IDX], &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}

static PyObject *Sbk_QMediaPlayerFunc_duration(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QMediaPlayer *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtMultimedia.QMediaPlayer.duration";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // duration()const
            qint64 cppResult = const_cast<const ::QMediaPlayer *>(cppSelf)->duration();
            pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<qint64>(), &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}

static PyObject *Sbk_QMediaPlayerFunc_error(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QMediaPlayer *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtMultimedia.QMediaPlayer.error";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // error()const
            QMediaPlayer::Error cppResult = const_cast<const ::QMediaPlayer *>(cppSelf)->error();
            pyResult = Shiboken::Conversions::copyToPython(PepType_SETP(reinterpret_cast<SbkEnumType *>(SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_ERROR_IDX]))->converter, &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}

static PyObject *Sbk_QMediaPlayerFunc_errorString(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QMediaPlayer *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtMultimedia.QMediaPlayer.errorString";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // errorString()const
            QString cppResult = const_cast<const ::QMediaPlayer *>(cppSelf)->errorString();
            pyResult = Shiboken::Conversions::copyToPython(SbkPySide6_QtCoreTypeConverters[SBK_QSTRING_IDX], &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}

static PyObject *Sbk_QMediaPlayerFunc_hasAudio(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QMediaPlayer *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtMultimedia.QMediaPlayer.hasAudio";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // hasAudio()const
            bool cppResult = const_cast<const ::QMediaPlayer *>(cppSelf)->hasAudio();
            pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}

static PyObject *Sbk_QMediaPlayerFunc_hasVideo(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QMediaPlayer *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtMultimedia.QMediaPlayer.hasVideo";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // hasVideo()const
            bool cppResult = const_cast<const ::QMediaPlayer *>(cppSelf)->hasVideo();
            pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}

static PyObject *Sbk_QMediaPlayerFunc_isAvailable(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QMediaPlayer *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtMultimedia.QMediaPlayer.isAvailable";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // isAvailable()const
            bool cppResult = const_cast<const ::QMediaPlayer *>(cppSelf)->isAvailable();
            pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}

static PyObject *Sbk_QMediaPlayerFunc_isSeekable(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QMediaPlayer *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtMultimedia.QMediaPlayer.isSeekable";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // isSeekable()const
            bool cppResult = const_cast<const ::QMediaPlayer *>(cppSelf)->isSeekable();
            pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}

static PyObject *Sbk_QMediaPlayerFunc_loops(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QMediaPlayer *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtMultimedia.QMediaPlayer.loops";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // loops()const
            int cppResult = const_cast<const ::QMediaPlayer *>(cppSelf)->loops();
            pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<int>(), &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}

static PyObject *Sbk_QMediaPlayerFunc_mediaStatus(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QMediaPlayer *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtMultimedia.QMediaPlayer.mediaStatus";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // mediaStatus()const
            QMediaPlayer::MediaStatus cppResult = const_cast<const ::QMediaPlayer *>(cppSelf)->mediaStatus();
            pyResult = Shiboken::Conversions::copyToPython(PepType_SETP(reinterpret_cast<SbkEnumType *>(SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_MEDIASTATUS_IDX]))->converter, &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}

static PyObject *Sbk_QMediaPlayerFunc_metaData(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QMediaPlayer *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtMultimedia.QMediaPlayer.metaData";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // metaData()const
            QMediaMetaData cppResult = const_cast<const ::QMediaPlayer *>(cppSelf)->metaData();
            pyResult = Shiboken::Conversions::copyToPython(SbkPySide6_QtMultimediaTypes[SBK_QMEDIAMETADATA_IDX], &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}

static PyObject *Sbk_QMediaPlayerFunc_pause(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QMediaPlayer *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtMultimedia.QMediaPlayer.pause";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // pause()
            cppSelf->pause();
        }
    }

    if (PyErr_Occurred()) {
        return {};
    }
    Py_RETURN_NONE;
}

static PyObject *Sbk_QMediaPlayerFunc_play(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QMediaPlayer *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtMultimedia.QMediaPlayer.play";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // play()
            cppSelf->play();
        }
    }

    if (PyErr_Occurred()) {
        return {};
    }
    Py_RETURN_NONE;
}

static PyObject *Sbk_QMediaPlayerFunc_playbackRate(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QMediaPlayer *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtMultimedia.QMediaPlayer.playbackRate";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // playbackRate()const
            qreal cppResult = const_cast<const ::QMediaPlayer *>(cppSelf)->playbackRate();
            pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<qreal>(), &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}

static PyObject *Sbk_QMediaPlayerFunc_playbackState(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QMediaPlayer *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtMultimedia.QMediaPlayer.playbackState";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // playbackState()const
            QMediaPlayer::PlaybackState cppResult = const_cast<const ::QMediaPlayer *>(cppSelf)->playbackState();
            pyResult = Shiboken::Conversions::copyToPython(PepType_SETP(reinterpret_cast<SbkEnumType *>(SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_PLAYBACKSTATE_IDX]))->converter, &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}

static PyObject *Sbk_QMediaPlayerFunc_position(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QMediaPlayer *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtMultimedia.QMediaPlayer.position";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // position()const
            qint64 cppResult = const_cast<const ::QMediaPlayer *>(cppSelf)->position();
            pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<qint64>(), &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}

static PyObject *Sbk_QMediaPlayerFunc_setActiveAudioTrack(PyObject *self, PyObject *pyArg)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QMediaPlayer *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtMultimedia.QMediaPlayer.setActiveAudioTrack";
    SBK_UNUSED(fullName)
    int overloadId = -1;
    Shiboken::Conversions::PythonToCppConversion pythonToCpp;
    SBK_UNUSED(pythonToCpp)

    // Overloaded function decisor
    // 0: QMediaPlayer::setActiveAudioTrack(int)
    if ((pythonToCpp = Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<int>(), (pyArg)))) {
        overloadId = 0; // setActiveAudioTrack(int)
    }

    // Function signature not found.
    if (overloadId == -1) goto Sbk_QMediaPlayerFunc_setActiveAudioTrack_TypeError;

    // Call function/method
    {
        int cppArg0;
        pythonToCpp(pyArg, &cppArg0);

        if (!PyErr_Occurred()) {
            // setActiveAudioTrack(int)
            cppSelf->setActiveAudioTrack(cppArg0);
        }
    }

    if (PyErr_Occurred()) {
        return {};
    }
    Py_RETURN_NONE;

    Sbk_QMediaPlayerFunc_setActiveAudioTrack_TypeError:
        Shiboken::setErrorAboutWrongArguments(pyArg, fullName, errInfo);
        return {};
}

static PyObject *Sbk_QMediaPlayerFunc_setActiveSubtitleTrack(PyObject *self, PyObject *pyArg)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QMediaPlayer *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtMultimedia.QMediaPlayer.setActiveSubtitleTrack";
    SBK_UNUSED(fullName)
    int overloadId = -1;
    Shiboken::Conversions::PythonToCppConversion pythonToCpp;
    SBK_UNUSED(pythonToCpp)

    // Overloaded function decisor
    // 0: QMediaPlayer::setActiveSubtitleTrack(int)
    if ((pythonToCpp = Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<int>(), (pyArg)))) {
        overloadId = 0; // setActiveSubtitleTrack(int)
    }

    // Function signature not found.
    if (overloadId == -1) goto Sbk_QMediaPlayerFunc_setActiveSubtitleTrack_TypeError;

    // Call function/method
    {
        int cppArg0;
        pythonToCpp(pyArg, &cppArg0);

        if (!PyErr_Occurred()) {
            // setActiveSubtitleTrack(int)
            cppSelf->setActiveSubtitleTrack(cppArg0);
        }
    }

    if (PyErr_Occurred()) {
        return {};
    }
    Py_RETURN_NONE;

    Sbk_QMediaPlayerFunc_setActiveSubtitleTrack_TypeError:
        Shiboken::setErrorAboutWrongArguments(pyArg, fullName, errInfo);
        return {};
}

static PyObject *Sbk_QMediaPlayerFunc_setActiveVideoTrack(PyObject *self, PyObject *pyArg)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QMediaPlayer *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtMultimedia.QMediaPlayer.setActiveVideoTrack";
    SBK_UNUSED(fullName)
    int overloadId = -1;
    Shiboken::Conversions::PythonToCppConversion pythonToCpp;
    SBK_UNUSED(pythonToCpp)

    // Overloaded function decisor
    // 0: QMediaPlayer::setActiveVideoTrack(int)
    if ((pythonToCpp = Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<int>(), (pyArg)))) {
        overloadId = 0; // setActiveVideoTrack(int)
    }

    // Function signature not found.
    if (overloadId == -1) goto Sbk_QMediaPlayerFunc_setActiveVideoTrack_TypeError;

    // Call function/method
    {
        int cppArg0;
        pythonToCpp(pyArg, &cppArg0);

        if (!PyErr_Occurred()) {
            // setActiveVideoTrack(int)
            cppSelf->setActiveVideoTrack(cppArg0);
        }
    }

    if (PyErr_Occurred()) {
        return {};
    }
    Py_RETURN_NONE;

    Sbk_QMediaPlayerFunc_setActiveVideoTrack_TypeError:
        Shiboken::setErrorAboutWrongArguments(pyArg, fullName, errInfo);
        return {};
}

static PyObject *Sbk_QMediaPlayerFunc_setAudioOutput(PyObject *self, PyObject *pyArg)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QMediaPlayer *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtMultimedia.QMediaPlayer.setAudioOutput";
    SBK_UNUSED(fullName)
    int overloadId = -1;
    Shiboken::Conversions::PythonToCppConversion pythonToCpp;
    SBK_UNUSED(pythonToCpp)

    // Overloaded function decisor
    // 0: QMediaPlayer::setAudioOutput(QAudioOutput*)
    if ((pythonToCpp = Shiboken::Conversions::pythonToCppPointerConversion(SbkPySide6_QtMultimediaTypes[SBK_QAUDIOOUTPUT_IDX], (pyArg)))) {
        overloadId = 0; // setAudioOutput(QAudioOutput*)
    }

    // Function signature not found.
    if (overloadId == -1) goto Sbk_QMediaPlayerFunc_setAudioOutput_TypeError;

    // Call function/method
    {
        if (!Shiboken::Object::isValid(pyArg))
            return {};
        ::QAudioOutput *cppArg0;
        pythonToCpp(pyArg, &cppArg0);

        if (!PyErr_Occurred()) {
            // setAudioOutput(QAudioOutput*)
            cppSelf->setAudioOutput(cppArg0);
        }
    }

    if (PyErr_Occurred()) {
        return {};
    }
    Py_RETURN_NONE;

    Sbk_QMediaPlayerFunc_setAudioOutput_TypeError:
        Shiboken::setErrorAboutWrongArguments(pyArg, fullName, errInfo);
        return {};
}

static PyObject *Sbk_QMediaPlayerFunc_setLoops(PyObject *self, PyObject *pyArg)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QMediaPlayer *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtMultimedia.QMediaPlayer.setLoops";
    SBK_UNUSED(fullName)
    int overloadId = -1;
    Shiboken::Conversions::PythonToCppConversion pythonToCpp;
    SBK_UNUSED(pythonToCpp)

    // Overloaded function decisor
    // 0: QMediaPlayer::setLoops(int)
    if ((pythonToCpp = Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<int>(), (pyArg)))) {
        overloadId = 0; // setLoops(int)
    }

    // Function signature not found.
    if (overloadId == -1) goto Sbk_QMediaPlayerFunc_setLoops_TypeError;

    // Call function/method
    {
        int cppArg0;
        pythonToCpp(pyArg, &cppArg0);

        if (!PyErr_Occurred()) {
            // setLoops(int)
            cppSelf->setLoops(cppArg0);
        }
    }

    if (PyErr_Occurred()) {
        return {};
    }
    Py_RETURN_NONE;

    Sbk_QMediaPlayerFunc_setLoops_TypeError:
        Shiboken::setErrorAboutWrongArguments(pyArg, fullName, errInfo);
        return {};
}

static PyObject *Sbk_QMediaPlayerFunc_setPlaybackRate(PyObject *self, PyObject *pyArg)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QMediaPlayer *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtMultimedia.QMediaPlayer.setPlaybackRate";
    SBK_UNUSED(fullName)
    int overloadId = -1;
    Shiboken::Conversions::PythonToCppConversion pythonToCpp;
    SBK_UNUSED(pythonToCpp)

    // Overloaded function decisor
    // 0: QMediaPlayer::setPlaybackRate(qreal)
    if ((pythonToCpp = Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<qreal>(), (pyArg)))) {
        overloadId = 0; // setPlaybackRate(qreal)
    }

    // Function signature not found.
    if (overloadId == -1) goto Sbk_QMediaPlayerFunc_setPlaybackRate_TypeError;

    // Call function/method
    {
        qreal cppArg0;
        pythonToCpp(pyArg, &cppArg0);

        if (!PyErr_Occurred()) {
            // setPlaybackRate(qreal)
            cppSelf->setPlaybackRate(cppArg0);
        }
    }

    if (PyErr_Occurred()) {
        return {};
    }
    Py_RETURN_NONE;

    Sbk_QMediaPlayerFunc_setPlaybackRate_TypeError:
        Shiboken::setErrorAboutWrongArguments(pyArg, fullName, errInfo);
        return {};
}

static PyObject *Sbk_QMediaPlayerFunc_setPosition(PyObject *self, PyObject *pyArg)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QMediaPlayer *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtMultimedia.QMediaPlayer.setPosition";
    SBK_UNUSED(fullName)
    int overloadId = -1;
    Shiboken::Conversions::PythonToCppConversion pythonToCpp;
    SBK_UNUSED(pythonToCpp)

    // Overloaded function decisor
    // 0: QMediaPlayer::setPosition(qint64)
    if ((pythonToCpp = Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<qint64>(), (pyArg)))) {
        overloadId = 0; // setPosition(qint64)
    }

    // Function signature not found.
    if (overloadId == -1) goto Sbk_QMediaPlayerFunc_setPosition_TypeError;

    // Call function/method
    {
        qint64 cppArg0;
        pythonToCpp(pyArg, &cppArg0);

        if (!PyErr_Occurred()) {
            // setPosition(qint64)
            cppSelf->setPosition(cppArg0);
        }
    }

    if (PyErr_Occurred()) {
        return {};
    }
    Py_RETURN_NONE;

    Sbk_QMediaPlayerFunc_setPosition_TypeError:
        Shiboken::setErrorAboutWrongArguments(pyArg, fullName, errInfo);
        return {};
}

static PyObject *Sbk_QMediaPlayerFunc_setSource(PyObject *self, PyObject *pyArg)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QMediaPlayer *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtMultimedia.QMediaPlayer.setSource";
    SBK_UNUSED(fullName)
    int overloadId = -1;
    Shiboken::Conversions::PythonToCppConversion pythonToCpp;
    SBK_UNUSED(pythonToCpp)

    // Overloaded function decisor
    // 0: QMediaPlayer::setSource(QUrl)
    if ((pythonToCpp = Shiboken::Conversions::pythonToCppReferenceConversion(SbkPySide6_QtCoreTypes[SBK_QURL_IDX], (pyArg)))) {
        overloadId = 0; // setSource(QUrl)
    }

    // Function signature not found.
    if (overloadId == -1) goto Sbk_QMediaPlayerFunc_setSource_TypeError;

    // Call function/method
    {
        if (!Shiboken::Object::isValid(pyArg))
            return {};
        ::QUrl cppArg0_local;
        ::QUrl *cppArg0 = &cppArg0_local;
        if (pythonToCpp.isValue())
            pythonToCpp(pyArg, &cppArg0_local);
        else
            pythonToCpp(pyArg, &cppArg0);


        if (!PyErr_Occurred()) {
            // setSource(QUrl)
            cppSelf->setSource(*cppArg0);
        }
    }

    if (PyErr_Occurred()) {
        return {};
    }
    Py_RETURN_NONE;

    Sbk_QMediaPlayerFunc_setSource_TypeError:
        Shiboken::setErrorAboutWrongArguments(pyArg, fullName, errInfo);
        return {};
}

static PyObject *Sbk_QMediaPlayerFunc_setSourceDevice(PyObject *self, PyObject *args, PyObject *kwds)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QMediaPlayer *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtMultimedia.QMediaPlayer.setSourceDevice";
    SBK_UNUSED(fullName)
    int overloadId = -1;
    Shiboken::Conversions::PythonToCppConversion pythonToCpp[2];
    SBK_UNUSED(pythonToCpp)
    const Py_ssize_t numArgs = PyTuple_GET_SIZE(args);
    SBK_UNUSED(numArgs)
    PyObject *pyArgs[] = {0, 0};

    // invalid argument lengths
    if (numArgs > 2) {
        static PyObject *const too_many = Shiboken::String::createStaticString(">");
        errInfo.reset(too_many);
        Py_INCREF(errInfo.object());
        goto Sbk_QMediaPlayerFunc_setSourceDevice_TypeError;
    } else if (numArgs < 1) {
        static PyObject *const too_few = Shiboken::String::createStaticString("<");
        errInfo.reset(too_few);
        Py_INCREF(errInfo.object());
        goto Sbk_QMediaPlayerFunc_setSourceDevice_TypeError;
    }

    if (!PyArg_ParseTuple(args, "|OO:setSourceDevice", &(pyArgs[0]), &(pyArgs[1])))
        return {};


    // Overloaded function decisor
    // 0: QMediaPlayer::setSourceDevice(QIODevice*,QUrl)
    if (numArgs >= 1
        && (pythonToCpp[0] = Shiboken::Conversions::pythonToCppPointerConversion(SbkPySide6_QtCoreTypes[SBK_QIODEVICE_IDX], (pyArgs[0])))) {
        if (numArgs == 1) {
            overloadId = 0; // setSourceDevice(QIODevice*,QUrl)
        } else if (numArgs >= 2
            && (pythonToCpp[1] = Shiboken::Conversions::pythonToCppReferenceConversion(SbkPySide6_QtCoreTypes[SBK_QURL_IDX], (pyArgs[1])))) {
            overloadId = 0; // setSourceDevice(QIODevice*,QUrl)
        }
    }

    // Function signature not found.
    if (overloadId == -1) goto Sbk_QMediaPlayerFunc_setSourceDevice_TypeError;

    // Call function/method
    {
        if (kwds && PyDict_Size(kwds) > 0) {
            PyObject *value{};
            Shiboken::AutoDecRef kwds_dup(PyDict_Copy(kwds));
            static PyObject *const key_sourceUrl = Shiboken::String::createStaticString("sourceUrl");
            if (PyDict_Contains(kwds, key_sourceUrl)) {
                value = PyDict_GetItem(kwds, key_sourceUrl);
                if (value && pyArgs[1]) {
                    errInfo.reset(key_sourceUrl);
                    Py_INCREF(errInfo.object());
                    goto Sbk_QMediaPlayerFunc_setSourceDevice_TypeError;
                }
                if (value) {
                    pyArgs[1] = value;
                    if (!(pythonToCpp[1] = Shiboken::Conversions::pythonToCppReferenceConversion(SbkPySide6_QtCoreTypes[SBK_QURL_IDX], (pyArgs[1]))))
                        goto Sbk_QMediaPlayerFunc_setSourceDevice_TypeError;
                }
                PyDict_DelItem(kwds_dup, key_sourceUrl);
            }
            if (PyDict_Size(kwds_dup) > 0) {
                errInfo.reset(kwds_dup.release());
                goto Sbk_QMediaPlayerFunc_setSourceDevice_TypeError;
            }
        }
        if (!Shiboken::Object::isValid(pyArgs[0]))
            return {};
        ::QIODevice *cppArg0;
        pythonToCpp[0](pyArgs[0], &cppArg0);
        if (!Shiboken::Object::isValid(pyArgs[1]))
            return {};
        ::QUrl cppArg1_local = QUrl();
        ::QUrl *cppArg1 = &cppArg1_local;
        if (pythonToCpp[1]) {
            if (pythonToCpp[1].isValue())
                pythonToCpp[1](pyArgs[1], &cppArg1_local);
            else
                pythonToCpp[1](pyArgs[1], &cppArg1);
            }

        if (!PyErr_Occurred()) {
            // setSourceDevice(QIODevice*,QUrl)
            cppSelf->setSourceDevice(cppArg0, *cppArg1);
        }
    }

    if (PyErr_Occurred()) {
        return {};
    }
    Py_RETURN_NONE;

    Sbk_QMediaPlayerFunc_setSourceDevice_TypeError:
        Shiboken::setErrorAboutWrongArguments(args, fullName, errInfo);
        return {};
}

static PyObject *Sbk_QMediaPlayerFunc_setVideoOutput(PyObject *self, PyObject *pyArg)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QMediaPlayer *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtMultimedia.QMediaPlayer.setVideoOutput";
    SBK_UNUSED(fullName)
    int overloadId = -1;
    Shiboken::Conversions::PythonToCppConversion pythonToCpp;
    SBK_UNUSED(pythonToCpp)

    // Overloaded function decisor
    // 0: QMediaPlayer::setVideoOutput(QObject*)
    if ((pythonToCpp = Shiboken::Conversions::pythonToCppPointerConversion(SbkPySide6_QtCoreTypes[SBK_QOBJECT_IDX], (pyArg)))) {
        overloadId = 0; // setVideoOutput(QObject*)
    }

    // Function signature not found.
    if (overloadId == -1) goto Sbk_QMediaPlayerFunc_setVideoOutput_TypeError;

    // Call function/method
    {
        if (!Shiboken::Object::isValid(pyArg))
            return {};
        ::QObject *cppArg0;
        pythonToCpp(pyArg, &cppArg0);

        if (!PyErr_Occurred()) {
            // setVideoOutput(QObject*)
            cppSelf->setVideoOutput(cppArg0);
        }
    }

    if (PyErr_Occurred()) {
        return {};
    }
    Py_RETURN_NONE;

    Sbk_QMediaPlayerFunc_setVideoOutput_TypeError:
        Shiboken::setErrorAboutWrongArguments(pyArg, fullName, errInfo);
        return {};
}

static PyObject *Sbk_QMediaPlayerFunc_setVideoSink(PyObject *self, PyObject *pyArg)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QMediaPlayer *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtMultimedia.QMediaPlayer.setVideoSink";
    SBK_UNUSED(fullName)
    int overloadId = -1;
    Shiboken::Conversions::PythonToCppConversion pythonToCpp;
    SBK_UNUSED(pythonToCpp)

    // Overloaded function decisor
    // 0: QMediaPlayer::setVideoSink(QVideoSink*)
    if ((pythonToCpp = Shiboken::Conversions::pythonToCppPointerConversion(SbkPySide6_QtMultimediaTypes[SBK_QVIDEOSINK_IDX], (pyArg)))) {
        overloadId = 0; // setVideoSink(QVideoSink*)
    }

    // Function signature not found.
    if (overloadId == -1) goto Sbk_QMediaPlayerFunc_setVideoSink_TypeError;

    // Call function/method
    {
        if (!Shiboken::Object::isValid(pyArg))
            return {};
        ::QVideoSink *cppArg0;
        pythonToCpp(pyArg, &cppArg0);

        if (!PyErr_Occurred()) {
            // setVideoSink(QVideoSink*)
            cppSelf->setVideoSink(cppArg0);
        }
    }

    if (PyErr_Occurred()) {
        return {};
    }
    Py_RETURN_NONE;

    Sbk_QMediaPlayerFunc_setVideoSink_TypeError:
        Shiboken::setErrorAboutWrongArguments(pyArg, fullName, errInfo);
        return {};
}

static PyObject *Sbk_QMediaPlayerFunc_source(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QMediaPlayer *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtMultimedia.QMediaPlayer.source";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // source()const
            QUrl cppResult = const_cast<const ::QMediaPlayer *>(cppSelf)->source();
            pyResult = Shiboken::Conversions::copyToPython(SbkPySide6_QtCoreTypes[SBK_QURL_IDX], &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}

static PyObject *Sbk_QMediaPlayerFunc_sourceDevice(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QMediaPlayer *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtMultimedia.QMediaPlayer.sourceDevice";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // sourceDevice()const
            const QIODevice * cppResult = const_cast<const ::QMediaPlayer *>(cppSelf)->sourceDevice();
            pyResult = Shiboken::Conversions::pointerToPython(SbkPySide6_QtCoreTypes[SBK_QIODEVICE_IDX], cppResult);
            Shiboken::Object::setParent(self, pyResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}

static PyObject *Sbk_QMediaPlayerFunc_stop(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QMediaPlayer *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtMultimedia.QMediaPlayer.stop";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // stop()
            cppSelf->stop();
        }
    }

    if (PyErr_Occurred()) {
        return {};
    }
    Py_RETURN_NONE;
}

static PyObject *Sbk_QMediaPlayerFunc_subtitleTracks(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QMediaPlayer *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtMultimedia.QMediaPlayer.subtitleTracks";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // subtitleTracks()const
            QList<QMediaMetaData > cppResult = const_cast<const ::QMediaPlayer *>(cppSelf)->subtitleTracks();
            pyResult = Shiboken::Conversions::copyToPython(SbkPySide6_QtMultimediaTypeConverters[SBK_QTMULTIMEDIA_QLIST_QMEDIAMETADATA_IDX], &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}

static PyObject *Sbk_QMediaPlayerFunc_videoOutput(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QMediaPlayer *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtMultimedia.QMediaPlayer.videoOutput";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // videoOutput()const
            QObject * cppResult = const_cast<const ::QMediaPlayer *>(cppSelf)->videoOutput();
            pyResult = Shiboken::Conversions::pointerToPython(SbkPySide6_QtCoreTypes[SBK_QOBJECT_IDX], cppResult);
            Shiboken::Object::setParent(self, pyResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}

static PyObject *Sbk_QMediaPlayerFunc_videoSink(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QMediaPlayer *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtMultimedia.QMediaPlayer.videoSink";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // videoSink()const
            QVideoSink * cppResult = const_cast<const ::QMediaPlayer *>(cppSelf)->videoSink();
            pyResult = Shiboken::Conversions::pointerToPython(SbkPySide6_QtMultimediaTypes[SBK_QVIDEOSINK_IDX], cppResult);
            Shiboken::Object::setParent(self, pyResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}

static PyObject *Sbk_QMediaPlayerFunc_videoTracks(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QMediaPlayer *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtMultimedia.QMediaPlayer.videoTracks";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // videoTracks()const
            QList<QMediaMetaData > cppResult = const_cast<const ::QMediaPlayer *>(cppSelf)->videoTracks();
            pyResult = Shiboken::Conversions::copyToPython(SbkPySide6_QtMultimediaTypeConverters[SBK_QTMULTIMEDIA_QLIST_QMEDIAMETADATA_IDX], &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}


static const char *Sbk_QMediaPlayer_PropertyStrings[] = {
    "activeAudioTrack::",
    "activeSubtitleTrack::",
    "activeVideoTrack::",
    "audioOutput::",
    "audioTracks:",
    "bufferProgress:",
    "duration:",
    "error:",
    "errorString:",
    "hasAudio:",
    "hasVideo:",
    "loops::",
    "mediaStatus:",
    "metaData:",
    "playbackRate::",
    "playbackState:",
    "position::",
    "seekable:isSeekable",
    "source::",
    "subtitleTracks:",
    "videoOutput::",
    "videoTracks:",
    nullptr // Sentinel
};

static PyMethodDef Sbk_QMediaPlayer_methods[] = {
    {"activeAudioTrack", reinterpret_cast<PyCFunction>(Sbk_QMediaPlayerFunc_activeAudioTrack), METH_NOARGS},
    {"activeSubtitleTrack", reinterpret_cast<PyCFunction>(Sbk_QMediaPlayerFunc_activeSubtitleTrack), METH_NOARGS},
    {"activeVideoTrack", reinterpret_cast<PyCFunction>(Sbk_QMediaPlayerFunc_activeVideoTrack), METH_NOARGS},
    {"audioOutput", reinterpret_cast<PyCFunction>(Sbk_QMediaPlayerFunc_audioOutput), METH_NOARGS},
    {"audioTracks", reinterpret_cast<PyCFunction>(Sbk_QMediaPlayerFunc_audioTracks), METH_NOARGS},
    {"bufferProgress", reinterpret_cast<PyCFunction>(Sbk_QMediaPlayerFunc_bufferProgress), METH_NOARGS},
    {"bufferedTimeRange", reinterpret_cast<PyCFunction>(Sbk_QMediaPlayerFunc_bufferedTimeRange), METH_NOARGS},
    {"duration", reinterpret_cast<PyCFunction>(Sbk_QMediaPlayerFunc_duration), METH_NOARGS},
    {"error", reinterpret_cast<PyCFunction>(Sbk_QMediaPlayerFunc_error), METH_NOARGS},
    {"errorString", reinterpret_cast<PyCFunction>(Sbk_QMediaPlayerFunc_errorString), METH_NOARGS},
    {"hasAudio", reinterpret_cast<PyCFunction>(Sbk_QMediaPlayerFunc_hasAudio), METH_NOARGS},
    {"hasVideo", reinterpret_cast<PyCFunction>(Sbk_QMediaPlayerFunc_hasVideo), METH_NOARGS},
    {"isAvailable", reinterpret_cast<PyCFunction>(Sbk_QMediaPlayerFunc_isAvailable), METH_NOARGS},
    {"isSeekable", reinterpret_cast<PyCFunction>(Sbk_QMediaPlayerFunc_isSeekable), METH_NOARGS},
    {"loops", reinterpret_cast<PyCFunction>(Sbk_QMediaPlayerFunc_loops), METH_NOARGS},
    {"mediaStatus", reinterpret_cast<PyCFunction>(Sbk_QMediaPlayerFunc_mediaStatus), METH_NOARGS},
    {"metaData", reinterpret_cast<PyCFunction>(Sbk_QMediaPlayerFunc_metaData), METH_NOARGS},
    {"pause", reinterpret_cast<PyCFunction>(Sbk_QMediaPlayerFunc_pause), METH_NOARGS},
    {"play", reinterpret_cast<PyCFunction>(Sbk_QMediaPlayerFunc_play), METH_NOARGS},
    {"playbackRate", reinterpret_cast<PyCFunction>(Sbk_QMediaPlayerFunc_playbackRate), METH_NOARGS},
    {"playbackState", reinterpret_cast<PyCFunction>(Sbk_QMediaPlayerFunc_playbackState), METH_NOARGS},
    {"position", reinterpret_cast<PyCFunction>(Sbk_QMediaPlayerFunc_position), METH_NOARGS},
    {"setActiveAudioTrack", reinterpret_cast<PyCFunction>(Sbk_QMediaPlayerFunc_setActiveAudioTrack), METH_O},
    {"setActiveSubtitleTrack", reinterpret_cast<PyCFunction>(Sbk_QMediaPlayerFunc_setActiveSubtitleTrack), METH_O},
    {"setActiveVideoTrack", reinterpret_cast<PyCFunction>(Sbk_QMediaPlayerFunc_setActiveVideoTrack), METH_O},
    {"setAudioOutput", reinterpret_cast<PyCFunction>(Sbk_QMediaPlayerFunc_setAudioOutput), METH_O},
    {"setLoops", reinterpret_cast<PyCFunction>(Sbk_QMediaPlayerFunc_setLoops), METH_O},
    {"setPlaybackRate", reinterpret_cast<PyCFunction>(Sbk_QMediaPlayerFunc_setPlaybackRate), METH_O},
    {"setPosition", reinterpret_cast<PyCFunction>(Sbk_QMediaPlayerFunc_setPosition), METH_O},
    {"setSource", reinterpret_cast<PyCFunction>(Sbk_QMediaPlayerFunc_setSource), METH_O},
    {"setSourceDevice", reinterpret_cast<PyCFunction>(Sbk_QMediaPlayerFunc_setSourceDevice), METH_VARARGS|METH_KEYWORDS},
    {"setVideoOutput", reinterpret_cast<PyCFunction>(Sbk_QMediaPlayerFunc_setVideoOutput), METH_O},
    {"setVideoSink", reinterpret_cast<PyCFunction>(Sbk_QMediaPlayerFunc_setVideoSink), METH_O},
    {"source", reinterpret_cast<PyCFunction>(Sbk_QMediaPlayerFunc_source), METH_NOARGS},
    {"sourceDevice", reinterpret_cast<PyCFunction>(Sbk_QMediaPlayerFunc_sourceDevice), METH_NOARGS},
    {"stop", reinterpret_cast<PyCFunction>(Sbk_QMediaPlayerFunc_stop), METH_NOARGS},
    {"subtitleTracks", reinterpret_cast<PyCFunction>(Sbk_QMediaPlayerFunc_subtitleTracks), METH_NOARGS},
    {"videoOutput", reinterpret_cast<PyCFunction>(Sbk_QMediaPlayerFunc_videoOutput), METH_NOARGS},
    {"videoSink", reinterpret_cast<PyCFunction>(Sbk_QMediaPlayerFunc_videoSink), METH_NOARGS},
    {"videoTracks", reinterpret_cast<PyCFunction>(Sbk_QMediaPlayerFunc_videoTracks), METH_NOARGS},

    {nullptr, nullptr} // Sentinel
};

static int Sbk_QMediaPlayer_setattro(PyObject *self, PyObject *name, PyObject *value)
{
    PySide::Feature::Select(self);
    if (value && PyCallable_Check(value)) {
        auto plain_inst = reinterpret_cast< ::QMediaPlayer *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_IDX], reinterpret_cast<SbkObject *>(self)));
        auto inst = dynamic_cast<QMediaPlayerWrapper *>(plain_inst);
        if (inst)
            inst->resetPyMethodCache();
    }
    Shiboken::AutoDecRef pp(reinterpret_cast<PyObject *>(PySide::Property::getObject(self, name)));
    if (!pp.isNull())
        return PySide::Property::setValue(reinterpret_cast<PySideProperty *>(pp.object()), self, value);
    return PyObject_GenericSetAttr(self, name, value);
}

} // extern "C"

static int Sbk_QMediaPlayer_traverse(PyObject *self, visitproc visit, void *arg)
{
    return SbkObject_TypeF()->tp_traverse(self, visit, arg);
}
static int Sbk_QMediaPlayer_clear(PyObject *self)
{
    return reinterpret_cast<PyTypeObject *>(SbkObject_TypeF())->tp_clear(self);
}
// Class Definition -----------------------------------------------
extern "C" {
static PyTypeObject *_Sbk_QMediaPlayer_Type = nullptr;
static PyTypeObject *Sbk_QMediaPlayer_TypeF(void)
{
    return _Sbk_QMediaPlayer_Type;
}

static PyType_Slot Sbk_QMediaPlayer_slots[] = {
    {Py_tp_base,        nullptr}, // inserted by introduceWrapperType
    {Py_tp_dealloc,     reinterpret_cast<void *>(&SbkDeallocWrapper)},
    {Py_tp_repr,        nullptr},
    {Py_tp_hash,        nullptr},
    {Py_tp_call,        nullptr},
    {Py_tp_str,         nullptr},
    {Py_tp_getattro,    nullptr},
    {Py_tp_setattro,    reinterpret_cast<void *>(Sbk_QMediaPlayer_setattro)},
    {Py_tp_traverse,    reinterpret_cast<void *>(Sbk_QMediaPlayer_traverse)},
    {Py_tp_clear,       reinterpret_cast<void *>(Sbk_QMediaPlayer_clear)},
    {Py_tp_richcompare, nullptr},
    {Py_tp_iter,        nullptr},
    {Py_tp_iternext,    nullptr},
    {Py_tp_methods,     reinterpret_cast<void *>(Sbk_QMediaPlayer_methods)},
    {Py_tp_getset,      nullptr},
    {Py_tp_init,        reinterpret_cast<void *>(Sbk_QMediaPlayer_Init)},
    {Py_tp_new,         reinterpret_cast<void *>(SbkObjectTpNew)},
    {0, nullptr}
};
static PyType_Spec Sbk_QMediaPlayer_spec = {
    "2:PySide6.QtMultimedia.QMediaPlayer",
    sizeof(SbkObject),
    0,
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
    Sbk_QMediaPlayer_slots
};

} //extern "C"

static void *Sbk_QMediaPlayer_typeDiscovery(void *cptr, PyTypeObject *instanceType)
{
    if (instanceType == Shiboken::SbkType< ::QObject >())
        return dynamic_cast< ::QMediaPlayer *>(reinterpret_cast< ::QObject *>(cptr));
    return {};
}


// Type conversion functions.

// Python to C++ enum conversion.
static void QMediaPlayer_PlaybackState_PythonToCpp_QMediaPlayer_PlaybackState(PyObject *pyIn, void *cppOut)
{
    *reinterpret_cast<::QMediaPlayer::PlaybackState *>(cppOut) =
        static_cast<::QMediaPlayer::PlaybackState>(Shiboken::Enum::getValue(pyIn));

}
static PythonToCppFunc is_QMediaPlayer_PlaybackState_PythonToCpp_QMediaPlayer_PlaybackState_Convertible(PyObject *pyIn)
{
    if (PyObject_TypeCheck(pyIn, SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_PLAYBACKSTATE_IDX]))
        return QMediaPlayer_PlaybackState_PythonToCpp_QMediaPlayer_PlaybackState;
    return {};
}
static PyObject *QMediaPlayer_PlaybackState_CppToPython_QMediaPlayer_PlaybackState(const void *cppIn)
{
    const int castCppIn = int(*reinterpret_cast<const ::QMediaPlayer::PlaybackState *>(cppIn));
    return Shiboken::Enum::newItem(SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_PLAYBACKSTATE_IDX], castCppIn);

}

static void QMediaPlayer_MediaStatus_PythonToCpp_QMediaPlayer_MediaStatus(PyObject *pyIn, void *cppOut)
{
    *reinterpret_cast<::QMediaPlayer::MediaStatus *>(cppOut) =
        static_cast<::QMediaPlayer::MediaStatus>(Shiboken::Enum::getValue(pyIn));

}
static PythonToCppFunc is_QMediaPlayer_MediaStatus_PythonToCpp_QMediaPlayer_MediaStatus_Convertible(PyObject *pyIn)
{
    if (PyObject_TypeCheck(pyIn, SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_MEDIASTATUS_IDX]))
        return QMediaPlayer_MediaStatus_PythonToCpp_QMediaPlayer_MediaStatus;
    return {};
}
static PyObject *QMediaPlayer_MediaStatus_CppToPython_QMediaPlayer_MediaStatus(const void *cppIn)
{
    const int castCppIn = int(*reinterpret_cast<const ::QMediaPlayer::MediaStatus *>(cppIn));
    return Shiboken::Enum::newItem(SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_MEDIASTATUS_IDX], castCppIn);

}

static void QMediaPlayer_Error_PythonToCpp_QMediaPlayer_Error(PyObject *pyIn, void *cppOut)
{
    *reinterpret_cast<::QMediaPlayer::Error *>(cppOut) =
        static_cast<::QMediaPlayer::Error>(Shiboken::Enum::getValue(pyIn));

}
static PythonToCppFunc is_QMediaPlayer_Error_PythonToCpp_QMediaPlayer_Error_Convertible(PyObject *pyIn)
{
    if (PyObject_TypeCheck(pyIn, SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_ERROR_IDX]))
        return QMediaPlayer_Error_PythonToCpp_QMediaPlayer_Error;
    return {};
}
static PyObject *QMediaPlayer_Error_CppToPython_QMediaPlayer_Error(const void *cppIn)
{
    const int castCppIn = int(*reinterpret_cast<const ::QMediaPlayer::Error *>(cppIn));
    return Shiboken::Enum::newItem(SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_ERROR_IDX], castCppIn);

}

static void QMediaPlayer_Loops_PythonToCpp_QMediaPlayer_Loops(PyObject *pyIn, void *cppOut)
{
    *reinterpret_cast<::QMediaPlayer::Loops *>(cppOut) =
        static_cast<::QMediaPlayer::Loops>(Shiboken::Enum::getValue(pyIn));

}
static PythonToCppFunc is_QMediaPlayer_Loops_PythonToCpp_QMediaPlayer_Loops_Convertible(PyObject *pyIn)
{
    if (PyObject_TypeCheck(pyIn, SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_LOOPS_IDX]))
        return QMediaPlayer_Loops_PythonToCpp_QMediaPlayer_Loops;
    return {};
}
static PyObject *QMediaPlayer_Loops_CppToPython_QMediaPlayer_Loops(const void *cppIn)
{
    const int castCppIn = int(*reinterpret_cast<const ::QMediaPlayer::Loops *>(cppIn));
    return Shiboken::Enum::newItem(SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_LOOPS_IDX], castCppIn);

}

// Python to C++ pointer conversion - returns the C++ object of the Python wrapper (keeps object identity).
static void QMediaPlayer_PythonToCpp_QMediaPlayer_PTR(PyObject *pyIn, void *cppOut)
{
    Shiboken::Conversions::pythonToCppPointer(Sbk_QMediaPlayer_TypeF(), pyIn, cppOut);
}
static PythonToCppFunc is_QMediaPlayer_PythonToCpp_QMediaPlayer_PTR_Convertible(PyObject *pyIn)
{
    if (pyIn == Py_None)
        return Shiboken::Conversions::nonePythonToCppNullPtr;
    if (PyObject_TypeCheck(pyIn, reinterpret_cast<PyTypeObject *>(Sbk_QMediaPlayer_TypeF())))
        return QMediaPlayer_PythonToCpp_QMediaPlayer_PTR;
    return {};
}

// C++ to Python pointer conversion - tries to find the Python wrapper for the C++ object (keeps object identity).
static PyObject *QMediaPlayer_PTR_CppToPython_QMediaPlayer(const void *cppIn)
{
    return PySide::getWrapperForQObject(reinterpret_cast<::QMediaPlayer *>(const_cast<void *>(cppIn)), Sbk_QMediaPlayer_TypeF());

}

// The signatures string for the functions.
// Multiple signatures have their index "n:" in front.
static const char *QMediaPlayer_SignatureStrings[] = {
    "PySide6.QtMultimedia.QMediaPlayer(self,parent:PySide6.QtCore.QObject=nullptr)",
    "PySide6.QtMultimedia.QMediaPlayer.activeAudioTrack(self)->int",
    "PySide6.QtMultimedia.QMediaPlayer.activeSubtitleTrack(self)->int",
    "PySide6.QtMultimedia.QMediaPlayer.activeVideoTrack(self)->int",
    "PySide6.QtMultimedia.QMediaPlayer.audioOutput(self)->PySide6.QtMultimedia.QAudioOutput",
    "PySide6.QtMultimedia.QMediaPlayer.audioTracks(self)->QList[PySide6.QtMultimedia.QMediaMetaData]",
    "PySide6.QtMultimedia.QMediaPlayer.bufferProgress(self)->float",
    "PySide6.QtMultimedia.QMediaPlayer.bufferedTimeRange(self)->PySide6.QtMultimedia.QMediaTimeRange",
    "PySide6.QtMultimedia.QMediaPlayer.duration(self)->qint64",
    "PySide6.QtMultimedia.QMediaPlayer.error(self)->PySide6.QtMultimedia.QMediaPlayer.Error",
    "PySide6.QtMultimedia.QMediaPlayer.errorString(self)->QString",
    "PySide6.QtMultimedia.QMediaPlayer.hasAudio(self)->bool",
    "PySide6.QtMultimedia.QMediaPlayer.hasVideo(self)->bool",
    "PySide6.QtMultimedia.QMediaPlayer.isAvailable(self)->bool",
    "PySide6.QtMultimedia.QMediaPlayer.isSeekable(self)->bool",
    "PySide6.QtMultimedia.QMediaPlayer.loops(self)->int",
    "PySide6.QtMultimedia.QMediaPlayer.mediaStatus(self)->PySide6.QtMultimedia.QMediaPlayer.MediaStatus",
    "PySide6.QtMultimedia.QMediaPlayer.metaData(self)->PySide6.QtMultimedia.QMediaMetaData",
    "PySide6.QtMultimedia.QMediaPlayer.pause(self)",
    "PySide6.QtMultimedia.QMediaPlayer.play(self)",
    "PySide6.QtMultimedia.QMediaPlayer.playbackRate(self)->qreal",
    "PySide6.QtMultimedia.QMediaPlayer.playbackState(self)->PySide6.QtMultimedia.QMediaPlayer.PlaybackState",
    "PySide6.QtMultimedia.QMediaPlayer.position(self)->qint64",
    "PySide6.QtMultimedia.QMediaPlayer.setActiveAudioTrack(self,index:int)",
    "PySide6.QtMultimedia.QMediaPlayer.setActiveSubtitleTrack(self,index:int)",
    "PySide6.QtMultimedia.QMediaPlayer.setActiveVideoTrack(self,index:int)",
    "PySide6.QtMultimedia.QMediaPlayer.setAudioOutput(self,output:PySide6.QtMultimedia.QAudioOutput)",
    "PySide6.QtMultimedia.QMediaPlayer.setLoops(self,loops:int)",
    "PySide6.QtMultimedia.QMediaPlayer.setPlaybackRate(self,rate:qreal)",
    "PySide6.QtMultimedia.QMediaPlayer.setPosition(self,position:qint64)",
    "PySide6.QtMultimedia.QMediaPlayer.setSource(self,source:typing.Union[PySide6.QtCore.QUrl, QString])",
    "PySide6.QtMultimedia.QMediaPlayer.setSourceDevice(self,device:PySide6.QtCore.QIODevice,sourceUrl:typing.Union[PySide6.QtCore.QUrl, QString]=QUrl())",
    "PySide6.QtMultimedia.QMediaPlayer.setVideoOutput(self,arg__1:PySide6.QtCore.QObject)",
    "PySide6.QtMultimedia.QMediaPlayer.setVideoSink(self,sink:PySide6.QtMultimedia.QVideoSink)",
    "PySide6.QtMultimedia.QMediaPlayer.source(self)->PySide6.QtCore.QUrl",
    "PySide6.QtMultimedia.QMediaPlayer.sourceDevice(self)->PySide6.QtCore.QIODevice",
    "PySide6.QtMultimedia.QMediaPlayer.stop(self)",
    "PySide6.QtMultimedia.QMediaPlayer.subtitleTracks(self)->QList[PySide6.QtMultimedia.QMediaMetaData]",
    "PySide6.QtMultimedia.QMediaPlayer.videoOutput(self)->PySide6.QtCore.QObject",
    "PySide6.QtMultimedia.QMediaPlayer.videoSink(self)->PySide6.QtMultimedia.QVideoSink",
    "PySide6.QtMultimedia.QMediaPlayer.videoTracks(self)->QList[PySide6.QtMultimedia.QMediaMetaData]",
    nullptr}; // Sentinel

void init_QMediaPlayer(PyObject *module)
{
    _Sbk_QMediaPlayer_Type = Shiboken::ObjectType::introduceWrapperType(
        module,
        "QMediaPlayer",
        "QMediaPlayer*",
        &Sbk_QMediaPlayer_spec,
        &Shiboken::callCppDestructor< ::QMediaPlayer >,
        SbkPySide6_QtCoreTypes[SBK_QOBJECT_IDX],
        0,
        0);
    auto *pyType = Sbk_QMediaPlayer_TypeF(); // references _Sbk_QMediaPlayer_Type
    InitSignatureStrings(pyType, QMediaPlayer_SignatureStrings);
    SbkObjectType_SetPropertyStrings(reinterpret_cast<PyTypeObject *>(_Sbk_QMediaPlayer_Type), Sbk_QMediaPlayer_PropertyStrings);
    SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_IDX]
        = Sbk_QMediaPlayer_TypeF();

    // Register Converter
    SbkConverter *converter = Shiboken::Conversions::createConverter(Sbk_QMediaPlayer_TypeF(),
        QMediaPlayer_PythonToCpp_QMediaPlayer_PTR,
        is_QMediaPlayer_PythonToCpp_QMediaPlayer_PTR_Convertible,
        QMediaPlayer_PTR_CppToPython_QMediaPlayer);

    Shiboken::Conversions::registerConverterName(converter, "QMediaPlayer");
    Shiboken::Conversions::registerConverterName(converter, "QMediaPlayer*");
    Shiboken::Conversions::registerConverterName(converter, "QMediaPlayer&");
    Shiboken::Conversions::registerConverterName(converter, typeid(::QMediaPlayer).name());
    Shiboken::Conversions::registerConverterName(converter, typeid(::QMediaPlayerWrapper).name());


    Shiboken::ObjectType::setTypeDiscoveryFunctionV2(Sbk_QMediaPlayer_TypeF(), &Sbk_QMediaPlayer_typeDiscovery);

    // Initialization of enums.

    // Initialization of enum 'PlaybackState'.
    SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_PLAYBACKSTATE_IDX] = Shiboken::Enum::createScopedEnum(Sbk_QMediaPlayer_TypeF(),
        "PlaybackState",
        "2:PySide6.QtMultimedia.QMediaPlayer.PlaybackState",
        "QMediaPlayer::PlaybackState");
    if (!SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_PLAYBACKSTATE_IDX])
        return;

    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_PLAYBACKSTATE_IDX],
        Sbk_QMediaPlayer_TypeF(), "StoppedState", (long) QMediaPlayer::PlaybackState::StoppedState))
        return;
    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_PLAYBACKSTATE_IDX],
        Sbk_QMediaPlayer_TypeF(), "PlayingState", (long) QMediaPlayer::PlaybackState::PlayingState))
        return;
    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_PLAYBACKSTATE_IDX],
        Sbk_QMediaPlayer_TypeF(), "PausedState", (long) QMediaPlayer::PlaybackState::PausedState))
        return;
    // Register converter for enum 'QMediaPlayer::PlaybackState'.
    {
        SbkConverter *converter = Shiboken::Conversions::createConverter(SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_PLAYBACKSTATE_IDX],
            QMediaPlayer_PlaybackState_CppToPython_QMediaPlayer_PlaybackState);
        Shiboken::Conversions::addPythonToCppValueConversion(converter,
            QMediaPlayer_PlaybackState_PythonToCpp_QMediaPlayer_PlaybackState,
            is_QMediaPlayer_PlaybackState_PythonToCpp_QMediaPlayer_PlaybackState_Convertible);
        Shiboken::Enum::setTypeConverter(SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_PLAYBACKSTATE_IDX], converter, false);
        Shiboken::Conversions::registerConverterName(converter, "QMediaPlayer::PlaybackState");
        Shiboken::Conversions::registerConverterName(converter, "PlaybackState");
    }
    // End of 'PlaybackState' enum.

    // Initialization of enum 'MediaStatus'.
    SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_MEDIASTATUS_IDX] = Shiboken::Enum::createScopedEnum(Sbk_QMediaPlayer_TypeF(),
        "MediaStatus",
        "2:PySide6.QtMultimedia.QMediaPlayer.MediaStatus",
        "QMediaPlayer::MediaStatus");
    if (!SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_MEDIASTATUS_IDX])
        return;

    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_MEDIASTATUS_IDX],
        Sbk_QMediaPlayer_TypeF(), "NoMedia", (long) QMediaPlayer::MediaStatus::NoMedia))
        return;
    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_MEDIASTATUS_IDX],
        Sbk_QMediaPlayer_TypeF(), "LoadingMedia", (long) QMediaPlayer::MediaStatus::LoadingMedia))
        return;
    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_MEDIASTATUS_IDX],
        Sbk_QMediaPlayer_TypeF(), "LoadedMedia", (long) QMediaPlayer::MediaStatus::LoadedMedia))
        return;
    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_MEDIASTATUS_IDX],
        Sbk_QMediaPlayer_TypeF(), "StalledMedia", (long) QMediaPlayer::MediaStatus::StalledMedia))
        return;
    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_MEDIASTATUS_IDX],
        Sbk_QMediaPlayer_TypeF(), "BufferingMedia", (long) QMediaPlayer::MediaStatus::BufferingMedia))
        return;
    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_MEDIASTATUS_IDX],
        Sbk_QMediaPlayer_TypeF(), "BufferedMedia", (long) QMediaPlayer::MediaStatus::BufferedMedia))
        return;
    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_MEDIASTATUS_IDX],
        Sbk_QMediaPlayer_TypeF(), "EndOfMedia", (long) QMediaPlayer::MediaStatus::EndOfMedia))
        return;
    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_MEDIASTATUS_IDX],
        Sbk_QMediaPlayer_TypeF(), "InvalidMedia", (long) QMediaPlayer::MediaStatus::InvalidMedia))
        return;
    // Register converter for enum 'QMediaPlayer::MediaStatus'.
    {
        SbkConverter *converter = Shiboken::Conversions::createConverter(SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_MEDIASTATUS_IDX],
            QMediaPlayer_MediaStatus_CppToPython_QMediaPlayer_MediaStatus);
        Shiboken::Conversions::addPythonToCppValueConversion(converter,
            QMediaPlayer_MediaStatus_PythonToCpp_QMediaPlayer_MediaStatus,
            is_QMediaPlayer_MediaStatus_PythonToCpp_QMediaPlayer_MediaStatus_Convertible);
        Shiboken::Enum::setTypeConverter(SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_MEDIASTATUS_IDX], converter, false);
        Shiboken::Conversions::registerConverterName(converter, "QMediaPlayer::MediaStatus");
        Shiboken::Conversions::registerConverterName(converter, "MediaStatus");
    }
    // End of 'MediaStatus' enum.

    // Initialization of enum 'Error'.
    SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_ERROR_IDX] = Shiboken::Enum::createScopedEnum(Sbk_QMediaPlayer_TypeF(),
        "Error",
        "2:PySide6.QtMultimedia.QMediaPlayer.Error",
        "QMediaPlayer::Error");
    if (!SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_ERROR_IDX])
        return;

    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_ERROR_IDX],
        Sbk_QMediaPlayer_TypeF(), "NoError", (long) QMediaPlayer::Error::NoError))
        return;
    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_ERROR_IDX],
        Sbk_QMediaPlayer_TypeF(), "ResourceError", (long) QMediaPlayer::Error::ResourceError))
        return;
    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_ERROR_IDX],
        Sbk_QMediaPlayer_TypeF(), "FormatError", (long) QMediaPlayer::Error::FormatError))
        return;
    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_ERROR_IDX],
        Sbk_QMediaPlayer_TypeF(), "NetworkError", (long) QMediaPlayer::Error::NetworkError))
        return;
    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_ERROR_IDX],
        Sbk_QMediaPlayer_TypeF(), "AccessDeniedError", (long) QMediaPlayer::Error::AccessDeniedError))
        return;
    // Register converter for enum 'QMediaPlayer::Error'.
    {
        SbkConverter *converter = Shiboken::Conversions::createConverter(SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_ERROR_IDX],
            QMediaPlayer_Error_CppToPython_QMediaPlayer_Error);
        Shiboken::Conversions::addPythonToCppValueConversion(converter,
            QMediaPlayer_Error_PythonToCpp_QMediaPlayer_Error,
            is_QMediaPlayer_Error_PythonToCpp_QMediaPlayer_Error_Convertible);
        Shiboken::Enum::setTypeConverter(SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_ERROR_IDX], converter, false);
        Shiboken::Conversions::registerConverterName(converter, "QMediaPlayer::Error");
        Shiboken::Conversions::registerConverterName(converter, "Error");
    }
    // End of 'Error' enum.

    // Initialization of enum 'Loops'.
    SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_LOOPS_IDX] = Shiboken::Enum::createScopedEnum(Sbk_QMediaPlayer_TypeF(),
        "Loops",
        "2:PySide6.QtMultimedia.QMediaPlayer.Loops",
        "QMediaPlayer::Loops");
    if (!SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_LOOPS_IDX])
        return;

    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_LOOPS_IDX],
        Sbk_QMediaPlayer_TypeF(), "Infinite", (long) QMediaPlayer::Loops::Infinite))
        return;
    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_LOOPS_IDX],
        Sbk_QMediaPlayer_TypeF(), "Once", (long) QMediaPlayer::Loops::Once))
        return;
    // Register converter for enum 'QMediaPlayer::Loops'.
    {
        SbkConverter *converter = Shiboken::Conversions::createConverter(SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_LOOPS_IDX],
            QMediaPlayer_Loops_CppToPython_QMediaPlayer_Loops);
        Shiboken::Conversions::addPythonToCppValueConversion(converter,
            QMediaPlayer_Loops_PythonToCpp_QMediaPlayer_Loops,
            is_QMediaPlayer_Loops_PythonToCpp_QMediaPlayer_Loops_Convertible);
        Shiboken::Enum::setTypeConverter(SbkPySide6_QtMultimediaTypes[SBK_QMEDIAPLAYER_LOOPS_IDX], converter, false);
        Shiboken::Conversions::registerConverterName(converter, "QMediaPlayer::Loops");
        Shiboken::Conversions::registerConverterName(converter, "Loops");
    }
    // End of 'Loops' enum.

    PySide::Signal::registerSignals(Sbk_QMediaPlayer_TypeF(), &::QMediaPlayer::staticMetaObject);
    qRegisterMetaType< ::QMediaPlayer::PlaybackState >("QMediaPlayer::PlaybackState");
    qRegisterMetaType< ::QMediaPlayer::MediaStatus >("QMediaPlayer::MediaStatus");
    qRegisterMetaType< ::QMediaPlayer::Error >("QMediaPlayer::Error");
    qRegisterMetaType< ::QMediaPlayer::Loops >("QMediaPlayer::Loops");
    Shiboken::ObjectType::setSubTypeInitHook(Sbk_QMediaPlayer_TypeF(), &PySide::initQObjectSubType);
    PySide::initDynamicMetaObject(Sbk_QMediaPlayer_TypeF(), &::QMediaPlayer::staticMetaObject, sizeof(QMediaPlayerWrapper));
}
