View | Details | Raw Unified | Return to bug 120088
Collapse All | Expand All

(-)ChangeLog (+2 lines)
Lines 1-4 Link Here
1
xine-lib (1.0.3)
1
xine-lib (1.0.3)
2
  * fixed format string vulnerability in audio CD input plugin
3
  * some build system fixes for Windows
2
4
3
xine-lib (1.0.2)
5
xine-lib (1.0.2)
4
  * fixed playback of single-session Real RTSP streams, such as
6
  * fixed playback of single-session Real RTSP streams, such as
(-)configure.ac (-100 / +151 lines)
Lines 16-22 Link Here
16
dnl
16
dnl
17
XINE_MAJOR=1
17
XINE_MAJOR=1
18
XINE_MINOR=0
18
XINE_MINOR=0
19
XINE_SUB=2
19
XINE_SUB=3
20
20
21
if test $XINE_SUB -eq 0 ; then
21
if test $XINE_SUB -eq 0 ; then
22
  XINE_SUBPART="";
22
  XINE_SUBPART="";
Lines 50-56 Link Here
50
dnl    libname.so.(XINE_LT_CURRENT - XINE_LT_AGE).XINE_LT_AGE.XINE_LT_REVISION
50
dnl    libname.so.(XINE_LT_CURRENT - XINE_LT_AGE).XINE_LT_AGE.XINE_LT_REVISION
51
51
52
XINE_LT_CURRENT=14
52
XINE_LT_CURRENT=14
53
XINE_LT_REVISION=0
53
XINE_LT_REVISION=1
54
XINE_LT_AGE=13
54
XINE_LT_AGE=13
55
55
56
dnl for a release tarball do "rm .cvsversion" before "make dist"
56
dnl for a release tarball do "rm .cvsversion" before "make dist"
Lines 192-213 Link Here
192
dnl threads and OS specific stuff
192
dnl threads and OS specific stuff
193
dnl ---------------------------------------------
193
dnl ---------------------------------------------
194
194
195
AC_ARG_WITH(pthread-prefix, 
196
  AC_HELP_STRING(
197
    [--with-pthread-prefix=PREFIX],
198
    [path to pthread library]),
199
  [pthread_prefix="$withval"],
200
  [pthread_prefix="no"])
201
195
case "$host" in
202
case "$host" in
196
  *-*-freebsd*)
203
  *-*-freebsd*)
197
    THREAD_LIBS="-L/usr/local/lib -pthread"
204
    if test x"$pthread_prefix" = "xno"; then
198
    THREAD_CFLAGS="-I/usr/local/include -D_THREAD_SAFE"
205
      pthread_prefix="/usr/local"
199
206
    fi
200
    CFLAGS="$THREAD_CFLAGS $CFLAGS"
207
    THREAD_LIBS="-L$pthread_prefix/lib -pthread"
208
    THREAD_CPPFLAGS="-I$pthread_prefix/include"
209
    CPPFLAGS="$CPPFLAGS $THREAD_CPPFLAGS -D_THREAD_SAFE"
210
    have_pthread=yes
201
211
202
    ;;
212
    ;;
203
213
204
  *-*-hpux11*)
214
  *-*-hpux11*)
205
    THREAD_LIBS=" -lpthread"
215
    THREAD_LIBS="-lpthread"
206
    THREAD_CFLAGS="-D_REENTRANT"
216
    have_pthread=yes
207
    CFLAGS="$THREAD_CFLAGS $CFLAGS"
217
218
    ;;
219
220
  *)
221
    if test x"$pthread_prefix" = "xno"; then
222
      THREAD_LIBS="-lpthread"
223
    else
224
      THREAD_LIBS="-L$pthread_prefix/lib -lpthread"
225
      THREAD_CPPFLAGS="-I$pthread_prefix/include"
226
    fi
227
    CPPFLAGS="$CPPFLAGS $THREAD_CPPFLAGS"
228
229
    ac_save_LIBS="$LIBS"
230
    LIBS="$LIBS $THREAD_LIBS"
231
232
    AC_CHECK_LIB(pthread, pthread_create, have_pthread=yes)
208
233
234
    LIBS="$ac_save_LIBS"
209
    ;;
235
    ;;
236
esac
237
238
if test x"$have_pthread" != "xyes"; then
239
  AC_MSG_ERROR(pthread needed)
240
fi
241
242
AC_SUBST(THREAD_CPPFLAGS)
243
AC_SUBST(THREAD_LIBS)
244
245
dnl
246
AC_MSG_CHECKING(for recursive mutex support in pthread)
247
ac_save_LIBS="$LIBS"
248
LIBS="$LIBS $THREAD_LIBS"
249
250
AC_DEFINE(_GNU_SOURCE)
251
have_recursive_mutex=no
252
AC_COMPILE_IFELSE(AC_LANG_SOURCE([#include <pthread.h>
210
253
254
int main() {
255
  pthread_mutexattr_t attr;
256
  pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
257
  return 0;
258
}
259
	]),[
260
	    have_recursive_mutex=yes
261
	],[
262
	    AC_MSG_ERROR(recursive mutex support is needed - please report)
263
	])
264
LIBS="$ac_save_LIBS"
265
266
AC_MSG_RESULT($have_recursive_mutex)
267
268
269
dnl ---------------------------------------------
270
dnl Windows ports checks
271
dnl ---------------------------------------------
272
case "$host" in
211
  *-*-mingw* | *-*-cygwin*)
273
  *-*-mingw* | *-*-cygwin*)
212
    dnl check if we are using the cygwin, mingw or cygwin with mno-cygwin mode
274
    dnl check if we are using the cygwin, mingw or cygwin with mno-cygwin mode
213
    dnl in which case we are actually dealing with a mingw32 compiler
275
    dnl in which case we are actually dealing with a mingw32 compiler
Lines 225-292 Link Here
225
    esac
287
    esac
226
288
227
    if test "$SYS" = "mingw32"; then
289
    if test "$SYS" = "mingw32"; then
228
      THREAD_CONFIGURE_CPPFLAGS="-I${srcdir}/win32/contrib/pthreads"
290
      WIN32_CPPFLAGS='-I$(top_srcdir)/win32/include'
229
      THREAD_INCLUDES='-I$(top_srcdir)/win32/contrib/pthreads'
230
      THREAD_LIBS='$(top_builddir)/win32/contrib/pthreads/libpthread.la'
231
      THREAD_CFLAGS_CONFIG=" "
232
      THREAD_LIBS_CONFIG=" "
233
      WIN32_CPPFLAGS='-I$(top_srcdir)/win32/include -I$(top_srcdir)/win32/contrib/dirent'
234
      LIBS="-lwinmm -lwsock32 $LIBS"
291
      LIBS="-lwinmm -lwsock32 $LIBS"
235
      GOOM_LIBS="-liberty"
292
      GOOM_LIBS="-liberty"
236
237
      need_internal_zlib=yes
238
    fi
293
    fi
239
    LDFLAGS="-no-undefined $LDFLAGS"
294
    LDFLAGS="-no-undefined $LDFLAGS"
240
    ;;
295
    ;;
241
    
242
243
  *)
244
    AC_CHECK_LIB(pthread, pthread_create,
245
  	     [THREAD_LIBS="-lpthread"],
246
 	     [AC_MSG_ERROR(pthread needed)])
247
    ;;
248
esac
296
esac
249
dnl different thread cflags and libs for libxine and for external 
250
dnl application linking libxine
251
if test "x$THREAD_CFLAGS_CONFIG" = "x"; then
252
  THREAD_CFLAGS_CONFIG=$THREAD_CFLAGS
253
fi
254
if test "x$THREAD_LIBS_CONFIG" = "x"; then
255
  THREAD_LIBS_CONFIG=$THREAD_LIBS
256
fi
257
dnl used for building xine
258
AC_SUBST(THREAD_CFLAGS)
259
AC_SUBST(THREAD_INCLUDES)
260
AC_SUBST(THREAD_LIBS)
261
AC_SUBST(GOOM_LIBS)
297
AC_SUBST(GOOM_LIBS)
262
dnl needed for xine-config
263
AC_SUBST(THREAD_CFLAGS_CONFIG)
264
AC_SUBST(THREAD_LIBS_CONFIG)
265
dnl WIN32 platform
266
AC_SUBST(WIN32_CPPFLAGS)
298
AC_SUBST(WIN32_CPPFLAGS)
267
AM_CONDITIONAL(WIN32, test x$SYS = "xmingw32")
299
AM_CONDITIONAL(WIN32, test x$SYS = "xmingw32")
268
300
269
dnl
270
AC_MSG_CHECKING(for recursive mutex support in pthread)
271
AC_DEFINE(_GNU_SOURCE)
272
have_recursive_mutex=no
273
saved_cppflags="$CPPFLAGS"
274
CPPFLAGS="$CPPFLAGS $THREAD_CONFIGURE_CPPFLAGS"
275
AC_COMPILE_IFELSE(AC_LANG_SOURCE([#include <pthread.h>
276
277
int main() {
278
  pthread_mutexattr_t attr;
279
  pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
280
  return 0;
281
})
282
	],[
283
	    have_recursive_mutex=yes
284
	],[
285
	    AC_MSG_ERROR(recursive mutex support is needed - please report)
286
	])
287
AC_MSG_RESULT($have_recursive_mutex)
288
CPPFLAGS="$saved_cppflags"
289
290
301
291
dnl ---------------------------------------------
302
dnl ---------------------------------------------
292
dnl dynamic linker
303
dnl dynamic linker
Lines 455-477 Link Here
455
dnl zlib
466
dnl zlib
456
dnl ---------------------------------------------
467
dnl ---------------------------------------------
457
468
458
dnl internal zlib permited only in MINGW-like platform
469
AC_ARG_WITH(zlib-prefix, 
459
if test "x$need_internal_zlib" = "xyes"; then
470
  AC_HELP_STRING(
460
  have_zlib=no
471
    [--with-zlib-prefix=PREFIX],
461
  ZLIB_INCLUDES='-I$(top_srcdir)/win32/contrib/zlib'
472
    [path to zlib compression library]),
462
  ZLIB_LIBS='$(top_builddir)/win32/contrib/zlib/libzlib.la'
473
  [zlib_prefix="$withval"],
463
  ZLIB_LIBS_CONFIG=""
474
  [zlib_prefix="no"])
464
else
475
465
  AC_CHECK_LIB(z, gzsetparams,
476
if test x"$zlib_prefix" = "xno"; then
466
    [AC_CHECK_HEADER(zlib.h,
477
  ZLIB_LIBS="-lz"
467
       have_zlib=yes
478
else
468
       ZLIB_LIBS="-lz"
479
  ZLIB_CPPFLAGS="-I$zlib_prefix/include"
469
       ZLIB_LIBS_CONFIG="-lz",)], AC_MSG_ERROR(zlib needed))
480
  ZLIB_LIBS="-L$zlib_prefix/lib -lz"
481
fi
482
483
ac_save_CPPFLAGS="$CPPFLAGS"
484
ac_save_LIBS="$LIBS"
485
CPPFLAGS="$CPPFLAGS $ZLIB_CPPFLAGS"
486
LIBS="$LIBS $ZLIB_LIBS"
487
488
AC_CHECK_LIB(z, gzsetparams,
489
  [AC_CHECK_HEADER(zlib.h,
490
     have_zlib=yes)])
491
492
CPPFLAGS="$ac_save_CPPFLAGS"
493
LIBS="$ac_save_LIBS"
494
495
if test "x$have_zlib" != "xyes"; then
496
  AC_MSG_ERROR(zlib needed)
470
fi
497
fi
471
AM_CONDITIONAL(HAVE_ZLIB, [test x"$have_zlib" = "xyes"])
498
AC_SUBST(ZLIB_CPPFLAGS)
472
AC_SUBST(ZLIB_INCLUDES)
473
AC_SUBST(ZLIB_LIBS)
499
AC_SUBST(ZLIB_LIBS)
474
AC_SUBST(ZLIB_LIBS_CONFIG)
500
475
501
476
dnl ---------------------------------------------
502
dnl ---------------------------------------------
477
dnl check posix timers
503
dnl check posix timers
Lines 497-503 Link Here
497
523
498
case "$host_or_hostalias" in
524
case "$host_or_hostalias" in
499
  *linux* )
525
  *linux* )
500
    have_syncfb="yes"
526
    AC_ARG_ENABLE([fb],
527
      AC_HELP_STRING([--disable-fb], [do not build syncfb plugins]),
528
      have_syncfb=$enableval, have_syncfb="yes")
501
    ;;
529
    ;;
502
  *)
530
  *)
503
    have_syncfb="no"
531
    have_syncfb="no"
Lines 1646-1653 Link Here
1646
AC_CHECK_FUNCS([vsscanf sigaction sigset getpwuid_r nanosleep lstat memset strchr])
1674
AC_CHECK_FUNCS([vsscanf sigaction sigset getpwuid_r nanosleep lstat memset strchr])
1647
AC_FUNC_FSEEKO
1675
AC_FUNC_FSEEKO
1648
AC_DEFINE(_GNU_SOURCE)
1676
AC_DEFINE(_GNU_SOURCE)
1649
AC_CHECK_HEADERS(byteswap.h malloc.h execinfo.h ucontext.h sys/mman.h sys/mixer.h libgen.h netdb.h sys/times.h sys/ioctl.h)
1677
AC_CHECK_HEADERS(byteswap.h malloc.h execinfo.h ucontext.h sys/mman.h sys/mixer.h libgen.h netdb.h dirent.h sys/times.h sys/ioctl.h sys/param.h)
1650
AC_REPLACE_FUNCS(basename gettimeofday setenv strndup strpbrk strsep strtok_r)
1678
AC_REPLACE_FUNCS(basename gettimeofday setenv strndup strpbrk strsep strtok_r)
1679
AC_CHECK_FUNCS(readlink)
1651
1680
1652
AC_LIBSOURCE(hstrerror.c)
1681
AC_LIBSOURCE(hstrerror.c)
1653
AC_LINK_IFELSE([#include <netdb.h>
1682
AC_LINK_IFELSE([#include <netdb.h>
Lines 1661-1666 Link Here
1661
  AC_LIBOBJ(hstrerror)
1690
  AC_LIBOBJ(hstrerror)
1662
fi
1691
fi
1663
1692
1693
AC_LIBSOURCE(dirent_msvc.c)
1694
AC_CHECK_FUNC(opendir,
1695
  [AC_DEFINE(HAVE_OPENDIR, 1, [Define to 1 if you have 'opendir' function])],
1696
  [if test x"$SYS" = "xmingw32"; then
1697
    AC_LIBOBJ(dirent_msvc)
1698
  else
1699
    AC_MSG_ERROR([dirent is needed (opendir, readdir, ...)])
1700
  fi])
1701
1664
AH_BOTTOM([/* include internal system specific header */
1702
AH_BOTTOM([/* include internal system specific header */
1665
#include "os_internal.h"])
1703
#include "os_internal.h"])
1666
1704
Lines 2152-2177 Link Here
2152
if test "x$exec_prefix" = xNONE; then
2190
if test "x$exec_prefix" = xNONE; then
2153
   exec_prefix='${prefix}'
2191
   exec_prefix='${prefix}'
2154
fi
2192
fi
2193
2194
dnl
2195
dnl installation directories and directories relative to prefix
2196
dnl
2197
dnl Note:
2198
dnl   use AC_DEFINE for runtime
2199
dnl   use AC_SUBST for installation
2200
dnl
2201
XINE_PLUGINDIR="$libdir/xine/plugins/$XINE_MAJOR.$XINE_MINOR.$XINE_SUB"
2202
XINE_FONTDIR="${datadir}/xine/libxine$XINE_MAJOR/fonts"
2203
XINE_LOCALEDIR="${datadir}/locale"
2204
eval XINE_REL_PLUGINDIR="$XINE_PLUGINDIR"
2205
XINE_REL_PLUGINDIR=`eval echo "$XINE_REL_PLUGINDIR" | sed -e "s,^${prefix}/,,"`
2206
XINE_REL_FONTDIR=`eval echo "$XINE_FONTDIR" | sed -e "s,^${prefix}/,,"`
2207
XINE_REL_LOCALEDIR=`eval echo "$XINE_LOCALEDIR" | sed -e "s,^${prefix}/,,"`
2208
if test x"$SYS" = "xmingw32"; then
2209
  dnl polish paths (MinGW runtime accepts both \ and / anyway)
2210
  XINE_REL_PLUGINDIR=`echo "$XINE_REL_PLUGINDIR" | sed -e 's/\\//\\\\\\\\/g'`
2211
  XINE_REL_FONTDIR=`echo "$XINE_REL_FONTDIR" | sed -e 's/\\//\\\\\\\\/g'`
2212
  XINE_REL_LOCALEDIR=`echo "$XINE_REL_LOCALEDIR" | sed -e 's/\\//\\\\\\\\/g'`
2213
fi
2155
if test x"$SYS" = "xmingw32" -o x"$SYS" = "xcygwin"; then
2214
if test x"$SYS" = "xmingw32" -o x"$SYS" = "xcygwin"; then
2156
  dnl installation directories
2157
  eval XINE_PLUGINDIR="${bindir}/plugins"
2158
  eval XINE_FONTDIR="${bindir}/fonts"
2159
  eval XINE_LOCALEDIR="${bindir}/locale"
2160
  dnl directories from xine-config
2161
  XINE_PLUGINPATH="\`dirname \$0\`/plugins"
2162
  XINE_FONTPATH="\`dirname \$0\`/fonts"
2163
  XINE_LOCALEPATH="\`dirname \$0\`/locale"
2164
  dnl runtime directories
2165
  AC_DEFINE(XINE_PLUGINDIR,[exec_path_append_subdir("plugins")],[Define this to plugins directory location])
2166
  AC_DEFINE(XINE_FONTDIR,[exec_path_append_subdir("fonts")],[Define this to osd fonts dir location])
2167
  AC_DEFINE(XINE_LOCALEDIR,[exec_path_append_subdir("locale")],[Path where catalog files will be.])
2168
  dnl prefix in xine-config
2215
  dnl prefix in xine-config
2169
  XINE_CONFIG_PREFIX="\`dirname \$0\`/.."
2216
  XINE_CONFIG_PREFIX="\`dirname \$0\`/.."
2217
  dnl installation directories (in xine-config)
2218
  XINE_PLUGINPATH="$XINE_CONFIG_PREFIX/$XINE_REL_PLUGINDIR"
2219
  XINE_FONTPATH="$XINE_CONFIG_PREFIX/$XINE_REL_FONTDIR"
2220
  XINE_LOCALEPATH="$XINE_CONFIG_PREFIX/$XINE_REL_LOCALEDIR"
2221
  dnl runtime directories
2222
  AC_DEFINE(XINE_PLUGINDIR,[xine_get_plugindir()],[Define this to plugins directory location])
2223
  AC_DEFINE(XINE_FONTDIR,[xine_get_fontdir()],[Define this to osd fonts dir location])
2224
  AC_DEFINE(XINE_LOCALEDIR,[xine_get_localedir()],[Path where catalog files will be.])
2170
else
2225
else
2171
  dnl installation directories
2226
  dnl prefix in xine-config
2172
  XINE_PLUGINDIR="$libdir/xine/plugins/$XINE_MAJOR.$XINE_MINOR.$XINE_SUB"
2227
  XINE_CONFIG_PREFIX="${prefix}"
2173
  XINE_FONTDIR="${datadir}/xine/libxine$XINE_MAJOR/fonts"
2174
  XINE_LOCALEDIR="${datadir}/locale"
2175
  dnl directories from xine-config and runtime directories
2228
  dnl directories from xine-config and runtime directories
2176
  eval XINE_PLUGINPATH=`eval echo "$XINE_PLUGINDIR"`
2229
  eval XINE_PLUGINPATH=`eval echo "$XINE_PLUGINDIR"`
2177
  eval XINE_FONTPATH="$XINE_FONTDIR"
2230
  eval XINE_FONTPATH="$XINE_FONTDIR"
Lines 2180-2188 Link Here
2180
  AC_DEFINE_UNQUOTED(XINE_PLUGINDIR,"$XINE_PLUGINPATH",[Define this to plugins directory location])
2233
  AC_DEFINE_UNQUOTED(XINE_PLUGINDIR,"$XINE_PLUGINPATH",[Define this to plugins directory location])
2181
  AC_DEFINE_UNQUOTED(XINE_FONTDIR,"$XINE_FONTPATH",[Define this to osd fonts dir location])
2234
  AC_DEFINE_UNQUOTED(XINE_FONTDIR,"$XINE_FONTPATH",[Define this to osd fonts dir location])
2182
  AC_DEFINE_UNQUOTED(XINE_LOCALEDIR, "$XINE_LOCALEPATH",[Path where catalog files will be.])
2235
  AC_DEFINE_UNQUOTED(XINE_LOCALEDIR, "$XINE_LOCALEPATH",[Path where catalog files will be.])
2183
  dnl prefix in xine-config
2184
  XINE_CONFIG_PREFIX="${prefix}"
2185
fi
2236
fi
2237
AC_DEFINE_UNQUOTED(XINE_REL_PLUGINDIR,"$XINE_REL_PLUGINDIR",[Define this to plugin directory relative to execution prefix])
2238
AC_DEFINE_UNQUOTED(XINE_REL_FONTDIR,"$XINE_REL_FONTDIR",[Define this to font directory relative to prefix])
2239
AC_DEFINE_UNQUOTED(XINE_REL_LOCALEDIR,"$XINE_REL_LOCALEDIR",[Define this to font directory relative to prefix])
2186
AC_SUBST(XINE_CONFIG_PREFIX)
2240
AC_SUBST(XINE_CONFIG_PREFIX)
2187
AC_SUBST(XINE_PLUGINPATH)
2241
AC_SUBST(XINE_PLUGINPATH)
2188
AC_SUBST(XINE_FONTPATH)
2242
AC_SUBST(XINE_FONTPATH)
Lines 2230-2236 Link Here
2230
dnl some include paths ( !!! DO NOT REMOVE !!! )
2284
dnl some include paths ( !!! DO NOT REMOVE !!! )
2231
dnl ---------------------------------------------
2285
dnl ---------------------------------------------
2232
2286
2233
INCLUDES='-I$(top_srcdir) -I$(top_builddir)/include -I$(top_srcdir)/include -I$(top_srcdir)/src -I$(top_builddir)/src/xine-engine -I$(top_srcdir)/src/xine-engine -I$(top_srcdir)/src/xine-utils $(INTLDIR) -I$(top_builddir)/src/input -I$(top_srcdir)/src/input $(WIN32_CPPFLAGS) $(THREAD_INCLUDES) $(ZLIB_INCLUDES) -I$(top_srcdir)/lib'
2287
INCLUDES='-I$(top_srcdir) -I$(top_builddir)/include -I$(top_srcdir)/include -I$(top_srcdir)/src -I$(top_builddir)/src/xine-engine -I$(top_srcdir)/src/xine-engine -I$(top_srcdir)/src/xine-utils $(INTLDIR) -I$(top_builddir)/src/input -I$(top_srcdir)/src/input $(WIN32_CPPFLAGS) -I$(top_srcdir)/lib'
2234
AC_SUBST(INCLUDES)
2288
AC_SUBST(INCLUDES)
2235
2289
2236
2290
Lines 2398-2406 Link Here
2398
src/xine-utils/Makefile
2452
src/xine-utils/Makefile
2399
src/xine-engine/Makefile
2453
src/xine-engine/Makefile
2400
win32/Makefile
2454
win32/Makefile
2401
win32/contrib/Makefile
2402
win32/contrib/pthreads/Makefile
2403
win32/contrib/zlib/Makefile
2404
win32/include/Makefile])
2455
win32/include/Makefile])
2405
AC_CONFIG_COMMANDS([default],[[chmod +x ./misc/SlackBuild ./misc/build_rpms.sh ./misc/relchk.sh]],[[]])
2456
AC_CONFIG_COMMANDS([default],[[chmod +x ./misc/SlackBuild ./misc/build_rpms.sh ./misc/relchk.sh]],[[]])
2406
AC_OUTPUT
2457
AC_OUTPUT
(-)doc/README.MINGWCROSS (-26 / +92 lines)
Lines 21-28 Link Here
21
21
22
    http://mingw.org/download.shtml
22
    http://mingw.org/download.shtml
23
23
24
    1) binutils (sources)
24
    1) binutils (sources), binutils-build.sh
25
    2) gcc-core, gcc-c++ (sources)
25
    2) gcc-core, gcc-c++ (sources), gcc-build.sh
