Patch for rtmpdump/librtmp
#31
ok. Here are the code changes for the libRTMP part. Not including the VS project file. Not that may want any of these changes, but for reference/info.

http://malus.exotica.org.uk/~buzz/librtmp/librtmp.diff

couple of notes:

if (sb.sb_socket < 0)
to
if (sb.sb_socket == -1)
the socket call returns things like -2348487545 on XBOX.

in some cases i put ifdef xbox first, as the xbmc xlib include for example defines WIN32 and it caused me problems. for example

hpre.av_val = getenv("HOMEDRIVE");
hpre.av_len = strlen(hpre.av_val);

if getenv returns null, the strlen is going to break. I was accidently running this code (due to the define problem), and so it was crashing. found it in the end though.

-Read_1_Packet(RTMP *r, char *buf, int buflen)
+Read_1_Packet(RTMP *r, char *buf, unsigned int buflen)

to get rid of a unsigned > signed comparison warning.

Think that is about it.
Reply
#32
Nice, that doesn't look like such a terrible amount of changes. I think I'll make one or two tweaks, but it should be fine.

Since XBOX seems to have a lot in common with WIN32 I'd prefer to nest that inside the WIN32 conditionals. E.g.:

Code:
#ifdef WIN32
#ifdef _XBOX
...
#else
..
#endif
...
#endif

Gaah. What's this emu_socket thing? That's obviously only in the XBMC source tree, I can't reference that in librtmp.
Reply
#33
Yeh. I assume this is how to do the socket stuff on the XBOX (or at least the xbmc way) - based on looking at the previous libRTMP code and other parts of the code. partly why I mentioned I thought you wouldn't want to put any of the XBOX stuff in there. Might just be better to leave it out.

FYI:

http://trac.xbmc.org/ticket/9146

PS. I bumped into your website - some nice projects! I'm currently in the process of giving my Atari falcon a 14mb ram upgrade.
Reply
#34
highlandsun Wrote:Seek works on several of the rtmp streams I've tested. Dunno about iplayer.

Did you also apply the required patch to ffmpeg libavformat?

Thanks again, seek does work now on iplayer.

highlandsun Wrote:You'll also need to apply this patch to ffmpeg to get RTMP seek working:
https://lists.mplayerhq.hu/pipermail/ffm...28885.html

I had missed this out as I wasn't quite sure what to do. I got it working by applying the patch in xbmc/cores/dvdplayer/Codecs/ffmpeg/libavformat/
Reply
#35
exobuzz Wrote:Yeh. I assume this is how to do the socket stuff on the XBOX (or at least the xbmc way) - based on looking at the previous libRTMP code and other parts of the code. partly why I mentioned I thought you wouldn't want to put any of the XBOX stuff in there. Might just be better to leave it out.

I guess we could leave it in an XBMC-specific #ifdef. Looking thru the code, it appears that gethostbyname() would still work on Xbox without this stuff; the only difference is that XBMC is trying to cache hostname to address lookup results and avoid calling the real gethostbyname() every time. It seems like an unnecessary optimization to me, at least in the context of librtmp. I.e., we're only doing one name lookup at the beginning of any stream - once every 30 minutes, once an hour? Doesn't seem like a big deal.

Quote:FYI:

http://trac.xbmc.org/ticket/9146

PS. I bumped into your website - some nice projects! I'm currently in the process of giving my Atari falcon a 14mb ram upgrade.

Nice... I haven't really used my Falcons in quite a long time. A bit of a shame. Would've been pretty cool to have an Atari with 1GHz 68K and a couple GB of RAM in these days, eh?
Reply
#36
highlandsun Wrote:Nice... I haven't really used my Falcons in quite a long time. A bit of a shame. Would've been pretty cool to have an Atari with 1GHz 68K and a couple GB of RAM in these days, eh?

certainly would be. I'm impressed you have more than one Falcon too! I guess the fastest we can get is 100mhz with an overclocked 060 and a pricey 68060 accelerator Smile (From that czech guy)
Reply
#37
No, Fastest you can go is 266Mhz with a MaxGo PPC upgrade, but needs 2MB of cache ram, which is very expensive, My TT is 166Mhz PPC.
Reply
#38
Well I was referring to 680x0. I have a 68060/PPC on my A4000 also, but nice you can get similar things for the ST. Although, at some point it becomes perhaps over the top Smile
Reply
#39
For anyone interested, rtmpdump / librtmp have just been accepted into Debian...

http://packages.qa.debian.org/r/rtmpdump...0235Z.html

And in other interesting news, the BBC themselves are using rtmpdump to monitor the health status of their streaming services.

http://lists.mplayerhq.hu/pipermail/rtmp...00957.html

Obviously a smart choice on their part, since you can't easily do that with any Adobe code, nor would it be particularly safe to even try...

http://www.zdnet.com/blog/security/adobe...tacks/6606

Frankly, viewing Flash videos *without* rtmpdump would be just plain irresponsible. Criminally so, in many contexts.
Reply
#40
I'm having a bit of trouble compiling XBMC with your patch. Can you take a moment to clarify some things?

I am trying to follow your post here.

First question is, will this patch work on current SVN (31064)? If not I can roll back to 29718 as listed in the last patch.

Do I need to apply all those patches in that ticket? The last one dif3.txt says complete patch, so I assumed it's the only one I need from the ticket.

Based on a message I received from Maruchan
Quote:I believe you need to replace the default libRTMP that is in the current XBMC SVN with an updated version. So, replace xbmc/lib/libRTMP (found here):
https://xbmc.svn.sourceforge.net/svn...c/lib/libRTMP/
with the new libRTMP found here:
http://rtmpdump.mplayerhq.hu/
I grabbed rtmpdump-2.2e.tgz. Once I extracted that, I had numerous files including a folder called librtmp. What all of these files needs to replace what's in xbmc\lib\libRTMP? Do I just drop the libRTMP folder into the xbmc\lib\libRTMP, or am I pulling the files out of the rtmpdump-2.2e\librtmp folder and putting them in xbmc\lib\libRTMP?
Reply
#41
question not directed at me, but..

Just the librtmp folder from rtmpdump is needed. And of course adjusting build options as needed. If you are building on windows, you might want to look at my xbox branch with them and vcproj file http://sourceforge.net/apps/trac/xbmc4xb...es/exobuzz

note on the xbox i build against polarssl. on windows I guess you can choose that or perhaps openssl or something.
Reply
#42
So grab the librtmp folder and place it in xbmc\lib\libRTMP? So I'd have:

librtmp\
AMFObject.cpp
AMFObject.h
copying.txt
Makefile
rtmp.cpp
rtmp.h
rtmppacket.cpp
rtmppacket.h

Then adjust the build options eh? I think that may be a bit more then I have time for then.
Reply
#43
not quite. the new librtmp files replace the old librtmp files. Have a look at my branch i linked to.
Reply
#44
What I do:

I have the rtmpdump source tree on my machine anyway, since I build the whole thing.

In XBMC, rename the libRTMP directory to libRTMP.old
Symlink rtmpdump/librtmp to libRTMP.

No settings need adjustment.

Since you're talking about Windows, you probably can't use a symlink here. (Actually you can, if you're on NTFS.) Instead, just copy the entire librtmp directory over. Either way, the old libRTMP directory should be moved aside and not used at all.
Reply
#45
Alright. I'll give it ago against current svn soon. I only need the last dif3.txt patch right? Besides the ffmpeg one.
Reply

Logout Mark Read Team Forum Stats Members Help
Patch for rtmpdump/librtmp0