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
80566b68
Commit
80566b68
authored
Aug 25, 2007
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
audioscrobbler: runs in a separate thread because of blocking network calls
parent
0f2c7eb3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
3 deletions
+15
-3
modules/misc/audioscrobbler.c
modules/misc/audioscrobbler.c
+15
-3
No files found.
modules/misc/audioscrobbler.c
View file @
80566b68
...
...
@@ -100,6 +100,7 @@ intf_sys_t *p_sys_global; /* to retrieve p_sys in Run() thread */
static
int
Open
(
vlc_object_t
*
);
static
void
Close
(
vlc_object_t
*
);
static
void
Run
(
intf_thread_t
*
);
static
void
Main
(
intf_thread_t
*
);
static
int
ItemChange
(
vlc_object_t
*
,
const
char
*
,
vlc_value_t
,
vlc_value_t
,
void
*
);
static
int
PlayingChange
(
vlc_object_t
*
,
const
char
*
,
vlc_value_t
,
...
...
@@ -280,10 +281,19 @@ static void Close( vlc_object_t *p_this )
free
(
p_sys
);
}
/****************************************************************************
* Run : create Main() thread
* **************************************************************************/
static
void
Run
(
intf_thread_t
*
p_intf
)
{
if
(
vlc_thread_create
(
p_intf
,
"Audioscrobbler"
,
Main
,
0
,
VLC_TRUE
)
)
msg_Err
(
p_intf
,
"failed to create Audioscrobbler thread"
);
}
/*****************************************************************************
*
Ru
n : call Handshake() then submit songs
*
Mai
n : call Handshake() then submit songs
*****************************************************************************/
static
void
Ru
n
(
intf_thread_t
*
p_this
)
static
void
Mai
n
(
intf_thread_t
*
p_this
)
{
char
*
psz_submit
=
NULL
;
char
*
psz_submit_song
=
NULL
;
...
...
@@ -296,6 +306,8 @@ static void Run( intf_thread_t *p_this )
int
i_post_socket
;
time_t
played_time
;
vlc_thread_ready
(
p_this
);
p_this
->
p_sys
=
p_sys_global
;
intf_sys_t
*
p_sys
=
p_this
->
p_sys
;
...
...
@@ -327,7 +339,7 @@ static void Run( intf_thread_t *p_this )
if
(
p_sys
->
b_handshaked
==
VLC_FALSE
)
{
msg_Dbg
(
p_this
,
"Handshaking with last.fm ..."
);
switch
(
Handshake
(
p_this
)
)
{
case
VLC_ENOMEM
:
...
...
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