Commit 82bd6cbd authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt: Profiles Editor for the transcoding.

Still a lot of testing and fixing needed.
The profiles are still in the main Qt Settings file.
parent 9034aecc
......@@ -50,6 +50,7 @@ nodist_SOURCES_qt4 = \
components/playlist/playlist.moc.cpp \
components/playlist/panels.moc.cpp \
components/playlist/selector.moc.cpp \
components/sout/profile_selector.moc.cpp \
util/input_slider.moc.cpp \
util/customwidgets.moc.cpp \
resources.cpp \
......@@ -63,6 +64,7 @@ nodist_SOURCES_qt4 = \
ui/open.h \
ui/vlm.h \
ui/podcast_configuration.h \
ui/profiles.h \
ui/sprefs_audio.h \
ui/sprefs_input.h \
ui/sprefs_interface.h \
......@@ -217,6 +219,7 @@ SOURCES_qt4 = qt4.cpp \
components/playlist/standardpanel.cpp \
components/playlist/playlist.cpp \
components/playlist/selector.cpp \
components/sout/profile_selector.cpp \
util/input_slider.cpp \
util/customwidgets.cpp \
util/registry.cpp
......@@ -261,6 +264,7 @@ noinst_HEADERS = \
components/playlist/playlist.hpp \
components/playlist/selector.hpp \
components/playlist/sorting.h \
components/sout/profile_selector.cpp \
util/input_slider.hpp \
util/customwidgets.hpp \
util/qvlcframe.hpp \
......@@ -279,6 +283,7 @@ EXTRA_DIST += \
ui/open_capture.ui \
ui/open.ui \
ui/podcast_configuration.ui \
ui/profiles.ui \
ui/sprefs_audio.ui \
ui/sprefs_input.ui \
ui/sprefs_interface.ui \
......
This diff is collapsed.
/*****************************************************************************
* profile_selector.hpp : A small profile selector and editor
****************************************************************************
* Copyright (C) 2009 the VideoLAN team
* $Id$
*
* Authors: Jean-Baptiste Kempf <jb@videolan.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 _PROFILE_H_
#define _PROFILE_H_
#include "qt4.hpp"
#include <QWidget>
#include "util/qvlcframe.hpp"
#include "ui/profiles.h"
class QComboBox;
class VLCProfileSelector : public QWidget
{
Q_OBJECT
public:
VLCProfileSelector( QWidget *_parent );
QString getMux() { return mux; }
QString getTranscode() { return transcode; }
private:
QComboBox *profileBox;
void fillProfilesCombo();
void editProfile( QString, QString );
void saveProfiles();
QString mux;
QString transcode;
private slots:
void newProfile();
void editProfile();
void deleteProfile();
void updateOptions( int i );
signals:
void optionsChanged();
};
class VLCProfileEditor : public QVLCDialog
{
Q_OBJECT
Ui::Profiles ui;
public:
VLCProfileEditor( QString, QString, QWidget * );
QString name;
QString muxValue;
QString transcodeValue();
private:
void registerCodecs();
void fillProfile( QString qs );
protected:
virtual void close();
private slots:
void setVTranscodeOptions( bool );
void setATranscodeOptions( bool );
void setSTranscodeOptions( bool );
};
#endif
This diff is collapsed.
......@@ -38,6 +38,76 @@ class QCheckBox;
class QGridLayout;
class QTextEdit;
class SoutMrl
{
public:
SoutMrl( const QString head = "")
{
mrl = head;
b_first = true;
b_has_bracket = false;
}
QString getMrl()
{
return mrl;
}
void begin( QString module )
{
if( !b_first )
mrl += ":";
b_first = false;
mrl += module;
b_has_bracket = false;
}
void end()
{
if( b_has_bracket )
mrl += "}";
}
void option( const QString option, const QString value = "" )
{
if( !b_has_bracket )
mrl += "{";
else
mrl += ",";
b_has_bracket = true;
mrl += option;
if( !value.isEmpty() )
{
char *psz = config_StringEscape( qtu(value) );
if( psz )
{
mrl += "=\"" + qfu( psz ) + "\"";
free( psz );
}
}
}
void option( const QString name, const int i_value, const int i_precision = 10 )
{
option( name, QString::number( i_value, i_precision ) );
}
void option( const QString name, const double f_value )
{
option( name, QString::number( f_value ) );
}
void option( const QString name, const QString base, const int i_value, const int i_precision = 10 )
{
option( name, base + ":" + QString::number( i_value, i_precision ) );
}
private:
QString mrl;
bool b_has_bracket;
bool b_first;
};
class SoutDialog : public QVLCDialog
{
Q_OBJECT;
......@@ -79,9 +149,6 @@ private slots:
void toggleSout();
void setOptions();
void fileBrowse();
void setVTranscodeOptions( bool );
void setATranscodeOptions( bool );
void setSTranscodeOptions( bool );
void setRawOptions( bool );
void changeUDPandRTPmess( bool );
void RTPtoggled( bool );
......
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment