From patchwork Sun Feb 17 15:41:14 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Klaus Schmidinger X-Patchwork-Id: 12600 Received: from raven.cadsoft.de ([217.7.101.211]) by www.linuxtv.org with esmtp (Exim 4.63) (envelope-from ) id 1JQldj-0000Ij-Fd for vdr@linuxtv.org; Sun, 17 Feb 2008 16:41:15 +0100 Received: from [192.168.100.10] (hawk.cadsoft.de [192.168.100.10]) by raven.cadsoft.de (8.13.3/8.13.3) with ESMTP id m1HFfEPQ028172 for ; Sun, 17 Feb 2008 16:41:14 +0100 Message-ID: <47B8559A.6050102@cadsoft.de> Date: Sun, 17 Feb 2008 16:41:14 +0100 From: Klaus Schmidinger Organization: CadSoft Computer GmbH User-Agent: Thunderbird 2.0.0.9 (X11/20070801) MIME-Version: 1.0 To: vdr@linuxtv.org References: <47815908.6080608@googlemail.com> <47815CDD.1090005@gmx.de> <47ADC894.4030309@cadsoft.de> <47B6FD6F.6050805@cadsoft.de> <47B71382.4050507@googlemail.com> In-Reply-To: <47B71382.4050507@googlemail.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (raven.cadsoft.de [192.168.1.1]); Sun, 17 Feb 2008 16:41:15 +0100 (CET) Subject: Re: [vdr] ERROR: can't set PID xxxx on device y X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.9 Precedence: list Reply-To: VDR Mailing List List-Id: VDR Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Feb 2008 15:41:15 -0000 Status: O X-Status: X-Keywords: X-UID: 15759 On 02/16/08 17:46, Petri Helin wrote: > Klaus Schmidinger wrote: >> On 02/09/08 16:36, Klaus Schmidinger wrote: >>> On 01/06/08 23:57, Reinhard Nissl wrote: >>>> Hi, >>>> >>>> Petri Helin schrieb: >>>> >>>>> since VDR became subtitles aware some months ago, I have been getting >>>>> this kind of entries in the log: >>>>> >>>>> Jan 6 23:02:48 vdr vdr: [4506] ERROR: can't set PID 2027 on device 9 >>>>> >>>>> PID 2027 is for a finnish subtitles stream. >>>>> >>>>> I cannot see anything failing or such when this entry appears, but just >>>>> thought to let Klaus know about it, in case it would make some sense to him. >>>> I came across this log message today, too. Looks like >>>> SetCurrentSubtitleTrack() calls AttachReceiver() on the >>>> PrimaryDevice() which is cXineDevice in my case. >>>> >>>>> (gdb) bt >>>>> #0 0x080bbabb in cDevice::AddPid (this=0xb44c49f8, Pid=131, PidType=ptOther) at device.c:612 >>>>> #1 0x080bbc00 in cDevice::AttachReceiver (this=0xb44c49f8, Receiver=0xb44e2078) at device.c:1502 >>>>> #2 0x080be272 in cDevice::SetCurrentSubtitleTrack (this=0xb44c49f8, Type=ttSubtitle, Manual=false) at device.c:1052 >>>>> #3 0x080be3b4 in cDevice::EnsureSubtitleTrack (this=0xb44c49f8) at device.c:1104 >>>>> #4 0x080be58d in cDevice::SetAvailableTrack (this=0xb44c49f8, Type=ttSubtitle, Index=0, Id=131, Language=0x82529c8 "deu", Description=0x0) at device.c:984 >>>>> #5 0x080bf0cb in cDevice::SetChannel (this=0xb44c49f8, Channel=0x82526c8, LiveView=true) at device.c:845 >>>>> #6 0x080bf1ae in cDevice::SwitchChannel (this=0xb44c49f8, Channel=0x82526c8, LiveView=true) at device.c:735 >>>>> #7 0x080a59bd in cChannels::SwitchTo (this=0x81a9880, Number=2) at channels.c:1201 >>>>> #8 0x08158988 in main (argc=14, argv=0xbf993d34) at vdr.c:762 >>>> Looks like Transferring() isn't set at that time and therefore a >>>> cLiveSubtitle instance is created although none is needed in >>>> transfer mode (which is the only way how my setup works). >>>> >>>>> 1048 if (currentSubtitleTrack != ttNone && !Replaying() && !Transferring()) { >>>>> 1049 const tTrackId *TrackId = GetTrack(currentSubtitleTrack); >>>>> 1050 if (TrackId && TrackId->id) { >>>>> 1051 liveSubtitle = new cLiveSubtitle(TrackId->id); >>>>> 1052 AttachReceiver(liveSubtitle); >>>>> 1053 } >>>>> 1054 } >>> SetChannel() in live mode triggers a Transfer-Mode, but that is actually >>> only started after SetChannel() has ended. Therefore, as you correctly >>> pointed out, Transferring is not yet set in EnsureSubtitleTrack(). >>> >>> Maybe the sequence >>> >>> if (!NeedsTransferMode) >>> EnsureAudioTrack(true); >>> EnsureSubtitleTrack(); >>> >>> should be changed to >>> >>> if (!NeedsTransferMode) { >>> EnsureAudioTrack(true); >>> EnsureSubtitleTrack(); >>> } >>> >>> >>> Could you please test this? >>> >>> Klaus >> Still waiting for verification. >> > > Sorry, had forgotten this... I made the change you suggested in > device.c, but I am still seeing the error message. I believe this should fix it: Klaus --- device.c 2008/02/16 13:52:11 1.153 +++ device.c 2008/02/17 15:40:08 @@ -1049,7 +1049,7 @@ const tTrackId *TrackId = GetTrack(currentSubtitleTrack); if (TrackId && TrackId->id) { liveSubtitle = new cLiveSubtitle(TrackId->id); - AttachReceiver(liveSubtitle); + ActualDevice()->AttachReceiver(liveSubtitle); } } return true;