]> git.sesse.net Git - vlc/blobdiff - include/vlc_input.h
Don't try to lock locked mutexes under valgrind
[vlc] / include / vlc_input.h
index 5d336fd457bad2803390b42b475b20a3cdabc8dd..91c967a7c0d686cee4c3f8860101ea466f176697 100644 (file)
@@ -278,7 +278,7 @@ struct input_thread_t
  * Record prefix string.
  * TODO make it configurable.
  */
-#define INPUT_RECORD_PREFIX "vlc-record-%Y-%m-%d-%H:%M:%S-$ N-$ p"
+#define INPUT_RECORD_PREFIX "vlc-record-%Y-%m-%d-%Hh%Mm%Ss-$ N-$ p"
 
 /*****************************************************************************
  * Input events and variables
@@ -298,9 +298,11 @@ struct input_thread_t
  *  - "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" (list of id from the spu tracks (spu-es) that are teletext, the
+ *                   variable value being the one currently selected, -1 if no teletext)
  *  - "signal-quality"
  *  - "signal-strength"
+ *  - "program-scrambled" (if the current program is scrambled)
  *  - "cache" (level of data cached [0 .. 1])
  *
  * The read-write variables are:
@@ -373,6 +375,8 @@ typedef enum input_event_type_e
     INPUT_EVENT_STATE,
     /* b_dead is true */
     INPUT_EVENT_DEAD,
+    /* a *user* abort has been requested */
+    INPUT_EVENT_ABORT,
 
     /* "rate" has changed */
     INPUT_EVENT_RATE,
@@ -386,7 +390,8 @@ typedef enum input_event_type_e
     /* A chapter has been added or removed or selected. */
     INPUT_EVENT_CHAPTER,
 
-    /* A program has been added or removed or selected */
+    /* A program ("program") has been added or removed or selected,
+     * or "program-scrambled" has changed.*/
     INPUT_EVENT_PROGRAM,
     /* A ES has been added or removed or selected */
     INPUT_EVENT_ES,
@@ -432,15 +437,22 @@ typedef enum input_event_type_e
  * Prototypes
  *****************************************************************************/
 
-/* input_CreateThread
- * Release the returned input_thread_t using vlc_object_release() */
+/**
+ * It will create a new input thread.
+ *
+ * You must call input_StopThread() on it and then vlc_object_release().
+ */
 #define input_CreateThread(a,b) __input_CreateThread(VLC_OBJECT(a),b)
 VLC_EXPORT( input_thread_t *, __input_CreateThread, ( vlc_object_t *, input_item_t * ) );
 
-VLC_EXPORT( void,             input_StopThread,     ( input_thread_t * ) );
-
-#define input_Preparse(a,b) __input_Preparse(VLC_OBJECT(a),b)
-VLC_EXPORT( int, __input_Preparse, ( vlc_object_t *, input_item_t * ) );
+/**
+ * It will ask a input_thread_t to stop.
+ *
+ * b_abort must be true when a user stop is requested and not because you have
+ * detected an error or an eof. It will be used to properly send the
+ * INPUT_EVENT_ABORT event.
+ */
+VLC_EXPORT( void,             input_StopThread,     ( input_thread_t *, bool b_abort ) );
 
 #define input_Read(a,b,c) __input_Read(VLC_OBJECT(a),b, c)
 VLC_EXPORT( int, __input_Read, ( vlc_object_t *, input_item_t *, bool ) );