[vlc-devel] commit: Add callback to spu-es from the input. (Je an-Paul Saman )
Jean-Paul Saman
jpsaman at videolan.org
Wed Jun 18 13:20:37 CEST 2008
Remi Denis-Courmont wrote:
> I thought committers had gotten the point about thread synchronization at last. Looks like I was wrong.
>
> please revert this.
The exact same method is used throughout the qt4 interface, look at line
130 till 168. There is "state", "audio-es", "video-es",
"rate-change","title and "intf-change" used in the exact same way.
If I understand you correctly, then all those usages should go too. This
would mean that the complete qt4 gui would be come unusable. How do yo
suggest to solve this then cleanly?
>
> Remi Denis
>
> -- message original --
> Sujet: [vlc-devel] commit: Add callback to spu-es from the input. (Jean-Paul Saman )
> De: git at videolan.org (git version control)
> Date: 18.06.2008 10:07
>
> vlc | branch: master | Jean-Paul Saman <jpsaman at videolan.org> | Tue Jun 17 11:52:26 2008 +0200| [ef9f3691a8d756873445b4ed6a0b49861dbc4582]
>
> Add callback to spu-es from the input.
>
>> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ef9f3691a8d756873445b4ed6a0b49861dbc4582
> ---
>
> modules/gui/qt4/input_manager.cpp | 14 +++++++++++++-
> 1 files changed, 13 insertions(+), 1 deletions(-)
>
> diff --git a/modules/gui/qt4/input_manager.cpp b/modules/gui/qt4/input_manager.cpp
> index 40c4e66..cd0d7c5 100644
> --- a/modules/gui/qt4/input_manager.cpp
> +++ b/modules/gui/qt4/input_manager.cpp
> @@ -34,6 +34,8 @@ static int ChangeVideo( vlc_object_t *p_this, const char *var, vlc_value_t o,
> vlc_value_t n, void *param );
> static int ChangeAudio( vlc_object_t *p_this, const char *var, vlc_value_t o,
> vlc_value_t n, void *param );
> +static int ChangeSPU( vlc_object_t *p_this, const char *var, vlc_value_t o,
> + vlc_value_t n, void *param );
> static int ItemChanged( vlc_object_t *, const char *,
> vlc_value_t, vlc_value_t, void * );
> static int PLItemChanged( vlc_object_t *, const char *,
> @@ -142,6 +144,8 @@ void InputManager::addCallbacks()
> var_AddCallback( p_input, "audio-es", ChangeAudio, this );
> /* src/input/es-out.c:551 */
> var_AddCallback( p_input, "video-es", ChangeVideo, this );
> + /* src/input/es-out.c:552 */
> + var_AddCallback( p_input, "spu-es", ChangeSPU, this );
> /* src/input/input.c:1765 */
> var_AddCallback( p_input, "rate-change", ItemRateChanged, this );
> /* src/input/input.c:2003 */
> @@ -153,6 +157,7 @@ void InputManager::addCallbacks()
> /* Delete the callbacks on Input. Self explanatory */
> void InputManager::delCallbacks()
> {
> + var_DelCallback( p_input, "spu-es", ChangeSPU, this );
> var_DelCallback( p_input, "audio-es", ChangeAudio, this );
> var_DelCallback( p_input, "video-es", ChangeVideo, this );
> var_DelCallback( p_input, "state", ItemStateChanged, this );
> @@ -634,7 +639,6 @@ static int ItemChanged( vlc_object_t *p_this, const char *psz_var,
> return VLC_SUCCESS;
> }
>
> -
> static int ChangeAudio( vlc_object_t *p_this, const char *var, vlc_value_t o,
> vlc_value_t n, void *param )
> {
> @@ -651,6 +655,14 @@ static int ChangeVideo( vlc_object_t *p_this, const char *var, vlc_value_t o,
> return VLC_SUCCESS;
> }
>
> +static int ChangeSPU( vlc_object_t *p_this, const char *var, vlc_value_t o,
> + vlc_value_t n, void *param )
> +{
> + InputManager *im = (InputManager*)param;
> + im->b_has_subs = true;
> + return VLC_SUCCESS;
> +}
> +
> /* MIM */
> static int PLItemChanged( vlc_object_t *p_this, const char *psz_var,
> vlc_value_t oldval, vlc_value_t newval, void *param )
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> http://mailman.videolan.org/listinfo/vlc-devel
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> http://mailman.videolan.org/listinfo/vlc-devel
>
More information about the vlc-devel
mailing list