PDA

View Full Version : Support for streaming from a ReplayTV


rtvguy
2004-01-02, 23:52
members of the xbmc team,

i have added a feature to xbmc requested by some that allows it to do streaming playback of shows recorded on a networked replaytv 4000/5000/5500 series. *i thought i would post here to get input on the best way to get this included in future versions of xbmc. *i assume that i should just add the necessary files and patches to the patch section on sf, but i wanted to go ahead and give a heads up here of what integrating this feature entails. *below is the readme file i am planning to include with the patches and source. *i appreciate any comments and assistance in getting this included and thanks for all your hard work on xbmc!


************************************************** *************************
xbmc support for streaming shows from a replaytv by rtvguy
************************************************** *************************
this patch adds support for streaming shows recorded on a networked
replaytv 4000, 4500, 5000, or 5500 series pvr directly to xbmc for
playback. *this is accomplished by adding a new streaming protocol to xbmc
that i call the rtv protocol. *this protocol is implemented in a manner
similar to xbms in that most of the code rests in a dynamically-loaded
library called librtv. *the source code to this library is included in the
patch .zip file.

integrating this patch into the xbmc cvs should be fairly straightforward,
as described below.

************************************************** *************************
changed xbmc files:
************************************************** *************************
1) xbmc/application.cpp
the included application.cpp.patch file modifies this file to provide
support for loading the librtv library.

2) xbmc/filesystem/factorydirectory.cpp
the included factorydirectory.cpp.patch file modifies this file to add
support for the crtvdirectory class.

3) xbmc/filesystem/filefactory.cpp
the included filefactory.cpp.patch file modifies this file to add support
for the cfilertv class.

4) mplayer/mplayer.dll
the file libmpdemux/open.c in docs/mplayer_sourcecodepatch.rar must be
modified to add support for the rtv protocol.
specifically, the following line:
if (stricmp(url->protocol, "xmbs") &&
stricmp(url->protocol, "xns") &&
stricmp(url->protocol, "shout") &&
stricmp(url->protocol, "cdda") &&
stricmp(url->protocol, "smb") &&
stricmp(url->protocol, "iso9660") )
must be changed to:
if (stricmp(url->protocol, "xmbs") &&
stricmp(url->protocol, "xns") &&
stricmp(url->protocol, "shout") &&
stricmp(url->protocol, "cdda") &&
stricmp(url->protocol, "smb") &&
stricmp(url->protocol, "rtv") &&
stricmp(url->protocol, "iso9660") )

5) xbmc.vcproj
the included xbmc.vcproj.patch file modifies this file to add the files
rtvdirectory.h, rtvdirectory.cpp, filertv.h, and filertv.cpp to the xbmc
project and also suppresses preloading of the librtv library.

************************************************** *************************
added xbmc files:
************************************************** *************************
1)xbmc/filesystem/rtvdirectory.h
the interface for the crtvdirectory class.

2)xbmc/filesystem/rtvdirectory.cpp
the implementation of the crtvdirectory class.

3)xbmc/filesystem/filertv.h
the interface for the cfilertv class.

4)xbmc/filesystem/filertv.cpp
the implementation of the cfilertv class.

5) docs/librtv.rar
this file contains complete source code for the librtv library.

************************************************** *************************
added xbmc directories:
************************************************** *************************
1) xbmc/lib/librtv
this directory should contain the librtv binaries built from the source
code included in "docs/librtv.rar" (release: librtv.lib, debug:
librtvd.lib). *this directory should also include the *.h header files from
the "docs/librtv.rar" file.

************************************************** *************************
instructions for use:
************************************************** *************************
setting up rtv shares in a build of xbmc that includes support for them is
easy. *just add the necessary info under the <video> section of
xboxmediacenter.xml, much as you would for a relax or xbms share *there are
2 different kinds of shares, each with two different show listing formats.

share type #1 - manual rtv share

listing format a (preferred)
the following example will display a list of recordings by name (as
retrieved from the replayguide) for the replaytv with the ip address of
192.168.1.100.
* *<bookmark>
* * *<name>name of your choice</name>
* * *<path>rtv://192.168.1.100/</path> * *
* *</bookmark>
*
listing format b
the following example will display a list of recordings by *filename only*
for the replaytv with the ip address of 192.168.1.100. *this can be useful
if for some reason your replayguide cannot be properly parsed (all known
replayguide formats as of 01/04 should be supported).
* *<bookmark>
* * *<name>name of your choice</name>
* * *<path>rtv://192.168.1.100/video</path> * *
* *</bookmark>

share type #2 - automatic rtv share

listing format a (preferred)
the following example will attempt to automatically discover and list in
xbmc *all* replaytvs on your lan. *selecting a particular replaytv in the
list will then display its recordings by name as described above.
* *<bookmark>
* * *<name>name of your choice</name>
* * *<path>rtv://*/</path> * *
* *</bookmark>

listing format b
the following example will attempt to automatically discover and list in
xbmc *all* replaytvs on your lan. *selecting a particular replaytv in the
list will then display its recordings by *filename only* as described
above.
* *<bookmark>
* * *<name>name of your choice</name>
* * *<path>rtv://*/video</path> * *
* *</bookmark>
* *
that's it!

Hullebulle
2004-01-03, 04:36
i am not a dev and i don't have a replaytv, but this sounds veeery interesting. :)

