+/**
+ * It will add a new subtitle source to the input.
+ * Provided for convenience.
+ */
+static inline int input_AddSubtitleOSD( input_thread_t *p_input, const char *psz_url,
+ bool b_check_extension, bool b_osd )
+{
+ int i_result = input_Control( p_input, INPUT_ADD_SUBTITLE, psz_url, b_check_extension );
+ if( i_result != VLC_SUCCESS || !b_osd )
+ return i_result;
+
+ vout_thread_t *p_vout = input_GetVout( p_input );
+ if( p_vout )
+ {
+ vout_OSDMessage(p_vout, SPU_DEFAULT_CHANNEL, "%s",
+ vlc_gettext("Subtitle track added") );
+ vlc_object_release( (vlc_object_t *)p_vout );
+ }
+ return i_result;
+}
+#define input_AddSubtitle(a, b, c) input_AddSubtitleOSD(a, b, c, false)
+
+