ImageClipWorkflow.h 2.6 KB
Newer Older
1 2 3
/*****************************************************************************
 * ImageClipWorkflow.h : Will extract a frame from an image
 *****************************************************************************
Ludovic Fauvet's avatar
Ludovic Fauvet committed
4
 * Copyright (C) 2008-2010 VideoLAN
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
 *
 * Authors: Hugo Beauzee-Luyssen <hugo@vlmc.org>
 *
 * 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 IMAGECLIPWORKFLOW_H
#define IMAGECLIPWORKFLOW_H

26
#include "ClipWorkflow.h"
27

28
class   ImageClipWorkflow : public ClipWorkflow
29
{
30 31 32
    Q_OBJECT

    public:
33
        ImageClipWorkflow( ClipHelper* ch );
34
        ~ImageClipWorkflow();
35

Hugo Beauzee-Luyssen's avatar
Hugo Beauzee-Luyssen committed
36 37
        void                    *getLockCallback() const;
        void                    *getUnlockCallback() const;
38
        virtual Workflow::OutputBuffer  *getOutput( ClipWorkflow::GetMode mode );
39
        virtual void            saveEffects( QXmlStreamWriter & ) const {} //Nothing to do here now.
40
        virtual bool            appendEffect( Effect *, qint64, qint64 ) { return false; } //Nothing to do here now.
41 42
    protected:
        virtual void            initVlcOutput();
43 44
        virtual quint32         getNbComputedBuffers() const;
        virtual quint32         getMaxComputedBuffers() const;
45
        virtual void            flushComputedBuffers();
46
        virtual void            releasePrealocated(){}
47 48 49 50 51 52 53
    private:
        static void             lock( ImageClipWorkflow* clipWorkflow, void** pp_ret,
                                      int size );
        static void             unlock( ImageClipWorkflow* clipWorkflow, void* buffer,
                                        int width, int height, int bpp, int size,
                                        qint64 pts );
    private:
54
        Workflow::Frame         *m_buffer;
55 56 57 58 59

    private slots:
        void                    stopComputation();
    signals:
        void                    computedFinished();
60 61 62
};

#endif // IMAGECLIPWORKFLOW_H