Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions codeless banner

ffmpegengine.cpp Example File
ffmpeg/ffmpegengine.cpp

    /****************************************************************************
    **
    ** This file is part of the Qt Extended Commercial Package.
    **
    ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    **
    ** $QT_EXTENDED_DUAL_LICENSE$
    **
    ****************************************************************************/

    extern "C" {
    #include "libavcodec/avcodec.h"
    #include "libavformat/avformat.h"
    };

    #include <qmediaengineinformation.h>
    #include <qmediasessionbuilder.h>

    #include "ffmpegengineinformation.h"
    #include "ffmpegengine.h"

    namespace ffmpeg
    {

    class EnginePrivate
    {
    public:
        EngineInformation*          engineInformation;
        QMediaSessionBuilderList    sessionBuilders;
    };

    /*!
        \class ffmpeg::Engine
        \internal
    */

    Engine::Engine():
        s(0),
        d(new EnginePrivate)
    {
        d->engineInformation = new EngineInformation(this);
    }

    Engine::~Engine()
    {
        delete d;
    }

    void Engine::initialize()
    {
        av_register_all();
    }

    void Engine::start()
    {
    }

    void Engine::stop()
    {
    }

    void Engine::suspend()
    {
        if(s)
            s->suspend();
    }

    void Engine::resume()
    {
        if(s)
            s->resume();
    }

    void Engine::registerSession(QMediaServerSession* session)
    {
        s = static_cast<PlaybinSession*>(session);
    }

    void Engine::unregisterSession(QMediaServerSession* session)
    {
        Q_UNUSED(session);
    }

    QMediaEngineInformation const* Engine::engineInformation()
    {
        return d->engineInformation;
    }

    }   // ns ffmpeg


Copyright © 2009 Nokia Trademarks
Qt Extended 4.4.3