Gamester17
2004-01-05, 17:32
cool, please submit the sourcecode on sourceforge (link here) (http://sourceforge.net/tracker/?group_id=87054&atid=581840) and/or upload it here here (link) (http://www.xboxmediaplayer.it/upload) *:)

rtvguy
2004-01-06, 00:44
thanks! i submitted the sourcecode to the sourceforge patches section for xbmc (sorry about the screwed up formatting in the description there as a result of my copy/paste). let me know if any additional explanation etc. is needed.

cyberplague
2004-01-08, 18:17
awesome work! can't wait till this gets merged into cvs!

keep xbmc rolling!

cp

cyberplague
2004-01-09, 00:42
any idea when this will be merged into cvs? *i have a replaytv and would love to test it out!

let me know,

cp

Eraserhead
2004-01-09, 21:08
fantastic news! :d
i too would be happy to test it.

tdfsu
2004-01-09, 21:25
ditto. i will test it too.

-jason.

Frodo
2004-01-11, 20:37
sounds cool.
however can you upload the files changed entirely
instead of patches?

frodo

rtvguy
2004-01-12, 02:07
sounds cool.
however can you upload the files changed entirely
instead of patches?

frodo
no problem. *i uploaded an updated .zip file that includes the changed files at the sourceforge patch section for xbmc.
http://sourceforge.net/tracker....=581840 (http://sourceforge.net/tracker/index.php?func=detail&aid=871270&group_id=87054&atid=581840)

i noticed that changes have been made to the open.c file in mplayer_sourcecodepatch.rar since i last got it from cvs. *namely, part of the code that previously needed a slight modification to add rtv protocol support is now not compiled into the mplayer.dll binary due to mplayer_network not being defined. *so, currently no changes are needed there. *will that code be included again at some point in the future of xbmc? *just in case it will, i did include a modified open.c that includes the one-line change necessary for rtv protocol support.

please let me know if i can provide any other info that will assist in integrating this into cvs. *thanks!

mlrtime
2004-01-16, 22:21
any updates on a cvs build?

thanks for the great app..

mlr

cyberplague
2004-01-20, 03:50
any update on integration frodo?

i tried to compile it with the above patch however i got some errors, so that may be holding you back...

keep me posted!

cp

Frodo
2004-01-20, 09:01
will see if i can include it in cvs tonight
frodo

cyberplague
2004-01-21, 19:31
any luck? http://www.xboxmediaplayer.de/forums/non-cgi/emoticons/tounge.gif

cp

rtvguy
2004-01-24, 10:19
frodo or gamester17,

gamester17 has requested that i test the cvs implementation of my patch, but so far this has not shown up in the anonymous cvs. however, it is reportedly in the developer cvs now--is that correct?

Hullebulle
2004-01-25, 00:57
frodo or gamester17,

gamester17 has requested that i test the cvs implementation of my patch, but so far this has not shown up in the anonymous cvs. *however, it is reportedly in the developer cvs now--is that correct?
yep it has been added. guess it will be in anon cvs in a few hours.

jeffscott72
2004-01-26, 21:58
i downloaded the files from the patch section (actual files d/l not the patch d/l).

i copied them to the appropriate directories in my local copy of the cvs.

when i go to compile it, i get a ton of errors. here is a link to the build log: log (http://www.grtscott.com/buildlog.htm)

is there something i'm missing or possibly not doing right?

thanks,

jeff

prophead
2004-01-27, 07:37
it looks like you're missing lib/rtv!
i downloaded the files from the patch section (actual files d/l not the patch d/l).

i copied them to the appropriate directories in my local copy of the cvs.

when i go to compile it, i get a ton of errors. here is a link to the build log: log (http://www.grtscott.com/buildlog.htm)

is there something i'm missing or possibly not doing right?

thanks,

jeff


|-<:)

prophead
2004-01-27, 07:41
not yet.....
yep it has been added. guess it will be in anon cvs in a few hours.
|-<:)

jeffscott72
2004-01-27, 16:47
it looks like you're missing lib/rtv!
i copied the library folder to the correct area in the cvs folders. is there something i need to do in visual studio to make it recognize the library?

thanks,

jeff

cyberplague
2004-01-27, 17:56
jeff- no you are doing everything correct. there are some errors in the code or something that the anon-cvs is missing. hasn't been updated in ages.

we just have to wait for it to update with the code included.

/me patiently waits...

cp

jeffscott72
2004-01-28, 00:47
how long has it been since it was last updated? a week, a month or longer?

cyberplague
2004-01-28, 01:44
i am not positive, hopefully one of the devs will reply with the correct answer. it seems touch and go, but i think it may be weeks... =/

cp

rtvguy
2004-01-28, 04:40
the build errors appear to be due to the changes recently made to xbmc to deal with playing/seeking in files >2gb. you can fix them pretty easily. just look at the updated function definitions for the other streaming classes (xns, xbmsp, etc.), compare them to the rtv class, and modify accordingly. or, just wait until the cvs is updated.

cyberplague
2004-01-28, 07:58
rtvguy - thanks for the big help... now all i have to do is get rid of this screensaver patch crap so i can get the whole thing to compile....hehehe

i will try again tomorrow.

cp

forza
2004-01-28, 15:30
what's your problem with the screensaver code?

cyberplague
2004-01-28, 18:33
below are some of the errors i am getting.


xbmc\guiwindowvideo.cpp(607) : error c2065: 'window_dialog_filestacking' : undeclared identifier
guiwindowsysteminfo.cpp
guiwindowslideshow.cpp
guiwindowsettingsuicalibration.cpp
guiwindowsettingssubtitles.cpp
guiwindowsettingsslideshow.cpp
guiwindowsettingsscreencalibration.cpp
guiwindowsettingsscreen.cpp
guiwindowsettingsmusic.cpp
guiwindowsettingsgeneral.cpp
guiwindowsettingsfilter.cpp
guiwindowscriptsinfo.cpp
guiwindowscripts.cpp
xbmc\guiwindowscripts.cpp(545) : error c2065: 'window_scripts_info' : undeclared identifier
generating code...
compiling...
guiwindowprograms.cpp
guiwindowpictures.cpp
guiwindowmyfiles.cpp
guiwindowmusictop100.cpp
guiwindowmusicsongs.cpp
guiwindowmusicplaylist.cpp
guiwindowmusicoverlay.cpp
guiwindowmusicinfo.cpp
guiwindowmusicgenres.cpp
guiwindowmusicbase.cpp
guiwindowmusicartists.cpp
guiwindowmusicalbum.cpp
guiwindowhome.cpp
compiling for xbox: c:\xbmc\xbmc\xbox/xkutils.h
compiling for xbox: c:\xbmc\xbmc\xbox\xkexports.h
guiwindowfullscreen.cpp
xbmc\guiwindowfullscreen.cpp(230) : error c2065: 'remote_0' : undeclared identifier
xbmc\guiwindowfullscreen.cpp(230) : error c2051: case expression not constant
xbmc\guiwindowfullscreen.cpp(231) : error c3861: 'remote_0': identifier not found, even with argument-dependent lookup
xbmc\guiwindowfullscreen.cpp(233) : error c2065: 'remote_1' : undeclared identifier
xbmc\guiwindowfullscreen.cpp(233) : error c2051: case expression not constant
xbmc\guiwindowfullscreen.cpp(234) : error c3861: 'remote_1': identifier not found, even with argument-dependent lookup
xbmc\guiwindowfullscreen.cpp(236) : error c2065: 'remote_2' : undeclared identifier
xbmc\guiwindowfullscreen.cpp(236) : error c2051: case expression not constant
xbmc\guiwindowfullscreen.cpp(237) : error c3861: 'remote_2': identifier not found, even with argument-dependent lookup
xbmc\guiwindowfullscreen.cpp(239) : error c2065: 'remote_3' : undeclared identifier
xbmc\guiwindowfullscreen.cpp(239) : error c2051: case expression not constant
xbmc\guiwindowfullscreen.cpp(240) : error c3861: 'remote_3': identifier not found, even with argument-dependent lookup
xbmc\guiwindowfullscreen.cpp(242) : error c2065: 'remote_4' : undeclared identifier
xbmc\guiwindowfullscreen.cpp(242) : error c2051: case expression not constant
xbmc\guiwindowfullscreen.cpp(243) : error c3861: 'remote_4': identifier not found, even with argument-dependent lookup
xbmc\guiwindowfullscreen.cpp(245) : error c2065: 'remote_5' : undeclared identifier
xbmc\guiwindowfullscreen.cpp(245) : error c2051: case expression not constant
xbmc\guiwindowfullscreen.cpp(246) : error c3861: 'remote_5': identifier not found, even with argument-dependent lookup
xbmc\guiwindowfullscreen.cpp(248) : error c2065: 'remote_6' : undeclared identifier
xbmc\guiwindowfullscreen.cpp(248) : error c2051: case expression not constant
xbmc\guiwindowfullscreen.cpp(249) : error c3861: 'remote_6': identifier not found, even with argument-dependent lookup
xbmc\guiwindowfullscreen.cpp(251) : error c2065: 'remote_7' : undeclared identifier
xbmc\guiwindowfullscreen.cpp(251) : error c2051: case expression not constant
xbmc\guiwindowfullscreen.cpp(252) : error c3861: 'remote_7': identifier not found, even with argument-dependent lookup
xbmc\guiwindowfullscreen.cpp(254) : error c2065: 'remote_8' : undeclared identifier
xbmc\guiwindowfullscreen.cpp(254) : error c2051: case expression not constant
xbmc\guiwindowfullscreen.cpp(255) : error c3861: 'remote_8': identifier not found, even with argument-dependent lookup
xbmc\guiwindowfullscreen.cpp(257) : error c2065: 'remote_9' : undeclared identifier
xbmc\guiwindowfullscreen.cpp(257) : error c2051: case expression not constant
xbmc\guiwindowfullscreen.cpp(258) : error c3861: 'remote_9': identifier not found, even with argument-dependent lookup
guidialogselect.cpp
guidialogprogress.cpp
fileitem.cpp
detectdvdtype.cpp
autorun.cpp
applicationmessenger.cpp
compiling for xbox: c:\xbmc\xbmc\xbox/xkutils.h
compiling for xbox: c:\xbmc\xbmc\xbox\xkexports.h
xbmc\applicationmessenger.cpp(179) : error c2065: 'window_scripts_info' : undeclared identifier
generating code...
compiling...
application.cpp
compiling for xbox: c:\xbmc\xbmc\xbox/xkutils.h
compiling for xbox: c:\xbmc\xbmc\xbox\xkexports.h
xbmc\application.cpp(327) : error c2065: 'window_screensaver' : undeclared identifier
xbmc\application.cpp(870) : error c3861: 'window_screensaver': identifier not found, even with argument-dependent lookup


any help would be appreciated, your screensavers sound sweet. *but all i want to do is test out replaytv support.

thanks for you help,

cp

forza
2004-01-28, 20:31
window_screensaver is defined in key.h (in the guilib folder), it has a value of 2900 if you need to add it in manually.

looks like the anonymous cvs @ sourceforge is out of synch (again).

cyberplague
2004-01-28, 23:45
could just be that i am a moron and wasn't updating my cvs right... =/

compiling now...can't wait to test both the screensaver and the rtv support when i get home...weeeee

cp

jeffscott72
2004-01-29, 05:17
cp,

how did you last compile go?

jeffscott72
2004-01-29, 07:11
i changed all the offset_t to __int64 int the filertv.h & filertv.cpp files. then i tried to recompile and i get the following message:

xbmc\application.cpp(680) : error c2511: 'bool capplication::playfile(const cstdstringa &)' : overloaded member function not found in 'capplication'
c:\xbmc\xbmc\application.h(71) : see declaration of 'capplication'

any ideas?

cyberplague
2004-01-29, 07:41
jeff- i am going to try it again, for some reason, i got a fresh copy of the cvs and it compiled fine...added the rtv patch and it gave me a ftpzilla error...lol

going to mess with it now. reports later, or tomorrow morning.

cp

cyberplague
2004-01-29, 08:57
compiling....

building....

complete.... now to test on the xbox...weee

ok, got it all compiled, transfered to my xbox.

upnp seems to be working as i can use the automatic way both rtv://*/ & rtv://*/video to detect my replay. which shows up in a list with the correct name "living room". however when i click on that nothing happens. freezes the xbox and i have to physically reboot the machine. the freezing also happens when i try either of the manual ways. and i have the correct ip in the .xml file as i have connected to the replaytv with dvarchive.

any ideas why it wouldn't be listing the information/guide data?

i have a replay 4504, please tell me this doesn't only work with 5xxx series replays...

any help would be appreciated!

thanks in advance,

cp

jeffscott72
2004-01-29, 09:13
cp,

would you zip up and email me the files you modified for the rtv changes. i have a 5040 and would like to see if works. i'm having troubles compiling with the changes i made. see how i don't really know what i'm doing it doesn't really surprise me. please email the files to jeffscott72@yahoo.com and i'll let you know if it works on my 5040.

thanks,

jeff

cyberplague
2004-01-29, 09:26
check your email!

cp

jeffscott72
2004-01-29, 09:37
compiling now...

cyberplague
2004-01-29, 09:38
i am waiting.... :-p

man i hope this isn't just for 5xxx units...

off to bed i go, just reply here with your results!

cp

jeffscott72
2004-01-29, 11:02
well, it is freezing up on me too. hopefully the cvs will be updated soon and we can quit messing with this stuff for a little while.

jeff

dinzdale
2004-01-29, 13:12
************************************************** *************************
xbmc support for streaming shows from a replaytv by rtvguy
************************************************** *************************
this patch adds support for streaming shows recorded on a networked
replaytv 4000, 4500, 5000, or 5500 series pvr directly to xbmc for
playback. *this is accomplished by adding a new streaming protocol to xbmc
that i call the rtv protocol. *this protocol is implemented in a manner
similar to xbms in that most of the code rests in a dynamically-loaded
library called librtv. *the source code to this library is included in the
patch .zip file.


guys, rtvguy, the author of this patch, claims to support all both series.

rtvguy - thanks for the contribution...i have been looking into doing this myself and have been trying to hunt down the protocols to talk to the replaytv box. i would like to be able to use my replaytv as a remote tuner from the xbox, as well as stream video to the xbox.
how were you able to test the different rtv series -- do you have multiple boxes ?
also, how much testing has this gone through ? are there others out there sucessfully running this ?

thanks again to all xbmc developers -- applications like these really enhance the xbox!

cyberplague
2004-01-29, 18:29
rtvguy:

are the following errors normal when i compile rtv.lib:


compiling...
sleep.c
rtv.c
netclient.c
md5.c
interface.c
interface.c(131) : warning c4244: 'function' : conversion from 'double' to 'size_t', possible loss of data
httpfsclient.c
httpclient.c
guideclient.c
crypt.c
crypt.c(53) : warning c4090: 'function' : different 'const' qualifiers
generating code...
compiling...
guideparser.cpp
creating library...


it successfully creates it, but the first error has to do with the guide parsing which could be part of the reason why it is hanging on us once we select the replaytv from teh list. just a complete guess on my part. let us know.

cp

rtvguy
2004-01-29, 21:40
rtvguy:

are the following errors normal when i compile rtv.lib:


compiling...
sleep.c
rtv.c
netclient.c
md5.c
interface.c
interface.c(131) : warning c4244: 'function' : conversion from 'double' to 'size_t', possible loss of data
httpfsclient.c
httpclient.c
guideclient.c
crypt.c
crypt.c(53) : warning c4090: 'function' : different 'const' qualifiers
generating code...
compiling...
guideparser.cpp
creating library...


it successfully creates it, but the first error has to do with the guide parsing which could be part of the reason why it is hanging on us once we select the replaytv from teh list. *just a complete guess on my part. *let us know.

cp
those are just warnings and are normal.

i don't have a 4xxx machine, so i couldn't test with that directly. however, i did test the guide parsing functions with a 4k guide file, and it worked fine. i don't think the actual streaming is any different from a 5k.

i'm not sure why you guys are having problems, but it may be due to some of the other changes in the cvs. since the anon cvs has been flakey at best lately, i haven't had the chance to test rtv support with the latest versions of everything. however, i can assure you that it did work with the cvs files at the time i originally released it. i will see if i can figure out where the problem is now.

cyberplague
2004-01-29, 22:40
rtvguy - do you still have a copy of the cvs from when you created this? if you do could you zip it up and either post it or email me and let me know where to get it so that i can test it out on my replaytv 4504 while i wait for you to figure out what the problem is.

don at wstip dot org

thanks,

cp

dinzdale
2004-01-30, 06:12
rtvguy:

i've got a clean built cvs version of xbmc that, after testing, works fine. i've merge your source code changes and am down to mplayer fix. i found the source in the xbmc/docs and have merged your open.c fill. now, i'm stuck. how do you build the mplayer.dll. it looks like it's a unix distribution and i don't see any project vcproj files. should i make a separate project on my own from this ? is there a simple way to add this patch and build that i don't see ? btw-the source was .rar-ed and i need to extract this.

thanks for any help.

dinzdale
2004-01-30, 06:15
sorry -- really should proof read before posting... what's the best way to add your open.c patch and rebuild the mplayer.dll.

dinzdale

rtvguy
2004-01-30, 07:04
sorry -- really should proof read before posting... what's the best way to add your open.c patch and rebuild the mplayer.dll.

dinzdale
you don't have to patch mplayer.dll as of the current cvs.

i have figured out what the problem with this in the current cvs is. there appear to be some problems with the xbmc code for the new "stack" video feature (i don't even know what this feature does). it causes problems not only with the rtv protocol but xns (relax) also. in fact, with my relax share, stack mode caused my xbox to try to constantly ping my relax server pc to death. if you choose "unstack" on the lefthand side to turn this feature off for now, i believe (hope) that rtv support will work for you guys.

i might as well also note that there are two other non-obvious places that need to be updated to use _int64 (besides the ones you presumably already found).
rtvdirectory.cpp
line 140:
__int64 dwfilesize=0;

line 210:
dwfilesize=_atoi64( sizenode->firstchild()->value() );

it will compile without these changes, so i doubt that they are at all related to the other problem but should be changed anyway.

i don't know what is up with the stacking code, but i'll leave that to the xbmc developers unless they indicate that there is something in my code causing the problems. like i said, xns also has problems with stacking on, so i don't think it is.

there is one other little weird thing. when the mplayer_close_file() function is called (e.g. when you press stop or choose another video to play), the debugger throws an assert about some damaged memory. however, it is non-fatal and probably won't show up unless you are using a debugger. still, it needs to be fixed. again, however, i am unsure whether this is a problem with my code or mplayer/xbmc.

dinzdale
2004-01-30, 13:37
you don't have to patch mplayer.dll as of the current cvs.

at the risk of sounding ignorant ... does this imply your rtv support has been integred into the current xbmc cvs and there is no need to merge your changes ?

i just fetched the latest xbmc (@1/30 06:50 est) and don't see the new files you added to the filesystem directory.

thanks
d

cyberplague
2004-01-30, 17:38
rtvguy - i made those changes, and recompiled. made sure to select "unstack" on the left. still freezes...

i am not sure what is going on, but i want this thing to work. anything i can do to help?

dinzdale - what he meant is that with the new version of mplayer, which is in cvs, you don't have to modify it. just have to add the rtv files and patch the other files.

cp

dinzdale
2004-01-30, 17:48
thanks cyberplague -- i didn't realize mplayer was cvs-ed project in itself!

i haven't looked too closely at the build, but does mplayer get built with xbmc or do i need to checkout the latest cvs for mplayer, build it, and include it in the xbmc w/rtv link (by overwritting the libmplayer.lib with the latest) ?

i'm not clear on how all the components are distributed.

thanks

cyberplague
2004-01-30, 17:52
i believe the mplayer is compiled and included as a .dll file.

so there is nothing you need to do, except when you tranfer your compiled default.xbe, you need to make sure you are transferring all the other files too.

check the "how to compile" thread in this forum for complete instructions.

cp

dinzdale
2004-01-30, 18:04
apparently this is what is confusing me.

4) mplayer/mplayer.dll
the file libmpdemux/open.c in docs/mplayer_sourcecodepatch.rar must be
modified to add support for the rtv protocol.
specifically, the following line:
if (stricmp(url->protocol, "xmbs") &&
stricmp(url->protocol, "xns") &&
stricmp(url->protocol, "shout") &&
stricmp(url->protocol, "cdda") &&
stricmp(url->protocol, "smb") &&
stricmp(url->protocol, "iso9660") )
must be changed to:
if (stricmp(url->protocol, "xmbs") &&
stricmp(url->protocol, "xns") &&
stricmp(url->protocol, "shout") &&
stricmp(url->protocol, "cdda") &&
stricmp(url->protocol, "smb") &&
stricmp(url->protocol, "rtv") &&
stricmp(url->protocol, "iso9660") )


should this step be ignored ?

if not, i am missing something... is the rtv fixed dll included in the current xbmc cvs distribution making the above unecessary ?

do i need to change the open.c fille myself and rebuild the dll ? if so where is this file ... i must have missed searching for files.

cyberplague
2004-01-30, 18:28
you do not need to recompile the mplayer.dll, and those open.c changes are no longer necassary.

so just disregard that part of the instructions.

cp

dinzdale
2004-01-30, 18:40
cyber -

thanks for your help. i too want to see support for rtv very much -- to the point i was going to do it myself, but am glad rtvguy has beat me to the punch!

unfortunately, there's only so much time to devote to non-paying cool projects like this (plus i don't want to piss my wife off anymore than i have!!).

