Skip to content
This repository has been archived by the owner on Apr 18, 2024. It is now read-only.

Commit

Permalink
Rewrite video capturing and fix some endian issues with all captures …
Browse files Browse the repository at this point in the history
…as well. Thanks jmarsh

git-svn-id: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4314 ed541006-0bf7-43e9-8c4d-6fc63c346d47
  • Loading branch information
qbix79 committed Feb 6, 2020
1 parent 7d9c310 commit 072b906
Show file tree
Hide file tree
Showing 6 changed files with 662 additions and 370 deletions.
27 changes: 23 additions & 4 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -439,12 +439,12 @@ else
fi

AH_TEMPLATE(C_SSHOT,[Define to 1 to enable screenshots, requires libpng])
AC_ARG_ENABLE(screenshots,AC_HELP_STRING([--disable-screenshots],[Disable screenshots and movie recording]),,enable_screenshots=yes)
AC_CHECK_HEADER(png.h,have_png_h=yes,)
AC_CHECK_LIB(png, png_get_io_ptr, have_png_lib=yes, ,-lz)
AC_ARG_ENABLE(screenshots,AC_HELP_STRING([--disable-screenshots],[Disable screenshots]),enable_screenshots=no,enable_screenshots=yes)
AC_CHECK_HEADER(png.h,have_png_h=yes,have_png_h=no)
AC_CHECK_LIB(png, png_get_io_ptr, have_png_lib=yes, have_png_lib=no,-lz)
AC_MSG_CHECKING([whether screenshots will be enabled])
if test x$enable_screenshots = xyes; then
if test x$have_png_lib = xyes -a x$have_png_h = xyes ; then
if test x$have_png_lib = xyes -a x$have_png_h = xyes ; then
LIBS="$LIBS -lpng -lz"
AC_DEFINE(C_SSHOT,1)
AC_MSG_RESULT([yes])
Expand All @@ -455,6 +455,25 @@ else
AC_MSG_RESULT([no])
fi

AH_TEMPLATE(C_SRECORD,[Define to 1 to enable movie recording, requires zlib built without Z_SOLO])
AC_ARG_ENABLE(recording,AC_HELP_STRING([--disable-recording],[Disable movie recording]),,enable_recording=yes)
AC_CHECK_HEADER(zlib.h,have_zlib_h=yes)
AC_CHECK_LIB(z,compress,have_z_lib=yes,,)
AC_MSG_CHECKING([whether recording will be enabled])
if test x$enable_recording = xyes; then
if test x$have_z_lib = xyes -a x$have_zlib_h = xyes ; then
if test x$enable_screenshots = xno -o x$have_png_h = xno -o x$have_png_lib = xno ; then
LIBS="$LIBS -lz"
fi
AC_DEFINE(C_SRECORD,1)
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no, can't find zlib.])
fi
else
AC_MSG_RESULT([no])
fi

AH_TEMPLATE(C_MODEM,[Define to 1 to enable internal modem support, requires SDL_net])
AH_TEMPLATE(C_IPX,[Define to 1 to enable IPX over Internet networking, requires SDL_net])
AC_CHECK_HEADER(SDL_net.h,have_sdl_net_h=yes,)
Expand Down
4 changes: 2 additions & 2 deletions include/hardware.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ bool TS_Get_Address(Bitu& tsaddr, Bitu& tsirq, Bitu& tsdma);
extern Bit8u adlib_commandreg;
FILE * OpenCaptureFile(const char * type,const char * ext);

void CAPTURE_AddWave(Bit32u freq, Bit32u len, Bit16s * data);
void CAPTURE_AddWave(Bit32u freq, Bitu len, Bit16s * data);
#define CAPTURE_FLAG_DBLW 0x1
#define CAPTURE_FLAG_DBLH 0x2
void CAPTURE_AddImage(Bitu width, Bitu height, Bitu bpp, Bitu pitch, Bitu flags, float fps, Bit8u * data, Bit8u * pal);
void CAPTURE_AddImage(Bitu width, Bitu height, Bitu bpp, Bitu pitch, Bitu flags, float fps, const Bit8u * data, const Bit8u * pal);
void CAPTURE_AddMidi(bool sysex, Bitu len, Bit8u * data);

#endif
Loading

0 comments on commit 072b906

Please sign in to comment.