26
    3) w32api, mingw-runtime (binaries and sources)
26
    3) w32api, mingw-runtime (binaries and sources)
27
27
28
  DirectX headers (tested with version 7):
28
  DirectX headers (tested with version 7):
Lines 30-43 Link Here
30
    http://www.google.com/search?hl=cs&q=win32-dx7headers.tgz
30
    http://www.google.com/search?hl=cs&q=win32-dx7headers.tgz
31
    http://www.google.com/search?q=dx7adxf.exe
31
    http://www.google.com/search?q=dx7adxf.exe
32
32
33
  Pthread Win32:
34
35
    ftp://sources.redhat.com/pub/pthreads-win32/
36
37
  zlib:
38
39
    http://www.zlib.net
40
33
41
34
Build
42
Build
35
-----
43
-----
36
44
37
In following text are used symbols PREFIX and USER with this meaning:
45
In following text are used symbols $PREFIX and $USER with this meaning:
38
46
39
  PREFIX .... directory of the mingw cross environtment
47
  $PREFIX .... directory of the mingw cross environtment
40
  USER ...... current user
48
  $USER ...... current user
41
49
42
50
43
1. compile binutils
51
1. compile binutils
Lines 47-60 Link Here
47
  cd bin
55
  cd bin
48
  ../binutils-2.13.90-20030111-1-src/configure \
56
  ../binutils-2.13.90-20030111-1-src/configure \
49
    --target=i386-mingw32 \
57
    --target=i386-mingw32 \
50
    --prefix=PREFIX
58
    --prefix=$PREFIX
51
  make
59
  make
52
  su
60
  su
53
  make install
61
  make install
54
  exit
62
  exit
55
63
56
64
57
2. add PREFIX/bin into PATH
65
2. add $PREFIX/bin into PATH
58
66
59
  ...
67
  ...
60
68
Lines 66-73 Link Here
66
  # this commands ensure write permission to target
74
  # this commands ensure write permission to target
67
  #
75
  #
68
  su
76
  su
69
  chmod g+w PREFIX{/lib,/i386-mingw32{/,/lib}}
77
  chmod g+w $PREFIX{/lib,/i386-mingw32{/,/lib}}
70
  chown root:USER PREFIX{/lib,/i386-mingw32{/,/lib}}
78
  chown root:$USER $PREFIX{/lib,/i386-mingw32{/,/lib}}
71
  exit
79
  exit
72
80
73
  #
81
  #
Lines 83-102 Link Here
83
  # compile and install the compiler
91
  # compile and install the compiler
84
  #
92
  #
85
  # if you'll want rerun this step, I recommend delete 
93
  # if you'll want rerun this step, I recommend delete 
86
  # PREFIX/i386-mingw32/sys-include
94
  # $PREFIX/i386-mingw32/sys-include
87
  #
95
  #
88
  tar xzf gcc-core-3.3.1-20030804-1-src.tar.gz
96
  tar xzf gcc-core-3.3.1-20030804-1-src.tar.gz
89
  tar xzf gcc-g++-3.3.1-20030804-1-src.tar.gz
97
  tar xzf gcc-g++-3.3.1-20030804-1-src.tar.gz
90
  mkdir gcc-bin
98
  mkdir gcc-bin
91
  cd gcc-bin 
99
  cd gcc-bin 
100
  # more option may be needed for successfull compilation,
101
  # see gcc-3.3.1-1-build.sh
92
  ../gcc-3.3.1-20030804-1/configure \
102
  ../gcc-3.3.1-20030804-1/configure \
93
    --disable-shared \
103
    --disable-shared \
94
    --enable-static \
95
    --target=i386-mingw32 \
104
    --target=i386-mingw32 \
96
    --with-headers=../runtime/include \
105
    --with-headers=../runtime/include \
97
    --with-libs=../runtime/lib \
106
    --with-libs=../runtime/lib \
98
    --prefix=PREFIX
107
    --prefix=$PREFIX
99
  make
108
  make
109
  #or recommended: make CFLAGS=-O2 LDFLAGS=-s
100
  su
110
  su
101
  make install
111
  make install
102
  exit
112
  exit
Lines 105-130 Link Here
105
  # set the permissions back
115
  # set the permissions back
106
  #
116
  #
107
  su
117
  su
108
  chmod -R g-w PREFIX
118
  chmod -R g-w $PREFIX
109
  chown -R root:root PREFIX
119
  chown -R root:root $PREFIX
110
  exit
120
  exit
111
121
112
122
113
4. recompile w32api and mingw-runtime from sources (optional)
123
4. recompile w32api and mingw-runtime from sources (optional)
114
 
124
 
115
  #
125
  #
116
  # installing must be into PREFIX/i386-mingw32
126
  # installing must be into $PREFIX/i386-mingw32
117
  #
127
  #
118
  tar xzf w32api-2.5-src.tar.gz
128
  tar xzf w32api-2.5-src.tar.gz
119
  cd w32api-2.5
129
  cd w32api-2.5
120
  ./configure --prefix=PREFIX/i386-mingw32 --host=i386-mingw32
130
  ./configure --prefix=$PREFIX/i386-mingw32 --host=i386-mingw32
121
  make
131
  make
122
  su
132
  su
123
  make install
133
  make install
124
  exit
134
  exit
125
135
126
  #
136
  #
127
  # installing must be into PREFIX/i386-mingw32
137
  # installing must be into $PREFIX/i386-mingw32
128
  #
138
  #
129
  tar xzf mingw-runtime-3.3-src.tar.gz
139
  tar xzf mingw-runtime-3.3-src.tar.gz
130
  cd mingw-runtime-3.3
140
  cd mingw-runtime-3.3
Lines 137-143 Link Here
137
  AR=i386-mingw32-ar \
147
  AR=i386-mingw32-ar \
138
  AS=i386-mingw32-as \
148
  AS=i386-mingw32-as \
139
  RANLIB=i386-mingw32-ranlib \
149
  RANLIB=i386-mingw32-ranlib \
140
  ./configure --prefix=PREFIX/i386-mingw32 --target=i386-mingw32
150
  ./configure --prefix=$PREFIX/i386-mingw32 --target=i386-mingw32
141
  make
151
  make
142
  su
152
  su
143
  make install
153
  make install
Lines 145-161 Link Here
145
155
146
156
147
5. install DirectX headers and other libraries
157
5. install DirectX headers and other libraries
158
148
  su
159
  su
149
  cd PREFIX/include
160
  cd $PREFIX/include
150
  # untar dx7headers.tar.gz
161
  # untar dx7headers.tar.gz (maybe to a subdirectory)
151
  ...
162
  ...
152
  exit
163
  exit
153
164
154
165
166
6. compile and install pthreads-win32
167
168
  tar xzf pthreads-w32-2-7-0-release.tar.gz
169
  cd pthreads-w32-2-7-0-release/
170
  make CROSS=i386-mingw32- PTHREAD_DEF=pthreadGC2.def clean GC 
171
  #
172
  # possibility to use pthread library in M$ Visual C (optional)
173
  #
174
  mv pthread.def pthreadGC2.def
175
  wine LIB.EXE /machine:i386 /def:pthreadGC2.def
176
  #
177
  # installing
178
  #
179
  su
180
  mkdir -p $PREFIX/pthreads-win32/bin
181
  mkdir -p $PREFIX/pthreads-win32/include
182
  mkdir -p $PREFIX/pthreads-win32/lib
183
  cp pthreadGC2.dll $PREFIX/pthreads-win32/bin/
184
  cp libpthreadGC2.a pthreadGC2.lib $PREFIX/pthreads-win32/lib/
185
  ln -s libpthreadGC2.a $PREFIX/pthreads-win32/lib/libpthread.a
186
  ln -s pthreadGC2.lib $PREFIX/pthreads-win32/lib/pthread.lib
187
  cp pthread.h semaphore.h sched.h $PREFIX/pthreads-win32/include/
188
  exit
189
190
191
7. compile and install zlib
192
193
  tar xjf zlib-1.2.3.tar.bz2
194
  cd zlib-1.2.3
195
  #
196
  # small workaround in Makefile:
197
  #
198
  sed -e 's/dllwrap /i386-mingw32-dllwrap /g' win32/Makefile.gcc > Makefile
199
  #
200
  # compiling
201
  #
202
  make CC=i386-mingw32-gcc AR=i386-mingw32-ar RC=i386-mingw32-windres STATICLIB=libz-static.a IMPLIB=libz.a
203
  #
204
  # possibility to use zlib library in M$ Visual C (optional)
205
  #
206
  cp win32/zlib.def zlib1.def
207
  wine LIB.EXE /machine:i386 /def:zlib1.def
208
  #
209
  # installing
210
  #
211
  su
212
  mkdir -p $PREFIX/zlib/{include,lib,bin}
213
  cp zconf.h zlib.h $PREFIX/zlib/include/
214
  cp libz.a libz-static.a zlib1.lib $PREFIX/zlib/lib/
215
  cp zlib1.dll $PREFIX/zlib/bin/
216
  exit
217
218
155
Using MinGW cross development tools
219
Using MinGW cross development tools
156
-----------------------------------
220
-----------------------------------
157
221
158
We can build xine library for Windows by this way:
222
Now we can build xine library for Windows by this way:
159
223
160
  #
224
  #
161
  # configure for mingw cross compiling
225
  # configure for mingw cross compiling
Lines 166-172 Link Here
166
    --build=i686-debian-linux \
230
    --build=i686-debian-linux \
167
    --disable-freetype \
231
    --disable-freetype \
168
    --disable-vcd \
232
    --disable-vcd \
169
    --with-dxheaders=/mingw32/include/dx7headers
233
    --with-dxheaders=$PREFIX/include/dx7headers \
234
    --with-zlib-prefix=$PREFIX/zlib \
235
    --with-pthread-prefix=$PREFIX/pthreads-win32
170
236
171
  #
237
  #
172
  # build system isn't fully prepared for cross compiling, so it's needed
238
  # build system isn't fully prepared for cross compiling, so it's needed
Lines 184-196 Link Here
184
  # install
250
  # install
185
  #
251
  #
186
  make install DESTDIR=/tmp/xine-lib-mingwcross
252
  make install DESTDIR=/tmp/xine-lib-mingwcross
