[vlc-devel] [PATCH] lib: media: remove libvlc_MediaFreed
Alexandre Janniaux
ajanni at videolabs.io
Wed Jan 27 16:11:14 UTC 2021
It has little rationale and is fairly unused.
---
include/vlc/libvlc_events.h | 13 ++++---------
lib/media.c | 8 --------
2 files changed, 4 insertions(+), 17 deletions(-)
diff --git a/include/vlc/libvlc_events.h b/include/vlc/libvlc_events.h
index 826a0f4562..bda9d89ca0 100644
--- a/include/vlc/libvlc_events.h
+++ b/include/vlc/libvlc_events.h
@@ -70,16 +70,15 @@ enum libvlc_event_e {
* libvlc_media_parse_stop()
*/
libvlc_MediaParsedChanged,
- /**
- * A \link #libvlc_media_t media item\endlink was freed
- */
- libvlc_MediaFreed,
+
+ /* Removed: libvlc_MediaFreed, */
+
/**
* \link #libvlc_state_t State\endlink of the \link
* #libvlc_media_t media item\endlink changed
* \see libvlc_media_get_state()
*/
- libvlc_MediaStateChanged,
+ libvlc_MediaStateChanged = libvlc_MediaParsedChanged + 2,
/**
* Subitem tree was added to a \link #libvlc_media_t media item\endlink
*/
@@ -263,10 +262,6 @@ typedef struct libvlc_event_t
int new_status; /**< see @ref libvlc_media_parsed_status_t */
} media_parsed_changed;
struct
- {
- libvlc_media_t * md;
- } media_freed;
- struct
{
int new_state; /**< see @ref libvlc_state_t */
} media_state_changed;
diff --git a/lib/media.c b/lib/media.c
index 6f7911e0a2..19283d4f44 100644
--- a/lib/media.c
+++ b/lib/media.c
@@ -657,14 +657,6 @@ void libvlc_media_release( libvlc_media_t *p_md )
input_item_Release( p_md->p_input_item );
- /* Construct the event */
- libvlc_event_t event;
- event.type = libvlc_MediaFreed;
- event.u.media_freed.md = p_md;
-
- /* Send the event */
- libvlc_event_send( &p_md->event_manager, &event );
-
libvlc_event_manager_destroy( &p_md->event_manager );
libvlc_release( p_md->p_libvlc_instance );
free( p_md );
--
2.30.0
More information about the vlc-devel
mailing list