Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
fccf6aa0
Commit
fccf6aa0
authored
Sep 05, 2008
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use intf-change-vout to properly detect vout (close #1992 and #1950)
parent
d6e99cf9
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
45 additions
and
5 deletions
+45
-5
modules/gui/qt4/components/interface_widgets.cpp
modules/gui/qt4/components/interface_widgets.cpp
+3
-2
modules/gui/qt4/components/interface_widgets.hpp
modules/gui/qt4/components/interface_widgets.hpp
+1
-1
modules/gui/qt4/input_manager.cpp
modules/gui/qt4/input_manager.cpp
+37
-2
modules/gui/qt4/input_manager.hpp
modules/gui/qt4/input_manager.hpp
+4
-0
No files found.
modules/gui/qt4/components/interface_widgets.cpp
View file @
fccf6aa0
...
...
@@ -673,6 +673,9 @@ ControlsWidget::ControlsWidget( intf_thread_t *_p_i,
/*
* Other first Line buttons
*/
/* */
CONNECT
(
THEMIM
->
getIM
(),
voutChanged
(
bool
),
this
,
enableVideo
(
bool
)
);
/** Fullscreen/Visualisation **/
fullscreenButton
=
new
QPushButton
;
BUTTON_SET_ACT_I
(
fullscreenButton
,
""
,
fullscreen
,
...
...
@@ -911,7 +914,6 @@ void ControlsWidget::updateInput()
{
/* Activate the interface buttons according to the presence of the input */
enableInput
(
THEMIM
->
getIM
()
->
hasInput
()
);
enableVideo
(
THEMIM
->
getIM
()
->
hasVideo
()
&&
THEMIM
->
getIM
()
->
hasInput
()
);
}
void
ControlsWidget
::
setStatus
(
int
status
)
...
...
@@ -995,7 +997,6 @@ void ControlsWidget::toggleAdvanced()
emit
advancedControlsToggled
(
b_advancedVisible
);
}
/**********************************************************************
* Fullscrenn control widget
**********************************************************************/
...
...
modules/gui/qt4/components/interface_widgets.hpp
View file @
fccf6aa0
...
...
@@ -174,7 +174,6 @@ public:
QPushButton
*
playlistButton
;
void
setStatus
(
int
);
void
enableInput
(
bool
);
void
enableVideo
(
bool
);
public
slots
:
void
setNavigation
(
int
);
protected:
...
...
@@ -216,6 +215,7 @@ protected slots:
void
toggleTeletext
();
void
toggleTeletextTransparency
();
void
enableTeletext
(
bool
);
void
enableVideo
(
bool
);
signals:
void
advancedControlsToggled
(
bool
);
};
...
...
modules/gui/qt4/input_manager.cpp
View file @
fccf6aa0
...
...
@@ -42,6 +42,8 @@ static int PLItemChanged( vlc_object_t *, const char *,
vlc_value_t
,
vlc_value_t
,
void
*
);
static
int
InterfaceChanged
(
vlc_object_t
*
,
const
char
*
,
vlc_value_t
,
vlc_value_t
,
void
*
);
static
int
InterfaceVoutChanged
(
vlc_object_t
*
,
const
char
*
,
vlc_value_t
,
vlc_value_t
,
void
*
);
static
int
ItemStateChanged
(
vlc_object_t
*
,
const
char
*
,
vlc_value_t
,
vlc_value_t
,
void
*
);
static
int
ItemRateChanged
(
vlc_object_t
*
,
const
char
*
,
...
...
@@ -91,6 +93,7 @@ void InputManager::setInput( input_thread_t *_p_input )
UpdateSPU
();
UpdateTeletext
();
UpdateNavigation
();
UpdateVout
();
addCallbacks
();
i_input_id
=
input_GetItem
(
p_input
)
->
i_id
;
}
...
...
@@ -119,6 +122,7 @@ void InputManager::delInput()
emit
nameChanged
(
""
);
emit
artChanged
(
NULL
);
emit
rateChanged
(
INPUT_RATE_DEFAULT
);
emit
voutChanged
(
false
);
vlc_object_release
(
p_input
);
p_input
=
NULL
;
UpdateSPU
();
...
...
@@ -152,6 +156,8 @@ void InputManager::addCallbacks()
var_AddCallback
(
p_input
,
"title"
,
ItemTitleChanged
,
this
);
/* src/input/input.c:734 for timers update*/
var_AddCallback
(
p_input
,
"intf-change"
,
InterfaceChanged
,
this
);
/* src/input/input.c for vout creation/destruction */
var_AddCallback
(
p_input
,
"intf-change-vout"
,
InterfaceVoutChanged
,
this
);
}
/* Delete the callbacks on Input. Self explanatory */
...
...
@@ -164,6 +170,7 @@ void InputManager::delCallbacks()
var_DelCallback
(
p_input
,
"rate-change"
,
ItemRateChanged
,
this
);
var_DelCallback
(
p_input
,
"title"
,
ItemTitleChanged
,
this
);
var_DelCallback
(
p_input
,
"intf-change"
,
InterfaceChanged
,
this
);
var_DelCallback
(
p_input
,
"intf-change-vout"
,
InterfaceVoutChanged
,
this
);
}
/* Convert the event from the callbacks in actions */
...
...
@@ -178,7 +185,8 @@ void InputManager::customEvent( QEvent *event )
type
!=
ItemTitleChanged_Type
&&
type
!=
ItemSpuChanged_Type
&&
type
!=
ItemTeletextChanged_Type
&&
type
!=
ItemStateChanged_Type
)
type
!=
ItemStateChanged_Type
&&
type
!=
InterfaceVoutUpdate_Type
)
return
;
if
(
type
==
ItemStateChanged_Type
)
...
...
@@ -193,7 +201,8 @@ void InputManager::customEvent( QEvent *event )
type
!=
ItemRateChanged_Type
&&
type
!=
ItemSpuChanged_Type
&&
type
!=
ItemTeletextChanged_Type
&&
type
!=
ItemStateChanged_Type
type
!=
ItemStateChanged_Type
&&
type
!=
InterfaceVoutUpdate_Type
)
&&
(
i_input_id
!=
ple
->
i_id
)
)
return
;
...
...
@@ -230,6 +239,9 @@ void InputManager::customEvent( QEvent *event )
case
ItemTeletextChanged_Type
:
UpdateTeletext
();
break
;
case
InterfaceVoutUpdate_Type
:
UpdateVout
();
break
;
}
}
...
...
@@ -363,6 +375,18 @@ void InputManager::UpdateTeletext()
telexToggle
(
false
);
}
void
InputManager
::
UpdateVout
()
{
if
(
hasInput
()
)
{
vlc_object_t
*
p_vout
=
(
vlc_object_t
*
)
vlc_object_find
(
p_input
,
VLC_OBJECT_VOUT
,
FIND_CHILD
);
bool
b_vout
=
p_vout
!=
NULL
;
if
(
p_vout
)
vlc_object_release
(
p_vout
);
emit
voutChanged
(
b_vout
);
}
}
void
InputManager
::
UpdateArt
()
{
/* Update Art meta */
...
...
@@ -692,6 +716,7 @@ bool MainInputManager::teletextState()
static
int
InterfaceChanged
(
vlc_object_t
*
p_this
,
const
char
*
psz_var
,
vlc_value_t
oldval
,
vlc_value_t
newval
,
void
*
param
)
{
/* FIXME remove that static variable */
static
int
counter
=
0
;
InputManager
*
im
=
(
InputManager
*
)
param
;
...
...
@@ -703,6 +728,16 @@ static int InterfaceChanged( vlc_object_t *p_this, const char *psz_var,
return
VLC_SUCCESS
;
}
static
int
InterfaceVoutChanged
(
vlc_object_t
*
p_this
,
const
char
*
psz_var
,
vlc_value_t
oldval
,
vlc_value_t
newval
,
void
*
param
)
{
InputManager
*
im
=
(
InputManager
*
)
param
;
IMEvent
*
event
=
new
IMEvent
(
InterfaceVoutUpdate_Type
,
0
);
QApplication
::
postEvent
(
im
,
static_cast
<
QEvent
*>
(
event
)
);
return
VLC_SUCCESS
;
}
static
int
ItemStateChanged
(
vlc_object_t
*
p_this
,
const
char
*
psz_var
,
vlc_value_t
oldval
,
vlc_value_t
newval
,
void
*
param
)
{
...
...
modules/gui/qt4/input_manager.hpp
View file @
fccf6aa0
...
...
@@ -44,6 +44,7 @@ static int const ItemRateChanged_Type = QEvent::User + IMEventType + 5;
static
int
const
VolumeChanged_Type
=
QEvent
::
User
+
IMEventType
+
6
;
static
int
const
ItemSpuChanged_Type
=
QEvent
::
User
+
IMEventType
+
7
;
static
int
const
ItemTeletextChanged_Type
=
QEvent
::
User
+
IMEventType
+
8
;
static
int
const
InterfaceVoutUpdate_Type
=
QEvent
::
User
+
IMEventType
+
9
;
static
int
const
FullscreenControlToggle_Type
=
QEvent
::
User
+
IMEventType
+
10
;
static
int
const
FullscreenControlShow_Type
=
QEvent
::
User
+
IMEventType
+
11
;
...
...
@@ -95,6 +96,7 @@ private:
void
UpdateSPU
();
void
UpdateTeletext
();
void
UpdateArt
();
void
UpdateVout
();
public
slots
:
void
setInput
(
input_thread_t
*
);
///< Our controlled input changed
...
...
@@ -129,6 +131,8 @@ signals:
void
setNewTelexPage
(
int
);
/// Advanced buttons
void
advControlsSetIcon
();
/// Vout
void
voutChanged
(
bool
);
};
class
MainInputManager
:
public
QObject
...
...
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