[vlc-devel] [PATCH 01/11] decoder: add decoder_OnOutputReady

Thomas Guillem thomas at gllm.fr
Wed Aug 26 18:09:58 CEST 2015


---
 include/vlc_codec.h | 7 +++++++
 src/input/decoder.c | 6 ++++++
 2 files changed, 13 insertions(+)

diff --git a/include/vlc_codec.h b/include/vlc_codec.h
index 0c43978..f417d78 100644
--- a/include/vlc_codec.h
+++ b/include/vlc_codec.h
@@ -241,6 +241,13 @@ VLC_API mtime_t decoder_GetDisplayDate( decoder_t *, mtime_t ) VLC_USED;
  */
 VLC_API int decoder_GetDisplayRate( decoder_t * ) VLC_USED;
 
+/**
+ * This function wakes up the DecoderThread that will call pf_decode with a
+ * NULL pp_block. This allow asynchronous decoder modules to queue a picture
+ * immediatly from the DecoderThread.
+ */
+VLC_API void decoder_OnOutputReady( decoder_t * );
+
 /** @} */
 /** @} */
 #endif /* _VLC_CODEC_H */
diff --git a/src/input/decoder.c b/src/input/decoder.c
index 25eac79..3bcc31c 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -594,6 +594,12 @@ int decoder_GetDisplayRate( decoder_t *p_dec )
 
     return p_dec->pf_get_display_rate( p_dec );
 }
+/* decoder_OnOutputReady
+ */
+void decoder_OnOutputReady( decoder_t *p_dec )
+{
+    input_DecoderDrain( p_dec );
+}
 
 static bool DecoderWaitUnblock( decoder_t *p_dec )
 {
-- 
2.1.4



More information about the vlc-devel mailing list