dinz

cyberplague
2004-01-30, 19:38
dinz,

trust me i totally understand the wife thing...hehehe

rtvguy - any clue as to why it still isn't working for us? do you have a copy of the cvs when it is working that you could give us to compile?

thanks,

cp

rtvguy
2004-01-31, 17:20
dinz,

trust me i totally understand the wife thing...hehehe

rtvguy - any clue as to why it still isn't working for us? *do you have a copy of the cvs when it is working that you could give us to compile?

thanks,

cp
i can't send a copy of the cvs as it was when i originally made the patch as it is over 100mb zipped. you should be able to get the older versions using sf cvs though. however, as i say, it is working here with all 3 of my 5040s using the latest cvs with the caveats i mentioned.

i'm not sure why it isn't working for you. if it were a guide parsing problem with the 4k guide format, it should still work using "rtv://*/video" as that takes gp out of the loop. are you sure you have all of the correct files for the cvs version installed, including mplayer.dll, language files, etc.? and you are sure you have turned off the stack feature (with stack mode on i can repeat your problem)?

there are just too many variables as is for me to figure this out--whether you integrated the patch the way i did, whether you made the modifications as required by the newer version of the cvs as i did, etc. if the patch were in the cvs, everyone would be on the same playing field. i think it would then be easier to figure out what is going on. until then, all i can say is it does work here. i will continue to try to reproduce the problem (in a way other than the stack/unstack problem); but if i can't reproduce it, i can't fix it.

