Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
cec03a34
Commit
cec03a34
authored
Sep 17, 2012
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: profiles_editor: display muxers capabilities.
Also shows possible warning for non native muxers.
parent
e3611943
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
300 additions
and
111 deletions
+300
-111
modules/gui/qt4/Modules.am
modules/gui/qt4/Modules.am
+1
-0
modules/gui/qt4/components/sout/profile_selector.cpp
modules/gui/qt4/components/sout/profile_selector.cpp
+74
-14
modules/gui/qt4/components/sout/profile_selector.hpp
modules/gui/qt4/components/sout/profile_selector.hpp
+6
-0
modules/gui/qt4/pixmaps/valid.png
modules/gui/qt4/pixmaps/valid.png
+0
-0
modules/gui/qt4/ui/profiles.ui
modules/gui/qt4/ui/profiles.ui
+194
-97
modules/gui/qt4/util/customwidgets.cpp
modules/gui/qt4/util/customwidgets.cpp
+15
-0
modules/gui/qt4/util/customwidgets.hpp
modules/gui/qt4/util/customwidgets.hpp
+9
-0
modules/gui/qt4/vlc.qrc
modules/gui/qt4/vlc.qrc
+1
-0
No files found.
modules/gui/qt4/Modules.am
View file @
cec03a34
...
...
@@ -210,6 +210,7 @@ DEPS_res = \
pixmaps/win7/win7thumbnail_next.png \
pixmaps/win7/win7thumbnail_play.png \
pixmaps/update.png \
pixmaps/valid.png \
pixmaps/search_clear.png \
pixmaps/lock.png
...
...
modules/gui/qt4/components/sout/profile_selector.cpp
View file @
cec03a34
...
...
@@ -34,6 +34,7 @@
#include <QRadioButton>
#include <assert.h>
#include <vlc_modules.h>
VLCProfileSelector
::
VLCProfileSelector
(
QWidget
*
_parent
)
:
QWidget
(
_parent
)
{
...
...
@@ -239,6 +240,7 @@ VLCProfileEditor::VLCProfileEditor( const QString& qs_name, const QString& value
ui
.
profileLine
->
setText
(
qs_name
);
ui
.
profileLine
->
setReadOnly
(
true
);
}
loadCapabilities
();
registerCodecs
();
CONNECT
(
ui
.
transcodeVideo
,
toggled
(
bool
),
this
,
setVTranscodeOptions
(
bool
)
);
...
...
@@ -259,24 +261,50 @@ VLCProfileEditor::VLCProfileEditor( const QString& qs_name, const QString& value
BUTTONACT
(
cancelButton
,
reject
()
);
fillProfile
(
value
);
muxSelected
();
}
void
VLCProfileEditor
::
loadCapabilities
()
{
size_t
count
;
module_t
**
p_all
=
module_list_get
(
&
count
);
module_t
*
p_module
;
/* Parse the module list for capabilities and probe each of them */
for
(
size_t
i
=
0
;
(
p_module
=
p_all
[
i
])
!=
NULL
;
i
++
)
{
if
(
module_provides
(
p_module
,
"sout mux"
)
)
caps
[
"muxers"
].
insert
(
module_get_object
(
p_module
)
);
// else if ( module_provides( p_module, "encoder" ) )
// caps["encoders"].insert( module_get_object( p_module ) );
}
module_list_free
(
p_all
);
}
inline
void
VLCProfileEditor
::
registerCodecs
()
{
#define SETMUX( button, val ) ui.button->setProperty( "sout", val );
SETMUX
(
PSMux
,
"ps"
)
SETMUX
(
TSMux
,
"ts"
)
SETMUX
(
WEBMux
,
"webm"
)
SETMUX
(
MPEG1Mux
,
"mpeg1"
)
SETMUX
(
OggMux
,
"ogg"
)
SETMUX
(
ASFMux
,
"asf"
)
SETMUX
(
MOVMux
,
"mp4"
)
SETMUX
(
WAVMux
,
"wav"
)
SETMUX
(
RAWMux
,
"raw"
)
SETMUX
(
FLVMux
,
"flv"
)
SETMUX
(
MKVMux
,
"mkv"
)
SETMUX
(
AVIMux
,
"avi"
)
SETMUX
(
MJPEGMux
,
"mpjpeg"
)
#define SETMUX( button, val, vid, aud, men, sub, stream, chaps ) \
ui.button->setProperty( "sout", val );\
ui.button->setProperty( "capvideo", vid );\
ui.button->setProperty( "capaudio", aud );\
ui.button->setProperty( "capmenu", men );\
ui.button->setProperty( "capsubs", sub );\
ui.button->setProperty( "capstream", stream );\
ui.button->setProperty( "capchaps", chaps );\
CONNECT( ui.button, clicked(bool), this, muxSelected() );
SETMUX
(
PSMux
,
"ps"
,
true
,
true
,
false
,
true
,
false
,
true
)
SETMUX
(
TSMux
,
"ts"
,
true
,
true
,
false
,
true
,
true
,
false
)
SETMUX
(
WEBMux
,
"webm"
,
true
,
true
,
false
,
false
,
true
,
false
)
SETMUX
(
MPEG1Mux
,
"mpeg1"
,
true
,
true
,
false
,
false
,
false
,
false
)
SETMUX
(
OggMux
,
"ogg"
,
true
,
true
,
false
,
false
,
true
,
true
)
SETMUX
(
ASFMux
,
"asf"
,
true
,
true
,
false
,
true
,
true
,
true
)
SETMUX
(
MOVMux
,
"mp4"
,
true
,
true
,
true
,
true
,
true
,
false
)
SETMUX
(
WAVMux
,
"wav"
,
false
,
true
,
false
,
false
,
false
,
false
)
SETMUX
(
RAWMux
,
"raw"
,
true
,
true
,
false
,
false
,
false
,
false
)
SETMUX
(
FLVMux
,
"flv"
,
true
,
true
,
false
,
false
,
true
,
false
)
SETMUX
(
MKVMux
,
"mkv"
,
true
,
true
,
true
,
true
,
true
,
true
)
SETMUX
(
AVIMux
,
"avi"
,
true
,
true
,
false
,
false
,
false
,
false
)
SETMUX
(
MJPEGMux
,
"mpjpeg"
,
true
,
false
,
false
,
false
,
false
,
false
)
#undef SETMUX
#define ADD_VCODEC( name, fourcc ) ui.vCodecBox->addItem( name, QVariant( fourcc ) );
...
...
@@ -334,6 +362,38 @@ inline void VLCProfileEditor::registerCodecs()
#undef ADD_SCODEC
}
void
VLCProfileEditor
::
muxSelected
()
{
#define SETYESNOSTATE( name, prop ) \
ui.name->setChecked( current->property( prop ).toBool() )
for
(
int
i
=
0
;
i
<
ui
.
muxer
->
layout
()
->
count
();
i
++
)
{
QRadioButton
*
current
=
qobject_cast
<
QRadioButton
*>
(
ui
.
muxer
->
layout
()
->
itemAt
(
i
)
->
widget
());
if
(
unlikely
(
!
current
)
)
continue
;
if
(
!
current
->
isChecked
()
)
continue
;
/* dumb :/ */
SETYESNOSTATE
(
capvideo
,
"capvideo"
);
SETYESNOSTATE
(
capaudio
,
"capaudio"
);
SETYESNOSTATE
(
capmenu
,
"capmenu"
);
SETYESNOSTATE
(
capsubs
,
"capsubs"
);
SETYESNOSTATE
(
capstream
,
"capstream"
);
SETYESNOSTATE
(
capchaps
,
"capchaps"
);
bool
b
=
caps
[
"muxers"
].
contains
(
"mux_"
+
current
->
property
(
"sout"
).
toString
()
);
if
(
b
)
ui
.
muxerwarning
->
setText
(
QString
(
"<img src=
\"
:/menu/info
\"
/> %1"
)
.
arg
(
qtr
(
"This muxer is not provided directly by VLC: It could be missing."
)
)
);
else
ui
.
muxerwarning
->
setText
(
""
);
return
;
}
#undef SETYESNOSTATE
}
void
VLCProfileEditor
::
fillProfile
(
const
QString
&
qs
)
{
QStringList
options
=
qs
.
split
(
";"
);
...
...
modules/gui/qt4/components/sout/profile_selector.hpp
View file @
cec03a34
...
...
@@ -27,6 +27,8 @@
#include "qt4.hpp"
#include <QWidget>
#include <QSet>
#include <QHash>
#include "util/qvlcframe.hpp"
#include "ui/profiles.h"
...
...
@@ -70,12 +72,16 @@ public:
private:
void
registerCodecs
();
void
fillProfile
(
const
QString
&
qs
);
typedef
QSet
<
QString
>
resultset
;
QHash
<
QString
,
resultset
>
caps
;
void
loadCapabilities
();
protected
slots
:
virtual
void
close
();
private
slots
:
void
setVTranscodeOptions
(
bool
);
void
setATranscodeOptions
(
bool
);
void
setSTranscodeOptions
(
bool
);
void
muxSelected
();
};
#endif
modules/gui/qt4/pixmaps/valid.png
0 → 100644
View file @
cec03a34
593 Bytes
modules/gui/qt4/ui/profiles.ui
View file @
cec03a34
This diff is collapsed.
Click to expand it.
modules/gui/qt4/util/customwidgets.cpp
View file @
cec03a34
...
...
@@ -401,3 +401,18 @@ void QToolButtonExt::clickedSlot()
else
if
(
shortClick
)
emit
shortClicked
();
}
YesNoCheckBox
::
YesNoCheckBox
(
QWidget
*
parent
)
:
QCheckBox
(
parent
)
{
setEnabled
(
false
);
setStyleSheet
(
"\
QCheckBox::indicator:unchecked:hover,\
QCheckBox::indicator:unchecked {\
image: url(:/menu/quit);\
}\
QCheckBox::indicator:checked:hover,\
QCheckBox::indicator:checked {\
image: url(:/valid);\
}\
"
);
}
modules/gui/qt4/util/customwidgets.hpp
View file @
cec03a34
...
...
@@ -32,12 +32,14 @@
#include <QLabel>
#include <QStackedWidget>
#include <QSpinBox>
#include <QCheckBox>
#include <QList>
#include <QTimer>
#include <QToolButton>
#include <QAbstractAnimation>
class
QPixmap
;
class
QWidget
;
class
QFramelessButton
:
public
QPushButton
{
...
...
@@ -149,6 +151,13 @@ private:
PixmapAnimator
*
animator
;
};
class
YesNoCheckBox
:
public
QCheckBox
{
Q_OBJECT
public:
YesNoCheckBox
(
QWidget
*
parent
);
};
/* VLC Key/Wheel hotkeys interactions */
class
QKeyEvent
;
...
...
modules/gui/qt4/vlc.qrc
View file @
cec03a34
...
...
@@ -99,6 +99,7 @@
<file alias="lock">pixmaps/lock.png</file>
<file alias="search_clear">pixmaps/search_clear.png</file>
<file alias="dropzone">pixmaps/playlist/dropzone.png</file>
<file alias="valid">pixmaps/valid.png</file>
</qresource>
<qresource prefix="/prefsmenu">
<file alias="cone_audio_64">pixmaps/prefs/spref_cone_Audio_64.png</file>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment