RendererSettings.h 2.05 KB
Newer Older
Hugo Beauzee-Luyssen's avatar
Hugo Beauzee-Luyssen committed
1 2 3 4 5
/*****************************************************************************
 * RendererSettings.h: Edit the output file parameters
 *****************************************************************************
 * Copyright (C) 2008-2010 VideoLAN
 *
6
 * Authors: Hugo Beauzée-Luyssen <hugo@beauzee.fr>
Hugo Beauzee-Luyssen's avatar
Hugo Beauzee-Luyssen committed
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
 *
 * 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 RENDERERSETTINGS_H
#define RENDERERSETTINGS_H

#include <QDialog>
#include "ui_RendererSettings.h"

class   RendererSettings : public QDialog
{
    Q_OBJECT

33 34 35 36 37 38 39 40 41 42 43 44 45
    enum VideoPresets
    {
        Custom = 0,
        QVGA,
        VGA,
        SVGA,
        XVGA,
        P480,
        P576,
        P720,
        P1080
    };

Hugo Beauzee-Luyssen's avatar
Hugo Beauzee-Luyssen committed
46
    public:
47
        RendererSettings( bool shareOnInternet = false );
48

Hugo Beauzee-Luyssen's avatar
Hugo Beauzee-Luyssen committed
49 50 51 52 53 54 55 56 57
        quint32         width() const;
        quint32         height() const;
        double          fps() const;
        quint32         videoBitrate() const;
        quint32         audioBitrate() const;
        QString         outputFileName() const;

    private slots:
        void            selectOutputFileName();
58
        void            updateVideoPreset( int index );
Hugo Beauzee-Luyssen's avatar
Hugo Beauzee-Luyssen committed
59 60 61 62
        virtual void    accept();

    private:
        Ui::RendererSettings    m_ui;
63
        void                    setPreset( quint32 width, quint32 height, double fps );
Hugo Beauzee-Luyssen's avatar
Hugo Beauzee-Luyssen committed
64 65 66
};

#endif // RENDERERSETTINGS_H