cyberplague
2004-02-02, 18:11
rtvguy-

i totally understand. when i get home i will get the copy of the nightly tarballs that are now availible. and make the changes and integrate the patch as you have specificed and try compiling again.

if it is working on your end there has to be something that i am doing wrong...hrm.

i will know more this afternoon. thanks again for the reply.

cp

cyberplague
2004-02-02, 19:51
could you just post a zip/rar of the files from the current cvs with the changes in them. maybe i am editing something wrong.

that would basically get us on the same page. yeah i guess your right about the rtv://*/video comment.

cp

cyberplague
2004-02-02, 21:20
well frodo just integrated the patch into the developer cvs, he also has setup a daily tarball that gets updated at midnight.

i grabbed last nights tarball, and have applied the patch to it. i will test it once i get home this afternoon.

cp

dinzdale
2004-02-02, 21:48
cyber-
i'm getting a ton of guiscreensaver errors when linking. i'm able to compile though!

if the patches were integrated into cvs ... what patch are you applying then ?

dinz

cyberplague
2004-02-02, 22:08
if you goto the xbmc front page, it has a link to a daily tarball, i dled that. applied the patch, and compiled. have to wait till i get home to test it.

the tarball is updated at midnight everyday, so the rtv patch was integrated today, and will be in tonights tarball. which i will also test tomorrow morning.

cp

cyberplague
2004-02-03, 09:17
ok, compiled and still freezes on me. select unstack on the left, still freezes. upnp is working as i can see the replaytv, just can't go any further...sigh...

anyway i can debug this to help with finding and fixing this problem?

if so how can i do that?

please let me know,

thanks - cp

dinzdale
2004-02-04, 06:27
cyber -
just checked out the latest from cvs. looks like the patches for replaytv have been integrated.
compiled fine. copied to xbox. selected videos->replaytv ... and found the name of my rptv box. selected that and like you, it freezes. nada.

i made no changes to any of the xml files.

also, i noticed shoutcast doesn't work anymore. it did in a previous release.

rptvguy ... have you test the cvs release and got it working ? if so, then i must be missing something on the install.

dinzdale

dinzdale
2004-02-04, 13:49
awsome!!!!! --- got rptv to work!!!

all ... finally got rptv video to work ... and it works great!!!

got the <path>rtv://<your rptv ip address>/video</path> to work in the xboxmediacenter.xml file. *this shows a listing of filenames (you must guess as to what the content is upon selection) so identifying a specific recording is tough. but it plays beautifully!!!

i have 4505 rptv, so this may be a reason why i can't use the other settings -- rptvguy ???
cyber- didn't you mention you have a 4k series too ?

i'd be glad to try to implement replay guide viewing for the 4k
series.

anyway -- great job rptvguy -- and great job to the authors of xbmc -- i'm considering buying another xbox instead of a dvd player for the other networked rooms!!


dinzdale * *:d

daytwa
2004-02-04, 20:50
dinzdale, good to hear you got it working. unfortunately, i get lockups with every option in the .xml file. some details:

