* TODO complete the documentation.
* The read only variables are:
* - "length"
- * - "bookmarks"
- * - "seekable (if you can seek, it doesn't say if 'bar display' has be shown FIXME rename can-seek
+ * - "can-seek" (if you can seek, it doesn't say if 'bar display' has be shown
* or not, for that check position != 0.0)
* - "can-pause"
* - "can-rate"
* - "can-rewind"
* - "can-record" (if a stream can be recorded while playing)
- * - "teletext-es" to get the index of spu track that is teletext --1 if no teletext)
+ * - "teletext-es" to get the index of spu track that is teletext -1 if no teletext)
* - "signal-quality"
* - "signal-strength"
+ * - "cache" (level of data cached [0 .. 1])
*
* The read-write variables are:
* - state (\see input_state_e)
* - chapter, next-chapter, next-chapter-prev
* - program, audio-es, video-es, spu-es
* - audio-delay, spu-delay
- * - bookmark
+ * - bookmark (bookmark list)
* - record
* - frame-next
* - navigation (list of "title %2i")
*
* The variable used for event is
* - intf-event (\see input_event_type_e)
- *
- * The legacy variable used for event are
- * - intf-change
- * - intf-change-vout
- * - rate-change
- * - stats-change
- * You are advised to change to intf-event as soon as possible.
*/
/**
* Input state
*
* This enum is used by the variable "state"
- *
- * NOTE: you need to update ppsz_input_state in the RC interface
- * if you modify this list.
*/
typedef enum input_state_e
{
INIT_S = 0,
OPENING_S,
- BUFFERING_S,
PLAYING_S,
PAUSE_S,
- STOP_S,
END_S,
ERROR_S,
} input_state_e;
INPUT_EVENT_PROGRAM,
/* A ES has been added or removed or selected */
INPUT_EVENT_ES,
+ /* "teletext-es" has changed */
+ INPUT_EVENT_TELETEXT,
/* "record" has changed */
INPUT_EVENT_RECORD,
/* "spu-delay" has changed */
INPUT_EVENT_SUBTITLE_DELAY,
+ /* "bookmark" has changed */
+ INPUT_EVENT_BOOKMARK,
+
+ /* cache" has changed */
+ INPUT_EVENT_CACHE,
+
} input_event_type_e;
/** @}*/
INPUT_ADD_OPTION, /* arg1= char * arg2= char * res=can fail*/
/* Input properties */
- INPUT_GET_BYTE_POSITION, /* arg1= int64_t * res= */
- INPUT_SET_BYTE_SIZE, /* arg1= int64_t * res= */
INPUT_GET_VIDEO_FPS, /* arg1= double * res=can fail */
/* bookmarks */
+ INPUT_GET_BOOKMARK, /* arg1= seekpoint_t * res=can fail */
INPUT_GET_BOOKMARKS, /* arg1= seekpoint_t *** arg2= int * res=can fail */
INPUT_CLEAR_BOOKMARKS, /* res=can fail */
INPUT_ADD_BOOKMARK, /* arg1= seekpoint_t * res=can fail */
INPUT_GET_ATTACHMENT, /* arg1=input_attachment_t**, arg2=char* res=can fail */
/* On the fly input slave */
- INPUT_ADD_SLAVE, /* arg1= char * */
+ INPUT_ADD_SLAVE, /* arg1= const char * */
+ INPUT_ADD_SUBTITLE, /* arg1= const char *, arg2=bool b_check_extension */
/* On the fly record while playing */
INPUT_SET_RECORD_STATE, /* arg1=bool res=can fail */
VLC_EXPORT( int, input_vaControl,( input_thread_t *, int i_query, va_list ) );
VLC_EXPORT( int, input_Control, ( input_thread_t *, int i_query, ... ) );
+/**
+ * It will return the current state of the input.
+ * Provided for convenience.
+ */
static inline input_state_e input_GetState( input_thread_t * p_input )
{
input_state_e state = INIT_S;
input_Control( p_input, INPUT_GET_STATE, &state );
return state;
}
+/**
+ * It will add a new subtitle source to the input.
+ * Provided for convenience.
+ */
+static inline int input_AddSubtitle( input_thread_t *p_input, const char *psz_url, bool b_check_extension )
+{
+ return input_Control( p_input, INPUT_ADD_SUBTITLE, psz_url, b_check_extension );
+}
+/* */
typedef struct input_clock_t input_clock_t;
VLC_EXPORT( decoder_t *, input_DecoderNew, ( input_thread_t *, es_format_t *, input_clock_t *, sout_instance_t * ) );
VLC_EXPORT( void, input_DecoderDelete, ( decoder_t * ) );
VLC_EXPORT( void, input_DecoderDecode,( decoder_t *, block_t * ) );
-VLC_EXPORT( bool, input_AddSubtitles, ( input_thread_t *, char *, bool ) );
-
VLC_EXPORT( vlc_event_manager_t *, input_get_event_manager, ( input_thread_t * ) );
/**