PDA

View Full Version : Help needed: Trying to make OggTag.cpp work with virtual file system


mbuchoff
2008-11-12, 03:12
Basically, I want XBMC to output information relating to the song I am playing over an FTP connection. The problem is that in OggTag.cpp, in the OggTag::Read function, there is a line:
FILE* file=dll_fopen (strFile.c_str(), "r");

Unfortunately, dll_fopen is equal to fopen, as cores/DllLoader/dll_tracker_file.cpp tells it to be. I want to use the dll_fopen in cores/DllLoader/exports/emu_msvcrt.cpp (I think), which appears to be wrapped around the virtual file system.

Is this the recommended solution? If so, does anyone know what to change to make this so?

Thanks in advance.

jmarshall
2008-11-12, 03:59
Only on non-win32 systems does it use fopen(), and on such systems the xbmc executable is being wrapped I believe?

What system are you doing this on?

mbuchoff
2008-11-12, 04:15
That would explain it, as I'm on Linux. As there's already code specific to OSX and Linux in there (see the #ifdef's), it seems doable to port it. If I succeeded, would the XBMC team accept it into their code?

jmarshall
2008-11-12, 05:03
I'm not sure it's needed, but sure, feel free to give it a go. Assuming it's using the wrong fopen, all you'll need to do is remove the ifdef at the top of OggTag.cpp.

mbuchoff
2008-11-12, 05:08
It worked! dll_fopen is now called, but it's still not collecting music info. I'll submit a patch when I get it all working.

Thanks for the help.