187
  rm /tmp/xine-lib-mingwcross/bin/plugins{/,/post}/*.a
253
  rm /tmp/xine-lib-mingwcross/lib/xine/plugins/1.1.0{/,/post}/*.a
188
254
189
  #
255
  #
190
  # if we want to use xine library in M$ compilers, we will need some tools from
256
  # if we want to use xine library in M$ compilers, we will need wine and some
191
  # M$ Visual C: LIB.EXE, LINK.EXE, MSPDB60.DLL and wine
257
  # tools from M$ Visual C: LIB.EXE, LINK.EXE, MSPDB60.DLL
192
  #
258
  #
193
  # create libxine-1.lib file
259
  # create libxine-1.lib file (optional)
194
  #
260
  #
195
  cd <path_where_libxine_is_installed_>/lib
261
  cd <path_where_libxine_is_installed_>/lib
196
  cp ../bin/libxine-1.dll .
262
  cp ../bin/libxine-1.dll .
(-)doc/README.WIN32 (-20 / +29 lines)
Lines 6-12 Link Here
6
6
7
Download
7
Download
8
--------
8
--------
9
Checkout source code from CVS (under Windows can be used CygWin or another tool). You will need 'xine-lib' (the library) and 'xine-win32' (testing Windows frontend).
9
Checkout source code from CVS (under Windows can be used CygWin or another tool). You will need 'xine-lib' (the library) and 'xine-win32' (testing Windows frontend). Instead xine-win32 you can use any other frontend working under Windows (toxine, ...)
10
10
11
11
12
Build
12
Build
Lines 20-32 Link Here
20
20
21
1. MinGW port
21
1. MinGW port
22
-------------
22
-------------
23
This is the best way. Final library is 100% native Windows with all optimizations.
23
This is the best way. Result is 100% native Windows library with all optimizations.
24
24
25
Also you can use cross-build from comfortable unix-like system. See README.MINGWCROSS for more information.
25
Also you can use cross-build from comfortable unix-like system. See README.MINGWCROSS for more information.
26
26
27
Requirements for compilation under Windows:
27
Requirements for compilation under Windows:
28
  a) MinGW installed on Windows
28
  a) installed MinGW
29
  b) LIB.EXE, LINK.EXE and MSPDB60.DLL from M$ Visual C 
29
  b) LIB.EXE, LINK.EXE and MSPDB60.DLL from M$ Visual C
30
     (necessary only for usability created xine library by M$ compilers)
30
     (necessary only for usability created xine library by M$ compilers)
31
31
32
How to build:
32
How to build:
Lines 51-57 Link Here
51
    # run terminal window (MinGW for example)
51
    # run terminal window (MinGW for example)
52
    ...
52
    ...
53
    # creating libxine-1.lib file
53
    # creating libxine-1.lib file
54
    cd <path_where_libxine_is_installed_>/lib
54
    cd <path_where_libxine_is_installed>/lib
55
    cp ../bin/libxine-1.dll .
55
    cp ../bin/libxine-1.dll .
56
    <path_to_M$VC>/VC98/BIN/LIB.EXE /machine:i386 /def:libxine-1.def
56
    <path_to_M$VC>/VC98/BIN/LIB.EXE /machine:i386 /def:libxine-1.def
57
    rm libxine-1.dll
57
    rm libxine-1.dll
Lines 59-65 Link Here
59
59
60
2. CygWin port
60
2. CygWin port
61
--------------
61
--------------
62
This is the second way. Created library won't be 100% windows native: it will contains some additional emulation code and I'm not sure, if can be used with M$ compilers.
62
This is the second way. Created library won't be 100% windows native: it will contains some additional emulation code and I'm not sure, if it can be used with M$ compilers.
63
63
64
It's possible to use CygWin for cross-compiling with MinGW.
64
It's possible to use CygWin for cross-compiling with MinGW.
65
65
Lines 88-104 Link Here
88
 - can't compile included ffmpeg (important multi-decoder in xine)
88
 - can't compile included ffmpeg (important multi-decoder in xine)
89
 - can't compile new assembler code (it means degradation of power)
89
 - can't compile new assembler code (it means degradation of power)
90
 - never 100% up to date
90
 - never 100% up to date
91
 - somebody must buy the OS and compiler
91
 - somebody must own the OS and compiler
92
92
93
Reasons, why to use this port:
93
Reasons, why to use this port:
94
 - obtaining backtrace after crash, debugging
94
 - obtaining cute backtrace after crash, debugging
95
95
96
How to build xine in M$ Visual C:
96
How to build xine in M$ Visual C:
97
  - Set up MSVC to look for DirectX headers.
97
  - Set up MSVC to look for DirectX headers.
98
98
99
  - Open up the xine.dsw workspace/project in MSVC.
99
  - Download Pthreads Win32
100
    (ftp://sources.redhat.com/pub/pthreads-win32/), from prebuild directory
101
    install include/*.h, lib/pthreadVC2.lib and lib/pthreadVC2.dll,
102
    rename pthreadVC2.lib to pthread.lib
103
    set up MSVC - libraries and headers.
104
105
  - Download zlib (http://www.zlib.net), instal all in include and lib,
106
    set up MSVC - libraries and headers.
100
107
101
  - Unless you have a project file to build css you must select Cancel when prompted for the libdvdcss.dsp file.
108
  - Copy include/xine.h.in to include/xine.h, replace @text@ by right values
109
    (eg. XINE_MAJOR 1, XINE_MINOR 1, XINE_SUB 0, XINE_VERSION "1.1.0")
110
111
  - Open up the xine.dsw workspace/project in MSVC.
102
112
103
  - Click on the FileView tab.
113
  - Click on the FileView tab.
104
114
Lines 107-125 Link Here
107
    libxine
117
    libxine
108
    libdvdnav
118
    libdvdnav
109
119
110
  - Next build any desired plugins (decoders/demuxers ...). The ao_out_directx and vo_out_directx are required for Win32. There is an option to use the vo_out_sdl but a sdl.dll must be present for that to take place. There have also been some issues observed with the directX video driver on some machines.
120
  - Next build any desired plugins (decoders/demuxers ...). The ao_out_directx2 and vo_out_directx are required for Win32. ao_out_directx is obsoleted. There is a possibility to use the vo_out_sdl but sdl.dll must be present for that to take place. There have also been some issues observed with the directX video driver on some machines.
111
121
112
  - If you want ffmpeg decoder plugin, you must use precompiled version. If you want to compile it, you should have the files LIB.EXE, LINK.EXE and MSPDB60.DLL from the Visual C++.
122
  - If you want ffmpeg decoder plugin, you must use precompiled version. If you want to compile it, you should have the files LIB.EXE, LINK.EXE and MSPDB60.DLL from the Visual C++.
113
    Under MinGW you can compile ffmpeg for xine by this way:
123
    Under MinGW you can compile ffmpeg for xine by this way:
114
124
115
    #
125
    #
116
    # run the script/patch necessary for MSVC a for xine
126
    # run the script/patch necessary for MSVC and for xine
117
    #
127
    #
118
    cd ffmpeg
128
    cd ffmpeg
119
    sh ../xine-lib/win32/scripts/ffmpeg_win32.patch
129
    sh ../xine-lib/win32/scripts/ffmpeg_win32.patch
120
130
121
    #
131
    #
122
    # for cross-compiling add "--cross-prefix=i386-mingw32-" and "--disable-mmx"
132
    # (for cross-compiling add "--cross-prefix=i386-mingw32-"
133
    #  and "--disable-mmx")
123
    #
134
    #
124
    ./configure \
135
    ./configure \
125
       --enable-gpl \
136
       --enable-gpl \
Lines 130-137 Link Here
130
    make
141
    make
131
142
132
    #
143
    #
133
    # for cross-compiling finalize linking by running this command in
144
    # linking by running this command in libavcodec/ directory (use wine for
134
    # libavcodec/ directory
145
    # cross-compiling)
135
    #
146
    #
136
    # it's done automatically if you have 'LIB.EXE' linked to 'lib' in your
147
    # it's done automatically if you have 'LIB.EXE' linked to 'lib' in your
137
    # $PATH and set wine
148
    # $PATH and set wine
Lines 151-163 Link Here
151
There remains many of work yet on Windows port.
162
There remains many of work yet on Windows port.
152
163
153
Limitations:
164
Limitations:
154
 - doesn't work under Win95/98 (DirectX? win32-pthreads?)
155
 - file > 1GB doesn't work (MinGW problem?)
165
 - file > 1GB doesn't work (MinGW problem?)
156
 - missing full Win32 frontend
157
 - build system isn't fully tuned for cross-compiling
166
 - build system isn't fully tuned for cross-compiling
167
 - seeking doesn't work with testing frontend, but it should be OK in library
158
168
159
Bugs:
169
Bugs:
160
 - use GetCurrentDirectory(SIZE, STR) because of changing volume drive!
170
 - random crashes and random locks in stress tests
161
 - random crashes
162
 - seeking doesn't work with testing frontend
163
 - non-seekable input plugins crash
171
 - non-seekable input plugins crash
172
 - ffmpeg bug visible for some video sizes
(-)doc/hackersguide/Makefile.am (-1 / +1 lines)
Lines 29-35 Link Here
29
29
30
clean-docs:
30
clean-docs:
31
	rm -f $(docs_DATA)
31
	rm -f $(docs_DATA)
32
	test "x$(srcdir)" = x. || rm -f $(hackersguide_sgml)
32
	test "x$(srcdir)" = x. || rm -f $(hackersguide_sgml) *.fig
33
33
34
dist-hook:
34
dist-hook:
35
	@if test x"$(distcheck_lax)" = x ; then \
35
	@if test x"$(distcheck_lax)" = x ; then \
(-)doc/hackersguide/output.sgml (-1 / +1 lines)
Lines 357-363 Link Here
357
    Rewiring is the reconnection of one post plugin's outputs and another post plugin's
357
    Rewiring is the reconnection of one post plugin's outputs and another post plugin's
358
    inputs. This can happen on the fly during playback, which makes this a very delicate
358
    inputs. This can happen on the fly during playback, which makes this a very delicate
359
    process. In one such input to output connection, only the output is active by either
359
    process. In one such input to output connection, only the output is active by either
360
    writing data directly to the connected intput or by calling functions there. Therefore
360
    writing data directly to the connected input or by calling functions there. Therefore
361
    we have to notify only the output, when it is rewired. This is done by calling the
361
    we have to notify only the output, when it is rewired. This is done by calling the
362
    <function>rewire()</function> member function of the corresponding
362
    <function>rewire()</function> member function of the corresponding
363
    <type>xine_post_out_t</type> when the frontend issues a rewiring on this output.
363
    <type>xine_post_out_t</type> when the frontend issues a rewiring on this output.
(-)lib/os_internal.h (-5 / +116 lines)
Lines 1-6 Link Here
1
#ifndef _XINE_OS_INTERNAL_H
2
#define _XINE_OS_INTERNAL_H
3
1
#include <stddef.h>
4
#include <stddef.h>
2
#include "os_types.h"
5
#include "os_types.h"
3
6
7
8
#if defined (__SVR4) && defined (__sun)
9
#  include <sys/int_types.h>
10
11
/* maybe needed for FreeBSD 4-STABLE */
12
/* 
13
#elif defined (__FreeBSD__)
14
#  include <stdint.h>
15
*/
16
17
#endif
18
19
20
#if defined(WIN32)
21
#  define XINE_DIRECTORY_SEPARATOR_STRING ";"
22
#  define XINE_DIRECTORY_SEPARATOR_CHAR ';'
23
#  define XINE_SUBDIRECTORY_SEPARATOR_STRING "\\"
24
#  define XINE_SUBDIRECTORY_SEPARATOR_CHAR '\\'
25
#else
26
#  define XINE_DIRECTORY_SEPARATOR_STRING ":"
27
#  define XINE_DIRECTORY_SEPARATOR_CHAR ':'
28
#  define XINE_SUBDIRECTORY_SEPARATOR_STRING "/"
29
#  define XINE_SUBDIRECTORY_SEPARATOR_CHAR '/'
30
#endif
31
32
4
/* replacement of strndup */
33
/* replacement of strndup */
5
#ifndef HAVE_STRNDUP
34
#ifndef HAVE_STRNDUP
6
#define strndup(S, N) _xine_private_strndup((S), (N))
35
#define strndup(S, N) _xine_private_strndup((S), (N))
Lines 55-69 Link Here
55
char *_xine_private_strsep(char **stringp, const char *delim);
84
char *_xine_private_strsep(char **stringp, const char *delim);
56
#endif
85
#endif
57
86
58
/* replacing lstat by stat */
59
#ifndef HAVE_LSTAT
60
#  define lstat(FILENAME, BUF) stat((FILENAME), (BUF))
61
#endif
62
63
/* macross needed for MSVC */
87
/* macross needed for MSVC */
64
#ifdef _MSC_VER
88
#ifdef _MSC_VER
65
#  define snprintf _snprintf
89
#  define snprintf _snprintf
66
#  define vsnprintf _vsnprintf
90
#  define vsnprintf _vsnprintf
67
#  define strcasecmp _stricmp
91
#  define strcasecmp _stricmp
68
#  define strncasecmp _strnicmp
92
#  define strncasecmp _strnicmp
93
#  define M_PI 3.14159265358979323846
94
#endif
95
96
#ifdef WIN32
97
#  include <io.h>
98
#  ifdef _MSC_VER
99
#    include <direct.h>
100
#  else
101
#    define mkdir(A, B) _mkdir((A))
102
#  endif
103
104
#  ifndef S_ISDIR
105
#    define S_ISDIR(m) ((m) & _S_IFDIR)
106
#  endif
107
108
#  ifndef S_ISREG
109
#    define S_ISREG(m) ((m) & _S_IFREG)
110
#  endif
111
112
#  ifndef S_ISBLK
113
#    define S_ISBLK(m) 0
114
#  endif
115
116
#  ifndef S_ISCHR
117
#    define S_ISCHR(m) 0
118
#  endif
119
120
#  ifndef S_ISLNK
121
#    define S_ISLNK(mode)  0
122
#  endif
123
124
#  ifndef S_ISSOCK
125
#    define S_ISSOCK(mode) 0
126
#  endif
127
128
#  ifndef S_ISFIFO
129
#    define S_ISFIFO(mode) 0
130
#  endif
131
132
#  ifndef S_IXUSR
133
#    define S_IXUSR S_IEXEC
134
#  endif
135
136
#  ifndef S_IXGRP
137
#    define S_IXGRP S_IEXEC
138
#  endif
139
140
#  ifndef S_IXOTH
141
#    define S_IXOTH S_IEXEC
142
#  endif
143
144
#  if !S_IXUGO
145
#    define S_IXUGO (S_IXUSR | S_IXGRP | S_IXOTH)
146
#  endif
147
148
#endif
149
150
#ifndef HAVE_READLINK
151
#  define readlink(PATH, BUF, BUFSIZE) 0
152
#endif
153
154
/* replacing lstat by stat */
155
#ifndef HAVE_LSTAT
156
#  define lstat(FILENAME, BUF) stat((FILENAME), (BUF))
157
#endif
158
159
/* replacements of dirent for MSVC platform */
160
#ifndef HAVE_OPENDIR
161
typedef struct DIR DIR;
162
163
struct dirent {
164
  unsigned short d_reclen;
165
  char *d_name;
166
};
167
168
DIR           *_xine_private_opendir(const char *);
169
int           _xine_private_closedir(DIR *);
170
struct dirent *_xine_private_readdir(DIR *);
171
void          _xine_private_rewinddir(DIR *);
172
173
#define opendir(DIRENT_NAME) _xine_private_opendir((DIRENT_NAME))
174
#define closedir(DIRENT_DIR) _xine_private_closedir((DIRENT_DIR))
175
#define readdir(DIRENT_DIR) _xine_private_readdir((DIRENT_DIR))
176
#define rewinddir(DIRENT_DIR) _xine_private_rewinddir((DIRENT_DIR))
177
178
#endif
179
69
#endif
180
#endif
(-)lib/setenv.c (-1 lines)
Lines 2-8 Link Here
2
2
3
#include <stdlib.h>
3
#include <stdlib.h>
4
#include <string.h>
4
#include <string.h>
5
#include <malloc.h>
6
#include <stdio.h>
5
#include <stdio.h>
7
6
8
/* This function will leak a small amount of memory */
7
/* This function will leak a small amount of memory */
(-)lib/strndup.c (-4 lines)
Lines 1-9 Link Here
1
#include "config.h"
1
#include "config.h"
2
2
3
#ifdef HAVE_MALLOC_H
4
#include <malloc.h>
5
#endif
6
7
#ifdef HAVE_STDLIB_H
3
#ifdef HAVE_STDLIB_H
8
#include <stdlib.h>
4
#include <stdlib.h>
9
#endif
5
#endif
(-)m4/ffmpeg.m4 (-3 / +8 lines)
Lines 75-87 Link Here
75
        AC_CHECK_LIB(postproc, pp_get_context, 
75
        AC_CHECK_LIB(postproc, pp_get_context, 
76
          AC_CHECK_LIB(avcodec, register_avcodec,
76
          AC_CHECK_LIB(avcodec, register_avcodec,
77
            [external_ffmpeg_found=yes
77
            [external_ffmpeg_found=yes
78
            FFMPEG_LIBS="${FFMPEG_LIBS} -lavcodec -lpostproc"
78
            FFMPEG_POSTPROC_LIBS="${FFMPEG_LIBS} -lpostproc"
79
            FFMPEG_LIBS="${FFMPEG_LIBS} -lavcodec"
79
            break]
80
            break]
80
          ),,
81
          ),,
81
          [-lavcodec]
82
          [-lavcodec]
82
        )
83
        )
83
      done
84
      done
84
  
85
      if test x$FFMPEG_POSTPROC_LIBS = "x"; then
86
        FFMPEG_POSTPROC_LIBS="${FFMPEG_LIBS}"
87
      fi
88
85
      dnl result of autodetection
89
      dnl result of autodetection
86
      if test x"$external_ffmpeg_found" = "xyes"; then
90
      if test x"$external_ffmpeg_found" = "xyes"; then
87
        AC_MSG_RESULT([External ffmpeg library was found in ${dir}.])
91
        AC_MSG_RESULT([External ffmpeg library was found in ${dir}.])
Lines 99-105 Link Here
99
    else
103
    else
100
      dnl check specified flags
104
      dnl check specified flags
101
      CPPFLAGS="${FFMPEG_CPPFLAGS} ${ac_save_CPPFLAGS}"
105
      CPPFLAGS="${FFMPEG_CPPFLAGS} ${ac_save_CPPFLAGS}"
102
      LDFLAGS="${FFMPEG_LIBS} ${ac_save_LDFLAGS}"
106
      LDFLAGS="${FFMPEG_LIBS} ${FFMPEG_POSTPROC_LIBS } ${ac_save_LDFLAGS}"
103
      AC_LINK_IFELSE([#include <avcodec.h>
107
      AC_LINK_IFELSE([#include <avcodec.h>
104
#include <postprocess.h>
108
#include <postprocess.h>
105
 
109
 
Lines 158-163 Link Here
158
  
162
  
159
  AC_SUBST(FFMPEG_CPPFLAGS)
163
  AC_SUBST(FFMPEG_CPPFLAGS)
160
  AC_SUBST(FFMPEG_LIBS)
164
  AC_SUBST(FFMPEG_LIBS)
165
  AC_SUBST(FFMPEG_POSTPROC_LIBS)
161
  
166
  
162
else
167
else
163
  AC_MSG_RESULT([using included ffmpeg])
168
  AC_MSG_RESULT([using included ffmpeg])
(-)m4/xine.m4 (+2 lines)
Lines 210-213 Link Here
210
dnl Make sure HAVE_STRSEP, HAVE_SETENV and HAVE_STRPBRK are defined as
210
dnl Make sure HAVE_STRSEP, HAVE_SETENV and HAVE_STRPBRK are defined as
211
dnl necessary.
211
dnl necessary.
212
  AC_CHECK_FUNCS([strsep strpbrk setenv])
212
  AC_CHECK_FUNCS([strsep strpbrk setenv])
213
dnl alloca (in public macro) and MinGW
214
  AC_CHECK_HEADERS([malloc.h])
213
])
215
])
(-)misc/libxine.pc.in (-2 / +2 lines)
Lines 7-11 Link Here
7
Description: The xine engine library
7
Description: The xine engine library
8
Version: @XINE_MAJOR@.@XINE_MINOR@.@XINE_SUB@
8
Version: @XINE_MAJOR@.@XINE_MINOR@.@XINE_SUB@
9
Requires:
9
Requires:
10
Libs: -L${libdir} -lxine @ZLIB_LIBS_CONFIG@ @NET_LIBS@ @THREAD_LIBS_CONFIG@ @LIBICONV@
10
Libs: -L${libdir} -lxine @ZLIB_LIBS@ @NET_LIBS@ @THREAD_LIBS@ @LIBICONV@ @RT_LIBS@
11
Cflags: -I${includedir} @THREAD_CFLAGS_CONFIG@
11
Cflags: -I${includedir} @THREAD_CPPFLAGS@
(-)misc/xine-config.in (-2 / +2 lines)
Lines 100-110 Link Here
100
fi
100
fi
101
101
102
if test "$echo_cflags" = "yes"; then
102
if test "$echo_cflags" = "yes"; then
103
      echo -I@includedir@ @THREAD_CFLAGS_CONFIG@
103
      echo -I@includedir@ @THREAD_CPPFLAGS@
104
fi
104
fi
105
105
106
if test "$echo_libs" = "yes"; then
106
if test "$echo_libs" = "yes"; then
107
      echo -L@libdir@ -lxine @ZLIB_LIBS_CONFIG@ @NET_LIBS@ @THREAD_LIBS_CONFIG@ @LIBICONV@ @RT_LIBS@
107
      echo -L@libdir@ -lxine @ZLIB_LIBS@ @NET_LIBS@ @THREAD_LIBS@ @LIBICONV@ @RT_LIBS@
108
fi      
108
fi      
109
if test "$echo_plugindir" = "yes"; then
109
if test "$echo_plugindir" = "yes"; then
110
      echo "@XINE_PLUGINPATH@"
110
      echo "@XINE_PLUGINPATH@"
(-)src/audio_out/Makefile.am (-1 / +1 lines)
Lines 123-127 Link Here
123
123
124
xineplug_ao_out_directx2_la_SOURCES = audio_directx2_out.c
124
xineplug_ao_out_directx2_la_SOURCES = audio_directx2_out.c
125
xineplug_ao_out_directx2_la_CPPFLAGS = $(DIRECTX_CPPFLAGS)
125
xineplug_ao_out_directx2_la_CPPFLAGS = $(DIRECTX_CPPFLAGS)
126
xineplug_ao_out_directx2_la_LIBADD = $(XINE_LIB) $(DIRECTX_AUDIO_LIBS)
126
xineplug_ao_out_directx2_la_LIBADD = $(XINE_LIB) $(DIRECTX_AUDIO_LIBS) $(THREAD_LIBS)
127
xineplug_ao_out_directx2_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@
127
xineplug_ao_out_directx2_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@
(-)src/audio_out/audio_directx2_out.c (-2 / +2 lines)
Lines 129-135 Link Here
129
  int paused;                      /* paused mode */
129
  int paused;                      /* paused mode */
130
  int finished;                    /* driver finished */
130
  int finished;                    /* driver finished */
131
  int failed;                      /* don't open modal dialog again */
131
  int failed;                      /* don't open modal dialog again */
132
  int count;                       /* number of current free parts */
132
  int count;                       /* current free part number */
133
133
134
  pthread_t buffer_service;        /* service thread for operating with DSB */
134
  pthread_t buffer_service;        /* service thread for operating with DSB */
135
  pthread_cond_t data_cond;        /* signals on data */
135
  pthread_cond_t data_cond;        /* signals on data */
Lines 176-182 Link Here
176
    case DSERR_BUFFERLOST: return _("memory buffer has been lost and must be restored");
176
    case DSERR_BUFFERLOST: return _("memory buffer has been lost and must be restored");
177
    case DSERR_CONTROLUNAVAIL: return _("requested buffer control is not available");
177
    case DSERR_CONTROLUNAVAIL: return _("requested buffer control is not available");
178
    case DSERR_GENERIC: return _("undetermined error inside DirectSound subsystem");
178
    case DSERR_GENERIC: return _("undetermined error inside DirectSound subsystem");
179
#ifdef HWUNAVAIL
179
#ifdef DSERR_HWUNAVAIL
180
    case DSERR_HWUNAVAIL: return _("DirectSound hardware device is unavailable");
180
    case DSERR_HWUNAVAIL: return _("DirectSound hardware device is unavailable");
181
#endif
181
#endif
182
    case DSERR_INVALIDCALL: return _("function is not valid for the current state of the object");
182
    case DSERR_INVALIDCALL: return _("function is not valid for the current state of the object");
(-)src/demuxers/Makefile.am (+1 lines)
Lines 1-6 Link Here
1
include $(top_srcdir)/misc/Makefile.common
1
include $(top_srcdir)/misc/Makefile.common
2
2
3
AM_CFLAGS = $(THEORA_CFLAGS) $(OGG_CFLAGS) $(SPEEX_CFLAGS) $(LIBMODPLUG_CFLAGS)
3
AM_CFLAGS = $(THEORA_CFLAGS) $(OGG_CFLAGS) $(SPEEX_CFLAGS) $(LIBMODPLUG_CFLAGS)
4
AM_CPPFLAGS = $(ZLIB_CPPFLAGS)
4
5
5
libdir = $(XINE_PLUGINDIR)
6
libdir = $(XINE_PLUGINDIR)
6
7
(-)src/demuxers/demux_wc3movie.c (-4 / +15 lines)
Lines 173-183 Link Here
173
        this->seek_flag = 0;
173
        this->seek_flag = 0;
174
      } else {
174
      } else {
175
        /* record the offset of the SHOT chunk */
175
        /* record the offset of the SHOT chunk */
176
        this->shot_offsets[this->current_shot] =
176
        if (this->current_shot < this->number_of_shots) {
177
          this->input->get_current_pos(this->input) - PREAMBLE_SIZE;
177
	  this->shot_offsets[this->current_shot] =
178
            this->input->get_current_pos(this->input) - PREAMBLE_SIZE;
179
        }
178
      }
180
      }
179
      this->current_shot++;
181
      this->current_shot++;
180
182
      
181
      /* this is the start of a new shot; send a new palette */
183
      /* this is the start of a new shot; send a new palette */
