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
103f9309
Commit
103f9309
authored
Feb 20, 2015
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
notify: use input-current callback and simplify
parent
7b1d9b54
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
12 deletions
+3
-12
modules/notify/notify.c
modules/notify/notify.c
+3
-12
No files found.
modules/notify/notify.c
View file @
103f9309
...
...
@@ -122,7 +122,7 @@ static int Open( vlc_object_t *p_this )
}
/* */
var_AddCallback
(
pl_Get
(
p_intf
),
"
activity
"
,
ItemChange
,
p_intf
);
var_AddCallback
(
pl_Get
(
p_intf
),
"
input-current
"
,
ItemChange
,
p_intf
);
return
VLC_SUCCESS
;
}
...
...
@@ -135,7 +135,7 @@ static void Close( vlc_object_t *p_this )
intf_thread_t
*
p_intf
=
(
intf_thread_t
*
)
p_this
;
intf_sys_t
*
p_sys
=
p_intf
->
p_sys
;
var_DelCallback
(
pl_Get
(
p_intf
),
"
activity
"
,
ItemChange
,
p_this
);
var_DelCallback
(
pl_Get
(
p_intf
),
"
input-current
"
,
ItemChange
,
p_this
);
if
(
p_sys
->
notification
)
{
...
...
@@ -162,7 +162,7 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var,
char
*
psz_artist
;
char
*
psz_album
;
char
*
psz_arturl
;
input_thread_t
*
p_input
=
playlist_CurrentInput
(
(
playlist_t
*
)
p_this
)
;
input_thread_t
*
p_input
=
newval
.
p_address
;
intf_thread_t
*
p_intf
=
param
;
intf_sys_t
*
p_sys
=
p_intf
->
p_sys
;
...
...
@@ -170,15 +170,8 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var,
return
VLC_SUCCESS
;
if
(
p_input
->
b_dead
)
{
/* Not playing anything ... */
vlc_object_release
(
p_input
);
return
VLC_SUCCESS
;
}
/* Wait a tad so the meta has been fetched
* FIXME that's awfully wrong */
msleep
(
10000
);
/* Playing something ... */
input_item_t
*
p_input_item
=
input_GetItem
(
p_input
);
...
...
@@ -188,7 +181,6 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var,
if
(
EMPTY_STR
(
psz_title
)
)
{
free
(
psz_title
);
vlc_object_release
(
p_input
);
return
VLC_SUCCESS
;
}
...
...
@@ -213,7 +205,6 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var,
GdkPixbuf
*
pix
=
NULL
;
psz_arturl
=
input_item_GetArtURL
(
p_input_item
);
vlc_object_release
(
p_input
);
if
(
psz_arturl
)
{
...
...
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