demux_t *p_demux;
/* Title infos for that input */
- bool b_title_demux; /* Titles/Seekpoints provided by demux */
+ bool b_title_demux; /* Titles/Seekpoints provided by demux */
int i_title;
input_title_t **title;
bool b_can_rate_control;
bool b_rescale_ts;
- bool b_eof; /* eof of demuxer */
+ bool b_eof; /* eof of demuxer */
double f_fps;
/* Clock average variation */
/** Private input fields */
struct input_thread_private_t
{
+ /* Object's event manager */
+ vlc_event_manager_t event_manager;
+
/* Global properties */
- bool b_can_pause;
- bool b_can_rate_control;
+ bool b_can_pause;
+ bool b_can_rate_control;
int i_rate;
/* */
input_attachment_t **attachment;
/* Output */
- es_out_t *p_es_out;
+ es_out_t *p_es_out;
sout_instance_t *p_sout; /* XXX Move it to es_out ? */
- bool b_sout_keep;
- bool b_out_pace_control; /* idem ? */
- bool b_owns_its_sout;
+ bool b_out_pace_control; /* idem ? */
/* Main input properties */
input_source_t input;
int i_slave;
input_source_t **slave;
+ /* pts delay fixup */
+ struct {
+ int i_num_faulty;
+ bool to_high;
+ bool auto_adjust;
+ } pts_adjust;
+
/* Stats counters */
struct {
counter_t *p_read_packets;
}
}
-static inline void input_item_SetMetaFetched( input_item_t *p_i, bool metafetched )
-{
- if( !p_i->p_meta )
- p_i->p_meta = vlc_meta_New();
-
- if( metafetched )
- p_i->p_meta->i_status |= ITEM_META_FETCHED;
- else
- p_i->p_meta->i_status &= ~ITEM_META_FETCHED;
-}
-
static inline void input_item_SetArtNotFound( input_item_t *p_i, bool notfound )
{
if( !p_i->p_meta )
p_i->p_meta->i_status &= ~ITEM_ART_FETCHED;
}
+void input_item_SetHasErrorWhenReading( input_item_t *p_i, bool error );
/**********************************************************************
* Item metadata
bool b_found;
} playlist_album_t;
-int input_MetaFetch ( playlist_t *, input_item_t * );
int input_ArtFind ( playlist_t *, input_item_t * );
-bool 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 */
/* var.c */
void input_ControlVarInit ( input_thread_t * );
-void input_ControlVarClean( input_thread_t * );
+void input_ControlVarStop( input_thread_t * );
void input_ControlVarNavigation( input_thread_t * );
void input_ControlVarTitle( input_thread_t *, int i_title );
mtime_t last_update;
int i_synchro_state;
- bool b_master;
+ bool b_master;
int i_rate;
void MRLSplit( char *, const char **, const char **, char ** );
+static inline void input_ChangeStateWithVarCallback( input_thread_t *p_input, int state, bool callback )
+{
+ const bool changed = p_input->i_state != state;
+
+ p_input->i_state = state;
+
+ input_item_SetHasErrorWhenReading( p_input->p->input.p_item, (state == ERROR_S) );
+
+ if( callback )
+ {
+ var_SetInteger( p_input, "state", state );
+ }
+ else
+ {
+ vlc_value_t val;
+ val.i_int = state;
+ var_Change( p_input, "state", VLC_VAR_SETVALUE, &val, NULL );
+ }
+ if( changed )
+ {
+ vlc_event_t event;
+ event.type = vlc_InputStateChanged;
+ event.u.input_state_changed.new_state = state;
+ vlc_event_send( &p_input->p->event_manager, &event );
+ }
+}
+
static inline void input_ChangeState( input_thread_t *p_input, int state )
{
- var_SetInteger( p_input, "state", p_input->i_state = state );
+ input_ChangeStateWithVarCallback( p_input, state, true );
}
+
/* Access */
-#define access2_New( a, b, c, d ) __access2_New(VLC_OBJECT(a), b, c, d )
-access_t * __access2_New( vlc_object_t *p_obj, const char *psz_access,
+#define access_New( a, b, c, d ) __access_New(VLC_OBJECT(a), b, c, d )
+access_t * __access_New( vlc_object_t *p_obj, const char *psz_access,
const char *psz_demux, const char *psz_path );
-access_t * access2_FilterNew( access_t *p_source,
+access_t * access_FilterNew( access_t *p_source,
const char *psz_access_filter );
-void access2_Delete( access_t * );
+void access_Delete( access_t * );
/* Demuxer */
#include <vlc_demux.h>
/* UTF-16 and UTF-32 file reading */
vlc_iconv_t conv;
int i_char_width;
- bool b_little_endian;
+ bool b_little_endian;
};
#include <libvlc.h>
static inline stream_t *vlc_stream_create( vlc_object_t *obj )
{
return (stream_t *)vlc_custom_create( obj, sizeof(stream_t),
- VLC_OBJECT_STREAM, "stream" );
+ VLC_OBJECT_GENERIC, "stream" );
}
#endif