From 7848170e0d4098be8e0fbad540be2425539948eb Mon Sep 17 00:00:00 2001 From: Thomas Guillem Date: Tue, 8 Oct 2024 16:56:47 +0200 Subject: [PATCH] input_item: add GetType() --- include/vlc_input_item.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/vlc_input_item.h b/include/vlc_input_item.h index aec16a3a25..52d1f97e70 100644 --- a/include/vlc_input_item.h +++ b/include/vlc_input_item.h @@ -395,6 +395,16 @@ VLC_API input_item_t *input_item_Hold(input_item_t *); /** Releases an input item, i.e. decrements its reference counter. */ VLC_API void input_item_Release(input_item_t *); +static inline enum input_item_type_e +input_item_GetType( input_item_t *p_i, bool *is_network ) +{ + vlc_mutex_lock( &p_i->lock ); + enum input_item_type_e type = p_i->i_type; + *is_network = p_i->b_net; + vlc_mutex_unlock( &p_i->lock ); + return type; +} + /** * Record prefix string. * TODO make it configurable.