From patchwork Sun Mar 27 13:16:51 2005 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petri Helin X-Patchwork-Id: 11828 Received: from smtp3.pp.htv.fi ([213.243.153.36]) by www.linuxtv.org with esmtp (Exim 4.34) id 1DFXcy-0004JF-8I for vdr@linuxtv.org; Sun, 27 Mar 2005 15:16:28 +0200 Received: from [192.168.1.100] (cs154119.pp.htv.fi [213.243.154.119]) by smtp3.pp.htv.fi (Postfix) with ESMTP id D9E5D27AC33 for ; Sun, 27 Mar 2005 16:16:40 +0300 (EEST) Message-ID: <4246B243.1020904@welho.com> Date: Sun, 27 Mar 2005 16:16:51 +0300 From: Petri Helin User-Agent: Mozilla Thunderbird 1.0 (X11/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Klaus Schmidinger's VDR Subject: Re: [VDR] Patch for DVB-subtitles plugin. Enable changes in subtitling during playback. References: <4245FE8E.3080805@welho.com> <4D5233B63E%linux@youmustbejoking.demon.co.uk> In-Reply-To: <4D5233B63E%linux@youmustbejoking.demon.co.uk> X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Klaus Schmidinger's VDR List-Id: Klaus Schmidinger's VDR List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Mar 2005 13:16:28 -0000 Status: O X-Status: X-Keywords: X-UID: 1138 Darren Salt wrote: >I demand that Petri Helin may or may not have written... > > > >>This small piece should allow the user to change the subtitles during >>playback if the recording contains several to choose from. >> >> >[snip] > >Your patch is broken: some lines have been wrapped, trailing spaces have been >removed, and tabs have been expanded. At least some of this is a consequence >of including it inline in a message which has format=flowed. > >You should repost with your patch as an attachment. > > > Ok, I will try again, didn't think format=flowed would cause any harm. --- subfilter_old.c 2005-03-27 01:40:50.341352400 +0200 +++ subfilter.c 2005-03-27 02:05:12.164121560 +0200 @@ -387,11 +387,32 @@ void cSubtitlesChangedHandler::SubtitlingUpdate(const cSubtitleChannel* newChannel) { - if (!newChannel || primaryReplay || secondaryReplay) +// don't quit on replay +// if (!newChannel || primaryReplay || secondaryReplay) + if (!newChannel) return; cMutexLock lock(&mutex); +// Added this if-block to allow user to change the subtitles during replay + if (primaryReplay || secondaryReplay) { + if (newChannel->GetUserLanguage() == gSubtitlesConfiguration.language) { + DELETENULL(primaryReplay); + DELETENULL(secondaryReplay); + primaryReplay = new cDvbSubtitlesReplay(900,0x28); + } + else if (newChannel->GetUserLanguage() == gSubtitlesConfiguration.language2) { + DELETENULL(primaryReplay); + DELETENULL(secondaryReplay); + secondaryReplay = new cDvbSubtitlesReplay(1000,0x29); + } + else { + DELETENULL(primaryReplay); + DELETENULL(secondaryReplay); + } + } + + if (device != NULL && newChannel->GetId()==currentChannelId) { if (newChannel->GetUserLanguage() == USE_PREFERRED_LANGUAGES)