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
02032094
Commit
02032094
authored
Dec 08, 2007
by
Antoine Cellerier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes to the v4l2 extended panel (works fine for multiple refreshes).
parent
9538c177
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
19 deletions
+35
-19
modules/gui/qt4/components/extended_panels.cpp
modules/gui/qt4/components/extended_panels.cpp
+25
-16
modules/gui/qt4/components/extended_panels.hpp
modules/gui/qt4/components/extended_panels.hpp
+2
-2
modules/gui/qt4/ui/v4l2.ui
modules/gui/qt4/ui/v4l2.ui
+8
-1
No files found.
modules/gui/qt4/components/extended_panels.cpp
View file @
02032094
...
...
@@ -568,23 +568,25 @@ ExtV4l2::ExtV4l2( intf_thread_t *_p_intf, QWidget *_parent )
BUTTONACT
(
ui
.
refresh
,
Refresh
()
);
layout
=
new
QVBoxLayout
;
ui
.
vboxLayout
->
addLayout
(
layout
);
help
=
new
QLabel
(
qtr
(
"No v4l2 instance found. Press the refresh button to try again."
)
);
layout
->
addWidget
(
help
);
box
=
NULL
;
}
ExtV4l2
::~
ExtV4l2
()
{
delete
help
;
delete
layout
;
if
(
box
)
delete
box
;
}
void
ExtV4l2
::
Refresh
(
void
)
{
vlc_object_t
*
p_obj
=
(
vlc_object_t
*
)
vlc_object_find_name
(
p_intf
,
"v4l2"
,
FIND_ANYWHERE
);
help
->
hide
();
ui
.
help
->
hide
();
if
(
box
)
{
ui
.
vboxLayout
->
removeWidget
(
box
);
delete
box
;
box
=
NULL
;
}
if
(
p_obj
)
{
msg_Dbg
(
p_intf
,
"Found v4l2 instance"
);
...
...
@@ -593,10 +595,17 @@ void ExtV4l2::Refresh( void )
&
val
,
&
text
);
if
(
i_ret
<
0
)
{
msg_Err
(
p_intf
,
"Oops"
);
msg_Err
(
p_intf
,
"Oops, v4l2 object doesn't have a 'controls' variable."
);
ui
.
help
->
show
();
vlc_object_release
(
p_obj
);
return
;
}
box
=
new
QGroupBox
(
this
);
ui
.
vboxLayout
->
addWidget
(
box
);
QVBoxLayout
*
layout
=
new
QVBoxLayout
(
box
);
box
->
setLayout
(
layout
);
for
(
int
i
=
0
;
i
<
val
.
p_list
->
i_count
;
i
++
)
{
const
char
*
psz_var
=
text
.
p_list
->
p_values
[
i
].
psz_string
;
...
...
@@ -610,13 +619,13 @@ void ExtV4l2::Refresh( void )
{
case
VLC_VAR_INTEGER
:
{
QLabel
*
label
=
new
QLabel
(
psz_label
);
QHBoxLayout
*
hlayout
=
new
QHBoxLayout
;
QLabel
*
label
=
new
QLabel
(
psz_label
,
box
);
QHBoxLayout
*
hlayout
=
new
QHBoxLayout
(
box
)
;
hlayout
->
addWidget
(
label
);
int
i_val
=
var_GetInteger
(
p_obj
,
psz_var
);
if
(
i_type
&
VLC_VAR_HASCHOICE
)
{
QComboBox
*
combobox
=
new
QComboBox
;
QComboBox
*
combobox
=
new
QComboBox
(
box
)
;
combobox
->
setObjectName
(
psz_var
);
vlc_value_t
val2
,
text2
;
...
...
@@ -639,7 +648,7 @@ void ExtV4l2::Refresh( void )
}
else
{
QSlider
*
slider
=
new
QSlider
;
QSlider
*
slider
=
new
QSlider
(
box
)
;
slider
->
setObjectName
(
psz_var
);
slider
->
setOrientation
(
Qt
::
Horizontal
);
vlc_value_t
val2
;
...
...
@@ -663,7 +672,7 @@ void ExtV4l2::Refresh( void )
}
case
VLC_VAR_BOOL
:
{
Q
RadioButton
*
button
=
new
QRadioButton
(
psz_label
);
Q
CheckBox
*
button
=
new
QCheckBox
(
psz_label
,
box
);
button
->
setObjectName
(
psz_var
);
button
->
setChecked
(
var_GetBool
(
p_obj
,
psz_var
)
);
...
...
@@ -674,7 +683,7 @@ void ExtV4l2::Refresh( void )
}
case
VLC_VAR_VOID
:
{
QPushButton
*
button
=
new
QPushButton
(
psz_label
);
QPushButton
*
button
=
new
QPushButton
(
psz_label
,
box
);
button
->
setObjectName
(
psz_var
);
CONNECT
(
button
,
clicked
(
bool
),
this
,
...
...
@@ -694,7 +703,7 @@ void ExtV4l2::Refresh( void )
else
{
msg_Dbg
(
p_intf
,
"Couldn't find v4l2 instance"
);
help
->
show
();
ui
.
help
->
show
();
}
}
...
...
modules/gui/qt4/components/extended_panels.hpp
View file @
02032094
...
...
@@ -5,6 +5,7 @@
* $Id: preferences.hpp 16643 2006-09-13 12:45:46Z zorglub $
*
* Authors: Clément Stenac <zorglub@videolan.org>
* Antoine Cellerier <dionoea at videolan dot org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
...
...
@@ -65,8 +66,7 @@ public:
private:
intf_thread_t
*
p_intf
;
Ui
::
ExtV4l2Widget
ui
;
QVBoxLayout
*
layout
;
QLabel
*
help
;
QGroupBox
*
box
;
private
slots
:
void
Refresh
(
void
);
...
...
modules/gui/qt4/ui/v4l2.ui
View file @
02032094
...
...
@@ -5,7 +5,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>40
0
</width>
<width>40
5
</width>
<height>300</height>
</rect>
</property>
...
...
@@ -20,6 +20,13 @@
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="help" >
<property name="text" >
<string>No v4l2 instance found. Press the refresh button to try again.</string>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
...
...
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