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
44f031cb
Commit
44f031cb
authored
May 13, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Privatize libvlc_media_player_destroy
parent
9f36a1de
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
49 deletions
+18
-49
src/control/libvlc_internal.h
src/control/libvlc_internal.h
+0
-9
src/control/media_player.c
src/control/media_player.c
+18
-39
src/libvlc.sym
src/libvlc.sym
+0
-1
No files found.
src/control/libvlc_internal.h
View file @
44f031cb
...
@@ -263,15 +263,6 @@ input_thread_t *libvlc_get_input_thread(
...
@@ -263,15 +263,6 @@ input_thread_t *libvlc_get_input_thread(
libvlc_media_player_t
*
,
libvlc_media_player_t
*
,
libvlc_exception_t
*
);
libvlc_exception_t
*
);
/* Media instance */
libvlc_media_player_t
*
libvlc_media_player_new_from_input_thread
(
libvlc_instance_t
*
,
input_thread_t
*
,
libvlc_exception_t
*
);
void
libvlc_media_player_destroy
(
libvlc_media_player_t
*
);
/* Media Descriptor */
/* Media Descriptor */
libvlc_media_t
*
libvlc_media_new_from_input_item
(
libvlc_media_t
*
libvlc_media_new_from_input_item
(
libvlc_instance_t
*
,
input_item_t
*
,
libvlc_instance_t
*
,
input_item_t
*
,
...
...
src/control/media_player.c
View file @
44f031cb
...
@@ -237,6 +237,8 @@ input_event_changed( vlc_object_t * p_this, char const * psz_cmd,
...
@@ -237,6 +237,8 @@ input_event_changed( vlc_object_t * p_this, char const * psz_cmd,
}
}
static
void
libvlc_media_player_destroy
(
libvlc_media_player_t
*
);
/**************************************************************************
/**************************************************************************
* Create a Media Instance object.
* Create a Media Instance object.
*
*
...
@@ -359,35 +361,30 @@ libvlc_media_player_new_from_media(
...
@@ -359,35 +361,30 @@ libvlc_media_player_new_from_media(
*
*
* Warning: No lock held here, but hey, this is internal. Caller must lock.
* Warning: No lock held here, but hey, this is internal. Caller must lock.
**************************************************************************/
**************************************************************************/
void
libvlc_media_player_destroy
(
libvlc_media_player_t
*
p_mi
)
static
void
libvlc_media_player_destroy
(
libvlc_media_player_t
*
p_mi
)
{
{
input_thread_t
*
p_input_thread
;
input_thread_t
*
p_input_thread
;
libvlc_exception_t
p_e
;
libvlc_exception_t
p_e
;
if
(
!
p_mi
)
assert
(
p_mi
);
return
;
libvlc_exception_init
(
&
p_e
);
/* Detach Callback from the main libvlc object */
/* Detach Callback from the main libvlc object */
var_DelCallback
(
p_mi
->
p_libvlc_instance
->
p_libvlc_int
,
var_DelCallback
(
p_mi
->
p_libvlc_instance
->
p_libvlc_int
,
"vout-snapshottaken"
,
SnapshotTakenCallback
,
p_mi
);
"vout-snapshottaken"
,
SnapshotTakenCallback
,
p_mi
);
libvlc_exception_init
(
&
p_e
);
p_input_thread
=
libvlc_get_input_thread
(
p_mi
,
&
p_e
);
p_input_thread
=
libvlc_get_input_thread
(
p_mi
,
&
p_e
);
if
(
libvlc_exception_raised
(
&
p_e
)
)
if
(
libvlc_exception_raised
(
&
p_e
)
)
{
/* no need to worry about no input thread */
libvlc_event_manager_release
(
p_mi
->
p_event_manager
);
libvlc_exception_clear
(
&
p_e
);
libvlc_exception_clear
(
&
p_e
);
free
(
p_mi
);
else
return
;
/* no need to worry about no input thread */
release_input_thread
(
p_mi
,
true
);
}
vlc_mutex_destroy
(
&
p_mi
->
object_lock
);
vlc_object_release
(
p_input_thread
);
libvlc_media_release
(
p_mi
->
p_md
);
libvlc_event_manager_release
(
p_mi
->
p_event_manager
);
if
(
p_mi
->
p_md
)
libvlc_media_release
(
p_mi
->
p_md
);
vlc_mutex_destroy
(
&
p_mi
->
object_lock
);
free
(
p_mi
);
free
(
p_mi
);
}
}
...
@@ -398,33 +395,15 @@ void libvlc_media_player_destroy( libvlc_media_player_t *p_mi )
...
@@ -398,33 +395,15 @@ void libvlc_media_player_destroy( libvlc_media_player_t *p_mi )
**************************************************************************/
**************************************************************************/
void
libvlc_media_player_release
(
libvlc_media_player_t
*
p_mi
)
void
libvlc_media_player_release
(
libvlc_media_player_t
*
p_mi
)
{
{
if
(
!
p_mi
)
bool
destroy
;
return
;
assert
(
p_mi
);
vlc_mutex_lock
(
&
p_mi
->
object_lock
);
vlc_mutex_lock
(
&
p_mi
->
object_lock
);
destroy
=
!--
p_mi
->
i_refcount
;
p_mi
->
i_refcount
--
;
if
(
p_mi
->
i_refcount
>
0
)
{
vlc_mutex_unlock
(
&
p_mi
->
object_lock
);
return
;
}
vlc_mutex_unlock
(
&
p_mi
->
object_lock
);
vlc_mutex_unlock
(
&
p_mi
->
object_lock
);
/* Detach Callback from the main libvlc object */
if
(
destroy
)
var_DelCallback
(
p_mi
->
p_libvlc_instance
->
p_libvlc_int
,
libvlc_media_player_destroy
(
p_mi
);
"vout-snapshottaken"
,
SnapshotTakenCallback
,
p_mi
);
vlc_mutex_destroy
(
&
p_mi
->
object_lock
);
release_input_thread
(
p_mi
,
true
);
libvlc_event_manager_release
(
p_mi
->
p_event_manager
);
libvlc_media_release
(
p_mi
->
p_md
);
free
(
p_mi
);
}
}
/**************************************************************************
/**************************************************************************
...
...
src/libvlc.sym
View file @
44f031cb
...
@@ -119,7 +119,6 @@ libvlc_media_new
...
@@ -119,7 +119,6 @@ libvlc_media_new
libvlc_media_new_as_node
libvlc_media_new_as_node
libvlc_media_new_from_input_item
libvlc_media_new_from_input_item
libvlc_media_player_can_pause
libvlc_media_player_can_pause
libvlc_media_player_destroy
libvlc_media_player_event_manager
libvlc_media_player_event_manager
libvlc_media_player_get_agl
libvlc_media_player_get_agl
libvlc_media_player_get_chapter
libvlc_media_player_get_chapter
...
...
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