- "rtv://*/" will find my replay, but freezes after selecting it.

- "rtv://*/video" same results as above.

- "rtv://<replay ip>/" freezes when the replaytv icon is selected.

- "rtv://<replay ip>/video" same as above

i tried intentionally entering the wrong ip in the config file, and although it seemed to lock up, it generated an empy directory (".." being the only choice") after about a minute.i have a 5040 which works fine with dvarchive, so i'm not sure where the problem is. certainly could be a cvs issue, although i'm able to compile just fine.

rtvguy, if you have any suggestions or things we should try, let me know. i appreciate all your work on this so far, i'm excited to get it working!

dinzdale
2004-02-04, 21:55
daytwa:

* here are some suggestions that might help...

1) i checked out the cvs version as of last night 2/03 about 19:30 est. that is what i am using. try checking out the code again from cvs into a new clean/virgin development area. you'll find you do not need to apply any patches -- rptv has been fully integrated. all you should need to do is compile.

2) don't change anything in the xboxmediacenter.xml except for the rptv entry, using the <ip address>/video entry.

3) when moving to the xbox -- make sure everything is being moved! i'm just using the windows explorer to ftp the files over, but have found it can't handle directories/folders nested more than 1 - 2 levels deep. in this case, i manually create the folders so i don't ftp more than 1 level deep over. most directories within this application don't go more than 3 levels deep. it may also have to do with the xbox ftp server, or the volume of files i'm trying to copy at one time.

4) also, you must be using the latest xdk!!! it says so in the directions on building xbmc (57 or 59 something -- i can look it up later)! i'm not sure if you'll see compile or link errors when using an older version.

good luck, and don't give up!

dinzdale :lol:

cyberplague
2004-02-04, 23:08
dinzdale: omg!! you slut! http://www.xboxmediaplayer.de/forums/non-cgi/emoticons/tounge.gif j/k

glad to hear, come to think of it i didn't try that after making changes and stuff... always tried the rtv://*/ & rtv://*/video, i will try what you suggested.

and yes i do have a 4504, so hopefully this will work.

rtvguy: they have integrated some logging features into xbmc you think you could look into those features and add some logging routines into the rtvclass so we can figure all these little bugs?

i will be testing this first thing when i get home tonight.

cp

cyberplague
2004-02-04, 23:30
actually, it looks pretty easy to add logging, i may just add it myself if rtvguy is too busy....

so much to do so little time...

weeee

cp

daytwa
2004-02-04, 23:41
dinzdale:

thanks for the suggestions. i do have the "latest" cvs with rtv integrated, and a virgin dev area. i haven't checked to see if all the files copied, i'll try that next.

cyberplague:

if you happen to get logging implemented, can you let me know? i'd love to see what's happening as well.

cyberplague
2004-02-04, 23:55
daytwa - yes i will post here when/if i get it integrated with links to the modified files.

cp

cyberplague
2004-02-05, 02:36
i tried putting the ip in, still a no go. not sure what the deal is.

later today i am going to add logging in the rtv class unless rtvguy shows up and has it done already... =p

i will keep ya posted.

cp

rtvguy
2004-02-05, 05:00
i haven't gotten around to testing the cvs build yet, but it's on the list. do feel free to add logging code if you want. i hope to get some time to look into these problems very soon.

with regard to 4k support, i tried testing 4k guide parsing with a 5k guide.dat that i had manually converted to 4k format. the formats aren't that different; however, i may have missed something. the guide parsing part of the patch is a fairly straightforward merger of the sources of lee thompson's guideparser for the various replaytv platforms. it has been stripped down some for our purposes, but i tried really hard to leave the important stuff intact since guideparser is tried and true. it is possible i made a stupid mistake somewhere, however. i would appreciate it if someone who is having these problemns with a 4k could email a 4k format guide.dat (use replaypc to get it from your replaytv) to rtvguy@users.sourceforge.net .

for those of you with a 5k and problems, remember to try toggling the stack/unstack button to "unstack" in xbmc. as of the last time i checked, the "stack" feature caused a lockup here too.

jeffscott72
2004-02-05, 08:18
i have two 5040s and i have to use the /video option or it freezes. it doesn't matter with it is on the stack or unstack setting.

rtvguy
2004-02-05, 11:13
i have two 5040s and i have to use the /video option or it freezes. it doesn't matter with it is on the stack or unstack setting.
do you record "my big fat obnoxious fiance" on either or both of them? it's just a theory at this point but after looking at a non-working 4k guide.dat i'm wondering if there may be some issue with the accented e in the title. i.e., there may be some characters that are invalid for the xbmc listing format.

cyberplague
2004-02-05, 16:06
rtvguy - i guess you got my guide.dat i sent, yes i do record that show. do you think you could change the library to remove those charaters? if so could you make the changes and post alink to the changed files so i can test it out?

cp

dinzdale
2004-02-05, 16:20
i found the same behavior as jeffscott. it freezes unless i use
/video. got a 4504 here.


dinzdale

dinzdale
2004-02-05, 19:54
rtvguy

i'll send you a working guide.dat for a 4k tonight, if you think that will be helpful.

dinzdale
(ps -- i don't record bfof)

rtvguy
2004-02-05, 22:34
rtvguy - i guess you got my guide.dat i sent, yes i do record that show. *do you think you could change the library to remove those charaters? *if so could you make the changes and post alink to the changed files so i can test it out?

cp
yeah, if that is the problem, i'll definitely fix it. i'm recording that show tonight, so i'll be able to test here to confirm (hopefully). btw, the guide you sent me parsed fine. so, seemingly it is either the invalid character thing or something else entirely.

cyberplague
2004-02-05, 22:56
well from the logging that i added, it seems that maybe the ip is getting messed up.


18-02-2004 05:59:11 * entered discovering all replaytvs
18-02-2004 05:59:11 *sent request for identification
18-02-2004 05:59:18 * entered discovering all replaytvs
18-02-2004 05:59:18 using ip address:ƒä v‹ëè)ùÿÿ_^‹ã[]â
18-02-2004 05:59:18 exception in capplication::framemove()


the varialible that is suppose to be listed after using ip address: is strurl.

i am going to have to figure out what is wrong, any clues? *i am going to add some further logging, that is basically going to just contain your comments to see how far it is getting before it fails, and some values of variables, should help us figure out where is it crapping out and where to put our focus.

still not sure why others can get it working but i can't...hrm

cp

