Message ID | 42E9023B.7010701@gmail.com |
---|---|
State | New |
Headers |
Received: from fep16.inet.fi ([194.251.242.241]) by www.linuxtv.org with esmtp (Exim 4.34) id 1DyAsr-0008Kc-Ti for vdr@linuxtv.org; Thu, 28 Jul 2005 18:05:22 +0200 Received: from posti.hopto.org ([80.223.77.223]) by fep16.inet.fi with ESMTP id <20050728160517.MPDV27829.fep16.inet.fi@posti.hopto.org> for <vdr@linuxtv.org>; Thu, 28 Jul 2005 19:05:17 +0300 Received: from [10.0.0.3] (kone [10.0.0.3]) by posti.hopto.org (Postfix) with ESMTP id 1E7A4307807F for <vdr@linuxtv.org>; Thu, 28 Jul 2005 19:05:19 +0300 (EEST) Message-ID: <42E9023B.7010701@gmail.com> Date: Thu, 28 Jul 2005 19:05:15 +0300 From: Anssi Hannula <anssi.hannula@gmail.com> User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050322) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Klaus Schmidinger's VDR <vdr@linuxtv.org> Subject: Re: [vdr] Problem with streamdev-cvs and subtitles - workaround References: <42CC18BE.3040202@gmail.com> In-Reply-To: <42CC18BE.3040202@gmail.com> Content-Type: multipart/mixed; boundary="------------050303010903020608090701" X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Klaus Schmidinger's VDR <vdr@linuxtv.org> List-Id: Klaus Schmidinger's VDR <vdr.linuxtv.org> List-Unsubscribe: <http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr>, <mailto:vdr-request@linuxtv.org?subject=unsubscribe> List-Archive: <http://www.linuxtv.org/pipermail/vdr> List-Post: <mailto:vdr@linuxtv.org> List-Help: <mailto:vdr-request@linuxtv.org?subject=help> List-Subscribe: <http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr>, <mailto:vdr-request@linuxtv.org?subject=subscribe> X-List-Received-Date: Thu, 28 Jul 2005 16:05:22 -0000 Status: O X-Status: X-Keywords: X-UID: 3825 |
Commit Message
Anssi Hannula
July 28, 2005, 4:05 p.m. UTC
Anssi Hannula wrote: > Hi! > > Is anyone using subtitles (with subtitles-plugin) successfully in a > streamdev-cvs client? > > When I switch to any channel (subtitles or not), the video may stay > black, and jnettop confirms that no data is sent to the client. Same > thing happens with either dxr3 or xine as client's frontend. The client > is is running in the same host as the server. I suspect some race > condition in the plugin. > I managed to work around this problem with the attached patch (Apparently CmdTUNE deletes and recreates m_LiveStreamer, but nobody starts it again). I don't know if the patch has any side effects. Maybe streamdev's maintainer can see what's the problem and make a proper fix. The debuglogs are in the original message.
Comments
Anssi Hannula wrote: > Anssi Hannula wrote: > >> Hi! >> >> Is anyone using subtitles (with subtitles-plugin) successfully in a >> streamdev-cvs client? >> >> When I switch to any channel (subtitles or not), the video may stay >> black, and jnettop confirms that no data is sent to the client. Same >> thing happens with either dxr3 or xine as client's frontend. The >> client is is running in the same host as the server. I suspect some >> race condition in the plugin. >> > > I managed to work around this problem with the attached patch > (Apparently CmdTUNE deletes and recreates m_LiveStreamer, but nobody > starts it again). I don't know if the patch has any side effects. Maybe > streamdev's maintainer can see what's the problem and make a proper fix. > Apparently not so good workaround... Now if I start client with: -P"osdteletext -d /opt/vdr-shared/vtx" -Popenmhp -Pstreamdev-client -Ptext2skin -Pyaepg -Pdvd -P"xine -r" -Psubtitles => everything works -P"xine -r" -P"osdteletext -d /opt/vdr-shared/vtx" -Popenmhp -Pstreamdev-client -Ptext2skin -Pyaepg -Pdvd -Psubtitles => server crashes immediately when client starts And I'm unable to get the dxr3 plugin working with this at all. Server always crashes. I'll try to put some mutex locking to the streamdev classes, if I can figure out how they work ;)
Anssi Hannula wrote: > Anssi Hannula wrote: > >> Anssi Hannula wrote: >> >>> Is anyone using subtitles (with subtitles-plugin) successfully in a >>> streamdev-cvs client? >>> >>> When I switch to any channel (subtitles or not), the video may stay >>> black, and jnettop confirms that no data is sent to the client. Same >>> thing happens with either dxr3 or xine as client's frontend. The >>> client is is running in the same host as the server. I suspect some >>> race condition in the plugin. >>> >> >> I managed to work around this problem with the attached patch >> (Apparently CmdTUNE deletes and recreates m_LiveStreamer, but nobody >> starts it again). I don't know if the patch has any side effects. >> Maybe streamdev's maintainer can see what's the problem and make a >> proper fix. >> > And I'm unable to get the dxr3 plugin working with this at all. Server > always crashes. > > I'll try to put some mutex locking to the streamdev classes, if I can > figure out how they work ;) > Well, the problem indeed is in the order of OpenDvr, Set/Add/DelPid, and SetChannelDevice. When using subtitles plugin those differ. Also, if I tried to insert additional CloseDvr(); OpenDvr(); into those other functions, so that it would be executed as the last command, the server segfaults with a crapped backtrace. Cut from the backtrace: #2336 0x66a58f41 in ?? () #2337 0x354ba17e in ?? () #2338 0xe224fb44 in ?? () #2339 0xe19edc01 in ?? () #2340 0x05fd481f in ?? () #2341 0x714c71af in ?? ()
On Thu, 28 Jul 2005 21:59:27 +0300 Anssi Hannula <anssi.hannula@gmail.com> wrote: > Well, the problem indeed is in the order of OpenDvr, Set/Add/DelPid, and > SetChannelDevice. When using subtitles plugin those differ. Also, if I > tried to insert additional CloseDvr(); OpenDvr(); into those other > functions, so that it would be executed as the last command, the server > segfaults with a crapped backtrace. > > Cut from the backtrace: > #2336 0x66a58f41 in ?? () > #2337 0x354ba17e in ?? () > #2338 0xe224fb44 in ?? () > #2339 0xe19edc01 in ?? () > #2340 0x05fd481f in ?? () > #2341 0x714c71af in ?? () > Maybe you haven't compiled everything with debugging symbols? Each plugin has its own Makefile, right. Nice to see that you're getting this fixed. I can confirm that I've had the same problem for a few months, but never got around to find out what was going on. I'm on vacation next week, so maybe I could help you then if there are still problems. --Niko
Niko Mikkila wrote: > On Thu, 28 Jul 2005 21:59:27 +0300 > Anssi Hannula <anssi.hannula@gmail.com> wrote: > > >>Well, the problem indeed is in the order of OpenDvr, Set/Add/DelPid, and >>SetChannelDevice. When using subtitles plugin those differ. Also, if I >>tried to insert additional CloseDvr(); OpenDvr(); into those other >>functions, so that it would be executed as the last command, the server >>segfaults with a crapped backtrace. >> >>Cut from the backtrace: >>#2336 0x66a58f41 in ?? () >>#2337 0x354ba17e in ?? () >>#2338 0xe224fb44 in ?? () >>#2339 0xe19edc01 in ?? () >>#2340 0x05fd481f in ?? () >>#2341 0x714c71af in ?? () >> > > > Maybe you haven't compiled everything with debugging symbols? Each plugin > has its own Makefile, right. I use Make.config which is included by all plugins and has -g in CXXFLAGS. > Nice to see that you're getting this fixed. I can confirm that I've had the same problem > for a few months, but never got around to find out what was going on. > I'm on vacation next week, so maybe I could help you then if there are still > problems. I'll continue investigating this next week.
Index: server/connectionVTP.c =================================================================== RCS file: /var/cvsroot/streamdev/server/connectionVTP.c,v retrieving revision 1.7 diff -u -p -r1.7 connectionVTP.c --- server/connectionVTP.c 9 May 2005 20:22:29 -0000 1.7 +++ server/connectionVTP.c 28 Jul 2005 15:53:24 -0000 @@ -637,8 +637,10 @@ bool cConnectionVTP::CmdPORT(char *Opts) return Respond(551, "Couldn't open data connection"); } - if (id == siLive) + if (id == siLive) { + m_LiveStreamer->Stop(); m_LiveStreamer->Start(m_LiveSocket); + } return Respond(220, "Port command ok, data connection opened"); } @@ -661,6 +663,8 @@ bool cConnectionVTP::CmdTUNE(char *Opts) m_LiveStreamer = new cStreamdevLiveStreamer(1); m_LiveStreamer->SetChannel(chan, m_NoTSPIDS ? stTS : stTSPIDS); m_LiveStreamer->SetDevice(dev); + m_LiveStreamer->Stop(); + m_LiveStreamer->Start(m_LiveSocket); return Respond(220, "Channel tuned"); }