ffmpegengine.cpp Example File
ffmpeg/ffmpegengine.cpp
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;
};
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;
}
}
Copyright © 2009 Trolltech |
Trademarks |
Qt Extended 4.4.3 |