*/
// LadyHavoc: for some reason this is being #include'd rather than treated as its own file...
-// LadyHavoc: adapted to not require stdint.h as this is not available on MSVC++, using unsigned char instead of uint8_t and fs_offset_t instead of int64_t.
+
+#include "quakedef.h"
+#include "client.h"
+#include "cl_video.h"
+#include "cl_video_libavw.h"
// scaler type
#define LIBAVW_SCALER_BILINEAR 0
#define LIBAVW_PRINT_PANIC 4
// exported callback functions:
typedef void avwCallbackPrint(int, const char *);
-typedef int avwCallbackIoRead(void *, unsigned char *, int);
-typedef fs_offset_t avwCallbackIoSeek(void *, fs_offset_t, int);
-typedef fs_offset_t avwCallbackIoSeekSize(void *);
+typedef int avwCallbackIoRead(void *, uint8_t *, int);
+typedef uint64_t avwCallbackIoSeek(void *, uint64_t, int);
+typedef uint64_t avwCallbackIoSeekSize(void *);
// exported functions:
int (*qLibAvW_Init)(avwCallbackPrint *printfunction); // init library, returns error code
const char *(*qLibAvW_ErrorString)(int errorcode); // get string for error code
const char* dllnames_libavw[] =
{
#if defined(WIN32)
- "libavw.dll",
+ "libavcodec.dll",
#elif defined(MACOSX)
- "libavw.dylib",
+ "libavcodec.dylib",
#else
- "libavw.so.1",
- "libavw.so",
+ "libavcodec.so",
#endif
NULL
};
}
// IO wrapper
-static int LibAvW_FS_Read(void *opaque, unsigned char *buf, int buf_size)
+static int LibAvW_FS_Read(void *opaque, uint8_t *buf, int buf_size)
{
return FS_Read((qfile_t *)opaque, buf, buf_size);
}
-static fs_offset_t LibAvW_FS_Seek(void *opaque, fs_offset_t pos, int whence)
+static uint64_t LibAvW_FS_Seek(void *opaque, uint64_t pos, int whence)
{
- return (fs_offset_t)FS_Seek((qfile_t *)opaque, pos, whence);
+ return (uint64_t)FS_Seek((qfile_t *)opaque, pos, whence);
}
-static fs_offset_t LibAvW_FS_SeekSize(void *opaque)
+static uint64_t LibAvW_FS_SeekSize(void *opaque)
{
- return (fs_offset_t)FS_FileSize((qfile_t *)opaque);
+ return (uint64_t)FS_FileSize((qfile_t *)opaque);
}
// open as DP video stream
-static void *LibAvW_OpenVideo(clvideo_t *video, char *filename, const char **errorstring)
+void *LibAvW_OpenVideo(clvideo_t *video, char *filename, const char **errorstring)
{
libavwstream_t *s;
char filebase[MAX_OSPATH], check[MAX_OSPATH];
Con_Printf(CON_ERROR "LibAvcodec panic: %s\n", message);
}
-static qboolean LibAvW_OpenLibrary(void)
+qboolean LibAvW_OpenLibrary(void)
{
int errorcode;
return true;
}
-static void LibAvW_CloseLibrary(void)
+void LibAvW_CloseLibrary(void)
{
Sys_UnloadLibrary(&libavw_dll);
}
-
<ClCompile Include="cl_particles.c" />\r
<ClCompile Include="cl_screen.c" />\r
<ClCompile Include="cl_video.c" />\r
+ <ClCompile Include="cl_video_libavw.c" />\r
<ClCompile Include="clvm_cmds.c" />\r
<ClCompile Include="cmd.c" />\r
<ClCompile Include="collision.c" />\r
<ClInclude Include="cl_gecko.h" />\r
<ClInclude Include="cl_screen.h" />\r
<ClInclude Include="cl_video.h" />\r
+ <ClInclude Include="cl_video_libavw.h" />\r
<ClInclude Include="client.h" />\r
<ClInclude Include="clprogdefs.h" />\r
<ClInclude Include="clvm_cmds.h" />\r
<ClCompile Include="cl_particles.c" />\r
<ClCompile Include="cl_screen.c" />\r
<ClCompile Include="cl_video.c" />\r
+ <ClCompile Include="cl_video_libavw.c" />\r
<ClCompile Include="clvm_cmds.c" />\r
<ClCompile Include="cmd.c" />\r
<ClCompile Include="collision.c" />\r
<ClInclude Include="cl_gecko.h" />\r
<ClInclude Include="cl_screen.h" />\r
<ClInclude Include="cl_video.h" />\r
+ <ClInclude Include="cl_video_libavw.h" />\r
<ClInclude Include="client.h" />\r
<ClInclude Include="clprogdefs.h" />\r
<ClInclude Include="clvm_cmds.h" />\r