PDA

View Full Version : tivoserver development - NSLU2 and others



xannor
01-15-2006, 03:21 PM
I am starting a thread under Series 2 Development for the work I am doing on tivoserver to support the NSLU2. I do not want to gum up the tivoserver status and support (http://www.dealdatabase.com/forum/showthread.php?t=44485) thread anymore with my posts.

References: (my posts in the tivoserver thread)
http://www.dealdatabase.com/forum/showthread.php?p=244823#post244823
http://www.dealdatabase.com/forum/showthread.php?p=245133#post245133
http://www.dealdatabase.com/forum/showthread.php?p=245288#post245288
http://www.dealdatabase.com/forum/showthread.php?p=246317#post246317

SoFar:
I have built a patch to disable AVI transcoding support and have managed to get the tivoserver to launch and provide a list of its contents...

Current error:
When I pull a show I get a segfault but I think it is the same as the other problems relating to stdc++ lib support on the NSLU2, investigating.

xannor
01-15-2006, 03:31 PM
These are the changes I made to the ShowData.* files to get the tivoserver to launch and server the show information

ShowData.hh


- void xml2map( string obj, stringstream &ss );
+ void xml2map( string obj, const char *str, char **si );


ShowData.cc


void XMLmap::xml2map( string obj, const char *str, char **si ) {
char *s;
char buf[1000];

buf[1000]=0;

while( **si ){
char *eol = strchr(*si, '\n');
if(!eol || eol-*si > 999)
eol=*si+999;
if(eol-*si > strlen(*si))
eol = *si + strlen(*si)+1;
strncpy(buf, *si, eol-*si);
buf[eol-*si] = 0;
*si=eol+1;

unsigned int pos[10], npos=0;
pos[0] = 0;
char *p=buf;

while(*p && npos <3) {
if( *p == '<' || *p == '>'){
pos[npos++] = p-buf;
*p = 0;
}
p++;
}
if( npos<3) {
if( *(buf+pos[0]+1) == '/' ) {
return; // this object is complete
}

if( *(buf+pos[0]+1) == '/' ) continue; // xml header... ignore
s = strchr(buf+pos[0]+1, '\"');
if( !s ) continue;
s++;
char *p = strchr(s, '\"');
if( !p ) continue;
*p = 0;
xml2map(string(s) + ".", str, si);
continue;
}
string tag = obj + (buf+pos[0]+1);

string val = buf+pos[1]+1;

XMLmap::iterator mapTag = find(tag);
if( mapTag == end() ) {
(*this)[tag] = val;
} else {
mapTag->second+= "<";
mapTag->second+= val;
}
}
}


Now it will run and server up the files, but when I try to pull them, I get this as the error



Tivoserver 0.4.3
** Loading Local Shows From '/share/flash/data/public/TivoServer/' **
+ The Incredibles2004-01-0112.05 PM Fri Dec 02SEDG.tmf
SUCCESS: ( 2663253700 ) -> The Incredibles :
-----------------------------------------------------------------------------
+ Mad Max1979-01-0111.35 PM Fri Jan 06ENCR.tmf
SUCCESS: ( 1266915369 ) -> Mad Max :
-----------------------------------------------------------------------------
+ The Road Warrior1981-01-0102.00 AM Sat Jan 07IFC.tmf
SUCCESS: ( 2176904788 ) -> The Road Warrior :
-----------------------------------------------------------------------------
+ A Clockwork Orange1971-01-0103.50 AM Thu Jan 05MMAX.tmf
SUCCESS: ( 231231689 ) -> A Clockwork Orange :
-----------------------------------------------------------------------------
+ Nausicaä of the Valley of the Wind1984-01-0112.15 AM Fri Jan 13TCM.tmf
SUCCESS: ( 3624179555 ) -> Nausicaä of the Valley of the Wind :
-----------------------------------------------------------------------------
+ Castle in the Sky1986-01-0102.15 AM Fri Jan 13TCM.tmf
SUCCESS: ( 2272999444 ) -> Castle in the Sky :
-----------------------------------------------------------------------------
+ Mad Max Beyond Thunderdome1985-01-0102.35 PM Thu Dec 22EACT.tmf
SUCCESS: ( 3326918558 ) -> Mad Max Beyond Thunderdome :
-----------------------------------------------------------------------------
+ Big Trouble in Little China1986-01-0112.00 AM Sat Jan 14FMC.tmf
SUCCESS: ( 3659456233 ) -> Big Trouble in Little China :
-----------------------------------------------------------------------------
****** Finished Loading 8 Shows ******
Adding Tivo: *** (***)
0x00000000
0x00014103
0x00014104
SELECTED TITLE:
-------------=> SHOWLIST <=--------------- (0) The Incredibles ()
(1) Mad Max Beyond Thunderdome ()
(2) A Clockwork Orange ()
(3) Mad Max ()
(4) The Road Warrior ()
(5) Nausicaä of the Valley of the Wind ()
(6) Castle in the Sky ()
(7) Big Trouble in Little China ()
--------------------------------------------
Selected Show = 0
--------------------------------------------
0x00014103
0x0001100a
<-------------- 0: The Incredibles
<-------------- 1: Mad Max Beyond Thunderdome
<-------------- 2: A Clockwork Orange
<-------------- 3: Mad Max
<-------------- 4: The Road Warrior
<-------------- 5: Nausicaä of the Valley of the Wind
<-------------- 6: Castle in the Sky
<-------------- 7: Big Trouble in Little China
0x00000000
0x00014103
0x00014104
SELECTED TITLE:
-------------=> SHOWLIST <=--------------- (0) The Incredibles ()
(1) Mad Max Beyond Thunderdome ()
(2) A Clockwork Orange ()
(3) Mad Max ()
(4) The Road Warrior ()
(5) Nausicaä of the Valley of the Wind ()
(6) Castle in the Sky ()
(7) Big Trouble in Little China ()
--------------------------------------------
Selected Show = 0
--------------------------------------------
0x00014103
0x0001100a
<-------------- 0: The Incredibles
0x00000000
0x00014103
0x00014104
SELECTED TITLE:
-------------=> SHOWLIST <=--------------- (0) The Incredibles ()
(1) Mad Max Beyond Thunderdome ()
(2) A Clockwork Orange ()
(3) Mad Max ()
(4) The Road Warrior ()
(5) Nausicaä of the Valley of the Wind ()
(6) Castle in the Sky ()
(7) Big Trouble in Little China ()
--------------------------------------------
Selected Show = 0
--------------------------------------------
0x00014103
0x0001100a
<-------------- 0: The Incredibles
<-------------- 1: Mad Max Beyond Thunderdome
<-------------- 2: A Clockwork Orange
<-------------- 3: Mad Max
<-------------- 4: The Road Warrior
<-------------- 5: Nausicaä of the Valley of the Wind
<-------------- 6: Castle in the Sky
<-------------- 7: Big Trouble in Little China
0x00000000
0x00014103
0x00014104
SELECTED TITLE:
-------------=> SHOWLIST <=--------------- (0) The Incredibles ()
(1) Mad Max Beyond Thunderdome ()
(2) A Clockwork Orange ()
(3) Mad Max ()
(4) The Road Warrior ()
(5) Nausicaä of the Valley of the Wind ()
(6) Castle in the Sky ()
(7) Big Trouble in Little China ()
--------------------------------------------
Selected Show = 0
--------------------------------------------
0x00014103
0x0001100a
<-------------- 0: The Incredibles
0x00000000
0x00014103
0x00014104
SELECTED TITLE:
-------------=> SHOWLIST <=--------------- (0) The Incredibles ()
(1) Mad Max Beyond Thunderdome ()
(2) A Clockwork Orange ()
(3) Mad Max ()
(4) The Road Warrior ()
(5) Nausicaä of the Valley of the Wind ()
(6) Castle in the Sky ()
(7) Big Trouble in Little China ()
--------------------------------------------
Selected Show = 0
--------------------------------------------
0x00014103
0x0001100a
<-------------- 0: The Incredibles
<-------------- 1: Mad Max Beyond Thunderdome
<-------------- 2: A Clockwork Orange
<-------------- 3: Mad Max
<-------------- 4: The Road Warrior
<-------------- 5: Nausicaä of the Valley of the Wind
<-------------- 6: Castle in the Sky
<-------------- 7: Big Trouble in Little China
0x00000000
Adding Tivo: ()
0x00014103
0x00014104
SELECTED TITLE:
-------------=> SHOWLIST <=--------------- (0) The Incredibles ()
(1) Mad Max Beyond Thunderdome ()
(2) A Clockwork Orange ()
(3) Mad Max ()
(4) The Road Warrior ()
(5) Nausicaä of the Valley of the Wind ()
(6) Castle in the Sky ()
(7) Big Trouble in Little China ()
--------------------------------------------
Selected Show = 0
--------------------------------------------
0x00014103
0x0001100a
<-------------- 0: The Incredibles
<-------------- 1: Mad Max Beyond Thunderdome
<-------------- 2: A Clockwork Orange
<-------------- 3: Mad Max
<-------------- 4: The Road Warrior
<-------------- 5: Nausicaä of the Valley of the Wind
<-------------- 6: Castle in the Sky
<-------------- 7: Big Trouble in Little China
0x00000000
0x00014103
0x00014104
SELECTED TITLE:
-------------=> SHOWLIST <=--------------- (0) The Incredibles ()
(1) Mad Max Beyond Thunderdome ()
(2) A Clockwork Orange ()
(3) Mad Max ()
(4) The Road Warrior ()
(5) Nausicaä of the Valley of the Wind ()
(6) Castle in the Sky ()
(7) Big Trouble in Little China ()
--------------------------------------------
Selected Show = 0
--------------------------------------------
0x00014103
0x0001100a
<-------------- 0: The Incredibles
0x00000000
0x00010661
0x0001065e
Segmentation fault


Looks like I have to dig a bit more and see what is having the error now. Probably another stream issue.

n4zmz
01-17-2006, 12:11 PM
I noticed that you are not running the latest CVS, I fixed some of the debugging information along with a lot of the show information.

I use gdb to find the segfaults, but since I don't have a nslu2, I don't know if it is available for it.

The debug output is looking promising.

coolnetman
07-27-2007, 08:50 PM
Hey all!
Has anyone ever gotten this working? I'm eyeing the new ASUS WL500-W and a WD Mybook for the storage piece....with this working its a done deal, game over. What's the status and how can I help?

Thanks
CMAN