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
e3611943
Commit
e3611943
authored
Sep 17, 2012
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: profile_selector: Bind data to muxers
parent
970a1b94
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
30 deletions
+38
-30
modules/gui/qt4/components/sout/profile_selector.cpp
modules/gui/qt4/components/sout/profile_selector.cpp
+38
-30
No files found.
modules/gui/qt4/components/sout/profile_selector.cpp
View file @
e3611943
...
...
@@ -31,6 +31,7 @@
#include <QComboBox>
#include <QLabel>
#include <QMessageBox>
#include <QRadioButton>
#include <assert.h>
...
...
@@ -262,6 +263,21 @@ VLCProfileEditor::VLCProfileEditor( const QString& qs_name, const QString& value
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"
)
#undef SETMUX
#define ADD_VCODEC( name, fourcc ) ui.vCodecBox->addItem( name, QVariant( fourcc ) );
ADD_VCODEC
(
"MPEG-1"
,
"mp1v"
)
...
...
@@ -325,21 +341,17 @@ void VLCProfileEditor::fillProfile( const QString& qs )
return
;
const
QString
mux
=
options
[
0
];
#define CHECKMUX( button, text) if( text == mux ) ui.button->setChecked( true ); else
CHECKMUX
(
PSMux
,
"ps"
)
CHECKMUX
(
TSMux
,
"ts"
)
CHECKMUX
(
WEBMux
,
"webm"
)
CHECKMUX
(
MPEG1Mux
,
"mpeg1"
)
CHECKMUX
(
OggMux
,
"ogg"
)
CHECKMUX
(
ASFMux
,
"asf"
)
CHECKMUX
(
MOVMux
,
"mp4"
)
CHECKMUX
(
WAVMux
,
"wav"
)
CHECKMUX
(
RAWMux
,
"raw"
)
CHECKMUX
(
FLVMux
,
"flv"
)
CHECKMUX
(
MKVMux
,
"mkv"
)
CHECKMUX
(
AVIMux
,
"avi"
)
CHECKMUX
(
MJPEGMux
,
"mpjpeg"
){}
#undef CHECKMUX
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
;
/* someone is messing up with ui */
if
(
current
->
property
(
"sout"
).
toString
()
==
mux
)
{
current
->
setChecked
(
true
);
break
;
/* radios are exclusive */
}
}
ui
.
keepVideo
->
setChecked
(
!
options
[
1
].
toInt
()
);
ui
.
transcodeVideo
->
setChecked
(
(
options
[
4
]
!=
"none"
)
);
...
...
@@ -421,21 +433,17 @@ void VLCProfileEditor::close()
QString
VLCProfileEditor
::
transcodeValue
()
{
#define SMUX( x, txt ) if( ui.x->isChecked() ) muxValue = txt; else
SMUX
(
PSMux
,
"ps"
)
SMUX
(
TSMux
,
"ts"
)
SMUX
(
WEBMux
,
"webm"
)
SMUX
(
MPEG1Mux
,
"mpeg1"
)
SMUX
(
OggMux
,
"ogg"
)
SMUX
(
ASFMux
,
"asf"
)
SMUX
(
MOVMux
,
"mp4"
)
SMUX
(
WAVMux
,
"wav"
)
SMUX
(
RAWMux
,
"raw"
)
SMUX
(
FLVMux
,
"flv"
)
SMUX
(
MKVMux
,
"mkv"
)
SMUX
(
AVIMux
,
"avi"
)
SMUX
(
MJPEGMux
,
"mpjpeg"
){}
#undef SMUX
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
;
/* someone is messing up with ui */
if
(
current
->
isChecked
()
)
{
muxValue
=
current
->
property
(
"sout"
).
toString
();
break
;
/* radios are exclusive */
}
}
#define currentData( box ) box->itemData( box->currentIndex() )
QString
qs_acodec
,
qs_vcodec
;
...
...
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