X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Finput%2Finput_internal.h;h=fe2fc010fba955448a1ca7e96fb69e2979c13497;hb=4551fb33de7234c2ec73f4da2fe4aaa07c7f58f0;hp=ff63425310b620beaa31a20f719648f15074f431;hpb=620dc72af1b422e046351704db82de886dffc78a;p=vlc diff --git a/src/input/input_internal.h b/src/input/input_internal.h index ff63425310..fe2fc010fb 100644 --- a/src/input/input_internal.h +++ b/src/input/input_internal.h @@ -59,6 +59,7 @@ typedef struct vlc_bool_t b_can_pace_control; vlc_bool_t b_can_pause; vlc_bool_t b_eof; /* eof of demuxer */ + double f_fps; /* Clock average variation */ int i_cr_average; @@ -75,6 +76,7 @@ struct input_thread_private_t /* */ int64_t i_start; /* :start-time,0 by default */ int64_t i_stop; /* :stop-time, 0 if none */ + int64_t i_run; /* :run-time, 0 if none */ /* Title infos FIXME multi-input (not easy) ? */ int i_title; @@ -87,8 +89,9 @@ struct input_thread_private_t int i_bookmark; seekpoint_t **bookmark; - /* Global meta datas FIXME move to input_item_t ? */ - vlc_meta_t *p_meta; + /* Input attachment */ + int i_attachment; + input_attachment_t **attachment; /* Output */ es_out_t *p_es_out; @@ -127,7 +130,8 @@ struct input_thread_private_t int i_control; struct { - /* XXX: val isn't duplicated so it won't works with string */ + /* XXX for string value you have to allocate it before calling + * input_ControlPush */ int i_type; vlc_value_t val; } control[INPUT_CONTROL_FIFO_SIZE]; @@ -212,6 +216,7 @@ typedef struct playlist_album_t { char *psz_artist; char *psz_album; + char *psz_arturl; vlc_bool_t b_found; } playlist_album_t; @@ -221,10 +226,16 @@ vlc_bool_t input_MetaSatisfied ( playlist_t*, input_item_t*, uint32_t*, uint32_t* ); int input_DownloadAndCacheArt ( playlist_t *, input_item_t * ); +/* Becarefull; p_item lock HAS to be taken */ +void input_ExtractAttachmentAndCacheArt( input_thread_t *p_input ); + /*************************************************************************** * Internal prototypes ***************************************************************************/ +/* misc/stats.c */ +input_stats_t *stats_NewInputStats( input_thread_t *p_input ); + /* input.c */ #define input_CreateThreadExtended(a,b,c,d) __input_CreateThreadExtended(VLC_OBJECT(a),b,c,d) input_thread_t *__input_CreateThreadExtended ( vlc_object_t *, input_item_t *, const char *, sout_instance_t * ); @@ -246,16 +257,17 @@ void stream_AccessReset( stream_t *s ); void stream_AccessUpdate( stream_t *s ); /* decoder.c */ -void input_DecoderDiscontinuity( decoder_t * p_dec ); +void input_DecoderDiscontinuity( decoder_t * p_dec, vlc_bool_t b_flush ); vlc_bool_t input_DecoderEmpty( decoder_t * p_dec ); -void input_DecoderPreroll( decoder_t *p_dec, int64_t i_preroll_end ); /* es_out.c */ es_out_t *input_EsOutNew( input_thread_t * ); void input_EsOutDelete( es_out_t * ); es_out_id_t *input_EsOutGetFromID( es_out_t *, int i_id ); -void input_EsOutDiscontinuity( es_out_t *, vlc_bool_t b_audio ); void input_EsOutSetDelay( es_out_t *, int i_cat, int64_t ); +void input_EsOutChangeRate( es_out_t * ); +void input_EsOutChangeState( es_out_t * ); +void input_EsOutChangePosition( es_out_t * ); vlc_bool_t input_EsOutDecodersEmpty( es_out_t * ); /* clock.c */ @@ -275,18 +287,22 @@ typedef struct mtime_t last_cr; /* reference to detect unexpected stream * discontinuities */ mtime_t last_pts; + mtime_t last_update; int i_synchro_state; vlc_bool_t b_master; + int i_rate; + /* Config */ int i_cr_average; int i_delta_cr_residue; } input_clock_t; -void input_ClockInit( input_clock_t *, vlc_bool_t b_master, int i_cr_average ); +void input_ClockInit( input_thread_t *, input_clock_t *, vlc_bool_t b_master, int i_cr_average ); void input_ClockSetPCR( input_thread_t *, input_clock_t *, mtime_t ); mtime_t input_ClockGetTS( input_thread_t *, input_clock_t *, mtime_t ); +void input_ClockSetRate( input_thread_t *, input_clock_t *cl ); /* Subtitles */ char **subtitles_Detect( input_thread_t *, char* path, const char *fname ); @@ -296,9 +312,7 @@ void MRLSplit( vlc_object_t *, char *, const char **, const char **, char ** ); static inline void input_ChangeState( input_thread_t *p_input, int state ) { - vlc_value_t val; - val.i_int = p_input->i_state = state; - var_Change( p_input, "state", VLC_VAR_SETVALUE, &val, NULL ); + var_SetInteger( p_input, "state", p_input->i_state = state ); } /* Access */ @@ -339,8 +353,8 @@ static inline int demux2_Control( demux_t *p_demux, int i_query, ... ) return i_result; } -#ifdef __PLUGIN__ -# warning CAN'T YOU SEE THIS IS AN INTERNAL HEADER?! ' +#if defined(__PLUGIN__) || defined(__BUILTIN__) +# warning This is an internal header, something is wrong if you see this message. #else /* Stream */ /** @@ -350,9 +364,9 @@ struct stream_t { VLC_COMMON_MEMBERS - block_t *(*pf_block) ( stream_t *, int i_size ); + /*block_t *(*pf_block) ( stream_t *, int i_size );*/ int (*pf_read) ( stream_t *, void *p_read, int i_read ); - int (*pf_peek) ( stream_t *, uint8_t **pp_peek, int i_peek ); + int (*pf_peek) ( stream_t *, const uint8_t **pp_peek, int i_peek ); int (*pf_control)( stream_t *, int i_query, va_list ); void (*pf_destroy)( stream_t *);