]> git.sesse.net Git - vlc/commitdiff
Added "intf-change-vout" variable to warn about vout creation/destruction.
authorLaurent Aimar <fenrir@videolan.org>
Fri, 5 Sep 2008 20:29:39 +0000 (22:29 +0200)
committerLaurent Aimar <fenrir@videolan.org>
Fri, 5 Sep 2008 21:49:32 +0000 (23:49 +0200)
It is provided for convenience for interfaces.

src/input/decoder.c
src/input/input.c
src/input/var.c

index 49df3abd4668542f0000fe081c1fefb9052895d8..48df78a5184c46a02cd93c92ba5e20a86edfc241 100644 (file)
@@ -1126,6 +1126,7 @@ static void DeleteDecoder( decoder_t * p_dec )
 
         /* We are about to die. Reattach video output to p_vlc. */
         vout_Request( p_dec, p_dec->p_owner->p_vout, NULL );
+        var_SetBool( p_dec->p_owner->p_input, "intf-change-vout", true );
     }
 
 #ifdef ENABLE_SOUT
@@ -1306,6 +1307,7 @@ static picture_t *vout_new_buffer( decoder_t *p_dec )
 
         p_sys->p_vout = vout_Request( p_dec, p_sys->p_vout,
                                       &p_dec->fmt_out.video );
+        var_SetBool( p_sys->p_input, "intf-change-vout", true );
         if( p_sys->p_vout == NULL )
         {
             msg_Err( p_dec, "failed to create video output" );
index 2ecc16021a20225e20d46eb055f60756849e58a9..266d065ca917f25f4bdce0b84b58e783b21dddfe 100644 (file)
@@ -115,8 +115,9 @@ static void AppendAttachment( int *pi_attachment, input_attachment_t ***ppp_atta
  *  - can-pause
  *  - can-record (if a stream can be recorded while playing)
  *  - teletext-es to get the index of spu track that is teletext --1 if no teletext)
- * * For intf callback upon changes
+ * * For intf callback upon changes:
  *  - intf-change
+ *  - intf-change-vout for when a vout is created or destroyed
  *  - rate-change for when playback rate changes
  * TODO explain when Callback is called
  * TODO complete this list (?)
index 7dbb4057115a85a6d2ec219cd3c54e72f3d47a57..e2092fcf1c390b42ae8d098699cc59e3fed17e9c 100644 (file)
@@ -228,6 +228,9 @@ void input_ControlVarInit ( input_thread_t *p_input )
         var_SetBool( p_input, "intf-change", true );
         var_Create( p_input, "rate-change", VLC_VAR_BOOL );
         var_SetBool( p_input, "rate-change", true );
+
+        var_Create( p_input, "intf-change-vout", VLC_VAR_BOOL );
+        var_SetBool( p_input, "intf-change-vout", true );
     }
 
     /* Add all callbacks