]> git.sesse.net Git - vlc/blobdiff - include/vlc_access.h
Implement access_GetParentInput and demux_GetParentInput and use.
[vlc] / include / vlc_access.h
index 92044ebb6d5992aa025bbe7863df9fc0f07f5a09..d12953a41c525ff4f1844f65f63f9b490f211e4c 100644 (file)
@@ -115,6 +115,9 @@ struct access_t
         int          i_seekpoint;/* idem, start from 0 */
     } info;
     access_sys_t *p_sys;
+
+    /* Weak link to parent input */
+    input_thread_t *p_input;
 };
 
 static inline int access_vaControl( access_t *p_access, int i_query, va_list args )
@@ -144,6 +147,12 @@ static inline void access_InitFields( access_t *p_a )
     p_a->info.i_seekpoint = 0;
 }
 
+/**
+ * This function will return the parent input of this access.
+ * It is retained. It can return NULL.
+ */
+VLC_EXPORT( input_thread_t *, access_GetParentInput, ( access_t *p_access ) );
+
 #define ACCESS_SET_CALLBACKS( read, block, control, seek )              \
     p_access->pf_read = read;                                           \
     p_access->pf_block = block;                                         \