[vlc-commits] player: add vlc_player_GetV4l2Object
Thomas Guillem
git at videolan.org
Mon Mar 11 10:19:22 CET 2019
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Fri Mar 8 08:55:50 2019 +0100| [59daaa3c04fe46bdc22c191451b8678c321807e1] | committer: Thomas Guillem
player: add vlc_player_GetV4l2Object
Ugly but temporary.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=59daaa3c04fe46bdc22c191451b8678c321807e1
---
include/vlc_player.h | 10 ++++++++++
src/input/player.c | 8 ++++++++
src/libvlccore.sym | 1 +
3 files changed, 19 insertions(+)
diff --git a/include/vlc_player.h b/include/vlc_player.h
index ddd52f4609..ad170f3306 100644
--- a/include/vlc_player.h
+++ b/include/vlc_player.h
@@ -2446,6 +2446,16 @@ VLC_API void
vlc_player_SetPauseOnCork(vlc_player_t *player, bool enabled);
/**
+ * Get the V4L2 object used to do controls
+ *
+ * @param player locked player instance
+ * @return the V4L2 object or NULL if not any. This object must be used with
+ * the player lock held.
+ */
+VLC_API vlc_object_t *
+vlc_player_GetV4l2Object(vlc_player_t *player) VLC_DEPRECATED;
+
+/**
* Set a video splitter to the main vout
*
* @param player locked instance
diff --git a/src/input/player.c b/src/input/player.c
index 310156d254..569ddecd3e 100644
--- a/src/input/player.c
+++ b/src/input/player.c
@@ -3352,6 +3352,14 @@ vlc_player_vout_TriggerOption(vlc_player_t *player, const char *option)
free(vouts);
}
+vlc_object_t *
+vlc_player_GetV4l2Object(vlc_player_t *player)
+{
+ struct vlc_player_input *input = vlc_player_get_input_locked(player);
+ return input && var_Type(input->thread, "controls") != 0 ?
+ (vlc_object_t*) input->thread : NULL;
+}
+
void
vlc_player_SetVideoSplitter(vlc_player_t *player, const char *splitter)
{
diff --git a/src/libvlccore.sym b/src/libvlccore.sym
index f88e9c102b..ee058676c9 100644
--- a/src/libvlccore.sym
+++ b/src/libvlccore.sym
@@ -855,6 +855,7 @@ vlc_player_GetTitleList
vlc_player_GetTrack
vlc_player_GetTrackAt
vlc_player_GetTrackCount
+vlc_player_GetV4l2Object
vlc_player_HasTeletextMenu
vlc_player_IncrementRate
vlc_player_InvalidateNextMedia
More information about the vlc-commits
mailing list