[vlc-devel] [PATCH] Shortcat for multiplied video tracks

Filip Roséen filip at atch.se
Mon Feb 27 00:43:32 CET 2017


Hi Andrei,

 - Please incorporate any changes you would like to make into one
   applicable patch; it is harder to review code (and potentially
   commit into trunk) with a patch + diff; and it is not the advisable
   workflow.

 - The changes made still does not take into account everything I
   wrote in the [previous review][1]. I would recommend that you take
   them into consideration, especially the one that has to do with the
   code-duplication that your changes introduce (`ACTIONID_VIDEO_TRACK`
   is almost identical to `ACTIONID_AUDIO_TRACK` in terms of handling),

I do not have commit access, and as such I will not be the one who
potentially commit your patches. However, I advise you to clean up the
patch in order to increase the likelihood that your changes would make
it into the codebase (which I presume is what your end-goal is).

Best Regards,\
Filip Roséen

[1]: https://mailman.videolan.org/pipermail/vlc-devel/2017-February/111663.html

On 2017-02-27 00:59, Andrei Ciurea wrote:

> ---
>  include/vlc_keys.h        | 1 -
>  modules/control/hotkeys.c | 7 +++----
>  src/config/keys.c         | 1 -
>  src/libvlc-module.c       | 1 -
>  4 files changed, 3 insertions(+), 7 deletions(-)
> 
> diff --git a/include/vlc_keys.h b/include/vlc_keys.h
> index bb1f18e..0146e58 100644
> --- a/include/vlc_keys.h
> +++ b/include/vlc_keys.h
> @@ -100,7 +100,6 @@
>  #define KEY_ZOOM_OUT         0x00610000
>  #define KEY_BRIGHTNESS_UP    0x00620000
>  #define KEY_BRIGHTNESS_DOWN  0x00630000
> - //my mod. asignin' sa key for video_track
>  #define KEY_MEDIA_VIDEO      0x00640000
>  
>  #define KEY_MOUSEWHEELUP     0x00F00000
> diff --git a/modules/control/hotkeys.c b/modules/control/hotkeys.c
> index 3338a1f..2c25d0c 100644
> --- a/modules/control/hotkeys.c
> +++ b/modules/control/hotkeys.c
> @@ -736,8 +736,7 @@ static int PutAction( intf_thread_t *p_intf, input_thread_t *p_input,
>                  }
>                  var_FreeList( &list, &list2 );
>              }
> -            break;
> -            //my mod
> +            break;  
>          case ACTIONID_VIDEO_TRACK:
>           if( p_input )
>              {
> @@ -746,8 +745,8 @@ static int PutAction( intf_thread_t *p_intf, input_thread_t *p_input,
>                  var_Get( p_input, "video-es", &val );
>                  var_Change( p_input, "video-es", VLC_VAR_GETCHOICES,
>                              &list, &list2 );
> -                i_count = list.p_list->i_count;
> -                if( i_count > 1 )
> +                
> +                if( (i_count = list.p_list->i_count) > 1 )
>                  {
>                      for( i = 0; i < i_count; i++ )
>                      {
> diff --git a/src/config/keys.c b/src/config/keys.c
> index 3d28b26..0dfa52e 100644
> --- a/src/config/keys.c
> +++ b/src/config/keys.c
> @@ -275,7 +275,6 @@ static const struct action actions[] =
>      /* *MUST* be sorted (ASCII order) */
>      { "aspect-ratio", ACTIONID_ASPECT_RATIO, },
>      { "audio-track", ACTIONID_AUDIO_TRACK, },
> -    //my mod. asigning a actionid to video track
>      { "video-track", ACTIONID_VIDEO_TRACK, },
>      { "audiodelay-down", ACTIONID_AUDIODELAY_DOWN, },
>      { "audiodelay-up", ACTIONID_AUDIODELAY_UP, },
> diff --git a/src/libvlc-module.c b/src/libvlc-module.c
> index b2e6988..31aa346 100644
> --- a/src/libvlc-module.c
> +++ b/src/libvlc-module.c
> @@ -2516,7 +2516,6 @@ vlc_module_begin ()
>               AUDIODELAY_DOWN_KEY_TEXT, AUDIODELAY_DOWN_KEY_LONGTEXT, true )
>      add_key( "key-audio-track", KEY_AUDIO_TRACK, AUDIO_TRACK_KEY_TEXT,
>               AUDIO_TRACK_KEY_LONGTEXT, false )
> -             //my mod
>      add_key( "key-video-track", KEY_VIDEO_TRACK, VIDEO_TRACK_KEY_TEXT,
>               VIDEO_TRACK_KEY_LONGTEXT, false )
>      add_key( "key-audiodevice-cycle", KEY_AUDIODEVICE_CYCLE, AUDI_DEVICE_CYCLE_KEY_TEXT,
> -- 
> 2.10.2
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20170227/db8c95ec/attachment.html>


More information about the vlc-devel mailing list