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
a8365c23
Commit
a8365c23
authored
Jan 27, 2008
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix previous commits.
parent
1182a557
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
30 deletions
+35
-30
modules/gui/qt4/input_manager.cpp
modules/gui/qt4/input_manager.cpp
+35
-30
No files found.
modules/gui/qt4/input_manager.cpp
View file @
a8365c23
...
...
@@ -251,11 +251,10 @@ void InputManager::UpdateMeta( void )
{
text
.
sprintf
(
"%s - %s"
,
psz_artist
,
psz_name
);
}
free
(
psz_artist
);
}
else
{
text
.
sprintf
(
"%s"
,
psz_name
);
else
{
text
.
sprintf
(
"%s"
,
psz_name
);
}
free
(
psz_artist
);
}
free
(
psz_name
);
free
(
psz_nowplaying
);
...
...
@@ -405,9 +404,9 @@ MainInputManager::MainInputManager( intf_thread_t *_p_intf ) : QObject(NULL),
p_input
=
NULL
;
im
=
new
InputManager
(
this
,
p_intf
);
var_AddCallback
(
THEPL
,
"playlist-current"
,
ItemChanged
,
this
);
var_AddCallback
(
THEPL
,
"intf-change"
,
ItemChanged
,
this
);
var_AddCallback
(
THEPL
,
"playlist-current"
,
ItemChanged
,
im
);
var_AddCallback
(
THEPL
,
"playlist-current"
,
InputChanged
,
this
);
var_AddCallback
(
THEPL
,
"intf-change"
,
ItemChanged
,
this
);
var_AddCallback
(
THEPL
,
"activity"
,
InputChanged
,
this
);
/* src/input/input.c:2076*/
var_AddCallback
(
THEPL
,
"item-change"
,
ItemChanged
,
this
);
...
...
@@ -436,8 +435,8 @@ MainInputManager::~MainInputManager()
void
MainInputManager
::
customEvent
(
QEvent
*
event
)
{
msg_Dbg
(
p_intf
,
"New Event"
);
int
type
=
event
->
type
();
msg_Dbg
(
p_intf
,
"New MIM Event, type: %i"
,
type
);
if
(
type
!=
ItemChanged_Type
&&
type
!=
VolumeChanged_Type
)
return
;
...
...
@@ -447,6 +446,7 @@ void MainInputManager::customEvent( QEvent *event )
return
;
}
/* Should be ItemChanged */
if
(
VLC_OBJECT_INTF
==
p_intf
->
i_object_type
)
{
vlc_mutex_lock
(
&
p_intf
->
change_lock
);
...
...
@@ -474,7 +474,8 @@ void MainInputManager::customEvent( QEvent *event )
}
vlc_mutex_unlock
(
&
p_intf
->
change_lock
);
}
else
{
else
{
/* we are working as a dialogs provider */
playlist_t
*
p_playlist
=
(
playlist_t
*
)
vlc_object_find
(
p_intf
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
...
...
@@ -512,7 +513,9 @@ void MainInputManager::togglePlayPause()
getIM
()
->
togglePlayPause
();
}
/* Static functions */
/* Static callbacks */
/* IM */
static
int
InterfaceChanged
(
vlc_object_t
*
p_this
,
const
char
*
psz_var
,
vlc_value_t
oldval
,
vlc_value_t
newval
,
void
*
param
)
{
...
...
@@ -557,26 +560,6 @@ static int ItemTitleChanged( vlc_object_t *p_this, const char *psz_var,
return
VLC_SUCCESS
;
}
static
int
InputChanged
(
vlc_object_t
*
p_this
,
const
char
*
psz_var
,
vlc_value_t
oldval
,
vlc_value_t
newval
,
void
*
param
)
{
MainInputManager
*
im
=
(
MainInputManager
*
)
param
;
IMEvent
*
event
=
new
IMEvent
(
ItemChanged_Type
,
newval
.
i_int
);
QApplication
::
postEvent
(
im
,
static_cast
<
QEvent
*>
(
event
)
);
return
VLC_SUCCESS
;
}
static
int
VolumeChanged
(
vlc_object_t
*
p_this
,
const
char
*
psz_var
,
vlc_value_t
oldval
,
vlc_value_t
newval
,
void
*
param
)
{
MainInputManager
*
im
=
(
MainInputManager
*
)
param
;
IMEvent
*
event
=
new
IMEvent
(
VolumeChanged_Type
,
newval
.
i_int
);
QApplication
::
postEvent
(
im
,
static_cast
<
QEvent
*>
(
event
)
);
return
VLC_SUCCESS
;
}
static
int
ItemChanged
(
vlc_object_t
*
p_this
,
const
char
*
psz_var
,
vlc_value_t
oldval
,
vlc_value_t
newval
,
void
*
param
)
{
...
...
@@ -587,6 +570,7 @@ static int ItemChanged( vlc_object_t *p_this, const char *psz_var,
return
VLC_SUCCESS
;
}
static
int
ChangeAudio
(
vlc_object_t
*
p_this
,
const
char
*
var
,
vlc_value_t
o
,
vlc_value_t
n
,
void
*
param
)
{
...
...
@@ -603,3 +587,24 @@ static int ChangeVideo( vlc_object_t *p_this, const char *var, vlc_value_t o,
return
VLC_SUCCESS
;
}
/* MIM */
static
int
InputChanged
(
vlc_object_t
*
p_this
,
const
char
*
psz_var
,
vlc_value_t
oldval
,
vlc_value_t
newval
,
void
*
param
)
{
MainInputManager
*
im
=
(
MainInputManager
*
)
param
;
IMEvent
*
event
=
new
IMEvent
(
ItemChanged_Type
,
newval
.
i_int
);
QApplication
::
postEvent
(
im
,
static_cast
<
QEvent
*>
(
event
)
);
return
VLC_SUCCESS
;
}
static
int
VolumeChanged
(
vlc_object_t
*
p_this
,
const
char
*
psz_var
,
vlc_value_t
oldval
,
vlc_value_t
newval
,
void
*
param
)
{
MainInputManager
*
im
=
(
MainInputManager
*
)
param
;
IMEvent
*
event
=
new
IMEvent
(
VolumeChanged_Type
,
newval
.
i_int
);
QApplication
::
postEvent
(
im
,
static_cast
<
QEvent
*>
(
event
)
);
return
VLC_SUCCESS
;
}
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