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
7474ff21
Commit
7474ff21
authored
Jul 08, 2015
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fingerprinter: remove fingerprinter_sys_t.psz_uri
parent
28e638d8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
17 deletions
+16
-17
modules/misc/fingerprinter.c
modules/misc/fingerprinter.c
+16
-17
No files found.
modules/misc/fingerprinter.c
View file @
7474ff21
...
...
@@ -61,7 +61,6 @@ struct fingerprinter_sys_t
input_item_t
*
p_item
;
input_thread_t
*
p_input
;
chromaprint_fingerprint_t
chroma_fingerprint
;
char
*
psz_uri
;
/* clobberable by cleanups */
int
i_cancel_state
;
...
...
@@ -164,7 +163,8 @@ static int inputStateCallback( vlc_object_t *obj, const char *var,
return
VLC_SUCCESS
;
}
static
void
DoFingerprint
(
vlc_object_t
*
p_this
,
fingerprinter_sys_t
*
p_sys
,
acoustid_fingerprint_t
*
fp
)
static
void
DoFingerprint
(
vlc_object_t
*
p_this
,
fingerprinter_sys_t
*
p_sys
,
acoustid_fingerprint_t
*
fp
,
const
char
*
psz_uri
)
{
p_sys
->
p_input
=
NULL
;
p_sys
->
p_item
=
NULL
;
...
...
@@ -191,7 +191,7 @@ static void DoFingerprint( vlc_object_t *p_this, fingerprinter_sys_t *p_sys, aco
input_item_AddOption
(
p_sys
->
p_item
,
psz_sout_option
,
VLC_INPUT_OPTION_TRUSTED
);
free
(
psz_sout_option
);
}
input_item_SetURI
(
p_sys
->
p_item
,
p
_sys
->
p
sz_uri
)
;
input_item_SetURI
(
p_sys
->
p_item
,
psz_uri
)
;
p_sys
->
p_input
=
input_Create
(
p_this
,
p_sys
->
p_item
,
"fingerprinter"
,
NULL
);
if
(
p_sys
->
p_input
)
...
...
@@ -258,8 +258,6 @@ static int Open(vlc_object_t *p_this)
vlc_mutex_init
(
&
p_sys
->
condwait
.
lock
);
vlc_cond_init
(
&
p_sys
->
condwait
.
wait
);
p_sys
->
psz_uri
=
NULL
;
p_fingerprinter
->
pf_run
=
Run
;
p_fingerprinter
->
pf_enqueue
=
EnqueueRequest
;
p_fingerprinter
->
pf_getresults
=
GetResult
;
...
...
@@ -343,7 +341,6 @@ static void cancelRun( void * p_arg )
fingerprinter_sys_t
*
p_sys
=
(
fingerprinter_sys_t
*
)
p_arg
;
if
(
vlc_array_count
(
p_sys
->
processing
.
queue
)
)
vlc_array_clear
(
p_sys
->
processing
.
queue
);
free
(
p_sys
->
psz_uri
);
}
static
void
Run
(
fingerprinter_thread_t
*
p_fingerprinter
)
...
...
@@ -367,31 +364,33 @@ static void Run( fingerprinter_thread_t *p_fingerprinter )
for
(
p_sys
->
i
=
0
;
p_sys
->
i
<
vlc_array_count
(
p_sys
->
processing
.
queue
);
p_sys
->
i
++
)
{
fingerprint_request_t
*
p_data
=
vlc_array_item_at_index
(
p_sys
->
processing
.
queue
,
p_sys
->
i
);
acoustid_fingerprint_t
acoustid_print
;
memset
(
&
acoustid_print
,
0
,
sizeof
(
acoustid_fingerprint_t
)
);
p_sys
->
psz_uri
=
input_item_GetURI
(
p_data
->
p_item
);
if
(
p_sys
->
psz_uri
)
int
canc
=
vlc_savecancel
();
char
*
psz_uri
=
input_item_GetURI
(
p_data
->
p_item
);
if
(
psz_uri
!=
NULL
)
{
/* overwrite with hint, as in this case, fingerprint's session will be truncated */
if
(
p_data
->
i_duration
)
acoustid_print
.
i_duration
=
p_data
->
i_duration
;
acoustid_fingerprint_t
acoustid_print
;
int
canc
=
vlc_savecancel
();
memset
(
&
acoustid_print
,
0
,
sizeof
(
acoustid_print
)
);
/* overwrite with hint, as in this case, fingerprint's session will be truncated */
if
(
p_data
->
i_duration
)
acoustid_print
.
i_duration
=
p_data
->
i_duration
;
DoFingerprint
(
VLC_OBJECT
(
p_fingerprinter
),
p_sys
,
&
acoustid_print
);
DoFingerprint
(
VLC_OBJECT
(
p_fingerprinter
),
p_sys
,
&
acoustid_print
,
psz_uri
);
free
(
psz_uri
);
DoAcoustIdWebRequest
(
VLC_OBJECT
(
p_fingerprinter
),
&
acoustid_print
);
fill_metas_with_results
(
p_data
,
&
acoustid_print
);
FREENULL
(
p_sys
->
psz_uri
);
for
(
unsigned
j
=
0
;
j
<
acoustid_print
.
results
.
count
;
j
++
)
free_acoustid_result_t
(
&
acoustid_print
.
results
.
p_results
[
j
]
);
if
(
acoustid_print
.
results
.
count
)
free
(
acoustid_print
.
results
.
p_results
);
free
(
acoustid_print
.
psz_fingerprint
);
vlc_restorecancel
(
canc
);
}
vlc_restorecancel
(
canc
);
/* copy results */
vlc_mutex_lock
(
&
p_sys
->
results
.
lock
);
...
...
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