[vlc-devel] [PATCHv3 06/12] libvlc: give access to the current vlc_renderer

Thomas Guillem thomas at gllm.fr
Tue Mar 29 15:06:37 CEST 2016


From: Steve Lhomme <robux4 at videolabs.io>

---
 include/vlc_input.h | 7 +++++++
 src/input/input.c   | 5 +++++
 src/libvlccore.sym  | 1 +
 3 files changed, 13 insertions(+)

diff --git a/include/vlc_input.h b/include/vlc_input.h
index 0bda6d4..01ebce9 100644
--- a/include/vlc_input.h
+++ b/include/vlc_input.h
@@ -699,5 +699,12 @@ VLC_API void input_resource_PutAout( input_resource_t *, audio_output_t * );
  */
 VLC_API void input_resource_ResetAout( input_resource_t * );
 
+/**
+ * \return the current renderer if any.
+ *
+ * Use vlc_object_release() to drop the reference.
+ */
+VLC_API vlc_renderer *input_HoldRenderer( input_thread_t *p_input );
+
 /** @} */
 #endif
diff --git a/src/input/input.c b/src/input/input.c
index 1ae06b3..f7aaed9 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -2945,3 +2945,8 @@ char *input_CreateFilename( input_thread_t *input, const char *psz_path, const c
         return psz_file;
     }
 }
+
+vlc_renderer * input_HoldRenderer(input_thread_t *p_input)
+{
+    return input_resource_HoldRenderer( p_input->p->p_resource );
+}
diff --git a/src/libvlccore.sym b/src/libvlccore.sym
index a6f292e..d79671a 100644
--- a/src/libvlccore.sym
+++ b/src/libvlccore.sym
@@ -208,6 +208,7 @@ input_item_SetName
 input_item_SetURI
 input_item_WriteMeta
 input_Read
+input_HoldRenderer
 input_resource_New
 input_resource_Release
 input_resource_TerminateVout
-- 
2.8.0.rc3



More information about the vlc-devel mailing list