[vlc-devel] commit: Added "intf-change-vout" variable to warn about vout creation/ destruction. (Laurent Aimar )

git version control git at videolan.org
Fri Sep 5 23:47:40 CEST 2008


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Fri Sep  5 22:29:39 2008 +0200| [d6e99cf906a56811de0ad043dc6e29a6088b6ec4] | committer: Laurent Aimar 

Added "intf-change-vout" variable to warn about vout creation/destruction.

It is provided for convenience for interfaces.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d6e99cf906a56811de0ad043dc6e29a6088b6ec4
---

 src/input/decoder.c |    2 ++
 src/input/input.c   |    3 ++-
 src/input/var.c     |    3 +++
 3 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/src/input/decoder.c b/src/input/decoder.c
index 49df3ab..48df78a 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -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" );
diff --git a/src/input/input.c b/src/input/input.c
index 2ecc160..266d065 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -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 (?)
diff --git a/src/input/var.c b/src/input/var.c
index 7dbb405..e2092fc 100644
--- a/src/input/var.c
+++ b/src/input/var.c
@@ -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




More information about the vlc-devel mailing list