]> git.sesse.net Git - vlc/blobdiff - include/vlc_input.h
udp: fix locking (fixes #14234) and cancellation
[vlc] / include / vlc_input.h
index 61258ca9697b1f1e756b9693bf9d4b824a14b35a..5b05ce87bb6b4836036cb5c0d20166b966d6d514 100644 (file)
@@ -297,14 +297,6 @@ typedef enum input_state_e
     ERROR_S,
 } input_state_e;
 
-/* same order as es_out_state_es_e enum in vlc_es_out.h */
-typedef enum input_es_state_e
-{
-    INPUT_ES_STATE_DISABLED = 0,
-    INPUT_ES_STATE_ENABLED,
-    INPUT_ES_STATE_ERROR,
-} input_es_state_e;
-
 /**
  * Input rate.
  *
@@ -343,8 +335,6 @@ typedef enum input_event_type_e
     INPUT_EVENT_STATE,
     /* b_dead is true */
     INPUT_EVENT_DEAD,
-    /* a *user* abort has been requested */
-    INPUT_EVENT_ABORT,
 
     /* "rate" has changed */
     INPUT_EVENT_RATE,
@@ -488,9 +478,6 @@ enum input_query_e
     /* External clock managments */
     INPUT_GET_PCR_SYSTEM,   /* arg1=mtime_t *, arg2=mtime_t *       res=can fail */
     INPUT_MODIFY_PCR_SYSTEM,/* arg1=int absolute, arg2=mtime_t      res=can fail */
-
-    /* Ask status of main ES objects */
-    INPUT_GET_ES_STATE,     /* arg1=int (AUDIO/VIDEO/SPU_ES), arg2=es_out state * res=can fail */
 };
 
 /** @}*/
@@ -507,7 +494,7 @@ VLC_API input_thread_t * input_CreateAndStart( vlc_object_t *p_parent, input_ite
 
 VLC_API int input_Start( input_thread_t * );
 
-VLC_API void input_Stop( input_thread_t *, bool b_abort );
+VLC_API void input_Stop( input_thread_t * );
 
 VLC_API int input_Read( vlc_object_t *, input_item_t * );
 #define input_Read(a,b) input_Read(VLC_OBJECT(a),b)
@@ -576,7 +563,8 @@ static inline int input_AddSubtitleOSD( input_thread_t *p_input, const char *psz
     vout_thread_t *p_vout = input_GetVout( p_input );
     if( p_vout )
     {
-        vout_OSDMessage(p_vout, SPU_DEFAULT_CHANNEL, _("Subtitle track added") );
+        vout_OSDMessage(p_vout, SPU_DEFAULT_CHANNEL, "%s",
+                        vlc_gettext("Subtitle track added") );
         vlc_object_release( (vlc_object_t *)p_vout );
     }
     return i_result;
@@ -617,17 +605,6 @@ static inline int input_GetPcrSystem( input_thread_t *p_input, mtime_t *pi_syste
 {
     return input_Control( p_input, INPUT_GET_PCR_SYSTEM, pi_system, pi_delay );
 }
-
-/**
- * It will return the state of the current selected elementary streams for this input.
- */
-static inline input_es_state_e input_GetEsState( input_thread_t *p_input, const int i_cat )
-{
-    input_es_state_e state = INPUT_ES_STATE_DISABLED;
-    input_Control( p_input, INPUT_GET_ES_STATE, i_cat, &state );
-    return state;
-}
-
 /**
  * \see input_clock_ChangeSystemOrigin
  */
@@ -637,9 +614,11 @@ static inline int input_ModifyPcrSystem( input_thread_t *p_input, bool b_absolut
 }
 
 /* */
-VLC_API decoder_t * input_DecoderCreate( vlc_object_t *, es_format_t *, input_resource_t * ) VLC_USED;
+VLC_API decoder_t * input_DecoderCreate( vlc_object_t *, const es_format_t *, input_resource_t * ) VLC_USED;
 VLC_API void input_DecoderDelete( decoder_t * );
 VLC_API void input_DecoderDecode( decoder_t *, block_t *, bool b_do_pace );
+VLC_API void input_DecoderDrain( decoder_t * );
+VLC_API void input_DecoderFlush( decoder_t * );
 
 /**
  * This function creates a sane filename path.
@@ -675,4 +654,19 @@ VLC_API void input_resource_Terminate( input_resource_t * );
  */
 VLC_API audio_output_t *input_resource_HoldAout( input_resource_t * );
 
+/**
+ * This function creates or recycles an audio output.
+ */
+VLC_API audio_output_t *input_resource_GetAout( input_resource_t * );
+
+/**
+ * This function retains or destroys an audio output.
+ */
+VLC_API void input_resource_PutAout( input_resource_t *, audio_output_t * );
+
+/**
+ * Prevents the existing audio output (if any) from being recycled.
+ */
+VLC_API void input_resource_ResetAout( input_resource_t * );
+
 #endif