EkaLestari / xuggle

Automatically exported from code.google.com/p/xuggle
0 stars 0 forks source link

StdioURLProtocolHandler patch submission for Windows #288

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Attempting to build the latest version of Xuggler from the GIT repo on Windows, 
I ran into a few problems. This appeared to be related to the different method 
names used for large file support in windows (fseeko on cygwin/linux and 
fseeko64 on windows VS). I fixed this by modifying the 
StdioURLProtocolHandler.h file, adding:

#ifdef _WIN32
#    ifdef __MINGW32__
#        define fseeko fseeko64
#        define ftello ftello64
#    else
#        define fseeko _fseeki64
#        define ftello _ftelli64
#    endif
#endif

The error was discovered while attempting to build Xuggler latest from the GIT 
repo (2012-02-12).

System configuration:

Windows 7
MinGW 32bit (using msys)
configure --disable-captives

FFMPEG version 0.10 build
SDL 1.2
./configure --enable-shared --enable-w32threads

What steps will reproduce the problem?
1. Build xuggler on windows 7, 32bit using mingw and visual studio

Result:

StdioURLProtocolHandler.cpp: In member function 'virtual int64_t 
com::xuggle::xuggler::io::StdioURLProtocolHandler::url_seek(int64_t, 
int)': 
../../../../../../csrc/com/xuggle/xuggler/io/ 
StdioURLProtocolHandler.cpp:129:48: error: 'fseeko' was not declared 
in this scope 
../../../../../../csrc/com/xuggle/xuggler/io/ 
StdioURLProtocolHandler.cpp: In member function 'virtual int64_t 
com::xuggle::xuggler::io::StdioURLProtocolHandler::url_getsize()': 
../../../../../../csrc/com/xuggle/xuggler/io/ 
StdioURLProtocolHandler.cpp:143:30: error: 'ftello' was not declared 
in this scope 
../../../../../../csrc/com/xuggle/xuggler/io/ 
StdioURLProtocolHandler.cpp:146:36: error: 'fseeko' was not declared 
in this scope 
../../../../../../csrc/com/xuggle/xuggler/io/ 
StdioURLProtocolHandler.cpp: In member function 'virtual int64_t 
com::xuggle::xuggler::io::StdioURLProtocolHandler::url_seek(int64_t, 
int)': 
../../../../../../csrc/com/xuggle/xuggler/io/ 
StdioURLProtocolHandler.cpp:133:1: warning: control reaches end of non- 
void function [-Wreturn-type] 
../../../../../../csrc/com/xuggle/xuggler/io/ 
StdioURLProtocolHandler.cpp: At global scope: 
../../../../../../csrc/com/xuggle/xuggler/io/ 
StdioURLProtocolHandler.cpp:31:1: warning: 'vs_logger_static_context' 
defined but not used [-Wunused-variable] 
make[7]: *** [StdioURLProtocolHandler.lo] Error 1 

Attached is the modified StdioURLProtocolHandler.h file that fixes this problem.

Original issue reported on code.google.com by timhy...@gmail.com on 14 Feb 2012 at 4:37

Attachments:

GoogleCodeExporter commented 8 years ago
Fixed in 5.1.  Did not use this patch

Original comment by art.cla...@gmail.com on 7 Apr 2012 at 5:37