From 2db3dfe9591edd013a579d1268f8848c0f547051 Mon Sep 17 00:00:00 2001 From: Thomas Guillem Date: Wed, 20 Dec 2023 09:20:34 +0100 Subject: [PATCH] input_item: remove input_item_HasErrorWhenReading --- include/vlc_input_item.h | 2 -- src/input/input.c | 2 -- src/input/item.c | 30 ------------------------------ src/input/item.h | 1 - src/libvlccore.sym | 1 - 5 files changed, 36 deletions(-) diff --git a/include/vlc_input_item.h b/include/vlc_input_item.h index 3561e607d5..88c4e2a99a 100644 --- a/include/vlc_input_item.h +++ b/include/vlc_input_item.h @@ -132,7 +132,6 @@ struct input_item_t enum input_item_type_e i_type; /**< Type (file, disc, ... see input_item_type_e) */ bool b_net; /**< Net: always true for TYPE_STREAM, it depends for others types */ - bool b_error_when_reading;/**< Error When Reading */ int i_preparse_depth; /**< How many level of sub items can be preparsed: -1: recursive, 0: none, >0: n levels */ @@ -294,7 +293,6 @@ VLC_API input_item_slave_t *input_item_slave_New(const char *, enum slave_type, VLC_API int input_item_AddSlave(input_item_t *, input_item_slave_t *); /* */ -VLC_API bool input_item_HasErrorWhenReading( input_item_t * ); VLC_API void input_item_SetMeta( input_item_t *, vlc_meta_type_t meta_type, const char *psz_val ); VLC_API bool input_item_MetaMatch( input_item_t *p_i, vlc_meta_type_t meta_type, const char *psz ); VLC_API char * input_item_GetMeta( input_item_t *p_i, vlc_meta_type_t meta_type ) VLC_USED; diff --git a/src/input/input.c b/src/input/input.c index 0c778187de..ab7975c6aa 100644 --- a/src/input/input.c +++ b/src/input/input.c @@ -3286,8 +3286,6 @@ static void input_ChangeState( input_thread_t *p_input, int i_state, return; input_priv(p_input)->i_state = i_state; - if( i_state == ERROR_S ) - input_item_SetErrorWhenReading( input_priv(p_input)->p_item, true ); if (i_state == END_S || i_state == ERROR_S) input_SendEventCapabilities( p_input, 0 ); input_SendEventState( p_input, i_state, state_date ); diff --git a/src/input/item.c b/src/input/item.c index b90ce2834a..d65ec085f1 100644 --- a/src/input/item.c +++ b/src/input/item.c @@ -48,24 +48,6 @@ struct input_item_opaque static enum input_item_type_e GuessType( const input_item_t *p_item, bool *p_net ); -void input_item_SetErrorWhenReading( input_item_t *p_i, bool b_error ) -{ - bool b_changed; - - vlc_mutex_lock( &p_i->lock ); - - b_changed = p_i->b_error_when_reading != b_error; - p_i->b_error_when_reading = b_error; - - vlc_mutex_unlock( &p_i->lock ); - - if( b_changed ) - { - vlc_event_send( &p_i->event_manager, &(vlc_event_t) { - .type = vlc_InputItemErrorWhenReadingChanged, - .u.input_item_error_when_reading_changed.new_value = b_error } ); - } -} void input_item_SetPreparsed( input_item_t *p_i ) { bool b_send_event = false; @@ -214,17 +196,6 @@ void input_item_CopyOptions( input_item_t *p_child, free( optv ); } -bool input_item_HasErrorWhenReading( input_item_t *p_item ) -{ - vlc_mutex_lock( &p_item->lock ); - - bool b_error = p_item->b_error_when_reading; - - vlc_mutex_unlock( &p_item->lock ); - - return b_error; -} - bool input_item_MetaMatch( input_item_t *p_i, vlc_meta_type_t meta_type, const char *psz ) { @@ -1092,7 +1063,6 @@ input_item_NewExt( const char *psz_uri, const char *psz_name, if( type != ITEM_TYPE_UNKNOWN ) p_input->i_type = type; - p_input->b_error_when_reading = false; if( i_net != ITEM_NET_UNKNOWN ) p_input->b_net = i_net == ITEM_NET; diff --git a/src/input/item.h b/src/input/item.h index f8d95166ca..4e4dd01f26 100644 --- a/src/input/item.h +++ b/src/input/item.h @@ -26,7 +26,6 @@ #include "input_interface.h" #include -void input_item_SetErrorWhenReading( input_item_t *p_i, bool b_error ); void input_item_UpdateTracksInfo( input_item_t *item, const es_format_t *fmt, const char *es_id, bool stable ); bool input_item_ShouldPreparseSubItems( input_item_t *p_i ); diff --git a/src/libvlccore.sym b/src/libvlccore.sym index a0b85aa339..3b74b0294c 100644 --- a/src/libvlccore.sym +++ b/src/libvlccore.sym @@ -199,7 +199,6 @@ input_item_GetName input_item_GetNowPlayingFb input_item_GetTitleFbName input_item_GetURI -input_item_HasErrorWhenReading input_item_IsArtFetched input_item_IsPreparsed input_item_MetaMatch