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
1ce4f166
Commit
1ce4f166
authored
Sep 29, 2010
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: CaptureOpenPanel: check and prefill with usual devices
parent
2a100fcd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
8 deletions
+36
-8
modules/gui/qt4/components/open_panels.cpp
modules/gui/qt4/components/open_panels.cpp
+35
-7
modules/gui/qt4/components/open_panels.hpp
modules/gui/qt4/components/open_panels.hpp
+1
-1
No files found.
modules/gui/qt4/components/open_panels.cpp
View file @
1ce4f166
...
@@ -50,7 +50,6 @@
...
@@ -50,7 +50,6 @@
#include <QStringListModel>
#include <QStringListModel>
#include <QDropEvent>
#include <QDropEvent>
#define I_DEVICE_TOOLTIP \
#define I_DEVICE_TOOLTIP \
I_DIR_OR_FOLDER( N_("Select a device or a VIDEO_TS directory"), \
I_DIR_OR_FOLDER( N_("Select a device or a VIDEO_TS directory"), \
N_("Select a device or a VIDEO_TS folder") )
N_("Select a device or a VIDEO_TS folder") )
...
@@ -797,17 +796,43 @@ void CaptureOpenPanel::initialize()
...
@@ -797,17 +796,43 @@ void CaptureOpenPanel::initialize()
if
(
module_exists
(
"v4l2"
)
){
if
(
module_exists
(
"v4l2"
)
){
addModuleAndLayouts
(
V4L2_DEVICE
,
v4l2
,
"Video for Linux 2"
,
QGridLayout
);
addModuleAndLayouts
(
V4L2_DEVICE
,
v4l2
,
"Video for Linux 2"
,
QGridLayout
);
char
const
*
const
ppsz_v4lvdevices
[]
=
{
"video*"
};
char
const
*
const
ppsz_v4ladevices
[]
=
{
"dsp*"
,
"radio*"
};
#define POPULATE_WITH_DEVS(ppsz_devlist, targetCombo) \
QStringList targetCombo ## StringList = QStringList(); \
for ( int i = 0; i< sizeof(ppsz_devlist) / sizeof(*ppsz_devlist); i++ ) \
targetCombo ## StringList << QString( ppsz_devlist[ i ] ); \
QDir targetCombo ## Dir = QDir( "/dev/" ); \
targetCombo->addItems( \
targetCombo ## Dir\
.entryList( targetCombo ## StringList, QDir::System )\
.replaceInStrings( QRegExp("^"), "/dev/" ) \
);
/* V4l Main panel */
/* V4l Main panel */
QLabel
*
v4l2VideoDeviceLabel
=
new
QLabel
(
qtr
(
"Video device name"
)
);
QLabel
*
v4l2VideoDeviceLabel
=
new
QLabel
(
qtr
(
"Video device name"
)
);
v4l2DevLayout
->
addWidget
(
v4l2VideoDeviceLabel
,
0
,
0
);
v4l2DevLayout
->
addWidget
(
v4l2VideoDeviceLabel
,
0
,
0
);
v4l2VideoDevice
=
new
QLineEdit
;
v4l2VideoDevice
=
new
QComboBox
(
this
);
v4l2VideoDevice
->
setEditable
(
true
);
POPULATE_WITH_DEVS
(
ppsz_v4lvdevices
,
v4l2VideoDevice
);
v4l2VideoDevice
->
clearEditText
();
v4l2DevLayout
->
addWidget
(
v4l2VideoDevice
,
0
,
1
);
v4l2DevLayout
->
addWidget
(
v4l2VideoDevice
,
0
,
1
);
QLabel
*
v4l2AudioDeviceLabel
=
new
QLabel
(
qtr
(
"Audio device name"
)
);
QLabel
*
v4l2AudioDeviceLabel
=
new
QLabel
(
qtr
(
"Audio device name"
)
);
v4l2DevLayout
->
addWidget
(
v4l2AudioDeviceLabel
,
1
,
0
);
v4l2DevLayout
->
addWidget
(
v4l2AudioDeviceLabel
,
1
,
0
);
v4l2AudioDevice
=
new
QLineEdit
;
v4l2AudioDevice
=
new
QComboBox
(
this
);
v4l2AudioDevice
->
setEditable
(
true
);
POPULATE_WITH_DEVS
(
ppsz_v4ladevices
,
v4l2AudioDevice
);
v4l2AudioDevice
->
clearEditText
();
v4l2DevLayout
->
addWidget
(
v4l2AudioDevice
,
1
,
1
);
v4l2DevLayout
->
addWidget
(
v4l2AudioDevice
,
1
,
1
);
/* v4l2 Props panel */
/* v4l2 Props panel */
...
@@ -821,9 +846,12 @@ void CaptureOpenPanel::initialize()
...
@@ -821,9 +846,12 @@ void CaptureOpenPanel::initialize()
1
,
0
,
3
,
1
);
1
,
0
,
3
,
1
);
/* v4l2 CONNECTs */
/* v4l2 CONNECTs */
CuMRL
(
v4l2VideoDevice
,
textChanged
(
const
QString
&
)
);
CuMRL
(
v4l2VideoDevice
->
lineEdit
(),
textChanged
(
const
QString
&
)
);
CuMRL
(
v4l2AudioDevice
,
textChanged
(
const
QString
&
)
);
CuMRL
(
v4l2VideoDevice
,
currentIndexChanged
(
int
)
);
CuMRL
(
v4l2AudioDevice
->
lineEdit
(),
textChanged
(
const
QString
&
)
);
CuMRL
(
v4l2AudioDevice
,
currentIndexChanged
(
int
)
);
CuMRL
(
v4l2StdBox
,
currentIndexChanged
(
int
)
);
CuMRL
(
v4l2StdBox
,
currentIndexChanged
(
int
)
);
#undef POPULATE_WITH_DEVS
}
}
/*******
/*******
...
@@ -1159,8 +1187,8 @@ void CaptureOpenPanel::updateMRL()
...
@@ -1159,8 +1187,8 @@ void CaptureOpenPanel::updateMRL()
mrl
+=
" :v4l-frequency="
+
QString
::
number
(
v4lFreq
->
value
()
);
mrl
+=
" :v4l-frequency="
+
QString
::
number
(
v4lFreq
->
value
()
);
break
;
break
;
case
V4L2_DEVICE
:
case
V4L2_DEVICE
:
fileList
<<
"v4l2://"
+
v4l2VideoDevice
->
t
ext
();
fileList
<<
"v4l2://"
+
v4l2VideoDevice
->
currentT
ext
();
mrl
+=
" :input-slave=alsa://"
+
v4l2AudioDevice
->
t
ext
();
mrl
+=
" :input-slave=alsa://"
+
v4l2AudioDevice
->
currentT
ext
();
mrl
+=
" :v4l2-standard="
+
QString
::
number
(
v4l2StdBox
->
currentIndex
()
);
mrl
+=
" :v4l2-standard="
+
QString
::
number
(
v4l2StdBox
->
currentIndex
()
);
break
;
break
;
case
JACK_DEVICE
:
case
JACK_DEVICE
:
...
...
modules/gui/qt4/components/open_panels.hpp
View file @
1ce4f166
...
@@ -211,7 +211,7 @@ private:
...
@@ -211,7 +211,7 @@ private:
QLabel
*
dvbBandLabel
,
*
dvbSrateLabel
;
QLabel
*
dvbBandLabel
,
*
dvbSrateLabel
;
QSpinBox
*
v4lFreq
,
*
pvrFreq
,
*
pvrBitr
;
QSpinBox
*
v4lFreq
,
*
pvrFreq
,
*
pvrBitr
;
QLineEdit
*
v4lVideoDevice
,
*
v4lAudioDevice
;
QLineEdit
*
v4lVideoDevice
,
*
v4lAudioDevice
;
Q
LineEdit
*
v4l2VideoDevice
,
*
v4l2AudioDevice
;
Q
ComboBox
*
v4l2VideoDevice
,
*
v4l2AudioDevice
;
QLineEdit
*
pvrDevice
,
*
pvrRadioDevice
;
QLineEdit
*
pvrDevice
,
*
pvrRadioDevice
;
QComboBox
*
v4lNormBox
,
*
v4l2StdBox
,
*
pvrNormBox
,
*
dvbBandBox
;
QComboBox
*
v4lNormBox
,
*
v4l2StdBox
,
*
pvrNormBox
,
*
dvbBandBox
;
QSpinBox
*
dvbCard
,
*
dvbFreq
,
*
dvbSrate
;
QSpinBox
*
dvbCard
,
*
dvbFreq
,
*
dvbSrate
;
...
...
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