182
      if (this->input->read(this->input, preamble, 4) != 4) {
184
      if (this->input->read(this->input, preamble, 4) != 4) {
183
        this->status = DEMUX_FINISHED;
185
        this->status = DEMUX_FINISHED;
Lines 376-382 Link Here
376
  if (this->input->read(this->input, preamble, 4) != 4)
378
  if (this->input->read(this->input, preamble, 4) != 4)
377
    return 0;
379
    return 0;
378
  this->number_of_shots = LE_32(&preamble[0]);
380
  this->number_of_shots = LE_32(&preamble[0]);
379
381
  
380
  /* allocate space for the shot offset index and set offsets to 0 */
382
  /* allocate space for the shot offset index and set offsets to 0 */
381
  this->shot_offsets = xine_xmalloc(this->number_of_shots * sizeof(off_t));
383
  this->shot_offsets = xine_xmalloc(this->number_of_shots * sizeof(off_t));
382
  this->current_shot = 0;
384
  this->current_shot = 0;
Lines 579-584 Link Here
579
    /* if the next shot offset has not been recorded, traverse through the 
581
    /* if the next shot offset has not been recorded, traverse through the 
580
     * file until it is found */
582
     * file until it is found */
581
    if (this->shot_offsets[i + 1] == 0) {
583
    if (this->shot_offsets[i + 1] == 0) {
584
      off_t current_pos;
585
586
      /* be sure to be just after the last known shot_offset */
587
      current_pos = this->input->get_current_pos(this->input);
588
      if (current_pos < this->shot_offsets[i]) {
589
	this->input->seek(this->input,
590
			  this->shot_offsets[i] + PREAMBLE_SIZE + 4,
591
			  SEEK_SET);
592
      }
582
593
583
      while (1) {
594
      while (1) {
584
595
(-)src/input/Makefile.am (-11 / +12 lines)
Lines 44-50 Link Here
44
endif
44
endif
45
45
46
# not ported to native Windows
46
# not ported to native Windows
47
if !WIN32
47
if WIN32
48
else
48
in_rtp = xineplug_inp_rtp.la
49
in_rtp = xineplug_inp_rtp.la
49
in_dvb = xineplug_inp_dvb.la 
50
in_dvb = xineplug_inp_dvb.la 
50
endif
51
endif
Lines 75-89 Link Here
75
xineplug_inp_file_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@
76
xineplug_inp_file_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@
76
77
77
xineplug_inp_dvd_la_SOURCES = input_dvd.c media_helper.c
78
xineplug_inp_dvd_la_SOURCES = input_dvd.c media_helper.c
78
xineplug_inp_dvd_la_LIBADD = $(XINE_LIB) $(link_dvdnav)
79
xineplug_inp_dvd_la_LIBADD = $(XINE_LIB) $(link_dvdnav) $(THREAD_LIBS)
79
xineplug_inp_dvd_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@
80
xineplug_inp_dvd_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@
80
81
81
xineplug_inp_net_la_SOURCES = input_net.c net_buf_ctrl.c
82
xineplug_inp_net_la_SOURCES = input_net.c net_buf_ctrl.c
82
xineplug_inp_net_la_LIBADD = $(XINE_LIB)
83
xineplug_inp_net_la_LIBADD = $(XINE_LIB) $(THREAD_LIBS)
83
xineplug_inp_net_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@
84
xineplug_inp_net_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@
84
85
85
xineplug_inp_mms_la_SOURCES = input_mms.c net_buf_ctrl.c mms.c mmsh.c http_helper.c
86
xineplug_inp_mms_la_SOURCES = input_mms.c net_buf_ctrl.c mms.c mmsh.c http_helper.c
86
xineplug_inp_mms_la_LIBADD = $(XINE_LIB) @LIBICONV@
87
xineplug_inp_mms_la_LIBADD = $(XINE_LIB) @LIBICONV@ $(THREAD_LIBS)
87
xineplug_inp_mms_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@
88
xineplug_inp_mms_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@
88
89
89
xineplug_inp_vcdo_la_SOURCES = input_vcd.c media_helper.c
90
xineplug_inp_vcdo_la_SOURCES = input_vcd.c media_helper.c
Lines 91-117 Link Here
91
xineplug_inp_vcdo_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@
92
xineplug_inp_vcdo_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@
92
93
93
xineplug_inp_stdin_fifo_la_SOURCES = input_stdin_fifo.c net_buf_ctrl.c
94
xineplug_inp_stdin_fifo_la_SOURCES = input_stdin_fifo.c net_buf_ctrl.c
94
xineplug_inp_stdin_fifo_la_LIBADD = $(XINE_LIB)
95
xineplug_inp_stdin_fifo_la_LIBADD = $(XINE_LIB) $(THREAD_LIBS)
95
xineplug_inp_stdin_fifo_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@
96
xineplug_inp_stdin_fifo_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@
96
97
97
xineplug_inp_rtp_la_SOURCES = input_rtp.c net_buf_ctrl.c
98
xineplug_inp_rtp_la_SOURCES = input_rtp.c net_buf_ctrl.c
98
xineplug_inp_rtp_la_LIBADD = $(XINE_LIB)
99
xineplug_inp_rtp_la_LIBADD = $(XINE_LIB) $(THREAD_LIBS)
99
xineplug_inp_rtp_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@
100
xineplug_inp_rtp_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@
100
101
101
xineplug_inp_http_la_SOURCES = input_http.c net_buf_ctrl.c http_helper.c
102
xineplug_inp_http_la_SOURCES = input_http.c net_buf_ctrl.c http_helper.c
102
xineplug_inp_http_la_LIBADD = $(XINE_LIB)
103
xineplug_inp_http_la_LIBADD = $(XINE_LIB) $(THREAD_LIBS)
103
xineplug_inp_http_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@
104
xineplug_inp_http_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@
104
105
105
xineplug_inp_pnm_la_SOURCES = input_pnm.c net_buf_ctrl.c pnm.c
106
xineplug_inp_pnm_la_SOURCES = input_pnm.c net_buf_ctrl.c pnm.c
106
xineplug_inp_pnm_la_LIBADD = $(XINE_LIB)
107
xineplug_inp_pnm_la_LIBADD = $(XINE_LIB) $(THREAD_LIBS)
107
xineplug_inp_pnm_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@
108
xineplug_inp_pnm_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@
108
109
109
xineplug_inp_dvb_la_SOURCES = input_dvb.c net_buf_ctrl.c
110
xineplug_inp_dvb_la_SOURCES = input_dvb.c net_buf_ctrl.c
110
xineplug_inp_dvb_la_LIBADD = $(XINE_LIB)
111
xineplug_inp_dvb_la_LIBADD = $(XINE_LIB) $(THREAD_LIBS)
111
xineplug_inp_dvb_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@
112
xineplug_inp_dvb_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@
112
113
113
xineplug_inp_rtsp_la_SOURCES = input_rtsp.c net_buf_ctrl.c
114
xineplug_inp_rtsp_la_SOURCES = input_rtsp.c net_buf_ctrl.c
114
xineplug_inp_rtsp_la_LIBADD = $(XINE_LIB) libreal/libreal.la librtsp/librtsp.la
115
xineplug_inp_rtsp_la_LIBADD = $(XINE_LIB) $(THREAD_LIBS) libreal/libreal.la librtsp/librtsp.la
115
xineplug_inp_rtsp_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@
116
xineplug_inp_rtsp_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@
116
117
117
xineplug_inp_cdda_la_SOURCES = input_cdda.c media_helper.c sha1.c sha1.h base64.c base64.h
118
xineplug_inp_cdda_la_SOURCES = input_cdda.c media_helper.c sha1.c sha1.h base64.c base64.h
Lines 123-129 Link Here
123
xineplug_inp_v4l_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@
124
xineplug_inp_v4l_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@
124
125
125
xineplug_inp_gnome_vfs_la_SOURCES = input_gnome_vfs.c net_buf_ctrl.c
126
xineplug_inp_gnome_vfs_la_SOURCES = input_gnome_vfs.c net_buf_ctrl.c
126
xineplug_inp_gnome_vfs_la_LIBADD = $(GNOME_VFS_LIBS) $(XINE_LIB)
127
xineplug_inp_gnome_vfs_la_LIBADD = $(GNOME_VFS_LIBS) $(XINE_LIB) $(THREAD_LIBS)
127
xineplug_inp_gnome_vfs_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@
128
xineplug_inp_gnome_vfs_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@
128
129
129
xineplug_inp_smb_la_SOURCES = input_smb.c
130
xineplug_inp_smb_la_SOURCES = input_smb.c
(-)src/input/input_cdda.c (-2 / +15 lines)
Lines 1-5 Link Here
1
/*
1
/*
2
 * Copyright (C) 2000-2004 the xine project
2
 * Copyright (C) 2000-2005 the xine project
3
 *
3
 *
4
 * This file is part of xine, a free video player.
4
 * This file is part of xine, a free video player.
5
 *
5
 *
Lines 32-38 Link Here
32
#include <unistd.h>
32
#include <unistd.h>
33
33
34
#include <sys/types.h>
34
#include <sys/types.h>
35
#ifdef SYS_PARAM_H
36
#include <sys/param.h>
37
#endif
38
#ifdef HAVE_DIRENT_H
35
#include <dirent.h>
39
#include <dirent.h>
40
#endif
36
#include <sys/stat.h>
41
#include <sys/stat.h>
37
#include <fcntl.h>
42
#include <fcntl.h>
38
#include <errno.h>
43
#include <errno.h>
Lines 684-701 Link Here
684
  unsigned char *data) {
689
  unsigned char *data) {
685
690
686
  int fd = this_gen->fd;
691
  int fd = this_gen->fd;
692
#if  __FreeBSD_version < 501106
687
  struct ioc_read_audio cdda;
693
  struct ioc_read_audio cdda;
694
#endif
688
695
689
  while( num_frames ) {
696
  while( num_frames ) {
697
#if  __FreeBSD_version < 501106
690
    cdda.address_format = CD_MSF_FORMAT;
698
    cdda.address_format = CD_MSF_FORMAT;
691
    cdda.address.msf.minute = frame / CD_SECONDS_PER_MINUTE / CD_FRAMES_PER_SECOND;
699
    cdda.address.msf.minute = frame / CD_SECONDS_PER_MINUTE / CD_FRAMES_PER_SECOND;
692
    cdda.address.msf.second = (frame / CD_FRAMES_PER_SECOND) % CD_SECONDS_PER_MINUTE;
700
    cdda.address.msf.second = (frame / CD_FRAMES_PER_SECOND) % CD_SECONDS_PER_MINUTE;
693
    cdda.address.msf.frame = frame % CD_FRAMES_PER_SECOND;
701
    cdda.address.msf.frame = frame % CD_FRAMES_PER_SECOND;
694
    cdda.nframes = 1;
702
    cdda.nframes = 1;
695
    cdda.buffer = data;
703
    cdda.buffer = data;
704
#endif
696
705
706
#if  __FreeBSD_version >= 501106
707
    if (pread(fd, data, CD_RAW_FRAME_SIZE, frame * CD_RAW_FRAME_SIZE) != CD_RAW_FRAME_SIZE) {
708
#else
697
    /* read a frame */
709
    /* read a frame */
698
    if(ioctl(fd, CDIOCREADAUDIO, &cdda) < 0) {
710
    if(ioctl(fd, CDIOCREADAUDIO, &cdda) < 0) {
711
#endif
699
      perror("CDIOCREADAUDIO");
712
      perror("CDIOCREADAUDIO");
700
      return -1;
713
      return -1;
701
    }
714
    }
Lines 1473-1479 Link Here
1473
    return;
1486
    return;
1474
  }
1487
  }
1475
  else {
1488
  else {
1476
    fprintf(fd, filecontent);
1489
    fprintf(fd, "%s", filecontent);
1477
    fclose(fd);
1490
    fclose(fd);
1478
  }
1491
  }
1479
  
1492
  
(-)src/input/input_dvb.c (-1 / +6 lines)
Lines 88-94 Link Here
88
#endif
88
#endif
89
#include <sys/poll.h>
89
#include <sys/poll.h>
90
#include <time.h>
90
#include <time.h>
91
#ifdef HAVE_DIRENT_H
91
#include <dirent.h>
92
#include <dirent.h>
93
#endif
92
#include <ctype.h>
94
#include <ctype.h>
93
95
94
/* These will eventually be #include <linux/dvb/...> */
96
/* These will eventually be #include <linux/dvb/...> */
Lines 2098-2103 Link Here
2098
 char dates[64];
2100
 char dates[64];
2099
 int x=0;
2101
 int x=0;
2100
 xine_cfg_entry_t savedir;
2102
 xine_cfg_entry_t savedir;
2103
 DIR *dir;
2104
2101
 if (this->record_fd > -1) {
2105
 if (this->record_fd > -1) {
2102
2106
2103
    /* stop recording */
2107
    /* stop recording */
Lines 2120-2129 Link Here
2120
    
2124
    
2121
    if (xine_config_lookup_entry(this->stream->xine, "media.capture.save_dir", &savedir)){
2125
    if (xine_config_lookup_entry(this->stream->xine, "media.capture.save_dir", &savedir)){
2122
      if(strlen(savedir.str_value)>1){
2126
      if(strlen(savedir.str_value)>1){
2123
        if(opendir(savedir.str_value)==NULL){
2127
        if((dir = opendir(savedir.str_value))==NULL){
2124
          snprintf (filename, 256, "%s/%s_%s.ts",xine_get_homedir(),this->channels[this->channel].name, dates);
2128
          snprintf (filename, 256, "%s/%s_%s.ts",xine_get_homedir(),this->channels[this->channel].name, dates);
2125
          xprintf(this->class->xine,XINE_VERBOSITY_LOG,"savedir is wrong... saving to home directory\n");
2129
          xprintf(this->class->xine,XINE_VERBOSITY_LOG,"savedir is wrong... saving to home directory\n");
2126
        } else {
2130
        } else {
2131
          closedir(dir);
2127
          snprintf (filename, 256, "%s/%s_%s.ts",savedir.str_value,this->channels[this->channel].name, dates);
2132
          snprintf (filename, 256, "%s/%s_%s.ts",savedir.str_value,this->channels[this->channel].name, dates);
2128
          xprintf(this->class->xine,XINE_VERBOSITY_LOG,"saving to savedir\n");
2133
          xprintf(this->class->xine,XINE_VERBOSITY_LOG,"saving to savedir\n");
2129
        }
2134
        }
(-)src/input/input_dvd.c (-2 / +1 lines)
Lines 1-5 Link Here
1
/* 
1
/* 
2
 * Copyright (C) 2000-2004 the xine project, 
2
 * Copyright (C) 2000-2005 the xine project, 
3
 *                         Rich Wareham <richwareham@users.sourceforge.net>
3
 *                         Rich Wareham <richwareham@users.sourceforge.net>
4
 * 
4
 * 
5
 * This file is part of xine, a free video player.
5
 * This file is part of xine, a free video player.
Lines 47-53 Link Here
47
47
48
#include <sys/types.h>
48
#include <sys/types.h>
49
#include <sys/stat.h>
49
#include <sys/stat.h>
50
#include <dirent.h>
51
50
52
#include <unistd.h>
51
#include <unistd.h>
53
#include <fcntl.h>
52
#include <fcntl.h>
(-)src/input/input_file.c (-1 / +3 lines)
Lines 1-5 Link Here
1
/*
1
/*
2
 * Copyright (C) 2000-2003 the xine project
2
 * Copyright (C) 2000-2005 the xine project
3
 * 
3
 * 
4
 * This file is part of xine, a free video player.
4
 * This file is part of xine, a free video player.
5
 * 
5
 * 
Lines 26-32 Link Here
26
26
27
#include <stdio.h>
27
#include <stdio.h>
28
#include <stdlib.h>
28
#include <stdlib.h>
29
#ifdef HAVE_DIRENT_H
29
#include <dirent.h>
30
#include <dirent.h>
31
#endif
30
#include <sys/types.h>
32
#include <sys/types.h>
31
#include <sys/stat.h>
33
#include <sys/stat.h>
32
#include <unistd.h>
34
#include <unistd.h>
(-)src/input/input_pvr.c (-2 / +1 lines)
Lines 1-5 Link Here
1
/*
1
/*
2
 * Copyright (C) 2000-2004 the xine project
2
 * Copyright (C) 2000-2005 the xine project
3
 * March 2003 - Miguel Freitas
3
 * March 2003 - Miguel Freitas
4
 * This plugin was sponsored by 1Control
4
 * This plugin was sponsored by 1Control
5
 *
5
 *
Lines 91-97 Link Here
91
91
92
#include <stdio.h>
92
#include <stdio.h>
93
#include <stdlib.h>
93
#include <stdlib.h>
94
#include <dirent.h>
95
#include <sys/types.h>
94
#include <sys/types.h>
96
#include <sys/stat.h>
95
#include <sys/stat.h>
97
#include <unistd.h>
96
#include <unistd.h>
(-)src/input/mmsh.c (-2 / +2 lines)
Lines 492-499 Link Here
492
492
493
        this->packet_length = LE_32(this->asf_header + i + 92 - 24);
493
        this->packet_length = LE_32(this->asf_header + i + 92 - 24);
494
        this->file_length   = LE_64(this->asf_header + i + 40 - 24);
494
        this->file_length   = LE_64(this->asf_header + i + 40 - 24);
495
        lprintf ("file object, file_length = %lld, packet length = %d",
495
        /*lprintf ("file object, file_length = %lld, packet length = %d",
496
		 this->file_length, this->packet_count);
496
		 this->file_length, this->packet_count);*/
497
        break;
497
        break;
498
498
499
      case GUID_ASF_STREAM_PROPERTIES:
499
      case GUID_ASF_STREAM_PROPERTIES:
(-)src/libffmpeg/Makefile.am (-4 / +5 lines)
Lines 1-7 Link Here
1
include $(top_srcdir)/misc/Makefile.common
1
include $(top_srcdir)/misc/Makefile.common
2
2
3
if HAVE_FFMPEG
3
if HAVE_FFMPEG
4
FF_CPPFLAGS = $(FFMPEG_CPPFLAGS)
4
ff_cppflags = $(FFMPEG_CPPFLAGS)
5
link_ffmpeg = $(FFMPEG_LIBS)
5
link_ffmpeg = $(FFMPEG_LIBS)
6
else
6
else
7
link_ffmpeg = \
7
link_ffmpeg = \
Lines 20-26 Link Here
20
lib_LTLIBRARIES = xineplug_decode_ff.la xineplug_decode_dvaudio.la
20
lib_LTLIBRARIES = xineplug_decode_ff.la xineplug_decode_dvaudio.la
21
21
22
if HAVE_DXR3
22
if HAVE_DXR3
23
AM_CPPFLAGS = -I$(top_srcdir)/src/dxr3 $(X_CFLAGS) $(FF_CPPFLAGS)
23
AM_CPPFLAGS = -I$(top_srcdir)/src/dxr3 $(X_CFLAGS) $(ff_cppflags) \
24
              $(ZLIB_CPPFLAGS)
24
xineplug_decode_ff_la_SOURCES = xine_decoder.c audio_decoder.c video_decoder.c \
25
xineplug_decode_ff_la_SOURCES = xine_decoder.c audio_decoder.c video_decoder.c \
25
                                xine_encoder.c mpeg_parser.c
26
                                xine_encoder.c mpeg_parser.c
26
# The dxr3 uses ffmpegs MPEG encoder by dlopen()ing the ffmpeg plugin and
27
# The dxr3 uses ffmpegs MPEG encoder by dlopen()ing the ffmpeg plugin and
Lines 28-41 Link Here
28
# symbols and cannot use @XINE_PLUGIN_MIN_SYMS@
29
# symbols and cannot use @XINE_PLUGIN_MIN_SYMS@
29
xineplug_decode_ff_la_LDFLAGS = -avoid-version -module
30
xineplug_decode_ff_la_LDFLAGS = -avoid-version -module
30
else
31
else
31
AM_CPPFLAGS = $(FF_CPPFLAGS)
32
AM_CPPFLAGS = $(ff_cppflags) $(ZLIB_CPPFLAGS)
32
xineplug_decode_ff_la_SOURCES = xine_decoder.c audio_decoder.c video_decoder.c \
33
xineplug_decode_ff_la_SOURCES = xine_decoder.c audio_decoder.c video_decoder.c \
33
                                mpeg_parser.c
34
                                mpeg_parser.c
34
xineplug_decode_ff_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@
35
xineplug_decode_ff_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@
35
endif
36
endif
36
37
37
xineplug_decode_ff_la_LIBADD = $(MLIB_LIBS) $(XINE_LIB) -lm $(ZLIB_LIBS) \
38
xineplug_decode_ff_la_LIBADD = $(MLIB_LIBS) $(XINE_LIB) -lm $(ZLIB_LIBS) \
38
	$(link_ffmpeg)
39
	$(link_ffmpeg) $(THREAD_LIBS)
39
40
40
xineplug_decode_dvaudio_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@
41
xineplug_decode_dvaudio_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@
41
xineplug_decode_dvaudio_la_SOURCES = dvaudio_decoder.c
42
xineplug_decode_dvaudio_la_SOURCES = dvaudio_decoder.c
(-)src/libffmpeg/dvaudio_decoder.c (-2 / +1 lines)
Lines 1-5 Link Here
1
/*
1
/*
2
 * Copyright (C) 2004 the xine project
2
 * Copyright (C) 2005 the xine project
3
 * 
3
 * 
4
 * This file is part of xine, a free video player.
4
 * This file is part of xine, a free video player.
5
 * 
5
 * 
Lines 31-37 Link Here
31
#include <stdio.h>
31
#include <stdio.h>
32
#include <inttypes.h>
32
#include <inttypes.h>
33
#include <string.h>
33
#include <string.h>
34
#include <pthread.h>
35
#include <math.h>
34
#include <math.h>
36
35
37
#define LOG_MODULE "dvaudio"
36
#define LOG_MODULE "dvaudio"
(-)src/libffmpeg/libavcodec/Makefile.am (+1 lines)
Lines 10-15 Link Here
10
# otherwise we get unresolved symbols, because some unsatisfied function calls
10
# otherwise we get unresolved symbols, because some unsatisfied function calls
11
# are not optimized away with debug optimization
11
# are not optimized away with debug optimization
12
AM_CFLAGS = $(LIBFFMPEG_CFLAGS) `test "$(CFLAGS)" = "$(DEBUG_CFLAGS)" && echo -DCONFIG_ENCODERS`
12
AM_CFLAGS = $(LIBFFMPEG_CFLAGS) `test "$(CFLAGS)" = "$(DEBUG_CFLAGS)" && echo -DCONFIG_ENCODERS`
13
AM_CPPFLAGS = $(ZLIB_CPPFLAGS)
13
ASFLAGS =
14
ASFLAGS =
14
15
15
noinst_LTLIBRARIES = libavcodec.la
16
noinst_LTLIBRARIES = libavcodec.la
(-)src/libspudec/Makefile.am (-2 / +2 lines)
Lines 10-16 Link Here
10
	spu.c \
10
	spu.c \
11
	xine_decoder.c
11
	xine_decoder.c
12
AM_CPPFLAGS = $(DVDNAV_CFLAGS)
12
AM_CPPFLAGS = $(DVDNAV_CFLAGS)
13
xineplug_decode_spu_la_LIBADD = $(XINE_LIB) $(DVDNAV_LIBS)
13
xineplug_decode_spu_la_LIBADD = $(XINE_LIB) $(DVDNAV_LIBS) $(THREAD_LIBS)
14
14
15
else
15
else
16
16
Lines 19-25 Link Here
19
	spu.c \
19
	spu.c \
20
	xine_decoder.c
20
	xine_decoder.c
21
AM_CPPFLAGS = -I$(top_srcdir)/src/input/libdvdnav
21
AM_CPPFLAGS = -I$(top_srcdir)/src/input/libdvdnav
22
xineplug_decode_spu_la_LIBADD = $(XINE_LIB)
22
xineplug_decode_spu_la_LIBADD = $(XINE_LIB) $(THREAD_LIBS)
23
23
24
endif
24
endif
25
25
(-)src/libspudvb/Makefile.am (-1 / +1 lines)
Lines 5-9 Link Here
5
lib_LTLIBRARIES = xineplug_decode_spudvb.la
5
lib_LTLIBRARIES = xineplug_decode_spudvb.la
6
6
7
xineplug_decode_spudvb_la_SOURCES = xine_decoder.c
7
xineplug_decode_spudvb_la_SOURCES = xine_decoder.c
8
xineplug_decode_spudvb_la_LIBADD  = $(XINE_LIB)
8
xineplug_decode_spudvb_la_LIBADD  = $(XINE_LIB) $(THREAD_LIBS)
9
xineplug_decode_spudvb_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@
9
xineplug_decode_spudvb_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@
(-)src/post/audio/Makefile.am (-1 / +1 lines)
Lines 8-13 Link Here
8
8
9
xineplug_post_audio_filters_la_SOURCES = \
9
xineplug_post_audio_filters_la_SOURCES = \
10
        upmix.c upmix_mono.c filter.c window.c stretch.c audio_filters.c
10
        upmix.c upmix_mono.c filter.c window.c stretch.c audio_filters.c
11
xineplug_post_audio_filters_la_LIBADD = $(XINE_LIB)
11
xineplug_post_audio_filters_la_LIBADD = $(XINE_LIB) $(THREAD_LIBS)
12
xineplug_post_audio_filters_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@ -lm
12
xineplug_post_audio_filters_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@ -lm
13
13
(-)src/post/deinterlace/xine_plugin.c (+1 lines)
Lines 421-426 Link Here
421
421
422
  if (_x_post_dispose(this_gen)) {
422
  if (_x_post_dispose(this_gen)) {
423
    _flush_frames(this);
423
    _flush_frames(this);
424
    pthread_mutex_destroy(&this->lock);
424
    free(this);
425
    free(this);
425
  }
426
  }
426
}
427
}
(-)src/post/goom/Makefile.am (-1 / +1 lines)
Lines 25-31 Link Here
25
	gfontlib.c gfontrle.c goom_core.c goom_tools.c goomsl.c goomsl_hash.c \
25
	gfontlib.c gfontrle.c goom_core.c goom_tools.c goomsl.c goomsl_hash.c \
26
	goomsl_lex.c goomsl_yacc.c graphic.c ifs.c lines.c mathtools.c \
26
	goomsl_lex.c goomsl_yacc.c graphic.c ifs.c lines.c mathtools.c \
27
	plugin_info.c sound_tester.c surf3d.c tentacle3d.c v3d.c
27
	plugin_info.c sound_tester.c surf3d.c tentacle3d.c v3d.c
28
xineplug_post_goom_la_LIBADD = $(XINE_LIB) $(GOOM_LIBS)
28
xineplug_post_goom_la_LIBADD = $(XINE_LIB) $(GOOM_LIBS) $(THREAD_LIBS)
29
xineplug_post_goom_la_LDFLAGS = -avoid-version -module $(XINE_PLUGIN_MIN_SYMS)
29
xineplug_post_goom_la_LDFLAGS = -avoid-version -module $(XINE_PLUGIN_MIN_SYMS)
30
30
31
noinst_HEADERS = cpu_info.h default_scripts.h drawmethods.h gfontlib.h gfontrle.h goom.h \
31
noinst_HEADERS = cpu_info.h default_scripts.h drawmethods.h gfontlib.h gfontrle.h goom.h \
(-)src/post/goom/diff_against_release.patch (+11 lines)
Lines 24-29 Link Here
24
 /*	FVAL(data->factor_p) = data->factor / MAX;*/
24
 /*	FVAL(data->factor_p) = data->factor / MAX;*/
25
--- filters.c	2004-09-10 17:10:39.000000000 +0200
25
--- filters.c	2004-09-10 17:10:39.000000000 +0200
26
+++ filters.c	2004-11-21 15:37:55.000000000 +0100
26
+++ filters.c	2004-11-21 15:37:55.000000000 +0100
27
@@ -201,8 +201,8 @@
28
     /* Noise */
29
     if (data->noisify)
30
     {
31
-        vx += (((float)random()) / ((float)RAND_MAX) - 0.5f) / 50.0f;
32
-        vy += (((float)random()) / ((float)RAND_MAX) - 0.5f) / 50.0f;
33
+        vx += (((float)rand()) / ((float)RAND_MAX) - 0.5f) / 50.0f;
34
+        vy += (((float)rand()) / ((float)RAND_MAX) - 0.5f) / 50.0f;
35
     }
36
     
37
     /* Hypercos */
27
@@ -705,7 +705,7 @@
38
@@ -705,7 +705,7 @@
28
     
39
     
29
     data->general_speed = 0.0f;
40
     data->general_speed = 0.0f;
(-)src/post/goom/filters.c (-2 / +2 lines)
Lines 201-208 Link Here
201
    /* Noise */
201
    /* Noise */
202
    if (data->noisify)
202
    if (data->noisify)
203
    {
203
    {
204
        vx += (((float)random()) / ((float)RAND_MAX) - 0.5f) / 50.0f;
204
        vx += (((float)rand()) / ((float)RAND_MAX) - 0.5f) / 50.0f;
205
        vy += (((float)random()) / ((float)RAND_MAX) - 0.5f) / 50.0f;
205
        vy += (((float)rand()) / ((float)RAND_MAX) - 0.5f) / 50.0f;
206
    }
206
    }
207
    
207
    
208
    /* Hypercos */
208
    /* Hypercos */
(-)src/post/mosaico/Makefile.am (-2 / +2 lines)
Lines 5-13 Link Here
5
lib_LTLIBRARIES = xineplug_post_mosaico.la xineplug_post_switch.la
5
lib_LTLIBRARIES = xineplug_post_mosaico.la xineplug_post_switch.la
6
6
7
xineplug_post_mosaico_la_SOURCES = mosaico.c
7
xineplug_post_mosaico_la_SOURCES = mosaico.c
8
xineplug_post_mosaico_la_LIBADD = $(XINE_LIB)
8
xineplug_post_mosaico_la_LIBADD = $(XINE_LIB) $(THREAD_LIBS)
9
xineplug_post_mosaico_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@
9
xineplug_post_mosaico_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@
10
10
11
xineplug_post_switch_la_SOURCES = switch.c
11
xineplug_post_switch_la_SOURCES = switch.c
12
xineplug_post_switch_la_LIBADD = $(XINE_LIB)
12
xineplug_post_switch_la_LIBADD = $(XINE_LIB) $(THREAD_LIBS)
13
xineplug_post_switch_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@
13
xineplug_post_switch_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@
(-)src/post/planar/Makefile.am (-5 / +15 lines)
Lines 1-7 Link Here
1
include $(top_srcdir)/misc/Makefile.common
1
include $(top_srcdir)/misc/Makefile.common
2
2
3
AM_CFLAGS = -I$(top_srcdir)/src/libffmpeg/libavcodec/libpostproc
3
POSTPROC_INT_LIB = $(top_builddir)/src/libffmpeg/libavcodec/libpostproc/libpostprocess.la
4
POSTPROC_LIB  = $(top_builddir)/src/libffmpeg/libavcodec/libpostproc/libpostprocess.la
4
5
if HAVE_FFMPEG
6
postproc_lib = $(FFMPEG_POSTPROC_LIBS)
7
ff_cppflags = $(FFMPEG_CPPFLAGS)
8
else
9
ff_cppflags = -I$(top_srcdir)/src/libffmpeg/libavcodec/libpostproc
10
postproc_lib = $(POSTPROC_INT_LIB)
11
postproc_dep = $(postproc_lib)
12
endif
13
14
AM_CPPFLAGS = $(ff_cppflags)
5
15
6
libdir = $(XINE_PLUGINDIR)/post
16
libdir = $(XINE_PLUGINDIR)/post
7
17
Lines 9-17 Link Here
9
19
10
xineplug_post_planar_la_SOURCES = planar.c invert.c expand.c boxblur.c \
20
xineplug_post_planar_la_SOURCES = planar.c invert.c expand.c boxblur.c \
11
                                  denoise3d.c eq.c eq2.c unsharp.c pp.c
21
                                  denoise3d.c eq.c eq2.c unsharp.c pp.c
12
xineplug_post_planar_la_DEPENDENCIES = $(POSTPROC_LIB)
22
xineplug_post_planar_la_DEPENDENCIES = $(postproc_dep)
13
xineplug_post_planar_la_LIBADD = $(XINE_LIB) $(POSTPROC_LIB) -lm
23
xineplug_post_planar_la_LIBADD = $(XINE_LIB) $(postproc_lib) -lm $(THREAD_LIBS)
14
xineplug_post_planar_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@
24
xineplug_post_planar_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@
15
25
16
$(POSTPROC_LIB):
26
$(POSTPROC_INT_LIB):
17
	cd $(top_builddir)/src/libffmpeg/libavcodec/libpostproc && $(MAKE) libpostprocess.la
27
	cd $(top_builddir)/src/libffmpeg/libavcodec/libpostproc && $(MAKE) libpostprocess.la
(-)src/post/visualizations/Makefile.am (-1 / +1 lines)
Lines 8-14 Link Here
8
8
9
xineplug_post_visualizations_la_SOURCES = \
9
xineplug_post_visualizations_la_SOURCES = \
10
        visualizations.c fft.c fftscope.c oscope.c fftgraph.c
10
        visualizations.c fft.c fftscope.c oscope.c fftgraph.c
11
xineplug_post_visualizations_la_LIBADD = $(XINE_LIB)
11
xineplug_post_visualizations_la_LIBADD = $(XINE_LIB) $(THREAD_LIBS)
12
xineplug_post_visualizations_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@ -lm
12
xineplug_post_visualizations_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@ -lm
13
13
14
noinst_HEADERS = fft.h visualizations.h
14
noinst_HEADERS = fft.h visualizations.h
(-)src/video_out/Makefile.am (-1 / +1 lines)
Lines 162-168 Link Here
162
162
163
xineplug_vo_out_directx_la_SOURCES = alphablend.c yuv2rgb.c yuv2rgb_mmx.c video_out_directx.c 
163
xineplug_vo_out_directx_la_SOURCES = alphablend.c yuv2rgb.c yuv2rgb_mmx.c video_out_directx.c 
164
xineplug_vo_out_directx_la_CPPFLAGS = $(DIRECTX_CPPFLAGS)
164
xineplug_vo_out_directx_la_CPPFLAGS = $(DIRECTX_CPPFLAGS)
165
xineplug_vo_out_directx_la_LIBADD = $(DIRECTX_VIDEO_LIBS) $(XINE_LIB)
165
xineplug_vo_out_directx_la_LIBADD = $(DIRECTX_VIDEO_LIBS) $(XINE_LIB) $(THREAD_LIBS)
166
xineplug_vo_out_directx_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@
166
xineplug_vo_out_directx_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@
167
167
168
xineplug_vo_out_none_la_SOURCES =  video_out_none.c
168
xineplug_vo_out_none_la_SOURCES =  video_out_none.c
(-)src/video_out/video_out_directx.c (-77 / +91 lines)
Lines 1-5 Link Here
1
/* 
1
/* 
2
 * Copyright (C) 2000-2003 the xine project
2
 * Copyright (C) 2000-2005 the xine project
3
 * 
3
 * 
4
 * This file is part of xine, a unix video player.
4
 * This file is part of xine, a unix video player.
5
 * 
5
 * 
Lines 28-33 Link Here
28
#include <windows.h>
28
#include <windows.h>
29
#include <ddraw.h>
29
#include <ddraw.h>
30
30
31
#include <pthread.h>
32
31
#include "xine.h"
33
#include "xine.h"
32
#include "video_out.h"
34
#include "video_out.h"
33
#include "alphablend.h"
35
#include "alphablend.h"
Lines 54-60 Link Here
54
 * Defining them here allows us to get rid of the dxguid library during
56
 * Defining them here allows us to get rid of the dxguid library during
55
 * the linking stage.
57
 * the linking stage.
56
 *****************************************************************************/
58
 *****************************************************************************/
57
#if 0
59
#if 1
58
static const GUID IID_IDirectDraw = {
60
static const GUID IID_IDirectDraw = {
59
	0x6C14DB80,0xA733,0x11CE,{0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60}
61
	0x6C14DB80,0xA733,0x11CE,{0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60}
60
};
62
};
Lines 66-72 Link Here
66
};
68
};
67
#endif
69
#endif
68
70
69
#if 1
71
#if 0
70
static const GUID IID_IDirectDraw4 = {
72
static const GUID IID_IDirectDraw4 = {
71
	0x9C59509A,0x39BD,0x11D1,{0x8C,0x4A,0x00,0xC0,0x4F,0xD9,0x30,0xC5}
73
	0x9C59509A,0x39BD,0x11D1,{0x8C,0x4A,0x00,0xC0,0x4F,0xD9,0x30,0xC5}
72
};
74
};
Lines 100-108 Link Here
100
102
101
  xine_t                  *xine;
103
  xine_t                  *xine;
102
104
103
  LPDIRECTDRAW4		   ddobj;	    /* direct draw object */
105
  LPDIRECTDRAW		   ddobj;	    /* direct draw object */
104
  LPDIRECTDRAWSURFACE4	   primary;	    /* primary dd surface */
106
  LPDIRECTDRAWSURFACE	   primary;	    /* primary dd surface */
105
  LPDIRECTDRAWSURFACE4 	   secondary;	    /* secondary dd surface  */
107
  LPDIRECTDRAWSURFACE 	   secondary;	    /* secondary dd surface  */
106
  LPDIRECTDRAWCLIPPER	   ddclipper;	    /* dd clipper object */
108
  LPDIRECTDRAWCLIPPER	   ddclipper;	    /* dd clipper object */
107
  uint8_t *		   contents;	    /* secondary contents */
109
  uint8_t *		   contents;	    /* secondary contents */
108
  win32_frame_t           *current;         /* current frame */
110
  win32_frame_t           *current;         /* current frame */
Lines 137-143 Link Here
137
/* Display formatted error message in 
139
/* Display formatted error message in 
138
 * popup message box.*/
140
 * popup message box.*/
139
141
140
void Error( HWND hwnd, LPSTR szfmt, ... )
142
static void Error( HWND hwnd, LPSTR szfmt, ... )
141
{
143
{
142
  char tempbuff[ 256 ];
144
  char tempbuff[ 256 ];
143
  *tempbuff = 0;
145
  *tempbuff = 0;
Lines 148-154 Link Here
148
/* Update our drivers current knowledge
150
/* Update our drivers current knowledge
149
 * of our windows video out posistion */
151
 * of our windows video out posistion */
150
152
151
void UpdateRect( win32_visual_t * win32_visual )
153
static void UpdateRect( win32_visual_t * win32_visual )
152
{
154
{
153
  if( win32_visual->FullScreen )
155
  if( win32_visual->FullScreen )
154
    {
156
    {
Lines 172-181 Link Here
172
 * window and will always have a pixel format 
174
 * window and will always have a pixel format 
173
 * identical to the current display mode. */
175
 * identical to the current display mode. */
174
176
175
boolean CreatePrimary( win32_driver_t * win32_driver )
177
static boolean CreatePrimary( win32_driver_t * win32_driver )
176
{
178
{
177
  LPDIRECTDRAW			ddobj;
179
  LPDIRECTDRAW			ddobj;
178
  DDSURFACEDESC2			ddsd;
180
  DDSURFACEDESC			ddsd;
179
  HRESULT					result;
181
  HRESULT					result;
180
182
181
  /* create direct draw object */
183
  /* create direct draw object */
Lines 193-208 Link Here
193
  result = IDirectDraw_SetCooperativeLevel( ddobj, win32_driver->win32_visual->WndHnd, DDSCL_NORMAL );
195
  result = IDirectDraw_SetCooperativeLevel( ddobj, win32_driver->win32_visual->WndHnd, DDSCL_NORMAL );
194
  if( result != DD_OK )
196
  if( result != DD_OK )
195
    {
197
    {
196
      Error( 0, "SetCooperativeLevel : error %i", result );
198
      Error( 0, "SetCooperativeLevel : error 0x%lx", result );
197
      return 0;
199
      return 0;
198
    }
200
    }
199
201
200
  /* try to get new interface */
202
  /* try to get new interface */
201
203
202
  result = IDirectDraw_QueryInterface( ddobj, &IID_IDirectDraw4, (LPVOID *) &win32_driver->ddobj );
204
  result = IDirectDraw_QueryInterface( ddobj, &IID_IDirectDraw, (LPVOID *) &win32_driver->ddobj );
203
  if( result != DD_OK )
205
  if( result != DD_OK )
204
    {
206
    {
205
      Error( 0, "ddobj->QueryInterface : DirectX 4 or higher required" );
207
      Error( 0, "ddobj->QueryInterface : DirectX required" );
206
      return 0;
208
      return 0;
207
    }
209
    }
208
210
Lines 217-235 Link Here
217
  ddsd.dwFlags        = DDSD_CAPS;
219
  ddsd.dwFlags        = DDSD_CAPS;
218
  ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
220
  ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
219
221
220
  result = IDirectDraw4_CreateSurface( win32_driver->ddobj, &ddsd, &win32_driver->primary, 0 );
222
  result = IDirectDraw_CreateSurface( win32_driver->ddobj, &ddsd, &win32_driver->primary, 0 );
221
  if( result != DD_OK )
223
  if( result != DD_OK )
222
    {
224
    {
223
      Error( 0, "CreateSurface ( primary ) : error %i ", result );
225
      Error( 0, "CreateSurface ( primary ) : error 0x%lx", result );
224
      return 0;
226
      return 0;
225
    }
227
    }
226
228
227
  /* create our clipper object */
229
  /* create our clipper object */
228
230
229
  result = IDirectDraw4_CreateClipper( win32_driver->ddobj, 0, &win32_driver->ddclipper, 0 );
231
  result = IDirectDraw_CreateClipper( win32_driver->ddobj, 0, &win32_driver->ddclipper, 0 );
230
  if( result != DD_OK )
232
  if( result != DD_OK )
231
    {
233
    {
232
      Error( 0, "CreateClipper : error %i", result );
234
      Error( 0, "CreateClipper : error 0x%lx", result );
233
      return 0;
235
      return 0;
234
    }
236
    }
235
237
Lines 238-253 Link Here
238
  result = IDirectDrawClipper_SetHWnd( win32_driver->ddclipper, 0, win32_driver->win32_visual->WndHnd );
240
  result = IDirectDrawClipper_SetHWnd( win32_driver->ddclipper, 0, win32_driver->win32_visual->WndHnd );
239
  if( result != DD_OK )
241
  if( result != DD_OK )
240
    {
242
    {
241
      Error( 0, "ddclipper->SetHWnd : error %i", result );
243
      Error( 0, "ddclipper->SetHWnd : error 0x%lx", result );
242
      return 0;
244
      return 0;
243
    }
245
    }
244
246
245
  /* associate our primary surface with our clipper */
247
  /* associate our primary surface with our clipper */
246
248
247
  result = IDirectDrawSurface4_SetClipper( win32_driver->primary, win32_driver->ddclipper );
249
  result = IDirectDrawSurface_SetClipper( win32_driver->primary, win32_driver->ddclipper );
248
  if( result != DD_OK )
250
  if( result != DD_OK )
249
    {
251
    {
250
      Error( 0, "ddclipper->SetHWnd : error %i", result );
252
      Error( 0, "ddclipper->SetHWnd : error 0x%lx", result );
251
      return 0;
253
      return 0;
252
    }
254
    }
253
255
Lines 268-276 Link Here
268
 * as the primary surface. At least then we
270
 * as the primary surface. At least then we
269
 * can use h/w scaling if supported. */
271
 * can use h/w scaling if supported. */
270
272
271
boolean CreateSecondary( win32_driver_t * win32_driver, int width, int height, int format )
273
static boolean CreateSecondary( win32_driver_t * win32_driver, int width, int height, int format )
272
{
274
{
273
  DDSURFACEDESC2			ddsd;
275
  DDSURFACEDESC ddsd;
276
  HRESULT result;
274
277
275
  if( format == XINE_IMGFMT_YV12 )
278
  if( format == XINE_IMGFMT_YV12 )
276
    xprintf(win32_driver->xine, XINE_VERBOSITY_DEBUG, "vo_out_directx : switching to YV12 overlay type\n" );
279
    xprintf(win32_driver->xine, XINE_VERBOSITY_DEBUG, "vo_out_directx : switching to YV12 overlay type\n" );
Lines 297-303 Link Here
297
   * surface then release it */
300
   * surface then release it */
298
301
299
  if( win32_driver->secondary )
302
  if( win32_driver->secondary )
300
    IDirectDrawSurface4_Release( win32_driver->secondary );
303
    IDirectDrawSurface_Release( win32_driver->secondary );
301
304
302
  memset( &ddsd, 0, sizeof( ddsd ) );
305
  memset( &ddsd, 0, sizeof( ddsd ) );
303
  ddsd.dwSize         = sizeof( ddsd );
306
  ddsd.dwSize         = sizeof( ddsd );
Lines 356-402 Link Here
356
    } 
359
    } 
357
#endif /* RGB_SUPPORT */
360
#endif /* RGB_SUPPORT */
358
361
359
  lprintf("CreateSecondary() - IDirectDraw4_CreateSurface()\n");
362
  lprintf("CreateSecondary() - IDirectDraw_CreateSurface()\n");
360
363
  if( IDirectDraw_CreateSurface( win32_driver->ddobj, &ddsd, &win32_driver->secondary, 0 ) == DD_OK )
361
  if( IDirectDraw4_CreateSurface( win32_driver->ddobj, &ddsd, &win32_driver->secondary, 0 ) == DD_OK )
362
    return TRUE;
364
    return TRUE;
363
365
364
  /*  Our fallback method is to create a back buffer
366
  /*  Our fallback method is to create a back buffer
365
   *  with the same image format as the primary surface */
367
   *  with the same image format as the primary surface */
366
368
367
  lprintf("CreateSecondary() - Falling back to back buffer same as primary\n");
369
  lprintf("CreateSecondary() - Falling back to back buffer same as primary\n");
370
  lprintf("CreateSecondary() - act_format = (NATIVE) %d\n", IMGFMT_NATIVE);
368
371
369
  ddsd.dwFlags        = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT;
372
  ddsd.dwFlags        = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT;
370
  ddsd.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY;
373
  ddsd.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY;
371
372
  lprintf("CreateSecondary() - act_format = (NATIVE) %d\n", IMGFMT_NATIVE);
373
374
  win32_driver->act_format = IMGFMT_NATIVE;
374
  win32_driver->act_format = IMGFMT_NATIVE;
375
375
376
  if( IDirectDraw4_CreateSurface( win32_driver->ddobj, &ddsd, &win32_driver->secondary, 0 ) == DD_OK )
376
  if( IDirectDraw_CreateSurface( win32_driver->ddobj, &ddsd, &win32_driver->secondary, 0 ) == DD_OK )
377
    return TRUE;
378
379
  /*  Our second fallback - all w/o HW acceleration */
380
  lprintf("CreateSecondary() - Falling back, disabling HW acceleration \n");
381
  ddsd.dwFlags        = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT;
382
  ddsd.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN;
383
  if( (result = IDirectDraw_CreateSurface( win32_driver->ddobj, &ddsd, &win32_driver->secondary, 0 )) == DD_OK )
377
    return TRUE;
384
    return TRUE;
378
385
379
  /* This is bad. We cant even create a surface with
386
  /* This is bad. We cant even create a surface with
380
   * the same format as the primary surface. */
387
   * the same format as the primary surface. */
381
388
  Error( 0, "CreateSurface ( Secondary ) : unable to create a suitable rendering surface: 0x%08lX", result );
382
  Error( 0, "CreateSurface ( Secondary ) : unable to create a suitable rendering surface" );
383
384
  return FALSE;
389
  return FALSE;
385
}
390
}
386
391
387
/* Destroy all direct draw driver allocated
392
/* Destroy all direct draw driver allocated
388
 * resources. */
393
 * resources. */
389
394
390
void Destroy( win32_driver_t * win32_driver )
395
static void Destroy( win32_driver_t * win32_driver )
391
{
396
{
392
  if( win32_driver->ddclipper )
397
  if( win32_driver->ddclipper )
393
    IDirectDrawClipper_Release( win32_driver->ddclipper );
398
    IDirectDrawClipper_Release( win32_driver->ddclipper );
394
399
395
  if( win32_driver->primary )
400
  if( win32_driver->primary )
396
    IDirectDrawSurface4_Release( win32_driver->primary );
401
    IDirectDrawSurface_Release( win32_driver->primary );
397
402
398
  if( win32_driver->secondary )
403
  if( win32_driver->secondary )
399
    IDirectDrawSurface4_Release( win32_driver->secondary );
404
    IDirectDrawSurface_Release( win32_driver->secondary );
400
405
401
  if( win32_driver->ddobj )
406
  if( win32_driver->ddobj )
402
    IDirectDraw_Release( win32_driver->ddobj );
407
    IDirectDraw_Release( win32_driver->ddobj );
Lines 411-417 Link Here
411
 * the h/w does not support an overlay for
416
 * the h/w does not support an overlay for
412
 * the native frame format. */
417
 * the native frame format. */
413
418
414
boolean CheckPixelFormat( win32_driver_t * win32_driver )
419
static boolean CheckPixelFormat( win32_driver_t * win32_driver )
415
{
420
{
416
  DDPIXELFORMAT	ddpf;
421
  DDPIXELFORMAT	ddpf;
417
  HRESULT			result;
422
  HRESULT			result;
Lines 420-429 Link Here
420
425
421
  memset( &ddpf, 0, sizeof( DDPIXELFORMAT ));
426
  memset( &ddpf, 0, sizeof( DDPIXELFORMAT ));
422
  ddpf.dwSize = sizeof( DDPIXELFORMAT );
427
  ddpf.dwSize = sizeof( DDPIXELFORMAT );
423
  result = IDirectDrawSurface4_GetPixelFormat( win32_driver->primary, &ddpf );
428
  result = IDirectDrawSurface_GetPixelFormat( win32_driver->primary, &ddpf );
424
  if( result != DD_OK )
429
  if( result != DD_OK )
425
    {
430
    {
426
      Error( 0, "IDirectDrawSurface4_GetPixelFormat ( CheckPixelFormat ) : error %u", result );
431
      Error( 0, "IDirectDrawSurface_GetPixelFormat ( CheckPixelFormat ) : error 0x%lx", result );
427
      return 0;
432
      return 0;
428
    }
433
    }
429
434
Lines 486-495 Link Here
486
 * being pushed to the backend. */
491
 * being pushed to the backend. */
487
492
488
493
489
LPDIRECTDRAWSURFACE4 CreateBMP( win32_driver_t * win32_driver, int resource )
494
static LPDIRECTDRAWSURFACE CreateBMP( win32_driver_t * win32_driver, int resource )
490
{
495
{
491
  LPDIRECTDRAWSURFACE4	bmp_surf;
496
  LPDIRECTDRAWSURFACE	bmp_surf;
492
  DDSURFACEDESC2	bmp_ddsd;
497
  DDSURFACEDESC	bmp_ddsd;
493
  HBITMAP		bmp_hndl;
498
  HBITMAP		bmp_hndl;
494
  BITMAP		bmp_head;
499
  BITMAP		bmp_head;
495
  HDC			hdc_dds;
500
  HDC			hdc_dds;
Lines 515-521 Link Here
515
  bmp_ddsd.dwWidth        = bmp_head.bmWidth;
520
  bmp_ddsd.dwWidth        = bmp_head.bmWidth;
516
  bmp_ddsd.dwHeight       = bmp_head.bmHeight;
521
  bmp_ddsd.dwHeight       = bmp_head.bmHeight;
517
522
518
  if( IDirectDraw4_CreateSurface( win32_driver->ddobj, &bmp_ddsd, &bmp_surf, 0 ) != DD_OK )
523
  if( IDirectDraw_CreateSurface( win32_driver->ddobj, &bmp_ddsd, &bmp_surf, 0 ) != DD_OK )
519
    {
524
    {
520
      Error( 0, "CreateSurface ( bitmap ) : could not create dd surface" );
525
      Error( 0, "CreateSurface ( bitmap ) : could not create dd surface" );
521
      return 0;
526
      return 0;
Lines 525-531 Link Here
525
   * create a compat dc and load
530
   * create a compat dc and load
526
   * our bitmap into the compat dc */
531
   * our bitmap into the compat dc */
527
532
528
  IDirectDrawSurface4_GetDC( bmp_surf, &hdc_dds );
533
  IDirectDrawSurface_GetDC( bmp_surf, &hdc_dds );
529
  hdc_mem = CreateCompatibleDC( hdc_dds );
534
  hdc_mem = CreateCompatibleDC( hdc_dds );
530
  SelectObject( hdc_mem, bmp_hndl );
535
  SelectObject( hdc_mem, bmp_hndl );
531
536
Lines 539-545 Link Here
539
544
540
  DeleteDC( hdc_mem );
545
  DeleteDC( hdc_mem );
541
  DeleteObject( bmp_hndl );
546
  DeleteObject( bmp_hndl );
542
  IDirectDrawSurface4_ReleaseDC( bmp_surf, hdc_dds );
547
  IDirectDrawSurface_ReleaseDC( bmp_surf, hdc_dds );
543
548
544
  return bmp_surf;
549
  return bmp_surf;
545
}
550
}
Lines 549-556 Link Here
549
 * a h/w overlay of the current frame type
554
 * a h/w overlay of the current frame type
550
 * is supported. */
555
 * is supported. */
551
556
552
boolean Overlay( LPDIRECTDRAWSURFACE4 src_surface, RECT * src_rect,
557
static boolean Overlay( LPDIRECTDRAWSURFACE src_surface, RECT * src_rect,
553
		 LPDIRECTDRAWSURFACE4 dst_surface, RECT * dst_rect,
558
		 LPDIRECTDRAWSURFACE dst_surface, RECT * dst_rect,
554
		 COLORREF color_key )
559
		 COLORREF color_key )
555
{
560
{
556
  DWORD			dw_color_key;
561
  DWORD			dw_color_key;
Lines 564-573 Link Here
564
569
565
  memset( &ddpf, 0, sizeof( DDPIXELFORMAT ));
570
  memset( &ddpf, 0, sizeof( DDPIXELFORMAT ));
566
  ddpf.dwSize = sizeof( DDPIXELFORMAT );
571
  ddpf.dwSize = sizeof( DDPIXELFORMAT );
567
  result = IDirectDrawSurface4_GetPixelFormat( dst_surface, &ddpf );
572
  result = IDirectDrawSurface_GetPixelFormat( dst_surface, &ddpf );
568
  if( result != DD_OK )
573
  if( result != DD_OK )
569
    {
574
    {
570
      Error( 0, "IDirectDrawSurface4_GetPixelFormat : could not get surface pixel format" );
575
      Error( 0, "IDirectDrawSurface_GetPixelFormat : could not get surface pixel format" );
571
      return FALSE;
576
      return FALSE;
572
    }
577
    }
573
578
Lines 585-603 Link Here
585
590
586
  /* attempt to overlay the surface */
591
  /* attempt to overlay the surface */
587
592
588
  result = IDirectDrawSurface4_UpdateOverlay( src_surface, src_rect, dst_surface, dst_rect, flags, &ddofx );
593
  result = IDirectDrawSurface_UpdateOverlay( src_surface, src_rect, dst_surface, dst_rect, flags, &ddofx );
589
  if( result != DD_OK )
594
  if( result != DD_OK )
590
    {
595
    {
591
      if( result == DDERR_SURFACELOST )
596
      if( result == DDERR_SURFACELOST )
592
	{
597
	{
593
	  IDirectDrawSurface4_Restore( src_surface );
598
	  IDirectDrawSurface_Restore( src_surface );
594
	  IDirectDrawSurface4_Restore( dst_surface );
599
	  IDirectDrawSurface_Restore( dst_surface );
595
600
596
	  IDirectDrawSurface4_UpdateOverlay( src_surface, src_rect, dst_surface, dst_rect, flags, &ddofx );
601
	  IDirectDrawSurface_UpdateOverlay( src_surface, src_rect, dst_surface, dst_rect, flags, &ddofx );
597
	}
602
	}
598
      else
603
      else
599
	{
604
	{
600
	  Error( 0, "IDirectDrawSurface4_UpdateOverlay : error %i", result );
605
	  Error( 0, "IDirectDrawSurface_UpdateOverlay : error 0x%lx", result );
601
	  return FALSE;
606
	  return FALSE;
602
	}
607
	}
603
    }
608
    }
Lines 610-617 Link Here
610
 * h/w overlay of the current frame format is
615
 * h/w overlay of the current frame format is
611
 * not supported. */
616
 * not supported. */
612
617
613
boolean BltCopy( LPDIRECTDRAWSURFACE4 src_surface, RECT * src_rect,
618
static boolean BltCopy( LPDIRECTDRAWSURFACE src_surface, RECT * src_rect,
614
		 LPDIRECTDRAWSURFACE4 dst_surface, RECT * dst_rect )
619
		 LPDIRECTDRAWSURFACE dst_surface, RECT * dst_rect )
615
{
620
{
616
  DDSURFACEDESC	ddsd_target;
621
  DDSURFACEDESC	ddsd_target;
617
  HRESULT	result;
622
  HRESULT	result;
Lines 621-639 Link Here
621
626
622
  /* attempt to blt the surface sontents */
627
  /* attempt to blt the surface sontents */
623
628
624
  result = IDirectDrawSurface4_Blt( dst_surface, dst_rect, src_surface, src_rect, DDBLT_WAIT, 0 );
629
  result = IDirectDrawSurface_Blt( dst_surface, dst_rect, src_surface, src_rect, DDBLT_WAIT, 0 );
625
  if( result != DD_OK )
630
  if( result != DD_OK )
626
    {
631
    {
627
      if( result != DDERR_SURFACELOST )
632
      if( result != DDERR_SURFACELOST )
628
	{
633
	{
629
	  IDirectDrawSurface4_Restore( src_surface );
634
	  IDirectDrawSurface_Restore( src_surface );
630
	  IDirectDrawSurface4_Restore( dst_surface );
635
	  IDirectDrawSurface_Restore( dst_surface );
631
636
632
	  IDirectDrawSurface4_Blt( dst_surface, dst_rect, src_surface, src_rect, DDBLT_WAIT, 0 );
637
	  IDirectDrawSurface_Blt( dst_surface, dst_rect, src_surface, src_rect, DDBLT_WAIT, 0 );
633
	}
638
	}
634
      else
639
      else
635
	{
640
	{
636
	  Error( 0, "IDirectDrawSurface4_Blt : error %i", result );
641
	  Error( 0, "IDirectDrawSurface_Blt : error 0x%lx", result );
637
	  return FALSE;
642
	  return FALSE;
638
	}
643
	}
639
    }
644
    }
Lines 647-653 Link Here
647
 * moving the image contents contained in our
652
 * moving the image contents contained in our
648
 * secondary surface to our primary surface. */
653
 * secondary surface to our primary surface. */
649
654
650
boolean DisplayFrame( win32_driver_t * win32_driver )
655
static boolean DisplayFrame( win32_driver_t * win32_driver )
651
{
656
{
652
  int					view_width;
657
  int					view_width;
653
  int					view_height;
658
  int					view_height;
Lines 752-761 Link Here
752
757
753
/* Lock our back buffer to update its contents. */
758
/* Lock our back buffer to update its contents. */
754
759
755
void * Lock( void * surface )
760
static void * Lock( void * surface )
756
{
761
{
757
  LPDIRECTDRAWSURFACE4	lock_surface = ( LPDIRECTDRAWSURFACE4 ) surface;
762
  LPDIRECTDRAWSURFACE	lock_surface = ( LPDIRECTDRAWSURFACE ) surface;
758
  DDSURFACEDESC2	ddsd;
763
  DDSURFACEDESC	ddsd;
759
  HRESULT		result;
764
  HRESULT		result;
760
765
761
  if( !surface )
766
  if( !surface )
Lines 764-774 Link Here
764
  memset( &ddsd, 0, sizeof( ddsd ) );
769
  memset( &ddsd, 0, sizeof( ddsd ) );
765
  ddsd.dwSize = sizeof( ddsd );
770
  ddsd.dwSize = sizeof( ddsd );
766
771
767
  result = IDirectDrawSurface4_Lock( lock_surface, 0, &ddsd, DDLOCK_WAIT | DDLOCK_NOSYSLOCK, 0 );
772
  result = IDirectDrawSurface_Lock( lock_surface, 0, &ddsd, DDLOCK_WAIT | DDLOCK_NOSYSLOCK, 0 );
768
  if( result == DDERR_SURFACELOST )
773
  if( result == DDERR_SURFACELOST )
769
    {
774
    {
770
      IDirectDrawSurface4_Restore( lock_surface );
775
      IDirectDrawSurface_Restore( lock_surface );
771
      result = IDirectDrawSurface4_Lock( lock_surface, 0, &ddsd, DDLOCK_WAIT | DDLOCK_NOSYSLOCK, 0 );
776
      result = IDirectDrawSurface_Lock( lock_surface, 0, &ddsd, DDLOCK_WAIT | DDLOCK_NOSYSLOCK, 0 );
772
777
773
      if( result != DD_OK )
778
      if( result != DD_OK )
774
	return 0;
779
	return 0;
Lines 784-803 Link Here
784
    }
789
    }
785
790
786
  return ddsd.lpSurface;
791
  return ddsd.lpSurface;
787
788
  return 0;
789
}
792
}
790
793
791
/* Unlock our back buffer to prepair for display. */
794
/* Unlock our back buffer to prepair for display. */
792
795
793
void Unlock( void * surface )
796
static void Unlock( void * surface )
794
{
797
{
795
  LPDIRECTDRAWSURFACE4 lock_surface = ( LPDIRECTDRAWSURFACE4 ) surface;
798
  LPDIRECTDRAWSURFACE lock_surface = ( LPDIRECTDRAWSURFACE ) surface;
796
799
797
  if( !surface )
800
  if( !surface )
798
    return;
801
    return;
799
802
800
  IDirectDrawSurface4_Unlock( lock_surface, 0 );
803
  IDirectDrawSurface_Unlock( lock_surface, 0 );
801
}
804
}
802
805
803
/* -----------------------------------------
806
/* -----------------------------------------
Lines 867-872 Link Here
867
  if (!win32_frame)
870
  if (!win32_frame)
868
    return NULL;
871
    return NULL;
869
872
873
  pthread_mutex_init(&win32_frame->vo_frame.mutex, NULL);
874
870
  win32_frame->vo_frame.proc_slice = NULL;
875
  win32_frame->vo_frame.proc_slice = NULL;
871
  win32_frame->vo_frame.proc_frame = NULL;
876
  win32_frame->vo_frame.proc_frame = NULL;
872
  win32_frame->vo_frame.field      = win32_frame_field;
877
  win32_frame->vo_frame.field      = win32_frame_field;
Lines 885-890 Link Here
885
890
886
  /*printf("vo_out_directx : win32_update_frame_format() - width = %d, height=%d, ratio_code=%d, format=%d, flags=%d\n", width, height, ratio_code, format, flags);*/
891
  /*printf("vo_out_directx : win32_update_frame_format() - width = %d, height=%d, ratio_code=%d, format=%d, flags=%d\n", width, height, ratio_code, format, flags);*/
887
892
893
888
  if( ( win32_frame->format	!= format	) ||
894
  if( ( win32_frame->format	!= format	) ||
889
      ( win32_frame->width	!= width	) ||
895
      ( win32_frame->width	!= width	) ||
890
      ( win32_frame->height	!= height	) )
896
      ( win32_frame->height	!= height	) )
Lines 936-941 Link Here
936
      win32_frame->height	= height;
942
      win32_frame->height	= height;
937
      win32_frame->ratio	= ratio;
943
      win32_frame->ratio	= ratio;
938
    }
944
    }
945
939
}
946
}
940
947
941
static void win32_display_frame( vo_driver_t * vo_driver, vo_frame_t * vo_frame )
948
static void win32_display_frame( vo_driver_t * vo_driver, vo_frame_t * vo_frame )
Lines 945-950 Link Here
945
  int              offset;
952
  int              offset;
946
  int              size;
953
  int              size;
947
954
955
948
  /* if the required width, height or format has changed
956
  /* if the required width, height or format has changed
949
   * then recreate the secondary buffer */
957
   * then recreate the secondary buffer */
950
958
Lines 1091-1096 Link Here
1091
    vo_frame->free(&win32_driver->current->vo_frame);
1099
    vo_frame->free(&win32_driver->current->vo_frame);
1092
  }
1100
  }
1093
  win32_driver->current = (win32_frame_t *)vo_frame;
1101
  win32_driver->current = (win32_frame_t *)vo_frame;
1102
1094
}
1103
}
1095
1104
1096
static void win32_overlay_blend( vo_driver_t * vo_driver, vo_frame_t * vo_frame, vo_overlay_t * vo_overlay )
1105
static void win32_overlay_blend( vo_driver_t * vo_driver, vo_frame_t * vo_frame, vo_overlay_t * vo_overlay )
Lines 1098-1103 Link Here
1098
  win32_frame_t * win32_frame = ( win32_frame_t * ) vo_frame;
1107
  win32_frame_t * win32_frame = ( win32_frame_t * ) vo_frame;
1099
  win32_driver_t * win32_driver = ( win32_driver_t * ) vo_driver;
1108
  win32_driver_t * win32_driver = ( win32_driver_t * ) vo_driver;
1100
1109
1110
1101
  /* temporary overlay support, somthing more appropriate
1111
  /* temporary overlay support, somthing more appropriate
1102
   * for win32 will be devised at a later date */
1112
   * for win32 will be devised at a later date */
1103
1113
Lines 1176-1181 Link Here
1176
  directx_class_t *class = (directx_class_t *)class_gen;
1186
  directx_class_t *class = (directx_class_t *)class_gen;
1177
  win32_driver_t  *win32_driver = ( win32_driver_t * ) xine_xmalloc ( sizeof( win32_driver_t ) );
1187
  win32_driver_t  *win32_driver = ( win32_driver_t * ) xine_xmalloc ( sizeof( win32_driver_t ) );
1178
1188
1189
1179
  _x_alphablend_init(&win32_driver->alphablend_extra_data, class->xine);
1190
  _x_alphablend_init(&win32_driver->alphablend_extra_data, class->xine);
1180
  
1191
  
1181
  win32_driver->xine = class->xine;
1192
  win32_driver->xine = class->xine;
Lines 1196-1207 Link Here
1196
  win32_driver->vo_driver.dispose		= win32_exit;
1207
  win32_driver->vo_driver.dispose		= win32_exit;
1197
  win32_driver->vo_driver.redraw_needed         = win32_redraw_needed;
1208
  win32_driver->vo_driver.redraw_needed         = win32_redraw_needed;
1198
1209
1199
  CreatePrimary( win32_driver );
1210
  if (!CreatePrimary( win32_driver )) {
1211
      Destroy( win32_driver );
1212
      return NULL;
1213
  }
1200
  if( !CheckPixelFormat( win32_driver ) )
1214
  if( !CheckPixelFormat( win32_driver ) )
1201
    {
1215
    {
1202
      Error( 0, "vo_directx : Your screen pixel format is not supported" );
1216
      Error( 0, "vo_directx : Your screen pixel format is not supported" );
1203
      Destroy( win32_driver );
1217
      Destroy( win32_driver );
1204
      return 0;
1218
      return NULL;
1205
    }
1219
    }
1206
1220
1207
#if (NEW_YUV)
1221
#if (NEW_YUV)
Lines 1212-1218 Link Here
1212
#endif
1226
#endif
1213
1227
1214
  return ( vo_driver_t * ) win32_driver;
1228
  return ( vo_driver_t * ) win32_driver;
1215
}    
1229
}
1216
1230
1217
1231
1218
static char* get_identifier (video_driver_class_t *this_gen) {
1232
static char* get_identifier (video_driver_class_t *this_gen) {
Lines 1232-1238 Link Here
1232
static void *init_class (xine_t *xine, void *visual_gen) {
1246
static void *init_class (xine_t *xine, void *visual_gen) {
1233
1247
1234
  directx_class_t    *directx;
1248
  directx_class_t    *directx;
1235
  
1249
1236
  /*
1250
  /*
1237
   * from this point on, nothing should go wrong anymore
1251
   * from this point on, nothing should go wrong anymore
1238
   */
1252
   */
(-)src/video_out/video_out_xv.c (-6 lines)
Lines 44-55 Link Here
44
#include <errno.h>
44
#include <errno.h>
45
#include <math.h>
45
#include <math.h>
46
46
47
#if defined (__SVR4) && defined (__sun)
48
# include <sys/int_types.h>
49
#else
50
# include <stdint.h>
51
#endif
52
53
#include <sys/types.h>
47
#include <sys/types.h>
54
#if defined(__FreeBSD__)
48
#if defined(__FreeBSD__)
55
#include <machine/param.h>
49
#include <machine/param.h>
(-)src/xine-engine/Makefile.am (-22 / +6 lines)
Lines 1-22 Link Here
1
include $(top_srcdir)/misc/Makefile.common
1
include $(top_srcdir)/misc/Makefile.common
2
include $(top_srcdir)/lib/Makefile.common
2
include $(top_srcdir)/lib/Makefile.common
3
3
4
AM_CFLAGS = $(THREAD_CFLAGS) $(X_CFLAGS) $(FT2_CFLAGS)
4
AM_CFLAGS = $(X_CFLAGS) $(FT2_CFLAGS)
5
AM_CPPFLAGS = $(ZLIB_CPPFLAGS)
5
6
6
LIBTOOL = $(SHELL) $(top_builddir)/libtool
7
LIBTOOL = $(SHELL) $(top_builddir)/libtool
7
lib_LTLIBRARIES = libxine.la
8
lib_LTLIBRARIES = libxine.la
8
9
9
XINEUTILS_LIB  = $(top_builddir)/src/xine-utils/libxineutils.la
10
XINEUTILS_LIB  = $(top_builddir)/src/xine-utils/libxineutils.la
10
INTERNAL_ZLIB_LIB = $(top_builddir)/win32/contrib/zlib/libzlib.la
11
DIRENT_LIB = $(top_builddir)/win32/contrib/libdirent.la
12
INTERNAL_PTHREAD_LIB = $(top_builddir)/win32/contrib/pthreads/libpthread.la
13
DEF_FILE = libxine-$(XINE_MAJOR).def
11
DEF_FILE = libxine-$(XINE_MAJOR).def
14
if !HAVE_ZLIB
15
zlib_dep = $(INTERNAL_ZLIB_LIB)
16
endif
17
if WIN32
12
if WIN32
18
dirent_lib = $(DIRENT_LIB)
19
pthread_dep = $(INTERNAL_PTHREAD_LIB)
20
def_ldflags="-Wl,--output-def,$(DEF_FILE)"
13
def_ldflags="-Wl,--output-def,$(DEF_FILE)"
21
endif
14
endif
22
15
Lines 33-43 Link Here
33
if INCLUDED_INTL
26
if INCLUDED_INTL
34
INCLUDED_INTLLIBS = @INTLLIBS@
27
INCLUDED_INTLLIBS = @INTLLIBS@
35
endif
28
endif
36
libxine_la_DEPENDENCIES = $(INCLUDED_INTLLIBS) $(XINEUTILS_LIB) $(zlib_dep) \
29
libxine_la_DEPENDENCIES = $(INCLUDED_INTLLIBS) $(XINEUTILS_LIB) \
37
                          $(dirent_lib) $(pthread_dep) $(LIBXINEPOSIX)
30
                          $(pthread_dep) $(LIBXINEPOSIX)
38
libxine_la_LIBADD = $(THREAD_LIBS) $(DYNAMIC_LD_LIBS) @INTLLIBS@ $(ZLIB_LIBS) \
31
libxine_la_LIBADD = $(THREAD_LIBS) $(DYNAMIC_LD_LIBS) @INTLLIBS@ $(ZLIB_LIBS) \
39
		    -lm $(XINEUTILS_LIB) $(LIBICONV) $(FT2_LIBS) \
32
		    -lm $(XINEUTILS_LIB) $(LIBICONV) $(FT2_LIBS) \
40
                    $(dirent_lib) $(LIBXINEPOSIX) $(RT_LIBS)
33
                    $(LIBXINEPOSIX) $(RT_LIBS)
41
34
42
libxine_la_LDFLAGS =  \
35
libxine_la_LDFLAGS =  \
43
	-version-info $(XINE_LT_CURRENT):$(XINE_LT_REVISION):$(XINE_LT_AGE) \
36
	-version-info $(XINE_LT_CURRENT):$(XINE_LT_REVISION):$(XINE_LT_AGE) \
Lines 57-63 Link Here
57
	cp -p $(DEF_FILE) $(DESTDIR)$(libdir)
50
	cp -p $(DEF_FILE) $(DESTDIR)$(libdir)
58
51
59
uninstall-local:
52
uninstall-local:
60
	rm -f $(DEF_FILE) $(DESTDIR)$(libdir)
53
	rm -f $(DEF_FILE)
61
endif
54
endif
62
55
63
@INCLUDED_INTL_TRUE@@INTLLIBS@:
56
@INCLUDED_INTL_TRUE@@INTLLIBS@:
Lines 65-76 Link Here
65
58
66
$(XINEUTILS_LIB):
59
$(XINEUTILS_LIB):
67
	$(MAKE) -C $(top_builddir)/src/xine-utils libxineutils.la
60
	$(MAKE) -C $(top_builddir)/src/xine-utils libxineutils.la
68
69
$(INTERNAL_PTHREAD_LIB):
70
	$(MAKE) -C $(top_builddir)/win32/contrib/pthreads libpthread.la
71
72
$(INTERNAL_ZLIB_LIB):
73
	$(MAKE) -C $(top_builddir)/win32/contrib/zlib libzlib.la
74
75
$(DIRENT_LIB):
76
	$(MAKE) -C $(top_builddir)/win32/contrib libdirent.la
(-)src/xine-engine/audio_decoder.c (-5 / +7 lines)
Lines 1-5 Link Here
1
/*
1
/*
2
 * Copyright (C) 2000-2004 the xine project
2
 * Copyright (C) 2000-2005 the xine project
3
 * 
3
 * 
4
 * This file is part of xine, a free video player.
4
 * This file is part of xine, a free video player.
5
 * 
5
 * 
Lines 148-154 Link Here
148
148
149
      pthread_cond_broadcast (&stream->counter_changed);
149
      pthread_cond_broadcast (&stream->counter_changed);
150
150
151
      if (stream->video_thread) {
151
      if (stream->video_thread_created) {
152
        while (stream->finished_count_video < stream->finished_count_audio) {
152
        while (stream->finished_count_video < stream->finished_count_audio) {
153
          struct timeval tv;
153
          struct timeval tv;
154
          struct timespec ts;
154
          struct timespec ts;
Lines 490-496 Link Here
490
    pth_params.sched_priority = sched_get_priority_min(SCHED_OTHER);
490
    pth_params.sched_priority = sched_get_priority_min(SCHED_OTHER);
491
    pthread_attr_setschedparam(&pth_attrs, &pth_params);
491
    pthread_attr_setschedparam(&pth_attrs, &pth_params);
492
    pthread_attr_setscope(&pth_attrs, PTHREAD_SCOPE_SYSTEM);
492
    pthread_attr_setscope(&pth_attrs, PTHREAD_SCOPE_SYSTEM);
493
  
493
 
494
    stream->audio_thread_created = 1; 
494
    if ((err = pthread_create (&stream->audio_thread,
495
    if ((err = pthread_create (&stream->audio_thread,
495
                               &pth_attrs, audio_decoder_loop, stream)) != 0) {
496
                               &pth_attrs, audio_decoder_loop, stream)) != 0) {
496
      xprintf (stream->xine, XINE_VERBOSITY_DEBUG, 
497
      xprintf (stream->xine, XINE_VERBOSITY_DEBUG, 
Lines 507-520 Link Here
507
  buf_element_t *buf;
508
  buf_element_t *buf;
508
  void          *p;
509
  void          *p;
509
510
510
  if (stream->audio_thread) {
511
  if (stream->audio_thread_created) {
511
    /* stream->audio_fifo->clear(stream->audio_fifo); */
512
    /* stream->audio_fifo->clear(stream->audio_fifo); */
512
513
513
    buf = stream->audio_fifo->buffer_pool_alloc (stream->audio_fifo);
514
    buf = stream->audio_fifo->buffer_pool_alloc (stream->audio_fifo);
514
    buf->type = BUF_CONTROL_QUIT;
515
    buf->type = BUF_CONTROL_QUIT;
515
    stream->audio_fifo->put (stream->audio_fifo, buf);
516
    stream->audio_fifo->put (stream->audio_fifo, buf);
516
    
517
    
517
    pthread_join (stream->audio_thread, &p); 
518
    pthread_join (stream->audio_thread, &p);
519
    stream->audio_thread_created = 0;
518
  }
520
  }
519
    
521
    
520
  stream->audio_fifo->dispose (stream->audio_fifo);
522
  stream->audio_fifo->dispose (stream->audio_fifo);
(-)src/xine-engine/audio_out.c (-3 / +5 lines)
Lines 1-5 Link Here
1
/*
1
/*
2
 * Copyright (C) 2000-2004 the xine project
2
 * Copyright (C) 2000-2005 the xine project
3
 * 
3
 * 
4
 * This file is part of xine, a free video player.
4
 * This file is part of xine, a free video player.
5
 * 
5
 * 
Lines 216-221 Link Here
216
  int             audio_loop_running;
216
  int             audio_loop_running;
217
  int             grab_only; /* => do not start thread, frontend will consume samples */
217
  int             grab_only; /* => do not start thread, frontend will consume samples */
218
  pthread_t       audio_thread;
218
  pthread_t       audio_thread;
219
  int             audio_thread_created;
219
220
220
  int64_t         audio_step;           /* pts per 32 768 samples (sample = #bytes/2) */
221
  int64_t         audio_step;           /* pts per 32 768 samples (sample = #bytes/2) */
221
  int32_t         frames_per_kpts;      /* frames per 1024/90000 sec                  */
222
  int32_t         frames_per_kpts;      /* frames per 1024/90000 sec                  */
Lines 1543-1549 Link Here
1543
    fifo_append (this->out_fifo, buf);
1544
    fifo_append (this->out_fifo, buf);
1544
1545
1545
    pthread_join (this->audio_thread, &p);
1546
    pthread_join (this->audio_thread, &p);
1546
    this->audio_thread = 0;
1547
    this->audio_thread_created = 0;
1547
  }
1548
  }
1548
      
1549
      
1549
  if (!this->grab_only) {
1550
  if (!this->grab_only) {
Lines 2103-2109 Link Here
2103
    
2104
    
2104
    pthread_attr_init(&pth_attrs);
2105
    pthread_attr_init(&pth_attrs);
2105
    pthread_attr_setscope(&pth_attrs, PTHREAD_SCOPE_SYSTEM);
2106
    pthread_attr_setscope(&pth_attrs, PTHREAD_SCOPE_SYSTEM);
2106
    
2107
2108
    this->audio_thread_created = 1;
2107
    if ((err = pthread_create (&this->audio_thread,
2109
    if ((err = pthread_create (&this->audio_thread,
2108
			       &pth_attrs, ao_loop, this)) != 0) {
2110
			       &pth_attrs, ao_loop, this)) != 0) {
2109
      
2111
      
(-)src/xine-engine/buffer_types.c (-1 / +2 lines)
Lines 284-290 Link Here
284
    else if (!strncasecmp (video, "yuv2", 4))
284
    else if (!strncasecmp (video, "yuv2", 4))
285
    this->video_type = BUF_VIDEO_YUY2;
285
    this->video_type = BUF_VIDEO_YUY2;
286
    */
286
    */
287
    meFOURCC('y','u','v','2'),
287
    meFOURCC('y', 'u', 'v', '2'),
288
    meFOURCC('Y', 'U', 'Y', '2'),
288
    0
289
    0
289
  },
290
  },
290
  BUF_VIDEO_YUY2,
291
  BUF_VIDEO_YUY2,
(-)src/xine-engine/configfile.c (-1 / +1 lines)
Lines 964-970 Link Here
964
    f_backup = fopen(temp, "w");
964
    f_backup = fopen(temp, "w");
965
    f_config = fopen(filename, "r");
965
    f_config = fopen(filename, "r");
966
    
966
    
967
    if (f_config && f_backup && (stat(filename, &config_stat) == 0) && (config_stat.st_size > 0)) {
967
    if (f_config && f_backup && (stat(filename, &config_stat) == 0)) {
968
      char    *buf = NULL;
968
      char    *buf = NULL;
969
      size_t   rlen;
969
      size_t   rlen;
970
      
970
      
(-)src/xine-engine/demux.c (-8 / +9 lines)
Lines 1-5 Link Here
1
/*
1
/*
2
 * Copyright (C) 2000-2004 the xine project
2
 * Copyright (C) 2000-2005 the xine project
3
 *
3
 *
4
 * This file is part of xine, a free video player.
4
 * This file is part of xine, a free video player.
5
 *
5
 *
Lines 150-162 Link Here
150
150
151
  pthread_mutex_lock (&stream->counter_lock);
151
  pthread_mutex_lock (&stream->counter_lock);
152
152
153
  if (stream->video_thread) {
153
  if (stream->video_thread_created) {
154
    header_count_video = stream->header_count_video + 1;
154
    header_count_video = stream->header_count_video + 1;
155
  } else {
155
  } else {
156
    header_count_video = 0;
156
    header_count_video = 0;
157
  }
157
  }
158
158
159
  if (stream->audio_thread) {
159
  if (stream->audio_thread_created) {
160
    header_count_audio = stream->header_count_audio + 1;
160
    header_count_audio = stream->header_count_audio + 1;
161
  } else {
161
  } else {
162
    header_count_audio = 0;
162
    header_count_audio = 0;
Lines 292-300 Link Here
292
  lprintf ("loop finished (status: %d)\n", status);
292
  lprintf ("loop finished (status: %d)\n", status);
293
293
294
  pthread_mutex_lock (&stream->counter_lock);
294
  pthread_mutex_lock (&stream->counter_lock);
295
  if (stream->audio_thread)
295
  if (stream->audio_thread_created)
296
    finished_count_audio = stream->finished_count_audio + 1;
296
    finished_count_audio = stream->finished_count_audio + 1;
297
  if (stream->video_thread)
297
  if (stream->video_thread_created)
298
    finished_count_video = stream->finished_count_video + 1;
298
    finished_count_video = stream->finished_count_video + 1;
299
  pthread_mutex_unlock (&stream->counter_lock);
299
  pthread_mutex_unlock (&stream->counter_lock);
300
300
Lines 332-343 Link Here
332
  
332
  
333
  if( !stream->demux_thread_running ) {
333
  if( !stream->demux_thread_running ) {
334
334
335
    if (stream->demux_thread) {
335
    if (stream->demux_thread_created) {
336
      void *p;
336
      void *p;
337
      pthread_join(stream->demux_thread, &p);
337
      pthread_join(stream->demux_thread, &p);
338
    }
338
    }
339
339
340
    stream->demux_thread_running = 1;
340
    stream->demux_thread_running = 1;
341
    stream->demux_thread_created = 1;
341
    if ((err = pthread_create (&stream->demux_thread,
342
    if ((err = pthread_create (&stream->demux_thread,
342
			       NULL, demux_loop, (void *)stream)) != 0) {
343
			       NULL, demux_loop, (void *)stream)) != 0) {
343
      printf ("demux: can't create new thread (%s)\n", strerror(err));
344
      printf ("demux: can't create new thread (%s)\n", strerror(err));
Lines 368-376 Link Here
368
369
369
  lprintf ("joining thread %ld\n", stream->demux_thread );
370
  lprintf ("joining thread %ld\n", stream->demux_thread );
370
  
371
  
371
  if( stream->demux_thread ) {
372
  if( stream->demux_thread_created ) {
372
    pthread_join (stream->demux_thread, &p);
373
    pthread_join (stream->demux_thread, &p);
373
    stream->demux_thread = 0;
374
    stream->demux_thread_created = 0;
374
  }
375
  }
375
  
376
  
376
  /*
377
  /*
(-)src/xine-engine/events.c (+4 lines)
Lines 183-188 Link Here
183
    xine_event_free (event);
183
    xine_event_free (event);
184
  }
184
  }
185
185
186
  pthread_mutex_destroy(&queue->lock);
187
  pthread_cond_destroy(&queue->new_event);
188
  pthread_cond_destroy(&queue->events_processed);
189
186
  free (queue);
190
  free (queue);
187
}
191
}
188
192
(-)src/xine-engine/load_plugins.c (-8 / +13 lines)
Lines 1-5 Link Here
1
/*
1
/*
2
 * Copyright (C) 2000-2004 the xine project
2
 * Copyright (C) 2000-2005 the xine project
3
 *
3
 *
4
 * This file is part of xine, a free video player.
4
 * This file is part of xine, a free video player.
5
 *
5
 *
Lines 32-38 Link Here
32
#include <sys/types.h>
32
#include <sys/types.h>
33
#include <sys/stat.h>
33
#include <sys/stat.h>
34
#include <unistd.h>
34
#include <unistd.h>
35
#ifdef HAVE_DIRENT_H
35
#include <dirent.h>
36
#include <dirent.h>
37
#endif
36
#include <dlfcn.h>
38
#include <dlfcn.h>
37
#include <string.h>
39
#include <string.h>
38
#include <errno.h>
40
#include <errno.h>
Lines 536-554 Link Here
536
    str[path_len + 1] = '\0';
538
    str[path_len + 1] = '\0';
537
539
538
    while ((pEntry = readdir (dir)) != NULL) {
540
    while ((pEntry = readdir (dir)) != NULL) {
539
      size_t new_str_size;
541
      size_t new_str_size, d_len;
540
      void *lib = NULL;
542
      void *lib = NULL;
541
      plugin_info_t *info = NULL;
543
      plugin_info_t *info = NULL;
542
      
544
      
543
      struct stat statbuffer;
545
      struct stat statbuffer;
544
546
545
      new_str_size = path_len + pEntry->d_reclen + 2;
547
      d_len = strlen(pEntry->d_name);
548
      new_str_size = path_len + d_len + 2;
546
      if (str_size < new_str_size) {
549
      if (str_size < new_str_size) {
547
	str_size = new_str_size + new_str_size / 2;
550
	str_size = new_str_size + new_str_size / 2;
548
	str = realloc(str, str_size);
551
	str = realloc(str, str_size);
549
      }
552
      }
550
553
551
      xine_fast_memcpy(&str[path_len + 1], pEntry->d_name, pEntry->d_reclen + 1);
554
      xine_fast_memcpy(&str[path_len + 1], pEntry->d_name, d_len + 1);
552
555
553
      if (stat(str, &statbuffer)) {
556
      if (stat(str, &statbuffer)) {
554
	xine_log (this, XINE_LOG_PLUGIN, _("load_plugins: unable to stat %s\n"), str);
557
	xine_log (this, XINE_LOG_PLUGIN, _("load_plugins: unable to stat %s\n"), str);
Lines 1085-1105 Link Here
1085
  if ((pluginpath = getenv("XINE_PLUGIN_PATH")) != NULL) {
1088
  if ((pluginpath = getenv("XINE_PLUGIN_PATH")) != NULL) {
1086
    pluginpath = strdup(pluginpath);
1089
    pluginpath = strdup(pluginpath);
1087
  } else {
1090
  } else {
1088
    char *str1, *str2;
1091
    const char *str1, *str2;
1089
    int len;
1092
    int len;
1090
1093
1091
    str1 = "~/.xine/plugins";
1094
    str1 = "~/.xine/plugins";
1092
    str2 = XINE_PLUGINDIR;
1095
    str2 = XINE_PLUGINDIR;
1093
    len = strlen(str1) + strlen(str2) + 2;
1096
    len = strlen(str1) + strlen(str2) + 2;
1094
    pluginpath = xine_xmalloc(len);
1097
    pluginpath = xine_xmalloc(len);
1095
    snprintf(pluginpath, len, "%s:%s", str1, str2);
1098
    snprintf(pluginpath, len, "%s" XINE_DIRECTORY_SEPARATOR_STRING "%s", str1, str2);
1096
  }
1099
  }
1097
  plugindir = xine_xmalloc(strlen(pluginpath)+strlen(homedir)+2);
1100
  plugindir = xine_xmalloc(strlen(pluginpath)+strlen(homedir)+2);
1098
  j=0;
1101
  j=0;
1099
  lenpluginpath = strlen(pluginpath);
1102
  lenpluginpath = strlen(pluginpath);
1100
  for (i=0; i <= lenpluginpath; ++i){
1103
  for (i=0; i <= lenpluginpath; ++i){
1101
    switch (pluginpath[i]){
1104
    switch (pluginpath[i]){
1102
    case ':':
1105
    case XINE_DIRECTORY_SEPARATOR_CHAR:
1103
    case '\0':
1106
    case '\0':
1104
      plugindir[j] = '\0';
1107
      plugindir[j] = '\0';
1105
      collect_plugins(this, plugindir);
1108
      collect_plugins(this, plugindir);
Lines 2492-2498 Link Here
2492
2495
2493
    for (i = 0; this->plugin_catalog->prio_desc[i]; i++)
2496
    for (i = 0; this->plugin_catalog->prio_desc[i]; i++)
2494
      free(this->plugin_catalog->prio_desc[i]);
2497
      free(this->plugin_catalog->prio_desc[i]);
2495
    
2498
2499
    pthread_mutex_destroy(&this->plugin_catalog->lock);
2500
2496
    free (this->plugin_catalog);
2501
    free (this->plugin_catalog);
2497
  }
2502
  }
2498
}
2503
}
(-)src/xine-engine/metronom.h (-1 lines)
Lines 202-208 Link Here
202
  int             discontinuity_handled_count;
202
  int             discontinuity_handled_count;
203
  pthread_cond_t  video_discontinuity_reached;
203
  pthread_cond_t  video_discontinuity_reached;
204
  pthread_cond_t  audio_discontinuity_reached;
204
  pthread_cond_t  audio_discontinuity_reached;
205
  pthread_cond_t  cancel;
206
205
207
  int             force_video_jump;
206
  int             force_video_jump;
208
  int             force_audio_jump;
207
  int             force_audio_jump;
(-)src/xine-engine/osd.c (-1 / +3 lines)
Lines 1-5 Link Here
1
/*
1
/*
2
 * Copyright (C) 2000-2004 the xine project
2
 * Copyright (C) 2000-2005 the xine project
3
 * 
3
 * 
4
 * This file is part of xine, a free video player.
4
 * This file is part of xine, a free video player.
5
 * 
5
 * 
Lines 31-37 Link Here
31
#include <stdio.h>
31
#include <stdio.h>
32
#include <zlib.h>
32
#include <zlib.h>
33
#include <sys/types.h>
33
#include <sys/types.h>
34
#ifdef HAVE_DIRENT_H
34
#include <dirent.h>
35
#include <dirent.h>
36
#endif
35
#include <errno.h>
37
#include <errno.h>
36
38
37
#ifdef HAVE_ICONV
39
#ifdef HAVE_ICONV
(-)src/xine-engine/video_decoder.c (-4 / +6 lines)
Lines 1-5 Link Here
1
/* 
1
/* 
2
 * Copyright (C) 2000-2004 the xine project
2
 * Copyright (C) 2000-2005 the xine project
3
 *
3
 *
4
 * This file is part of xine, a free video player.
4
 * This file is part of xine, a free video player.
5
 * 
5
 * 
Lines 220-226 Link Here
220
220
221
      pthread_cond_broadcast (&stream->counter_changed);
221
      pthread_cond_broadcast (&stream->counter_changed);
222
222
223
      if (stream->audio_thread) {
223
      if (stream->audio_thread_created) {
224
224
225
        while (stream->finished_count_video > stream->finished_count_audio) {
225
        while (stream->finished_count_video > stream->finished_count_audio) {
226
          struct timeval tv;
226
          struct timeval tv;
Lines 500-506 Link Here
500
    pth_params.sched_priority = sched_get_priority_min(SCHED_OTHER);
500
    pth_params.sched_priority = sched_get_priority_min(SCHED_OTHER);
501
    pthread_attr_setschedparam(&pth_attrs, &pth_params);
501
    pthread_attr_setschedparam(&pth_attrs, &pth_params);
502
    pthread_attr_setscope(&pth_attrs, PTHREAD_SCOPE_SYSTEM);
502
    pthread_attr_setscope(&pth_attrs, PTHREAD_SCOPE_SYSTEM);
503
    
503
504
    stream->video_thread_created = 1;
504
    if ((err = pthread_create (&stream->video_thread,
505
    if ((err = pthread_create (&stream->video_thread,
505
                               &pth_attrs, video_decoder_loop, stream)) != 0) {
506
                               &pth_attrs, video_decoder_loop, stream)) != 0) {
506
      fprintf (stderr, "video_decoder: can't create new thread (%s)\n",
507
      fprintf (stderr, "video_decoder: can't create new thread (%s)\n",
Lines 519-525 Link Here
519
520
520
  lprintf ("shutdown...\n");
521
  lprintf ("shutdown...\n");
521
522
522
  if (stream->video_thread) {
523
  if (stream->video_thread_created) {
523
524
524
    /* stream->video_fifo->clear(stream->video_fifo); */
525
    /* stream->video_fifo->clear(stream->video_fifo); */
525
526
Lines 533-538 Link Here
533
    lprintf ("shutdown...3\n");
534
    lprintf ("shutdown...3\n");
534
535
535
    pthread_join (stream->video_thread, &p);
536
    pthread_join (stream->video_thread, &p);
537
    stream->video_thread_created = 0;
536
538
537
    lprintf ("shutdown...4\n");
539
    lprintf ("shutdown...4\n");
538
540
(-)src/xine-engine/xine.c (-4 / +5 lines)
Lines 1-5 Link Here
1
/*
1
/*
2
 * Copyright (C) 2000-2004 the xine project
2
 * Copyright (C) 2000-2005 the xine project
3
 * 
3
 * 
4
 * This file is part of xine, a free video player.
4
 * This file is part of xine, a free video player.
5
 * 
5
 * 
Lines 232-237 Link Here
232
  pthread_mutex_init(&port_ticket->lock, NULL);
232
  pthread_mutex_init(&port_ticket->lock, NULL);
233
  pthread_mutex_init(&port_ticket->revoke_lock, NULL);
233
  pthread_mutex_init(&port_ticket->revoke_lock, NULL);
234
  pthread_cond_init(&port_ticket->issued, NULL);
234
  pthread_cond_init(&port_ticket->issued, NULL);
235
  pthread_cond_init(&port_ticket->revoked, NULL);
235
  
236
  
236
  return port_ticket;
237
  return port_ticket;
237
}
238
}
Lines 288-294 Link Here
288
  /*
289
  /*
289
   * stop demux
290
   * stop demux
290
   */
291
   */
291
  if (stream->demux_plugin && stream->demux_thread) {
292
  if (stream->demux_plugin && stream->demux_thread_created) {
292
    lprintf ("stopping demux\n");
293
    lprintf ("stopping demux\n");
293
    _x_demux_stop_thread( stream );
294
    _x_demux_stop_thread( stream );
294
    lprintf ("demux stopped\n");
295
    lprintf ("demux stopped\n");
Lines 1341-1347 Link Here
1341
#if defined(WIN32)
1342
#if defined(WIN32)
1342
  WSACleanup();
1343
  WSACleanup();
1343
#endif
1344
#endif
1344
  
1345
1345
  free (this);
1346
  free (this);
1346
}
1347
}
1347
1348
Lines 1352-1358 Link Here
1352
#ifdef WIN32
1353
#ifdef WIN32
1353
    WSADATA Data;
1354
    WSADATA Data;
1354
    int i_err;
1355
    int i_err;
1355
#endif /*  WIN32 */
1356
#endif
1356
1357
1357
  this = xine_xmalloc (sizeof (xine_t));
1358
  this = xine_xmalloc (sizeof (xine_t));
1358
  if (!this)
1359
  if (!this)
(-)src/xine-engine/xine_internal.h (-1 / +4 lines)
Lines 1-5 Link Here
1
/*
1
/*
2
 * Copyright (C) 2000-2004 the xine project
2
 * Copyright (C) 2000-2005 the xine project
3
 * 
3
 * 
4
 * This file is part of xine, a free video player.
4
 * This file is part of xine, a free video player.
5
 * 
5
 * 
Lines 248-259 Link Here
248
248
249
/*  vo_driver_t               *video_driver;*/
249
/*  vo_driver_t               *video_driver;*/
250
  pthread_t                  video_thread;
250
  pthread_t                  video_thread;
251
  int                        video_thread_created;
251
  video_decoder_t           *video_decoder_plugin;
252
  video_decoder_t           *video_decoder_plugin;
252
  int                        video_decoder_streamtype;
253
  int                        video_decoder_streamtype;
253
  extra_info_t              *video_decoder_extra_info;
254
  extra_info_t              *video_decoder_extra_info;
254
  int                        video_channel;
255
  int                        video_channel;
255
  
256
  
256
  pthread_t                  audio_thread;
257
  pthread_t                  audio_thread;
258
  int                        audio_thread_created;
257
  audio_decoder_t           *audio_decoder_plugin;
259
  audio_decoder_t           *audio_decoder_plugin;
258
  int                        audio_decoder_streamtype;
260
  int                        audio_decoder_streamtype;
259
  extra_info_t              *audio_decoder_extra_info;
261
  extra_info_t              *audio_decoder_extra_info;
Lines 308-313 Link Here
308
  
310
  
309
  /* demux thread stuff */
311
  /* demux thread stuff */
310
  pthread_t                  demux_thread;
312
  pthread_t                  demux_thread;
313
  int                        demux_thread_created;
311
  int                        demux_thread_running;
314
  int                        demux_thread_running;
312
  pthread_mutex_t            demux_lock;
315
  pthread_mutex_t            demux_lock;
313
  int                        demux_action_pending;
316
  int                        demux_action_pending;
(-)src/xine-utils/utils.c (-82 / +98 lines)
Lines 1-5 Link Here
1
/*
1
/*
2
 * Copyright (C) 2000-2004 the xine project
2
 * Copyright (C) 2000-2005 the xine project
3
 * 
3
 * 
4
 * This file is part of xine, a free video player.
4
 * This file is part of xine, a free video player.
5
 * 
5
 * 
Lines 55-60 Link Here
55
#endif
55
#endif
56
56
57
#if defined(__CYGWIN__) || defined(WIN32)
57
#if defined(__CYGWIN__) || defined(WIN32)
58
#include <ctype.h>
58
#include <windows.h>
59
#include <windows.h>
59
#endif
60
#endif
60
61
Lines 267-356 Link Here
267
  return ptr;
268
  return ptr;
268
}
269
}
269
270
270
#if defined(__CYGWIN__) || defined(WIN32)
271
#ifdef WIN32
271
272
/*
272
/* Ridiculous hack to return valid xine support
273
 * Parse command line with Windows XP syntax and copy the command (argv[0]).
273
 * directories. These should be read from
274
 * a registry entry set at install time.
275
 */
274
 */
275
static size_t xine_strcpy_command(const char *cmdline, char *cmd, size_t maxlen) {
276
  size_t i, j;
276
277
277
char *exec_path_append_subdir(char *string) {
278
  i = 0;
278
  static char tmp_win32_path[1024] = "\0";
279
  j = 0;
279
  char *back_slash;
280
  while (cmdline[i] && isspace(cmdline[i])) i++;
280
  char *fore_slash;
281
281
  char *last_slash;
282
  while (cmdline[i] && !isspace(cmdline[i]) && j + 2 < maxlen) {
282
283
    switch (cmdline[i]) {
283
  /* first run - fill out dll path */
284
    case '\"':
284
  if (!*tmp_win32_path) {
285
      i++;
285
    char *tmpchar;
286
      while (cmdline[i] && cmdline[i] != '\"') {
286
    char *cmdline;
287
        if (cmdline[i] == '\\') {
287
288
          i++;
288
    /* get program exec command line */
289
          if (cmdline[i] == '\"') cmd[j++] = '\"';
289
    cmdline = GetCommandLine();
290
          else {
290
291
            cmd[j++] = '\\';
291
    /* check for " at beginning of string */
292
            cmd[j++] = cmdline[i];
292
    if( *cmdline == '\"' ) {
293
          }
293
      /* copy command line, skip first quote */
294
        } else cmd[j++] = cmdline[i];
294
      strncpy(tmp_win32_path, cmdline + 1, sizeof(tmp_win32_path));
295
        if (cmdline[i]) i++;
295
      tmp_win32_path[sizeof(tmp_win32_path) - 1] = '\0';
296
      }
296
297
      break;
297
      /* terminate at second set of quotes */
298
      tmpchar = strchr(tmp_win32_path, '\"');
299
      if (tmpchar) *tmpchar = 0;
300
    } else {
301
      /* copy command line */
302
      strncpy(tmp_win32_path, cmdline, sizeof(tmp_win32_path));
303
      tmp_win32_path[sizeof(tmp_win32_path) - 1] = '\0';
304
305
      /* terminate at first space */
306
      tmpchar = strchr(tmp_win32_path, ' ');
307
      if (tmpchar) *tmpchar = 0;
308
    }
309
  }
310
311
  /* find the last occurance of a back
312
   * slash or fore slash 
313
   */
314
  back_slash = strrchr(tmp_win32_path, '\\');
315
  fore_slash = strrchr(tmp_win32_path, '/');
316
298
317
  /* make sure the last back slash was not
299
    case '\\':
318
   * after a drive letter 
300
      i++;
319
   */
301
      if (cmdline[i] == '\"') cmd[j++] = '\"';
320
  if(back_slash > tmp_win32_path)
302
      else {
321
    if(*( back_slash - 1 ) == ':')
303
        cmd[j++] = '\\';
322
      back_slash = 0;
304
        i--;
323
305
      }
324
  /* which slash was the latter slash */
306
      break;
325
  if(back_slash > fore_slash)
326
    last_slash = back_slash;
327
  else
328
    last_slash = fore_slash;
329
307
330
  /* detect if we had a relative or
308
    default:
331
   * distiguished path ( had a slash )
309
      cmd[j++] = cmdline[i];
332
   */
333
  if(last_slash) {
334
    /* we had a slash charachter in our
335
     * command line
336
     */
337
    *(last_slash + 1) = 0;
338
339
    /* if had a string to append to the path */
340
    if(string)
341
      strncat(tmp_win32_path, string, sizeof(tmp_win32_path) - strlen(tmp_win32_path) - 1);
342
  } else {
343
    if(string) {
344
    /* if had a string to append to the path */
345
      strncpy(tmp_win32_path, string, sizeof(tmp_win32_path));
346
      tmp_win32_path[sizeof(tmp_win32_path) - 1] = '\0';
347
    } else {
348
    /* no slash, assume local directory */
349
      strcpy(tmp_win32_path, ".");
350
    }
310
    }
311
312
    i++;
351
  }
313
  }
314
  cmd[j] = '\0';
352
315
353
  return tmp_win32_path;
316
  return j;
354
}
317
}
355
#endif
318
#endif
356
319
Lines 359-369 Link Here
359
#endif
322
#endif
360
323
361
const char *xine_get_homedir(void) {
324
const char *xine_get_homedir(void) {
362
363
#ifdef WIN32
325
#ifdef WIN32
364
  return exec_path_append_subdir(NULL);
326
  static char homedir[1024] = {0, };
365
#else
327
  char *s;
328
  int len;
329
330
  if (!homedir[0]) {
331
    len = xine_strcpy_command(GetCommandLine(), homedir, sizeof(homedir));
332
    s = strdup(homedir);
333
    GetFullPathName(s, sizeof(homedir), homedir, NULL);
334
    free(s);
335
    if ((s = strrchr(homedir, '\\'))) *s = '\0';
336
  }
366
337
338
  return homedir;
339
#else
367
  struct passwd pwd, *pw = NULL;
340
  struct passwd pwd, *pw = NULL;
368
  static char homedir[BUFSIZ] = {0,};
341
  static char homedir[BUFSIZ] = {0,};
369
342
Lines 393-401 Link Here
393
  }
366
  }
394
367
395
  return homedir;
368
  return homedir;
396
#endif /* _MSC_VER */
369
#endif /* WIN32 */
370
}
371
372
#if defined(WIN32) || defined(__CYGWIN__)
373
static void xine_get_rootdir(char *rootdir, size_t maxlen) {
374
  char *s;
375
376
  strncpy(rootdir, xine_get_homedir(), maxlen - 1);
377
  rootdir[maxlen - 1] = '\0';
378
  if ((s = strrchr(rootdir, XINE_SUBDIRECTORY_SEPARATOR_CHAR))) *s = '\0';
397
}
379
}
398
380
381
const char *xine_get_plugindir(void) {
382
  static char plugindir[1024] = {0, };
383
384
  if (!plugindir[0]) {
385
    xine_get_rootdir(plugindir, sizeof(plugindir) - strlen(XINE_REL_PLUGINDIR) - 1);
386
    strcat(plugindir, XINE_SUBDIRECTORY_SEPARATOR_STRING XINE_REL_PLUGINDIR);
387
  }
388
389
  return plugindir;
390
}
391
392
const char *xine_get_fontdir(void) {
393
  static char fontdir[1024] = {0, };
394
395
  if (!fontdir[0]) {
396
    xine_get_rootdir(fontdir, sizeof(fontdir) - strlen(XINE_REL_FONTDIR) - 1);
397
    strcat(fontdir, XINE_SUBDIRECTORY_SEPARATOR_STRING XINE_REL_FONTDIR);
398
  }
399
400
  return fontdir;
401
}
402
403
const char *xine_get_localedir(void) {
404
  static char localedir[1024] = {0, };
405
406
  if (!localedir[0]) {
407
    xine_get_rootdir(localedir, sizeof(localedir) - strlen(XINE_REL_LOCALEDIR) - 1);
408
    strcat(localedir, XINE_SUBDIRECTORY_SEPARATOR_STRING XINE_REL_LOCALEDIR);
409
  }
410
411
  return localedir;
412
}
413
#endif
414
399
char *xine_chomp(char *str) {
415
char *xine_chomp(char *str) {
400
  char *pbuf;
416
  char *pbuf;
401
417
(-)src/xine-utils/xineutils.h (-5 / +14 lines)
Lines 1-5 Link Here
1
/*
1
/*
2
 * Copyright (C) 2000-2004 the xine project
2
 * Copyright (C) 2000-2005 the xine project
3
 *
3
 *
4
 * This file is part of xine, a free video player.
4
 * This file is part of xine, a free video player.
5
 *
5
 *
Lines 59-64 Link Here
59
59
60
#include <stdio.h>
60
#include <stdio.h>
61
#include <string.h>
61
#include <string.h>
62
/* for alloca under MinGW */
63
#ifdef HAVE_MALLOC_H
64
#include <malloc.h>
65
#endif
62
66
63
  /*
67
  /*
64
   * debugable mutexes
68
   * debugable mutexes
Lines 638-643 Link Here
638
 */
642
 */
639
const char *xine_get_homedir(void);
643
const char *xine_get_homedir(void);
640
644
645
#if defined(WIN32) || defined(__CYGWIN__)
646
/*
647
 * Get other xine directories.
648
 */
649
const char *xine_get_plugindir(void);
650
const char *xine_get_fontdir(void);
651
const char *xine_get_localedir(void);
652
#endif
653
641
/*
654
/*
642
 * Clean a string (remove spaces and '=' at the begin,
655
 * Clean a string (remove spaces and '=' at the begin,
643
 * and '\n', '\r' and spaces at the end.
656
 * and '\n', '\r' and spaces at the end.
Lines 1031-1040 Link Here
1031
 */
1044
 */
1032
const char *xine_guess_spu_encoding(void);
1045
const char *xine_guess_spu_encoding(void);
1033
1046
1034
#if defined(__CYGWIN__) || defined(WIN32)
1035
char *exec_path_append_subdir(char * string);
1036
#endif
1037
1038
/*
1047
/*
1039
 * use the best clock reference (API compatible with gettimeofday)
1048
 * use the best clock reference (API compatible with gettimeofday)
1040
 * note: it will be a monotonic clock, if available.
1049
 * note: it will be a monotonic clock, if available.

Return to bug 120088