Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
6d4a41a6
Commit
6d4a41a6
authored
Mar 17, 2010
by
Sébastien Escudier
Committed by
Rémi Denis-Courmont
May 02, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Unload vod-VLM only at the end
Signed-off-by:
Rémi Denis-Courmont
<
remi@remlab.net
>
parent
c9a8f8f6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
16 deletions
+11
-16
src/input/vlm.c
src/input/vlm.c
+11
-15
src/input/vlm_internal.h
src/input/vlm_internal.h
+0
-1
No files found.
src/input/vlm.c
View file @
6d4a41a6
...
@@ -153,7 +153,6 @@ vlm_t *vlm_New ( vlc_object_t *p_this )
...
@@ -153,7 +153,6 @@ vlm_t *vlm_New ( vlc_object_t *p_this )
p_vlm
->
i_id
=
1
;
p_vlm
->
i_id
=
1
;
TAB_INIT
(
p_vlm
->
i_media
,
p_vlm
->
media
);
TAB_INIT
(
p_vlm
->
i_media
,
p_vlm
->
media
);
TAB_INIT
(
p_vlm
->
i_schedule
,
p_vlm
->
schedule
);
TAB_INIT
(
p_vlm
->
i_schedule
,
p_vlm
->
schedule
);
p_vlm
->
i_vod
=
0
;
p_vlm
->
p_vod
=
NULL
;
p_vlm
->
p_vod
=
NULL
;
var_Create
(
p_vlm
,
"intf-event"
,
VLC_VAR_ADDRESS
);
var_Create
(
p_vlm
,
"intf-event"
,
VLC_VAR_ADDRESS
);
vlc_object_attach
(
p_vlm
,
p_this
->
p_libvlc
);
vlc_object_attach
(
p_vlm
,
p_this
->
p_libvlc
);
...
@@ -225,6 +224,13 @@ static void vlm_Destructor( vlm_t *p_vlm )
...
@@ -225,6 +224,13 @@ static void vlm_Destructor( vlm_t *p_vlm )
libvlc_priv
(
p_vlm
->
p_libvlc
)
->
p_vlm
=
NULL
;
libvlc_priv
(
p_vlm
->
p_libvlc
)
->
p_vlm
=
NULL
;
vlc_object_kill
(
p_vlm
);
vlc_object_kill
(
p_vlm
);
if
(
p_vlm
->
p_vod
)
{
module_unneed
(
p_vlm
->
p_vod
,
p_vlm
->
p_vod
->
p_module
);
vlc_object_detach
(
p_vlm
->
p_vod
);
vlc_object_release
(
p_vlm
->
p_vod
);
}
vlc_mutex_lock
(
&
p_vlm
->
lock_manage
);
vlc_mutex_lock
(
&
p_vlm
->
lock_manage
);
p_vlm
->
input_state_changed
=
true
;
p_vlm
->
input_state_changed
=
true
;
vlc_cond_signal
(
&
p_vlm
->
wait_manage
);
vlc_cond_signal
(
&
p_vlm
->
wait_manage
);
...
@@ -563,7 +569,7 @@ static int vlm_OnMediaUpdate( vlm_t *p_vlm, vlm_media_sys_t *p_media )
...
@@ -563,7 +569,7 @@ static int vlm_OnMediaUpdate( vlm_t *p_vlm, vlm_media_sys_t *p_media )
{
{
vlm_media_t
*
p_cfg
=
&
p_media
->
cfg
;
vlm_media_t
*
p_cfg
=
&
p_media
->
cfg
;
/* Check if we need to create/delete a vod media */
/* Check if we need to create/delete a vod media */
if
(
p_cfg
->
b_vod
)
if
(
p_cfg
->
b_vod
&&
p_vlm
->
p_vod
)
{
{
if
(
!
p_cfg
->
b_enabled
&&
p_media
->
vod
.
p_media
)
if
(
!
p_cfg
->
b_enabled
&&
p_media
->
vod
.
p_media
)
{
{
...
@@ -655,6 +661,8 @@ static int vlm_OnMediaUpdate( vlm_t *p_vlm, vlm_media_sys_t *p_media )
...
@@ -655,6 +661,8 @@ static int vlm_OnMediaUpdate( vlm_t *p_vlm, vlm_media_sys_t *p_media )
}
}
}
}
}
}
else
if
(
p_cfg
->
b_vod
)
msg_Err
(
p_vlm
,
"vod server is not loaded"
);
else
else
{
{
/* TODO start media if needed */
/* TODO start media if needed */
...
@@ -696,7 +704,7 @@ static int vlm_ControlMediaAdd( vlm_t *p_vlm, vlm_media_t *p_cfg, int64_t *p_id
...
@@ -696,7 +704,7 @@ static int vlm_ControlMediaAdd( vlm_t *p_vlm, vlm_media_t *p_cfg, int64_t *p_id
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
}
}
/* Check if we need to load the VOD server */
/* Check if we need to load the VOD server */
if
(
p_cfg
->
b_vod
&&
!
p_vlm
->
i
_vod
)
if
(
p_cfg
->
b_vod
&&
!
p_vlm
->
p
_vod
)
{
{
p_vlm
->
p_vod
=
vlc_custom_create
(
VLC_OBJECT
(
p_vlm
),
sizeof
(
vod_t
),
p_vlm
->
p_vod
=
vlc_custom_create
(
VLC_OBJECT
(
p_vlm
),
sizeof
(
vod_t
),
VLC_OBJECT_GENERIC
,
"vod server"
);
VLC_OBJECT_GENERIC
,
"vod server"
);
...
@@ -718,9 +726,6 @@ static int vlm_ControlMediaAdd( vlm_t *p_vlm, vlm_media_t *p_cfg, int64_t *p_id
...
@@ -718,9 +726,6 @@ static int vlm_ControlMediaAdd( vlm_t *p_vlm, vlm_media_t *p_cfg, int64_t *p_id
if
(
!
p_media
)
if
(
!
p_media
)
return
VLC_ENOMEM
;
return
VLC_ENOMEM
;
if
(
p_cfg
->
b_vod
)
p_vlm
->
i_vod
++
;
vlm_media_Copy
(
&
p_media
->
cfg
,
p_cfg
);
vlm_media_Copy
(
&
p_media
->
cfg
,
p_cfg
);
p_media
->
cfg
.
id
=
p_vlm
->
i_id
++
;
p_media
->
cfg
.
id
=
p_vlm
->
i_id
++
;
/* FIXME do we do something here if enabled is true ? */
/* FIXME do we do something here if enabled is true ? */
...
@@ -755,7 +760,6 @@ static int vlm_ControlMediaDel( vlm_t *p_vlm, int64_t id )
...
@@ -755,7 +760,6 @@ static int vlm_ControlMediaDel( vlm_t *p_vlm, int64_t id )
{
{
p_media
->
cfg
.
b_enabled
=
false
;
p_media
->
cfg
.
b_enabled
=
false
;
vlm_OnMediaUpdate
(
p_vlm
,
p_media
);
vlm_OnMediaUpdate
(
p_vlm
,
p_media
);
p_vlm
->
i_vod
--
;
}
}
/* */
/* */
...
@@ -771,14 +775,6 @@ static int vlm_ControlMediaDel( vlm_t *p_vlm, int64_t id )
...
@@ -771,14 +775,6 @@ static int vlm_ControlMediaDel( vlm_t *p_vlm, int64_t id )
TAB_REMOVE
(
p_vlm
->
i_media
,
p_vlm
->
media
,
p_media
);
TAB_REMOVE
(
p_vlm
->
i_media
,
p_vlm
->
media
,
p_media
);
free
(
p_media
);
free
(
p_media
);
/* Check if we need to unload the VOD server */
if
(
p_vlm
->
p_vod
&&
p_vlm
->
i_vod
<=
0
)
{
module_unneed
(
p_vlm
->
p_vod
,
p_vlm
->
p_vod
->
p_module
);
vlc_object_release
(
p_vlm
->
p_vod
);
p_vlm
->
p_vod
=
NULL
;
}
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
}
}
...
...
src/input/vlm_internal.h
View file @
6d4a41a6
...
@@ -98,7 +98,6 @@ struct vlm_t
...
@@ -98,7 +98,6 @@ struct vlm_t
int64_t
i_id
;
int64_t
i_id
;
/* Vod server (used by media) */
/* Vod server (used by media) */
int
i_vod
;
vod_t
*
p_vod
;
vod_t
*
p_vod
;
/* Media list */
/* Media list */
...
...
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