From owner-freebsd-ports-bugs@FreeBSD.ORG Wed Aug 28 01:10:00 2013 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 8B44DC95 for ; Wed, 28 Aug 2013 01:10:00 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6B1C92F93 for ; Wed, 28 Aug 2013 01:10:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r7S1A03x045672 for ; Wed, 28 Aug 2013 01:10:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r7S1A0jq045671; Wed, 28 Aug 2013 01:10:00 GMT (envelope-from gnats) Resent-Date: Wed, 28 Aug 2013 01:10:00 GMT Resent-Message-Id: <201308280110.r7S1A0jq045671@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Cam Karnes Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 3F6F9C6B for ; Wed, 28 Aug 2013 01:06:20 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from oldred.freebsd.org (oldred.freebsd.org [8.8.178.121]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 11D622F7D for ; Wed, 28 Aug 2013 01:06:20 +0000 (UTC) Received: from oldred.freebsd.org ([127.0.1.6]) by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id r7S16JHv024815 for ; Wed, 28 Aug 2013 01:06:19 GMT (envelope-from nobody@oldred.freebsd.org) Received: (from nobody@localhost) by oldred.freebsd.org (8.14.5/8.14.5/Submit) id r7S16JVk024812; Wed, 28 Aug 2013 01:06:19 GMT (envelope-from nobody) Message-Id: <201308280106.r7S16JVk024812@oldred.freebsd.org> Date: Wed, 28 Aug 2013 01:06:19 GMT From: Cam Karnes To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: ports/181596: [PATCH] Add subtitle, video, and audio track scrolling to VLC's ncurses.c module X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Aug 2013 01:10:00 -0000 >Number: 181596 >Category: ports >Synopsis: [PATCH] Add subtitle, video, and audio track scrolling to VLC's ncurses.c module >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Wed Aug 28 01:10:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Cam Karnes >Release: 9.1-RELEASE >Organization: >Environment: >Description: A recent patch to the ncurses interface module (ncurses.c) enables scrolling through subtitle, audio, and video tracks. While I realize VLC 2.0.8 is already out, and the VLC port team is probably working to get it up to the most recent version, the patch was not implemented in the latest module. I find the patch significantly useful, as will others who enjoy both foreign film and the console interface. A link to the original commit from Rafaël Carré : http://git.videolan.org/gitweb.cgi/vlc.git/?p=vlc.git;a=commit;h=e6c890d1f9db3517645e5bb23a9f6c4c6c88a66c >How-To-Repeat: >Fix: Patch attached with submission follows: --- modules/gui/ncurses.c.orig +++ modules/gui/ncurses.c @@ -880,6 +880,9 @@ static int DrawHelp(intf_thread_t *intf) H(_(" s Stop")); H(_(" Pause/Play")); H(_(" f Toggle Fullscreen")); + H(_(" c Cycle through audio tracks")); + H(_(" v Cycle through subtitles tracks")); + H(_(" b Cycle through video tracks")); H(_(" n, p Next/Previous playlist item")); H(_(" [, ] Next/Previous title")); H(_(" <, > Next/Previous chapter")); @@ -1543,6 +1546,30 @@ static void InputNavigate(input_thread_t* p_input, const char *var) var_TriggerCallback(p_input, var); } +static void CycleESTrack(intf_sys_t *sys, const char *var) +{ + input_thread_t *input = sys->p_input; + + if (!input) + return; + + vlc_value_t val; + if (var_Change(input, var, VLC_VAR_GETLIST, &val, NULL) < 0) + return; + + vlc_list_t *list = val.p_list; + int64_t current = var_GetInteger(input, var); + + int i; + for (i = 0; i < list->i_count; i++) + if (list->p_values[i].i_int == current) + break; + + if (++i >= list->i_count) + i = 0; + var_SetInteger(input, var, list->p_values[i].i_int); +} + static void HandleCommonKey(intf_thread_t *intf, int key) { intf_sys_t *sys = intf->p_sys; @@ -1611,6 +1638,10 @@ static void HandleCommonKey(intf_thread_t *intf, int key) case 'z': playlist_VolumeDown(p_playlist, 1, NULL); break; case 'm': playlist_MuteToggle(p_playlist); break; + case 'c': CycleESTrack(sys, "audio-es"); break; + case 'v': CycleESTrack(sys, "spu-es"); break; + case 'b': CycleESTrack(sys, "video-es"); break; + case 0x0c: /* ^l */ case KEY_CLEAR: break; -- 1.7.10.4 >Release-Note: >Audit-Trail: >Unformatted: