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
56e6a84d
Commit
56e6a84d
authored
Dec 19, 2007
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt4 - Open Capture. Only build what you do have. :D
parent
a654574f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
90 additions
and
62 deletions
+90
-62
modules/gui/qt4/components/open_panels.cpp
modules/gui/qt4/components/open_panels.cpp
+82
-57
modules/gui/qt4/components/open_panels.hpp
modules/gui/qt4/components/open_panels.hpp
+8
-5
No files found.
modules/gui/qt4/components/open_panels.cpp
View file @
56e6a84d
...
@@ -533,9 +533,11 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
...
@@ -533,9 +533,11 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
#define CuMRL( widget, slot ) CONNECT( widget , slot , this, updateMRL() );
#define CuMRL( widget, slot ) CONNECT( widget , slot , this, updateMRL() );
#ifndef WIN32
/*******
/*******
* V4L *
* V4L *
*******/
*******/
if
(
module_Exists
(
p_intf
,
"v4l"
)
){
addModuleAndLayouts
(
V4L_DEVICE
,
v4l
,
"Video for Linux"
);
addModuleAndLayouts
(
V4L_DEVICE
,
v4l
,
"Video for Linux"
);
/* V4l Main panel */
/* V4l Main panel */
...
@@ -575,10 +577,12 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
...
@@ -575,10 +577,12 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
CuMRL
(
v4lAudioDevice
,
textChanged
(
QString
)
);
CuMRL
(
v4lAudioDevice
,
textChanged
(
QString
)
);
CuMRL
(
v4lFreq
,
valueChanged
(
int
)
);
CuMRL
(
v4lFreq
,
valueChanged
(
int
)
);
CuMRL
(
v4lNormBox
,
currentIndexChanged
(
int
)
);
CuMRL
(
v4lNormBox
,
currentIndexChanged
(
int
)
);
}
/*******
/*******
* V4L2*
* V4L2*
*******/
*******/
if
(
module_Exists
(
p_intf
,
"v4l2"
)
){
addModuleAndLayouts
(
V4L2_DEVICE
,
v4l2
,
"Video for Linux 2"
);
addModuleAndLayouts
(
V4L2_DEVICE
,
v4l2
,
"Video for Linux 2"
);
/* V4l Main panel */
/* V4l Main panel */
...
@@ -608,10 +612,12 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
...
@@ -608,10 +612,12 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
CuMRL
(
v4l2VideoDevice
,
textChanged
(
QString
)
);
CuMRL
(
v4l2VideoDevice
,
textChanged
(
QString
)
);
CuMRL
(
v4l2AudioDevice
,
textChanged
(
QString
)
);
CuMRL
(
v4l2AudioDevice
,
textChanged
(
QString
)
);
CuMRL
(
v4l2StdBox
,
currentIndexChanged
(
int
)
);
CuMRL
(
v4l2StdBox
,
currentIndexChanged
(
int
)
);
}
/*******
/*******
* JACK *
* JACK *
*******/
*******/
if
(
module_Exists
(
p_intf
,
"access_jack"
)
){
addModuleAndLayouts
(
JACK_DEVICE
,
jack
,
"JACK Audio Connection Kit"
);
addModuleAndLayouts
(
JACK_DEVICE
,
jack
,
"JACK Audio Connection Kit"
);
/* Jack Main panel */
/* Jack Main panel */
...
@@ -660,10 +666,12 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
...
@@ -660,10 +666,12 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
CuMRL
(
jackPace
,
stateChanged
(
int
)
);
CuMRL
(
jackPace
,
stateChanged
(
int
)
);
CuMRL
(
jackConnect
,
stateChanged
(
int
)
);
CuMRL
(
jackConnect
,
stateChanged
(
int
)
);
CuMRL
(
jackPortsSelected
,
textChanged
(
QString
)
);
CuMRL
(
jackPortsSelected
,
textChanged
(
QString
)
);
}
/************
/************
* PVR *
* PVR *
************/
************/
if
(
module_Exists
(
p_intf
,
"pvr"
)
){
addModuleAndLayouts
(
PVR_DEVICE
,
pvr
,
"PVR"
);
addModuleAndLayouts
(
PVR_DEVICE
,
pvr
,
"PVR"
);
/* PVR Main panel */
/* PVR Main panel */
...
@@ -714,10 +722,73 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
...
@@ -714,10 +722,73 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
CuMRL
(
pvrFreq
,
valueChanged
(
int
)
);
CuMRL
(
pvrFreq
,
valueChanged
(
int
)
);
CuMRL
(
pvrBitr
,
valueChanged
(
int
)
);
CuMRL
(
pvrBitr
,
valueChanged
(
int
)
);
CuMRL
(
pvrNormBox
,
currentIndexChanged
(
int
)
);
CuMRL
(
pvrNormBox
,
currentIndexChanged
(
int
)
);
}
/**************
* DVB Stuffs *
**************/
if
(
module_Exists
(
p_intf
,
"dvb"
)
){
addModuleAndLayouts
(
DVB_DEVICE
,
dvb
,
"DVB"
);
/* DVB Main */
QLabel
*
dvbDeviceLabel
=
new
QLabel
(
qtr
(
"Adapter card to tune"
)
);
QLabel
*
dvbTypeLabel
=
new
QLabel
(
qtr
(
"DVB Type:"
)
);
dvbCard
=
new
QSpinBox
;
dvbCard
->
setAlignment
(
Qt
::
AlignRight
);
dvbCard
->
setPrefix
(
"/dev/dvb/adapter"
);
dvbDevLayout
->
addWidget
(
dvbDeviceLabel
,
0
,
0
);
dvbDevLayout
->
addWidget
(
dvbCard
,
0
,
2
,
1
,
2
);
dvbs
=
new
QRadioButton
(
"DVB-S"
);
dvbs
->
setChecked
(
true
);
dvbc
=
new
QRadioButton
(
"DVB-C"
);
dvbt
=
new
QRadioButton
(
"DVB-T"
);
dvbDevLayout
->
addWidget
(
dvbTypeLabel
,
1
,
0
);
dvbDevLayout
->
addWidget
(
dvbs
,
1
,
1
);
dvbDevLayout
->
addWidget
(
dvbc
,
1
,
2
);
dvbDevLayout
->
addWidget
(
dvbt
,
1
,
3
);
/* DVB Props panel */
QLabel
*
dvbFreqLabel
=
new
QLabel
(
qtr
(
"Transponder/multiplex frequency"
)
);
dvbPropLayout
->
addWidget
(
dvbFreqLabel
,
0
,
0
);
dvbFreq
=
new
QSpinBox
;
dvbFreq
->
setAlignment
(
Qt
::
AlignRight
);
dvbFreq
->
setSuffix
(
" kHz"
);
setSpinBoxFreq
(
dvbFreq
);
dvbPropLayout
->
addWidget
(
dvbFreq
,
0
,
1
);
QLabel
*
dvbSrateLabel
=
new
QLabel
(
qtr
(
"Transponder symbol rate"
)
);
dvbPropLayout
->
addWidget
(
dvbSrateLabel
,
1
,
0
);
dvbSrate
=
new
QSpinBox
;
dvbSrate
->
setAlignment
(
Qt
::
AlignRight
);
dvbSrate
->
setSuffix
(
" kHz"
);
setSpinBoxFreq
(
dvbSrate
);
dvbPropLayout
->
addWidget
(
dvbSrate
,
1
,
1
);
dvbPropLayout
->
addItem
(
new
QSpacerItem
(
20
,
20
,
QSizePolicy
::
Expanding
),
2
,
0
,
2
,
1
);
/* DVB CONNECTs */
CuMRL
(
dvbCard
,
valueChanged
(
int
)
);
CuMRL
(
dvbFreq
,
valueChanged
(
int
)
);
CuMRL
(
dvbSrate
,
valueChanged
(
int
)
);
BUTTONACT
(
dvbs
,
updateButtons
()
);
BUTTONACT
(
dvbt
,
updateButtons
()
);
BUTTONACT
(
dvbc
,
updateButtons
()
);
}
#else
/*!WIN32 */
/*********************
/*********************
* DirectShow Stuffs *
* DirectShow Stuffs *
*********************/
*********************/
if
(
module_Exists
(
p_intf
,
"DirectShow"
)
){
addModuleAndLayouts
(
DSHOW_DEVICE
,
dshow
,
"DirectShow"
);
addModuleAndLayouts
(
DSHOW_DEVICE
,
dshow
,
"DirectShow"
);
/* dshow Main */
/* dshow Main */
...
@@ -760,10 +831,12 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
...
@@ -760,10 +831,12 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
CuMRL
(
dshowVDevice
,
currentIndexChanged
(
int
)
);
CuMRL
(
dshowVDevice
,
currentIndexChanged
(
int
)
);
CuMRL
(
dshowADevice
,
currentIndexChanged
(
int
)
);
CuMRL
(
dshowADevice
,
currentIndexChanged
(
int
)
);
CuMRL
(
dshowVSizeLine
,
textChanged
(
QString
)
);
CuMRL
(
dshowVSizeLine
,
textChanged
(
QString
)
);
}
/**************
/**************
* BDA Stuffs *
* BDA Stuffs *
**************/
**************/
if
(
module_Exists
(
p_intf
,
"bda"
)
){
addModuleAndLayouts
(
BDA_DEVICE
,
bda
,
"DVB DirectShow"
);
addModuleAndLayouts
(
BDA_DEVICE
,
bda
,
"DVB DirectShow"
);
/* bda Main */
/* bda Main */
...
@@ -822,63 +895,9 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
...
@@ -822,63 +895,9 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
BUTTONACT
(
bdas
,
updateMRL
()
);
BUTTONACT
(
bdas
,
updateMRL
()
);
BUTTONACT
(
bdat
,
updateMRL
()
);
BUTTONACT
(
bdat
,
updateMRL
()
);
BUTTONACT
(
bdac
,
updateMRL
()
);
BUTTONACT
(
bdac
,
updateMRL
()
);
}
#endif
/**************
* DVB Stuffs *
**************/
addModuleAndLayouts
(
DVB_DEVICE
,
dvb
,
"DVB"
);
/* DVB Main */
QLabel
*
dvbDeviceLabel
=
new
QLabel
(
qtr
(
"Adapter card to tune"
)
);
QLabel
*
dvbTypeLabel
=
new
QLabel
(
qtr
(
"DVB Type:"
)
);
dvbCard
=
new
QSpinBox
;
dvbCard
->
setAlignment
(
Qt
::
AlignRight
);
dvbCard
->
setPrefix
(
"/dev/dvb/adapter"
);
dvbDevLayout
->
addWidget
(
dvbDeviceLabel
,
0
,
0
);
dvbDevLayout
->
addWidget
(
dvbCard
,
0
,
2
,
1
,
2
);
dvbs
=
new
QRadioButton
(
"DVB-S"
);
dvbs
->
setChecked
(
true
);
dvbc
=
new
QRadioButton
(
"DVB-C"
);
dvbt
=
new
QRadioButton
(
"DVB-T"
);
dvbDevLayout
->
addWidget
(
dvbTypeLabel
,
1
,
0
);
dvbDevLayout
->
addWidget
(
dvbs
,
1
,
1
);
dvbDevLayout
->
addWidget
(
dvbc
,
1
,
2
);
dvbDevLayout
->
addWidget
(
dvbt
,
1
,
3
);
/* DVB Props panel */
QLabel
*
dvbFreqLabel
=
new
QLabel
(
qtr
(
"Transponder/multiplex frequency"
)
);
dvbPropLayout
->
addWidget
(
dvbFreqLabel
,
0
,
0
);
dvbFreq
=
new
QSpinBox
;
dvbFreq
->
setAlignment
(
Qt
::
AlignRight
);
dvbFreq
->
setSuffix
(
" kHz"
);
setSpinBoxFreq
(
dvbFreq
);
dvbPropLayout
->
addWidget
(
dvbFreq
,
0
,
1
);
QLabel
*
dvbSrateLabel
=
new
QLabel
(
qtr
(
"Transponder symbol rate"
)
);
dvbPropLayout
->
addWidget
(
dvbSrateLabel
,
1
,
0
);
dvbSrate
=
new
QSpinBox
;
dvbSrate
->
setAlignment
(
Qt
::
AlignRight
);
dvbSrate
->
setSuffix
(
" kHz"
);
setSpinBoxFreq
(
dvbSrate
);
dvbPropLayout
->
addWidget
(
dvbSrate
,
1
,
1
);
dvbPropLayout
->
addItem
(
new
QSpacerItem
(
20
,
20
,
QSizePolicy
::
Expanding
),
2
,
0
,
2
,
1
);
/* DVB CONNECTs */
CuMRL
(
dvbCard
,
valueChanged
(
int
)
);
CuMRL
(
dvbFreq
,
valueChanged
(
int
)
);
CuMRL
(
dvbSrate
,
valueChanged
(
int
)
);
BUTTONACT
(
dvbs
,
updateButtons
()
);
BUTTONACT
(
dvbt
,
updateButtons
()
);
BUTTONACT
(
dvbc
,
updateButtons
()
);
/**********
/**********
* Screen *
* Screen *
...
@@ -913,6 +932,7 @@ void CaptureOpenPanel::updateMRL()
...
@@ -913,6 +932,7 @@ void CaptureOpenPanel::updateMRL()
ui
.
deviceCombo
->
currentIndex
()
).
toInt
();
ui
.
deviceCombo
->
currentIndex
()
).
toInt
();
switch
(
i_devicetype
)
switch
(
i_devicetype
)
{
{
#ifndef WIN32
case
V4L_DEVICE
:
case
V4L_DEVICE
:
mrl
=
"v4l://"
;
mrl
=
"v4l://"
;
mrl
+=
" :v4l-vdev="
+
v4lVideoDevice
->
text
();
mrl
+=
" :v4l-vdev="
+
v4lVideoDevice
->
text
();
...
@@ -956,6 +976,7 @@ void CaptureOpenPanel::updateMRL()
...
@@ -956,6 +976,7 @@ void CaptureOpenPanel::updateMRL()
mrl
+=
" :dvb-frequency="
+
QString
(
"%1"
).
arg
(
dvbFreq
->
value
()
);
mrl
+=
" :dvb-frequency="
+
QString
(
"%1"
).
arg
(
dvbFreq
->
value
()
);
mrl
+=
" :dvb-srate="
+
QString
(
"%1"
).
arg
(
dvbSrate
->
value
()
);
mrl
+=
" :dvb-srate="
+
QString
(
"%1"
).
arg
(
dvbSrate
->
value
()
);
break
;
break
;
#else
case
BDA_DEVICE
:
case
BDA_DEVICE
:
if
(
bdas
->
isChecked
()
)
mrl
=
"dvb-s://"
;
if
(
bdas
->
isChecked
()
)
mrl
=
"dvb-s://"
;
else
if
(
bdat
->
isChecked
()
)
mrl
=
"dvb-t://"
;
else
if
(
bdat
->
isChecked
()
)
mrl
=
"dvb-t://"
;
...
@@ -971,6 +992,7 @@ void CaptureOpenPanel::updateMRL()
...
@@ -971,6 +992,7 @@ void CaptureOpenPanel::updateMRL()
break
;
break
;
case
DSHOW_DEVICE
:
case
DSHOW_DEVICE
:
break
;
break
;
#endif
case
SCREEN_DEVICE
:
case
SCREEN_DEVICE
:
mrl
=
"screen://"
;
mrl
=
"screen://"
;
updateButtons
();
updateButtons
();
...
@@ -995,10 +1017,12 @@ void CaptureOpenPanel::updateButtons()
...
@@ -995,10 +1017,12 @@ void CaptureOpenPanel::updateButtons()
msg_Dbg
(
p_intf
,
"Capture Type: %i"
,
i_devicetype
);
msg_Dbg
(
p_intf
,
"Capture Type: %i"
,
i_devicetype
);
switch
(
i_devicetype
)
switch
(
i_devicetype
)
{
{
#ifndef WIN32
case
DVB_DEVICE
:
case
DVB_DEVICE
:
if
(
dvbs
->
isChecked
()
)
dvbFreq
->
setSuffix
(
" kHz"
);
if
(
dvbs
->
isChecked
()
)
dvbFreq
->
setSuffix
(
" kHz"
);
if
(
dvbc
->
isChecked
()
||
dvbt
->
isChecked
()
)
dvbFreq
->
setSuffix
(
" Hz"
);
if
(
dvbc
->
isChecked
()
||
dvbt
->
isChecked
()
)
dvbFreq
->
setSuffix
(
" Hz"
);
break
;
break
;
#else
case
BDA_DEVICE
:
case
BDA_DEVICE
:
if
(
bdas
->
isChecked
()
||
bdac
->
isChecked
()
)
if
(
bdas
->
isChecked
()
||
bdac
->
isChecked
()
)
{
{
...
@@ -1015,6 +1039,7 @@ void CaptureOpenPanel::updateButtons()
...
@@ -1015,6 +1039,7 @@ void CaptureOpenPanel::updateButtons()
bdaBandLabel
->
show
();
bdaBandLabel
->
show
();
}
}
break
;
break
;
#endif
case
SCREEN_DEVICE
:
case
SCREEN_DEVICE
:
ui
.
optionsBox
->
hide
();
ui
.
optionsBox
->
hide
();
ui
.
advancedButton
->
hide
();
ui
.
advancedButton
->
hide
();
...
...
modules/gui/qt4/components/open_panels.hpp
View file @
56e6a84d
...
@@ -155,20 +155,23 @@ public:
...
@@ -155,20 +155,23 @@ public:
virtual
void
clear
()
;
virtual
void
clear
()
;
private:
private:
Ui
::
OpenCapture
ui
;
Ui
::
OpenCapture
ui
;
QRadioButton
*
dvbs
,
*
dvbt
,
*
dvbc
;
#ifdef WIN32
QRadioButton
*
bdas
,
*
bdat
,
*
bdac
;
QRadioButton
*
bdas
,
*
bdat
,
*
bdac
;
QSpinBox
*
bdaCard
,
*
bdaFreq
,
*
bdaSrate
;
QLabel
*
bdaSrateLabel
,
*
bdaBandLabel
;
QComboBox
*
bdaBandBox
;
#else
QRadioButton
*
dvbs
,
*
dvbt
,
*
dvbc
;
QSpinBox
*
v4lFreq
,
*
pvrFreq
,
*
pvrBitr
;
QSpinBox
*
v4lFreq
,
*
pvrFreq
,
*
pvrBitr
;
QLineEdit
*
v4lVideoDevice
,
*
v4lAudioDevice
;
QLineEdit
*
v4lVideoDevice
,
*
v4lAudioDevice
;
QLineEdit
*
v4l2VideoDevice
,
*
v4l2AudioDevice
;
QLineEdit
*
v4l2VideoDevice
,
*
v4l2AudioDevice
;
QLineEdit
*
pvrDevice
,
*
pvrRadioDevice
;
QLineEdit
*
pvrDevice
,
*
pvrRadioDevice
;
QComboBox
*
v4lNormBox
,
*
v4l2StdBox
,
*
pvrNormBox
,
*
bdaBandBox
;
QComboBox
*
v4lNormBox
,
*
v4l2StdBox
,
*
pvrNormBox
;
QSpinBox
*
dvbCard
,
*
dvbFreq
,
*
dvbSrate
;
QSpinBox
*
dvbCard
,
*
dvbFreq
,
*
dvbSrate
;
QSpinBox
*
bdaCard
,
*
bdaFreq
,
*
bdaSrate
;
QSpinBox
*
jackChannels
,
*
jackCaching
;
QSpinBox
*
jackChannels
,
*
jackCaching
;
QCheckBox
*
jackPace
,
*
jackConnect
;
QCheckBox
*
jackPace
,
*
jackConnect
;
QLineEdit
*
jackPortsSelected
;
QLineEdit
*
jackPortsSelected
;
#endif
QLabel
*
bdaSrateLabel
,
*
bdaBandLabel
;
public
slots
:
public
slots
:
virtual
void
updateMRL
();
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