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
666c5ea2
Commit
666c5ea2
authored
May 21, 2007
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt4 - Open Dialog: BDA basic support.
parent
889362b5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
93 additions
and
12 deletions
+93
-12
modules/gui/qt4/components/open.cpp
modules/gui/qt4/components/open.cpp
+88
-10
modules/gui/qt4/components/open.hpp
modules/gui/qt4/components/open.hpp
+5
-2
No files found.
modules/gui/qt4/components/open.cpp
View file @
666c5ea2
...
...
@@ -467,13 +467,13 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
#define addModuleAndLayouts( number, name, label ) \
QWidget * name ## DevPage = new QWidget( this ); \
QWidget * name ## PropPage = new QWidget( this ); \
stackedDevLayout->
insertWidget( number,
name ## DevPage ); \
stackedPropLayout->
insertWidget( number,
name ## PropPage ); \
stackedDevLayout->
addWidget(
name ## DevPage ); \
stackedPropLayout->
addWidget(
name ## PropPage ); \
QGridLayout * name ## DevLayout = new QGridLayout; \
QGridLayout * name ## PropLayout = new QGridLayout; \
name ## DevPage->setLayout( name ## DevLayout ); \
name ## PropPage->setLayout( name ## PropLayout ); \
ui.deviceCombo->
insertItem( number, qtr( label
) );
ui.deviceCombo->
addItem( qtr( label ), QVariant( number
) );
#define CuMRL( widget, slot ) CONNECT( widget , slot , this, updateMRL() );
...
...
@@ -575,7 +575,54 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
/**************
* BDA Stuffs *
**************/
addModuleAndLayouts
(
BDA_DEVICE
,
bda
,
"DVB / BDA"
);
addModuleAndLayouts
(
BDA_DEVICE
,
bda
,
"DVB DirectShow"
);
/* bda Main */
QLabel
*
bdaDeviceLabel
=
new
QLabel
(
qtr
(
"Adapter card to tune"
)
);
QLabel
*
bdaTypeLabel
=
new
QLabel
(
qtr
(
"DVB Type:"
)
);
bdaCard
=
new
QSpinBox
;
bdaCard
->
setAlignment
(
Qt
::
AlignRight
);
bdaDevLayout
->
addWidget
(
bdaDeviceLabel
,
0
,
0
);
bdaDevLayout
->
addWidget
(
bdaCard
,
0
,
2
,
1
,
2
);
bdas
=
new
QRadioButton
(
"DVB-S"
);
bdas
->
setChecked
(
true
);
bdac
=
new
QRadioButton
(
"DVB-C"
);
bdat
=
new
QRadioButton
(
"DVB-T"
);
bdaDevLayout
->
addWidget
(
bdaTypeLabel
,
1
,
0
);
bdaDevLayout
->
addWidget
(
bdas
,
1
,
1
);
bdaDevLayout
->
addWidget
(
bdac
,
1
,
2
);
bdaDevLayout
->
addWidget
(
bdat
,
1
,
3
);
/* bda Props */
QLabel
*
bdaFreqLabel
=
new
QLabel
(
qtr
(
"Transponder/multiplex frequency"
)
);
bdaFreq
=
new
QSpinBox
;
bdaFreq
->
setAlignment
(
Qt
::
AlignRight
);
bdaFreq
->
setSuffix
(
" kHz"
);
bdaPropLayout
->
addWidget
(
bdaFreqLabel
,
0
,
0
);
bdaPropLayout
->
addWidget
(
bdaFreq
,
0
,
1
);
bdaSrateLabel
=
new
QLabel
(
qtr
(
"Transponder symbol rate"
)
);
bdaSrate
=
new
QSpinBox
;
bdaSrate
->
setAlignment
(
Qt
::
AlignRight
);
bdaSrate
->
setSuffix
(
" kHz"
);
bdaPropLayout
->
addWidget
(
bdaSrateLabel
,
1
,
0
);
bdaPropLayout
->
addWidget
(
bdaSrate
,
1
,
1
);
/* bda CONNECTs */
CuMRL
(
bdaCard
,
valueChanged
(
int
)
);
CuMRL
(
bdaFreq
,
valueChanged
(
int
)
);
CuMRL
(
bdaSrate
,
valueChanged
(
int
)
);
BUTTONACT
(
bdas
,
updateButtons
()
);
BUTTONACT
(
bdat
,
updateButtons
()
);
BUTTONACT
(
bdac
,
updateButtons
()
);
BUTTONACT
(
bdas
,
updateMRL
()
);
BUTTONACT
(
bdat
,
updateMRL
()
);
BUTTONACT
(
bdac
,
updateMRL
()
);
/**************
* DVB Stuffs *
...
...
@@ -584,7 +631,7 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
/* DVB Main */
QLabel
*
dvbDeviceLabel
=
new
QLabel
(
qtr
(
"Adapter card to tune"
)
);
QLabel
*
dvbTy
ep
Label
=
new
QLabel
(
qtr
(
"DVB Type:"
)
);
QLabel
*
dvbTy
pe
Label
=
new
QLabel
(
qtr
(
"DVB Type:"
)
);
dvbCard
=
new
QSpinBox
;
dvbCard
->
setAlignment
(
Qt
::
AlignRight
);
...
...
@@ -598,7 +645,7 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
dvbc
=
new
QRadioButton
(
"DVB-C"
);
dvbt
=
new
QRadioButton
(
"DVB-T"
);
dvbDevLayout
->
addWidget
(
dvbTy
ep
Label
,
1
,
0
);
dvbDevLayout
->
addWidget
(
dvbTy
pe
Label
,
1
,
0
);
dvbDevLayout
->
addWidget
(
dvbs
,
1
,
1
);
dvbDevLayout
->
addWidget
(
dvbc
,
1
,
2
);
dvbDevLayout
->
addWidget
(
dvbt
,
1
,
3
);
...
...
@@ -646,7 +693,9 @@ void CaptureOpenPanel::clear()
void
CaptureOpenPanel
::
updateMRL
()
{
QString
mrl
=
""
;
int
i_devicetype
=
ui
.
deviceCombo
->
currentIndex
();
int
i_devicetype
=
ui
.
deviceCombo
->
itemData
(
ui
.
deviceCombo
->
currentIndex
()
).
toInt
();
msg_Dbg
(
p_intf
,
"Capture Type: %i"
,
i_devicetype
);
switch
(
i_devicetype
)
{
case
V4L_DEVICE
:
...
...
@@ -673,8 +722,15 @@ void CaptureOpenPanel::updateMRL()
mrl
+=
" :dvb-srate="
+
QString
(
"%1"
).
arg
(
dvbSrate
->
value
()
);
break
;
case
BDA_DEVICE
:
if
(
bdas
->
isChecked
()
)
mrl
=
"dvb-s://"
;
else
if
(
bdat
->
isChecked
()
)
mrl
=
"dvb-t://"
;
else
if
(
bdac
->
isChecked
()
)
mrl
=
"dvb-c://"
;
else
return
;
mrl
+=
" :dvb-adapter="
+
QString
(
"%1"
).
arg
(
bdaCard
->
value
()
);
mrl
+=
" :dvb-frequency="
+
QString
(
"%1"
).
arg
(
bdaFreq
->
value
()
);
mrl
+=
" :dvb-srate="
+
QString
(
"%1"
).
arg
(
bdaSrate
->
value
()
);
break
;
case
DSHOW_DEVICE
:
case
DSHOW_DEVICE
:
break
;
}
...
...
@@ -683,6 +739,28 @@ void CaptureOpenPanel::updateMRL()
void
CaptureOpenPanel
::
updateButtons
()
{
if
(
dvbs
->
isChecked
()
)
dvbFreq
->
setSuffix
(
" kHz"
);
if
(
dvbc
->
isChecked
()
||
dvbt
->
isChecked
()
)
dvbFreq
->
setSuffix
(
" Hz"
);
int
i_devicetype
=
ui
.
deviceCombo
->
itemData
(
ui
.
deviceCombo
->
currentIndex
()
).
toInt
();
msg_Dbg
(
p_intf
,
"Capture Type: %i"
,
i_devicetype
);
switch
(
i_devicetype
)
{
case
DVB_DEVICE
:
if
(
dvbs
->
isChecked
()
)
dvbFreq
->
setSuffix
(
" kHz"
);
if
(
dvbc
->
isChecked
()
||
dvbt
->
isChecked
()
)
dvbFreq
->
setSuffix
(
" Hz"
);
break
;
case
BDA_DEVICE
:
if
(
bdas
->
isChecked
()
)
bdaFreq
->
setSuffix
(
" kHz"
);
if
(
bdac
->
isChecked
()
||
bdat
->
isChecked
()
)
bdaFreq
->
setSuffix
(
" Hz"
);
if
(
bdas
->
isChecked
()
||
bdac
->
isChecked
()
)
{
bdaSrate
->
hide
();
bdaSrateLabel
->
hide
();
}
else
{
bdaSrate
->
show
();
bdaSrateLabel
->
show
();
}
break
;
}
}
modules/gui/qt4/components/open.hpp
View file @
666c5ea2
...
...
@@ -38,8 +38,8 @@
#define V4L_DEVICE 0x0
#define PVR_DEVICE 0x1
#define DVB_DEVICE 0x2
#define BDA_DEVICE 0x
3
#define DSHOW_DEVICE 0x
4
#define BDA_DEVICE 0x
4
#define DSHOW_DEVICE 0x
8
class
QLineEdit
;
...
...
@@ -135,12 +135,15 @@ public:
private:
Ui
::
OpenCapture
ui
;
QRadioButton
*
dvbs
,
*
dvbt
,
*
dvbc
;
QRadioButton
*
bdas
,
*
bdat
,
*
bdac
;
QSpinBox
*
v4lFreq
,
*
pvrFreq
,
*
pvrBitr
;
QLineEdit
*
v4lVideoDevice
,
*
v4lAudioDevice
;
QLineEdit
*
pvrDevice
,
*
pvrRadioDevice
;
QComboBox
*
v4lNormBox
,
*
pvrNormBox
;
QSpinBox
*
dvbCard
,
*
dvbFreq
,
*
dvbSrate
;
QSpinBox
*
bdaCard
,
*
bdaFreq
,
*
bdaSrate
;
QLabel
*
bdaSrateLabel
;
public
slots
:
virtual
void
updateMRL
();
...
...
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