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
73850298
Commit
73850298
authored
Jul 08, 2015
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fingerprinter: remove and propagate constant pf_run
Also fix an invalid function pointer cast.
parent
832d5a6d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
include/vlc_fingerprinter.h
include/vlc_fingerprinter.h
+0
-1
modules/misc/fingerprinter.c
modules/misc/fingerprinter.c
+8
-7
No files found.
include/vlc_fingerprinter.h
View file @
73850298
...
...
@@ -74,7 +74,6 @@ struct fingerprinter_thread_t
fingerprinter_sys_t
*
p_sys
;
module_t
*
p_module
;
void
(
*
pf_run
)
(
struct
fingerprinter_thread_t
*
);
void
(
*
pf_enqueue
)
(
struct
fingerprinter_thread_t
*
f
,
fingerprint_request_t
*
r
);
fingerprint_request_t
*
(
*
pf_getresults
)
(
struct
fingerprinter_thread_t
*
f
);
...
...
modules/misc/fingerprinter.c
View file @
73850298
...
...
@@ -21,6 +21,8 @@
# include "config.h"
#endif
#include <assert.h>
#include <vlc_common.h>
#include <vlc_plugin.h>
#include <vlc_stream.h>
...
...
@@ -72,7 +74,7 @@ struct fingerprinter_sys_t
static
int
Open
(
vlc_object_t
*
);
static
void
Close
(
vlc_object_t
*
);
static
void
Run
(
fingerprinter_thread_t
*
);
static
void
*
Run
(
void
*
);
/*****************************************************************************
* Module descriptor
...
...
@@ -256,16 +258,13 @@ static int Open(vlc_object_t *p_this)
vlc_mutex_init
(
&
p_sys
->
condwait
.
lock
);
vlc_cond_init
(
&
p_sys
->
condwait
.
wait
);
p_fingerprinter
->
pf_run
=
Run
;
p_fingerprinter
->
pf_enqueue
=
EnqueueRequest
;
p_fingerprinter
->
pf_getresults
=
GetResult
;
p_fingerprinter
->
pf_apply
=
ApplyResult
;
var_Create
(
p_fingerprinter
,
"results-available"
,
VLC_VAR_BOOL
);
if
(
p_fingerprinter
->
pf_run
&&
vlc_clone
(
&
p_sys
->
thread
,
(
void
*
(
*
)
(
void
*
))
p_fingerprinter
->
pf_run
,
p_fingerprinter
,
VLC_THREAD_PRIORITY_LOW
)
)
if
(
vlc_clone
(
&
p_sys
->
thread
,
Run
,
p_fingerprinter
,
VLC_THREAD_PRIORITY_LOW
)
)
{
msg_Err
(
p_fingerprinter
,
"cannot spawn fingerprinter thread"
);
goto
error
;
...
...
@@ -332,8 +331,9 @@ static void fill_metas_with_results( fingerprint_request_t *p_r, acoustid_finger
/*****************************************************************************
* Run :
*****************************************************************************/
static
void
Run
(
fingerprinter_thread_t
*
p_fingerprinter
)
static
void
*
Run
(
void
*
opaque
)
{
fingerprinter_thread_t
*
p_fingerprinter
=
opaque
;
fingerprinter_sys_t
*
p_sys
=
p_fingerprinter
->
p_sys
;
/* main loop */
...
...
@@ -388,4 +388,5 @@ static void Run( fingerprinter_thread_t *p_fingerprinter )
vlc_array_clear
(
p_sys
->
processing
.
queue
);
}
}
vlc_assert_unreachable
();
}
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