From e41cdcc4acaf1c7d41a2ad9cfd467dcbe7ddeb1b Mon Sep 17 00:00:00 2001
From: Pierre d'Herbemont <pdherbemont@videolan.org>
Date: Mon, 7 Jan 2008 14:23:12 +0000
Subject: [PATCH] src/input.c: Define and set the "can-pause" variable.

---
 src/input/input.c | 3 +++
 src/input/var.c   | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/src/input/input.c b/src/input/input.c
index 9fd3eb4fc904..8d48ed5c8583 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -108,6 +108,7 @@ static void AppendAttachment( int *pi_attachment, input_attachment_t ***ppp_atta
  *  - length
  *  - bookmarks
  *  - seekable (if you can seek, it doesn't say if 'bar display' has be shown or not, for that check position != 0.0)
+ *  - can-pause
  * * For intf callback upon changes
  *  - intf-change
  * TODO explain when Callback is called
@@ -2265,6 +2266,7 @@ static int InputSourceInit( input_thread_t *p_input,
         if( demux2_Control( in->p_demux, DEMUX_CAN_PAUSE,
                             &in->b_can_pause ) )
             in->b_can_pause = VLC_FALSE;
+        var_SetBool( p_input, "can-pause", in->b_can_pause );
 
         int ret = demux2_Control( in->p_demux, DEMUX_CAN_SEEK,
                         &val.b_bool );
@@ -2361,6 +2363,7 @@ static int InputSourceInit( input_thread_t *p_input,
 
             access2_Control( in->p_access, ACCESS_CAN_PAUSE,
                              &in->b_can_pause );
+            var_SetBool( p_input, "can-pause", in->b_can_pause );
             access2_Control( in->p_access, ACCESS_CAN_SEEK,
                              &val.b_bool );
             var_Set( p_input, "seekable", val );
diff --git a/src/input/var.c b/src/input/var.c
index fa8e04c46ad4..fd4ab177b7b5 100644
--- a/src/input/var.c
+++ b/src/input/var.c
@@ -448,6 +448,9 @@ void input_ConfigVarInit ( input_thread_t *p_input )
     var_Create( p_input, "seekable", VLC_VAR_BOOL );
     val.b_bool = VLC_TRUE; /* Fixed later*/
     var_Change( p_input, "seekable", VLC_VAR_SETVALUE, &val, NULL );
+    var_Create( p_input, "can-pause", VLC_VAR_BOOL );
+    val.b_bool = VLC_TRUE; /* Fixed later*/
+    var_Change( p_input, "can-pause", VLC_VAR_SETVALUE, &val, NULL );
 
     /* */
     var_Create( p_input, "access-filter", VLC_VAR_STRING | VLC_VAR_DOINHERIT );
-- 
GitLab