From patchwork Thu Mar 21 21:21:25 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Magnus_Sirwi=C3=B6?= X-Patchwork-Id: 17561 Received: from localhost ([127.0.0.1] helo=www.linuxtv.org) by www.linuxtv.org with esmtp (Exim 4.72) (envelope-from ) id 1UImvn-0000WK-Ke; Thu, 21 Mar 2013 22:21:51 +0100 Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.72) (envelope-from ) id 1UImvQ-0000W4-0I for vdr@linuxtv.org; Thu, 21 Mar 2013 22:21:50 +0100 X-tubIT-Incoming-IP: 157.55.2.102 Received: from dub0-omc4-s27.dub0.hotmail.com ([157.55.2.102]) by mail.tu-berlin.de (exim-4.75/mailfrontend-2) with esmtp for id 1UImvP-0006iU-I8; Thu, 21 Mar 2013 22:21:27 +0100 Received: from DUB120-W31 ([157.55.2.73]) by dub0-omc4-s27.dub0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4675); Thu, 21 Mar 2013 14:21:25 -0700 X-EIP: [bNvSWctYAfdz2V7O0jLoWuai4Y5h8pQs] X-Originating-Email: [sirwio@hotmail.com] Message-ID: From: =?iso-8859-1?B?TWFnbnVzIFNpcndp9g==?= To: "vdr@linuxtv.org" Date: Thu, 21 Mar 2013 21:21:25 +0000 Importance: Normal In-Reply-To: <2080990.BeyomqeigK@nop> References: <14358675.91UhXQkOyA@nop> <514B7026.5010004@web.de>,<2080990.BeyomqeigK@nop> MIME-Version: 1.0 X-OriginalArrivalTime: 21 Mar 2013 21:21:25.0600 (UTC) FILETIME=[0B31C600:01CE267A] X-PMX-Version: 5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2013.3.21.211215 X-PMX-Spam: Gauge=IIIIIIII, Probability=8%, Report=' HTML_00_01 0.05, HTML_00_10 0.05, MSGID_ADDED_BY_MTA 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_2000_2999 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, WEBMAIL_SOURCE 0, __ANY_URI 0, __BOUNCE_CHALLENGE_SUBJ 0, __BOUNCE_NDR_SUBJ_EXEMPT 0, __CP_URI_IN_BODY 0, __CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __FORWARDED_MSG 0, __FRAUD_WEBMAIL 0, __FRAUD_WEBMAIL_FROM 0, __FROM_HOTMAIL 0, __HAS_FROM 0, __HAS_MSGID 0, __HAS_XOAT 0, __IN_REP_TO 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __PHISH_SPEAR_STRUCTURE_1 0, __RDNS_HOTMAIL 0, __RECEIVED_FROM_MSN_LIVE 0, __SANE_MSGID 0, __SUBJ_ALPHA_END 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __URI_NS ' X-LSpam-Score: -1.1 (-) X-LSpam-Report: No, score=-1.1 required=5.0 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, RDNS_NONE=0.793 autolearn=no Subject: Re: [vdr] Patch: Add 'MUTEON' and 'MUTEOFF' options to the SVDRP VOLU command X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: VDR Mailing List List-Id: VDR Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: vdr-bounces@linuxtv.org Errors-To: vdr-bounces@linuxtv.org Why can't you use the HITK svdrp command sending the MUTE key? # svdrpsend hitk mute - Magnus ---------------------------------------- From: sebastian@familie-frei.net To: vdr@linuxtv.org Date: Thu, 21 Mar 2013 22:03:50 +0100 Subject: Re: [vdr] Patch: Add 'MUTEON' and 'MUTEOFF' options to the SVDRP VOLU command Hi Hardy, yes you are right. This one should be better: Best regards Sebastian Am Donnerstag, 21. März 2013, 21:40:06 schrieb Hardy Flor: > Hi Sebastian Frei, > > with ... &&(!cDevice::PrimaryDevice()->IsMute())) is the command not > recognized and the string "Unknown option: MuteON" will return, when you > call svdr more than one with "MuteON". > > Hardy > > > _______________________________________________ > vdr mailing list > vdr@linuxtv.org > http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr --- vdr-1.7.41/svdrp.c 2013-02-17 14:17:36.000000000 +0100 +++ vdr-1.7.41.mute/svdrp.c 2013-03-21 21:58:34.226895799 +0100 @@ -317,12 +317,13 @@ "UPDR\n" " Initiates a re-read of the recordings directory, which is the SVDRP\n" " equivalent to 'touch .update'.", - "VOLU [ | + | - | mute ]\n" + "VOLU [ | + | - | mute | muteon | muteoff ]\n" " Set the audio volume to the given number (which is limited to the range\n" " 0...255). If the special options '+' or '-' are given, the volume will\n" " be turned up or down, respectively. The option 'mute' will toggle the\n" - " audio muting. If no option is given, the current audio volume level will\n" - " be returned.", + " audio muting, 'muteon' will turn muting on, 'muteoff' will turn muting\n" + " off. If no option is given, the current audio volume level will be\n" + " returned.", "QUIT\n" " Exit vdr (SVDRP).\n" " You can also hit Ctrl-D to exit.", @@ -1609,6 +1610,12 @@ cDevice::PrimaryDevice()->SetVolume(-VOLUMEDELTA); else if (strcasecmp(Option, "MUTE") == 0) cDevice::PrimaryDevice()->ToggleMute(); + else if ((strcasecmp(Option, "MUTEON") == 0) + if (!cDevice::PrimaryDevice()->IsMute())) + cDevice::PrimaryDevice()->ToggleMute(); + else if ((strcasecmp(Option, "MUTEOFF") == 0) + if (cDevice::PrimaryDevice()->IsMute())) + cDevice::PrimaryDevice()->ToggleMute(); else { Reply(501, "Unknown option: \"%s\"", Option); return;