]> git.sesse.net Git - vlc/blobdiff - include/vlc_input_item.h
Implement thread semaphores
[vlc] / include / vlc_input_item.h
index fa90d21fba97796b5030cb564a91e31e0676161d..6d4800ef47cd07faeefb3be41903567d9f622464 100644 (file)
@@ -64,7 +64,7 @@ struct input_item_t
     uint8_t    *optflagv;            /**< Some flags of input options */
     unsigned   optflagc;
 
-    mtime_t    i_duration;           /**< Duration in milliseconds*/
+    mtime_t    i_duration;           /**< Duration in microseconds */
 
     uint8_t    i_type;               /**< Type (file, disc, ... see input_item_type_e) */
     bool b_prefers_tree;             /**< Do we prefer being displayed as tree*/
@@ -138,6 +138,7 @@ VLC_EXPORT( void, input_item_SetMeta, ( input_item_t *, vlc_meta_type_t meta_typ
 VLC_EXPORT( bool, input_item_MetaMatch, ( input_item_t *p_i, vlc_meta_type_t meta_type, const char *psz ) );
 VLC_EXPORT( char *, input_item_GetMeta, ( input_item_t *p_i, vlc_meta_type_t meta_type ) );
 VLC_EXPORT( char *, input_item_GetName, ( input_item_t * p_i ) );
+VLC_EXPORT( char *, input_item_GetTitleFbName, ( input_item_t * p_i ) );
 VLC_EXPORT( char *, input_item_GetURI, ( input_item_t * p_i ) );
 VLC_EXPORT( void,   input_item_SetURI, ( input_item_t * p_i, const char *psz_uri ));
 VLC_EXPORT(mtime_t, input_item_GetDuration, ( input_item_t * p_i ) );
@@ -210,4 +211,43 @@ VLC_EXPORT( input_item_t *, __input_item_NewExt, (vlc_object_t *, const char *ps
  */
 #define input_item_New( a,b,c ) input_item_NewExt( a, b, c, 0, NULL, 0, -1 )
 
+/******************
+ * Input stats
+ ******************/
+struct input_stats_t
+{
+    vlc_mutex_t         lock;
+
+    /* Input */
+    int i_read_packets;
+    int i_read_bytes;
+    float f_input_bitrate;
+    float f_average_input_bitrate;
+
+    /* Demux */
+    int i_demux_read_packets;
+    int i_demux_read_bytes;
+    float f_demux_bitrate;
+    float f_average_demux_bitrate;
+    int i_demux_corrupted;
+    int i_demux_discontinuity;
+
+    /* Decoders */
+    int i_decoded_audio;
+    int i_decoded_video;
+
+    /* Vout */
+    int i_displayed_pictures;
+    int i_lost_pictures;
+
+    /* Sout */
+    int i_sent_packets;
+    int i_sent_bytes;
+    float f_send_bitrate;
+
+    /* Aout */
+    int i_played_abuffers;
+    int i_lost_abuffers;
+};
+
 #endif