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
9c8e2354
Commit
9c8e2354
authored
Feb 20, 2014
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
addons: Retrieve: narrow lock
allows UI updates while downloading
parent
71e8c79f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
6 deletions
+21
-6
modules/misc/addons/fsstorage.c
modules/misc/addons/fsstorage.c
+3
-2
modules/misc/addons/vorepository.c
modules/misc/addons/vorepository.c
+18
-4
No files found.
modules/misc/addons/fsstorage.c
View file @
9c8e2354
...
...
@@ -498,14 +498,15 @@ static int Install( addons_storage_t *p_storage, addon_entry_t *p_entry )
p_entry
->
psz_source_module
,
true
);
if
(
p_module
)
{
vlc_mutex_lock
(
&
p_entry
->
lock
);
if
(
p_finder
->
pf_retrieve
(
p_finder
,
p_entry
)
==
VLC_SUCCESS
)
{
/* Do things while retrieved data is here */
vlc_mutex_lock
(
&
p_entry
->
lock
);
i_ret
=
InstallAllFiles
(
p_storage
,
p_entry
);
vlc_mutex_unlock
(
&
p_entry
->
lock
);
/* !Do things while retrieved data is here */
}
vlc_mutex_unlock
(
&
p_entry
->
lock
);
module_unneed
(
p_finder
,
p_module
);
}
...
...
modules/misc/addons/vorepository.c
View file @
9c8e2354
...
...
@@ -347,27 +347,39 @@ static int Find( addons_finder_t *p_finder )
static
int
Retrieve
(
addons_finder_t
*
p_finder
,
addon_entry_t
*
p_entry
)
{
vlc_mutex_lock
(
&
p_entry
->
lock
);
if
(
!
p_entry
->
psz_archive_uri
)
{
vlc_mutex_unlock
(
&
p_entry
->
lock
);
return
VLC_EGENERIC
;
}
char
*
psz_archive_uri
=
strdup
(
p_entry
->
psz_archive_uri
);
vlc_mutex_unlock
(
&
p_entry
->
lock
);
if
(
!
psz_archive_uri
)
return
VLC_ENOMEM
;
/* get archive and parse manifest */
stream_t
*
p_stream
;
if
(
p
_entry
->
p
sz_archive_uri
[
0
]
==
'/'
)
if
(
psz_archive_uri
[
0
]
==
'/'
)
{
/* Relative path */
char
*
psz_uri
;
if
(
!
asprintf
(
&
psz_uri
,
ADDONS_REPO_SCHEMEHOST
"%s"
,
p_entry
->
psz_archive_uri
)
)
if
(
!
asprintf
(
&
psz_uri
,
ADDONS_REPO_SCHEMEHOST
"%s"
,
psz_archive_uri
)
)
{
free
(
psz_archive_uri
);
return
VLC_ENOMEM
;
}
p_stream
=
stream_UrlNew
(
p_finder
,
psz_uri
);
free
(
psz_uri
);
}
else
{
p_stream
=
stream_UrlNew
(
p_finder
,
p
_entry
->
p
sz_archive_uri
);
p_stream
=
stream_UrlNew
(
p_finder
,
psz_archive_uri
);
}
msg_Dbg
(
p_finder
,
"downloading archive %s"
,
p_entry
->
psz_archive_uri
);
msg_Dbg
(
p_finder
,
"downloading archive %s"
,
psz_archive_uri
);
free
(
psz_archive_uri
);
if
(
!
p_stream
)
return
VLC_EGENERIC
;
/* In case of pf_ reuse */
...
...
@@ -430,8 +442,10 @@ static int Retrieve( addons_finder_t *p_finder, addon_entry_t *p_entry )
return
VLC_EGENERIC
;
}
vlc_mutex_lock
(
&
p_entry
->
lock
);
int
i_ret
=
(
ParseManifest
(
p_finder
,
p_entry
,
psz_tempfileuri
,
p_stream
)
>
0
)
?
VLC_SUCCESS
:
VLC_EGENERIC
;
vlc_mutex_unlock
(
&
p_entry
->
lock
);
free
(
psz_tempfileuri
);
stream_Delete
(
p_stream
);
...
...
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