[vlc-devel] [PATCH 04/12] input: add INPUT_CONTROL_SET_ANGLE

Francois Cartegnie fcvlcdev at free.fr
Thu Apr 2 20:40:12 CEST 2020


---
 src/input/input.c          | 12 ++++++++++++
 src/input/input_internal.h |  2 ++
 2 files changed, 14 insertions(+)

diff --git a/src/input/input.c b/src/input/input.c
index 74ea140d37..895859e0fe 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -2232,6 +2232,18 @@ static bool Control( input_thread_t *p_input,
             break;
         }
 
+        case INPUT_CONTROL_SET_ANGLE:
+        {
+            if( priv->master->i_title <= 0 ||
+                param.val.i_int < 0 || param.val.i_int > UINT8_MAX )
+                break;
+
+            demux_t *p_demux = priv->master->p_demux;
+            if(!demux_Control( p_demux, DEMUX_SET_ANGLE, param.val.i_int ))
+                input_SendEventAngle( p_input, (unsigned char) param.val.i_int );
+            break;
+        }
+
         case INPUT_CONTROL_ADD_SLAVE:
             if( param.val.p_address )
             {
diff --git a/src/input/input_internal.h b/src/input/input_internal.h
index 24cb57604b..b163b5d321 100644
--- a/src/input/input_internal.h
+++ b/src/input/input_internal.h
@@ -576,6 +576,8 @@ enum input_control_e
     INPUT_CONTROL_SET_SEEKPOINT_NEXT,
     INPUT_CONTROL_SET_SEEKPOINT_PREV,
 
+    INPUT_CONTROL_SET_ANGLE,
+
     INPUT_CONTROL_SET_BOOKMARK,
 
     INPUT_CONTROL_NAV_ACTIVATE, // NOTE: INPUT_CONTROL_NAV_* values must be
-- 
2.25.1



More information about the vlc-devel mailing list