]> git.sesse.net Git - vlc/blobdiff - include/vlc_input.h
Misc stats work (Refs:#473)
[vlc] / include / vlc_input.h
index 069657d7fe972928416deae4e128454a1da089fd..adca4ff6aea29ff7e96e5168f460e870cdc1085c 100644 (file)
@@ -64,6 +64,8 @@ struct input_item_t
 
     vlc_bool_t  b_fixed_name;        /**< Can the interface change the name ?*/
 
+    input_stats_t *p_stats;          /**< Statistics */
+
     vlc_mutex_t lock;                /**< Item cannot be changed without this lock */
 };
 
@@ -91,6 +93,10 @@ static inline void vlc_input_item_Init( vlc_object_t *p_o, input_item_t *p_i )
     p_i->es = 0;
     p_i->i_type = ITEM_TYPE_UNKNOWN;
     p_i->b_fixed_name = VLC_TRUE;
+
+    p_i->p_stats = (input_stats_t*) malloc( sizeof( input_stats_t ) );
+    vlc_mutex_init( p_o, &p_i->p_stats->lock );
+
     vlc_mutex_init( p_o, &p_i->lock );
 }