WorkflowFileRenderer.h 2.6 KB
Newer Older
1 2 3
/*****************************************************************************
 * WorkflowFileRenderer.h: Output the workflow to a file
 *****************************************************************************
4
 * Copyright (C) 2008-2014 VideoLAN
5
 *
Hugo Beauzée-Luyssen's avatar
Hugo Beauzée-Luyssen committed
6
 * Authors: Hugo Beauzée-Luyssen <hugo@beauzee.fr>
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
 *****************************************************************************/

#ifndef WORKFLOWFILERENDERER_H
#define WORKFLOWFILERENDERER_H

26
#include "config.h"
27
#include "Backend/ISourceRenderer.h"
28
#include "Workflow/MainWorkflow.h"
29
#include "WorkflowRenderer.h"
30

31
#include <QTime>
32

33
class   WorkflowFileRenderer : public WorkflowRenderer
34 35 36 37
{
    Q_OBJECT

public:
38
    WorkflowFileRenderer( Backend::IBackend* backend , MainWorkflow* workflow );
39 40
    virtual ~WorkflowFileRenderer();

41 42 43
    void                        run(const QString& outputFileName, quint32 width,
                                    quint32 height, double fps, quint32 vbitrate,
                                    quint32 abitrate);
44 45
    static int                  lock(void* datas, const char* cookie, int64_t *dts, int64_t *pts,
                                      unsigned int *flags, size_t *bufferSize, const void **buffer );
46
    virtual float               getFps() const;
47 48

private:
49
    quint8                      *m_renderVideoFrame;
50
#ifdef WITH_GUI
51
    QTime                       m_time;
52
#endif
53 54

protected:
55 56 57
    virtual Backend::ISourceRenderer::MemoryInputLockCallback getLockCallback();
    virtual Backend::ISourceRenderer::MemoryInputUnlockCallback getUnlockCallback();

58
private slots:
59
    void                        __frameChanged( qint64 frame,
60
                                                Vlmc::FrameChangedReason reason );
61 62 63

signals:
    void                        imageUpdated( const uchar* image );
64
    void                        frameChanged( qint64 );
65
    void                        renderComplete();
66 67 68
};

#endif // WORKFLOWFILERENDERER_H