dinzdale
2004-02-05, 23:07
cyber -
how are you directing your log output ? are you sending them to a file on xbox and then just ftping back to the pc ? do you have a debug environment setup (i briefly read about of ways to do this, but don't want mess with the bios, etc.).

thanks
dinzdale

cyberplague
2004-02-05, 23:20
dinz - with the latest cvs it has logging capabilities, all i did was modify the rtvdirectory.cpp with some logging commands to create log entries like you saw above. i am in the process of logging everything, to the xbmc.log file on the xbox. hopefully that will help figure out what the heck the problem is so we can narrow our focus. once i get all the logging in and confirm it doesn't mess anything up, i can send it to ya if you like so you can get a log as well so we can compare.

cp

dinzdale
2004-02-05, 23:24
cyber -

sounds like a good plan ... let me know if there's anything else i can do -- in the meantime, i'll continue investigating on my own.

dinzdale

cyberplague
2004-02-06, 00:04
here is my updated rtvdirectory.cpp file with logging, please use this with the current cvs then load xbmc, and browse to the replay, post the resulting xbmc.log file here please.


// rtvdirectory.cpp: implementation of the crtvdirectory class.
//
//////////////////////////////////////////////////////////////////////

#include "rtvdirectory.h"
#include "tinyxml/tinyxml.h"
#include "../url.h"
#include "../util.h"
#include "../utils/log.h"
#include "../sectionloader.h"

extern "c" {
#include "../lib/librtv/interface.h"
}

//////////////////////////////////////////////////////////////////////
// construction/destruction
//////////////////////////////////////////////////////////////////////

crtvdirectory::crtvdirectory(void)
{
csectionloader::load("librtv");
}

crtvdirectory::~crtvdirectory(void)
{
csectionloader::unload("librtv");
}

//************************************************** ****************************************
***
bool crtvdirectory::getdirectory(const cstdstring& strpath,vecfileitems &items)
{
curl url(strpath);

cstdstring strroot=strpath;
if (!cutil::hasslashatend(strpath) )
strroot+="/";

// host name is "*" so we try to discover all replaytvs. this requires some trickery but works.
if (url.gethostname() == "*")
{
clog::log(" entered discovering all replaytvs");
// check to see whether the url's path is blank or "video"
if (url.getfilename() == "" || url.getfilename() == "video")
{
struct rtv * rtv = null;
int numrtv;

// request that all replaytvs on the lan identify themselves. each replaytv
// is given 3000ms to respond to the request. rtv_discovery returns an array
// of structs containing the ip and friendly name of all replaytvs found on the lan.
// for some reason, dvarchive doesn't respond to this request (probably only responds
// to requests from an ip address of a real replaytv).
clog::log("sent request for identification");
numrtv = rtv_discovery(&rtv, 3000);

// run through the array and add the replaytvs found as folders in xbmc.
// we must add the ip of each replaytv as if it is a file name at the end of a the
// auto-discover url--e.g. rtv://*/192.168.1.100--because xbmc does not permit
// dyamically added shares and will not play from them. this little trickery is
// the best workaround i could come up with.
clog::log("numrtv = %s", numrtv);
for (int i=0; i < numrtv; i++)
{
cfileitem* pitem = new cfileitem(rtv[i].friendlyname);
// this will keep the /video or / and allow one to set up an auto replaytv
// share of either type--simple file listing or replayguide listing.
pitem->m_strpath = strroot + rtv[i].hostname;
pitem->m_bisfolder = true;
items.push_back(pitem);
}
free(rtv);
return true;
// else the url's path should be an ip address of the replaytv
} else {
cstdstring strurl, strrtv;
int pos;

// isolate the ip from the url and replace the "*" with the real ip
// of the replaytv. e.g., rtv://*/video/192.168.1.100/ becomes
// rtv://192.168.1.100/video/ . this trickery makes things work.
strurl = strroot.trimright('/');
pos = strurl.reversefind('/');
strrtv = strurl.left(pos + 1);
strrtv.replace("*", strurl.mid(pos + 1));
curl tmpurl(strrtv);
clog::log("strurl = %s", strurl);
clog::log("strrtv = %s", strrtv);
// force the newly constructed share into the right variables to
// be further processed by the remainder of getdirectory.
url = tmpurl;
strroot = strrtv;
clog::log("strrtv = %s", strroot);
}
}

// allow for replaytvs on ports other than 80
clog::log("allowing for rtvs on ports other than 80");
cstdstring strhostandport;
strhostandport = url.gethostname();
if (url.hasport())
{
char buffer[10];
strhostandport += ':';
strhostandport += itoa(url.getport(), buffer, 10);
clog::log("strhostandport - %s", strhostandport);
}

// no path given, list shows from replayguide
if (url.getfilename() == "")
{
unsigned char * data = null;

// get the rtv guide data in xml format
clog::log("no path given, listing show from replayguide");
rtv_get_guide_xml(&data, strhostandport.c_str());

// begin parsing the xml data
clog::log("begin parsing xml data");

tixmldocument xmldoc;
xmldoc.parse( (const char *) data );
if ( xmldoc.iserror() )
{
free(data);
return false;
}
tixmlelement* prootelement =xmldoc.rootelement();
if (!prootelement)
{
free(data);
return false;
}

const tixmlnode *pchild = prootelement->firstchild();
while (pchild>0)
{
cstdstring strtagname=pchild->value();

if ( !cutil::cmpnocase(strtagname.c_str(),"item") )
{
const tixmlnode *namenode=pchild->firstchild("displayname");
const tixmlnode *qualitynode=pchild->firstchild("quality");
const tixmlnode *recordednode=pchild->firstchild("recorded");
const tixmlnode *pathnode=pchild->firstchild("path");
const tixmlnode *durationnode=pchild->firstchild("duration");
const tixmlnode *sizenode=pchild->firstchild("size");
const tixmlnode *atrbnode=pchild->firstchild("attrib");

systemtime dtdatetime;
__int64 dwfilesize=0;
memset(&dtdatetime,0,sizeof(dtdatetime));

// displayname
const char* szname = null;
if (namenode)
{
szname = namenode->firstchild()->value();
}
else
{
// something went wrong, the recording has no name
clog::log("something went wrong, the recording has no name");

free(data);
return false;
}

// quality
const char* szquality = null;
if (qualitynode)
{
szquality = qualitynode->firstchild()->value();
}

// recorded
if (recordednode)
{
cstdstring strrecorded=recordednode->firstchild()->value();
int iyear,imonth,iday;

iyear=atoi(strrecorded.left(4).c_str());
imonth=atoi(strrecorded.mid(5,2).c_str());
iday=atoi(strrecorded.mid(8,2).c_str());
dtdatetime.wyear=iyear;
dtdatetime.wmonth=imonth;
dtdatetime.wday=iday;

int ihour,imin,isec;
ihour=atoi(strrecorded.mid(11,2).c_str());
imin=atoi(strrecorded.mid(14,2).c_str());
isec=atoi(strrecorded.mid(17,2).c_str());
dtdatetime.whour=ihour;
dtdatetime.wminute=imin;
dtdatetime.wsecond=isec;
}

// path
const char* szpath = null;
if (pathnode)
{
szpath = pathnode->firstchild()->value();
}
else
{
// something went wrong, the recording has no filename
clog::log("something went wrong, the recording has no filename");
free(data);
return false;
}

// duration
const char* szduration = null;
if (durationnode)
{
szduration = durationnode->firstchild()->value();
}

// size
// note: size here is actually just duration in minutes because
// filesize is not reported by the stripped down guideparser i use
if (sizenode)
{
dwfilesize=_atoi64( sizenode->firstchild()->value() );
}

// attrib
// note: not currently reported in the xml guide data, nor is it particularly
// needed unless someone wants to add the ability to sub-divide the recordings
// into categories, as on a real rtv.
int attrib = 0;
if (atrbnode)
{
attrib = atoi( atrbnode->firstchild()->value() );
}

bool bisfolder(false);
if (attrib & file_attribute_directory)
bisfolder=true;

if ( bisfolder || isallowed( szpath) )
{
cfileitem* pitem = new cfileitem(szname);
memcpy(&pitem->m_sttime, &dtdatetime,sizeof(dtdatetime));
pitem->m_strpath=strroot + szpath;
// hack to show duration of show in minutes as kb in xmbc because
// it doesn't currently permit showing duration in minutes.
// e.g., a 30 minute show will show as 29.3 kb in xbmc.
pitem->m_dwsize=dwfilesize * 1000;
pitem->m_bisfolder = bisfolder;
items.push_back(pitem);
}
}

pchild=pchild->nextsibling();
}

free(data);

// path given (usually video), list filenames only
} else {
clog::log("path given (usually video), list filenames only");
unsigned char * data;
char * p, * q;
unsigned long status;

// return a listing of all files in the given path
clog::log("return all listing of files in path");
clog::log("data - %s", &data);

status = rtv_list_files(&data, strhostandport.c_str(),url.getfilename().c_str());
if (status == 0) {
clog::log("status is zero, returning false");
return false;
}

// loop through the file list using pointers p and q, where p will point to the current
// filename and q will point to the next filename
p = (char *) data;
while (p) {
clog::log("p is %s", p);
// look for the end of the current line of the file listing
q = strchr(p, '\n');
// if found, replace the newline character with the null terminator
if (q) {
*q = '\0';
// increment q so that it points to the next filename
q++;
// *p should be the current null-terminated filename in the list
if (*p)
{
// only display mpeg files in xbmc (but not circular.mpg, as that is the rtv
// video buffer and xbmc may cause problems if it tries to play it)
if (strstr(p, ".mpg") && !strstr(p, "circular"))
{
cfileitem* pitem = new cfileitem(p);
pitem->m_strpath=strroot + p;
pitem->m_bisfolder=false;
// the list returned by the rtv doesn't include file sizes, unfortunately
//pitem->m_dwsize = atol(szsize);
items.push_back(pitem);
}
}
}
// point p to the next filename in the list and loop
p = q;
}

free(data);
}

return true;
}


cp

rtvguy
2004-02-06, 00:12
well, i have a series of good news/bad news to report.

good news: i added a show title with an "é" to xbmc, and it displayed without problem.

bad news: this means the problem probably lies elsewhere.

good news: i have no problems listing shows either filenames only or by title with the cvs build. (this is with either stack or unstack set too).

bad news: when i actually click on a file to play it, i get a debug exception. if i let it continue, i get a pink screen of death (which i had never seen before).

good news: i get this same error when i try to play *any* video file, even via relax/xns.

bad news: the problem seems to lie somewhere within mplayer.dll, and it doesn't seem to contain debug information. diagnosing the problem there is tough with disassembly only.

good news: there is an updated mplayer.dll in the cvs i just updated to, so maybe that fixes the problem.

bad news: it didn't. i still get an error like so for video files:
"msg:mplayer_open_file(rtv://192.168.1.41/video/1075084198.mpg) done 1.0000

cmplayer::openfile() rtv://192.168.1.41/video/1075084198.mpg failed"

again, since this error occurs even using xns to play other video files, it doesn't appear to be replaytv related. i'm not sure what the deal is now.

cyberplague
2004-02-06, 00:17
rtvguy - did you check the mplayer cvs to see if the open.c changes need to be used again?

cp

rtvguy
2004-02-06, 00:24
rtvguy - did you check the mplayer cvs to see if the open.c changes need to be used again?

cp
yeah, they don't appear to be needed.

i'm not sure why i'm getting these psods when i play all videos now. have you tried playing other videos via relax using the current cvs build? if so, any problems?

fwiw, i did notice something else that probably has no bearing on our current issues (it didn't fix my psods). "librtv" didn't get put into the suppress preloading property for the xbmc project. i think it should be there, but it may make no difference whatsoever that it's not.

cyberplague
2004-02-06, 00:29
ok, i will add it in and recompile and test. i will have to setup my xns shares when i get home and try it out.

very strange, i will let you know. will be home in about an hour.

cp

rtvguy
2004-02-06, 00:51
ok,
now things just got really weird. all of my work has been done with a debug build of xbmc. i just tried a release build with interesting results. the good news is i don't get a psod when i try to play video using xns. the bad news is that i do now get lockups when i try choose the name of a replaytv in the list. so, it appears that the reason it works for me and not for you is that i have been using the debug default.xbe. now, why listing works in debug but not release while video playback works in release but not debug is a mystery to me. it also makes it difficult for me to figure out what is going on here.

cyberplague
2004-02-06, 01:56
well i am home and compiling with my new logging in, hopefully it will help figure out what is wrong, we will know in about 5 mins.

cp

dinzdale
2004-02-06, 04:29
xbmc\filesystem\rtvdirectory.cpp(32) : warning c4518: 'bool ' : storage-class or type specifier(s) unexpected here; ignored
xbmc\filesystem\rtvdirectory.cpp(33) : error c2501: 'directory::crtvdirectory::getdirectory' : missing storage-class or type specifiers
xbmc\filesystem\rtvdirectory.cpp(33) : error c2556: 'int ***directory::crtvdirectory::getdirectory(const cstdstringa &,vecfileitems &) ' : overloaded function differs only by return type from 'bool directory::crtvdirectory::getdirectory(const cstdstringa &,vecfileitems &)'
d:\xbmcs2\xbmc\xbmc\filesystem\rtvdirectory.h(17) : see declaration of 'directory::crtvdirectory::getdirectory'
xbmc\filesystem\rtvdirectory.cpp(33) : error c2040: 'directory::crtvdirectory::getdirectory' : 'int ***(const cstdstringa &,vecfileitems &) ' differs in levels of indirection from 'bool (const cstdstringa &,vecfileitems &)'


cyber - trying your mod file but getting compiler errors. before i spend alot of time on this, did you change the header file too ?

dinz

cyberplague
2004-02-06, 05:51
nope just that file, must be formatting issues with the copy and paste you did, i will upload the file to my webhost later tonight if i get a chance or first thing in the morning.

cp

rtvguy
2004-02-06, 10:19
ok, i've partially figured out where things are going wrong. *the exceptions and lockups result when execution reaches this code at line 1060 of guideparser.cpp (part of librtv.lib):
printf("%s\n",lpsztitle);
printf("%s\n\n",lpszcopyright);
printf("%s\n",lpszcomment);

commenting out those lines seems to fix the problem. *i cannot figure that out, however, as there are many other uses of printf later that *don't* cause any problem apparently. *maybe it is the fact that those variable are really #define's? *i don't know.

unfortunately, even with this fix in place i still get general instability, especially when switching between different shows. *i'm not sure why. *i never had such problems with the cvs source i originally used to implement this patch. *there seem to be some strange things going on, and i'm having difficulty reconciling them. *next, i will try getting rid of all the uses of printf/fprint in librtv. *i really would like to do this with an xbox specific #define to keep librtv compatible for both xbox and (future) win32 use.

dinzdale
2004-02-06, 13:25
cyber -
try pming and/or e-mailing it to me.

dinz

peterbeninya90
2004-02-07, 00:46
could i please be given info on how to obtain a build that has integrated rtv support working in some fashion or another? i would be more than happy to beta test/give feedback as i think i am in a pretty good position to do so. i own both a replay 4000 and a replay 5000. i would make any contributions i could.

i downloaded the pre-complied 02/01/04 build and it doesn't seem to support it, even after i made some edits to the .xml file.

thanks,

pb

tslayer
2004-02-07, 02:45
please avoid asking for builds.

that is not permitted.

you'll have to either build it yourself or just wait.

ts

cyberplague
2004-02-07, 03:33
well, i got it to list the shows after commenting the above suggested stuff. but when i try to play the video it gives me an error:


19-02-2004 15:59:11 allowing for rtvs on ports other than 80

19-02-2004 15:59:11 no path given, listing show from replayguide

19-02-2004 15:59:12 begin parsing xml data

19-02-2004 15:59:36 mplayer play:rtv://192.168.1.11/video/1076086797.mpg

19-02-2004 15:59:36 cache sizem:8192 kbyte

19-02-2004 15:59:37 msg: set audio functions called

19-02-2004 15:59:37 msg: done

19-02-2004 15:59:37 msg:init_color_conversions()

19-02-2004 15:59:37 msg:xvid_init()

19-02-2004 15:59:37 msg:colorspace_init()

19-02-2004 15:59:37 open 1st time

19-02-2004 15:59:37 msg:mplayer_init()

19-02-2004 15:59:37 msg:mplayer dev-cvs-040202-07:42-3.3.1 (c) 2000-2003 mplayer team

19-02-2004 15:59:37 msg:cpu: intel celeron 2/pentium iii coppermine,geyserville 733.4 mhz

19-02-2004 15:59:37 msg:(family: 6, stepping: 10)

19-02-2004 15:59:37 msg:detected cache-line size is 32 bytes

19-02-2004 15:59:37 msg:cpuflags: mmx: 1 mmx2: 1 3dnow: 0 3dnow2: 0 sse: 0 sse2: 0

19-02-2004 15:59:37 msg:compiled for x86 cpu with extensions:

19-02-2004 15:59:37 msg: mmx

19-02-2004 15:59:37 msg: mmx2

19-02-2004 15:59:37 msg: sse

19-02-2004 15:59:37 msg:

19-02-2004 15:59:37 msg:00001

19-02-2004 15:59:37 msg:reading config file q:\mplayer\mplayer.conf

19-02-2004 15:59:37 msg:reading config file q:\mplayer\config

19-02-2004 15:59:37 msg:reading q:\mplayer\codecs.conf:

19-02-2004 15:59:37 msg:62 audio & 172 video codecs

19-02-2004 15:59:37 msg:font q:\mplayer\font\font.desc loaded successfully! (206 chars)

19-02-2004 15:59:37 msg:using software timing

19-02-2004 15:59:37 msg:input config file q:\mplayer\input.conf parsed: 51 binds

19-02-2004 15:59:37 msg:00021

19-02-2004 15:59:37 msg:mplayer_open_file(rtv://192.168.1.11/video/1076086797.mpg)

19-02-2004 15:59:37 msg:

19-02-2004 15:59:37 msg:playing rtv://192.168.1.11/video/1076086797.mpg.

19-02-2004 15:59:37 msg:find subtitles

19-02-2004 15:59:37 msg:check rtv://192.168.1.11/video/1076086797.mpg

19-02-2004 15:59:37 msg:url:protocol=rtv

19-02-2004 15:59:37 msg:use standard file for protocol:rtv

19-02-2004 15:59:37 msg:open_stream_full(rtv://192.168.1.11/video/1076086797.mpg)

19-02-2004 15:59:37 msg:open_stream_plugin(rtv://192.168.1.11/video/1076086797.mpg)

19-02-2004 15:59:37 msg:open_f fname:video/1076086797.mpg

19-02-2004 15:59:37 msg:open_f url:rtv://192.168.1.11/video/1076086797.mpg

19-02-2004 15:59:37 msg:file not found

19-02-2004 15:59:37 msg:open failed

19-02-2004 15:59:37 msg:failed to open rtv://192.168.1.11/video/1076086797.mpg

19-02-2004 15:59:37 msg:unable to open stream

19-02-2004 15:59:37 msg: mplayer_close_file()

19-02-2004 15:59:37 msg:

19-02-2004 15:59:37 msg: unint_player


i am doing a complete clean cvs, except for the updated librtv.lib file, and going to try it again as soon as the build is done.

cp

rtvguy
2004-02-07, 04:22
cp,

that's basically where i'm at too now (although sometimes the shows do play here). there are instances of printf/fprintf throughout librtv, primarily because it is also designed to be used with a win32 console test app. given that commenting out those 3 lines solves the listing problem, it is possible that there are some other instances of printf causing problems elsewhere. i don't understand why some do cause problems and some don't, however. very, very strange.

cyberplague
2004-02-07, 18:41
and things get stranger....

so this morning i turn on my xbox, and replaytv works with the ip!!!

plays everything, perfect, even over my wireless connection.. =)

now the only thing i did was open dvarchive on one of my networked machines and tried to stream a show to windows media player. so i could get the url and try the new .pls .mpg support as kind of a work around till we find out what was going on with the library.

any thoughts?

cp

cyberplague
2004-02-10, 20:07
rtvguy - any progress? any new bugs or causes of the bugs rather?

thanks for the hard work!

cp

prophead
2004-02-11, 22:22
dvarchive mentioned something about streamer and replay having to be within :40 seconds of each other. dvarchive matches pc & replay times. i wonder if something like this could account for the inconsistancies.

jeffscott72
2004-02-12, 03:06
i've been playing with the rtv functionallity and i am a bit confused about something.

i navigated to my videos and then the the rtv icon. i got the listing and played a video.

i hit stop and tried to navigate back to the main listing of video smb, rtv, etc.... but it show 0 items i can't select anything now.

it doesn't help to cut it off and back on again. when i choose my videos it show 0 items...it's like it is stuck a few levels deep and i can't back it out.

any suggestions?

thanks,

jeff

peterbeninya90
2004-02-16, 04:19
i am stuck...

i downloaded and installed the 02/12/04 build, and it doesn't want to list the shows on either of my replay units.

i have a 4040 and a 5040, and each of them show up when i browse for them, but then when i select one to try to get it to list the shows, i can hear the xbox drive chugging away, but it never produces anything.

does anyone have any idea why this might be?

thanks,

pb

rtvguy
2004-02-16, 06:15
rtvguy - any progress? *any new bugs or causes of the bugs rather?

thanks for the hard work!

cp
i'm trying to figure things out as time permits. for now, try adding the following lines to each *.c and *.cpp in the librtv project (somewhere near the top, after the #include's):
#ifdef _xbox
#define getenv noop
#define printf __noop
#endif

you will have to recompile librtv.lib (and librtvd.lib for debug builds) with these changes and copy it to xbmc/lib/librtv replacing the one currently there. then you will have to rebuild xbmc.

this change seems to help things; but i still occasionally get lockups, particularly when switching from one show to another.

please let me know your experiences with the above change.

cyberplague
2004-02-21, 17:46
been out of town on business. i am recompiling right now i will post my results with the above changes.

cp

rtvguy
2004-02-24, 02:49
hmm, i'm not sure why but copy/past screws up the changes i made. let's try it this way. [edit - argh... it changes it no matter what i do]


#ifdef _xbox
#define getenv xxnoop
#define fprintf xxnoop
#define printf xxnoop
#endif


change xxnoop to __noop. i'm not sure why the forum software mangles things when i post it as it should be. sorry about that. *didn't notice until now.

cyberplague
2004-02-28, 00:09
ok will do, thanks for catching that.

cp

prophead
2004-03-12, 01:11
i just wanted to take a moment to thank rtvguy and let the other xbox media center/experience developers know just how hard rtv support is rocking my living room right now. i've only had one file unable to play from my 4080. this is just so friggin great i want to :)

dinzdale
2004-03-17, 07:14
any updates/fixes/etc ?

PrinceBrand
2004-03-18, 00:18
first off kudo's to all of you great developers! xbmc is truly outstanding.

however... i'm having an issue with rtv playback. i can see my machine, browse the listing, play the video's without problem but there isn't any sound. rtv playback is the only instance of this happening... i get sound on everything else.

i'm outputing sound through a tos-link from the adv. a/v pack for xbox to my receiver.

any suggestions?

doh! figured it out. the recorded programming from replay is considered analog so having the audio properties set to digital resulted in zero sound. wonder if there would be a way to auto-detect/switch that on-the-fly so manual switching wouldn't be necessary?

thanks!

-brand

DIE-HARD
2004-04-25, 01:44
i have no problem finding my replaytv or any of my recordings.

for some reason, i cant get it to stream without lagging bad!!
i cant figure what the problem is! i have a 100mbps full duplex network here! and not your bottom $ network eather.
i am talking a cisco ws-c2950-24 as my core switch so i know it's not a speed issue.

i have tried making my cache high, low, and left with the default settings. but after about 10 seconds it gets all jerky. when i am looking at the video stats it starts showing every frame early/late and the cache at 0%

i have asked everywhere and cant find anyone who will respond. please help

this is the coolest thing ever!
btw i have a rtv 5040

dinzdale
2004-04-25, 04:12
die-hard :

i haven't tried a new build in a long time. just curious, have you been able to select replay entries by filenames ?

dinzdale.

DIE-HARD
2004-04-25, 04:17
wow after trying to get it to work for 2 days. i just tried it again and it's streaming fine!

no idea what could have changed!

and yes it displays the show and episode, just like on the rptv itself. if you are talking about the actual file name then no. but it does show the actuall filename as the playing video once you start it.

i made no modification to the .xml file. just plug and play! *:d

cyberplague
2004-04-28, 02:53
those having problems remember the replaytv clock and the xbox clock have to be within 40 seconds of each other.

i am trying to figure out which timeserver the replay uses to set its time. so that we can set our dashboards to use that time as well.

cp