Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
d66e6c3c
Commit
d66e6c3c
authored
Nov 04, 2007
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt4 - SPrefs, save the access-filter.
parent
bddd76b0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
114 additions
and
39 deletions
+114
-39
modules/gui/qt4/components/simple_preferences.cpp
modules/gui/qt4/components/simple_preferences.cpp
+43
-18
modules/gui/qt4/components/simple_preferences.hpp
modules/gui/qt4/components/simple_preferences.hpp
+1
-0
modules/gui/qt4/ui/sprefs_input.ui
modules/gui/qt4/ui/sprefs_input.ui
+70
-21
No files found.
modules/gui/qt4/components/simple_preferences.cpp
View file @
d66e6c3c
...
...
@@ -227,7 +227,7 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
updateAudioOptions
(
int
)
);
audioOutput
=
ui
.
outputModule
;
//
FIXME
: use modules_Exists
//
TODO
: use modules_Exists
#ifndef WIN32
CONFIG_GENERIC
(
"alsadev"
,
StringList
,
ui
.
alsaLabel
,
alsaDevice
);
CONFIG_GENERIC_FILE
(
"dspdev"
,
File
,
ui
.
OSSLabel
,
OSSDevice
,
...
...
@@ -305,23 +305,30 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
delete
psz_vcddiscpath
;
}
CONFIG_GENERIC_NO_BOOL
(
"server-port"
,
Integer
,
NULL
,
UDPPort
);
CONFIG_GENERIC
(
"http-proxy"
,
String
,
NULL
,
proxy
);
CONFIG_GENERIC_NO_BOOL
(
"server-port"
,
Integer
,
NULL
,
UDPPort
);
CONFIG_GENERIC
(
"http-proxy"
,
String
,
NULL
,
proxy
);
/* Caching */
/* CONFIG_GENERIC( );*/
//FIXME
CONFIG_GENERIC_NO_BOOL
(
"ffmpeg-pp-q"
,
Integer
,
NULL
,
PostProcLevel
);
CONFIG_GENERIC
(
"avi-index"
,
IntegerList
,
NULL
,
AviRepair
);
CONFIG_GENERIC
(
"rtsp-tcp"
,
Bool
,
NULL
,
RTSP_TCPBox
);
CONFIG_GENERIC_NO_BOOL
(
"ffmpeg-pp-q"
,
Integer
,
NULL
,
PostProcLevel
);
CONFIG_GENERIC
(
"avi-index"
,
IntegerList
,
NULL
,
AviRepair
);
CONFIG_GENERIC
(
"rtsp-tcp"
,
Bool
,
NULL
,
RTSP_TCPBox
);
#ifdef WIN32
CONFIG_GENERIC
(
"prefer-system-codecs"
,
Bool
,
NULL
,
systemCodecBox
);
CONFIG_GENERIC
(
"prefer-system-codecs"
,
Bool
,
NULL
,
systemCodecBox
);
#else
ui
.
systemCodecBox
->
hide
();
#endif
CONFIG_GENERIC
(
"timeshift-force"
,
Bool
,
NULL
,
timeshiftBox
);
CONFIG_GENERIC
(
"dump-force"
,
Bool
,
NULL
,
DumpBox
);
// CONFIG_GENERIC( "", Bool, NULL, RecordBox ); //FIXME activate record
ui
.
systemCodecBox
->
hide
();
#endif
/* Access Filters */
qs_filter
=
qfu
(
config_GetPsz
(
p_intf
,
"access-filter"
)
);
ui
.
timeshiftBox
->
setChecked
(
qs_filter
.
contains
(
"timeshift"
)
);
ui
.
dumpBox
->
setChecked
(
qs_filter
.
contains
(
"dump"
)
);
ui
.
recordBox
->
setChecked
(
qs_filter
.
contains
(
"record"
)
);
ui
.
bandwidthBox
->
setChecked
(
qs_filter
.
contains
(
"bandwidth"
)
);
timeshiftBox
=
ui
.
timeshiftBox
;
recordBox
=
ui
.
recordBox
;
dumpBox
=
ui
.
dumpBox
;
bandwidthBox
=
ui
.
bandwidthBox
;
END_SPREFS_CAT
;
/* Interface Panel */
...
...
@@ -348,6 +355,7 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
}
skinInterfaceButton
=
ui
.
skins
;
qtInterfaceButton
=
ui
.
qt4
;
delete
psz_intf
;
CONFIG_GENERIC
(
"qt-always-video"
,
Bool
,
NULL
,
qtAlwaysVideo
);
CONFIG_GENERIC_FILE
(
"skins2-last"
,
File
,
NULL
,
fileSkin
,
...
...
@@ -416,7 +424,7 @@ void SPrefsPanel::updateAudioOptions( int number)
void
SPrefsPanel
::
apply
()
{
msg_Dbg
(
p_intf
,
"Trying to save the %i simple panel"
,
number
);
/* Generic save for ever panel */
QList
<
ConfigControl
*>::
Iterator
i
;
for
(
i
=
controls
.
begin
()
;
i
!=
controls
.
end
()
;
i
++
)
...
...
@@ -435,8 +443,24 @@ void SPrefsPanel::apply()
config_PutPsz
(
p_intf
,
"vcd"
,
psz_devicepath
);
config_PutPsz
(
p_intf
,
"cd-audio"
,
psz_devicepath
);
}
}
bool
b_first
=
true
;
#define saveBox( name, box ) {\
if( box->isChecked() ) { \
if( b_first ) { \
qs_filter.append( name ); \
b_first = false; \
} \
else qs_filter.append( ":" ).append( name ); \
} }
saveBox
(
"record"
,
recordBox
);
saveBox
(
"dump"
,
dumpBox
);
saveBox
(
"timeshift"
,
timeshiftBox
);
saveBox
(
"bandwidth"
,
bandwidthBox
);
config_PutPsz
(
p_intf
,
"access-filter"
,
qtu
(
qs_filter
)
);
}
/* Interfaces */
if
(
number
==
SPrefsInterface
)
{
...
...
@@ -445,7 +469,7 @@ void SPrefsPanel::apply()
if
(
qtInterfaceButton
->
isChecked
()
)
config_PutPsz
(
p_intf
,
"intf"
,
"qt4"
);
}
if
(
number
==
SPrefsAudio
)
{
bool
b_normChecked
=
normalizerBox
->
isChecked
();
...
...
@@ -458,7 +482,8 @@ void SPrefsPanel::apply()
{
if
(
qs_filter
.
contains
(
"volnorm"
)
)
{
/* The qs_filter not empty and contains "volnorm" that we have to remove */
/* The qs_filter not empty and contains "volnorm"
that we have to remove */
if
(
!
b_normChecked
)
{
/* Ugly :D */
...
...
@@ -467,7 +492,7 @@ void SPrefsPanel::apply()
qs_filter
.
remove
(
"volnorm"
);
}
}
else
/* qs_filter not empty, but doesn't have volnorm inside
already
*/
else
/* qs_filter not empty, but doesn't have volnorm inside */
if
(
b_normChecked
)
qs_filter
.
append
(
":volnorm"
);
}
config_PutPsz
(
p_intf
,
"audio-filter"
,
qtu
(
qs_filter
)
);
...
...
modules/gui/qt4/components/simple_preferences.hpp
View file @
d66e6c3c
...
...
@@ -85,6 +85,7 @@ private:
QRadioButton
*
qtInterfaceButton
;
QString
qs_filter
;
QCheckBox
*
normalizerBox
;
QCheckBox
*
recordBox
,
*
dumpBox
,
*
bandwidthBox
,
*
timeshiftBox
;
/* Display only the options for the selected audio output */
private
slots
:
...
...
modules/gui/qt4/ui/sprefs_input.ui
View file @
d66e6c3c
...
...
@@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>
422
</width>
<width>
508
</width>
<height>478</height>
</rect>
</property>
...
...
@@ -14,12 +14,21 @@
<string>Form</string>
</property>
<layout class="QVBoxLayout" >
<property name="margin" >
<number>9</number>
</property>
<property name="spacing" >
<number>10</number>
</property>
<property name="leftMargin" >
<number>9</number>
</property>
<property name="topMargin" >
<number>9</number>
</property>
<property name="rightMargin" >
<number>9</number>
</property>
<property name="bottomMargin" >
<number>9</number>
</property>
<item>
<widget class="QGroupBox" name="groupBox" >
<property name="title" >
...
...
@@ -52,10 +61,22 @@
<string>_("Network")</string>
</property>
<layout class="QGridLayout" >
<property name="
m
argin" >
<property name="
leftM
argin" >
<number>9</number>
</property>
<property name="spacing" >
<property name="topMargin" >
<number>9</number>
</property>
<property name="rightMargin" >
<number>9</number>
</property>
<property name="bottomMargin" >
<number>9</number>
</property>
<property name="horizontalSpacing" >
<number>6</number>
</property>
<property name="verticalSpacing" >
<number>6</number>
</property>
<item row="2" column="0" colspan="2" >
...
...
@@ -93,12 +114,12 @@
<property name="alignment" >
<set>Qt::AlignRight</set>
</property>
<property name="maximum" >
<number>65535</number>
</property>
<property name="minimum" >
<number>1</number>
</property>
<property name="maximum" >
<number>65535</number>
</property>
<property name="value" >
<number>1234</number>
</property>
...
...
@@ -120,10 +141,22 @@
<string>_("Codecs / Muxers")</string>
</property>
<layout class="QGridLayout" >
<property name="
m
argin" >
<property name="
leftM
argin" >
<number>9</number>
</property>
<property name="spacing" >
<property name="topMargin" >
<number>9</number>
</property>
<property name="rightMargin" >
<number>9</number>
</property>
<property name="bottomMargin" >
<number>9</number>
</property>
<property name="horizontalSpacing" >
<number>6</number>
</property>
<property name="verticalSpacing" >
<number>6</number>
</property>
<item row="0" column="0" >
...
...
@@ -138,12 +171,12 @@
<property name="alignment" >
<set>Qt::AlignRight</set>
</property>
<property name="maximum" >
<number>65535</number>
</property>
<property name="minimum" >
<number>1</number>
</property>
<property name="maximum" >
<number>65535</number>
</property>
<property name="value" >
<number>6</number>
</property>
...
...
@@ -182,12 +215,21 @@
<string>_("Access Filter")</string>
</property>
<layout class="QHBoxLayout" >
<property name="margin" >
<number>9</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<property name="leftMargin" >
<number>9</number>
</property>
<property name="topMargin" >
<number>9</number>
</property>
<property name="rightMargin" >
<number>9</number>
</property>
<property name="bottomMargin" >
<number>9</number>
</property>
<item>
<widget class="QCheckBox" name="timeshiftBox" >
<property name="text" >
...
...
@@ -196,19 +238,26 @@
</widget>
</item>
<item>
<widget class="QCheckBox" name="
R
ecordBox" >
<widget class="QCheckBox" name="
r
ecordBox" >
<property name="text" >
<string>_("Record")</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="
D
umpBox" >
<widget class="QCheckBox" name="
d
umpBox" >
<property name="text" >
<string>_("Dump")</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="bandwidthBox" >
<property name="text" >
<string>_("Bandwidth limiter")</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
...
...
@@ -225,8 +274,8 @@
<tabstop>RTSP_TCPBox</tabstop>
<tabstop>systemCodecBox</tabstop>
<tabstop>timeshiftBox</tabstop>
<tabstop>
R
ecordBox</tabstop>
<tabstop>
D
umpBox</tabstop>
<tabstop>
r
ecordBox</tabstop>
<tabstop>
d
umpBox</tabstop>
</tabstops>
<resources/>
<connections/>
...
...
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