From patchwork Sun Mar 27 00:30:06 2005 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petri Helin X-Patchwork-Id: 11825 Received: from smtp2.pp.htv.fi ([213.243.153.35]) by www.linuxtv.org with esmtp (Exim 4.34) id 1DFLex-000131-Jp for vdr@linuxtv.org; Sun, 27 Mar 2005 01:29:43 +0100 Received: from [192.168.1.100] (cs154119.pp.htv.fi [213.243.154.119]) by smtp2.pp.htv.fi (Postfix) with ESMTP id 06616296B51 for ; Sun, 27 Mar 2005 02:29:56 +0200 (EET) Message-ID: <4245FE8E.3080805@welho.com> Date: Sun, 27 Mar 2005 02:30:06 +0200 From: Petri Helin User-Agent: Mozilla Thunderbird 1.0 (X11/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: vdr@linuxtv.org Subject: [VDR] Patch for DVB-subtitles plugin. Enable changes in subtitling during playback. 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 00:29:43 -0000 Status: O X-Status: X-Keywords: X-UID: 1122 This small piece should allow the user to change the subtitles during playback if the recording contains several to choose from. -Petri ---------------------------------------------------------------------------------------------------------------------------------------------------------------- if (device != NULL && newChannel->GetId()==currentChannelId) { if (newChannel->GetUserLanguage() == USE_PREFERRED_LANGUAGES) --- 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); + } + } + +