[vlc-devel] commit: Start of the work for the audio/video/subs synchronisation ( Jean-Baptiste Kempf )
git version control
git at videolan.org
Sun Mar 30 05:43:58 CEST 2008
vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sat Mar 29 19:08:07 2008 -0700| [5a6c9e944a90d2d9da88a03b5e3de548a3592d7d]
Start of the work for the audio/video/subs synchronisation
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5a6c9e944a90d2d9da88a03b5e3de548a3592d7d
---
modules/gui/qt4/components/extended_panels.cpp | 79 +++++++++++++++++++++++-
modules/gui/qt4/components/extended_panels.hpp | 12 ++++
modules/gui/qt4/dialogs/extended.cpp | 4 +-
3 files changed, 93 insertions(+), 2 deletions(-)
diff --git a/modules/gui/qt4/components/extended_panels.cpp b/modules/gui/qt4/components/extended_panels.cpp
index db28287..7d00edc 100755
--- a/modules/gui/qt4/components/extended_panels.cpp
+++ b/modules/gui/qt4/components/extended_panels.cpp
@@ -1,7 +1,7 @@
/*****************************************************************************
* extended_panels.cpp : Extended controls panels
****************************************************************************
- * Copyright ( C ) 2006-2007 the VideoLAN team
+ * Copyright (C) 2006-2007 the VideoLAN team
* $Id$
*
* Authors: Clément Stenac <zorglub at videolan.org>
@@ -1157,6 +1157,83 @@ void Spatializer::addCallbacks( aout_instance_t *p_aout )
// var_AddCallback( p_aout, "Spatializer-preamp", EqzCallback, this );
}
+#include <QToolButton>
+#include <QGridLayout>
+
+SyncControls::SyncControls( intf_thread_t *_p_intf, QWidget *_parent ) :
+ QWidget( _parent ) , p_intf( _p_intf )
+{
+ QGroupBox *AVBox, *subsBox;
+ QToolButton *moinsAV, *plusAV;
+
+ QToolButton *moinssubs, *plussubs;
+
+ QVBoxLayout *vboxLayout = new QVBoxLayout( this );
+
+ AVBox = new QGroupBox( qtr( "Audio/Video" ) );
+ QGridLayout *gridLayout = new QGridLayout( AVBox );
+
+ moinsAV = new QToolButton;
+ moinsAV->setToolButtonStyle( Qt::ToolButtonTextOnly );
+ moinsAV->setAutoRaise( true );
+ moinsAV->setText( "-" );
+ gridLayout->addWidget( moinsAV, 1, 0, 1, 1 );
+
+ plusAV = new QToolButton;
+ plusAV->setToolButtonStyle( Qt::ToolButtonTextOnly );
+ plusAV->setAutoRaise( true );
+ plusAV->setText( "+" );
+ gridLayout->addWidget( plusAV, 1, 2, 1, 1 );
+
+ QLabel *AVLabel = new QLabel;
+ AVLabel->setText( qtr( "Advance of audio over video" ) );
+ gridLayout->addWidget( AVLabel, 0, 0, 1, 3 );
+
+ AVSpin = new QDoubleSpinBox;
+ AVSpin->setAlignment( Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter );
+ AVSpin->setDecimals( 3 );
+ AVSpin->setMinimum( -100 );
+ AVSpin->setMaximum( 100 );
+ AVSpin->setSingleStep( 0.1 );
+ AVSpin->setToolTip( qtr( "A positive value means that\n"
+ "the audio is ahead of the video" ) );
+ AVSpin->setSuffix( "ms" );
+ gridLayout->addWidget( AVSpin, 1, 1, 1, 1 );
+ vboxLayout->addWidget( AVBox );
+
+
+ subsBox = new QGroupBox( qtr( "Subtitles/Video" ) );
+ QGridLayout *subsLayout = new QGridLayout( subsBox );
+
+ moinssubs = new QToolButton;
+ moinssubs->setToolButtonStyle( Qt::ToolButtonTextOnly );
+ moinssubs->setAutoRaise( true );
+ moinssubs->setText( "-" );
+ subsLayout->addWidget( moinssubs, 1, 0, 1, 1 );
+
+ plussubs = new QToolButton;
+ plussubs->setToolButtonStyle( Qt::ToolButtonTextOnly );
+ plussubs->setAutoRaise( true );
+ plussubs->setText( "+" );
+ subsLayout->addWidget( plussubs, 1, 2, 1, 1 );
+
+ QLabel *subsLabel = new QLabel;
+ subsLabel->setText( qtr( "Advance of subtitles over video" ) );
+ subsLayout->addWidget( subsLabel, 0, 0, 1, 3 );
+
+ subsSpin = new QDoubleSpinBox;
+ subsSpin->setAlignment( Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter );
+ subsSpin->setDecimals( 3 );
+ subsSpin->setMinimum( -100 );
+ subsSpin->setMaximum( 100 );
+ subsSpin->setSingleStep( 0.1 );
+ subsSpin->setToolTip( qtr( "A positive value means that\n"
+ "the subtitles are ahead of the video" ) );
+ subsSpin->setSuffix( "ms" );
+ subsLayout->addWidget( subsSpin, 1, 1, 1, 1 );
+ vboxLayout->addWidget( subsBox );
+}
+
/**********************************************************************
* Video filters / Adjust
**********************************************************************/
diff --git a/modules/gui/qt4/components/extended_panels.hpp b/modules/gui/qt4/components/extended_panels.hpp
index 08a7c29..0f4da97 100644
--- a/modules/gui/qt4/components/extended_panels.hpp
+++ b/modules/gui/qt4/components/extended_panels.hpp
@@ -150,4 +150,16 @@ private slots:
void snapshot() {};
};
+class SyncControls : public QWidget
+{
+ Q_OBJECT
+public:
+ SyncControls( intf_thread_t *, QWidget * );
+ virtual ~SyncControls() {};
+private:
+ intf_thread_t *p_intf;
+ QDoubleSpinBox *AVSpin;
+ QDoubleSpinBox *subsSpin;
+};
+
#endif
diff --git a/modules/gui/qt4/dialogs/extended.cpp b/modules/gui/qt4/dialogs/extended.cpp
index af9c7ed..9d0f387 100644
--- a/modules/gui/qt4/dialogs/extended.cpp
+++ b/modules/gui/qt4/dialogs/extended.cpp
@@ -43,7 +43,6 @@ ExtendedDialog::ExtendedDialog( intf_thread_t *_p_intf ): QVLCFrame( _p_intf )
QGridLayout *layout = new QGridLayout( this );
QTabWidget *mainTabW = new QTabWidget( this );
- mainTabW->setTabPosition( QTabWidget::West );
/* AUDIO effects */
QWidget *audioWidget = new QWidget;
@@ -70,6 +69,9 @@ ExtendedDialog::ExtendedDialog( intf_thread_t *_p_intf ): QVLCFrame( _p_intf )
mainTabW->addTab( videoWidget, qtr( "Video Effects" ) );
+ SyncControls *syncW = new SyncControls( p_intf, videoTab );
+ mainTabW->addTab( syncW, qtr( "A/V Synchronisation" ) );
+
if( module_Exists( p_intf, "v4l2" ) )
{
ExtV4l2 *v4l2 = new ExtV4l2( p_intf, mainTabW );
More information about the vlc-devel
mailing list