mirror of https://code.videolan.org/videolan/vlc
libvlc: media: remove state handling
Incomplete since c0c35a5002
The state should be fetched from the player, the list_player or the
parser.
Fixes #26705
This commit is contained in:
parent
cd570400d7
commit
a0b1b87035
|
@ -72,17 +72,12 @@ enum libvlc_event_e {
|
|||
libvlc_MediaParsedChanged,
|
||||
|
||||
/* Removed: libvlc_MediaFreed, */
|
||||
/* Removed: libvlc_MediaStateChanged */
|
||||
|
||||
/**
|
||||
* \link #libvlc_state_t State\endlink of the \link
|
||||
* #libvlc_media_t media item\endlink changed
|
||||
* \see libvlc_media_get_state()
|
||||
*/
|
||||
libvlc_MediaStateChanged = libvlc_MediaParsedChanged + 2,
|
||||
/**
|
||||
* Subitem tree was added to a \link #libvlc_media_t media item\endlink
|
||||
*/
|
||||
libvlc_MediaSubItemTreeAdded,
|
||||
libvlc_MediaSubItemTreeAdded = libvlc_MediaParsedChanged + 3,
|
||||
/**
|
||||
* A thumbnail generation for this \link #libvlc_media_t media \endlink completed.
|
||||
* \see libvlc_media_thumbnail_request_by_time()
|
||||
|
|
|
@ -496,20 +496,6 @@ LIBVLC_API void libvlc_media_set_meta( libvlc_media_t *p_md,
|
|||
*/
|
||||
LIBVLC_API int libvlc_media_save_meta( libvlc_media_t *p_md );
|
||||
|
||||
|
||||
/**
|
||||
* Get current state of media descriptor object. Possible media states are
|
||||
* libvlc_NothingSpecial=0, libvlc_Opening, libvlc_Playing, libvlc_Paused,
|
||||
* libvlc_Stopped, libvlc_Stopping, libvlc_Error.
|
||||
*
|
||||
* \see libvlc_state_t
|
||||
* \param p_md a media descriptor object
|
||||
* \return state of media descriptor object
|
||||
*/
|
||||
LIBVLC_API libvlc_state_t libvlc_media_get_state(
|
||||
libvlc_media_t *p_md );
|
||||
|
||||
|
||||
/**
|
||||
* Get the current statistics about the media
|
||||
* \param p_md media descriptor object
|
||||
|
|
|
@ -73,7 +73,6 @@ libvlc_media_get_duration
|
|||
libvlc_media_get_filestat
|
||||
libvlc_media_get_meta
|
||||
libvlc_media_get_mrl
|
||||
libvlc_media_get_state
|
||||
libvlc_media_get_stats
|
||||
libvlc_media_get_tracklist
|
||||
libvlc_media_get_type
|
||||
|
|
27
lib/media.c
27
lib/media.c
|
@ -513,8 +513,6 @@ libvlc_media_t * libvlc_media_new_from_input_item(
|
|||
vlc_mutex_init(&p_md->subitems_lock);
|
||||
atomic_init(&p_md->worker_count, 0);
|
||||
|
||||
p_md->state = libvlc_NothingSpecial;
|
||||
|
||||
/* A media descriptor can be a playlist. When you open a playlist
|
||||
* It can give a bunch of item to read. */
|
||||
p_md->p_subitems = NULL;
|
||||
|
@ -736,31 +734,6 @@ int libvlc_media_save_meta( libvlc_media_t *p_md )
|
|||
return input_item_WriteMeta( p_obj, p_md->p_input_item ) == VLC_SUCCESS;
|
||||
}
|
||||
|
||||
// Getter for state information
|
||||
libvlc_state_t
|
||||
libvlc_media_get_state( libvlc_media_t *p_md )
|
||||
{
|
||||
assert( p_md );
|
||||
return p_md->state;
|
||||
}
|
||||
|
||||
// Setter for state information (LibVLC Internal)
|
||||
void
|
||||
libvlc_media_set_state( libvlc_media_t *p_md,
|
||||
libvlc_state_t state )
|
||||
{
|
||||
libvlc_event_t event;
|
||||
|
||||
p_md->state = state;
|
||||
|
||||
/* Construct the event */
|
||||
event.type = libvlc_MediaStateChanged;
|
||||
event.u.media_state_changed.new_state = state;
|
||||
|
||||
/* Send the event */
|
||||
libvlc_event_send( &p_md->event_manager, &event );
|
||||
}
|
||||
|
||||
// Get subitems of media descriptor object.
|
||||
libvlc_media_list_t *
|
||||
libvlc_media_subitems( libvlc_media_t * p_md )
|
||||
|
|
|
@ -38,7 +38,6 @@ struct libvlc_media_t
|
|||
|
||||
input_item_t *p_input_item;
|
||||
libvlc_instance_t *p_libvlc_instance;
|
||||
libvlc_state_t state;
|
||||
vlc_atomic_rc_t rc;
|
||||
|
||||
VLC_FORWARD_DECLARE_OBJECT(libvlc_media_list_t*) p_subitems; /* A media descriptor can have Sub items. This is the only dependency we really have on media_list */
|
||||
|
@ -62,7 +61,6 @@ struct libvlc_media_t
|
|||
libvlc_media_t * libvlc_media_new_from_input_item(
|
||||
libvlc_instance_t *, input_item_t * );
|
||||
|
||||
void libvlc_media_set_state( libvlc_media_t *, libvlc_state_t );
|
||||
void libvlc_media_add_subtree(libvlc_media_t *, input_item_node_t *);
|
||||
|
||||
static inline enum es_format_category_e
|
||||
|
|
|
@ -38,7 +38,6 @@
|
|||
#include <vlc_actions.h>
|
||||
|
||||
#include "libvlc_internal.h"
|
||||
#include "media_internal.h" // libvlc_media_set_state()
|
||||
#include "media_player_internal.h"
|
||||
#include "renderer_discoverer_internal.h"
|
||||
|
||||
|
|
Loading…
Reference in New Issue