mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-09-28 23:02:22 +00:00
Merge from HEAD to BRANCH-GOBJECT1 at 200106241
Original commit message from CVS: Merge from HEAD to BRANCH-GOBJECT1 at 200106241
This commit is contained in:
parent
d49fa5958b
commit
ba1e26a03b
93 changed files with 2501 additions and 13829 deletions
|
@ -3,8 +3,6 @@ When using GPL linked plugins GStreamer is for all practical reasons under the G
|
||||||
|
|
||||||
The plugins which use a GPL library are as follows:
|
The plugins which use a GPL library are as follows:
|
||||||
cdparanoia libcdparanoia (http://www.xiph.org/paranoia/)
|
cdparanoia libcdparanoia (http://www.xiph.org/paranoia/)
|
||||||
lame libmp3lame (http://www.mp3dev.org/mp3/)
|
|
||||||
icastsend libshout (http://www.icecast.org)
|
|
||||||
aasink aalib (http://aa-project.sourceforge.net/aalib/)
|
aasink aalib (http://aa-project.sourceforge.net/aalib/)
|
||||||
gst1394 libraw1394 (http://linux1394.sourceforge.net)
|
gst1394 libraw1394 (http://linux1394.sourceforge.net)
|
||||||
xmms libxmms (http://www.xmms.org)
|
xmms libxmms (http://www.xmms.org)
|
||||||
|
@ -19,6 +17,8 @@ sdlsink libsdl (http://www.libsdl.org)
|
||||||
gnomevfssource gnome-vfs (ftp.gnome.org//pub/GNOME/stable/sources/gnome-vfs)
|
gnomevfssource gnome-vfs (ftp.gnome.org//pub/GNOME/stable/sources/gnome-vfs)
|
||||||
gnomevfssink gnome-vfs
|
gnomevfssink gnome-vfs
|
||||||
esdsink libesd (ftp.gnome.org/pub/GNOME/stable/sources/esound)
|
esdsink libesd (ftp.gnome.org/pub/GNOME/stable/sources/esound)
|
||||||
|
icastsend libshout (http://www.icecast.org)
|
||||||
|
lame libmp3lame (http://www.mp3dev.org/mp3/)
|
||||||
|
|
||||||
Plugins which use a BSD covered library are as follows:
|
Plugins which use a BSD covered library are as follows:
|
||||||
vorbisenc libogg/libvorbis (http://www.xiph.org/ogg/vorbis)
|
vorbisenc libogg/libvorbis (http://www.xiph.org/ogg/vorbis)
|
||||||
|
|
13
REQUIREMENTS
13
REQUIREMENTS
|
@ -50,11 +50,11 @@ librtp (for the rtp sink plugin, shipped with Gnome-O-Phone)
|
||||||
aalib (for the aa sink plugin)
|
aalib (for the aa sink plugin)
|
||||||
http://aa-project.sourceforge.net/aalib/
|
http://aa-project.sourceforge.net/aalib/
|
||||||
aRts (for the arts plugin wrapper, and the artsd sink)
|
aRts (for the arts plugin wrapper, and the artsd sink)
|
||||||
http://www.arts-project.org/
|
http://www.arts-project.org
|
||||||
raw1394/linux1394 (for the dv plugin)
|
raw1394/linux1394 (for the dv plugin)
|
||||||
http://linux1394.sourceforge.net/
|
http://linux1394.sourceforge.net
|
||||||
decss (for the dvdsrc)
|
decss (for the dvdsrc)
|
||||||
huh, I don't know, sorry (FIXME)
|
http://www.linuxrising.com/dvd-munitions_tar.gz
|
||||||
libesound (for the esd sink
|
libesound (for the esd sink
|
||||||
ftp.gnome.org/pub/GNOME/stable/sources/esound)
|
ftp.gnome.org/pub/GNOME/stable/sources/esound)
|
||||||
gnome-vfs (for the gnome-vfs src)
|
gnome-vfs (for the gnome-vfs src)
|
||||||
|
@ -67,9 +67,10 @@ xmms (for the xmms plugins wrapper)
|
||||||
mpeg2dec/ac3dec (for mpeg2 related plugins and dvd playback)
|
mpeg2dec/ac3dec (for mpeg2 related plugins and dvd playback)
|
||||||
http://linuxvideo.org/mpeg2dec/
|
http://linuxvideo.org/mpeg2dec/
|
||||||
and http://linuxvideo.org/ac3dec/
|
and http://linuxvideo.org/ac3dec/
|
||||||
|
avifile (for the avi windows decoder plugins
|
||||||
for AVI playback you might want to get the windows libraries from
|
you might want to get the windows libraries
|
||||||
http://divx.euro.ru/ and put the .dll files in /usr/lib/win32/
|
from http://divx.euro.ru/ and put the .dll files
|
||||||
|
in /usr/lib/win32/)
|
||||||
|
|
||||||
An extra set of tools is required if you wish to build GStreamer out of
|
An extra set of tools is required if you wish to build GStreamer out of
|
||||||
CVS (using autogen.sh):
|
CVS (using autogen.sh):
|
||||||
|
|
|
@ -11,8 +11,8 @@
|
||||||
#undef USE_GLIB2
|
#undef USE_GLIB2
|
||||||
|
|
||||||
#undef PLUGINS_DIR
|
#undef PLUGINS_DIR
|
||||||
#undef PLUGINS_SRCDIR
|
#undef PLUGINS_BUILDDIR
|
||||||
#undef PLUGINS_USE_SRCDIR
|
#undef PLUGINS_USE_BUILDDIR
|
||||||
|
|
||||||
#undef GST_CONFIG_DIR
|
#undef GST_CONFIG_DIR
|
||||||
#undef GST_WIN32_LIBDIR
|
#undef GST_WIN32_LIBDIR
|
||||||
|
|
|
@ -185,7 +185,7 @@ rm -f config.cache
|
||||||
# The new configure options for busy application developers (Hadess)
|
# The new configure options for busy application developers (Hadess)
|
||||||
#./configure --enable-maintainer-mode --enable-debug --enable-debug-verbose
|
#./configure --enable-maintainer-mode --enable-debug --enable-debug-verbose
|
||||||
|
|
||||||
./configure --enable-maintainer-mode --enable-plugin-srcdir --enable-debug --enable-debug-verbose "$@" || {
|
./configure --enable-maintainer-mode --enable-plugin-builddir --enable-debug --enable-debug-verbose "$@" || {
|
||||||
echo
|
echo
|
||||||
echo "configure failed"
|
echo "configure failed"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
104
configure.base
104
configure.base
|
@ -247,20 +247,40 @@ dnl Next, check for the optional libraries:
|
||||||
dnl =======================================
|
dnl =======================================
|
||||||
|
|
||||||
|
|
||||||
dnl Check for libesd
|
|
||||||
esd_save_LIBS=$LIBS
|
dnl ***** ESound *****
|
||||||
esd_save_CFLAGS=$CFLAGS
|
|
||||||
AM_PATH_ESD(0.2.12, HAVE_LIBESD=yes, HAVE_LIBESD=no)
|
dnl *** First, the --enable-esd arg
|
||||||
LIBS=$esd_save_LIBS
|
AC_ARG_ENABLE(esd,
|
||||||
CFLAGS=$esd_save_CFLAGS
|
[ --enable-esd enable esound plugins: esdsrc, esdsink],
|
||||||
AC_ARG_ENABLE(esdsink,
|
[ case "${enableval}" in
|
||||||
[ --enable-esdsink enable the building of the esdsink],
|
yes) USE_LIBESD=yes ;;
|
||||||
[case "${enableval}" in
|
no) USE_LIBESD=no ;;
|
||||||
yes) : ;;
|
*) AC_MSG_ERROR(bad value ${enableval} for --enable-esd) ;;
|
||||||
no) HAVE_LIBESD=no ;;
|
|
||||||
*) AC_MSG_ERROR(bad value ${enableval} for --enable-esdsink) ;;
|
|
||||||
esac],
|
esac],
|
||||||
[HAVE_LIBESD=$HAVE_LIBESD])
|
[ USE_LIBESD=yes ]) dnl DEFAULT
|
||||||
|
dnl *** If it's enabled
|
||||||
|
if test x$USE_LIBESD = xyes; then
|
||||||
|
esd_save_LIBS=$LIBS
|
||||||
|
esd_save_CFLAGS=$CFLAGS
|
||||||
|
AM_PATH_ESD(0.2.12, HAVE_LIBESD=yes, HAVE_LIBESD=no)
|
||||||
|
LIBS=$esd_save_LIBS
|
||||||
|
CFLAGS=$esd_save_CFLAGS
|
||||||
|
|
||||||
|
dnl If it isn't found, unset USE_LIBESD
|
||||||
|
if test x$HAVE_LIBESD = xno; then
|
||||||
|
USE_LIBESD=yes
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
dnl *** Warn if it's disabled or not found
|
||||||
|
if test x$USE_LIBESD = xno; then
|
||||||
|
AC_MSG_WARN(
|
||||||
|
***** NOTE: These plugins won't be built: esdsink
|
||||||
|
)
|
||||||
|
fi
|
||||||
|
dnl *** Define the conditional as appropriate
|
||||||
|
AM_CONDITIONAL(USE_LIBESD, test x$USE_LIBESD = xyes)
|
||||||
|
|
||||||
|
|
||||||
dnl Check for artsc
|
dnl Check for artsc
|
||||||
AC_PATH_PROG(ARTSC_CONFIG, artsc-config, no)
|
AC_PATH_PROG(ARTSC_CONFIG, artsc-config, no)
|
||||||
|
@ -335,25 +355,34 @@ dnl AM_PATH_XMMS(0.1.0, HAVE_LIBXMMS=yes, HAVE_LIBXMMS=no)
|
||||||
|
|
||||||
|
|
||||||
dnl Check for libasound
|
dnl Check for libasound
|
||||||
alsa_save_LIBS=$LIBS
|
dnl alsa_save also used in ALSA macro, use our own namespace
|
||||||
alsa_save_CFLAGS=$CFLAGS
|
gst_alsa_save_LIBS=$LIBS
|
||||||
|
gst_alsa_save_LDFLAGS=$LDFLAGS
|
||||||
|
gst_alsa_save_CFLAGS=$CFLAGS
|
||||||
AM_PATH_ALSA(0.5.0,
|
AM_PATH_ALSA(0.5.0,
|
||||||
HAVE_LIBASOUND=yes,
|
HAVE_LIBASOUND=yes,
|
||||||
HAVE_LIBASOUND=no
|
HAVE_LIBASOUND=no
|
||||||
AC_MSG_WARN(
|
AC_MSG_WARN(
|
||||||
***** NOTE: These plugins won't be built: gstalsa
|
***** NOTE: These plugins won't be built: gstalsa
|
||||||
))
|
))
|
||||||
|
LIBS=$gst_alsa_save_LIBS
|
||||||
|
LDFLAGS=$gst_alsa_save_LDFLAGS
|
||||||
|
CFLAGS=$gst_alsa_save_CFLAGS
|
||||||
if test x$HAVE_LIBASOUND = xyes;then
|
if test x$HAVE_LIBASOUND = xyes;then
|
||||||
|
gst_alsa_save_LIBS=$LIBS
|
||||||
|
gst_alsa_save_LDFLAGS=$LDFLAGS
|
||||||
|
gst_alsa_save_CFLAGS=$CFLAGS
|
||||||
AM_PATH_ALSA(0.9.0,
|
AM_PATH_ALSA(0.9.0,
|
||||||
HAVE_LIBASOUND=no
|
HAVE_LIBASOUND=no
|
||||||
AC_MSG_WARN(Alsa 0.9.x not yet supported.
|
AC_MSG_WARN(Alsa 0.9.x not yet supported.
|
||||||
***** NOTE: These plugins won't be built: gstalsa
|
***** NOTE: These plugins won't be built: gstalsa
|
||||||
)
|
)
|
||||||
,:)
|
,:)
|
||||||
|
LIBS=$gst_alsa_save_LIBS
|
||||||
|
LDFLAGS=$gst_alsa_save_LDFLAGS
|
||||||
|
CFLAGS=$gst_alsa_save_CFLAGS
|
||||||
fi
|
fi
|
||||||
|
|
||||||
LIBS=$alsa_save_LIBS
|
|
||||||
CFLAGS=$alsa_save_CFLAGS
|
|
||||||
AC_ARG_ENABLE(alsasink,
|
AC_ARG_ENABLE(alsasink,
|
||||||
[ --enable-alsasink enable the building of the alsasink],
|
[ --enable-alsasink enable the building of the alsasink],
|
||||||
[case "${enableval}" in
|
[case "${enableval}" in
|
||||||
|
@ -644,7 +673,7 @@ AC_CHECK_HEADER(cdda_paranoia.h, :, HAVE_CDPARANOIA=no)
|
||||||
|
|
||||||
dnl Check for liblame
|
dnl Check for liblame
|
||||||
AC_MSG_CHECKING(LAME library)
|
AC_MSG_CHECKING(LAME library)
|
||||||
AC_CHECK_LIB(mp3lame, lame_init, HAVE_LIBLAME=yes, HAVE_LIBLAME=no, )
|
AC_CHECK_LIB(mp3lame, lame_init, HAVE_LIBLAME=yes, HAVE_LIBLAME=no, -lm)
|
||||||
AC_CHECK_HEADER(lame/lame.h, :, HAVE_LIBLAME=no)
|
AC_CHECK_HEADER(lame/lame.h, :, HAVE_LIBLAME=no)
|
||||||
|
|
||||||
dnl Check for libshout
|
dnl Check for libshout
|
||||||
|
@ -672,7 +701,10 @@ AC_CHECK_HEADER(libraw1394/raw1394.h, :, HAVE_RAW1394=no)
|
||||||
dnl Check for libdv
|
dnl Check for libdv
|
||||||
AC_MSG_CHECKING(libdv)
|
AC_MSG_CHECKING(libdv)
|
||||||
AC_CHECK_LIB(dv, dv_init, HAVE_LIBDV=yes, HAVE_LIBDV=no, -lm $GLIB_LIBS $GLIB_CFLAGS)
|
AC_CHECK_LIB(dv, dv_init, HAVE_LIBDV=yes, HAVE_LIBDV=no, -lm $GLIB_LIBS $GLIB_CFLAGS)
|
||||||
|
libdvcheck_save_CPPFLAGS="$CPPFLAGS"
|
||||||
|
CPPFLAGS="$CPPFLAGS $GLIB_CFLAGS"
|
||||||
AC_CHECK_HEADER(libdv/dv.h, :, HAVE_LIBDV=no)
|
AC_CHECK_HEADER(libdv/dv.h, :, HAVE_LIBDV=no)
|
||||||
|
CPPFLAGS="$libdvcheck_save_CPPFLAGS"
|
||||||
|
|
||||||
dnl Check for aalib
|
dnl Check for aalib
|
||||||
AC_MSG_CHECKING(aalib)
|
AC_MSG_CHECKING(aalib)
|
||||||
|
@ -705,13 +737,12 @@ if sdl-config --libs > /dev/null 2>&1; then
|
||||||
SDL_LIBS="`sdl-config --libs`"
|
SDL_LIBS="`sdl-config --libs`"
|
||||||
SDL_CFLAGS="`sdl-config --cflags`"
|
SDL_CFLAGS="`sdl-config --cflags`"
|
||||||
AC_CHECK_LIB(SDL, SDL_Init, :, HAVE_LIBSDL=no, $SDL_LIBS)
|
AC_CHECK_LIB(SDL, SDL_Init, :, HAVE_LIBSDL=no, $SDL_LIBS)
|
||||||
dnl FIXME: CPPFLAGS should be set from SDL_CFLAGS for the next check
|
|
||||||
dnl AC_CHECK_HEADER uses CPPFLAGS, but not CFLAGS.
|
dnl AC_CHECK_HEADER uses CPPFLAGS, but not CFLAGS.
|
||||||
dnl Assume only suitable flags result from artsc-config --cflags
|
dnl Assume only suitable flags result from artsc-config --cflags
|
||||||
CPPFLAGS="$sdlcheck_save_CPPFLAGS"
|
sdlcheck_save_CPPFLAGS="$CPPFLAGS"
|
||||||
CPPFLAGS="$CPPFLAGS $SDL_CFLAGS"
|
CPPFLAGS="$CPPFLAGS $SDL_CFLAGS"
|
||||||
AC_CHECK_HEADER(SDL.h, :, HAVE_LIBSDL=no)
|
AC_CHECK_HEADER(SDL.h, :, HAVE_LIBSDL=no)
|
||||||
sdlcheck_save_CPPFLAGS="$CPPFLAGS"
|
CPPFLAGS="$sdlcheck_save_CPPFLAGS"
|
||||||
AC_CHECK_LIB(SDL, SDL_CreateYUVOverlay, :, HAVE_LIBSDL=no, $SDL_LIBS)
|
AC_CHECK_LIB(SDL, SDL_CreateYUVOverlay, :, HAVE_LIBSDL=no, $SDL_LIBS)
|
||||||
else
|
else
|
||||||
AC_MSG_RESULT(not found)
|
AC_MSG_RESULT(not found)
|
||||||
|
@ -781,14 +812,14 @@ AC_ARG_ENABLE(atomic,
|
||||||
esac],
|
esac],
|
||||||
[USE_ATOMIC_H=$HAVE_ATOMIC_H]) dnl Default value
|
[USE_ATOMIC_H=$HAVE_ATOMIC_H]) dnl Default value
|
||||||
|
|
||||||
AC_ARG_ENABLE(plugin-srcdir,
|
AC_ARG_ENABLE(plugin-builddir,
|
||||||
[ --enable-plugin-srcdir allow tests/demos to use non-installed plugins ],
|
[ --enable-plugin-builddir allow tests/demos to use non-installed plugins ],
|
||||||
[case "${enableval}" in
|
[case "${enableval}" in
|
||||||
yes) PLUGINS_USE_SRCDIR=yes ;;
|
yes) PLUGINS_USE_BUILDDIR=yes ;;
|
||||||
no) PLUGINS_USE_SRCDIR=no ;;
|
no) PLUGINS_USE_BUILDDIR=no ;;
|
||||||
*) AC_MSG_ERROR(bad value ${enableval} for --enable-plugin-srcdir) ;;
|
*) AC_MSG_ERROR(bad value ${enableval} for --enable-plugin-builddir) ;;
|
||||||
esac],
|
esac],
|
||||||
[PLUGINS_USE_SRCDIR=no]) dnl Default value
|
[PLUGINS_USE_BUILDDIR=no]) dnl Default value
|
||||||
|
|
||||||
AC_ARG_ENABLE(debug,
|
AC_ARG_ENABLE(debug,
|
||||||
[ --enable-debug compile with -g debugging info],
|
[ --enable-debug compile with -g debugging info],
|
||||||
|
@ -927,8 +958,8 @@ if test "x$USE_ATOMIC_H" = xyes; then
|
||||||
AC_DEFINE(HAVE_ATOMIC_H, 1, [Define if atomic.h header file is available])
|
AC_DEFINE(HAVE_ATOMIC_H, 1, [Define if atomic.h header file is available])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "x$PLUGINS_USE_SRCDIR" = xyes; then
|
if test "x$PLUGINS_USE_BUILDDIR" = xyes; then
|
||||||
AC_DEFINE(PLUGINS_USE_SRCDIR, 1, [Define if plugins should be loaded from the build tree - only developers should use this])
|
AC_DEFINE(PLUGINS_USE_BUILDDIR, 1, [Define if plugins should be loaded from the build tree - only developers should use this])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "x$USE_DEBUG" = xyes; then
|
if test "x$USE_DEBUG" = xyes; then
|
||||||
|
@ -1056,7 +1087,7 @@ AM_CONDITIONAL(HAVE_FIG2DEV_EPS, $HAVE_FIG2DEV_EPS)
|
||||||
AM_CONDITIONAL(HAVE_CDPARANOIA, test "x$HAVE_CDPARANOIA" = "xyes")
|
AM_CONDITIONAL(HAVE_CDPARANOIA, test "x$HAVE_CDPARANOIA" = "xyes")
|
||||||
AM_CONDITIONAL(HAVE_LIBLAME, test "x$HAVE_LIBLAME" = "xyes")
|
AM_CONDITIONAL(HAVE_LIBLAME, test "x$HAVE_LIBLAME" = "xyes")
|
||||||
AM_CONDITIONAL(HAVE_LIBSHOUT, test "x$HAVE_LIBSHOUT" = "xyes")
|
AM_CONDITIONAL(HAVE_LIBSHOUT, test "x$HAVE_LIBSHOUT" = "xyes")
|
||||||
AM_CONDITIONAL(HAVE_LIBESD, test "x$HAVE_LIBESD" = "xyes")
|
dnl AM_CONDITIONAL(HAVE_LIBESD, test "x$HAVE_LIBESD" = "xyes")
|
||||||
AM_CONDITIONAL(HAVE_ARTSC, test "x$HAVE_ARTSC" = "xyes")
|
AM_CONDITIONAL(HAVE_ARTSC, test "x$HAVE_ARTSC" = "xyes")
|
||||||
AM_CONDITIONAL(HAVE_LIBASOUND, test "x$HAVE_LIBASOUND" = "xyes")
|
AM_CONDITIONAL(HAVE_LIBASOUND, test "x$HAVE_LIBASOUND" = "xyes")
|
||||||
AM_CONDITIONAL(HAVE_MPEG2DEC, test "x$HAVE_MPEG2DEC" = "xyes")
|
AM_CONDITIONAL(HAVE_MPEG2DEC, test "x$HAVE_MPEG2DEC" = "xyes")
|
||||||
|
@ -1070,7 +1101,7 @@ AM_CONDITIONAL(HAVE_GNOME_VFS, test "x$HAVE_GNOME_VFS" = "xyes")
|
||||||
AM_CONDITIONAL(HAVE_AVIFILE, test "x$HAVE_AVIFILE" = "xyes")
|
AM_CONDITIONAL(HAVE_AVIFILE, test "x$HAVE_AVIFILE" = "xyes")
|
||||||
AM_CONDITIONAL(HAVE_LIBOPENQUICKTIME, test "x$HAVE_LIBOPENQUICKTIME" = "xyes")
|
AM_CONDITIONAL(HAVE_LIBOPENQUICKTIME, test "x$HAVE_LIBOPENQUICKTIME" = "xyes")
|
||||||
AM_CONDITIONAL(HAVE_LIBGSM, test "x$HAVE_LIBGSM" = "xyes")
|
AM_CONDITIONAL(HAVE_LIBGSM, test "x$HAVE_LIBGSM" = "xyes")
|
||||||
AM_CONDITIONAL(PLUGINS_USE_SRCDIR, test "x$PLUGINS_USE_SRCDIR" = "xyes")
|
AM_CONDITIONAL(PLUGINS_USE_BUILDDIR, test "x$PLUGINS_USE_BUILDDIR" = "xyes")
|
||||||
|
|
||||||
|
|
||||||
dnl ############################
|
dnl ############################
|
||||||
|
@ -1095,9 +1126,9 @@ AC_DEFINE_UNQUOTED(PLUGINS_DIR,"$PLUGINS_DIR")
|
||||||
AC_SUBST(PLUGINS_DIR)
|
AC_SUBST(PLUGINS_DIR)
|
||||||
|
|
||||||
dnl Set location of uninstalled plugin directory
|
dnl Set location of uninstalled plugin directory
|
||||||
PLUGINS_SRCDIR=`pwd`/$srcdir
|
PLUGINS_BUILDDIR=${builddir}
|
||||||
AC_DEFINE_UNQUOTED(PLUGINS_SRCDIR,"$PLUGINS_SRCDIR")
|
AC_DEFINE_UNQUOTED(PLUGINS_BUILDDIR,"$PLUGINS_BUILDDIR")
|
||||||
AC_SUBST(PLUGINS_SRCDIR)
|
AC_SUBST(PLUGINS_BUILDDIR)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1201,6 +1232,7 @@ plugins/avi/wincodec/Makefile
|
||||||
plugins/avi/winaudio/Makefile
|
plugins/avi/winaudio/Makefile
|
||||||
plugins/flx/Makefile
|
plugins/flx/Makefile
|
||||||
plugins/festival/Makefile
|
plugins/festival/Makefile
|
||||||
|
plugins/flac/Makefile
|
||||||
plugins/jpeg/Makefile
|
plugins/jpeg/Makefile
|
||||||
plugins/mp3decode/Makefile
|
plugins/mp3decode/Makefile
|
||||||
plugins/mp3decode/types/Makefile
|
plugins/mp3decode/types/Makefile
|
||||||
|
@ -1248,6 +1280,7 @@ plugins/filters/volenv/Makefile
|
||||||
plugins/filters/level/Makefile
|
plugins/filters/level/Makefile
|
||||||
plugins/filters/lav/Makefile
|
plugins/filters/lav/Makefile
|
||||||
plugins/filters/cutter/Makefile
|
plugins/filters/cutter/Makefile
|
||||||
|
plugins/filters/deinterlace/Makefile
|
||||||
plugins/gnomevfs/Makefile
|
plugins/gnomevfs/Makefile
|
||||||
plugins/icecast/Makefile
|
plugins/icecast/Makefile
|
||||||
plugins/icecast/icecastsend/Makefile
|
plugins/icecast/icecastsend/Makefile
|
||||||
|
@ -1260,8 +1293,10 @@ plugins/visualization/spectrum/Makefile
|
||||||
plugins/visualization/vumeter/Makefile
|
plugins/visualization/vumeter/Makefile
|
||||||
plugins/visualization/synaesthesia/Makefile
|
plugins/visualization/synaesthesia/Makefile
|
||||||
plugins/visualization/smoothwave/Makefile
|
plugins/visualization/smoothwave/Makefile
|
||||||
|
plugins/visualization/chart/Makefile
|
||||||
plugins/videoscale/Makefile
|
plugins/videoscale/Makefile
|
||||||
plugins/xvideosink/Makefile
|
plugins/xvideosink/Makefile
|
||||||
|
plugins/vgasink/Makefile
|
||||||
plugins/wav/Makefile
|
plugins/wav/Makefile
|
||||||
plugins/dvdsrc/Makefile
|
plugins/dvdsrc/Makefile
|
||||||
plugins/vcdsrc/Makefile
|
plugins/vcdsrc/Makefile
|
||||||
|
@ -1303,6 +1338,7 @@ examples/queue3/Makefile
|
||||||
examples/queue4/Makefile
|
examples/queue4/Makefile
|
||||||
examples/thread/Makefile
|
examples/thread/Makefile
|
||||||
examples/mixer/Makefile
|
examples/mixer/Makefile
|
||||||
|
examples/cutter/Makefile
|
||||||
examples/launch/Makefile
|
examples/launch/Makefile
|
||||||
examples/xml/Makefile
|
examples/xml/Makefile
|
||||||
examples/plugins/Makefile
|
examples/plugins/Makefile
|
||||||
|
|
|
@ -199,9 +199,13 @@ GstBufferPoolDestroyFunction
|
||||||
gst_buffer_pool_new
|
gst_buffer_pool_new
|
||||||
gst_buffer_pool_new_buffer
|
gst_buffer_pool_new_buffer
|
||||||
gst_buffer_pool_destroy_buffer
|
gst_buffer_pool_destroy_buffer
|
||||||
|
gst_buffer_pool_ref
|
||||||
|
gst_buffer_pool_ref_by_count
|
||||||
|
gst_buffer_pool_unref
|
||||||
gst_buffer_pool_set_create_function
|
gst_buffer_pool_set_create_function
|
||||||
gst_buffer_pool_set_destroy_function
|
gst_buffer_pool_set_destroy_function
|
||||||
gst_buffer_pool_destroy
|
gst_buffer_pool_destroy
|
||||||
|
gst_buffer_pool_get_default
|
||||||
<SUBSECTION Standard>
|
<SUBSECTION Standard>
|
||||||
GST_BUFFER_POOL
|
GST_BUFFER_POOL
|
||||||
</SECTION>
|
</SECTION>
|
||||||
|
|
|
@ -220,7 +220,7 @@ struct _GstType {
|
||||||
<note>
|
<note>
|
||||||
<para>
|
<para>
|
||||||
As you can see, there might be a multitude of elements that
|
As you can see, there might be a multitude of elements that
|
||||||
are able to operate on video/raw types. some might include:
|
are able to operate on audio/raw types. some might include:
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
|
@ -274,7 +274,7 @@ struct _GstType {
|
||||||
<title>creating elements with the factory</title>
|
<title>creating elements with the factory</title>
|
||||||
<para>
|
<para>
|
||||||
In the previous section we described how you could obtain
|
In the previous section we described how you could obtain
|
||||||
an element factory using MIME types. One the factory has been
|
an element factory using MIME types. Once the factory has been
|
||||||
obtained, you can create an element using:
|
obtained, you can create an element using:
|
||||||
</para>
|
</para>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
A pipeline (<classname>GstPipeline</classname>). Which is a generic container you will
|
A pipeline (<classname>GstPipeline</classname>). Which is a generic container you will
|
||||||
use most of the time.
|
use most of the time. The toplevel bin has to be a pipeline.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
|
@ -189,7 +189,7 @@
|
||||||
|
|
||||||
gst_bin_add (GST_BIN (bin), element);
|
gst_bin_add (GST_BIN (bin), element);
|
||||||
|
|
||||||
gst_element_add_ghost_pad (bin, gst_element_get_pad (element, "sink"));
|
gst_element_add_ghost_pad (bin, gst_element_get_pad (element, "sink"), "sink");
|
||||||
|
|
||||||
</programlisting>
|
</programlisting>
|
||||||
<para>
|
<para>
|
||||||
|
|
|
@ -229,7 +229,7 @@ struct _GstType {
|
||||||
<note>
|
<note>
|
||||||
<para>
|
<para>
|
||||||
As you can see, there might be a multitude of elements that
|
As you can see, there might be a multitude of elements that
|
||||||
are able to operate on video/raw types. some might include:
|
are able to operate on audio/raw types. some might include:
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
|
|
|
@ -22,17 +22,17 @@
|
||||||
int
|
int
|
||||||
main (int argc, char *argv[])
|
main (int argc, char *argv[])
|
||||||
{
|
{
|
||||||
GstElement *bin, *disksrc, *parse, *decoder, *audiosink;
|
GstElement *pipeline, *disksrc, *parse, *decoder, *audiosink;
|
||||||
|
|
||||||
gst_init(&argc, &argv);
|
gst_init(&argc, &argv);
|
||||||
|
|
||||||
if (argc != 2) {
|
if (argc != 2) {
|
||||||
g_print ("usage: %s <filename>n", argv[0]);
|
g_print ("usage: %s <filename>\n", argv[0]);
|
||||||
exit (-1);
|
exit (-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* create a new bin to hold the elements */
|
/* create a new pipeline to hold the elements */
|
||||||
bin = gst_bin_new ("bin");
|
pipeline = gst_pipeline_new ("pipeline");
|
||||||
|
|
||||||
/* create a disk reader */
|
/* create a disk reader */
|
||||||
disksrc = gst_elementfactory_make ("disksrc", "disk_source");
|
disksrc = gst_elementfactory_make ("disksrc", "disk_source");
|
||||||
|
@ -43,13 +43,13 @@ main (int argc, char *argv[])
|
||||||
decoder = gst_elementfactory_make ("mpg123", "decoder");
|
decoder = gst_elementfactory_make ("mpg123", "decoder");
|
||||||
|
|
||||||
/* and an audio sink */
|
/* and an audio sink */
|
||||||
audiosink = gst_elementfactory_make ("audiosink", "play_audio");
|
audiosink = gst_elementfactory_make ("osssink", "play_audio");
|
||||||
|
|
||||||
/* add objects to the main pipeline */
|
/* add objects to the main pipeline */
|
||||||
gst_bin_add (GST_BIN (bin), disksrc);
|
gst_bin_add (GST_BIN (pipeline), disksrc);
|
||||||
gst_bin_add (GST_BIN (bin), parse);
|
gst_bin_add (GST_BIN (pipeline), parse);
|
||||||
gst_bin_add (GST_BIN (bin), decoder);
|
gst_bin_add (GST_BIN (pipeline), decoder);
|
||||||
gst_bin_add (GST_BIN (bin), audiosink);
|
gst_bin_add (GST_BIN (pipeline), audiosink);
|
||||||
|
|
||||||
/* connect src to sink */
|
/* connect src to sink */
|
||||||
gst_pad_connect (gst_element_get_pad (disksrc, "src"),
|
gst_pad_connect (gst_element_get_pad (disksrc, "src"),
|
||||||
|
@ -60,18 +60,19 @@ main (int argc, char *argv[])
|
||||||
gst_element_get_pad (audiosink, "sink"));
|
gst_element_get_pad (audiosink, "sink"));
|
||||||
|
|
||||||
/* start playing */
|
/* start playing */
|
||||||
gst_element_set_state (bin, GST_STATE_PLAYING);
|
gst_element_set_state (pipeline, GST_STATE_PLAYING);
|
||||||
|
|
||||||
while (gst_bin_iterate (GST_BIN (bin)));
|
while (gst_bin_iterate (GST_BIN (pipeline)));
|
||||||
|
|
||||||
/* stop the bin */
|
/* stop the pipeline */
|
||||||
gst_element_set_state (bin, GST_STATE_NULL);
|
gst_element_set_state (pipeline, GST_STATE_NULL);
|
||||||
|
|
||||||
gst_object_destroy (GST_OBJECT (audiosink));
|
/* we don't need a reference to these objects anymore */
|
||||||
gst_object_destroy (GST_OBJECT (parse));
|
gst_object_unref (GST_OBJECT (audiosink));
|
||||||
gst_object_destroy (GST_OBJECT (decoder));
|
gst_object_unref (GST_OBJECT (parse));
|
||||||
gst_object_destroy (GST_OBJECT (disksrc));
|
gst_object_unref (GST_OBJECT (decoder));
|
||||||
gst_object_destroy (GST_OBJECT (bin));
|
gst_object_unref (GST_OBJECT (disksrc));
|
||||||
|
gst_object_unref (GST_OBJECT (pipeline));
|
||||||
|
|
||||||
exit (0);
|
exit (0);
|
||||||
}
|
}
|
||||||
|
@ -102,26 +103,26 @@ main (int argc, char *argv[])
|
||||||
</programlisting>
|
</programlisting>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
We are going to create 4 elements and one bin. Since all objects are
|
We are going to create 4 elements and one pipeline. Since all objects are
|
||||||
in fact elements, we can define them as:
|
in fact elements, we can define them as:
|
||||||
</para>
|
</para>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
...
|
...
|
||||||
GstElement *bin, *disksrc, *parse, *decoder, *audiosink;
|
GstElement *pipeline, *disksrc, *parse, *decoder, *audiosink;
|
||||||
...
|
...
|
||||||
</programlisting>
|
</programlisting>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Next, we are going to create an empty bin. As you have seen in the basic
|
Next, we are going to create an empty pipeline. As you have seen in the basic
|
||||||
introduction, this bin will hold and manage all the elements we are
|
introduction, this pipeline will hold and manage all the elements we are
|
||||||
going to stuff into it.
|
going to stuff into it.
|
||||||
</para>
|
</para>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
/* create a new bin to hold the elements */
|
/* create a new pipeline to hold the elements */
|
||||||
bin = gst_bin_new ("bin");
|
pipeline = gst_pipeline_new ("pipeline");
|
||||||
</programlisting>
|
</programlisting>
|
||||||
<para>
|
<para>
|
||||||
We use the standard constructor for a bin: gst_bin_new ("name").
|
We use the standard constructor for a pipeline: gst_pipeline_new ("name").
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
|
@ -158,7 +159,7 @@ main (int argc, char *argv[])
|
||||||
identify the element you need and a second argument: how you want
|
identify the element you need and a second argument: how you want
|
||||||
to name the element. The name of the element is something you can
|
to name the element. The name of the element is something you can
|
||||||
choose yourself and might be used to retrieve the element from a
|
choose yourself and might be used to retrieve the element from a
|
||||||
bin.
|
bin/pipeline.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
|
@ -171,14 +172,14 @@ main (int argc, char *argv[])
|
||||||
</programlisting>
|
</programlisting>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
We then add the elements to the bin.
|
We then add the elements to the pipeline.
|
||||||
</para>
|
</para>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
/* add objects to the main pipeline */
|
/* add objects to the main pipeline */
|
||||||
gst_bin_add (GST_BIN (bin), disksrc);
|
gst_bin_add (GST_BIN (pipeline), disksrc);
|
||||||
gst_bin_add (GST_BIN (bin), parse);
|
gst_bin_add (GST_BIN (pipeline), parse);
|
||||||
gst_bin_add (GST_BIN (bin), decoder);
|
gst_bin_add (GST_BIN (pipeline), decoder);
|
||||||
gst_bin_add (GST_BIN (bin), audiosink);
|
gst_bin_add (GST_BIN (pipeline), audiosink);
|
||||||
</programlisting>
|
</programlisting>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
|
@ -205,46 +206,46 @@ main (int argc, char *argv[])
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Everything is now set up to start the streaming. We use the following
|
Everything is now set up to start the streaming. We use the following
|
||||||
statements to change the state of the bin:
|
statements to change the state of the pipeline:
|
||||||
</para>
|
</para>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
/* start playing */
|
/* start playing */
|
||||||
gst_element_set_state (bin, GST_STATE_PLAYING);
|
gst_element_set_state (pipeline, GST_STATE_PLAYING);
|
||||||
|
|
||||||
</programlisting>
|
</programlisting>
|
||||||
<note>
|
<note>
|
||||||
<para>
|
<para>
|
||||||
<application>GStreamer</application> will take care of the READY state for you when going from
|
<application>GStreamer</application> will take care of the READY and PAUSED state for y
|
||||||
NULL to PLAYING.
|
ou when going from NULL to PLAYING.
|
||||||
</para>
|
</para>
|
||||||
</note>
|
</note>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Since we do not use threads, nothing will happen yet. We manually have to
|
Since we do not use threads, nothing will happen yet. We manually have to
|
||||||
call gst_bin_iterate() to execute one iteration of the bin.
|
call gst_bin_iterate() to execute one iteration of the pipeline.
|
||||||
</para>
|
</para>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
while (gst_bin_iterate (GST_BIN (bin)));
|
while (gst_bin_iterate (GST_BIN (pipeline)));
|
||||||
</programlisting>
|
</programlisting>
|
||||||
<para>
|
<para>
|
||||||
The gst_bin_iterate() function will return TRUE as long as something interesting
|
The gst_bin_iterate() function will return TRUE as long as something interesting
|
||||||
happended inside the bin. When the end-of-file has been reached the _iterate
|
happended inside the pipeline. When the end-of-file has been reached the _iterate
|
||||||
function will return FALSE and we can end the loop.
|
function will return FALSE and we can end the loop.
|
||||||
</para>
|
</para>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
/* stop the bin */
|
/* stop the pipeline */
|
||||||
gst_element_set_state (bin, GST_STATE_NULL);
|
gst_element_set_state (pipeline, GST_STATE_NULL);
|
||||||
|
|
||||||
gst_object_destroy (GST_OBJECT (audiosink));
|
gst_object_unref (GST_OBJECT (audiosink));
|
||||||
gst_object_destroy (GST_OBJECT (decoder));
|
gst_object_unref (GST_OBJECT (decoder));
|
||||||
gst_object_destroy (GST_OBJECT (disksrc));
|
gst_object_unref (GST_OBJECT (disksrc));
|
||||||
gst_object_destroy (GST_OBJECT (bin));
|
gst_object_unref (GST_OBJECT (pipeline));
|
||||||
|
|
||||||
exit (0);
|
exit (0);
|
||||||
</programlisting>
|
</programlisting>
|
||||||
<note>
|
<note>
|
||||||
<para>
|
<para>
|
||||||
don't forget to set the state of the bin to NULL. This will free
|
don't forget to set the state of the pipeline to NULL. This will free
|
||||||
all of the resources held by the elements.
|
all of the resources held by the elements.
|
||||||
</para>
|
</para>
|
||||||
</note>
|
</note>
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<sect1>
|
<sect1>
|
||||||
<title>Autoplugging helloworld</title>
|
<title>Autoplugging helloworld (outdated) </title>
|
||||||
<para>
|
<para>
|
||||||
We will create a second version of the helloworld application using
|
We will create a second version of the helloworld application using
|
||||||
autoplugging. Its source code is considerably easier to write and
|
autoplugging. Its source code is considerably easier to write and
|
||||||
|
|
|
@ -197,10 +197,13 @@ main(int argc, char *argv[])
|
||||||
<programlisting>
|
<programlisting>
|
||||||
struct _GstCaps {
|
struct _GstCaps {
|
||||||
gchar *name; /* the name of this caps */
|
gchar *name; /* the name of this caps */
|
||||||
|
|
||||||
guint16 id; /* type id (major type) */
|
guint16 id; /* type id (major type) */
|
||||||
|
|
||||||
|
guint refcount; /* caps are refcounted */
|
||||||
|
|
||||||
GstProps *properties; /* properties for this capability */
|
GstProps *properties; /* properties for this capability */
|
||||||
|
|
||||||
|
GstCaps *next; /* caps can be chained together */
|
||||||
};
|
};
|
||||||
</programlisting>
|
</programlisting>
|
||||||
<para>
|
<para>
|
||||||
|
@ -317,27 +320,140 @@ Pads:
|
||||||
<sect2 id="sec-pads-caps-get">
|
<sect2 id="sec-pads-caps-get">
|
||||||
<title>Getting the capabilities of a pad</title>
|
<title>Getting the capabilities of a pad</title>
|
||||||
<para>
|
<para>
|
||||||
A pad can have a GList of capabilities attached to it. You can get the capabilities list
|
A pad can have a chain of capabilities attached to it. You can get the capabilities chain
|
||||||
with:
|
with:
|
||||||
</para>
|
</para>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
GList *caps;
|
GstCaps *caps;
|
||||||
...
|
...
|
||||||
caps = gst_pad_get_caps_list (pad);
|
caps = gst_pad_get_caps (pad);
|
||||||
|
|
||||||
g_print ("pad name %s\n", gst_pad_get_name (pad));
|
g_print ("pad name %s\n", gst_pad_get_name (pad));
|
||||||
|
|
||||||
while (caps) {
|
while (caps) {
|
||||||
GstCaps *cap = (GstCaps *) caps->data;
|
g_print (" Capability name %s, MIME type %s\n",
|
||||||
|
gst_caps_get_name (cap),
|
||||||
g_print (" Capability name %s, MIME type\n", gst_caps_get_name (cap),
|
|
||||||
gst_caps_get_mime (cap));
|
gst_caps_get_mime (cap));
|
||||||
|
|
||||||
caps = g_list_next (caps);
|
caps = caps->next;
|
||||||
}
|
}
|
||||||
...
|
...
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</sect2>
|
</sect2>
|
||||||
|
<sect2 id="sec-pads-caps-create">
|
||||||
|
<title>Creating capabilities structures</title>
|
||||||
|
<para>
|
||||||
|
While the capabilities are mainly used inside the plugin to describe the media type of the
|
||||||
|
pads, the application programmer also has to have basic understanding of caps in order to
|
||||||
|
interface with the plugins, specially when using the autopluggers.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
As we said, a capability has a name, a mime-type and some properties. The signature of the
|
||||||
|
function to create a new <classname>GstCaps *</classname> structure is like:
|
||||||
|
<programlisting>
|
||||||
|
GstCaps* gst_caps_new (const gchar *name, const gchar *mime, GstProps *props);
|
||||||
|
</programlisting>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
You can therefore create a new capability with no properties like this:
|
||||||
|
<programlisting>
|
||||||
|
GstCaps *newcaps;
|
||||||
|
|
||||||
|
newcaps = gst_caps_new ("my_caps", "audio/wav", NULL);
|
||||||
|
</programlisting>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
<classname>GstProps</classname> basically consist of a set of key-value pairs
|
||||||
|
and are created with a function with this signature:
|
||||||
|
<programlisting>
|
||||||
|
GstProps* gst_props_new (const gchar *firstname, ...);
|
||||||
|
</programlisting>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
The keys are given as strings and the values are given with a set of macros:
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
GST_PROPS_INT(a): An integer value
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
GST_PROPS_FLOAT(a): A floating point value
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
GST_PROPS_FOURCC(a): A fourcc value
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
GST_PROPS_BOOLEAN(a): A boolean value
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
GST_PROPS_STRING(a): A string value
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
The values can also be specified as ranges with:
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
GST_PROPS_INT_RANGE(a,b): An integer ragne from a to b
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
GST_PROPS_FLOAT_RANGE(a,b): A float ragne from a to b
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
All of the above values can be given with a list too using:
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
GST_PROPS_LIST(a,...): A list of property values.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
A more complex capability with properties is created like this:
|
||||||
|
<programlisting>
|
||||||
|
GstCaps *newcaps;
|
||||||
|
|
||||||
|
newcaps = gst_caps_new ("my_caps",
|
||||||
|
"audio/wav",
|
||||||
|
gst_props_new (
|
||||||
|
"bitrate", GST_PROPS_INT_RANGE (11025,22050),
|
||||||
|
"depth", GST_PROPS_INT (16),
|
||||||
|
"signed", GST_PROPS_LIST (
|
||||||
|
GST_PROPS_BOOLEAN (TRUE),
|
||||||
|
GST_PROPS_BOOLEAN (FALSE)
|
||||||
|
),
|
||||||
|
NULL
|
||||||
|
);
|
||||||
|
</programlisting>
|
||||||
|
Optionally the convenient shortcut macro can be used. The above complex
|
||||||
|
capability can be created with:
|
||||||
|
<programlisting>
|
||||||
|
GstCaps *newcaps;
|
||||||
|
|
||||||
|
newcaps = GST_CAPS_NEW ("my_caps",
|
||||||
|
"audio/wav",
|
||||||
|
"bitrate", GST_PROPS_INT_RANGE (11025,22050),
|
||||||
|
"depth", GST_PROPS_INT (16),
|
||||||
|
"signed", GST_PROPS_LIST (
|
||||||
|
GST_PROPS_BOOLEAN (TRUE),
|
||||||
|
GST_PROPS_BOOLEAN (FALSE)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
</programlisting>
|
||||||
|
</para>
|
||||||
|
</sect2>
|
||||||
|
|
||||||
</sect1>
|
</sect1>
|
||||||
</chapter>
|
</chapter>
|
||||||
|
|
|
@ -23,12 +23,12 @@
|
||||||
</listitem>
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
PLAYING: The element is doing something.
|
PAUSED: The element is paused for a period of time.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
PAUSED: The element is paused for a period of time.
|
PLAYING: The element is doing something.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
|
@ -36,10 +36,8 @@
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
All elements start with the NULL state. The elements will go throught the following state changes:
|
All elements start with the NULL state. The elements will go throught the following state changes:
|
||||||
<figure float="1" id="sec-state-img">
|
NULL -> READY -> PAUSED -> PLAYING. Remember when going from PLAYING to READY GStreamer
|
||||||
<title>The different states of a <classname>GstElement</classname> and the state transitions</title>
|
will internally go throught the intermediate states.
|
||||||
<graphic fileref="images/state-diagram" format="png"></graphic>
|
|
||||||
</figure>
|
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
The state of an element can be changed with the following code:
|
The state of an element can be changed with the following code:
|
||||||
|
@ -61,11 +59,6 @@
|
||||||
<colspec colwidth="2*">
|
<colspec colwidth="2*">
|
||||||
<colspec colwidth="8*">
|
<colspec colwidth="8*">
|
||||||
<tbody>
|
<tbody>
|
||||||
<row>
|
|
||||||
<entry><literal>GST_STATE_NONE_PENDING</literal></entry>
|
|
||||||
<entry>The element is in the desired state.
|
|
||||||
</entry>
|
|
||||||
</row>
|
|
||||||
<row>
|
<row>
|
||||||
<entry><literal>GST_STATE_NULL</literal></entry>
|
<entry><literal>GST_STATE_NULL</literal></entry>
|
||||||
<entry>Reset the state of an element.
|
<entry>Reset the state of an element.
|
||||||
|
@ -77,13 +70,13 @@
|
||||||
</entry>
|
</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry><literal>GST_STATE_PLAYING</literal></entry>
|
<entry><literal>GST_STATE_PAUSED</literal></entry>
|
||||||
<entry>means there really is data flowing through the graph.
|
<entry>temporary stops the data flow.
|
||||||
</entry>
|
</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry><literal>GST_STATE_PAUSED</literal></entry>
|
<entry><literal>GST_STATE_PLAYING</literal></entry>
|
||||||
<entry>temporary stops the data flow.
|
<entry>means there really is data flowing through the graph.
|
||||||
</entry>
|
</entry>
|
||||||
</row>
|
</row>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
@ -121,7 +114,8 @@
|
||||||
<note>
|
<note>
|
||||||
<para>
|
<para>
|
||||||
You can also go from the NULL to PLAYING state directly without going through the READY
|
You can also go from the NULL to PLAYING state directly without going through the READY
|
||||||
state. this is a shortcut, the framework will internally go through the READY state for you.
|
state. this is a shortcut, the framework will internally go through the READY and the
|
||||||
|
PAUSED state for you.
|
||||||
</para>
|
</para>
|
||||||
</note>
|
</note>
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
|
@ -131,3 +131,76 @@ case 4)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
case 5)
|
||||||
|
|
||||||
|
(--------) (--------) (--------)
|
||||||
|
! disksrc! ! mad ! !disksink!
|
||||||
|
! src ----- sink src ---- sink !
|
||||||
|
(--------) (--------) (--------)
|
||||||
|
|
||||||
|
|
||||||
|
disksrc detects the end of stream. It just sent the last buffer
|
||||||
|
and sets the srcpad to EOS with gst_pad_eos ().
|
||||||
|
|
||||||
|
the eos handler returns false because mad returns false on the
|
||||||
|
eos request. the parent removes mad as an EOS provider.
|
||||||
|
|
||||||
|
mad was responsible for the EOS delay and so it gets added to the bin
|
||||||
|
as a possible EOS provider.
|
||||||
|
|
||||||
|
After mad has sent its last buffer, it performs gst_pad_eos on its
|
||||||
|
src pad.
|
||||||
|
the parent already has mad in the list of EOS providers so it does not
|
||||||
|
get added twice.
|
||||||
|
mad finally fires the EOS signal. This time, disksink returns false on
|
||||||
|
the eos request. the parent removes mad as an EOS provider.
|
||||||
|
|
||||||
|
disksink was responsible for the EOS delay and gets added to the bin
|
||||||
|
as a possible EOS provider.
|
||||||
|
When disksink has written all of it's data and closed the output file,
|
||||||
|
it fires EOS.
|
||||||
|
The parent already has disksink in the list of EOS providers so it does
|
||||||
|
not get added twice.
|
||||||
|
The parent removes the EOS provider
|
||||||
|
from its list, and since the list is empty, the parent fires EOS.
|
||||||
|
|
||||||
|
case 6)
|
||||||
|
|
||||||
|
(--------) (--------) (--------)
|
||||||
|
!disksrc1! ! mad1 ! ! mixer !
|
||||||
|
! src ----- sink src ---- sink1 ! (--------)
|
||||||
|
(--------) (--------) ! ! !disksink!
|
||||||
|
! src ---- sink !
|
||||||
|
(--------) (--------) ! ! (--------)
|
||||||
|
!disksrc2! ! mad2 ! ! !
|
||||||
|
! src ----- sink src ---- sink2 !
|
||||||
|
(--------) (--------) (--------)
|
||||||
|
|
||||||
|
In this case, we want to make sure the pipeline keeps running after one
|
||||||
|
of the two sources reaches eos. Suppose in this case that disksrc1 will
|
||||||
|
reach eos first.
|
||||||
|
|
||||||
|
disksrc1 detects the end of stream. It sets eos, mad1 will return false,
|
||||||
|
and mad1 will be responsible for eos. When mad1 had sent out the last
|
||||||
|
buffer, it sends out eos.
|
||||||
|
|
||||||
|
The mixer intercepts eos and returns false. mad1 is removed from the
|
||||||
|
eos providers and mixer is added.
|
||||||
|
|
||||||
|
(At this point, the mixer might choose to disconnect mad1->src and
|
||||||
|
mixer->sink1 pads, since it's received eos on mad1->src)
|
||||||
|
|
||||||
|
mixer will not send out eos since it hasn't received eos from
|
||||||
|
mad2->src.
|
||||||
|
|
||||||
|
After a while, disksrc2 will detect end of stream, and eos will finally
|
||||||
|
propagate to mixer. mixer might disconnect mad->src2, and after
|
||||||
|
realizing all of it's sources have reached eos, it sends out the final
|
||||||
|
buffer and fires EOS.
|
||||||
|
|
||||||
|
At this point, disksink will return false, mixer will be removed as an
|
||||||
|
eos provider, and disksink will write out it's final buffer and close
|
||||||
|
the file on disk. At this point, it fires eos, and since it's the last
|
||||||
|
eos provider, the parent can fire eos.
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,10 @@ endif
|
||||||
SUBDIRS = $(GNOME_SUBDS) \
|
SUBDIRS = $(GNOME_SUBDS) \
|
||||||
helloworld helloworld2 \
|
helloworld helloworld2 \
|
||||||
queue queue2 queue3 queue4 \
|
queue queue2 queue3 queue4 \
|
||||||
launch thread xml typefind mixer
|
launch thread xml plugins typefind mixer cutter
|
||||||
|
|
||||||
|
DIST_SUBDIRS = autoplug \
|
||||||
|
helloworld helloworld2 \
|
||||||
|
queue queue2 queue3 queue4 \
|
||||||
|
launch thread xml plugins typefind mixer cutter
|
||||||
|
|
||||||
DIST_SUBDIRS = autoplug plugins
|
|
||||||
|
|
5
examples/cutter/Makefile.am
Normal file
5
examples/cutter/Makefile.am
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
noinst_PROGRAMS = cutter
|
||||||
|
noinst_HEADERS = cutter.h
|
||||||
|
|
||||||
|
LIBS += $(GST_LIBS)
|
||||||
|
CFLAGS += $(GST_CFLAGS)
|
210
examples/cutter/cutter.c
Normal file
210
examples/cutter/cutter.c
Normal file
|
@ -0,0 +1,210 @@
|
||||||
|
/*
|
||||||
|
* cutter.c - cut audio into pieces based on silence - thomas@apestaart.org
|
||||||
|
*
|
||||||
|
* construct a simple pipeline osssrc ! cutter ! disksink
|
||||||
|
* pause when necessary, change output
|
||||||
|
*
|
||||||
|
* Latest change : 03/06/2001
|
||||||
|
*
|
||||||
|
* Version : 0.3
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <gst/gst.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <time.h>
|
||||||
|
|
||||||
|
#define DEBUG
|
||||||
|
|
||||||
|
gboolean playing = TRUE;
|
||||||
|
gboolean cut_start_signalled = FALSE;
|
||||||
|
gboolean cut_stop_signalled = FALSE;
|
||||||
|
|
||||||
|
int id = 0; /* increment this for each new cut */
|
||||||
|
GstElement *main_bin;
|
||||||
|
GstElement *audiosrc;
|
||||||
|
GstElement *queue;
|
||||||
|
GstElement *thread;
|
||||||
|
GstElement *cutter;
|
||||||
|
GstElement *disksink;
|
||||||
|
GstElement *encoder;
|
||||||
|
char buffer[255];
|
||||||
|
|
||||||
|
/* signal callbacks */
|
||||||
|
|
||||||
|
void cut_start (GstElement *element)
|
||||||
|
{
|
||||||
|
g_print ("\nDEBUG: main: cut start\n");
|
||||||
|
/* we should pause the pipeline, disconnect cutter and disksink
|
||||||
|
* create a new disksink to a real file, reconnect, and set to play
|
||||||
|
*/
|
||||||
|
g_print ("DEBUG: cut_start: main_bin pausing\n");
|
||||||
|
gst_element_set_state (main_bin, GST_STATE_PAUSED);
|
||||||
|
g_print ("DEBUG: cut_start: main_bin paused\n");
|
||||||
|
|
||||||
|
{
|
||||||
|
long seconds;
|
||||||
|
struct tm *ct;
|
||||||
|
time (&seconds);
|
||||||
|
ct = localtime (&seconds);
|
||||||
|
// sprintf (buffer, "/news/incoming/audio/cutter.%06d.wav", id);
|
||||||
|
sprintf (buffer, "/news/incoming/audio/cutter.%04d%02d%02d.%02d%02d%02d.wav",
|
||||||
|
ct->tm_year + 1900, ct->tm_mon, ct->tm_mday,
|
||||||
|
ct->tm_hour, ct->tm_min, ct->tm_sec);
|
||||||
|
}
|
||||||
|
g_print ("DEBUG: cut_start: setting new location to %s\n", buffer);
|
||||||
|
gtk_object_set (G_OBJECT (disksink), "location", buffer, NULL);
|
||||||
|
gtk_object_set (G_OBJECT (disksink), "type", 4, NULL);
|
||||||
|
|
||||||
|
gst_element_set_state (main_bin, GST_STATE_PLAYING);
|
||||||
|
++id;
|
||||||
|
g_print ("start_cut_signal done\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
void cut_start_signal (GstElement *element)
|
||||||
|
{
|
||||||
|
g_print ("\nDEBUG: main: cut start signal\n");
|
||||||
|
cut_start_signalled = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
void cut_stop (GstElement *element)
|
||||||
|
{
|
||||||
|
g_print ("\nDEBUG: main: cut stop\n");
|
||||||
|
/* we should pause the pipeline, disconnect disksink, create a fake disksink,
|
||||||
|
* connect to pipeline, and set to play
|
||||||
|
*/
|
||||||
|
g_print ("DEBUG: cut_stop: main_bin paused\n");
|
||||||
|
gst_element_set_state (main_bin, GST_STATE_PAUSED);
|
||||||
|
|
||||||
|
g_print ("DEBUG: cut_stop: setting new location\n");
|
||||||
|
gtk_object_set (G_OBJECT (disksink), "location", "/dev/null", NULL);
|
||||||
|
|
||||||
|
gst_element_set_state (main_bin, GST_STATE_PLAYING);
|
||||||
|
g_print ("stop_cut_signal done\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
void cut_stop_signal (GstElement *element)
|
||||||
|
{
|
||||||
|
g_print ("\nDEBUG: main: cut stop signal\n");
|
||||||
|
cut_stop_signalled = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
int main (int argc, char *argv[])
|
||||||
|
{
|
||||||
|
//int i, j;
|
||||||
|
//gboolean done;
|
||||||
|
|
||||||
|
//char buffer[20];
|
||||||
|
|
||||||
|
//output_channel_t *channel_out;
|
||||||
|
|
||||||
|
GstElement *audiosrc;
|
||||||
|
|
||||||
|
gst_init (&argc,&argv);
|
||||||
|
/*
|
||||||
|
if (argc == 1)
|
||||||
|
{
|
||||||
|
g_print("usage: %s <filename1> <filename2> <...>\n", argv[0]);
|
||||||
|
exit(-1);
|
||||||
|
}*/
|
||||||
|
|
||||||
|
/* set up input channel and main bin */
|
||||||
|
|
||||||
|
g_print ("creating main bin\n");
|
||||||
|
/* create cutter */
|
||||||
|
cutter = gst_elementfactory_make ("cutter", "cutter");
|
||||||
|
|
||||||
|
gtk_object_set (G_OBJECT (cutter),
|
||||||
|
"threshold_dB", -40.0,
|
||||||
|
"runlength", 0.5,
|
||||||
|
NULL);
|
||||||
|
|
||||||
|
/* create an audio src */
|
||||||
|
audiosrc = gst_elementfactory_make ("osssrc", "audio_src");
|
||||||
|
|
||||||
|
/* set params */
|
||||||
|
|
||||||
|
gtk_object_set (G_OBJECT (audiosrc), "frequency", 44100,
|
||||||
|
"channels", 1,
|
||||||
|
"format", 16, NULL);
|
||||||
|
|
||||||
|
encoder = gst_elementfactory_make ("passthrough", "encoder");
|
||||||
|
disksink = gst_elementfactory_make ("afsink", "disk_sink");
|
||||||
|
|
||||||
|
gtk_object_set (G_OBJECT (disksink), "location", "/dev/null", NULL);
|
||||||
|
|
||||||
|
thread = gst_thread_new ("thread");
|
||||||
|
g_assert (thread != NULL);
|
||||||
|
|
||||||
|
/* create main bin */
|
||||||
|
main_bin = gst_pipeline_new ("bin");
|
||||||
|
g_assert (main_bin != NULL);
|
||||||
|
|
||||||
|
queue = gst_elementfactory_make ("queue", "queue");
|
||||||
|
|
||||||
|
/* add elements to bin */
|
||||||
|
gst_bin_add (GST_BIN (main_bin), audiosrc);
|
||||||
|
gst_bin_add (GST_BIN (thread), queue);
|
||||||
|
|
||||||
|
gst_bin_add (GST_BIN (thread), cutter);
|
||||||
|
gst_bin_add (GST_BIN (thread), encoder);
|
||||||
|
gst_bin_add (GST_BIN (thread), disksink);
|
||||||
|
|
||||||
|
/* connect adder and disksink */
|
||||||
|
|
||||||
|
gst_pad_connect (gst_element_get_pad (audiosrc, "src"),
|
||||||
|
gst_element_get_pad (queue, "sink"));
|
||||||
|
|
||||||
|
gst_pad_connect (gst_element_get_pad (queue, "src"),
|
||||||
|
gst_element_get_pad (cutter, "sink"));
|
||||||
|
gst_pad_connect (gst_element_get_pad (cutter, "src"),
|
||||||
|
gst_element_get_pad (encoder, "sink"));
|
||||||
|
gst_pad_connect (gst_element_get_pad (encoder, "src"),
|
||||||
|
gst_element_get_pad (disksink, "sink"));
|
||||||
|
|
||||||
|
gst_bin_add (GST_BIN (main_bin), thread);
|
||||||
|
|
||||||
|
/* set signal handlers */
|
||||||
|
g_print ("setting signal handlers\n");
|
||||||
|
gtk_signal_connect (G_OBJECT(cutter), "cut_start",
|
||||||
|
GTK_SIGNAL_FUNC(cut_start_signal), NULL);
|
||||||
|
gtk_signal_connect (G_OBJECT(cutter), "cut_stop",
|
||||||
|
GTK_SIGNAL_FUNC(cut_stop_signal), NULL);
|
||||||
|
|
||||||
|
/* start playing */
|
||||||
|
g_print ("setting to play\n");
|
||||||
|
gst_element_set_state (main_bin, GST_STATE_PLAYING);
|
||||||
|
/*
|
||||||
|
g_print ("setting thread to play\n");
|
||||||
|
gst_element_set_state (GST_ELEMENT (thread), GST_STATE_PLAYING);
|
||||||
|
*/
|
||||||
|
while (playing)
|
||||||
|
{
|
||||||
|
// g_print ("> ");
|
||||||
|
gst_bin_iterate (GST_BIN (main_bin));
|
||||||
|
// g_print (" <");
|
||||||
|
if (cut_start_signalled)
|
||||||
|
{
|
||||||
|
g_print ("\nDEBUG: main: cut_start_signalled true !\n");
|
||||||
|
cut_start (cutter);
|
||||||
|
cut_start_signalled = FALSE;
|
||||||
|
}
|
||||||
|
if (cut_stop_signalled)
|
||||||
|
{
|
||||||
|
g_print ("\nDEBUG: main: cut_stop_signalled true !\n");
|
||||||
|
cut_stop (cutter);
|
||||||
|
cut_stop_signalled = FALSE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
g_print ("we're done iterating.\n");
|
||||||
|
/* stop the bin */
|
||||||
|
|
||||||
|
gst_element_set_state (main_bin, GST_STATE_NULL);
|
||||||
|
|
||||||
|
gst_object_destroy (GST_OBJECT (disksink));
|
||||||
|
gst_object_destroy (GST_OBJECT (main_bin));
|
||||||
|
|
||||||
|
exit(0);
|
||||||
|
}
|
14
examples/cutter/cutter.h
Normal file
14
examples/cutter/cutter.h
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
/*
|
||||||
|
* cutter.h header file
|
||||||
|
* thomas@apestaart.org
|
||||||
|
*/
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
GstElement *pipe;
|
||||||
|
GstElement *disksink;
|
||||||
|
GstElement *audiosink;
|
||||||
|
|
||||||
|
char *location;
|
||||||
|
int channel_id;
|
||||||
|
} output_channel_t;
|
|
@ -48,9 +48,9 @@ libgst_la_SOURCES = \
|
||||||
gsttype.c \
|
gsttype.c \
|
||||||
gsttypefind.c \
|
gsttypefind.c \
|
||||||
gstutils.c \
|
gstutils.c \
|
||||||
gstxml.c \
|
|
||||||
gstparse.c \
|
gstparse.c \
|
||||||
$(GSTARCH_SRCS)
|
$(GSTARCH_SRCS) \
|
||||||
|
gstxml.c
|
||||||
|
|
||||||
|
|
||||||
##### Oh this sucks so badly. This isn't funny. #####
|
##### Oh this sucks so badly. This isn't funny. #####
|
||||||
|
@ -127,8 +127,8 @@ libgstinclude_HEADERS = \
|
||||||
gsttypefind.h \
|
gsttypefind.h \
|
||||||
gstutils.h \
|
gstutils.h \
|
||||||
gstparse.h \
|
gstparse.h \
|
||||||
gstxml.h \
|
gstversion.h \
|
||||||
gstversion.h
|
gstxml.h
|
||||||
|
|
||||||
noinst_HEADERS = \
|
noinst_HEADERS = \
|
||||||
gst_private.h \
|
gst_private.h \
|
||||||
|
|
|
@ -216,7 +216,7 @@ static void
|
||||||
gst_disksink_chain (GstPad *pad, GstBuffer *buf)
|
gst_disksink_chain (GstPad *pad, GstBuffer *buf)
|
||||||
{
|
{
|
||||||
GstDiskSink *disksink;
|
GstDiskSink *disksink;
|
||||||
guint16 bytes_written = 0;
|
gint bytes_written = 0;
|
||||||
|
|
||||||
g_return_if_fail (pad != NULL);
|
g_return_if_fail (pad != NULL);
|
||||||
g_return_if_fail (GST_IS_PAD (pad));
|
g_return_if_fail (GST_IS_PAD (pad));
|
||||||
|
|
|
@ -233,8 +233,10 @@ gst_disksrc_get (GstPad *pad)
|
||||||
src = GST_DISKSRC (gst_pad_get_parent (pad));
|
src = GST_DISKSRC (gst_pad_get_parent (pad));
|
||||||
g_return_val_if_fail (GST_FLAG_IS_SET (src, GST_DISKSRC_OPEN), NULL);
|
g_return_val_if_fail (GST_FLAG_IS_SET (src, GST_DISKSRC_OPEN), NULL);
|
||||||
|
|
||||||
|
|
||||||
/* deal with EOF state */
|
/* deal with EOF state */
|
||||||
if (src->curoffset >= src->size) {
|
if (src->curoffset >= src->size) {
|
||||||
|
GST_DEBUG (0,"map offset %ld >= size %ld --> eos\n", src->curoffset, src->size);
|
||||||
gst_pad_set_eos (pad);
|
gst_pad_set_eos (pad);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -296,8 +298,12 @@ gst_disksrc_get_region (GstPad *pad, GstRegionType type,guint64 offset,guint64 l
|
||||||
|
|
||||||
/* deal with EOF state */
|
/* deal with EOF state */
|
||||||
if (offset >= src->size) {
|
if (offset >= src->size) {
|
||||||
gst_pad_set_eos (pad);
|
//gst_pad_set_eos (pad);
|
||||||
return NULL;
|
GST_DEBUG (0,"map offset %lld >= size %ld --> eos\n", offset, src->size);
|
||||||
|
//FIXME
|
||||||
|
buf = gst_buffer_new();
|
||||||
|
GST_BUFFER_FLAG_SET (buf, GST_BUFFER_EOS);
|
||||||
|
return buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* create the buffer */
|
/* create the buffer */
|
||||||
|
|
|
@ -58,8 +58,6 @@ gst_init (int *argc, char **argv[])
|
||||||
{
|
{
|
||||||
GstTrace *gst_trace;
|
GstTrace *gst_trace;
|
||||||
|
|
||||||
GST_INFO (GST_CAT_GST_INIT, "Initializing GStreamer Core Library");
|
|
||||||
|
|
||||||
if (!g_thread_supported ()) g_thread_init (NULL);
|
if (!g_thread_supported ()) g_thread_init (NULL);
|
||||||
|
|
||||||
#ifdef USE_GLIB2
|
#ifdef USE_GLIB2
|
||||||
|
@ -81,15 +79,18 @@ gst_init (int *argc, char **argv[])
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!gst_init_check (argc,argv)) {
|
if (!gst_init_check (argc,argv)) {
|
||||||
exit (0);
|
exit (0); // FIXME!
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GST_INFO (GST_CAT_GST_INIT, "Initializing GStreamer Core Library");
|
||||||
|
|
||||||
_gst_cpu_initialize ();
|
_gst_cpu_initialize ();
|
||||||
_gst_type_initialize ();
|
_gst_type_initialize ();
|
||||||
_gst_props_initialize ();
|
_gst_props_initialize ();
|
||||||
_gst_caps_initialize ();
|
_gst_caps_initialize ();
|
||||||
_gst_plugin_initialize ();
|
_gst_plugin_initialize ();
|
||||||
_gst_buffer_initialize ();
|
_gst_buffer_initialize ();
|
||||||
|
_gst_buffer_pool_initialize ();
|
||||||
|
|
||||||
/* register some standard builtin types */
|
/* register some standard builtin types */
|
||||||
gst_elementfactory_new ("bin", gst_bin_get_type (), &gst_bin_details);
|
gst_elementfactory_new ("bin", gst_bin_get_type (), &gst_bin_details);
|
||||||
|
|
|
@ -356,4 +356,3 @@ gst_autoplugfactory_load_thyself (xmlNodePtr parent)
|
||||||
|
|
||||||
return factory;
|
return factory;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -48,8 +48,10 @@ static gboolean gst_bin_change_state_type (GstBin *bin,
|
||||||
|
|
||||||
static gboolean gst_bin_iterate_func (GstBin *bin);
|
static gboolean gst_bin_iterate_func (GstBin *bin);
|
||||||
|
|
||||||
|
#ifndef GST_DISABLE_XML
|
||||||
static xmlNodePtr gst_bin_save_thyself (GstObject *object, xmlNodePtr parent);
|
static xmlNodePtr gst_bin_save_thyself (GstObject *object, xmlNodePtr parent);
|
||||||
static void gst_bin_restore_thyself (GstObject *object, xmlNodePtr self);
|
static void gst_bin_restore_thyself (GstObject *object, xmlNodePtr self);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Bin signals and args */
|
/* Bin signals and args */
|
||||||
enum {
|
enum {
|
||||||
|
@ -114,8 +116,10 @@ gst_bin_class_init (GstBinClass *klass)
|
||||||
klass->change_state_type = gst_bin_change_state_type;
|
klass->change_state_type = gst_bin_change_state_type;
|
||||||
klass->iterate = gst_bin_iterate_func;
|
klass->iterate = gst_bin_iterate_func;
|
||||||
|
|
||||||
|
#ifndef GST_DISABLE_XML
|
||||||
gstobject_class->save_thyself = gst_bin_save_thyself;
|
gstobject_class->save_thyself = gst_bin_save_thyself;
|
||||||
gstobject_class->restore_thyself = gst_bin_restore_thyself;
|
gstobject_class->restore_thyself = gst_bin_restore_thyself;
|
||||||
|
#endif
|
||||||
|
|
||||||
gstelement_class->change_state = gst_bin_change_state;
|
gstelement_class->change_state = gst_bin_change_state;
|
||||||
|
|
||||||
|
@ -592,6 +596,7 @@ gst_bin_get_list (GstBin *bin)
|
||||||
return bin->children;
|
return bin->children;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef GST_DISABLE_XML
|
||||||
static xmlNodePtr
|
static xmlNodePtr
|
||||||
gst_bin_save_thyself (GstObject *object,
|
gst_bin_save_thyself (GstObject *object,
|
||||||
xmlNodePtr parent)
|
xmlNodePtr parent)
|
||||||
|
@ -643,6 +648,7 @@ gst_bin_restore_thyself (GstObject *object,
|
||||||
field = field->next;
|
field = field->next;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif // GST_DISABLE_XML
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -36,7 +36,7 @@ _gst_buffer_initialize (void)
|
||||||
int buffersize = sizeof(GstBuffer);
|
int buffersize = sizeof(GstBuffer);
|
||||||
|
|
||||||
// round up to the nearest 32 bytes for cache-line and other efficiencies
|
// round up to the nearest 32 bytes for cache-line and other efficiencies
|
||||||
buffersize = ((buffersize-1 / 32) + 1) * 32;
|
buffersize = (((buffersize-1) / 32) + 1) * 32;
|
||||||
|
|
||||||
_gst_buffer_chunk = g_mem_chunk_new ("GstBuffer", buffersize,
|
_gst_buffer_chunk = g_mem_chunk_new ("GstBuffer", buffersize,
|
||||||
buffersize * 32, G_ALLOC_AND_FREE);
|
buffersize * 32, G_ALLOC_AND_FREE);
|
||||||
|
|
|
@ -25,6 +25,18 @@
|
||||||
|
|
||||||
#include "gstbuffer.h"
|
#include "gstbuffer.h"
|
||||||
|
|
||||||
|
static GMutex *_default_pool_lock;
|
||||||
|
static GHashTable *_default_pools;
|
||||||
|
|
||||||
|
static GstBuffer* gst_buffer_pool_default_create (GstBufferPool *pool, gpointer user_data);
|
||||||
|
static void gst_buffer_pool_default_destroy (GstBufferPool *pool, GstBuffer *buffer, gpointer user_data);
|
||||||
|
|
||||||
|
void
|
||||||
|
_gst_buffer_pool_initialize (void)
|
||||||
|
{
|
||||||
|
_default_pools = g_hash_table_new(NULL,NULL);
|
||||||
|
_default_pool_lock = g_mutex_new ();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gst_buffer_pool_new:
|
* gst_buffer_pool_new:
|
||||||
|
@ -43,10 +55,97 @@ gst_buffer_pool_new (void)
|
||||||
|
|
||||||
pool->new_buffer = NULL;
|
pool->new_buffer = NULL;
|
||||||
pool->destroy_buffer = NULL;
|
pool->destroy_buffer = NULL;
|
||||||
|
pool->lock = g_mutex_new ();
|
||||||
|
#ifdef HAVE_ATOMIC_H
|
||||||
|
atomic_set (&pool->refcount, 1);
|
||||||
|
#else
|
||||||
|
pool->refcount = 1;
|
||||||
|
#endif
|
||||||
|
|
||||||
return pool;
|
return pool;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gst_buffer_pool_ref:
|
||||||
|
* @pool: the GstBufferPool to reference
|
||||||
|
*
|
||||||
|
* Increment the refcount of this buffer pool.
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
gst_buffer_pool_ref (GstBufferPool *pool)
|
||||||
|
{
|
||||||
|
g_return_if_fail (pool != NULL);
|
||||||
|
|
||||||
|
GST_DEBUG(0,"referencing buffer pool %p from %d\n", pool, GST_BUFFER_POOL_REFCOUNT(pool));
|
||||||
|
|
||||||
|
#ifdef HAVE_ATOMIC_H
|
||||||
|
atomic_inc (&(pool->refcount));
|
||||||
|
#else
|
||||||
|
g_return_if_fail (pool->refcount > 0);
|
||||||
|
GST_BUFFER_POOL_LOCK (pool);
|
||||||
|
buffer->refcount++;
|
||||||
|
GST_BUFFER_POOL_UNLOCK (pool);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gst_buffer_pool_ref_by_count:
|
||||||
|
* @pool: the GstBufferPool to reference
|
||||||
|
* @count: a number
|
||||||
|
*
|
||||||
|
* Increment the refcount of this buffer pool by the given number.
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
gst_buffer_pool_ref_by_count (GstBufferPool *pool, int count)
|
||||||
|
{
|
||||||
|
g_return_if_fail (pool != NULL);
|
||||||
|
g_return_if_fail (count > 0);
|
||||||
|
|
||||||
|
#ifdef HAVE_ATOMIC_H
|
||||||
|
g_return_if_fail (atomic_read (&(pool->refcount)) > 0);
|
||||||
|
atomic_add (count, &(pool->refcount));
|
||||||
|
#else
|
||||||
|
g_return_if_fail (pool->refcount > 0);
|
||||||
|
GST_BUFFER_POOL_LOCK (pool);
|
||||||
|
pool->refcount += count;
|
||||||
|
GST_BUFFER_POOL_UNLOCK (pool);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gst_buffer_pool_unref:
|
||||||
|
* @pool: the GstBufferPool to unref
|
||||||
|
*
|
||||||
|
* Decrement the refcount of this buffer pool. If the refcount is
|
||||||
|
* zero and the pool is a default implementation,
|
||||||
|
* the buffer pool will be destroyed.
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
gst_buffer_pool_unref (GstBufferPool *pool)
|
||||||
|
{
|
||||||
|
gint zero;
|
||||||
|
|
||||||
|
g_return_if_fail (pool != NULL);
|
||||||
|
|
||||||
|
GST_DEBUG(0,"unreferencing buffer pool %p from %d\n", pool, GST_BUFFER_POOL_REFCOUNT(pool));
|
||||||
|
|
||||||
|
#ifdef HAVE_ATOMIC_H
|
||||||
|
g_return_if_fail (atomic_read (&(pool->refcount)) > 0);
|
||||||
|
zero = atomic_dec_and_test (&(pool->refcount));
|
||||||
|
#else
|
||||||
|
g_return_if_fail (pool->refcount > 0);
|
||||||
|
GST_BUFFER_POOL_LOCK (pool);
|
||||||
|
pool->refcount--;
|
||||||
|
zero = (pool->refcount == 0);
|
||||||
|
GST_BUFFER_POOL_UNLOCK (pool);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* if we ended up with the refcount at zero, destroy the buffer pool*/
|
||||||
|
if (zero) {
|
||||||
|
gst_buffer_pool_destroy (pool);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gst_buffer_pool_set_create_function:
|
* gst_buffer_pool_set_create_function:
|
||||||
* @pool: the pool to set the create function for
|
* @pool: the pool to set the create function for
|
||||||
|
@ -96,8 +195,18 @@ gst_buffer_pool_set_destroy_function (GstBufferPool *pool,
|
||||||
void
|
void
|
||||||
gst_buffer_pool_destroy (GstBufferPool *pool)
|
gst_buffer_pool_destroy (GstBufferPool *pool)
|
||||||
{
|
{
|
||||||
|
GMemChunk *data_chunk;
|
||||||
g_return_if_fail (pool != NULL);
|
g_return_if_fail (pool != NULL);
|
||||||
|
|
||||||
|
// if its a default buffer pool, we know how to free the user data
|
||||||
|
if (pool->new_buffer == gst_buffer_pool_default_create &&
|
||||||
|
pool->destroy_buffer == gst_buffer_pool_default_destroy){
|
||||||
|
GST_DEBUG(0,"destroying default buffer pool %p\n", pool);
|
||||||
|
data_chunk = (GMemChunk*)pool->new_user_data;
|
||||||
|
g_mem_chunk_reset(data_chunk);
|
||||||
|
g_free(data_chunk);
|
||||||
|
}
|
||||||
|
|
||||||
g_free(pool);
|
g_free(pool);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -138,3 +247,97 @@ gst_buffer_pool_destroy_buffer (GstBufferPool *pool,
|
||||||
|
|
||||||
pool->destroy_buffer (pool, buffer, pool->new_user_data);
|
pool->destroy_buffer (pool, buffer, pool->new_user_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gst_buffer_pool_get_default:
|
||||||
|
* @pool: instance of GstBufferPool which is no longer required (or NULL if it doesn't exist)
|
||||||
|
* @buffer_size: the number of bytes this buffer will store
|
||||||
|
* @pool_size: the default number of buffers to be preallocated
|
||||||
|
*
|
||||||
|
* Returns an instance of a buffer pool using the default
|
||||||
|
* implementation. If a buffer pool instance with the same buffer_size
|
||||||
|
* already exists this will be returned, otherwise a new instance will
|
||||||
|
* be created.
|
||||||
|
*
|
||||||
|
* Returns: an instance of GstBufferPool
|
||||||
|
*/
|
||||||
|
GstBufferPool*
|
||||||
|
gst_buffer_pool_get_default (GstBufferPool *oldpool, guint buffer_size, guint pool_size)
|
||||||
|
{
|
||||||
|
GstBufferPool *pool;
|
||||||
|
GMemChunk *data_chunk;
|
||||||
|
guint real_buffer_size;
|
||||||
|
|
||||||
|
// round up to the nearest 32 bytes for cache-line and other efficiencies
|
||||||
|
real_buffer_size = (((buffer_size-1) / 32) + 1) * 32;
|
||||||
|
|
||||||
|
// check for an existing GstBufferPool with the same real_buffer_size
|
||||||
|
// (we won't worry about the pool_size)
|
||||||
|
g_mutex_lock (_default_pool_lock);
|
||||||
|
pool = (GstBufferPool*)g_hash_table_lookup(_default_pools,GINT_TO_POINTER(real_buffer_size));
|
||||||
|
g_mutex_unlock (_default_pool_lock);
|
||||||
|
|
||||||
|
if (pool != NULL){
|
||||||
|
if (oldpool != pool){
|
||||||
|
gst_buffer_pool_ref(pool);
|
||||||
|
|
||||||
|
if (oldpool != NULL){
|
||||||
|
gst_buffer_pool_unref(oldpool);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return pool;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
data_chunk = g_mem_chunk_new ("GstBufferPoolDefault", real_buffer_size,
|
||||||
|
real_buffer_size * pool_size, G_ALLOC_AND_FREE);
|
||||||
|
|
||||||
|
pool = gst_buffer_pool_new();
|
||||||
|
gst_buffer_pool_set_create_function (pool, gst_buffer_pool_default_create, data_chunk);
|
||||||
|
gst_buffer_pool_set_destroy_function (pool, gst_buffer_pool_default_destroy, data_chunk);
|
||||||
|
|
||||||
|
g_mutex_lock (_default_pool_lock);
|
||||||
|
g_hash_table_insert(_default_pools,GINT_TO_POINTER(real_buffer_size),pool);
|
||||||
|
g_mutex_unlock (_default_pool_lock);
|
||||||
|
|
||||||
|
GST_DEBUG(0,"new buffer pool %p bytes:%d size:%d\n", pool, real_buffer_size, pool_size);
|
||||||
|
|
||||||
|
if (oldpool != NULL){
|
||||||
|
gst_buffer_pool_unref(oldpool);
|
||||||
|
}
|
||||||
|
return pool;
|
||||||
|
}
|
||||||
|
|
||||||
|
static GstBuffer*
|
||||||
|
gst_buffer_pool_default_create (GstBufferPool *pool, gpointer user_data)
|
||||||
|
{
|
||||||
|
GMemChunk *data_chunk = (GMemChunk*)user_data;
|
||||||
|
GstBuffer *buffer;
|
||||||
|
|
||||||
|
gst_buffer_pool_ref(pool);
|
||||||
|
buffer = gst_buffer_new();
|
||||||
|
GST_BUFFER_FLAG_SET(buffer,GST_BUFFER_DONTFREE);
|
||||||
|
buffer->pool = pool;
|
||||||
|
|
||||||
|
g_mutex_lock (pool->lock);
|
||||||
|
GST_BUFFER_DATA(buffer) = g_mem_chunk_alloc(data_chunk);
|
||||||
|
g_mutex_unlock (pool->lock);
|
||||||
|
|
||||||
|
return buffer;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gst_buffer_pool_default_destroy (GstBufferPool *pool, GstBuffer *buffer, gpointer user_data)
|
||||||
|
{
|
||||||
|
GMemChunk *data_chunk = (GMemChunk*)user_data;
|
||||||
|
gpointer data = GST_BUFFER_DATA(buffer);
|
||||||
|
|
||||||
|
g_mutex_lock (pool->lock);
|
||||||
|
g_mem_chunk_free (data_chunk,data);
|
||||||
|
g_mutex_unlock (pool->lock);
|
||||||
|
|
||||||
|
buffer->pool = NULL;
|
||||||
|
gst_buffer_pool_unref(pool);
|
||||||
|
gst_buffer_destroy (buffer);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -31,8 +31,9 @@ extern "C" {
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
|
|
||||||
#define GST_BUFFER_POOL(buf) \
|
#define GST_BUFFER_POOL(pool) \
|
||||||
((GstBufferPool *)(buf))
|
((GstBufferPool *)(pool))
|
||||||
|
#define GST_BUFFER_POOL_LOCK(pool) (g_mutex_lock(GST_BUFFER_POOL(pool)->lock))
|
||||||
|
|
||||||
typedef struct _GstBufferPool GstBufferPool;
|
typedef struct _GstBufferPool GstBufferPool;
|
||||||
|
|
||||||
|
@ -40,6 +41,18 @@ typedef GstBuffer* (*GstBufferPoolCreateFunction) (GstBufferPool *pool, gpointe
|
||||||
typedef void (*GstBufferPoolDestroyFunction) (GstBufferPool *pool, GstBuffer *buffer, gpointer user_data);
|
typedef void (*GstBufferPoolDestroyFunction) (GstBufferPool *pool, GstBuffer *buffer, gpointer user_data);
|
||||||
|
|
||||||
struct _GstBufferPool {
|
struct _GstBufferPool {
|
||||||
|
/* locking */
|
||||||
|
GMutex *lock;
|
||||||
|
|
||||||
|
/* refcounting */
|
||||||
|
#ifdef HAVE_ATOMIC_H
|
||||||
|
atomic_t refcount;
|
||||||
|
#define GST_BUFFER_POOL_REFCOUNT(pool) (atomic_read(&(GST_BUFFER_POOL((pool))->refcount)))
|
||||||
|
#else
|
||||||
|
int refcount;
|
||||||
|
#define GST_BUFFER_POOL_REFCOUNT(pool) (GST_BUFFER_POOL(pool)->refcount)
|
||||||
|
#endif
|
||||||
|
|
||||||
/* will be called when a new buffer is to be created */
|
/* will be called when a new buffer is to be created */
|
||||||
GstBufferPoolCreateFunction new_buffer;
|
GstBufferPoolCreateFunction new_buffer;
|
||||||
/* user data to pass with the new_buffer function */
|
/* user data to pass with the new_buffer function */
|
||||||
|
@ -47,8 +60,11 @@ struct _GstBufferPool {
|
||||||
|
|
||||||
gpointer destroy_user_data;
|
gpointer destroy_user_data;
|
||||||
GstBufferPoolDestroyFunction destroy_buffer;
|
GstBufferPoolDestroyFunction destroy_buffer;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
void _gst_buffer_pool_initialize (void);
|
||||||
|
|
||||||
/* creating a new buffer pool from scratch */
|
/* creating a new buffer pool from scratch */
|
||||||
GstBufferPool* gst_buffer_pool_new (void);
|
GstBufferPool* gst_buffer_pool_new (void);
|
||||||
|
|
||||||
|
@ -56,6 +72,11 @@ GstBufferPool* gst_buffer_pool_new (void);
|
||||||
GstBuffer* gst_buffer_pool_new_buffer (GstBufferPool *pool);
|
GstBuffer* gst_buffer_pool_new_buffer (GstBufferPool *pool);
|
||||||
void gst_buffer_pool_destroy_buffer (GstBufferPool *pool, GstBuffer *buffer);
|
void gst_buffer_pool_destroy_buffer (GstBufferPool *pool, GstBuffer *buffer);
|
||||||
|
|
||||||
|
/* refcounting */
|
||||||
|
void gst_buffer_pool_ref (GstBufferPool *pool);
|
||||||
|
void gst_buffer_pool_ref_by_count (GstBufferPool *pool, int count);
|
||||||
|
void gst_buffer_pool_unref (GstBufferPool *buffer);
|
||||||
|
|
||||||
/* setting create and destroy functions */
|
/* setting create and destroy functions */
|
||||||
void gst_buffer_pool_set_create_function (GstBufferPool *pool,
|
void gst_buffer_pool_set_create_function (GstBufferPool *pool,
|
||||||
GstBufferPoolCreateFunction create,
|
GstBufferPoolCreateFunction create,
|
||||||
|
@ -67,6 +88,9 @@ void gst_buffer_pool_set_destroy_function (GstBufferPool *pool,
|
||||||
/* destroying the buffer pool */
|
/* destroying the buffer pool */
|
||||||
void gst_buffer_pool_destroy (GstBufferPool *pool);
|
void gst_buffer_pool_destroy (GstBufferPool *pool);
|
||||||
|
|
||||||
|
/* a default buffer pool implementation */
|
||||||
|
GstBufferPool* gst_buffer_pool_get_default (GstBufferPool *oldpool, guint buffer_size, guint pool_size);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
|
|
|
@ -623,6 +623,3 @@ gst_caps_load_thyself (xmlNodePtr parent)
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -59,8 +59,10 @@ static void gst_element_real_destroy (GObject *object);
|
||||||
|
|
||||||
static GstElementStateReturn gst_element_change_state (GstElement *element);
|
static GstElementStateReturn gst_element_change_state (GstElement *element);
|
||||||
|
|
||||||
GstElement* gst_element_restore_thyself (xmlNodePtr self, GstObject *parent);
|
#ifndef GST_DISABLE_XML
|
||||||
static xmlNodePtr gst_element_save_thyself (GstObject *object, xmlNodePtr parent);
|
static xmlNodePtr gst_element_save_thyself (GstObject *object, xmlNodePtr parent);
|
||||||
|
GstElement* gst_element_restore_thyself (xmlNodePtr self, GstObject *parent);
|
||||||
|
#endif
|
||||||
|
|
||||||
static GstObjectClass *parent_class = NULL;
|
static GstObjectClass *parent_class = NULL;
|
||||||
static guint gst_element_signals[LAST_SIGNAL] = { 0 };
|
static guint gst_element_signals[LAST_SIGNAL] = { 0 };
|
||||||
|
@ -139,8 +141,10 @@ gst_element_class_init (GstElementClass *klass)
|
||||||
// FIXME!
|
// FIXME!
|
||||||
// gobject_class->destroy = GST_DEBUG_FUNCPTR(gst_element_real_destroy);
|
// gobject_class->destroy = GST_DEBUG_FUNCPTR(gst_element_real_destroy);
|
||||||
|
|
||||||
|
#ifndef GST_DISABLE_XML
|
||||||
gstobject_class->save_thyself = GST_DEBUG_FUNCPTR(gst_element_save_thyself);
|
gstobject_class->save_thyself = GST_DEBUG_FUNCPTR(gst_element_save_thyself);
|
||||||
gstobject_class->restore_thyself = GST_DEBUG_FUNCPTR(gst_element_restore_thyself);
|
gstobject_class->restore_thyself = GST_DEBUG_FUNCPTR(gst_element_restore_thyself);
|
||||||
|
#endif
|
||||||
|
|
||||||
klass->change_state = GST_DEBUG_FUNCPTR(gst_element_change_state);
|
klass->change_state = GST_DEBUG_FUNCPTR(gst_element_change_state);
|
||||||
klass->elementfactory = NULL;
|
klass->elementfactory = NULL;
|
||||||
|
@ -650,7 +654,8 @@ gst_element_request_pad_by_name (GstElement *element, const gchar *name)
|
||||||
g_return_val_if_fail (name != NULL, NULL);
|
g_return_val_if_fail (name != NULL, NULL);
|
||||||
|
|
||||||
templ = gst_element_get_padtemplate_by_name (element, name);
|
templ = gst_element_get_padtemplate_by_name (element, name);
|
||||||
g_return_val_if_fail (templ != NULL, NULL);
|
if (templ == NULL)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
pad = gst_element_request_pad (element, templ);
|
pad = gst_element_request_pad (element, templ);
|
||||||
|
|
||||||
|
@ -948,6 +953,7 @@ static gchar *_gst_element_type_names[] = {
|
||||||
};
|
};
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifndef GST_DISABLE_XML
|
||||||
/**
|
/**
|
||||||
* gst_element_save_thyself:
|
* gst_element_save_thyself:
|
||||||
* @element: GstElement to save
|
* @element: GstElement to save
|
||||||
|
@ -1149,6 +1155,7 @@ gst_element_restore_thyself (xmlNodePtr self, GstObject *parent)
|
||||||
|
|
||||||
return element;
|
return element;
|
||||||
}
|
}
|
||||||
|
#endif // GST_DISABLE_XML
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gst_element_set_sched:
|
* gst_element_set_sched:
|
||||||
|
|
|
@ -287,6 +287,7 @@ gst_elementfactory_can_sink_caps (GstElementFactory *factory,
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef GST_DISABLE_XML
|
||||||
/**
|
/**
|
||||||
* gst_elementfactory_save_thyself:
|
* gst_elementfactory_save_thyself:
|
||||||
* @factory: factory to save
|
* @factory: factory to save
|
||||||
|
@ -380,4 +381,4 @@ gst_elementfactory_load_thyself (xmlNodePtr parent)
|
||||||
|
|
||||||
return factory;
|
return factory;
|
||||||
}
|
}
|
||||||
|
#endif // GST_DISABLE_XML
|
||||||
|
|
|
@ -27,7 +27,9 @@
|
||||||
/* Object signals and args */
|
/* Object signals and args */
|
||||||
enum {
|
enum {
|
||||||
PARENT_SET,
|
PARENT_SET,
|
||||||
|
#ifndef GST_DISABLE_XML
|
||||||
OBJECT_SAVED,
|
OBJECT_SAVED,
|
||||||
|
#endif
|
||||||
LAST_SIGNAL
|
LAST_SIGNAL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -96,11 +98,13 @@ gst_object_class_init (GstObjectClass *klass)
|
||||||
G_STRUCT_OFFSET (GstObjectClass, parent_set), NULL, NULL,
|
G_STRUCT_OFFSET (GstObjectClass, parent_set), NULL, NULL,
|
||||||
g_cclosure_marshal_VOID__OBJECT,G_TYPE_NONE,1,
|
g_cclosure_marshal_VOID__OBJECT,G_TYPE_NONE,1,
|
||||||
G_TYPE_OBJECT);
|
G_TYPE_OBJECT);
|
||||||
|
#ifndef GST_DISABLE_XML
|
||||||
gst_object_signals[OBJECT_SAVED] =
|
gst_object_signals[OBJECT_SAVED] =
|
||||||
g_signal_newc("object_saved", G_TYPE_FROM_CLASS(klass), G_SIGNAL_RUN_LAST,
|
g_signal_newc("object_saved", G_TYPE_FROM_CLASS(klass), G_SIGNAL_RUN_LAST,
|
||||||
G_STRUCT_OFFSET (GstObjectClass, object_saved), NULL, NULL,
|
G_STRUCT_OFFSET (GstObjectClass, object_saved), NULL, NULL,
|
||||||
g_cclosure_marshal_VOID__POINTER,G_TYPE_NONE,1,
|
g_cclosure_marshal_VOID__POINTER,G_TYPE_NONE,1,
|
||||||
G_TYPE_POINTER);
|
G_TYPE_POINTER);
|
||||||
|
#endif
|
||||||
|
|
||||||
klass->path_string_separator = "/";
|
klass->path_string_separator = "/";
|
||||||
// FIXME!!!
|
// FIXME!!!
|
||||||
|
@ -463,6 +467,8 @@ gst_object_check_uniqueness (GList *list, const gchar *name)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef GST_DISABLE_XML
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gst_object_save_thyself:
|
* gst_object_save_thyself:
|
||||||
* @object: GstObject to save
|
* @object: GstObject to save
|
||||||
|
@ -486,11 +492,15 @@ gst_object_save_thyself (GstObject *object, xmlNodePtr parent)
|
||||||
if (oclass->save_thyself)
|
if (oclass->save_thyself)
|
||||||
oclass->save_thyself (object, parent);
|
oclass->save_thyself (object, parent);
|
||||||
|
|
||||||
|
#ifndef GST_DISABLE_XML
|
||||||
g_signal_emit (G_OBJECT (object), gst_object_signals[OBJECT_SAVED], 0, parent);
|
g_signal_emit (G_OBJECT (object), gst_object_signals[OBJECT_SAVED], 0, parent);
|
||||||
|
#endif
|
||||||
|
|
||||||
return parent;
|
return parent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // GST_DISABLE_XML
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gst_object_get_path_string:
|
* gst_object_get_path_string:
|
||||||
* @object: GstObject to get the path from
|
* @object: GstObject to get the path from
|
||||||
|
@ -570,7 +580,9 @@ struct _GstSignalObjectClass {
|
||||||
GObjectClass parent_class;
|
GObjectClass parent_class;
|
||||||
|
|
||||||
/* signals */
|
/* signals */
|
||||||
|
#ifndef GST_DISABLE_XML
|
||||||
void (*object_loaded) (GstSignalObject *object, GstObject *new, xmlNodePtr self);
|
void (*object_loaded) (GstSignalObject *object, GstObject *new, xmlNodePtr self);
|
||||||
|
#endif GST_DISABLE_XML
|
||||||
};
|
};
|
||||||
|
|
||||||
static GType
|
static GType
|
||||||
|
@ -604,11 +616,13 @@ gst_signal_object_class_init (GstSignalObjectClass *klass)
|
||||||
|
|
||||||
parent_class = g_type_class_ref (G_TYPE_OBJECT);
|
parent_class = g_type_class_ref (G_TYPE_OBJECT);
|
||||||
|
|
||||||
|
#ifndef GST_DISABLE_XML
|
||||||
gst_signal_object_signals[SO_OBJECT_LOADED] =
|
gst_signal_object_signals[SO_OBJECT_LOADED] =
|
||||||
g_signal_newc("object_loaded", G_TYPE_FROM_CLASS(klass), G_SIGNAL_RUN_LAST,
|
g_signal_newc("object_loaded", G_TYPE_FROM_CLASS(klass), G_SIGNAL_RUN_LAST,
|
||||||
G_STRUCT_OFFSET (GstObjectClass, parent_set), NULL, NULL,
|
G_STRUCT_OFFSET (GstObjectClass, parent_set), NULL, NULL,
|
||||||
gst_marshal_VOID__OBJECT_POINTER,G_TYPE_NONE,2,
|
gst_marshal_VOID__OBJECT_POINTER,G_TYPE_NONE,2,
|
||||||
G_TYPE_OBJECT,G_TYPE_POINTER);
|
G_TYPE_OBJECT,G_TYPE_POINTER);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -636,6 +650,7 @@ gst_class_signal_connect (GstObjectClass *klass,
|
||||||
return g_signal_connectc (klass->signal_object, name, func, func_data, FALSE);
|
return g_signal_connectc (klass->signal_object, name, func, func_data, FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef GST_DISABLE_XML
|
||||||
/**
|
/**
|
||||||
* gst_class_signal_emit_by_name:
|
* gst_class_signal_emit_by_name:
|
||||||
* @object: the object that sends the signal
|
* @object: the object that sends the signal
|
||||||
|
@ -655,3 +670,5 @@ gst_class_signal_emit_by_name (GstObject *object,
|
||||||
|
|
||||||
g_signal_emit_by_name (oclass->signal_object, name, object, self);
|
g_signal_emit_by_name (oclass->signal_object, name, object, self);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // GST_DISABLE_XML
|
||||||
|
|
|
@ -103,13 +103,17 @@ struct _GstObjectClass {
|
||||||
|
|
||||||
/* signals */
|
/* signals */
|
||||||
void (*parent_set) (GstObject *object, GstObject *parent);
|
void (*parent_set) (GstObject *object, GstObject *parent);
|
||||||
|
#ifndef GST_DISABLE_XML
|
||||||
void (*object_saved) (GstObject *object, xmlNodePtr parent);
|
void (*object_saved) (GstObject *object, xmlNodePtr parent);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* functions go here */
|
/* functions go here */
|
||||||
void (*destroy) (GstObject *object);
|
void (*destroy) (GstObject *object);
|
||||||
|
|
||||||
|
#ifndef GST_DISABLE_XML
|
||||||
xmlNodePtr (*save_thyself) (GstObject *object, xmlNodePtr parent);
|
xmlNodePtr (*save_thyself) (GstObject *object, xmlNodePtr parent);
|
||||||
void (*restore_thyself) (GstObject *object, xmlNodePtr self);
|
void (*restore_thyself) (GstObject *object, xmlNodePtr self);
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
#define GST_FLAGS(obj) (GST_OBJECT (obj)->flags)
|
#define GST_FLAGS(obj) (GST_OBJECT (obj)->flags)
|
||||||
|
@ -145,7 +149,9 @@ void gst_object_unparent (GstObject *object);
|
||||||
|
|
||||||
gboolean gst_object_check_uniqueness (GList *list, const gchar *name);
|
gboolean gst_object_check_uniqueness (GList *list, const gchar *name);
|
||||||
|
|
||||||
|
#ifndef GST_DISABLE_XML
|
||||||
xmlNodePtr gst_object_save_thyself (GstObject *object, xmlNodePtr parent);
|
xmlNodePtr gst_object_save_thyself (GstObject *object, xmlNodePtr parent);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* refcounting */
|
/* refcounting */
|
||||||
GstObject * gst_object_ref (GstObject *object);
|
GstObject * gst_object_ref (GstObject *object);
|
||||||
|
@ -163,9 +169,11 @@ guint gst_class_signal_connect (GstObjectClass *klass,
|
||||||
gpointer func,
|
gpointer func,
|
||||||
gpointer func_data);
|
gpointer func_data);
|
||||||
|
|
||||||
|
#ifndef GST_DISABLE_XML
|
||||||
void gst_class_signal_emit_by_name (GstObject *object,
|
void gst_class_signal_emit_by_name (GstObject *object,
|
||||||
const gchar *name,
|
const gchar *name,
|
||||||
xmlNodePtr self);
|
xmlNodePtr self);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
28
gst/gstpad.c
28
gst/gstpad.c
|
@ -34,7 +34,9 @@
|
||||||
static void gst_pad_class_init (GstPadClass *klass);
|
static void gst_pad_class_init (GstPadClass *klass);
|
||||||
static void gst_pad_init (GstPad *pad);
|
static void gst_pad_init (GstPad *pad);
|
||||||
|
|
||||||
|
#ifndef GST_DISABLE_XML
|
||||||
static xmlNodePtr gst_pad_save_thyself (GstObject *object, xmlNodePtr parent);
|
static xmlNodePtr gst_pad_save_thyself (GstObject *object, xmlNodePtr parent);
|
||||||
|
#endif
|
||||||
|
|
||||||
static GstObject *pad_parent_class = NULL;
|
static GstObject *pad_parent_class = NULL;
|
||||||
|
|
||||||
|
@ -176,7 +178,9 @@ gst_real_pad_class_init (GstRealPadClass *klass)
|
||||||
g_param_spec_boolean("active","Active","Whether the pad is active.",
|
g_param_spec_boolean("active","Active","Whether the pad is active.",
|
||||||
TRUE,G_PARAM_READWRITE));
|
TRUE,G_PARAM_READWRITE));
|
||||||
|
|
||||||
|
#ifndef GST_DISABLE_XML
|
||||||
gstobject_class->save_thyself = GST_DEBUG_FUNCPTR(gst_pad_save_thyself);
|
gstobject_class->save_thyself = GST_DEBUG_FUNCPTR(gst_pad_save_thyself);
|
||||||
|
#endif
|
||||||
gstobject_class->path_string_separator = ".";
|
gstobject_class->path_string_separator = ".";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1087,6 +1091,7 @@ gst_real_pad_destroy (GObject *object)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef GST_DISABLE_XML
|
||||||
/**
|
/**
|
||||||
* gst_pad_load_and_connect:
|
* gst_pad_load_and_connect:
|
||||||
* @self: the XML node to read the description from
|
* @self: the XML node to read the description from
|
||||||
|
@ -1143,6 +1148,7 @@ gst_pad_load_and_connect (xmlNodePtr self,
|
||||||
cleanup:
|
cleanup:
|
||||||
g_strfreev (split);
|
g_strfreev (split);
|
||||||
}
|
}
|
||||||
|
#endif // GST_DISABLE_XML
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_pad_renegotiate_func (GstPad *pad, gpointer *data1, GstPad *peerpad, gpointer *data2, GstCaps **newcaps)
|
gst_pad_renegotiate_func (GstPad *pad, gpointer *data1, GstPad *peerpad, gpointer *data2, GstCaps **newcaps)
|
||||||
|
@ -1390,6 +1396,7 @@ gst_pad_negotiate_proxy (GstPad *srcpad, GstPad *destpad, GstCaps **caps)
|
||||||
return GST_PAD_NEGOTIATE_AGREE;
|
return GST_PAD_NEGOTIATE_AGREE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef GST_DISABLE_XML
|
||||||
/**
|
/**
|
||||||
* gst_pad_save_thyself:
|
* gst_pad_save_thyself:
|
||||||
* @pad: the pad to save
|
* @pad: the pad to save
|
||||||
|
@ -1450,6 +1457,7 @@ gst_pad_ghost_save_thyself (GstPad *pad,
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
#endif // GST_DISABLE_XML
|
||||||
|
|
||||||
#ifndef gst_pad_push
|
#ifndef gst_pad_push
|
||||||
/**
|
/**
|
||||||
|
@ -1526,21 +1534,35 @@ gst_pad_pull (GstPad *pad)
|
||||||
GstBuffer*
|
GstBuffer*
|
||||||
gst_pad_pullregion (GstPad *pad, GstRegionType type, guint64 offset, guint64 len)
|
gst_pad_pullregion (GstPad *pad, GstRegionType type, guint64 offset, guint64 len)
|
||||||
{
|
{
|
||||||
GstRealPad *peer = GST_RPAD_PEER(pad);
|
GstRealPad *peer;
|
||||||
|
GstBuffer *result = NULL;
|
||||||
|
|
||||||
g_return_val_if_fail (GST_PAD_DIRECTION (pad) == GST_PAD_SINK, NULL);
|
g_return_val_if_fail (GST_PAD_DIRECTION (pad) == GST_PAD_SINK, NULL);
|
||||||
|
|
||||||
|
do {
|
||||||
|
peer = GST_RPAD_PEER(pad);
|
||||||
g_return_val_if_fail (peer != NULL, NULL);
|
g_return_val_if_fail (peer != NULL, NULL);
|
||||||
|
|
||||||
|
if (result)
|
||||||
|
gst_buffer_unref (result);
|
||||||
|
|
||||||
GST_DEBUG_ENTER("(%s:%s,%d,%lld,%lld)",GST_DEBUG_PAD_NAME(pad),type,offset,len);
|
GST_DEBUG_ENTER("(%s:%s,%d,%lld,%lld)",GST_DEBUG_PAD_NAME(pad),type,offset,len);
|
||||||
|
|
||||||
if (peer->pullregionfunc) {
|
if (peer->pullregionfunc) {
|
||||||
GST_DEBUG (GST_CAT_DATAFLOW,"calling pullregionfunc &%s of peer pad %s:%s\n",
|
GST_DEBUG (GST_CAT_DATAFLOW,"calling pullregionfunc &%s of peer pad %s:%s\n",
|
||||||
GST_DEBUG_FUNCPTR_NAME(peer->pullregionfunc),GST_DEBUG_PAD_NAME(((GstPad*)peer)));
|
GST_DEBUG_FUNCPTR_NAME(peer->pullregionfunc),GST_DEBUG_PAD_NAME(((GstPad*)peer)));
|
||||||
return (peer->pullregionfunc)(((GstPad*)peer),type,offset,len);
|
result = (peer->pullregionfunc)(((GstPad*)peer),type,offset,len);
|
||||||
} else {
|
} else {
|
||||||
GST_DEBUG (GST_CAT_DATAFLOW,"no pullregionfunc\n");
|
GST_DEBUG (GST_CAT_DATAFLOW,"no pullregionfunc\n");
|
||||||
return NULL;
|
result = NULL;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
while (result && ! GST_BUFFER_FLAG_IS_SET (result, GST_BUFFER_EOS)
|
||||||
|
&& !(GST_BUFFER_OFFSET (result) == offset &&
|
||||||
|
GST_BUFFER_SIZE (result) == len));
|
||||||
|
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
177
gst/gstparse.c
177
gst/gstparse.c
|
@ -24,6 +24,8 @@
|
||||||
#define DEBUG_NOPREFIX(format,args...)
|
#define DEBUG_NOPREFIX(format,args...)
|
||||||
#define VERBOSE(format,args...)
|
#define VERBOSE(format,args...)
|
||||||
|
|
||||||
|
#define GST_PARSE_LISTPAD(list) ((GstPad*)(list->data))
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "gst_private.h"
|
#include "gst_private.h"
|
||||||
|
@ -100,14 +102,16 @@ gst_parse_unique_name(gchar *type,gst_parse_priv *priv)
|
||||||
static gint
|
static gint
|
||||||
gst_parse_launch_cmdline(int argc,char *argv[],GstBin *parent,gst_parse_priv *priv)
|
gst_parse_launch_cmdline(int argc,char *argv[],GstBin *parent,gst_parse_priv *priv)
|
||||||
{
|
{
|
||||||
gint i = 0;
|
gint i = 0, j = 0;
|
||||||
gchar *arg;
|
gchar *arg;
|
||||||
GstElement *element = NULL, *previous = NULL, *prevelement = NULL;
|
GstElement *element = NULL, *previous = NULL, *prevelement = NULL;
|
||||||
gchar closingchar = '\0';
|
gchar closingchar = '\0';
|
||||||
gint len;
|
gint len;
|
||||||
gchar *ptr;
|
gchar *ptr;
|
||||||
gchar *sinkpadname = NULL, *srcpadname = NULL;
|
gchar *sinkpadname = NULL, *srcpadname = NULL, *tempname;
|
||||||
GstPad *sinkpad = NULL, *srcpad = NULL;
|
GstPad *temppad;
|
||||||
|
GSList *sinkpads = NULL, *srcpads = NULL;
|
||||||
|
gint numsrcpads = 0, numsinkpads = 0;
|
||||||
GList *pads;
|
GList *pads;
|
||||||
gint elementcount = 0;
|
gint elementcount = 0;
|
||||||
gint retval = 0;
|
gint retval = 0;
|
||||||
|
@ -163,31 +167,61 @@ gst_parse_launch_cmdline(int argc,char *argv[],GstBin *parent,gst_parse_priv *pr
|
||||||
|
|
||||||
GST_DEBUG(0,"have srcpad %s, sinkpad %s\n",srcpadname,sinkpadname);
|
GST_DEBUG(0,"have srcpad %s, sinkpad %s\n",srcpadname,sinkpadname);
|
||||||
|
|
||||||
srcpad = NULL;
|
g_slist_free(srcpads);
|
||||||
|
srcpads = NULL;
|
||||||
|
numsrcpads=0;
|
||||||
|
tempname=NULL;
|
||||||
|
|
||||||
// if the srcpadname doesn't have any commas in it, find an actual pad
|
// find src pads
|
||||||
if (!srcpadname || !strchr(srcpadname,',')) {
|
|
||||||
if (srcpadname != NULL) {
|
if (srcpadname != NULL) {
|
||||||
srcpad = gst_element_get_pad(previous,srcpadname);
|
while (1){
|
||||||
if (!srcpad) {
|
// split name at commas
|
||||||
GST_DEBUG(0,"NO SUCH pad %s in element %s\n",srcpadname,GST_ELEMENT_NAME(previous));
|
if ((ptr = strchr(srcpadname,','))){
|
||||||
|
tempname = g_strndup(srcpadname,(ptr-srcpadname));
|
||||||
|
srcpadname = &ptr[1];
|
||||||
|
} else {
|
||||||
|
tempname = srcpadname;
|
||||||
|
}
|
||||||
|
|
||||||
|
// look for pad with that name
|
||||||
|
if ((temppad = gst_element_get_pad(previous,tempname))){
|
||||||
|
srcpads = g_slist_append(srcpads,temppad);
|
||||||
|
numsrcpads++;
|
||||||
|
}
|
||||||
|
|
||||||
|
// try to create a pad using that padtemplate name
|
||||||
|
else if ((temppad = gst_element_request_pad_by_name(previous,tempname))) {
|
||||||
|
srcpads = g_slist_append(srcpads,temppad);
|
||||||
|
numsrcpads++;
|
||||||
|
}
|
||||||
|
if (!temppad) {
|
||||||
|
GST_DEBUG(0,"NO SUCH pad %s in element %s\n",tempname,GST_ELEMENT_NAME(previous));
|
||||||
|
} else {
|
||||||
|
GST_DEBUG(0,"have src pad %s:%s\n",GST_DEBUG_PAD_NAME(temppad));
|
||||||
|
}
|
||||||
|
|
||||||
|
// if there is no more commas in srcpadname then we're done
|
||||||
|
if (tempname == srcpadname) break;
|
||||||
|
g_free(tempname);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (srcpad == NULL) {
|
else {
|
||||||
// check through the list to find the first sink pad
|
// check through the list to find the first sink pad
|
||||||
GST_DEBUG(0,"CHECKING through element %s for pad named %s\n",GST_ELEMENT_NAME(previous),srcpadname);
|
GST_DEBUG(0,"CHECKING through element %s for pad named %s\n",GST_ELEMENT_NAME(previous),srcpadname);
|
||||||
pads = gst_element_get_pad_list(previous);
|
pads = gst_element_get_pad_list(previous);
|
||||||
while (pads) {
|
while (pads) {
|
||||||
srcpad = GST_PAD(pads->data);
|
temppad = GST_PARSE_LISTPAD(pads);
|
||||||
GST_DEBUG(0,"have pad %s:%s\n",GST_DEBUG_PAD_NAME(srcpad));
|
GST_DEBUG(0,"have pad %s:%s\n",GST_DEBUG_PAD_NAME(temppad));
|
||||||
if (GST_IS_GHOST_PAD(srcpad)) GST_DEBUG(0,"it's a ghost pad\n");
|
if (GST_IS_GHOST_PAD(temppad)) GST_DEBUG(0,"it's a ghost pad\n");
|
||||||
|
if (gst_pad_get_direction (temppad) == GST_PAD_SRC){
|
||||||
|
srcpads = g_slist_append(srcpads,temppad);
|
||||||
|
numsrcpads++;
|
||||||
|
break;
|
||||||
|
}
|
||||||
pads = g_list_next (pads);
|
pads = g_list_next (pads);
|
||||||
if (gst_pad_get_direction (srcpad) == GST_PAD_SRC) break;
|
|
||||||
srcpad = NULL;
|
|
||||||
}
|
|
||||||
if (!srcpad) GST_DEBUG(0,"error, can't find a src pad!!!\n");
|
|
||||||
else GST_DEBUG(0,"have src pad %s:%s\n",GST_DEBUG_PAD_NAME(srcpad));
|
|
||||||
}
|
}
|
||||||
|
if (!srcpads) GST_DEBUG(0,"error, can't find a src pad!!!\n");
|
||||||
|
else GST_DEBUG(0,"have src pad %s:%s\n",GST_DEBUG_PAD_NAME(GST_PARSE_LISTPAD(srcpads)));
|
||||||
}
|
}
|
||||||
|
|
||||||
// argument with = in it
|
// argument with = in it
|
||||||
|
@ -245,50 +279,91 @@ if (GST_IS_GHOST_PAD(srcpad)) GST_DEBUG(0,"it's a ghost pad\n");
|
||||||
gst_bin_add (GST_BIN (parent), element);
|
gst_bin_add (GST_BIN (parent), element);
|
||||||
elementcount++;
|
elementcount++;
|
||||||
|
|
||||||
if (srcpad != NULL || srcpadname != NULL) {
|
g_slist_free(sinkpads);
|
||||||
if (srcpad)
|
sinkpads = NULL;
|
||||||
DEBUG("need to connect to srcpad %s:%s\n",GST_DEBUG_PAD_NAME(srcpad));
|
numsinkpads=0;
|
||||||
|
tempname=NULL;
|
||||||
|
|
||||||
sinkpad = NULL;
|
// find sink pads
|
||||||
|
if (sinkpadname != NULL) {
|
||||||
|
while (1){
|
||||||
|
// split name at commas
|
||||||
|
if ((ptr = strchr(sinkpadname,','))){
|
||||||
|
tempname = g_strndup(sinkpadname,(ptr-sinkpadname));
|
||||||
|
sinkpadname = &ptr[1];
|
||||||
|
} else {
|
||||||
|
tempname = sinkpadname;
|
||||||
|
}
|
||||||
|
|
||||||
if (sinkpadname != NULL)
|
// look for pad with that name
|
||||||
sinkpad = gst_element_get_pad(previous,sinkpadname);
|
if ((temppad = gst_element_get_pad(element,tempname))){
|
||||||
|
sinkpads = g_slist_append(sinkpads,temppad);
|
||||||
|
numsinkpads++;
|
||||||
|
}
|
||||||
|
|
||||||
if (!sinkpad) {
|
// try to create a pad using that padtemplate name
|
||||||
|
else if ((temppad = gst_element_request_pad_by_name(element,tempname))) {
|
||||||
|
sinkpads = g_slist_append(sinkpads,temppad);
|
||||||
|
numsinkpads++;
|
||||||
|
}
|
||||||
|
if (!temppad) {
|
||||||
|
GST_DEBUG(0,"NO SUCH pad %s in element %s\n",tempname,GST_ELEMENT_NAME(element));
|
||||||
|
} else {
|
||||||
|
GST_DEBUG(0,"have sink pad %s:%s\n",GST_DEBUG_PAD_NAME(temppad));
|
||||||
|
}
|
||||||
|
|
||||||
|
// if there is no more commas in sinkpadname then we're done
|
||||||
|
if (tempname == sinkpadname) break;
|
||||||
|
g_free(tempname);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
// check through the list to find the first sink pad
|
// check through the list to find the first sink pad
|
||||||
pads = gst_element_get_pad_list(element);
|
pads = gst_element_get_pad_list(element);
|
||||||
while (pads) {
|
while (pads) {
|
||||||
sinkpad = GST_PAD(pads->data);
|
temppad = GST_PAD(pads->data);
|
||||||
pads = g_list_next (pads);
|
pads = g_list_next (pads);
|
||||||
if (gst_pad_get_direction (sinkpad) == GST_PAD_SINK) break;
|
if (gst_pad_get_direction (temppad) == GST_PAD_SINK){
|
||||||
sinkpad = NULL;
|
sinkpads = g_slist_append(sinkpads,temppad);
|
||||||
|
numsinkpads++;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!sinkpad) DEBUG("error, can't find a sink pad!!!\n");
|
if (!sinkpads) GST_DEBUG(0,"can't find a sink pad for %s\n", gst_element_get_name (previous));
|
||||||
else DEBUG("have sink pad %s:%s\n",GST_DEBUG_PAD_NAME(sinkpad));
|
else GST_DEBUG(0,"have sink pad %s:%s\n",GST_DEBUG_PAD_NAME(GST_PARSE_LISTPAD(sinkpads)));
|
||||||
|
|
||||||
if (!srcpad) {
|
if (!srcpads && sinkpads && previous) {
|
||||||
dyn_connect *connect = g_malloc (sizeof (dyn_connect));
|
dyn_connect *connect = g_malloc (sizeof (dyn_connect));
|
||||||
|
|
||||||
connect->srcpadname = srcpadname;
|
connect->srcpadname = srcpadname;
|
||||||
connect->target = sinkpad;
|
connect->target = GST_PARSE_LISTPAD(sinkpads);
|
||||||
|
|
||||||
GST_DEBUG(0,"SETTING UP dynamic connection %s:%s and %s:%s\n",gst_element_get_name (previous),
|
GST_DEBUG(0,"SETTING UP dynamic connection %s:%s and %s:%s\n",
|
||||||
srcpadname,GST_DEBUG_PAD_NAME(sinkpad));
|
gst_element_get_name (previous),
|
||||||
|
srcpadname,
|
||||||
|
GST_DEBUG_PAD_NAME(GST_PARSE_LISTPAD(sinkpads)));
|
||||||
|
|
||||||
g_signal_connectc (G_OBJECT (previous), "new_pad", dynamic_connect, connect, FALSE);
|
g_signal_connectc (G_OBJECT (previous), "new_pad", dynamic_connect, connect, FALSE);
|
||||||
g_signal_connectc (G_OBJECT (previous), "new_ghost_pad", dynamic_connect, connect, FALSE);
|
g_signal_connectc (G_OBJECT (previous), "new_ghost_pad", dynamic_connect, connect, FALSE);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
GST_DEBUG(0,"CONNECTING %s:%s and %s:%s\n",GST_DEBUG_PAD_NAME(srcpad),GST_DEBUG_PAD_NAME(sinkpad));
|
for (j=0; (j<numsrcpads) && (j<numsinkpads); j++){
|
||||||
gst_pad_connect(srcpad,sinkpad);
|
GST_DEBUG(0,"CONNECTING %s:%s and %s:%s\n",
|
||||||
|
GST_DEBUG_PAD_NAME(GST_PARSE_LISTPAD(g_slist_nth(srcpads,j))),
|
||||||
|
GST_DEBUG_PAD_NAME(GST_PARSE_LISTPAD(g_slist_nth(sinkpads,j))));
|
||||||
|
gst_pad_connect(
|
||||||
|
GST_PARSE_LISTPAD(g_slist_nth(srcpads,j)),
|
||||||
|
GST_PARSE_LISTPAD(g_slist_nth(sinkpads,j)));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sinkpad = NULL;
|
g_slist_free(srcpads);
|
||||||
srcpad = NULL;
|
srcpads = NULL;
|
||||||
}
|
|
||||||
|
|
||||||
|
g_slist_free(sinkpads);
|
||||||
|
sinkpads = NULL;
|
||||||
|
|
||||||
// thomas: if we're the first element, connect eos signal
|
// thomas: if we're the first element, connect eos signal
|
||||||
if (elementcount == 1)
|
if (elementcount == 1)
|
||||||
|
@ -302,14 +377,14 @@ if (GST_IS_GHOST_PAD(srcpad)) GST_DEBUG(0,"it's a ghost pad\n");
|
||||||
GST_ELEMENT_NAME(element),GST_ELEMENT_NAME(GST_ELEMENT(parent)));
|
GST_ELEMENT_NAME(element),GST_ELEMENT_NAME(GST_ELEMENT(parent)));
|
||||||
pads = gst_element_get_pad_list (element);
|
pads = gst_element_get_pad_list (element);
|
||||||
while (pads) {
|
while (pads) {
|
||||||
sinkpad = GST_PAD (pads->data);
|
temppad = GST_PAD (pads->data);
|
||||||
pads = g_list_next (pads);
|
pads = g_list_next (pads);
|
||||||
if (!sinkpad) DEBUG("much oddness, pad doesn't seem to exist\n");
|
if (!temppad) DEBUG("much oddness, pad doesn't seem to exist\n");
|
||||||
else if (gst_pad_get_direction (sinkpad) == GST_PAD_SINK) {
|
else if (gst_pad_get_direction (temppad) == GST_PAD_SINK) {
|
||||||
gst_element_add_ghost_pad (GST_ELEMENT (parent), sinkpad,
|
gst_element_add_ghost_pad (GST_ELEMENT (parent), temppad,
|
||||||
g_strdup_printf("%s-ghost",GST_PAD_NAME(sinkpad)));
|
g_strdup_printf("%s-ghost",GST_PAD_NAME(temppad)));
|
||||||
GST_DEBUG(0,"GHOSTED %s:%s to %s as %s-ghost\n",
|
GST_DEBUG(0,"GHOSTED %s:%s to %s as %s-ghost\n",
|
||||||
GST_DEBUG_PAD_NAME(sinkpad),GST_ELEMENT_NAME(GST_ELEMENT(parent)),GST_PAD_NAME(sinkpad));
|
GST_DEBUG_PAD_NAME(temppad),GST_ELEMENT_NAME(GST_ELEMENT(parent)),GST_PAD_NAME(temppad));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -327,14 +402,14 @@ g_strdup_printf("%s-ghost",GST_PAD_NAME(sinkpad)));
|
||||||
GST_ELEMENT_NAME(prevelement),GST_ELEMENT_NAME(GST_ELEMENT(parent)));
|
GST_ELEMENT_NAME(prevelement),GST_ELEMENT_NAME(GST_ELEMENT(parent)));
|
||||||
pads = gst_element_get_pad_list (prevelement);
|
pads = gst_element_get_pad_list (prevelement);
|
||||||
while (pads) {
|
while (pads) {
|
||||||
srcpad = GST_PAD (pads->data);
|
temppad = GST_PAD (pads->data);
|
||||||
pads = g_list_next (pads);
|
pads = g_list_next (pads);
|
||||||
if (!srcpad) DEBUG("much oddness, pad doesn't seem to exist\n");
|
if (!temppad) DEBUG("much oddness, pad doesn't seem to exist\n");
|
||||||
else if (gst_pad_get_direction (srcpad) == GST_PAD_SRC) {
|
else if (gst_pad_get_direction (temppad) == GST_PAD_SRC) {
|
||||||
gst_element_add_ghost_pad (GST_ELEMENT (parent), srcpad,
|
gst_element_add_ghost_pad (GST_ELEMENT (parent), temppad,
|
||||||
g_strdup_printf("%s-ghost",GST_PAD_NAME(srcpad)));
|
g_strdup_printf("%s-ghost",GST_PAD_NAME(temppad)));
|
||||||
GST_DEBUG(0,"GHOSTED %s:%s to %s as %s-ghost\n",
|
GST_DEBUG(0,"GHOSTED %s:%s to %s as %s-ghost\n",
|
||||||
GST_DEBUG_PAD_NAME(srcpad),GST_ELEMENT_NAME (parent),GST_PAD_NAME(srcpad));
|
GST_DEBUG_PAD_NAME(temppad),GST_ELEMENT_NAME (parent),GST_PAD_NAME(temppad));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -73,21 +73,21 @@ _gst_plugin_initialize (void)
|
||||||
_gst_plugin_paths = g_list_prepend (_gst_plugin_paths, PLUGINS_DIR);
|
_gst_plugin_paths = g_list_prepend (_gst_plugin_paths, PLUGINS_DIR);
|
||||||
|
|
||||||
/* if this is set, we add build-directory paths to the list */
|
/* if this is set, we add build-directory paths to the list */
|
||||||
#ifdef PLUGINS_USE_SRCDIR
|
#ifdef PLUGINS_USE_BUILDDIR
|
||||||
/* the catch-all plugins directory */
|
/* the catch-all plugins directory */
|
||||||
_gst_plugin_paths = g_list_prepend (_gst_plugin_paths,
|
_gst_plugin_paths = g_list_prepend (_gst_plugin_paths,
|
||||||
PLUGINS_SRCDIR "/plugins");
|
PLUGINS_BUILDDIR "/plugins");
|
||||||
/* the libreary directory */
|
/* the libreary directory */
|
||||||
_gst_plugin_paths = g_list_prepend (_gst_plugin_paths,
|
_gst_plugin_paths = g_list_prepend (_gst_plugin_paths,
|
||||||
PLUGINS_SRCDIR "/libs");
|
PLUGINS_BUILDDIR "/libs");
|
||||||
/* location libgstelements.so */
|
/* location libgstelements.so */
|
||||||
_gst_plugin_paths = g_list_prepend (_gst_plugin_paths,
|
_gst_plugin_paths = g_list_prepend (_gst_plugin_paths,
|
||||||
PLUGINS_SRCDIR "/gst/elements");
|
PLUGINS_BUILDDIR "/gst/elements");
|
||||||
_gst_plugin_paths = g_list_prepend (_gst_plugin_paths,
|
_gst_plugin_paths = g_list_prepend (_gst_plugin_paths,
|
||||||
PLUGINS_SRCDIR "/gst/types");
|
PLUGINS_BUILDDIR "/gst/types");
|
||||||
_gst_plugin_paths = g_list_prepend (_gst_plugin_paths,
|
_gst_plugin_paths = g_list_prepend (_gst_plugin_paths,
|
||||||
PLUGINS_SRCDIR "/gst/autoplug");
|
PLUGINS_BUILDDIR "/gst/autoplug");
|
||||||
#endif /* PLUGINS_USE_SRCDIR */
|
#endif /* PLUGINS_USE_BUILDDIR */
|
||||||
|
|
||||||
doc = xmlParseFile (GST_CONFIG_DIR"/reg.xml");
|
doc = xmlParseFile (GST_CONFIG_DIR"/reg.xml");
|
||||||
|
|
||||||
|
|
184
gst/gstprops.c
184
gst/gstprops.c
|
@ -55,6 +55,9 @@ gst_props_debug_entry (GstPropsEntry *entry)
|
||||||
case GST_PROPS_INT_ID:
|
case GST_PROPS_INT_ID:
|
||||||
GST_DEBUG (GST_CAT_PROPERTIES, "%d\n", entry->data.int_data);
|
GST_DEBUG (GST_CAT_PROPERTIES, "%d\n", entry->data.int_data);
|
||||||
break;
|
break;
|
||||||
|
case GST_PROPS_FLOAT_ID:
|
||||||
|
GST_DEBUG (GST_CAT_PROPERTIES, "%f\n", entry->data.float_data);
|
||||||
|
break;
|
||||||
case GST_PROPS_FOURCC_ID:
|
case GST_PROPS_FOURCC_ID:
|
||||||
GST_DEBUG (GST_CAT_PROPERTIES, "%4.4s\n", (gchar*)&entry->data.fourcc_data);
|
GST_DEBUG (GST_CAT_PROPERTIES, "%4.4s\n", (gchar*)&entry->data.fourcc_data);
|
||||||
break;
|
break;
|
||||||
|
@ -68,6 +71,12 @@ gst_props_debug_entry (GstPropsEntry *entry)
|
||||||
GST_DEBUG (GST_CAT_PROPERTIES, "%d-%d\n", entry->data.int_range_data.min,
|
GST_DEBUG (GST_CAT_PROPERTIES, "%d-%d\n", entry->data.int_range_data.min,
|
||||||
entry->data.int_range_data.max);
|
entry->data.int_range_data.max);
|
||||||
break;
|
break;
|
||||||
|
case GST_PROPS_FLOAT_RANGE_ID:
|
||||||
|
GST_DEBUG (GST_CAT_PROPERTIES, "%f-%f\n", entry->data.float_range_data.min,
|
||||||
|
entry->data.float_range_data.max);
|
||||||
|
break;
|
||||||
|
case GST_PROPS_LIST_ID:
|
||||||
|
GST_DEBUG (GST_CAT_PROPERTIES, "[list]\n");
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -153,6 +162,129 @@ gst_props_new (const gchar *firstname, ...)
|
||||||
return props;
|
return props;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gst_props_add_to_list:
|
||||||
|
* @entries: the existing list of entries
|
||||||
|
* @entry: the new entry to add to the list
|
||||||
|
*
|
||||||
|
* Add a property to a list of properties.
|
||||||
|
*
|
||||||
|
* Returns: a pointer to a list with the new entry added.
|
||||||
|
*/
|
||||||
|
static GList *
|
||||||
|
gst_props_add_to_list (GList * entries, GstPropsEntry *entry)
|
||||||
|
{
|
||||||
|
return g_list_prepend (entries, entry);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gst_props_merge_int_entries:
|
||||||
|
* @newentry: the new entry
|
||||||
|
* @oldentry: an old entry
|
||||||
|
*
|
||||||
|
* Tries to merge oldentry into newentry, if there is a simpler single entry which represents
|
||||||
|
*
|
||||||
|
* Assumes that the entries are either ints or int ranges.
|
||||||
|
*
|
||||||
|
* Returns: TRUE if the entries were merged, FALSE otherwise.
|
||||||
|
*/
|
||||||
|
static gboolean
|
||||||
|
gst_props_merge_int_entries(GstPropsEntry * newentry, GstPropsEntry * oldentry)
|
||||||
|
{
|
||||||
|
gint new_min, new_max, old_min, old_max;
|
||||||
|
gboolean can_merge = FALSE;
|
||||||
|
|
||||||
|
if (newentry->propstype == GST_PROPS_INT_ID) {
|
||||||
|
new_min = newentry->data.int_data;
|
||||||
|
new_max = newentry->data.int_data;
|
||||||
|
} else {
|
||||||
|
new_min = newentry->data.int_range_data.min;
|
||||||
|
new_max = newentry->data.int_range_data.max;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (oldentry->propstype == GST_PROPS_INT_ID) {
|
||||||
|
old_min = oldentry->data.int_data;
|
||||||
|
old_max = oldentry->data.int_data;
|
||||||
|
} else {
|
||||||
|
old_min = oldentry->data.int_range_data.min;
|
||||||
|
old_max = oldentry->data.int_range_data.max;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Put range which starts lower into (new_min, new_max)
|
||||||
|
if (old_min < new_min) {
|
||||||
|
gint tmp;
|
||||||
|
tmp = old_min;
|
||||||
|
old_min = new_min;
|
||||||
|
new_min = tmp;
|
||||||
|
tmp = old_max;
|
||||||
|
old_max = new_max;
|
||||||
|
new_max = tmp;
|
||||||
|
}
|
||||||
|
|
||||||
|
// new_min is min of either entry - second half of the following conditional
|
||||||
|
// is to avoid overflow problems.
|
||||||
|
if (new_max >= old_min - 1 && old_min - 1 < old_min) {
|
||||||
|
// ranges overlap, or are adjacent. Pick biggest maximum.
|
||||||
|
can_merge = TRUE;
|
||||||
|
if (old_max > new_max) new_max = old_max;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (can_merge) {
|
||||||
|
if (new_min == new_max) {
|
||||||
|
newentry->propstype = GST_PROPS_INT_ID;
|
||||||
|
newentry->data.int_data = new_min;
|
||||||
|
} else {
|
||||||
|
newentry->propstype = GST_PROPS_INT_RANGE_ID;
|
||||||
|
newentry->data.int_range_data.min = new_min;
|
||||||
|
newentry->data.int_range_data.max = new_max;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return can_merge;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gst_props_add_to_int_list:
|
||||||
|
* @entries: the existing list of entries
|
||||||
|
* @entry: the new entry to add to the list
|
||||||
|
*
|
||||||
|
* Add an integer property to a list of properties, removing duplicates
|
||||||
|
* and merging ranges.
|
||||||
|
*
|
||||||
|
* Assumes that the existing list is in simplest form, contains
|
||||||
|
* only ints and int ranges, and that the new entry is an int or
|
||||||
|
* an int range.
|
||||||
|
*
|
||||||
|
* Returns: a pointer to a list with the new entry added.
|
||||||
|
*/
|
||||||
|
static GList *
|
||||||
|
gst_props_add_to_int_list (GList * entries, GstPropsEntry * newentry)
|
||||||
|
{
|
||||||
|
GList * i;
|
||||||
|
|
||||||
|
i = entries;
|
||||||
|
while (i) {
|
||||||
|
GstPropsEntry * oldentry = (GstPropsEntry *)(i->data);
|
||||||
|
gboolean merged = gst_props_merge_int_entries(newentry, oldentry);
|
||||||
|
|
||||||
|
if (merged) {
|
||||||
|
// replace the existing one with the merged one
|
||||||
|
g_mutex_lock (_gst_props_entries_chunk_lock);
|
||||||
|
g_mem_chunk_free (_gst_props_entries_chunk, oldentry);
|
||||||
|
g_mutex_unlock (_gst_props_entries_chunk_lock);
|
||||||
|
entries = g_list_remove_link (entries, i);
|
||||||
|
g_list_free_1 (i);
|
||||||
|
|
||||||
|
// start again: it's possible that this change made an earlier entry
|
||||||
|
// mergeable, and the pointer is now invalid anyway.
|
||||||
|
i = entries;
|
||||||
|
}
|
||||||
|
|
||||||
|
i = g_list_next (i);
|
||||||
|
}
|
||||||
|
|
||||||
|
return gst_props_add_to_list (entries, newentry);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gst_props_newv:
|
* gst_props_newv:
|
||||||
* @firstname: the first property name
|
* @firstname: the first property name
|
||||||
|
@ -170,6 +302,18 @@ gst_props_newv (const gchar *firstname, va_list var_args)
|
||||||
const gchar *prop_name;
|
const gchar *prop_name;
|
||||||
GstPropsEntry *list_entry = NULL;
|
GstPropsEntry *list_entry = NULL;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
GST_PROPS_LIST_T_UNSET,
|
||||||
|
GST_PROPS_LIST_T_INTS,
|
||||||
|
GST_PROPS_LIST_T_FLOATS,
|
||||||
|
GST_PROPS_LIST_T_MISC,
|
||||||
|
} list_types;
|
||||||
|
|
||||||
|
// type of the list
|
||||||
|
list_types list_type = GST_PROPS_LIST_T_UNSET;
|
||||||
|
// type of current item
|
||||||
|
list_types entry_type = GST_PROPS_LIST_T_UNSET;
|
||||||
|
|
||||||
if (firstname == NULL)
|
if (firstname == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
@ -196,20 +340,40 @@ gst_props_newv (const gchar *firstname, va_list var_args)
|
||||||
switch (entry->propstype) {
|
switch (entry->propstype) {
|
||||||
case GST_PROPS_INT_ID:
|
case GST_PROPS_INT_ID:
|
||||||
case GST_PROPS_INT_RANGE_ID:
|
case GST_PROPS_INT_RANGE_ID:
|
||||||
|
entry_type = GST_PROPS_LIST_T_INTS;
|
||||||
|
break;
|
||||||
case GST_PROPS_FLOAT_ID:
|
case GST_PROPS_FLOAT_ID:
|
||||||
case GST_PROPS_FLOAT_RANGE_ID:
|
case GST_PROPS_FLOAT_RANGE_ID:
|
||||||
|
entry_type = GST_PROPS_LIST_T_FLOATS;
|
||||||
|
break;
|
||||||
case GST_PROPS_FOURCC_ID:
|
case GST_PROPS_FOURCC_ID:
|
||||||
case GST_PROPS_BOOL_ID:
|
case GST_PROPS_BOOL_ID:
|
||||||
case GST_PROPS_STRING_ID:
|
case GST_PROPS_STRING_ID:
|
||||||
|
entry_type = GST_PROPS_LIST_T_MISC;
|
||||||
break;
|
break;
|
||||||
case GST_PROPS_LIST_ID:
|
case GST_PROPS_LIST_ID:
|
||||||
g_return_val_if_fail (inlist == FALSE, NULL);
|
g_return_val_if_fail (inlist == FALSE, NULL);
|
||||||
inlist = TRUE;
|
inlist = TRUE;
|
||||||
list_entry = entry;
|
list_entry = entry;
|
||||||
|
list_type = GST_PROPS_LIST_T_UNSET;
|
||||||
list_entry->data.list_data.entries = NULL;
|
list_entry->data.list_data.entries = NULL;
|
||||||
break;
|
break;
|
||||||
case GST_PROPS_END_ID:
|
case GST_PROPS_END_ID:
|
||||||
g_return_val_if_fail (inlist == TRUE, NULL);
|
g_return_val_if_fail (inlist == TRUE, NULL);
|
||||||
|
|
||||||
|
// if list was of size 1, replace the list by a the item it contains
|
||||||
|
if (g_list_length(list_entry->data.list_data.entries) == 1) {
|
||||||
|
GstPropsEntry * subentry = (GstPropsEntry *)(list_entry->data.list_data.entries->data);
|
||||||
|
list_entry->propstype = subentry->propstype;
|
||||||
|
list_entry->data = subentry->data;
|
||||||
|
g_mutex_lock (_gst_props_entries_chunk_lock);
|
||||||
|
g_mem_chunk_free (_gst_props_entries_chunk, subentry);
|
||||||
|
g_mutex_unlock (_gst_props_entries_chunk_lock);
|
||||||
|
}
|
||||||
|
|
||||||
|
g_mutex_lock (_gst_props_entries_chunk_lock);
|
||||||
|
g_mem_chunk_free (_gst_props_entries_chunk, entry);
|
||||||
|
g_mutex_unlock (_gst_props_entries_chunk_lock);
|
||||||
inlist = FALSE;
|
inlist = FALSE;
|
||||||
list_entry = NULL;
|
list_entry = NULL;
|
||||||
prop_name = va_arg (var_args, gchar*);
|
prop_name = va_arg (var_args, gchar*);
|
||||||
|
@ -223,7 +387,21 @@ gst_props_newv (const gchar *firstname, va_list var_args)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (inlist && (list_entry != entry)) {
|
if (inlist && (list_entry != entry)) {
|
||||||
list_entry->data.list_data.entries = g_list_prepend (list_entry->data.list_data.entries, entry);
|
if (list_type == GST_PROPS_LIST_T_UNSET) list_type = entry_type;
|
||||||
|
if (list_type != entry_type) {
|
||||||
|
g_warning ("property list contained incompatible entry types\n");
|
||||||
|
} else {
|
||||||
|
switch (list_type) {
|
||||||
|
case GST_PROPS_LIST_T_INTS:
|
||||||
|
list_entry->data.list_data.entries =
|
||||||
|
gst_props_add_to_int_list (list_entry->data.list_data.entries, entry);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
list_entry->data.list_data.entries =
|
||||||
|
gst_props_add_to_list (list_entry->data.list_data.entries, entry);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
props->properties = g_list_insert_sorted (props->properties, entry, props_compare_func);
|
props->properties = g_list_insert_sorted (props->properties, entry, props_compare_func);
|
||||||
|
@ -621,6 +799,8 @@ gst_props_entry_check_compatibility (GstPropsEntry *entry1, GstPropsEntry *entry
|
||||||
{
|
{
|
||||||
GST_DEBUG (GST_CAT_PROPERTIES,"compare: %s %s\n", g_quark_to_string (entry1->propid),
|
GST_DEBUG (GST_CAT_PROPERTIES,"compare: %s %s\n", g_quark_to_string (entry1->propid),
|
||||||
g_quark_to_string (entry2->propid));
|
g_quark_to_string (entry2->propid));
|
||||||
|
gst_props_debug_entry (entry1);
|
||||||
|
gst_props_debug_entry (entry2);
|
||||||
switch (entry1->propstype) {
|
switch (entry1->propstype) {
|
||||||
case GST_PROPS_LIST_ID:
|
case GST_PROPS_LIST_ID:
|
||||||
{
|
{
|
||||||
|
@ -806,6 +986,7 @@ end:
|
||||||
return compatible;
|
return compatible;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef GST_DISABLE_XML
|
||||||
static xmlNodePtr
|
static xmlNodePtr
|
||||||
gst_props_save_thyself_func (GstPropsEntry *entry, xmlNodePtr parent)
|
gst_props_save_thyself_func (GstPropsEntry *entry, xmlNodePtr parent)
|
||||||
{
|
{
|
||||||
|
@ -1060,3 +1241,4 @@ gst_props_load_thyself (xmlNodePtr parent)
|
||||||
|
|
||||||
return props;
|
return props;
|
||||||
}
|
}
|
||||||
|
#endif // GST_DISABLE_XML
|
||||||
|
|
|
@ -116,7 +116,7 @@ gst_schedule_src_wrapper (int argc,char *argv[])
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_DEBUG (GST_CAT_DATAFLOW,"calling gst_pad_push on pad %s:%s\n",GST_DEBUG_PAD_NAME(realpad));
|
GST_DEBUG (GST_CAT_DATAFLOW,"calling gst_pad_push on pad %s:%s\n",GST_DEBUG_PAD_NAME(realpad));
|
||||||
if (buf) gst_pad_push ((GstPad*)realpad, buf);
|
gst_pad_push ((GstPad*)realpad, buf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} while (!GST_ELEMENT_IS_COTHREAD_STOPPING(element));
|
} while (!GST_ELEMENT_IS_COTHREAD_STOPPING(element));
|
||||||
|
|
|
@ -68,8 +68,10 @@ static void gst_thread_get_property (GObject *object, guint prop_id, GValue *
|
||||||
|
|
||||||
static GstElementStateReturn gst_thread_change_state (GstElement *element);
|
static GstElementStateReturn gst_thread_change_state (GstElement *element);
|
||||||
|
|
||||||
|
#ifndef GST_DISABLE_XML
|
||||||
static xmlNodePtr gst_thread_save_thyself (GstObject *object, xmlNodePtr parent);
|
static xmlNodePtr gst_thread_save_thyself (GstObject *object, xmlNodePtr parent);
|
||||||
static void gst_thread_restore_thyself (GstObject *object, xmlNodePtr self);
|
static void gst_thread_restore_thyself (GstObject *object, xmlNodePtr self);
|
||||||
|
#endif
|
||||||
|
|
||||||
static void gst_thread_signal_thread (GstThread *thread, gboolean spinning);
|
static void gst_thread_signal_thread (GstThread *thread, gboolean spinning);
|
||||||
|
|
||||||
|
@ -121,8 +123,10 @@ gst_thread_class_init (GstThreadClass *klass)
|
||||||
// FIXME!
|
// FIXME!
|
||||||
// gobject_class->destroy = gst_thread_real_destroy;
|
// gobject_class->destroy = gst_thread_real_destroy;
|
||||||
|
|
||||||
|
#ifndef GST_DISABLE_XML
|
||||||
gstobject_class->save_thyself = gst_thread_save_thyself;
|
gstobject_class->save_thyself = gst_thread_save_thyself;
|
||||||
gstobject_class->restore_thyself = gst_thread_restore_thyself;
|
gstobject_class->restore_thyself = gst_thread_restore_thyself;
|
||||||
|
#endif
|
||||||
|
|
||||||
gstelement_class->change_state = gst_thread_change_state;
|
gstelement_class->change_state = gst_thread_change_state;
|
||||||
|
|
||||||
|
@ -670,6 +674,16 @@ gst_thread_signal_thread (GstThread *thread, gboolean spinning)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef GST_DISABLE_XML
|
||||||
|
static xmlNodePtr
|
||||||
|
gst_thread_save_thyself (GstObject *object,
|
||||||
|
xmlNodePtr self)
|
||||||
|
{
|
||||||
|
if (GST_OBJECT_CLASS (parent_class)->save_thyself)
|
||||||
|
GST_OBJECT_CLASS (parent_class)->save_thyself (object, self);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_thread_restore_thyself (GstObject *object,
|
gst_thread_restore_thyself (GstObject *object,
|
||||||
xmlNodePtr self)
|
xmlNodePtr self)
|
||||||
|
@ -679,12 +693,4 @@ gst_thread_restore_thyself (GstObject *object,
|
||||||
if (GST_OBJECT_CLASS (parent_class)->restore_thyself)
|
if (GST_OBJECT_CLASS (parent_class)->restore_thyself)
|
||||||
GST_OBJECT_CLASS (parent_class)->restore_thyself (object, self);
|
GST_OBJECT_CLASS (parent_class)->restore_thyself (object, self);
|
||||||
}
|
}
|
||||||
|
#endif // GST_DISABLE_XML
|
||||||
static xmlNodePtr
|
|
||||||
gst_thread_save_thyself (GstObject *object,
|
|
||||||
xmlNodePtr self)
|
|
||||||
{
|
|
||||||
if (GST_OBJECT_CLASS (parent_class)->save_thyself)
|
|
||||||
GST_OBJECT_CLASS (parent_class)->save_thyself (object, self);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,3 +1,44 @@
|
||||||
|
2001-06-12 Arik Devens <adevens@antioch-college.edu>
|
||||||
|
|
||||||
|
* gstmediaplay.glade: Added a basic preferences dialog, not hooked
|
||||||
|
up yet.
|
||||||
|
|
||||||
|
* callbacks.c (on_preferences1_activate): Added loading the new
|
||||||
|
preferences dialog.
|
||||||
|
|
||||||
|
* Makefile.am: Removed full-screen.[c,h] from the build.
|
||||||
|
|
||||||
|
* full-screen.h: Removed this file, no longer needed.
|
||||||
|
|
||||||
|
* full-screen.c: Removed this file, no longer needed.
|
||||||
|
|
||||||
|
* gstplay.c (gst_play_get_video_widget): New function to return
|
||||||
|
the actual video_widget.
|
||||||
|
(gst_play_get_source_width): New function to get the width of the
|
||||||
|
source media.
|
||||||
|
(gst_play_get_source_height): New function to get the height of
|
||||||
|
the source media.
|
||||||
|
(gst_play_set_uri): Added check to make sure the file we are
|
||||||
|
trying to play actually exists. i wonder if this fails with
|
||||||
|
gnomevfs?
|
||||||
|
|
||||||
|
* callbacks.c (on_original_size_activate): Use the new function.
|
||||||
|
(on_double_size_activate): Use the new function.
|
||||||
|
(on_full_screen_activate): Use the new function.
|
||||||
|
|
||||||
|
* gstmediaplay.h (gst_media_play_set_fullscreen): Added function
|
||||||
|
prototypes for the new functions.
|
||||||
|
|
||||||
|
* gstmediaplay.c (gst_media_play_start_uri): Added a check for the
|
||||||
|
return value of set_uri so that we don't crash on not being able
|
||||||
|
to load a file.
|
||||||
|
(gst_media_play_set_original_size): New function to size the
|
||||||
|
video_widget to its default size.
|
||||||
|
(gst_media_play_set_fullscreen): New function to do
|
||||||
|
full-screen. Still a hack but at least this one works.
|
||||||
|
(gst_media_play_set_double_size): New function to size the
|
||||||
|
video_widget to double its default size.
|
||||||
|
|
||||||
2001-06-06 Arik Devens <arik@gnome.org>
|
2001-06-06 Arik Devens <arik@gnome.org>
|
||||||
|
|
||||||
* gstmediaplay.glade: Dissabled full-screen for the moment till it
|
* gstmediaplay.glade: Dissabled full-screen for the moment till it
|
||||||
|
|
|
@ -20,8 +20,7 @@ libgstmediaplay_la_SOURCES = \
|
||||||
gstplay.c \
|
gstplay.c \
|
||||||
gstmediaplay.c \
|
gstmediaplay.c \
|
||||||
gststatusarea.c \
|
gststatusarea.c \
|
||||||
callbacks.c \
|
callbacks.c
|
||||||
full-screen.c
|
|
||||||
|
|
||||||
gstmediaplay_SOURCES = \
|
gstmediaplay_SOURCES = \
|
||||||
main.c
|
main.c
|
||||||
|
@ -34,9 +33,7 @@ noinst_HEADERS = \
|
||||||
gstmediaplay.h \
|
gstmediaplay.h \
|
||||||
gststatusarea.h \
|
gststatusarea.h \
|
||||||
callbacks.h \
|
callbacks.h \
|
||||||
gstplayprivate.h \
|
gstplayprivate.h
|
||||||
full-screen.h
|
|
||||||
|
|
||||||
|
|
||||||
libgstmediaplay_la_LDFLAGS = -rdynamic
|
libgstmediaplay_la_LDFLAGS = -rdynamic
|
||||||
|
|
||||||
|
|
|
@ -35,42 +35,43 @@ void
|
||||||
on_original_size_activate (GtkMenuItem *menuitem, gpointer user_data)
|
on_original_size_activate (GtkMenuItem *menuitem, gpointer user_data)
|
||||||
{
|
{
|
||||||
GstMediaPlay *mplay;
|
GstMediaPlay *mplay;
|
||||||
GstPlay *play;
|
|
||||||
|
|
||||||
mplay = GST_MEDIA_PLAY (user_data);
|
mplay = GST_MEDIA_PLAY (user_data);
|
||||||
play = mplay->play;
|
|
||||||
|
|
||||||
gst_play_set_display_size (play, 0);
|
gst_media_play_set_original_size (mplay);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
on_double_size_activate (GtkMenuItem *menuitem, gpointer user_data)
|
on_double_size_activate (GtkMenuItem *menuitem, gpointer user_data)
|
||||||
{
|
{
|
||||||
GstMediaPlay *mplay;
|
GstMediaPlay *mplay;
|
||||||
GstPlay *play;
|
|
||||||
|
|
||||||
mplay = GST_MEDIA_PLAY (user_data);
|
mplay = GST_MEDIA_PLAY (user_data);
|
||||||
play = mplay->play;
|
|
||||||
|
|
||||||
gst_play_set_display_size (play, 1);
|
gst_media_play_set_double_size (mplay);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
on_full_screen_activate (GtkMenuItem *menuitem, gpointer user_data)
|
on_full_screen_activate (GtkMenuItem *menuitem, gpointer user_data)
|
||||||
{
|
{
|
||||||
GstMediaPlay *mplay;
|
GstMediaPlay *mplay;
|
||||||
GstPlay *play;
|
|
||||||
|
|
||||||
mplay = GST_MEDIA_PLAY (user_data);
|
mplay = GST_MEDIA_PLAY (user_data);
|
||||||
play = mplay->play;
|
|
||||||
|
|
||||||
gst_play_set_display_size (play, 2);
|
gst_media_play_set_fullscreen (mplay);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
on_preferences1_activate (GtkMenuItem *menuitem, gpointer user_data)
|
on_preferences1_activate (GtkMenuItem *menuitem, gpointer user_data)
|
||||||
{
|
{
|
||||||
printf ("file1 activate\n");
|
GladeXML *xml;
|
||||||
|
struct stat statbuf;
|
||||||
|
|
||||||
|
if (stat (DATADIR"gstmediaplay.glade", &statbuf) == 0) {
|
||||||
|
xml = glade_xml_new (DATADIR"gstmediaplay.glade", "preferences");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
xml = glade_xml_new ("gstmediaplay.glade", "preferences");
|
||||||
}
|
}
|
||||||
|
|
||||||
void on_about_activate (GtkWidget *widget, gpointer data)
|
void on_about_activate (GtkWidget *widget, gpointer data)
|
||||||
|
|
|
@ -1,247 +0,0 @@
|
||||||
#include <config.h>
|
|
||||||
#include <gdk/gdkkeysyms.h>
|
|
||||||
#include <gtk/gtkmain.h>
|
|
||||||
#include "full-screen.h"
|
|
||||||
#include "gstplay.h"
|
|
||||||
|
|
||||||
/* Private part of the FullScreen structure */
|
|
||||||
struct _FullScreenPrivate {
|
|
||||||
GstPlay *play;
|
|
||||||
|
|
||||||
/* Whether we have a keyboard grab */
|
|
||||||
guint have_grab : 1;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static void full_screen_class_init (FullScreenClass *class);
|
|
||||||
static void full_screen_init (FullScreen *fs);
|
|
||||||
static void full_screen_finalize (GtkObject *object);
|
|
||||||
|
|
||||||
static void full_screen_show (GtkWidget *widget);
|
|
||||||
static void full_screen_hide (GtkWidget *widget);
|
|
||||||
|
|
||||||
static gint full_screen_key_press (GtkWidget *widget, GdkEventKey *event);
|
|
||||||
|
|
||||||
static GtkWindowClass *parent_class;
|
|
||||||
|
|
||||||
/**
|
|
||||||
|
|
||||||
* @void:
|
|
||||||
*
|
|
||||||
* Registers the #FullScreen class if necessary, and returns the type ID
|
|
||||||
* associated to it.
|
|
||||||
*
|
|
||||||
* Return value: The type ID of the #FullScreen class.
|
|
||||||
**/
|
|
||||||
GtkType
|
|
||||||
full_screen_get_type (void)
|
|
||||||
{
|
|
||||||
static GtkType full_screen_type = 0;
|
|
||||||
|
|
||||||
if (!full_screen_type) {
|
|
||||||
static GtkTypeInfo full_screen_info = {
|
|
||||||
"FullScreen",
|
|
||||||
sizeof (FullScreen),
|
|
||||||
sizeof (FullScreenClass),
|
|
||||||
(GtkClassInitFunc) full_screen_class_init,
|
|
||||||
(GtkObjectInitFunc) full_screen_init,
|
|
||||||
NULL, /* reserved_1 */
|
|
||||||
NULL, /* reserved_2 */
|
|
||||||
(GtkClassInitFunc) NULL
|
|
||||||
};
|
|
||||||
|
|
||||||
full_screen_type = gtk_type_unique (GTK_TYPE_WINDOW, &full_screen_info);
|
|
||||||
}
|
|
||||||
|
|
||||||
return full_screen_type;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Class initialization function for the full screen mode */
|
|
||||||
static void
|
|
||||||
full_screen_class_init (FullScreenClass *class)
|
|
||||||
{
|
|
||||||
GtkObjectClass *object_class;
|
|
||||||
GtkWidgetClass *widget_class;
|
|
||||||
|
|
||||||
object_class = (GtkObjectClass *) class;
|
|
||||||
widget_class = (GtkWidgetClass *) class;
|
|
||||||
|
|
||||||
parent_class = gtk_type_class (GTK_TYPE_WINDOW);
|
|
||||||
|
|
||||||
object_class->finalize = full_screen_finalize;
|
|
||||||
|
|
||||||
widget_class->show = full_screen_show;
|
|
||||||
widget_class->hide = full_screen_hide;
|
|
||||||
widget_class->key_press_event = full_screen_key_press;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Object initialization function for the full screen view */
|
|
||||||
static void
|
|
||||||
full_screen_init (FullScreen *fs)
|
|
||||||
{
|
|
||||||
FullScreenPrivate *priv;
|
|
||||||
|
|
||||||
priv = g_new0 (FullScreenPrivate, 1);
|
|
||||||
fs->priv = priv;
|
|
||||||
|
|
||||||
GTK_WINDOW (fs)->type = GTK_WINDOW_POPUP;
|
|
||||||
g_assert (fs != NULL);
|
|
||||||
gtk_widget_set_usize (GTK_WIDGET (fs), gdk_screen_width (), gdk_screen_height ());
|
|
||||||
gtk_widget_set_uposition (GTK_WIDGET (fs), 0, 0);
|
|
||||||
|
|
||||||
priv->play = gst_play_new();
|
|
||||||
gtk_container_add (GTK_CONTAINER (fs), GTK_WIDGET (priv->play));
|
|
||||||
gtk_widget_show (priv->play);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Finalize handler for the full screen view */
|
|
||||||
static void
|
|
||||||
full_screen_finalize (GtkObject *object)
|
|
||||||
{
|
|
||||||
FullScreen *fs;
|
|
||||||
FullScreenPrivate *priv;
|
|
||||||
|
|
||||||
g_return_if_fail (object != NULL);
|
|
||||||
g_return_if_fail (IS_FULL_SCREEN (object));
|
|
||||||
|
|
||||||
fs = FULL_SCREEN (object);
|
|
||||||
priv = fs->priv;
|
|
||||||
|
|
||||||
g_free (priv);
|
|
||||||
fs->priv = NULL;
|
|
||||||
|
|
||||||
if (GTK_OBJECT_CLASS (parent_class)->finalize)
|
|
||||||
(* GTK_OBJECT_CLASS (parent_class)->finalize) (object);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Widget methods */
|
|
||||||
|
|
||||||
/* Show handler for the full screen view */
|
|
||||||
static void
|
|
||||||
full_screen_show (GtkWidget *widget)
|
|
||||||
{
|
|
||||||
FullScreen *fs;
|
|
||||||
FullScreenPrivate *priv;
|
|
||||||
|
|
||||||
fs = FULL_SCREEN (widget);
|
|
||||||
priv = fs->priv;
|
|
||||||
|
|
||||||
if (GTK_WIDGET_CLASS (parent_class)->show)
|
|
||||||
(* GTK_WIDGET_CLASS (parent_class)->show) (widget);
|
|
||||||
|
|
||||||
priv->have_grab = gdk_keyboard_grab (widget->window, TRUE, GDK_CURRENT_TIME) == 0;
|
|
||||||
gtk_grab_add (widget);
|
|
||||||
|
|
||||||
//gtk_widget_grab_focus (ui_image_get_image_view (UI_IMAGE (priv->ui)));
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Hide handler for the full screen view */
|
|
||||||
static void
|
|
||||||
full_screen_hide (GtkWidget *widget)
|
|
||||||
{
|
|
||||||
FullScreen *fs;
|
|
||||||
FullScreenPrivate *priv;
|
|
||||||
|
|
||||||
fs = FULL_SCREEN (widget);
|
|
||||||
priv = fs->priv;
|
|
||||||
|
|
||||||
if (priv->have_grab) {
|
|
||||||
priv->have_grab = FALSE;
|
|
||||||
gdk_keyboard_ungrab (GDK_CURRENT_TIME);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (GTK_WIDGET_CLASS (parent_class)->show)
|
|
||||||
(* GTK_WIDGET_CLASS (parent_class)->show) (widget);
|
|
||||||
|
|
||||||
gtk_widget_destroy (widget);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Key press handler for the full screen view */
|
|
||||||
static gint
|
|
||||||
full_screen_key_press (GtkWidget *widget, GdkEventKey *event)
|
|
||||||
{
|
|
||||||
gint result;
|
|
||||||
gboolean do_hide;
|
|
||||||
|
|
||||||
result = FALSE;
|
|
||||||
|
|
||||||
if (GTK_WIDGET_CLASS (parent_class)->key_press_event)
|
|
||||||
result = (* GTK_WIDGET_CLASS (parent_class)->key_press_event) (widget, event);
|
|
||||||
|
|
||||||
if (result)
|
|
||||||
return result;
|
|
||||||
|
|
||||||
do_hide = FALSE;
|
|
||||||
|
|
||||||
switch (event->keyval) {
|
|
||||||
case GDK_Escape:
|
|
||||||
do_hide = TRUE;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case GDK_W:
|
|
||||||
case GDK_w:
|
|
||||||
if (event->state & GDK_CONTROL_MASK)
|
|
||||||
do_hide = TRUE;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case GDK_Q:
|
|
||||||
case GDK_q:
|
|
||||||
do_hide = TRUE;
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (do_hide)
|
|
||||||
gtk_widget_hide (widget);
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* full_screen_new:
|
|
||||||
* @void:
|
|
||||||
*
|
|
||||||
* Creates a new empty full screen image viewer.
|
|
||||||
*
|
|
||||||
* Return value: A newly-created full screen image viewer.
|
|
||||||
**/
|
|
||||||
GtkWidget *
|
|
||||||
full_screen_new (void)
|
|
||||||
{
|
|
||||||
return GTK_WIDGET (gtk_type_new (TYPE_FULL_SCREEN));
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
full_screen_set_uri (FullScreen *fs,
|
|
||||||
GstPlay *play,
|
|
||||||
const guchar *uri)
|
|
||||||
{
|
|
||||||
g_return_if_fail (fs != NULL);
|
|
||||||
g_return_if_fail (play != NULL);
|
|
||||||
g_return_if_fail (uri != NULL);
|
|
||||||
|
|
||||||
g_return_if_fail (IS_FULL_SCREEN (fs));
|
|
||||||
g_return_if_fail (GST_IS_PLAY (play));
|
|
||||||
|
|
||||||
gst_play_set_uri (play, uri);
|
|
||||||
|
|
||||||
gst_play_play (play);
|
|
||||||
}
|
|
||||||
|
|
||||||
GstPlay *
|
|
||||||
full_screen_get_gst_play (FullScreen *fs)
|
|
||||||
{
|
|
||||||
FullScreenPrivate *priv;
|
|
||||||
g_return_val_if_fail (fs != NULL, 0);
|
|
||||||
|
|
||||||
priv = fs->priv;
|
|
||||||
|
|
||||||
return priv->play;
|
|
||||||
}
|
|
|
@ -1,44 +0,0 @@
|
||||||
#ifndef FULL_SCREEN_H
|
|
||||||
#define FULL_SCREEN_H
|
|
||||||
|
|
||||||
#include <libgnome/gnome-defs.h>
|
|
||||||
#include <gtk/gtkwindow.h>
|
|
||||||
#include "gstplay.h"
|
|
||||||
|
|
||||||
BEGIN_GNOME_DECLS
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define TYPE_FULL_SCREEN (full_screen_get_type ())
|
|
||||||
#define FULL_SCREEN(obj) (GTK_CHECK_CAST ((obj), TYPE_FULL_SCREEN, FullScreen))
|
|
||||||
#define FULL_SCREEN_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), TYPE_FULL_SCREEN, \
|
|
||||||
FullScreenClass))
|
|
||||||
#define IS_FULL_SCREEN(obj) (GTK_CHECK_TYPE ((obj), TYPE_FULL_SCREEN))
|
|
||||||
#define IS_FULL_SCREEN_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), TYPE_FULL_SCREEN))
|
|
||||||
|
|
||||||
typedef struct _FullScreen FullScreen;
|
|
||||||
typedef struct _FullScreenClass FullScreenClass;
|
|
||||||
|
|
||||||
typedef struct _FullScreenPrivate FullScreenPrivate;
|
|
||||||
|
|
||||||
struct _FullScreen {
|
|
||||||
GtkWindow window;
|
|
||||||
|
|
||||||
/* Private data */
|
|
||||||
FullScreenPrivate *priv;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct _FullScreenClass {
|
|
||||||
GtkWindowClass parent_class;
|
|
||||||
};
|
|
||||||
|
|
||||||
GtkType full_screen_get_type (void);
|
|
||||||
|
|
||||||
GtkWidget *full_screen_new (void);
|
|
||||||
|
|
||||||
void full_screen_set_uri (FullScreen *fs, GstPlay *play, const guchar *uri);
|
|
||||||
GstPlay * full_screen_get_gst_play (FullScreen *fs);
|
|
||||||
|
|
||||||
END_GNOME_DECLS
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -20,6 +20,8 @@ static void gst_media_play_slider_changed (GtkAdjustment *adj, GstMediaPlay
|
||||||
static void update_buttons (GstMediaPlay *mplay, GstPlayState state);
|
static void update_buttons (GstMediaPlay *mplay, GstPlayState state);
|
||||||
static void update_slider (GstMediaPlay *mplay, GtkAdjustment *adjustment, gfloat value);
|
static void update_slider (GstMediaPlay *mplay, GtkAdjustment *adjustment, gfloat value);
|
||||||
|
|
||||||
|
gboolean fullscreen_active = FALSE;
|
||||||
|
|
||||||
/* signals and args */
|
/* signals and args */
|
||||||
enum {
|
enum {
|
||||||
LAST_SIGNAL
|
LAST_SIGNAL
|
||||||
|
@ -231,6 +233,9 @@ gst_media_play_start_uri (GstMediaPlay *play,
|
||||||
if (uri != NULL) {
|
if (uri != NULL) {
|
||||||
ret = gst_play_set_uri (play->play, uri);
|
ret = gst_play_set_uri (play->play, uri);
|
||||||
|
|
||||||
|
if (ret == GST_PLAY_CANNOT_PLAY) {
|
||||||
|
printf ("*** Cannot load file: %s ***\n", uri);
|
||||||
|
} else {
|
||||||
if (!gst_play_media_can_seek (play->play)) {
|
if (!gst_play_media_can_seek (play->play)) {
|
||||||
gtk_widget_set_sensitive (play->slider, FALSE);
|
gtk_widget_set_sensitive (play->slider, FALSE);
|
||||||
}
|
}
|
||||||
|
@ -240,6 +245,7 @@ gst_media_play_start_uri (GstMediaPlay *play,
|
||||||
|
|
||||||
gst_play_play (play->play);
|
gst_play_play (play->play);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
@ -387,6 +393,88 @@ on_extended1_activate (GtkCheckMenuItem *item, GstMediaPlay *mplay)
|
||||||
gdk_threads_enter ();
|
gdk_threads_enter ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
gst_media_play_set_original_size (GstMediaPlay *mplay)
|
||||||
|
{
|
||||||
|
GstPlay *play;
|
||||||
|
GtkWidget *video_widget;
|
||||||
|
gint width, height;
|
||||||
|
|
||||||
|
play = mplay->play;
|
||||||
|
|
||||||
|
video_widget = gst_play_get_video_widget (play);
|
||||||
|
width = gst_play_get_source_width (play);
|
||||||
|
height = gst_play_get_source_height (play);
|
||||||
|
|
||||||
|
gtk_widget_set_usize (video_widget, width, height);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
gst_media_play_set_double_size (GstMediaPlay *mplay)
|
||||||
|
{
|
||||||
|
GstPlay *play;
|
||||||
|
GtkWidget *video_widget;
|
||||||
|
gint width, height;
|
||||||
|
|
||||||
|
play = mplay->play;
|
||||||
|
|
||||||
|
video_widget = gst_play_get_video_widget (play);
|
||||||
|
width = gst_play_get_source_width (play);
|
||||||
|
height = gst_play_get_source_height (play);
|
||||||
|
|
||||||
|
gtk_widget_set_usize (video_widget, width * 1.5, height * 1.5);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
gst_media_play_set_fullscreen (GstMediaPlay *mplay)
|
||||||
|
{
|
||||||
|
GdkWindow *gdk_window;
|
||||||
|
gint client_x, client_y, root_x, root_y;
|
||||||
|
gint width, height, source_width, source_height;
|
||||||
|
GstPlay *play;
|
||||||
|
GtkWidget *video_widget;
|
||||||
|
|
||||||
|
gdk_window = mplay->window->window;
|
||||||
|
play = mplay->play;
|
||||||
|
|
||||||
|
video_widget = gst_play_get_video_widget (play);
|
||||||
|
source_width = gst_play_get_source_width (play);
|
||||||
|
source_height = gst_play_get_source_height (play);
|
||||||
|
|
||||||
|
if (!fullscreen_active) {
|
||||||
|
gtk_widget_hide (glade_xml_get_widget (mplay->xml, "dockitem1"));
|
||||||
|
gtk_widget_hide (glade_xml_get_widget (mplay->xml, "dockitem2"));
|
||||||
|
gtk_widget_hide (glade_xml_get_widget (mplay->xml, "dockitem3"));
|
||||||
|
gtk_widget_hide (glade_xml_get_widget (mplay->xml, "dockitem4"));
|
||||||
|
|
||||||
|
gdk_window_get_origin (gdk_window, &root_x, &root_y);
|
||||||
|
gdk_window_get_geometry (gdk_window, &client_x, &client_y,
|
||||||
|
&width, &height, NULL);
|
||||||
|
gdk_window_move (gdk_window, -client_x, -client_y);
|
||||||
|
gtk_widget_set_usize (video_widget, gdk_screen_width () + 1,
|
||||||
|
gdk_screen_height () + 1);
|
||||||
|
|
||||||
|
mplay->x = root_x - client_x;
|
||||||
|
mplay->y = root_y - client_y;
|
||||||
|
mplay->width = width;
|
||||||
|
mplay->height = height;
|
||||||
|
|
||||||
|
fullscreen_active = TRUE;
|
||||||
|
} else {
|
||||||
|
gtk_widget_show (glade_xml_get_widget (mplay->xml, "dockitem1"));
|
||||||
|
gtk_widget_show (glade_xml_get_widget (mplay->xml, "dockitem2"));
|
||||||
|
gtk_widget_show (glade_xml_get_widget (mplay->xml, "dockitem3"));
|
||||||
|
gtk_widget_show (glade_xml_get_widget (mplay->xml, "dockitem4"));
|
||||||
|
gtk_widget_queue_resize (glade_xml_get_widget (mplay->xml, "dock1"));
|
||||||
|
|
||||||
|
gdk_window_move (gdk_window, mplay->x, mplay->y);
|
||||||
|
gtk_widget_set_usize (video_widget, source_width,
|
||||||
|
source_height);
|
||||||
|
|
||||||
|
fullscreen_active = FALSE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_media_play_frame_displayed (GstPlay *play, GstMediaPlay *mplay)
|
gst_media_play_frame_displayed (GstPlay *play, GstMediaPlay *mplay)
|
||||||
{
|
{
|
||||||
|
|
|
@ -187,7 +187,6 @@
|
||||||
<widget>
|
<widget>
|
||||||
<class>GtkMenuItem</class>
|
<class>GtkMenuItem</class>
|
||||||
<name>full_screen</name>
|
<name>full_screen</name>
|
||||||
<sensitive>False</sensitive>
|
|
||||||
<accelerator>
|
<accelerator>
|
||||||
<modifiers>GDK_CONTROL_MASK</modifiers>
|
<modifiers>GDK_CONTROL_MASK</modifiers>
|
||||||
<key>GDK_3</key>
|
<key>GDK_3</key>
|
||||||
|
@ -469,7 +468,7 @@
|
||||||
<modal>True</modal>
|
<modal>True</modal>
|
||||||
<wmclass_name>about</wmclass_name>
|
<wmclass_name>about</wmclass_name>
|
||||||
<wmclass_class>GstMediaPlay</wmclass_class>
|
<wmclass_class>GstMediaPlay</wmclass_class>
|
||||||
<copyright>(C) 1999-2001 Erik Walthinsen</copyright>
|
<copyright>(C) 1999-2001 Erik Walthinsen, Arik Devens</copyright>
|
||||||
<authors>Erik Walthinsen <omega@cse.ogi.edu>
|
<authors>Erik Walthinsen <omega@cse.ogi.edu>
|
||||||
Wim Taymans <wim.taymans@tvd.be>
|
Wim Taymans <wim.taymans@tvd.be>
|
||||||
Richard Boulton <richard@tartarus.org>
|
Richard Boulton <richard@tartarus.org>
|
||||||
|
@ -532,4 +531,99 @@ Arik Devens <arik@gnome.org>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
|
|
||||||
|
<widget>
|
||||||
|
<class>GtkWindow</class>
|
||||||
|
<name>preferences</name>
|
||||||
|
<title>GstMediaPlayer Preferences</title>
|
||||||
|
<type>GTK_WINDOW_TOPLEVEL</type>
|
||||||
|
<position>GTK_WIN_POS_NONE</position>
|
||||||
|
<modal>False</modal>
|
||||||
|
<allow_shrink>False</allow_shrink>
|
||||||
|
<allow_grow>True</allow_grow>
|
||||||
|
<auto_shrink>False</auto_shrink>
|
||||||
|
|
||||||
|
<widget>
|
||||||
|
<class>GtkNotebook</class>
|
||||||
|
<name>notebook1</name>
|
||||||
|
<can_focus>True</can_focus>
|
||||||
|
<show_tabs>True</show_tabs>
|
||||||
|
<show_border>True</show_border>
|
||||||
|
<tab_pos>GTK_POS_TOP</tab_pos>
|
||||||
|
<scrollable>False</scrollable>
|
||||||
|
<tab_hborder>2</tab_hborder>
|
||||||
|
<tab_vborder>2</tab_vborder>
|
||||||
|
<popup_enable>False</popup_enable>
|
||||||
|
|
||||||
|
<widget>
|
||||||
|
<class>GtkFrame</class>
|
||||||
|
<name>frame1</name>
|
||||||
|
<label>Full Screen</label>
|
||||||
|
<label_xalign>0</label_xalign>
|
||||||
|
<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
|
||||||
|
|
||||||
|
<widget>
|
||||||
|
<class>GtkVBox</class>
|
||||||
|
<name>vbox1</name>
|
||||||
|
<homogeneous>False</homogeneous>
|
||||||
|
<spacing>0</spacing>
|
||||||
|
|
||||||
|
<widget>
|
||||||
|
<class>GtkCheckButton</class>
|
||||||
|
<name>checkbutton1</name>
|
||||||
|
<can_focus>True</can_focus>
|
||||||
|
<label>Show file menu</label>
|
||||||
|
<active>False</active>
|
||||||
|
<draw_indicator>True</draw_indicator>
|
||||||
|
<child>
|
||||||
|
<padding>0</padding>
|
||||||
|
<expand>False</expand>
|
||||||
|
<fill>False</fill>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
|
||||||
|
<widget>
|
||||||
|
<class>GtkCheckButton</class>
|
||||||
|
<name>checkbutton2</name>
|
||||||
|
<can_focus>True</can_focus>
|
||||||
|
<label>Show player controls</label>
|
||||||
|
<active>False</active>
|
||||||
|
<draw_indicator>True</draw_indicator>
|
||||||
|
<child>
|
||||||
|
<padding>0</padding>
|
||||||
|
<expand>False</expand>
|
||||||
|
<fill>False</fill>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
|
||||||
|
<widget>
|
||||||
|
<class>GtkCheckButton</class>
|
||||||
|
<name>checkbutton3</name>
|
||||||
|
<can_focus>True</can_focus>
|
||||||
|
<label>Show status area</label>
|
||||||
|
<active>False</active>
|
||||||
|
<draw_indicator>True</draw_indicator>
|
||||||
|
<child>
|
||||||
|
<padding>0</padding>
|
||||||
|
<expand>False</expand>
|
||||||
|
<fill>False</fill>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
|
||||||
|
<widget>
|
||||||
|
<class>GtkLabel</class>
|
||||||
|
<child_name>Notebook:tab</child_name>
|
||||||
|
<name>label1</name>
|
||||||
|
<label>Viewers</label>
|
||||||
|
<justify>GTK_JUSTIFY_CENTER</justify>
|
||||||
|
<wrap>False</wrap>
|
||||||
|
<xalign>0.5</xalign>
|
||||||
|
<yalign>0.5</yalign>
|
||||||
|
<xpad>0</xpad>
|
||||||
|
<ypad>0</ypad>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
|
||||||
</GTK-Interface>
|
</GTK-Interface>
|
||||||
|
|
|
@ -32,6 +32,8 @@ struct _GstMediaPlay {
|
||||||
GtkWidget *slider;
|
GtkWidget *slider;
|
||||||
|
|
||||||
gulong last_time;
|
gulong last_time;
|
||||||
|
|
||||||
|
gint x, y, width, height;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstMediaPlayClass {
|
struct _GstMediaPlayClass {
|
||||||
|
@ -46,4 +48,8 @@ GstMediaPlay* gst_media_play_new (void);
|
||||||
|
|
||||||
void gst_media_play_start_uri (GstMediaPlay *play, const guchar *uri);
|
void gst_media_play_start_uri (GstMediaPlay *play, const guchar *uri);
|
||||||
|
|
||||||
|
void gst_media_play_set_original_size (GstMediaPlay *mplay);
|
||||||
|
void gst_media_play_set_double_size (GstMediaPlay *mplay);
|
||||||
|
void gst_media_play_set_fullscreen (GstMediaPlay *mplay);
|
||||||
|
|
||||||
#endif /* __GST_MEDIA_PLAY_H__ */
|
#endif /* __GST_MEDIA_PLAY_H__ */
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
|
|
||||||
#include "gstplay.h"
|
#include "gstplay.h"
|
||||||
#include "gstplayprivate.h"
|
#include "gstplayprivate.h"
|
||||||
#include "full-screen.h"
|
|
||||||
|
|
||||||
static void gst_play_class_init (GstPlayClass *klass);
|
static void gst_play_class_init (GstPlayClass *klass);
|
||||||
static void gst_play_init (GstPlay *play);
|
static void gst_play_init (GstPlay *play);
|
||||||
|
@ -165,6 +164,9 @@ gst_play_init (GstPlay *play)
|
||||||
priv->offset_element = NULL;
|
priv->offset_element = NULL;
|
||||||
priv->bit_rate_element = NULL;
|
priv->bit_rate_element = NULL;
|
||||||
priv->media_time_element = NULL;
|
priv->media_time_element = NULL;
|
||||||
|
|
||||||
|
priv->source_width = 100;
|
||||||
|
priv->source_height = 100;
|
||||||
}
|
}
|
||||||
|
|
||||||
GstPlay *
|
GstPlay *
|
||||||
|
@ -374,6 +376,7 @@ GstPlayReturn
|
||||||
gst_play_set_uri (GstPlay *play, const guchar *uri)
|
gst_play_set_uri (GstPlay *play, const guchar *uri)
|
||||||
{
|
{
|
||||||
GstPlayPrivate *priv;
|
GstPlayPrivate *priv;
|
||||||
|
FILE *file;
|
||||||
gchar* uriloc;
|
gchar* uriloc;
|
||||||
|
|
||||||
g_return_val_if_fail (play != NULL, GST_PLAY_ERROR);
|
g_return_val_if_fail (play != NULL, GST_PLAY_ERROR);
|
||||||
|
@ -385,7 +388,6 @@ gst_play_set_uri (GstPlay *play, const guchar *uri)
|
||||||
if (priv->uri)
|
if (priv->uri)
|
||||||
g_free (priv->uri);
|
g_free (priv->uri);
|
||||||
|
|
||||||
|
|
||||||
/* see if it looks like an URI */
|
/* see if it looks like an URI */
|
||||||
if ((uriloc = strstr (uri, ":/"))) {
|
if ((uriloc = strstr (uri, ":/"))) {
|
||||||
priv->src = gst_elementfactory_make ("gnomevfssrc", "srcelement");
|
priv->src = gst_elementfactory_make ("gnomevfssrc", "srcelement");
|
||||||
|
@ -498,7 +500,7 @@ gst_play_pause (GstPlay *play)
|
||||||
|
|
||||||
if (play->state != GST_PLAY_PLAYING) return;
|
if (play->state != GST_PLAY_PLAYING) return;
|
||||||
|
|
||||||
gst_element_set_state (GST_ELEMENT (priv->pipeline),GST_STATE_PAUSED);
|
gst_element_set_state (GST_ELEMENT (priv->pipeline), GST_STATE_PAUSED);
|
||||||
|
|
||||||
play->state = GST_PLAY_PAUSED;
|
play->state = GST_PLAY_PAUSED;
|
||||||
g_idle_remove_by_data (priv->pipeline);
|
g_idle_remove_by_data (priv->pipeline);
|
||||||
|
@ -515,13 +517,13 @@ gst_play_stop (GstPlay *play)
|
||||||
g_return_if_fail (play != NULL);
|
g_return_if_fail (play != NULL);
|
||||||
g_return_if_fail (GST_IS_PLAY (play));
|
g_return_if_fail (GST_IS_PLAY (play));
|
||||||
|
|
||||||
if (play->state == GST_PLAY_STOPPED) return;
|
|
||||||
|
|
||||||
priv = (GstPlayPrivate *)play->priv;
|
priv = (GstPlayPrivate *)play->priv;
|
||||||
|
|
||||||
|
if (play->state == GST_PLAY_STOPPED) return;
|
||||||
|
|
||||||
// FIXME until state changes are handled properly
|
// FIXME until state changes are handled properly
|
||||||
gst_element_set_state (GST_ELEMENT (priv->pipeline),GST_STATE_READY);
|
gst_element_set_state (GST_ELEMENT (priv->pipeline), GST_STATE_READY);
|
||||||
gtk_object_set (G_OBJECT (priv->src),"offset",0,NULL);
|
gtk_object_set (GTK_OBJECT (priv->src), "offset", 0, NULL);
|
||||||
//gst_element_set_state (GST_ELEMENT (priv->pipeline),GST_STATE_NULL);
|
//gst_element_set_state (GST_ELEMENT (priv->pipeline),GST_STATE_NULL);
|
||||||
|
|
||||||
play->state = GST_PLAY_STOPPED;
|
play->state = GST_PLAY_STOPPED;
|
||||||
|
@ -531,37 +533,43 @@ gst_play_stop (GstPlay *play)
|
||||||
play->state);
|
play->state);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
GtkWidget *
|
||||||
gst_play_set_display_size (GstPlay *play, gint display_preference)
|
gst_play_get_video_widget (GstPlay *play)
|
||||||
{
|
{
|
||||||
GstPlayPrivate *priv;
|
GstPlayPrivate *priv;
|
||||||
|
|
||||||
g_return_if_fail (play != NULL);
|
g_return_val_if_fail (play != NULL, 0);
|
||||||
g_return_if_fail (GST_IS_PLAY (play));
|
g_return_val_if_fail (GST_IS_PLAY (play), 0);
|
||||||
|
|
||||||
priv = (GstPlayPrivate *)play->priv;
|
priv = (GstPlayPrivate *)play->priv;
|
||||||
|
|
||||||
if (display_preference == 0) {
|
return priv->video_widget;
|
||||||
gtk_widget_set_usize (GTK_WIDGET (priv->video_widget), priv->source_width, priv->source_height);
|
}
|
||||||
}
|
|
||||||
else if (display_preference == 1) {
|
|
||||||
gtk_widget_set_usize (GTK_WIDGET (priv->video_widget), priv->source_width * 2, priv->source_height * 2);
|
|
||||||
}
|
|
||||||
else if (display_preference == 2) {
|
|
||||||
GtkWidget *fs;
|
|
||||||
GstPlay *fs_play;
|
|
||||||
|
|
||||||
fs = full_screen_new ();
|
gint
|
||||||
|
gst_play_get_source_width (GstPlay *play)
|
||||||
|
{
|
||||||
|
GstPlayPrivate *priv;
|
||||||
|
|
||||||
fs_play = full_screen_get_gst_play (FULL_SCREEN (fs));
|
g_return_val_if_fail (play != NULL, 0);
|
||||||
|
g_return_val_if_fail (GST_IS_PLAY (play), 0);
|
||||||
|
|
||||||
if (priv->uri != NULL) {
|
priv = (GstPlayPrivate *)play->priv;
|
||||||
//gst_play_stop (play);
|
|
||||||
full_screen_set_uri (FULL_SCREEN (fs), fs_play, priv->uri);
|
|
||||||
|
|
||||||
gtk_widget_show (fs);
|
return priv->source_width;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
gint
|
||||||
|
gst_play_get_source_height (GstPlay *play)
|
||||||
|
{
|
||||||
|
GstPlayPrivate *priv;
|
||||||
|
|
||||||
|
g_return_val_if_fail (play != NULL, 0);
|
||||||
|
g_return_val_if_fail (GST_IS_PLAY (play), 0);
|
||||||
|
|
||||||
|
priv = (GstPlayPrivate *)play->priv;
|
||||||
|
|
||||||
|
return priv->source_height;
|
||||||
}
|
}
|
||||||
|
|
||||||
gulong
|
gulong
|
||||||
|
|
|
@ -76,7 +76,9 @@ gulong gst_play_get_media_total_time (GstPlay *play);
|
||||||
gulong gst_play_get_media_current_time (GstPlay *play);
|
gulong gst_play_get_media_current_time (GstPlay *play);
|
||||||
|
|
||||||
/* set display stuff */
|
/* set display stuff */
|
||||||
void gst_play_set_display_size ();
|
GtkWidget * gst_play_get_video_widget (GstPlay *play);
|
||||||
|
gint gst_play_get_source_width (GstPlay *play);
|
||||||
|
gint gst_play_get_source_height (GstPlay *play);
|
||||||
|
|
||||||
/* the autoplugged pipeline */
|
/* the autoplugged pipeline */
|
||||||
GstElement* gst_play_get_pipeline (GstPlay *play);
|
GstElement* gst_play_get_pipeline (GstPlay *play);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
%define name gstreamer
|
%define name gstreamer
|
||||||
%define ver @VERSION@
|
%define ver @VERSION@
|
||||||
%define rel 0.2.0
|
%define rel 2
|
||||||
%define prefix /usr
|
%define prefix /usr
|
||||||
|
|
||||||
Summary: GStreamer Streaming-media framework runtime
|
Summary: GStreamer Streaming-media framework runtime
|
||||||
|
@ -13,6 +13,8 @@ Source: %{name}-%{ver}.tar.gz
|
||||||
BuildRoot: /var/tmp/%{name}-%{ver}-root
|
BuildRoot: /var/tmp/%{name}-%{ver}-root
|
||||||
Docdir: %{prefix}/doc
|
Docdir: %{prefix}/doc
|
||||||
Prefix: %prefix
|
Prefix: %prefix
|
||||||
|
Requires: libxml >= 1.8.0
|
||||||
|
Requires: gnome-libs >= 1.2.0
|
||||||
|
|
||||||
%description
|
%description
|
||||||
GStreamer is a streaming-media framework, based on graphs of filters which
|
GStreamer is a streaming-media framework, based on graphs of filters which
|
||||||
|
@ -22,10 +24,56 @@ else media-related. Its plugin-based architecture means that new data
|
||||||
types or processing capabilities can be added simply by installing new
|
types or processing capabilities can be added simply by installing new
|
||||||
plugins.
|
plugins.
|
||||||
|
|
||||||
|
%files
|
||||||
|
%defattr(-, root, root)
|
||||||
|
%doc AUTHORS COPYING README
|
||||||
|
%{prefix}/bin/gsteditor
|
||||||
|
%{prefix}/bin/gstmediaplay
|
||||||
|
%{prefix}/bin/gstreamer-complete
|
||||||
|
%{prefix}/bin/gstreamer-compprep
|
||||||
|
%{prefix}/bin/gstreamer-inspect
|
||||||
|
%{prefix}/bin/gstreamer-launch
|
||||||
|
%{prefix}/bin/gstreamer-register
|
||||||
|
%{prefix}/lib/lib*.so*
|
||||||
|
%{prefix}/lib/gst/libadder*
|
||||||
|
%{prefix}/lib/gst/libalaw*
|
||||||
|
%{prefix}/lib/gst/libaudioscale*
|
||||||
|
%{prefix}/lib/gst/libcutter*
|
||||||
|
%{prefix}/lib/gst/libgstaudio*
|
||||||
|
%{prefix}/lib/gst/libcolorspace*
|
||||||
|
%{prefix}/lib/gst/libgstcolorspace*
|
||||||
|
%{prefix}/lib/gst/libgstautoplug*
|
||||||
|
%{prefix}/lib/gst/libgstelements*
|
||||||
|
%{prefix}/lib/gst/libgstgetbits*
|
||||||
|
%{prefix}/lib/gst/libgstidct*
|
||||||
|
%{prefix}/lib/gst/libgstriff*
|
||||||
|
%{prefix}/lib/gst/libgstjpeg*
|
||||||
|
%{prefix}/lib/gst/libintfloatconvert*
|
||||||
|
%{prefix}/lib/gst/liblevel*
|
||||||
|
%{prefix}/lib/gst/libmedian*
|
||||||
|
%{prefix}/lib/gst/libmono2stereo*
|
||||||
|
%{prefix}/lib/gst/libmulaw*
|
||||||
|
%{prefix}/lib/gst/libpassthrough*
|
||||||
|
%{prefix}/lib/gst/librtjpe*
|
||||||
|
%{prefix}/lib/gst/libstereo*
|
||||||
|
%{prefix}/lib/gst/libsystem_*
|
||||||
|
%{prefix}/lib/gst/libgstputbits*
|
||||||
|
%{prefix}/lib/gst/libvideoscale*
|
||||||
|
%{prefix}/lib/gst/libgstvideoscale*
|
||||||
|
%{prefix}/lib/gst/libvol*
|
||||||
|
%{prefix}/lib/gst/libxvideosink*
|
||||||
|
%{prefix}/lib/gst/libgstparsewav*
|
||||||
|
%{prefix}/lib/gst/libgststaticautoplug*
|
||||||
|
%{prefix}/lib/gst/libgsttypes*
|
||||||
|
%{prefix}/lib/gst/liblavencode*
|
||||||
|
%{prefix}/share/gsteditor/*
|
||||||
|
%{prefix}/share/gstmediaplay/*
|
||||||
|
%{prefix}/man/man1/*
|
||||||
|
|
||||||
%package devel
|
%package devel
|
||||||
Summary: Libraries and include files for GStreamer streaming-media framework
|
Summary: Libraries and include files for GStreamer streaming-media framework
|
||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
Requires: %{name}
|
Requires: %{name} = %{ver}
|
||||||
|
|
||||||
%description devel
|
%description devel
|
||||||
GStreamer is a streaming-media framework, based on graphs of filters which
|
GStreamer is a streaming-media framework, based on graphs of filters which
|
||||||
|
@ -38,11 +86,343 @@ plugins.
|
||||||
This package contains the libraries and includes files necessary to develop
|
This package contains the libraries and includes files necessary to develop
|
||||||
applications and plugins for GStreamer.
|
applications and plugins for GStreamer.
|
||||||
|
|
||||||
|
%files devel
|
||||||
|
%defattr(-, root, root)
|
||||||
|
%{prefix}/bin/gstreamer-config
|
||||||
|
%{prefix}/include/*
|
||||||
|
%{prefix}/lib/lib*.la
|
||||||
|
%{prefix}/lib/lib*.so
|
||||||
|
%{prefix}/lib/pkgconfig/*
|
||||||
|
%{prefix}/share/aclocal/*
|
||||||
|
|
||||||
|
%package -n gstreamer-visualisation
|
||||||
|
Summary: Gstreamer visualisations plugins
|
||||||
|
Group: Libraries/Multimedia
|
||||||
|
Requires: %{name} = %{ver}
|
||||||
|
|
||||||
|
%description -n gstreamer-visualisation
|
||||||
|
Various plugins for visual effects to use with audio. Included are Smoothwave, Spectrum and vumeter
|
||||||
|
|
||||||
|
%files -n gstreamer-visualisation
|
||||||
|
%defattr(-, root, root)
|
||||||
|
%{prefix}/lib/gst/libsmooth*
|
||||||
|
%{prefix}/lib/gst/libgstspectrum*
|
||||||
|
%{prefix}/lib/gst/libvu*
|
||||||
|
|
||||||
|
%package -n gstreamer-esd
|
||||||
|
Summary: Gstreamer plugin for ESD sound output
|
||||||
|
Group: Libraries/Multimedia
|
||||||
|
Requires: esound >= 0.2.8
|
||||||
|
Requires: %{name} = %{ver}
|
||||||
|
|
||||||
|
%description -n gstreamer-esd
|
||||||
|
Output plugin for GStreamer for use with the esound package
|
||||||
|
|
||||||
|
%files -n gstreamer-esd
|
||||||
|
%defattr(-, root, root)
|
||||||
|
%{prefix}/lib/gst/libesd*
|
||||||
|
|
||||||
|
%package -n gstreamer-aalib
|
||||||
|
Summary: Gstreamer plugin for Ascii-art output
|
||||||
|
Group: Libraries/Multimedia
|
||||||
|
Requires: aalib >= 1.3
|
||||||
|
Requires: %{name} = %{ver}
|
||||||
|
|
||||||
|
%description -n gstreamer-aalib
|
||||||
|
Plugin for viewing movies in Ascii-art using aalib library.
|
||||||
|
|
||||||
|
%files -n gstreamer-aalib
|
||||||
|
%defattr(-, root, root)
|
||||||
|
%{prefix}/lib/gst/libaa*
|
||||||
|
|
||||||
|
%package -n gstreamer-afs
|
||||||
|
Summary: Gstreamer plugin audiofile support
|
||||||
|
Group: Libraries/Multimedia
|
||||||
|
Requires: %{name} = %{ver}
|
||||||
|
Requires: audiofile >= 0.2.1
|
||||||
|
|
||||||
|
%description -n gstreamer-afs
|
||||||
|
Plugin for supporting reading and writing all files audiofile support
|
||||||
|
|
||||||
|
%files -n gstreamer-afs
|
||||||
|
%defattr(-, root, root)
|
||||||
|
%{prefix}/lib/gst/libafs*
|
||||||
|
|
||||||
|
%package -n gstreamer-avi
|
||||||
|
Summary: Gstreamer plugin for AVI format movie playback
|
||||||
|
Group: Libraries/Multimedia
|
||||||
|
Requires: %{name} = %{ver}
|
||||||
|
|
||||||
|
%description -n gstreamer-avi
|
||||||
|
Plugins for playback of AVI format media files.
|
||||||
|
|
||||||
|
%files -n gstreamer-avi
|
||||||
|
%defattr(-, root, root)
|
||||||
|
%{prefix}/lib/gst/libavi*
|
||||||
|
%{prefix}/lib/gst/libwin*
|
||||||
|
|
||||||
|
%package -n gstreamer-cdparanoia
|
||||||
|
Summary: Gstreamer plugin for CD audio input using CDParanoia IV
|
||||||
|
Group: Libraries/Multimedia
|
||||||
|
Requires: cdparanoia >= alpha9.7
|
||||||
|
Requires: %{name} = %{ver}
|
||||||
|
|
||||||
|
%description -n gstreamer-cdparanoia
|
||||||
|
Plugin for ripping audio tracks using cdparania under GStreamer
|
||||||
|
|
||||||
|
%files -n gstreamer-cdparanoia
|
||||||
|
%defattr(-, root, root)
|
||||||
|
%{prefix}/lib/gst/libcdparanoia*
|
||||||
|
|
||||||
|
%package -n gstreamer-flx
|
||||||
|
Summary: Gstreamer plugin for FLI/FLX animation format
|
||||||
|
Group: Libraries/Multimedia
|
||||||
|
Requires: %{name} = %{ver}
|
||||||
|
|
||||||
|
%description -n gstreamer-flx
|
||||||
|
Plugin for playing FLI/FLX animations under GStreamer
|
||||||
|
|
||||||
|
%files -n gstreamer-flx
|
||||||
|
%defattr(-, root, root)
|
||||||
|
%{prefix}/lib/gst/libflx*
|
||||||
|
|
||||||
|
%package -n gstreamer-mpeg1
|
||||||
|
Summary: GStreamer plugins for Mpeg level 1 video playback
|
||||||
|
Group: Libraries/Multimedia
|
||||||
|
Requires: %{name} = %{ver}
|
||||||
|
|
||||||
|
%description -n gstreamer-mpeg1
|
||||||
|
Plugins for playing mpeg level 1 encoded movies
|
||||||
|
|
||||||
|
%files -n gstreamer-mpeg1
|
||||||
|
%defattr(-, root, root)
|
||||||
|
%{prefix}/lib/gst/libmpeg1*
|
||||||
|
%{prefix}/lib/gst/libmpegaudio*
|
||||||
|
%{prefix}/lib/gst/libmp1*
|
||||||
|
%{prefix}/lib/gst/libmpeg_play*
|
||||||
|
|
||||||
|
%package -n gstreamer-mpeg2
|
||||||
|
Summary: GStreamer plugins for Mpeg level 2 playback
|
||||||
|
Group: Libraries/Multimedia
|
||||||
|
Requires: %{name} = %{ver}
|
||||||
|
|
||||||
|
%description -n gstreamer-mpeg2
|
||||||
|
Plugins for playing mpeg level 2 encoded movies
|
||||||
|
|
||||||
|
%files -n gstreamer-mpeg2
|
||||||
|
%defattr(-, root, root)
|
||||||
|
%{prefix}/lib/gst/libmpeg2parse*
|
||||||
|
%{prefix}/lib/gst/libmpeg2play*
|
||||||
|
%{prefix}/lib/gst/libmpeg2enc*
|
||||||
|
%{prefix}/lib/gst/libmpeg2subt*
|
||||||
|
%{prefix}/lib/gst/libmp2videoparse*
|
||||||
|
|
||||||
|
%package -n gstreamer-mpeg2dec
|
||||||
|
Summary: GStreamer plugins for Mpeg level 2 playback
|
||||||
|
Group: Libraries/Multimedia
|
||||||
|
Requires: %{name} = %{ver}
|
||||||
|
Requires: mpeg2dec >= 0.2.0
|
||||||
|
|
||||||
|
%description -n gstreamer-mpeg2dec
|
||||||
|
Plugins for playing mpeg level 2 encoded movies
|
||||||
|
|
||||||
|
%files -n gstreamer-mpeg2dec
|
||||||
|
%defattr(-, root, root)
|
||||||
|
%{prefix}/lib/gst/libmpeg2dec*
|
||||||
|
|
||||||
|
%package -n gstreamer-mp3
|
||||||
|
Summary: GStreamer plugins for mp3 playback
|
||||||
|
Group: Libraries/Multimedia
|
||||||
|
Requires: %{name} = %{ver}
|
||||||
|
|
||||||
|
%description -n gstreamer-mp3
|
||||||
|
Plugins for decoding mp3 files. We do recommend you
|
||||||
|
use Ogg Vorbis format instead however since it is both free and
|
||||||
|
better.
|
||||||
|
|
||||||
|
%files -n gstreamer-mp3
|
||||||
|
%defattr(-, root, root)
|
||||||
|
%{prefix}/lib/gst/libmpg123*
|
||||||
|
%{prefix}/lib/gst/libmp3parse*
|
||||||
|
%{prefix}/lib/gst/libmp3types*
|
||||||
|
|
||||||
|
%package -n gstreamer-gnomevfs
|
||||||
|
Summary: GStreamer plugins for GNOME VFS input and output
|
||||||
|
Group: Libraries/Multimedia
|
||||||
|
Requires: gnome-vfs > 1.0
|
||||||
|
Requires: %{name} = %{ver}
|
||||||
|
|
||||||
|
%description -n gstreamer-gnomevfs
|
||||||
|
Plugins for reading and writing through GNOME VFS.
|
||||||
|
|
||||||
|
%files -n gstreamer-gnomevfs
|
||||||
|
%defattr(-, root, root)
|
||||||
|
%{prefix}/lib/gst/libgnomevfs*
|
||||||
|
|
||||||
|
%package -n gstreamer-gsm
|
||||||
|
Summary: Gstreamer plugin for GSM lossy audio format
|
||||||
|
Group: Libraries/Multimedia
|
||||||
|
Requires: gsm >= 1.0.10
|
||||||
|
Requires: %{name} = %{ver}
|
||||||
|
|
||||||
|
%description -n gstreamer-gsm
|
||||||
|
Output plugin for GStreamer to convert to GSM lossy audio format.
|
||||||
|
|
||||||
|
%files -n gstreamer-gsm
|
||||||
|
%defattr(-, root, root)
|
||||||
|
%{prefix}/lib/gst/libgstgsm*
|
||||||
|
|
||||||
|
%package -n gstreamer-vorbis
|
||||||
|
Summary: Gstreamer plugin for encoding and decoding Ogg Vorbis audio files
|
||||||
|
Group: Libraries/Multimedia
|
||||||
|
Requires: libogg >= 1.0beta4
|
||||||
|
Requires: libvorbis >= 1.0beta4
|
||||||
|
Requires: %{name} = %{ver}
|
||||||
|
|
||||||
|
%description -n gstreamer-vorbis
|
||||||
|
Plugins for creating end playing Ogg Vorbis audio files.
|
||||||
|
|
||||||
|
%files -n gstreamer-vorbis
|
||||||
|
%defattr(-, root, root)
|
||||||
|
%{prefix}/lib/gst/libgstvorbis*
|
||||||
|
|
||||||
|
%package -n gstreamer-sdl
|
||||||
|
Summary: Gstreamer plugin for outputing to SDL
|
||||||
|
Group: Libraries/Multimedia
|
||||||
|
Requires: SDL >= 1.1.7
|
||||||
|
Requires: %{name} = %{ver}
|
||||||
|
|
||||||
|
%description -n gstreamer-sdl
|
||||||
|
Plugin for sending output to the Simple Direct Media architecture.
|
||||||
|
(http://www.libsdl.org). Usefull for fullscreen playback.
|
||||||
|
|
||||||
|
%files -n gstreamer-sdl
|
||||||
|
%defattr(-, root, root)
|
||||||
|
%{prefix}/lib/gst/libsdl*
|
||||||
|
|
||||||
|
%package -n gstreamer-oss
|
||||||
|
Summary: Gstreamer plugins for input and output using OSS
|
||||||
|
Group: Libraries/Multimedia
|
||||||
|
Requires: %{name} = %{ver}
|
||||||
|
|
||||||
|
%description -n gstreamer-oss
|
||||||
|
Plugins for output and input to the OpenSoundSytem audio
|
||||||
|
drivers found in the Linux kernels or comercially available
|
||||||
|
from OpenSound.
|
||||||
|
|
||||||
|
%files -n gstreamer-oss
|
||||||
|
%defattr(-, root, root)
|
||||||
|
%{prefix}/lib/gst/libgstoss*
|
||||||
|
|
||||||
|
%package -n gstreamer-ac3dec
|
||||||
|
Summary: Gstreamer plugin for VOB playback
|
||||||
|
Group: Libraries/Multimedia
|
||||||
|
Requires: ac3dec >= 0.6.2
|
||||||
|
Requires: %{name} = %{ver}
|
||||||
|
|
||||||
|
%description -n gstreamer-ac3dec
|
||||||
|
Plugin for the free AC-3 stream decoder from Linuxvideo.
|
||||||
|
(http://linuxvideo.org/ac3dec/)
|
||||||
|
|
||||||
|
%files -n gstreamer-ac3dec
|
||||||
|
%defattr(-, root, root)
|
||||||
|
%{prefix}/lib/gst/libac3*
|
||||||
|
|
||||||
|
%package -n gstreamer-ladspa
|
||||||
|
Summary: Gstreamer wrapper for LADSPA plugins
|
||||||
|
Group: Libraries/Multimedia
|
||||||
|
Requires: %{name} = %{ver}
|
||||||
|
|
||||||
|
%files -n gstreamer-ladspa
|
||||||
|
%defattr(-, root, root)
|
||||||
|
%{prefix}/lib/gst/libgstladspa*
|
||||||
|
|
||||||
|
%description -n gstreamer-ladspa
|
||||||
|
Plugin which wraps LADSPA plugins for use by GStreamer applications.
|
||||||
|
|
||||||
|
%package -n gstreamer-mad
|
||||||
|
Summary: Gstreamer MAD mp3 decoder library
|
||||||
|
Group: Libraries/Multimedia
|
||||||
|
Requires: %{name} = %{ver}
|
||||||
|
Requires: mad >= 0.13.0
|
||||||
|
|
||||||
|
%description -n gstreamer-mad
|
||||||
|
Plugin for playback of mp3 songs using the very good MAD library
|
||||||
|
|
||||||
|
%files -n gstreamer-mad
|
||||||
|
%defattr(-, root, root)
|
||||||
|
%{prefix}/lib/gst/libgstmad*
|
||||||
|
|
||||||
|
%package -n gstreamer-v4l
|
||||||
|
Summary: Gstreamer video for linux input plugin
|
||||||
|
Group: Libraries/Multimedia
|
||||||
|
Requires: %{name} = %{ver}
|
||||||
|
|
||||||
|
%description -n gstreamer-v4l
|
||||||
|
Plugin for inputing video for Linux streams.
|
||||||
|
|
||||||
|
%files -n gstreamer-v4l
|
||||||
|
%defattr(-, root, root)
|
||||||
|
%{prefix}/lib/gst/libv4l*
|
||||||
|
|
||||||
|
%package -n gstreamer-synaesthesia
|
||||||
|
Summary: GStreamer Synaesthesia effect plugin
|
||||||
|
Group: Libraries/Multimedia
|
||||||
|
Requires: %{name} = %{ver}
|
||||||
|
|
||||||
|
%description -n gstreamer-synaesthesia
|
||||||
|
Plugin for the very nice synaesthesia visual effect.
|
||||||
|
|
||||||
|
%files -n gstreamer-synaesthesia
|
||||||
|
%defattr(-, root, root)
|
||||||
|
%{prefix}/lib/gst/libsynaesthesia*
|
||||||
|
|
||||||
|
%package -n gstreamer-vcd
|
||||||
|
Summary: GStreamer Video CD plugin
|
||||||
|
Group: Libraries/Multimedia
|
||||||
|
Requires: %{name} = %{ver}
|
||||||
|
|
||||||
|
%description -n gstreamer-vcd
|
||||||
|
Video CD playback plugin
|
||||||
|
|
||||||
|
%files -n gstreamer-vcd
|
||||||
|
%defattr(-, root, root)
|
||||||
|
%{prefix}/lib/gst/libvcd*
|
||||||
|
|
||||||
|
# %package -n gstreamer-alsa
|
||||||
|
# Summary: GStreamer plugins for the ALSA sound architecture
|
||||||
|
# Group: Libraries/Multimedia
|
||||||
|
|
||||||
|
# %description -n gstreamer-alsa
|
||||||
|
# Input and output plugin for the ALSA soundcard driver architecture.
|
||||||
|
|
||||||
|
# %files -n gstreamer-alsa
|
||||||
|
# %defattr(-, root, root)
|
||||||
|
# %{prefix}/lib/gst/libalsa*
|
||||||
|
|
||||||
|
%package -n gstreamer-au
|
||||||
|
Summary: GStreamer au audiofile plugin
|
||||||
|
Group: Libraries/Multimedia
|
||||||
|
Requires: %{name} = %{ver}
|
||||||
|
|
||||||
|
%description -n gstreamer-au
|
||||||
|
Plugin for playback of the SUN au audio format.
|
||||||
|
|
||||||
|
%files -n gstreamer-au
|
||||||
|
%defattr(-, root, root)
|
||||||
|
%{prefix}/lib/gst/libgstparseau*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sat Jun 09 2001 Christian Schaller <Uraeus@linuxrising.org>
|
||||||
|
- Continue regrouping files with
|
||||||
|
- Visualisation plugins bundled out togheter
|
||||||
|
- Moved files sections up close to their respective descriptions
|
||||||
|
|
||||||
* Sat Jun 02 2001 Christian Schaller <Uraeus@linuxrising.org>
|
* Sat Jun 02 2001 Christian Schaller <Uraeus@linuxrising.org>
|
||||||
* Small fix to RPM group statement
|
- Split the package into separate RPMS, plutting most plugins out by themselves.
|
||||||
|
|
||||||
* Fri Jun 01 2001 Christian Schaller <Uraeus@linuxrising.org>
|
* Fri Jun 01 2001 Christian Schaller <Uraeus@linuxrising.org>
|
||||||
- Included fix suggestions from Dennis Bjorklund
|
- Updated with change suggestions from Dennis Bjorklund
|
||||||
* Tue Jan 09 2001 Erik Walthinsen <omega@cse.ogi.edu>
|
* Tue Jan 09 2001 Erik Walthinsen <omega@cse.ogi.edu>
|
||||||
- updated to build -devel package as well
|
- updated to build -devel package as well
|
||||||
|
|
||||||
|
@ -53,7 +433,8 @@ applications and plugins for GStreamer.
|
||||||
%setup
|
%setup
|
||||||
|
|
||||||
%build
|
%build
|
||||||
CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%prefix
|
FLAGS="$RPM_OPT_FLAGS" ./autogen.sh --prefix=%{prefix}
|
||||||
|
CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{prefix}
|
||||||
|
|
||||||
if [ "$SMP" != "" ]; then
|
if [ "$SMP" != "" ]; then
|
||||||
(make "MAKE=make -k -j $SMP"; exit 0)
|
(make "MAKE=make -k -j $SMP"; exit 0)
|
||||||
|
@ -72,30 +453,76 @@ make prefix=$RPM_BUILD_ROOT%{prefix} install
|
||||||
|
|
||||||
%post
|
%post
|
||||||
/sbin/ldconfig
|
/sbin/ldconfig
|
||||||
%{prefix}/bin/gstreamer-register
|
%{prefix}/bin/gstreamer-register --gst-mask=0
|
||||||
|
|
||||||
|
%post -n gstreamer-esd
|
||||||
|
%{prefix}/bin/gstreamer-register --gst-mask=0
|
||||||
|
|
||||||
|
%post -n gstreamer-mpeg1
|
||||||
|
%{prefix}/bin/gstreamer-register --gst-mask=0
|
||||||
|
|
||||||
|
%post -n gstreamer-mpeg2
|
||||||
|
%{prefix}/bin/gstreamer-register --gst-mask=0
|
||||||
|
|
||||||
|
%post -n gstreamer-mp3
|
||||||
|
%{prefix}/bin/gstreamer-register --gst-mask=0
|
||||||
|
|
||||||
|
%post -n gstreamer-mpeg2dec
|
||||||
|
%{prefix}/bin/gstreamer-register --gst-mask=0
|
||||||
|
|
||||||
|
%post -n gstreamer-visualisation
|
||||||
|
%{prefix}/bin/gstreamer-register --gst-mask=0
|
||||||
|
|
||||||
|
%post -n gstreamer-gsm
|
||||||
|
%{prefix}/bin/gstreamer-register --gst-mask=0
|
||||||
|
|
||||||
|
%post -n gstreamer-cdparanoia
|
||||||
|
%{prefix}/bin/gstreamer-register --gst-mask=0
|
||||||
|
|
||||||
|
%post -n gstreamer-aalib
|
||||||
|
%{prefix}/bin/gstreamer-register --gst-mask=0
|
||||||
|
|
||||||
|
%post -n gstreamer-gnomevfs
|
||||||
|
%{prefix}/bin/gstreamer-register --gst-mask=0
|
||||||
|
|
||||||
|
%post -n gstreamer-flx
|
||||||
|
%{prefix}/bin/gstreamer-register --gst-mask=0
|
||||||
|
|
||||||
|
%post -n gstreamer-avi
|
||||||
|
%{prefix}/bin/gstreamer-register --gst-mask=0
|
||||||
|
|
||||||
|
%post -n gstreamer-vorbis
|
||||||
|
%{prefix}/bin/gstreamer-register --gst-mask=0
|
||||||
|
|
||||||
|
%post -n gstreamer-sdl
|
||||||
|
%{prefix}/bin/gstreamer-register --gst-mask=0
|
||||||
|
|
||||||
|
%post -n gstreamer-oss
|
||||||
|
%{prefix}/bin/gstreamer-register --gst-mask=0
|
||||||
|
|
||||||
|
%post -n gstreamer-ac3dec
|
||||||
|
%{prefix}/bin/gstreamer-register --gst-mask=0
|
||||||
|
|
||||||
|
%post -n gstreamer-afs
|
||||||
|
%{prefix}/bin/gstreamer-register --gst-mask=0
|
||||||
|
|
||||||
|
%post -n gstreamer-ladspa
|
||||||
|
%{prefix}/bin/gstreamer-register --gst-mask=0
|
||||||
|
|
||||||
|
%post -n gstreamer-mad
|
||||||
|
%{prefix}/bin/gstreamer-register --gst-mask=0
|
||||||
|
|
||||||
|
%post -n gstreamer-au
|
||||||
|
%{prefix}/bin/gstreamer-register --gst-mask=0
|
||||||
|
|
||||||
|
%post -n gstreamer-v4l
|
||||||
|
%{prefix}/bin/gstreamer-register --gst-mask=0
|
||||||
|
|
||||||
|
%post -n gstreamer-vcd
|
||||||
|
%{prefix}/bin/gstreamer-register --gst-mask=0
|
||||||
|
|
||||||
|
# %post -n gstreamer-alsa
|
||||||
|
# %{prefix}/bin/gstreamer-register --gst-mask=0
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
/sbin/ldconfig
|
/sbin/ldconfig
|
||||||
|
|
||||||
%files
|
|
||||||
%defattr(-, root, root)
|
|
||||||
%doc AUTHORS COPYING README
|
|
||||||
%{prefix}/bin/gsteditor
|
|
||||||
%{prefix}/bin/gstmediaplay
|
|
||||||
%{prefix}/bin/gstreamer-complete
|
|
||||||
%{prefix}/bin/gstreamer-compprep
|
|
||||||
%{prefix}/bin/gstreamer-inspect
|
|
||||||
%{prefix}/bin/gstreamer-launch
|
|
||||||
%{prefix}/bin/gstreamer-register
|
|
||||||
%{prefix}/lib/lib*.so.*
|
|
||||||
%{prefix}/lib/gst/*
|
|
||||||
%{prefix}/share/*
|
|
||||||
%{prefix}/man/man1/*
|
|
||||||
|
|
||||||
%files devel
|
|
||||||
%defattr(-, root, root)
|
|
||||||
%{prefix}/bin/gstreamer-config
|
|
||||||
%{prefix}/include/*
|
|
||||||
%{prefix}/lib/lib*.la
|
|
||||||
%{prefix}/lib/lib*.so
|
|
||||||
%{prefix}/lib/pkgconfig/*
|
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
# Idiot test to stop the installing of versions with plugin srcdir enabled
|
# Idiot test to stop the installing of versions with plugin builddir enabled
|
||||||
install-exec-local:
|
install-exec-local:
|
||||||
if PLUGINS_USE_SRCDIR
|
if PLUGINS_USE_BUILDDIR
|
||||||
@echo "*** ERROR: Cannot install:"
|
@echo "*** ERROR: Cannot install:"
|
||||||
@echo "GStreamer was configured using the --enable-plugin-srcdir option."
|
@echo "GStreamer was configured using the --enable-plugin-builddir option."
|
||||||
@echo
|
@echo
|
||||||
@echo "This option is for development purposes only: binaries built with"
|
@echo "This option is for development purposes only: binaries built with"
|
||||||
@echo "it should be used with code in the build tree only. To build an"
|
@echo "it should be used with code in the build tree only. To build an"
|
||||||
@echo "installable version, use ./configure without the --enable-plugin-srcdir"
|
@echo "installable version, use ./configure without the --enable-plugin-builddir"
|
||||||
@echo "option. Note that the autogen.sh script supplies the plugin srcdir"
|
@echo "option. Note that the autogen.sh script supplies the plugin builddir"
|
||||||
@echo "option automatically - it cannot be used to configure installable builds."
|
@echo "option automatically - it cannot be used to configure installable builds."
|
||||||
@echo
|
@echo
|
||||||
@/bin/false
|
@/bin/false
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
SUBDIRS = wine
|
|
||||||
|
|
||||||
noinst_HEADERS = \
|
noinst_HEADERS = \
|
||||||
mmx.h \
|
mmx.h \
|
||||||
sse.h \
|
sse.h \
|
||||||
|
|
7
include/wine/.gitignore
vendored
7
include/wine/.gitignore
vendored
|
@ -1,7 +0,0 @@
|
||||||
Makefile
|
|
||||||
Makefile.in
|
|
||||||
*.o
|
|
||||||
*.lo
|
|
||||||
*.la
|
|
||||||
.deps
|
|
||||||
.libs
|
|
|
@ -1,28 +0,0 @@
|
||||||
noinst_HEADERS = \
|
|
||||||
basetsd.h \
|
|
||||||
config.h \
|
|
||||||
debugtools.h \
|
|
||||||
driver.h \
|
|
||||||
elfdll.h \
|
|
||||||
heap.h \
|
|
||||||
ldt.h \
|
|
||||||
mmreg.h \
|
|
||||||
module.h \
|
|
||||||
msacm.h \
|
|
||||||
msacmdrv.h \
|
|
||||||
ntdef.h \
|
|
||||||
pe_image.h \
|
|
||||||
poppack.h \
|
|
||||||
pshpack1.h \
|
|
||||||
pshpack2.h \
|
|
||||||
pshpack4.h \
|
|
||||||
pshpack8.h \
|
|
||||||
vfw.h \
|
|
||||||
winbase.h \
|
|
||||||
windef.h \
|
|
||||||
windows.h \
|
|
||||||
winerror.h \
|
|
||||||
winestring.h \
|
|
||||||
winnt.h \
|
|
||||||
winreg.h \
|
|
||||||
winuser.h
|
|
|
@ -1,145 +0,0 @@
|
||||||
/*
|
|
||||||
* Compilers that uses ILP32, LP64 or P64 type models
|
|
||||||
* for both Win32 and Win64 are supported by this file.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef __WINE_BASETSD_H
|
|
||||||
#define __WINE_BASETSD_H
|
|
||||||
|
|
||||||
#ifdef __WINE__
|
|
||||||
#include "config.h"
|
|
||||||
#endif /* defined(__WINE__) */
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif /* defined(__cplusplus) */
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Win32 was easy to implement under Unix since most (all?) 32-bit
|
|
||||||
* Unices uses the same type model (ILP32) as Win32, where int, long
|
|
||||||
* and pointer are 32-bit.
|
|
||||||
*
|
|
||||||
* Win64, however, will cause some problems when implemented under Unix.
|
|
||||||
* Linux/{Alpha, Sparc64} and most (all?) other 64-bit Unices uses
|
|
||||||
* the LP64 type model where int is 32-bit and long and pointer are
|
|
||||||
* 64-bit. Win64 on the other hand uses the P64 (sometimes called LLP64)
|
|
||||||
* type model where int and long are 32 bit and pointer is 64-bit.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* Type model indepent typedefs */
|
|
||||||
|
|
||||||
typedef char __int8;
|
|
||||||
typedef unsigned char __uint8;
|
|
||||||
|
|
||||||
typedef short __int16;
|
|
||||||
typedef unsigned short __uint16;
|
|
||||||
|
|
||||||
typedef int __int32;
|
|
||||||
typedef unsigned int __uint32;
|
|
||||||
|
|
||||||
typedef long long __int64;
|
|
||||||
typedef unsigned long long __uint64;
|
|
||||||
|
|
||||||
#if defined(_WIN64)
|
|
||||||
|
|
||||||
typedef __uint32 __ptr32;
|
|
||||||
typedef void *__ptr64;
|
|
||||||
|
|
||||||
#else /* FIXME: defined(_WIN32) */
|
|
||||||
|
|
||||||
typedef void *__ptr32;
|
|
||||||
typedef __uint64 __ptr64;
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Always signed and 32 bit wide */
|
|
||||||
|
|
||||||
typedef __int32 LONG32;
|
|
||||||
typedef __int32 INT32;
|
|
||||||
|
|
||||||
typedef LONG32 *PLONG32;
|
|
||||||
typedef INT32 *PINT32;
|
|
||||||
|
|
||||||
/* Always unsigned and 32 bit wide */
|
|
||||||
|
|
||||||
typedef __uint32 ULONG32;
|
|
||||||
typedef __uint32 DWORD32;
|
|
||||||
typedef __uint32 UINT32;
|
|
||||||
|
|
||||||
typedef ULONG32 *PULONG32;
|
|
||||||
typedef DWORD32 *PDWORD32;
|
|
||||||
typedef UINT32 *PUINT32;
|
|
||||||
|
|
||||||
/* Always signed and 64 bit wide */
|
|
||||||
|
|
||||||
typedef __int64 LONG64;
|
|
||||||
typedef __int64 INT64;
|
|
||||||
|
|
||||||
typedef LONG64 *PLONG64;
|
|
||||||
typedef INT64 *PINT64;
|
|
||||||
|
|
||||||
/* Always unsigned and 64 bit wide */
|
|
||||||
|
|
||||||
typedef __uint64 ULONG64;
|
|
||||||
typedef __uint64 DWORD64;
|
|
||||||
typedef __uint64 UINT64;
|
|
||||||
|
|
||||||
typedef ULONG64 *PULONG64;
|
|
||||||
typedef DWORD64 *PDWORD64;
|
|
||||||
typedef UINT64 *PUINT64;
|
|
||||||
|
|
||||||
/* Win32 or Win64 dependent typedef/defines. */
|
|
||||||
|
|
||||||
#ifdef _WIN64
|
|
||||||
|
|
||||||
typedef __int64 INT_PTR, *PINT_PTR;
|
|
||||||
typedef __uint64 UINT_PTR, *PUINT_PTR;
|
|
||||||
|
|
||||||
#define MAXINT_PTR 0x7fffffffffffffff
|
|
||||||
#define MININT_PTR 0x8000000000000000
|
|
||||||
#define MAXUINT_PTR 0xffffffffffffffff
|
|
||||||
|
|
||||||
typedef __int32 HALF_PTR, *PHALF_PTR;
|
|
||||||
typedef __int32 UHALF_PTR, *PUHALF_PTR;
|
|
||||||
|
|
||||||
#define MAXHALF_PTR 0x7fffffff
|
|
||||||
#define MINHALF_PTR 0x80000000
|
|
||||||
#define MAXUHALF_PTR 0xffffffff
|
|
||||||
|
|
||||||
typedef __int64 LONG_PTR, *PLONG_PTR;
|
|
||||||
typedef __uint64 ULONG_PTR, *PULONG_PTR;
|
|
||||||
typedef __uint64 DWORD_PTR, *PDWORD_PTR;
|
|
||||||
|
|
||||||
#else /* FIXME: defined(_WIN32) */
|
|
||||||
|
|
||||||
typedef __int32 INT_PTR, *PINT_PTR;
|
|
||||||
typedef __uint32 UINT_PTR, *PUINT_PTR;
|
|
||||||
|
|
||||||
#define MAXINT_PTR 0x7fffffff
|
|
||||||
#define MININT_PTR 0x80000000
|
|
||||||
#define MAXUINT_PTR 0xffffffff
|
|
||||||
|
|
||||||
typedef __int16 HALF_PTR, *PHALF_PTR;
|
|
||||||
typedef __uint16 UHALF_PTR, *PUHALF_PTR;
|
|
||||||
|
|
||||||
#define MAXUHALF_PTR 0xffff
|
|
||||||
#define MAXHALF_PTR 0x7fff
|
|
||||||
#define MINHALF_PTR 0x8000
|
|
||||||
|
|
||||||
typedef __int32 LONG_PTR, *PLONG_PTR;
|
|
||||||
typedef __uint32 ULONG_PTR, *PULONG_PTR;
|
|
||||||
typedef __uint32 DWORD_PTR, *PDWORD_PTR;
|
|
||||||
|
|
||||||
#endif /* defined(_WIN64) || defined(_WIN32) */
|
|
||||||
|
|
||||||
typedef INT_PTR SSIZE_T, *PSSIZE_T;
|
|
||||||
typedef UINT_PTR SIZE_T, *PSIZE_T;
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
} /* extern "C" */
|
|
||||||
#endif /* defined(__cplusplus) */
|
|
||||||
|
|
||||||
#endif /* !defined(__WINE_BASETSD_H) */
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,442 +0,0 @@
|
||||||
/* include/config.h. Generated automatically by configure. */
|
|
||||||
/* include/config.h.in. Generated automatically from configure.in by autoheader. */
|
|
||||||
|
|
||||||
/* Define if using alloca.c. */
|
|
||||||
/* #undef C_ALLOCA */
|
|
||||||
|
|
||||||
/* Define to empty if the keyword does not work. */
|
|
||||||
/* #undef const */
|
|
||||||
|
|
||||||
/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
|
|
||||||
This function is required for alloca.c support on those systems. */
|
|
||||||
/* #undef CRAY_STACKSEG_END */
|
|
||||||
|
|
||||||
/* Define if you have alloca, as a function or macro. */
|
|
||||||
#define HAVE_ALLOCA 1
|
|
||||||
|
|
||||||
/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
|
|
||||||
#define HAVE_ALLOCA_H 1
|
|
||||||
|
|
||||||
/* Define as __inline if that's what the C compiler calls it. */
|
|
||||||
/* #undef inline */
|
|
||||||
|
|
||||||
/* Define to `unsigned' if <sys/types.h> doesn't define. */
|
|
||||||
/* #undef size_t */
|
|
||||||
|
|
||||||
/* If using the C implementation of alloca, define if you know the
|
|
||||||
direction of stack growth for your system; otherwise it will be
|
|
||||||
automatically deduced at run-time.
|
|
||||||
STACK_DIRECTION > 0 => grows toward higher addresses
|
|
||||||
STACK_DIRECTION < 0 => grows toward lower addresses
|
|
||||||
STACK_DIRECTION = 0 => direction of growth unknown
|
|
||||||
*/
|
|
||||||
/* #undef STACK_DIRECTION */
|
|
||||||
|
|
||||||
/* Define if the `S_IS*' macros in <sys/stat.h> do not work properly. */
|
|
||||||
/* #undef STAT_MACROS_BROKEN */
|
|
||||||
|
|
||||||
/* Define if you have the ANSI C header files. */
|
|
||||||
#define STDC_HEADERS 1
|
|
||||||
|
|
||||||
/* Define if your processor stores words with the most significant
|
|
||||||
byte first (like Motorola and SPARC, unlike Intel and VAX). */
|
|
||||||
/* #undef WORDS_BIGENDIAN */
|
|
||||||
|
|
||||||
/* Define if the X Window System is missing or not being used. */
|
|
||||||
/* #undef X_DISPLAY_MISSING */
|
|
||||||
|
|
||||||
/* Define if symbols declared in assembly code need an underscore prefix */
|
|
||||||
/* #undef NEED_UNDERSCORE_PREFIX */
|
|
||||||
|
|
||||||
/* Define to use .string instead of .ascii */
|
|
||||||
#define HAVE_ASM_STRING 1
|
|
||||||
|
|
||||||
/* Define if struct msghdr contains msg_accrights */
|
|
||||||
/* #undef HAVE_MSGHDR_ACCRIGHTS */
|
|
||||||
|
|
||||||
/* Define if struct sockaddr_un contains sun_len */
|
|
||||||
/* #undef HAVE_SOCKADDR_SUN_LEN */
|
|
||||||
|
|
||||||
/* Define if you have the Xxf86dga library (-lXxf86dga). */
|
|
||||||
#define HAVE_LIBXXF86DGA 1
|
|
||||||
|
|
||||||
/* Define if you have the Xxf86dga library version 2.0 (-lXxf86dga). */
|
|
||||||
/* #undef HAVE_LIBXXF86DGA2 */
|
|
||||||
|
|
||||||
/* Define if you have the X Shm extension */
|
|
||||||
#define HAVE_LIBXXSHM 1
|
|
||||||
|
|
||||||
/* Define if you have the Xxf86vm library */
|
|
||||||
#define HAVE_LIBXXF86VM 1
|
|
||||||
|
|
||||||
/* Define if you have the Xpm library */
|
|
||||||
#define HAVE_LIBXXPM 1
|
|
||||||
|
|
||||||
/* Define if you have the Open Sound system. */
|
|
||||||
#define HAVE_OSS 1
|
|
||||||
|
|
||||||
/* Define if you have the Open Sound system (MIDI interface). */
|
|
||||||
#define HAVE_OSS_MIDI 1
|
|
||||||
|
|
||||||
/* Define if X libraries are not reentrant (compiled without -D_REENTRANT). */
|
|
||||||
/* #undef NO_REENTRANT_X11 */
|
|
||||||
|
|
||||||
/* Define if libc is not reentrant */
|
|
||||||
/* #undef NO_REENTRANT_LIBC */
|
|
||||||
|
|
||||||
/* Define if libc uses __errno_location for reentrant errno */
|
|
||||||
#define HAVE__ERRNO_LOCATION 1
|
|
||||||
|
|
||||||
/* Define if libc uses __error for reentrant errno */
|
|
||||||
/* #undef HAVE__ERROR */
|
|
||||||
|
|
||||||
/* Define if libc uses ___errno for reentrant errno */
|
|
||||||
/* #undef HAVE___ERRNO */
|
|
||||||
|
|
||||||
/* Define if libc uses __thr_errno for reentrant errno */
|
|
||||||
/* #undef HAVE__THR_ERRNO */
|
|
||||||
|
|
||||||
/* Define if all debug messages are to be compiled out */
|
|
||||||
/* #undef NO_DEBUG_MSGS */
|
|
||||||
|
|
||||||
/* Define if TRACE messages are to be compiled out */
|
|
||||||
/* #undef NO_TRACE_MSGS */
|
|
||||||
|
|
||||||
/* Define if the struct statfs has the member bavail */
|
|
||||||
#define STATFS_HAS_BAVAIL 1
|
|
||||||
|
|
||||||
/* Define if the struct statfs has the member bfree */
|
|
||||||
#define STATFS_HAS_BFREE 1
|
|
||||||
|
|
||||||
/* Define if the struct statfs is defined by <sys/vfs.h> */
|
|
||||||
#define STATFS_DEFINED_BY_SYS_VFS 1
|
|
||||||
|
|
||||||
/* Define if the struct statfs is defined by <sys/statfs.h> */
|
|
||||||
#define STATFS_DEFINED_BY_SYS_STATFS 1
|
|
||||||
|
|
||||||
/* Define if the struct statfs is defined by <sys/mount.h> */
|
|
||||||
/* #undef STATFS_DEFINED_BY_SYS_MOUNT */
|
|
||||||
|
|
||||||
/* Define if ncurses have the new resizeterm function */
|
|
||||||
#define HAVE_RESIZETERM 1
|
|
||||||
|
|
||||||
/* Define if ncurses have the new getbkgd function */
|
|
||||||
#define HAVE_GETBKGD 1
|
|
||||||
|
|
||||||
/* Define if IPX should use netipx/ipx.h from libc */
|
|
||||||
#define HAVE_IPX_GNU 1
|
|
||||||
|
|
||||||
/* Define if IPX includes are taken from Linux kernel */
|
|
||||||
/* #undef HAVE_IPX_LINUX */
|
|
||||||
|
|
||||||
/* Define if Mesa is present on the system or not */
|
|
||||||
/* #undef HAVE_LIBMESAGL */
|
|
||||||
|
|
||||||
/* Define if the system has dynamic link library support with the dl* API */
|
|
||||||
#define HAVE_DL_API 1
|
|
||||||
|
|
||||||
/* Define if <linux/joystick.h> defines the Linux 2.2 joystick API */
|
|
||||||
#define HAVE_LINUX_22_JOYSTICK_API 1
|
|
||||||
|
|
||||||
/* Define if the OpenGL implementation supports the GL_EXT_color_table extension */
|
|
||||||
/* #undef HAVE_GL_COLOR_TABLE */
|
|
||||||
|
|
||||||
/* Define if the OpenGL implementation supports the GL_EXT_paletted_texture extension */
|
|
||||||
/* #undef HAVE_GL_PALETTED_TEXTURE */
|
|
||||||
|
|
||||||
/* The number of bytes in a long long. */
|
|
||||||
#define SIZEOF_LONG_LONG 8
|
|
||||||
|
|
||||||
/* Define if you have the __libc_fork function. */
|
|
||||||
/* #undef HAVE___LIBC_FORK */
|
|
||||||
|
|
||||||
/* Define if you have the _lwp_create function. */
|
|
||||||
/* #undef HAVE__LWP_CREATE */
|
|
||||||
|
|
||||||
/* Define if you have the clone function. */
|
|
||||||
#define HAVE_CLONE 1
|
|
||||||
|
|
||||||
/* Define if you have the connect function. */
|
|
||||||
#define HAVE_CONNECT 1
|
|
||||||
|
|
||||||
/* Define if you have the dlopen function. */
|
|
||||||
/* #undef HAVE_DLOPEN */
|
|
||||||
|
|
||||||
/* Define if you have the gethostbyname function. */
|
|
||||||
#define HAVE_GETHOSTBYNAME 1
|
|
||||||
|
|
||||||
/* Define if you have the getnetbyaddr function. */
|
|
||||||
#define HAVE_GETNETBYADDR 1
|
|
||||||
|
|
||||||
/* Define if you have the getnetbyname function. */
|
|
||||||
#define HAVE_GETNETBYNAME 1
|
|
||||||
|
|
||||||
/* Define if you have the getpagesize function. */
|
|
||||||
#define HAVE_GETPAGESIZE 1
|
|
||||||
|
|
||||||
/* Define if you have the getprotobyname function. */
|
|
||||||
#define HAVE_GETPROTOBYNAME 1
|
|
||||||
|
|
||||||
/* Define if you have the getprotobynumber function. */
|
|
||||||
#define HAVE_GETPROTOBYNUMBER 1
|
|
||||||
|
|
||||||
/* Define if you have the getservbyport function. */
|
|
||||||
#define HAVE_GETSERVBYPORT 1
|
|
||||||
|
|
||||||
/* Define if you have the getsockopt function. */
|
|
||||||
#define HAVE_GETSOCKOPT 1
|
|
||||||
|
|
||||||
/* Define if you have the inet_network function. */
|
|
||||||
#define HAVE_INET_NETWORK 1
|
|
||||||
|
|
||||||
/* Define if you have the memmove function. */
|
|
||||||
#define HAVE_MEMMOVE 1
|
|
||||||
|
|
||||||
/* Define if you have the openpty function. */
|
|
||||||
#define HAVE_OPENPTY 1
|
|
||||||
|
|
||||||
/* Define if you have the rfork function. */
|
|
||||||
/* #undef HAVE_RFORK */
|
|
||||||
|
|
||||||
/* Define if you have the select function. */
|
|
||||||
#define HAVE_SELECT 1
|
|
||||||
|
|
||||||
/* Define if you have the sendmsg function. */
|
|
||||||
#define HAVE_SENDMSG 1
|
|
||||||
|
|
||||||
/* Define if you have the settimeofday function. */
|
|
||||||
#define HAVE_SETTIMEOFDAY 1
|
|
||||||
|
|
||||||
/* Define if you have the sigaltstack function. */
|
|
||||||
#define HAVE_SIGALTSTACK 1
|
|
||||||
|
|
||||||
/* Define if you have the statfs function. */
|
|
||||||
#define HAVE_STATFS 1
|
|
||||||
|
|
||||||
/* Define if you have the strcasecmp function. */
|
|
||||||
#define HAVE_STRCASECMP 1
|
|
||||||
|
|
||||||
/* Define if you have the strerror function. */
|
|
||||||
#define HAVE_STRERROR 1
|
|
||||||
|
|
||||||
/* Define if you have the strncasecmp function. */
|
|
||||||
#define HAVE_STRNCASECMP 1
|
|
||||||
|
|
||||||
/* Define if you have the tcgetattr function. */
|
|
||||||
#define HAVE_TCGETATTR 1
|
|
||||||
|
|
||||||
/* Define if you have the timegm function. */
|
|
||||||
#define HAVE_TIMEGM 1
|
|
||||||
|
|
||||||
/* Define if you have the usleep function. */
|
|
||||||
#define HAVE_USLEEP 1
|
|
||||||
|
|
||||||
/* Define if you have the vfscanf function. */
|
|
||||||
#define HAVE_VFSCANF 1
|
|
||||||
|
|
||||||
/* Define if you have the wait4 function. */
|
|
||||||
#define HAVE_WAIT4 1
|
|
||||||
|
|
||||||
/* Define if you have the waitpid function. */
|
|
||||||
#define HAVE_WAITPID 1
|
|
||||||
|
|
||||||
/* Define if you have the <GL/gl.h> header file. */
|
|
||||||
/* #undef HAVE_GL_GL_H */
|
|
||||||
|
|
||||||
/* Define if you have the <GL/glx.h> header file. */
|
|
||||||
/* #undef HAVE_GL_GLX_H */
|
|
||||||
|
|
||||||
/* Define if you have the <X11/Xlib.h> header file. */
|
|
||||||
#define HAVE_X11_XLIB_H 1
|
|
||||||
|
|
||||||
/* Define if you have the <X11/extensions/XShm.h> header file. */
|
|
||||||
#define HAVE_X11_EXTENSIONS_XSHM_H 1
|
|
||||||
|
|
||||||
/* Define if you have the <X11/extensions/xf86dga.h> header file. */
|
|
||||||
#define HAVE_X11_EXTENSIONS_XF86DGA_H 1
|
|
||||||
|
|
||||||
/* Define if you have the <X11/extensions/xf86vmode.h> header file. */
|
|
||||||
#define HAVE_X11_EXTENSIONS_XF86VMODE_H 1
|
|
||||||
|
|
||||||
/* Define if you have the <X11/xpm.h> header file. */
|
|
||||||
#define HAVE_X11_XPM_H 1
|
|
||||||
|
|
||||||
/* Define if you have the <a.out.h> header file. */
|
|
||||||
#define HAVE_A_OUT_H 1
|
|
||||||
|
|
||||||
/* Define if you have the <a_out.h> header file. */
|
|
||||||
#define HAVE_A_OUT_H 1
|
|
||||||
|
|
||||||
/* Define if you have the <arpa/inet.h> header file. */
|
|
||||||
#define HAVE_ARPA_INET_H 1
|
|
||||||
|
|
||||||
/* Define if you have the <arpa/nameser.h> header file. */
|
|
||||||
#define HAVE_ARPA_NAMESER_H 1
|
|
||||||
|
|
||||||
/* Define if you have the <curses.h> header file. */
|
|
||||||
/* #undef HAVE_CURSES_H */
|
|
||||||
|
|
||||||
/* Define if you have the <dlfcn.h> header file. */
|
|
||||||
#define HAVE_DLFCN_H 1
|
|
||||||
|
|
||||||
/* Define if you have the <elf.h> header file. */
|
|
||||||
#define HAVE_ELF_H 1
|
|
||||||
|
|
||||||
/* Define if you have the <float.h> header file. */
|
|
||||||
#define HAVE_FLOAT_H 1
|
|
||||||
|
|
||||||
/* Define if you have the <libio.h> header file. */
|
|
||||||
#define HAVE_LIBIO_H 1
|
|
||||||
|
|
||||||
/* Define if you have the <link.h> header file. */
|
|
||||||
#define HAVE_LINK_H 1
|
|
||||||
|
|
||||||
/* Define if you have the <linux/cdrom.h> header file. */
|
|
||||||
#define HAVE_LINUX_CDROM_H 1
|
|
||||||
|
|
||||||
/* Define if you have the <linux/joystick.h> header file. */
|
|
||||||
#define HAVE_LINUX_JOYSTICK_H 1
|
|
||||||
|
|
||||||
/* Define if you have the <linux/ucdrom.h> header file. */
|
|
||||||
/* #undef HAVE_LINUX_UCDROM_H */
|
|
||||||
|
|
||||||
/* Define if you have the <machine/soundcard.h> header file. */
|
|
||||||
/* #undef HAVE_MACHINE_SOUNDCARD_H */
|
|
||||||
|
|
||||||
/* Define if you have the <ncurses.h> header file. */
|
|
||||||
#define HAVE_NCURSES_H 1
|
|
||||||
|
|
||||||
/* Define if you have the <net/if.h> header file. */
|
|
||||||
#define HAVE_NET_IF_H 1
|
|
||||||
|
|
||||||
/* Define if you have the <netinet/in.h> header file. */
|
|
||||||
#define HAVE_NETINET_IN_H 1
|
|
||||||
|
|
||||||
/* Define if you have the <netinet/tcp.h> header file. */
|
|
||||||
#define HAVE_NETINET_TCP_H 1
|
|
||||||
|
|
||||||
/* Define if you have the <pty.h> header file. */
|
|
||||||
#define HAVE_PTY_H 1
|
|
||||||
|
|
||||||
/* Define if you have the <resolv.h> header file. */
|
|
||||||
#define HAVE_RESOLV_H 1
|
|
||||||
|
|
||||||
/* Define if you have the <sched.h> header file. */
|
|
||||||
#define HAVE_SCHED_H 1
|
|
||||||
|
|
||||||
/* Define if you have the <socket.h> header file. */
|
|
||||||
/* #undef HAVE_SOCKET_H */
|
|
||||||
|
|
||||||
/* Define if you have the <soundcard.h> header file. */
|
|
||||||
/* #undef HAVE_SOUNDCARD_H */
|
|
||||||
|
|
||||||
/* Define if you have the <strings.h> header file. */
|
|
||||||
#define HAVE_STRINGS_H 1
|
|
||||||
|
|
||||||
/* Define if you have the <sys/cdio.h> header file. */
|
|
||||||
/* #undef HAVE_SYS_CDIO_H */
|
|
||||||
|
|
||||||
/* Define if you have the <sys/errno.h> header file. */
|
|
||||||
#define HAVE_SYS_ERRNO_H 1
|
|
||||||
|
|
||||||
/* Define if you have the <sys/file.h> header file. */
|
|
||||||
#define HAVE_SYS_FILE_H 1
|
|
||||||
|
|
||||||
/* Define if you have the <sys/filio.h> header file. */
|
|
||||||
/* #undef HAVE_SYS_FILIO_H */
|
|
||||||
|
|
||||||
/* Define if you have the <sys/ipc.h> header file. */
|
|
||||||
#define HAVE_SYS_IPC_H 1
|
|
||||||
|
|
||||||
/* Define if you have the <sys/lwp.h> header file. */
|
|
||||||
/* #undef HAVE_SYS_LWP_H */
|
|
||||||
|
|
||||||
/* Define if you have the <sys/mman.h> header file. */
|
|
||||||
#define HAVE_SYS_MMAN_H 1
|
|
||||||
|
|
||||||
/* Define if you have the <sys/modem.h> header file. */
|
|
||||||
/* #undef HAVE_SYS_MODEM_H */
|
|
||||||
|
|
||||||
/* Define if you have the <sys/mount.h> header file. */
|
|
||||||
#define HAVE_SYS_MOUNT_H 1
|
|
||||||
|
|
||||||
/* Define if you have the <sys/msg.h> header file. */
|
|
||||||
#define HAVE_SYS_MSG_H 1
|
|
||||||
|
|
||||||
/* Define if you have the <sys/param.h> header file. */
|
|
||||||
#define HAVE_SYS_PARAM_H 1
|
|
||||||
|
|
||||||
/* Define if you have the <sys/reg.h> header file. */
|
|
||||||
#define HAVE_SYS_REG_H 1
|
|
||||||
|
|
||||||
/* Define if you have the <sys/shm.h> header file. */
|
|
||||||
#define HAVE_SYS_SHM_H 1
|
|
||||||
|
|
||||||
/* Define if you have the <sys/signal.h> header file. */
|
|
||||||
#define HAVE_SYS_SIGNAL_H 1
|
|
||||||
|
|
||||||
/* Define if you have the <sys/socket.h> header file. */
|
|
||||||
#define HAVE_SYS_SOCKET_H 1
|
|
||||||
|
|
||||||
/* Define if you have the <sys/sockio.h> header file. */
|
|
||||||
/* #undef HAVE_SYS_SOCKIO_H */
|
|
||||||
|
|
||||||
/* Define if you have the <sys/soundcard.h> header file. */
|
|
||||||
#define HAVE_SYS_SOUNDCARD_H 1
|
|
||||||
|
|
||||||
/* Define if you have the <sys/statfs.h> header file. */
|
|
||||||
#define HAVE_SYS_STATFS_H 1
|
|
||||||
|
|
||||||
/* Define if you have the <sys/strtio.h> header file. */
|
|
||||||
/* #undef HAVE_SYS_STRTIO_H */
|
|
||||||
|
|
||||||
/* Define if you have the <sys/syscall.h> header file. */
|
|
||||||
#define HAVE_SYS_SYSCALL_H 1
|
|
||||||
|
|
||||||
/* Define if you have the <sys/v86.h> header file. */
|
|
||||||
/* #undef HAVE_SYS_V86_H */
|
|
||||||
|
|
||||||
/* Define if you have the <sys/v86intr.h> header file. */
|
|
||||||
/* #undef HAVE_SYS_V86INTR_H */
|
|
||||||
|
|
||||||
/* Define if you have the <sys/vfs.h> header file. */
|
|
||||||
#define HAVE_SYS_VFS_H 1
|
|
||||||
|
|
||||||
/* Define if you have the <sys/vm86.h> header file. */
|
|
||||||
#define HAVE_SYS_VM86_H 1
|
|
||||||
|
|
||||||
/* Define if you have the <sys/wait.h> header file. */
|
|
||||||
#define HAVE_SYS_WAIT_H 1
|
|
||||||
|
|
||||||
/* Define if you have the <syscall.h> header file. */
|
|
||||||
#define HAVE_SYSCALL_H 1
|
|
||||||
|
|
||||||
/* Define if you have the <ucontext.h> header file. */
|
|
||||||
#define HAVE_UCONTEXT_H 1
|
|
||||||
|
|
||||||
/* Define if you have the <wctype.h> header file. */
|
|
||||||
#define HAVE_WCTYPE_H 1
|
|
||||||
|
|
||||||
/* Define if you have the curses library (-lcurses). */
|
|
||||||
/* #undef HAVE_LIBCURSES */
|
|
||||||
|
|
||||||
/* Define if you have the i386 library (-li386). */
|
|
||||||
/* #undef HAVE_LIBI386 */
|
|
||||||
|
|
||||||
/* Define if you have the m library (-lm). */
|
|
||||||
#define HAVE_LIBM 1
|
|
||||||
|
|
||||||
/* Define if you have the mmap library (-lmmap). */
|
|
||||||
/* #undef HAVE_LIBMMAP */
|
|
||||||
|
|
||||||
/* Define if you have the ncurses library (-lncurses). */
|
|
||||||
#define HAVE_LIBNCURSES 1
|
|
||||||
|
|
||||||
/* Define if you have the ossaudio library (-lossaudio). */
|
|
||||||
/* #undef HAVE_LIBOSSAUDIO */
|
|
||||||
|
|
||||||
/* Define if you have the w library (-lw). */
|
|
||||||
/* #undef HAVE_LIBW */
|
|
||||||
|
|
||||||
/* Define if you have the xpg4 library (-lxpg4). */
|
|
||||||
/* #undef HAVE_LIBXPG4 */
|
|
|
@ -1,93 +0,0 @@
|
||||||
|
|
||||||
#ifndef __WINE_DEBUGTOOLS_H
|
|
||||||
#define __WINE_DEBUGTOOLS_H
|
|
||||||
|
|
||||||
#ifdef __WINE__ /* Debugging interface is internal to Wine */
|
|
||||||
|
|
||||||
#include <stdarg.h>
|
|
||||||
#include "config.h"
|
|
||||||
#include "windef.h"
|
|
||||||
|
|
||||||
struct _GUID;
|
|
||||||
|
|
||||||
/* Internal definitions (do not use these directly) */
|
|
||||||
|
|
||||||
enum __DEBUG_CLASS { __DBCL_FIXME, __DBCL_ERR, __DBCL_WARN, __DBCL_TRACE, __DBCL_COUNT };
|
|
||||||
|
|
||||||
#ifndef NO_TRACE_MSGS
|
|
||||||
# define __GET_DEBUGGING_trace(dbch) ((dbch)[0] & (1 << __DBCL_TRACE))
|
|
||||||
#else
|
|
||||||
# define __GET_DEBUGGING_trace(dbch) 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef NO_DEBUG_MSGS
|
|
||||||
# define __GET_DEBUGGING_warn(dbch) ((dbch)[0] & (1 << __DBCL_WARN))
|
|
||||||
# define __GET_DEBUGGING_fixme(dbch) ((dbch)[0] & (1 << __DBCL_FIXME))
|
|
||||||
#else
|
|
||||||
# define __GET_DEBUGGING_warn(dbch) 0
|
|
||||||
# define __GET_DEBUGGING_fixme(dbch) 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* define error macro regardless of what is configured */
|
|
||||||
#define __GET_DEBUGGING_err(dbch) ((dbch)[0] & (1 << __DBCL_ERR))
|
|
||||||
|
|
||||||
#define __GET_DEBUGGING(dbcl,dbch) __GET_DEBUGGING_##dbcl(dbch)
|
|
||||||
#define __SET_DEBUGGING(dbcl,dbch,on) \
|
|
||||||
((on) ? ((dbch)[0] |= 1 << (dbcl)) : ((dbch)[0] &= ~(1 << (dbcl))))
|
|
||||||
|
|
||||||
#ifndef __GNUC__
|
|
||||||
#define __FUNCTION__ ""
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define __DPRINTF(dbcl,dbch) \
|
|
||||||
(!__GET_DEBUGGING(dbcl,(dbch)) || (dbg_header_##dbcl((dbch),__FUNCTION__),0)) ? \
|
|
||||||
(void)0 : (void)dbg_printf
|
|
||||||
|
|
||||||
/* Exported definitions and macros */
|
|
||||||
|
|
||||||
/* These function return a printable version of a string, including
|
|
||||||
quotes. The string will be valid for some time, but not indefinitely
|
|
||||||
as strings are re-used. */
|
|
||||||
extern LPCSTR debugstr_an (LPCSTR s, int n);
|
|
||||||
extern LPCSTR debugstr_wn (LPCWSTR s, int n);
|
|
||||||
extern LPCSTR debugres_a (LPCSTR res);
|
|
||||||
extern LPCSTR debugres_w (LPCWSTR res);
|
|
||||||
extern LPCSTR debugstr_guid( const struct _GUID *id );
|
|
||||||
extern LPCSTR debugstr_hex_dump (const void *ptr, int len);
|
|
||||||
extern int dbg_header_err( const char *dbg_channel, const char *func );
|
|
||||||
extern int dbg_header_warn( const char *dbg_channel, const char *func );
|
|
||||||
extern int dbg_header_fixme( const char *dbg_channel, const char *func );
|
|
||||||
extern int dbg_header_trace( const char *dbg_channel, const char *func );
|
|
||||||
extern int dbg_vprintf( const char *format, va_list args );
|
|
||||||
|
|
||||||
static inline LPCSTR debugstr_a( LPCSTR s ) { return debugstr_an( s, 80 ); }
|
|
||||||
static inline LPCSTR debugstr_w( LPCWSTR s ) { return debugstr_wn( s, 80 ); }
|
|
||||||
|
|
||||||
#ifdef __GNUC__
|
|
||||||
extern int dbg_printf(const char *format, ...) __attribute__((format (printf,1,2)));
|
|
||||||
#else
|
|
||||||
extern int dbg_printf(const char *format, ...);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define TRACE_(X) TRACE
|
|
||||||
#define WARN_(X) TRACE
|
|
||||||
#define WARN TRACE
|
|
||||||
#define ERR_(X) printf
|
|
||||||
#define ERR printf
|
|
||||||
#define FIXME_(X) TRACE
|
|
||||||
#define FIXME TRACE
|
|
||||||
|
|
||||||
#define TRACE_ON(X) 1
|
|
||||||
#define ERR_ON(X) 1
|
|
||||||
|
|
||||||
#define DECLARE_DEBUG_CHANNEL(ch) \
|
|
||||||
extern char dbch_##ch[];
|
|
||||||
#define DEFAULT_DEBUG_CHANNEL(ch) \
|
|
||||||
extern char dbch_##ch[]; static char * const __dbch_default = dbch_##ch;
|
|
||||||
|
|
||||||
#define DPRINTF dbg_printf
|
|
||||||
#define MESSAGE dbg_printf
|
|
||||||
|
|
||||||
#endif /* __WINE__ */
|
|
||||||
|
|
||||||
#endif /* __WINE_DEBUGTOOLS_H */
|
|
|
@ -1,112 +0,0 @@
|
||||||
/*
|
|
||||||
* Drivers definitions
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef __WINE_DRIVER_H
|
|
||||||
#define __WINE_DRIVER_H
|
|
||||||
|
|
||||||
#include "windef.h"
|
|
||||||
|
|
||||||
#define MMSYSERR_BASE 0
|
|
||||||
|
|
||||||
#define MMSYSERR_NOERROR 0 /* no error */
|
|
||||||
#define MMSYSERR_ERROR (MMSYSERR_BASE + 1) /* unspecified error */
|
|
||||||
#define MMSYSERR_BADDEVICEID (MMSYSERR_BASE + 2) /* device ID out of range */
|
|
||||||
#define MMSYSERR_NOTENABLED (MMSYSERR_BASE + 3) /* driver failed enable */
|
|
||||||
#define MMSYSERR_ALLOCATED (MMSYSERR_BASE + 4) /* device already allocated */
|
|
||||||
#define MMSYSERR_INVALHANDLE (MMSYSERR_BASE + 5) /* device handle is invalid */
|
|
||||||
#define MMSYSERR_NODRIVER (MMSYSERR_BASE + 6) /* no device driver present */
|
|
||||||
#define MMSYSERR_NOMEM (MMSYSERR_BASE + 7) /* memory allocation error */
|
|
||||||
#define MMSYSERR_NOTSUPPORTED (MMSYSERR_BASE + 8) /* function isn't supported */
|
|
||||||
#define MMSYSERR_BADERRNUM (MMSYSERR_BASE + 9) /* error value out of range */
|
|
||||||
#define MMSYSERR_INVALFLAG (MMSYSERR_BASE + 10) /* invalid flag passed */
|
|
||||||
#define MMSYSERR_INVALPARAM (MMSYSERR_BASE + 11) /* invalid parameter passed */
|
|
||||||
#define MMSYSERR_LASTERROR (MMSYSERR_BASE + 11) /* last error in range */
|
|
||||||
|
|
||||||
#define DRV_LOAD 0x0001
|
|
||||||
#define DRV_ENABLE 0x0002
|
|
||||||
#define DRV_OPEN 0x0003
|
|
||||||
#define DRV_CLOSE 0x0004
|
|
||||||
#define DRV_DISABLE 0x0005
|
|
||||||
#define DRV_FREE 0x0006
|
|
||||||
#define DRV_CONFIGURE 0x0007
|
|
||||||
#define DRV_QUERYCONFIGURE 0x0008
|
|
||||||
#define DRV_INSTALL 0x0009
|
|
||||||
#define DRV_REMOVE 0x000A
|
|
||||||
#define DRV_EXITSESSION 0x000B
|
|
||||||
#define DRV_EXITAPPLICATION 0x000C
|
|
||||||
#define DRV_POWER 0x000F
|
|
||||||
|
|
||||||
#define DRV_RESERVED 0x0800
|
|
||||||
#define DRV_USER 0x4000
|
|
||||||
|
|
||||||
#define DRVCNF_CANCEL 0x0000
|
|
||||||
#define DRVCNF_OK 0x0001
|
|
||||||
#define DRVCNF_RESTART 0x0002
|
|
||||||
|
|
||||||
#define DRVEA_NORMALEXIT 0x0001
|
|
||||||
#define DRVEA_ABNORMALEXIT 0x0002
|
|
||||||
|
|
||||||
#define DRV_SUCCESS 0x0001
|
|
||||||
#define DRV_FAILURE 0x0000
|
|
||||||
|
|
||||||
#define GND_FIRSTINSTANCEONLY 0x00000001
|
|
||||||
|
|
||||||
#define GND_FORWARD 0x00000000
|
|
||||||
#define GND_REVERSE 0x00000002
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
DWORD dwDCISize;
|
|
||||||
LPCSTR lpszDCISectionName;
|
|
||||||
LPCSTR lpszDCIAliasName;
|
|
||||||
} DRVCONFIGINFO16, *LPDRVCONFIGINFO16;
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
DWORD dwDCISize;
|
|
||||||
LPCWSTR lpszDCISectionName;
|
|
||||||
LPCWSTR lpszDCIAliasName;
|
|
||||||
} DRVCONFIGINFO, *LPDRVCONFIGINFO;
|
|
||||||
|
|
||||||
|
|
||||||
/* GetDriverInfo16 references this structure, so this a struct defined
|
|
||||||
* in the Win16 API.
|
|
||||||
* GetDriverInfo has been deprecated in Win32.
|
|
||||||
*/
|
|
||||||
typedef struct
|
|
||||||
{
|
|
||||||
UINT16 length;
|
|
||||||
HDRVR16 hDriver;
|
|
||||||
HINSTANCE16 hModule;
|
|
||||||
CHAR szAliasName[128];
|
|
||||||
} DRIVERINFOSTRUCT16, *LPDRIVERINFOSTRUCT16;
|
|
||||||
|
|
||||||
LRESULT WINAPI DefDriverProc16(DWORD dwDevID, HDRVR16 hDriv, UINT16 wMsg,
|
|
||||||
LPARAM dwParam1, LPARAM dwParam2);
|
|
||||||
LRESULT WINAPI DefDriverProc(DWORD dwDriverIdentifier, HDRVR hdrvr,
|
|
||||||
UINT Msg, LPARAM lParam1, LPARAM lParam2);
|
|
||||||
HDRVR16 WINAPI OpenDriver16(LPCSTR szDriverName, LPCSTR szSectionName,
|
|
||||||
LPARAM lParam2);
|
|
||||||
HDRVR WINAPI OpenDriverA(LPCSTR szDriverName, LPCSTR szSectionName,
|
|
||||||
LPARAM lParam2);
|
|
||||||
HDRVR WINAPI OpenDriverW(LPCWSTR szDriverName, LPCWSTR szSectionName,
|
|
||||||
LPARAM lParam2);
|
|
||||||
#define OpenDriver WINELIB_NAME_AW(OpenDriver)
|
|
||||||
LRESULT WINAPI CloseDriver16(HDRVR16 hDriver, LPARAM lParam1, LPARAM lParam2);
|
|
||||||
LRESULT WINAPI CloseDriver(HDRVR hDriver, LPARAM lParam1, LPARAM lParam2);
|
|
||||||
LRESULT WINAPI SendDriverMessage16( HDRVR16 hDriver, UINT16 message,
|
|
||||||
LPARAM lParam1, LPARAM lParam2 );
|
|
||||||
LRESULT WINAPI SendDriverMessage( HDRVR hDriver, UINT message,
|
|
||||||
LPARAM lParam1, LPARAM lParam2 );
|
|
||||||
HMODULE16 WINAPI GetDriverModuleHandle16(HDRVR16 hDriver);
|
|
||||||
HMODULE WINAPI GetDriverModuleHandle(HDRVR hDriver);
|
|
||||||
|
|
||||||
DWORD WINAPI GetDriverFlags( HDRVR hDriver );
|
|
||||||
#ifdef __WINE__
|
|
||||||
/* this call (GetDriverFlags) is not documented, nor the flags returned.
|
|
||||||
* here are Wine only definitions
|
|
||||||
*/
|
|
||||||
#define WINE_GDF_EXIST 0x80000000
|
|
||||||
#define WINE_GDF_16BIT 0x10000000
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* __WINE_DRIVER_H */
|
|
|
@ -1,14 +0,0 @@
|
||||||
#ifndef __WINE_ELFDLL_H
|
|
||||||
#define __WINE_ELFDLL_H
|
|
||||||
|
|
||||||
#include "module.h"
|
|
||||||
#include "windef.h"
|
|
||||||
|
|
||||||
WINE_MODREF *ELFDLL_LoadLibraryExA(LPCSTR libname, DWORD flags);
|
|
||||||
HINSTANCE16 ELFDLL_LoadModule16(LPCSTR libname);
|
|
||||||
void ELFDLL_UnloadLibrary(WINE_MODREF *wm);
|
|
||||||
|
|
||||||
void *ELFDLL_dlopen(const char *libname, int flags);
|
|
||||||
extern char *extra_ld_library_path;
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -1,56 +0,0 @@
|
||||||
/*
|
|
||||||
* Win32 heap definitions
|
|
||||||
*
|
|
||||||
* Copyright 1996 Alexandre Julliard
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef __WINE_HEAP_H
|
|
||||||
#define __WINE_HEAP_H
|
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
|
|
||||||
#include "winbase.h"
|
|
||||||
|
|
||||||
extern HANDLE SystemHeap;
|
|
||||||
extern HANDLE SegptrHeap;
|
|
||||||
|
|
||||||
extern int HEAP_IsInsideHeap( HANDLE heap, DWORD flags, LPCVOID ptr );
|
|
||||||
extern SEGPTR HEAP_GetSegptr( HANDLE heap, DWORD flags, LPCVOID ptr );
|
|
||||||
extern LPSTR HEAP_strdupA( HANDLE heap, DWORD flags, LPCSTR str );
|
|
||||||
extern LPWSTR HEAP_strdupW( HANDLE heap, DWORD flags, LPCWSTR str );
|
|
||||||
extern LPWSTR HEAP_strdupAtoW( HANDLE heap, DWORD flags, LPCSTR str );
|
|
||||||
extern LPSTR HEAP_strdupWtoA( HANDLE heap, DWORD flags, LPCWSTR str );
|
|
||||||
|
|
||||||
/* SEGPTR helper macros */
|
|
||||||
|
|
||||||
#define SEGPTR_ALLOC(size) \
|
|
||||||
(HeapAlloc( SegptrHeap, 0, (size) ))
|
|
||||||
#define SEGPTR_NEW(type) \
|
|
||||||
((type *)HeapAlloc( SegptrHeap, 0, sizeof(type) ))
|
|
||||||
#define SEGPTR_STRDUP(str) \
|
|
||||||
(HIWORD(str) ? HEAP_strdupA( SegptrHeap, 0, (str) ) : (LPSTR)(str))
|
|
||||||
#define SEGPTR_STRDUP_WtoA(str) \
|
|
||||||
(HIWORD(str) ? HEAP_strdupWtoA( SegptrHeap, 0, (str) ) : (LPSTR)(str))
|
|
||||||
/* define an inline function, a macro won't do */
|
|
||||||
static inline SEGPTR WINE_UNUSED SEGPTR_Get(LPCVOID ptr) {
|
|
||||||
return (HIWORD(ptr) ? HEAP_GetSegptr( SegptrHeap, 0, ptr ) : (SEGPTR)ptr);
|
|
||||||
}
|
|
||||||
#define SEGPTR_GET(ptr) SEGPTR_Get(ptr)
|
|
||||||
#define SEGPTR_FREE(ptr) \
|
|
||||||
(HIWORD(ptr) ? HeapFree( SegptrHeap, 0, (ptr) ) : 0)
|
|
||||||
|
|
||||||
/* system heap private data */
|
|
||||||
/* you must lock the system heap before using this structure */
|
|
||||||
typedef struct
|
|
||||||
{
|
|
||||||
void *gdi; /* GDI heap */
|
|
||||||
void *user; /* USER handle table */
|
|
||||||
void *cursor; /* cursor information */
|
|
||||||
void *queue; /* message queues descriptor */
|
|
||||||
void *win; /* windows descriptor */
|
|
||||||
void *root; /* X11 root window */
|
|
||||||
} SYSTEM_HEAP_DESCR;
|
|
||||||
|
|
||||||
extern SYSTEM_HEAP_DESCR *SystemHeapDescr;
|
|
||||||
|
|
||||||
#endif /* __WINE_HEAP_H */
|
|
|
@ -1,98 +0,0 @@
|
||||||
/*
|
|
||||||
* LDT copy
|
|
||||||
*
|
|
||||||
* Copyright 1995 Alexandre Julliard
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef __WINE_LDT_H
|
|
||||||
#define __WINE_LDT_H
|
|
||||||
|
|
||||||
#include "windef.h"
|
|
||||||
enum seg_type
|
|
||||||
{
|
|
||||||
SEGMENT_DATA = 0,
|
|
||||||
SEGMENT_STACK = 1,
|
|
||||||
SEGMENT_CODE = 2
|
|
||||||
};
|
|
||||||
|
|
||||||
/* This structure represents a real LDT entry. */
|
|
||||||
/* It is used by get_ldt_entry() and set_ldt_entry(). */
|
|
||||||
typedef struct
|
|
||||||
{
|
|
||||||
unsigned long base; /* base address */
|
|
||||||
unsigned long limit; /* segment limit (in pages or bytes) */
|
|
||||||
int seg_32bit; /* is segment 32-bit? */
|
|
||||||
int read_only; /* is segment read-only? */
|
|
||||||
int limit_in_pages; /* is the limit in pages or bytes? */
|
|
||||||
enum seg_type type; /* segment type */
|
|
||||||
} ldt_entry;
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C"
|
|
||||||
{
|
|
||||||
#endif
|
|
||||||
extern void LDT_BytesToEntry( const unsigned long *buffer, ldt_entry *content);
|
|
||||||
extern void LDT_EntryToBytes( unsigned long *buffer, const ldt_entry *content);
|
|
||||||
extern int LDT_GetEntry( int entry, ldt_entry *content );
|
|
||||||
extern int LDT_SetEntry( int entry, const ldt_entry *content );
|
|
||||||
extern void LDT_Print( int start, int length );
|
|
||||||
|
|
||||||
|
|
||||||
/* This structure is used to build the local copy of the LDT. */
|
|
||||||
typedef struct
|
|
||||||
{
|
|
||||||
unsigned long base; /* base address or 0 if entry is free */
|
|
||||||
unsigned long limit; /* limit in bytes or 0 if entry is free */
|
|
||||||
} ldt_copy_entry;
|
|
||||||
|
|
||||||
#define LDT_SIZE 8192
|
|
||||||
|
|
||||||
extern ldt_copy_entry ldt_copy[LDT_SIZE];
|
|
||||||
|
|
||||||
#define __AHSHIFT 3 /* don't change! */
|
|
||||||
#define __AHINCR (1 << __AHSHIFT)
|
|
||||||
|
|
||||||
#define SELECTOR_TO_ENTRY(sel) (((int)(sel) & 0xffff) >> __AHSHIFT)
|
|
||||||
#define ENTRY_TO_SELECTOR(i) ((i) ? (((int)(i) << __AHSHIFT) | 7) : 0)
|
|
||||||
#define IS_LDT_ENTRY_FREE(i) (!(ldt_flags_copy[(i)] & LDT_FLAGS_ALLOCATED))
|
|
||||||
#define IS_SELECTOR_FREE(sel) (IS_LDT_ENTRY_FREE(SELECTOR_TO_ENTRY(sel)))
|
|
||||||
#define GET_SEL_BASE(sel) (ldt_copy[SELECTOR_TO_ENTRY(sel)].base)
|
|
||||||
#define GET_SEL_LIMIT(sel) (ldt_copy[SELECTOR_TO_ENTRY(sel)].limit)
|
|
||||||
|
|
||||||
/* Convert a segmented ptr (16:16) to a linear (32) pointer */
|
|
||||||
|
|
||||||
#define PTR_SEG_OFF_TO_LIN(seg,off) \
|
|
||||||
((void*)(GET_SEL_BASE(seg) + (unsigned int)(off)))
|
|
||||||
#define PTR_SEG_TO_LIN(ptr) \
|
|
||||||
PTR_SEG_OFF_TO_LIN(SELECTOROF(ptr),OFFSETOF(ptr))
|
|
||||||
#define PTR_SEG_OFF_TO_SEGPTR(seg,off) \
|
|
||||||
((SEGPTR)MAKELONG(off,seg))
|
|
||||||
#define PTR_SEG_OFF_TO_HUGEPTR(seg,off) \
|
|
||||||
PTR_SEG_OFF_TO_SEGPTR( (seg) + (HIWORD(off) << __AHSHIFT), LOWORD(off) )
|
|
||||||
|
|
||||||
#define W32S_APPLICATION() (PROCESS_Current()->flags & PDB32_WIN32S_PROC)
|
|
||||||
#define W32S_OFFSET 0x10000
|
|
||||||
#define W32S_APP2WINE(addr, offset) ((addr)? (DWORD)(addr) + (DWORD)(offset) : 0)
|
|
||||||
#define W32S_WINE2APP(addr, offset) ((addr)? (DWORD)(addr) - (DWORD)(offset) : 0)
|
|
||||||
|
|
||||||
extern unsigned char ldt_flags_copy[LDT_SIZE];
|
|
||||||
|
|
||||||
#define LDT_FLAGS_TYPE 0x03 /* Mask for segment type */
|
|
||||||
#define LDT_FLAGS_READONLY 0x04 /* Segment is read-only (data) */
|
|
||||||
#define LDT_FLAGS_EXECONLY 0x04 /* Segment is execute-only (code) */
|
|
||||||
#define LDT_FLAGS_32BIT 0x08 /* Segment is 32-bit (code or stack) */
|
|
||||||
#define LDT_FLAGS_BIG 0x10 /* Segment is big (limit is in pages) */
|
|
||||||
#define LDT_FLAGS_ALLOCATED 0x80 /* Segment is allocated (no longer free) */
|
|
||||||
|
|
||||||
#define GET_SEL_FLAGS(sel) (ldt_flags_copy[SELECTOR_TO_ENTRY(sel)])
|
|
||||||
|
|
||||||
#define FIRST_LDT_ENTRY_TO_ALLOC 17
|
|
||||||
|
|
||||||
/* Determine if sel is a system selector (i.e. not managed by Wine) */
|
|
||||||
#define IS_SELECTOR_SYSTEM(sel) \
|
|
||||||
(!((sel) & 4) || (SELECTOR_TO_ENTRY(sel) < FIRST_LDT_ENTRY_TO_ALLOC))
|
|
||||||
#define IS_SELECTOR_32BIT(sel) \
|
|
||||||
(IS_SELECTOR_SYSTEM(sel) || (GET_SEL_FLAGS(sel) & LDT_FLAGS_32BIT))
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#endif /* __WINE_LDT_H */
|
|
|
@ -1,104 +0,0 @@
|
||||||
/*
|
|
||||||
* mmreg.h - Declarations for ???
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef __WINE_MMREG_H
|
|
||||||
#define __WINE_MMREG_H
|
|
||||||
|
|
||||||
/***********************************************************************
|
|
||||||
* Defines/Enums
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef _ACM_WAVEFILTER
|
|
||||||
#define _ACM_WAVEFILTER
|
|
||||||
|
|
||||||
#include "windef.h"
|
|
||||||
|
|
||||||
#define WAVE_FILTER_UNKNOWN 0x0000
|
|
||||||
#define WAVE_FILTER_DEVELOPMENT 0xFFFF
|
|
||||||
|
|
||||||
typedef struct _WAVEFILTER {
|
|
||||||
DWORD cbStruct;
|
|
||||||
DWORD dwFilterTag;
|
|
||||||
DWORD fdwFilter;
|
|
||||||
DWORD dwReserved[5];
|
|
||||||
} WAVEFILTER, *PWAVEFILTER, *NPWAVEFILTER, *LPWAVEFILTER;
|
|
||||||
#endif /* _ACM_WAVEFILTER */
|
|
||||||
|
|
||||||
#ifndef WAVE_FILTER_VOLUME
|
|
||||||
#define WAVE_FILTER_VOLUME 0x0001
|
|
||||||
|
|
||||||
typedef struct _WAVEFILTER_VOLUME {
|
|
||||||
WAVEFILTER wfltr;
|
|
||||||
DWORD dwVolume;
|
|
||||||
} VOLUMEWAVEFILTER, *PVOLUMEWAVEFILTER, *NPVOLUMEWAVEFILTER, *LPVOLUMEWAVEFILTER;
|
|
||||||
#endif /* WAVE_FILTER_VOLUME */
|
|
||||||
|
|
||||||
#ifndef WAVE_FILTER_ECHO
|
|
||||||
#define WAVE_FILTER_ECHO 0x0002
|
|
||||||
|
|
||||||
typedef struct WAVEFILTER_ECHO {
|
|
||||||
WAVEFILTER wfltr;
|
|
||||||
DWORD dwVolume;
|
|
||||||
DWORD dwDelay;
|
|
||||||
} ECHOWAVEFILTER, *PECHOWAVEFILTER, *NPECHOWAVEFILTER, *LPECHOWAVEFILTER;
|
|
||||||
#endif /* WAVEFILTER_ECHO */
|
|
||||||
|
|
||||||
#ifndef _WAVEFORMATEX_
|
|
||||||
#define _WAVEFORMATEX_
|
|
||||||
typedef struct _WAVEFORMATEX {
|
|
||||||
WORD wFormatTag;
|
|
||||||
WORD nChannels;
|
|
||||||
DWORD nSamplesPerSec;
|
|
||||||
DWORD nAvgBytesPerSec;
|
|
||||||
WORD nBlockAlign;
|
|
||||||
WORD wBitsPerSample;
|
|
||||||
WORD cbSize;
|
|
||||||
} WAVEFORMATEX, *PWAVEFORMATEX, *NPWAVEFORMATEX, *LPWAVEFORMATEX;
|
|
||||||
#endif /* _WAVEFORMATEX_ */
|
|
||||||
|
|
||||||
/* WAVE form wFormatTag IDs */
|
|
||||||
#define WAVE_FORMAT_UNKNOWN 0x0000 /* Microsoft Corporation */
|
|
||||||
#define WAVE_FORMAT_ADPCM 0x0002 /* Microsoft Corporation */
|
|
||||||
#define WAVE_FORMAT_IBM_CVSD 0x0005 /* IBM Corporation */
|
|
||||||
#define WAVE_FORMAT_ALAW 0x0006 /* Microsoft Corporation */
|
|
||||||
#define WAVE_FORMAT_MULAW 0x0007 /* Microsoft Corporation */
|
|
||||||
#define WAVE_FORMAT_OKI_ADPCM 0x0010 /* OKI */
|
|
||||||
#define WAVE_FORMAT_DVI_ADPCM 0x0011 /* Intel Corporation */
|
|
||||||
#define WAVE_FORMAT_IMA_ADPCM (WAVE_FORMAT_DVI_ADPCM) /* Intel Corporation */
|
|
||||||
#define WAVE_FORMAT_MEDIASPACE_ADPCM 0x0012 /* Videologic */
|
|
||||||
#define WAVE_FORMAT_SIERRA_ADPCM 0x0013 /* Sierra Semiconductor Corp */
|
|
||||||
#define WAVE_FORMAT_G723_ADPCM 0x0014 /* Antex Electronics Corporation */
|
|
||||||
#define WAVE_FORMAT_DIGISTD 0x0015 /* DSP Solutions, Inc. */
|
|
||||||
#define WAVE_FORMAT_DIGIFIX 0x0016 /* DSP Solutions, Inc. */
|
|
||||||
#define WAVE_FORMAT_DIALOGIC_OKI_ADPCM 0x0017 /* Dialogic Corporation */
|
|
||||||
#define WAVE_FORMAT_YAMAHA_ADPCM 0x0020 /* Yamaha Corporation of America */
|
|
||||||
#define WAVE_FORMAT_SONARC 0x0021 /* Speech Compression */
|
|
||||||
#define WAVE_FORMAT_DSPGROUP_TRUESPEECH 0x0022 /* DSP Group, Inc */
|
|
||||||
#define WAVE_FORMAT_ECHOSC1 0x0023 /* Echo Speech Corporation */
|
|
||||||
#define WAVE_FORMAT_AUDIOFILE_AF36 0x0024 /* */
|
|
||||||
#define WAVE_FORMAT_APTX 0x0025 /* Audio Processing Technology */
|
|
||||||
#define WAVE_FORMAT_AUDIOFILE_AF10 0x0026 /* */
|
|
||||||
#define WAVE_FORMAT_DOLBY_AC2 0x0030 /* Dolby Laboratories */
|
|
||||||
#define WAVE_FORMAT_GSM610 0x0031 /* Microsoft Corporation */
|
|
||||||
#define WAVE_FORMAT_ANTEX_ADPCME 0x0033 /* Antex Electronics Corporation */
|
|
||||||
#define WAVE_FORMAT_CONTROL_RES_VQLPC 0x0034 /* Control Resources Limited */
|
|
||||||
#define WAVE_FORMAT_DIGIREAL 0x0035 /* DSP Solutions, Inc. */
|
|
||||||
#define WAVE_FORMAT_DIGIADPCM 0x0036 /* DSP Solutions, Inc. */
|
|
||||||
#define WAVE_FORMAT_CONTROL_RES_CR10 0x0037 /* Control Resources Limited */
|
|
||||||
#define WAVE_FORMAT_NMS_VBXADPCM 0x0038 /* Natural MicroSystems */
|
|
||||||
#define WAVE_FORMAT_G721_ADPCM 0x0040 /* Antex Electronics Corporation */
|
|
||||||
#define WAVE_FORMAT_MPEG 0x0050 /* Microsoft Corporation */
|
|
||||||
#define WAVE_FORMAT_CREATIVE_ADPCM 0x0200 /* Creative Labs, Inc */
|
|
||||||
#define WAVE_FORMAT_CREATIVE_FASTSPEECH8 0x0202 /* Creative Labs, Inc */
|
|
||||||
#define WAVE_FORMAT_CREATIVE_FASTSPEECH10 0x0203 /* Creative Labs, Inc */
|
|
||||||
#define WAVE_FORMAT_FM_TOWNS_SND 0x0300 /* Fujitsu Corp. */
|
|
||||||
#define WAVE_FORMAT_OLIGSM 0x1000 /* Ing C. Olivetti & C., S.p.A. */
|
|
||||||
#define WAVE_FORMAT_OLIADPCM 0x1001 /* Ing C. Olivetti & C., S.p.A. */
|
|
||||||
#define WAVE_FORMAT_OLICELP 0x1002 /* Ing C. Olivetti & C., S.p.A. */
|
|
||||||
#define WAVE_FORMAT_OLISBC 0x1003 /* Ing C. Olivetti & C., S.p.A. */
|
|
||||||
#define WAVE_FORMAT_OLIOPR 0x1004 /* Ing C. Olivetti & C., S.p.A. */
|
|
||||||
|
|
||||||
#define WAVE_FORMAT_DEVELOPMENT (0xFFFF)
|
|
||||||
|
|
||||||
#endif /* __WINE_MMREG_H */
|
|
|
@ -1,198 +0,0 @@
|
||||||
/*
|
|
||||||
* Module definitions
|
|
||||||
*
|
|
||||||
* Copyright 1995 Alexandre Julliard
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef __WINE_MODULE_H
|
|
||||||
#define __WINE_MODULE_H
|
|
||||||
|
|
||||||
#include "windef.h"
|
|
||||||
//#include "dosexe.h"
|
|
||||||
#include "pe_image.h"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
BYTE type;
|
|
||||||
BYTE flags;
|
|
||||||
BYTE segnum;
|
|
||||||
WORD offs WINE_PACKED;
|
|
||||||
} ET_ENTRY;
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
WORD first; /* ordinal */
|
|
||||||
WORD last; /* ordinal */
|
|
||||||
WORD next; /* bundle */
|
|
||||||
} ET_BUNDLE;
|
|
||||||
|
|
||||||
|
|
||||||
/* In-memory segment table */
|
|
||||||
typedef struct
|
|
||||||
{
|
|
||||||
WORD filepos; /* Position in file, in sectors */
|
|
||||||
WORD size; /* Segment size on disk */
|
|
||||||
WORD flags; /* Segment flags */
|
|
||||||
WORD minsize; /* Min. size of segment in memory */
|
|
||||||
HANDLE16 hSeg; /* Selector or handle (selector - 1) */
|
|
||||||
/* of segment in memory */
|
|
||||||
} SEGTABLEENTRY;
|
|
||||||
|
|
||||||
|
|
||||||
/* Self-loading modules contain this structure in their first segment */
|
|
||||||
|
|
||||||
#include "pshpack1.h"
|
|
||||||
|
|
||||||
typedef struct
|
|
||||||
{
|
|
||||||
WORD version; /* Must be "A0" (0x3041) */
|
|
||||||
WORD reserved;
|
|
||||||
FARPROC16 BootApp; /* startup procedure */
|
|
||||||
FARPROC16 LoadAppSeg; /* procedure to load a segment */
|
|
||||||
FARPROC16 reserved2;
|
|
||||||
FARPROC16 MyAlloc; /* memory allocation procedure,
|
|
||||||
* wine must write this field */
|
|
||||||
FARPROC16 EntryAddrProc;
|
|
||||||
FARPROC16 ExitProc; /* exit procedure */
|
|
||||||
WORD reserved3[4];
|
|
||||||
FARPROC16 SetOwner; /* Set Owner procedure, exported by wine */
|
|
||||||
} SELFLOADHEADER;
|
|
||||||
|
|
||||||
/* Parameters for LoadModule() */
|
|
||||||
typedef struct
|
|
||||||
{
|
|
||||||
HGLOBAL16 hEnvironment; /* Environment segment */
|
|
||||||
SEGPTR cmdLine WINE_PACKED; /* Command-line */
|
|
||||||
SEGPTR showCmd WINE_PACKED; /* Code for ShowWindow() */
|
|
||||||
SEGPTR reserved WINE_PACKED;
|
|
||||||
} LOADPARAMS16;
|
|
||||||
|
|
||||||
typedef struct
|
|
||||||
{
|
|
||||||
LPSTR lpEnvAddress;
|
|
||||||
LPSTR lpCmdLine;
|
|
||||||
UINT16 *lpCmdShow;
|
|
||||||
DWORD dwReserved;
|
|
||||||
} LOADPARAMS;
|
|
||||||
|
|
||||||
#include "poppack.h"
|
|
||||||
|
|
||||||
/* internal representation of 32bit modules. per process. */
|
|
||||||
typedef enum {
|
|
||||||
MODULE32_PE = 1,
|
|
||||||
MODULE32_ELF,
|
|
||||||
MODULE32_ELFDLL
|
|
||||||
} MODULE32_TYPE;
|
|
||||||
|
|
||||||
typedef struct _wine_modref
|
|
||||||
{
|
|
||||||
struct _wine_modref *next;
|
|
||||||
struct _wine_modref *prev;
|
|
||||||
MODULE32_TYPE type;
|
|
||||||
union {
|
|
||||||
PE_MODREF pe;
|
|
||||||
ELF_MODREF elf;
|
|
||||||
} binfmt;
|
|
||||||
|
|
||||||
HMODULE module;
|
|
||||||
|
|
||||||
int nDeps;
|
|
||||||
struct _wine_modref **deps;
|
|
||||||
|
|
||||||
int flags;
|
|
||||||
int refCount;
|
|
||||||
|
|
||||||
char *filename;
|
|
||||||
char *modname;
|
|
||||||
char *short_filename;
|
|
||||||
char *short_modname;
|
|
||||||
} WINE_MODREF;
|
|
||||||
|
|
||||||
#define WINE_MODREF_INTERNAL 0x00000001
|
|
||||||
#define WINE_MODREF_NO_DLL_CALLS 0x00000002
|
|
||||||
#define WINE_MODREF_PROCESS_ATTACHED 0x00000004
|
|
||||||
#define WINE_MODREF_LOAD_AS_DATAFILE 0x00000010
|
|
||||||
#define WINE_MODREF_DONT_RESOLVE_REFS 0x00000020
|
|
||||||
#define WINE_MODREF_MARKER 0x80000000
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Resource types */
|
|
||||||
typedef struct resource_typeinfo_s NE_TYPEINFO;
|
|
||||||
typedef struct resource_nameinfo_s NE_NAMEINFO;
|
|
||||||
|
|
||||||
#define NE_SEG_TABLE(pModule) \
|
|
||||||
((SEGTABLEENTRY *)((char *)(pModule) + (pModule)->seg_table))
|
|
||||||
|
|
||||||
#define NE_MODULE_TABLE(pModule) \
|
|
||||||
((WORD *)((char *)(pModule) + (pModule)->modref_table))
|
|
||||||
|
|
||||||
#define NE_MODULE_NAME(pModule) \
|
|
||||||
(((OFSTRUCT *)((char*)(pModule) + (pModule)->fileinfo))->szPathName)
|
|
||||||
|
|
||||||
/* module.c */
|
|
||||||
extern FARPROC MODULE_GetProcAddress( HMODULE hModule, LPCSTR function, WIN_BOOL snoop );
|
|
||||||
extern WINE_MODREF *MODULE32_LookupHMODULE( HMODULE hModule );
|
|
||||||
extern WIN_BOOL MODULE_DllProcessAttach( WINE_MODREF *wm, LPVOID lpReserved );
|
|
||||||
extern void MODULE_DllProcessDetach( WINE_MODREF *wm, WIN_BOOL bForceDetach, LPVOID lpReserved );
|
|
||||||
extern void MODULE_DllThreadAttach( LPVOID lpReserved );
|
|
||||||
extern void MODULE_DllThreadDetach( LPVOID lpReserved );
|
|
||||||
extern WINE_MODREF *MODULE_LoadLibraryExA( LPCSTR libname, HFILE hfile, DWORD flags );
|
|
||||||
extern WIN_BOOL MODULE_FreeLibrary( WINE_MODREF *wm );
|
|
||||||
extern WINE_MODREF *MODULE_FindModule( LPCSTR path );
|
|
||||||
extern HMODULE MODULE_CreateDummyModule( LPCSTR filename, HMODULE module32 );
|
|
||||||
extern FARPROC16 WINAPI WIN32_GetProcAddress16( HMODULE hmodule, LPCSTR name );
|
|
||||||
extern SEGPTR WINAPI HasGPHandler16( SEGPTR address );
|
|
||||||
extern void MODULE_WalkModref( DWORD id );
|
|
||||||
|
|
||||||
/* resource.c */
|
|
||||||
extern INT WINAPI AccessResource(HMODULE,HRSRC);
|
|
||||||
/*
|
|
||||||
/ loader/ne/module.c
|
|
||||||
extern NE_MODULE *NE_GetPtr( HMODULE16 hModule );
|
|
||||||
extern void NE_DumpModule( HMODULE16 hModule );
|
|
||||||
extern void NE_WalkModules(void);
|
|
||||||
extern void NE_RegisterModule( NE_MODULE *pModule );
|
|
||||||
extern WORD NE_GetOrdinal( HMODULE16 hModule, const char *name );
|
|
||||||
extern FARPROC16 WINAPI NE_GetEntryPoint( HMODULE16 hModule, WORD ordinal );
|
|
||||||
extern FARPROC16 NE_GetEntryPointEx( HMODULE16 hModule, WORD ordinal, WIN_BOOL16 snoop );
|
|
||||||
extern WIN_BOOL16 NE_SetEntryPoint( HMODULE16 hModule, WORD ordinal, WORD offset );
|
|
||||||
extern int NE_OpenFile( NE_MODULE *pModule );
|
|
||||||
extern WIN_BOOL NE_CreateProcess( HANDLE hFile, LPCSTR filename, LPCSTR cmd_line, LPCSTR env,
|
|
||||||
LPSECURITY_ATTRIBUTES psa, LPSECURITY_ATTRIBUTES tsa,
|
|
||||||
WIN_BOOL inherit, DWORD flags, LPSTARTUPINFOA startup,
|
|
||||||
LPPROCESS_INFORMATION info );
|
|
||||||
extern WIN_BOOL NE_InitProcess( NE_MODULE *pModule );
|
|
||||||
|
|
||||||
|
|
||||||
/ loader/ne/resource.c
|
|
||||||
extern HGLOBAL16 WINAPI NE_DefResourceHandler(HGLOBAL16,HMODULE16,HRSRC16);
|
|
||||||
extern WIN_BOOL NE_InitResourceHandler( HMODULE16 hModule );
|
|
||||||
extern HRSRC16 NE_FindResource( NE_MODULE *pModule, LPCSTR name, LPCSTR type );
|
|
||||||
extern INT16 NE_AccessResource( NE_MODULE *pModule, HRSRC16 hRsrc );
|
|
||||||
extern DWORD NE_SizeofResource( NE_MODULE *pModule, HRSRC16 hRsrc );
|
|
||||||
extern HGLOBAL16 NE_LoadResource( NE_MODULE *pModule, HRSRC16 hRsrc );
|
|
||||||
extern WIN_BOOL16 NE_FreeResource( NE_MODULE *pModule, HGLOBAL16 handle );
|
|
||||||
extern NE_TYPEINFO *NE_FindTypeSection( LPBYTE pResTab, NE_TYPEINFO *pTypeInfo, LPCSTR typeId );
|
|
||||||
extern NE_NAMEINFO *NE_FindResourceFromType( LPBYTE pResTab, NE_TYPEINFO *pTypeInfo, LPCSTR resId );
|
|
||||||
|
|
||||||
// loader/ne/segment.c
|
|
||||||
extern WIN_BOOL NE_LoadSegment( NE_MODULE *pModule, WORD segnum );
|
|
||||||
extern WIN_BOOL NE_LoadAllSegments( NE_MODULE *pModule );
|
|
||||||
extern WIN_BOOL NE_CreateSegment( NE_MODULE *pModule, int segnum );
|
|
||||||
extern WIN_BOOL NE_CreateAllSegments( NE_MODULE *pModule );
|
|
||||||
extern HINSTANCE16 NE_GetInstance( NE_MODULE *pModule );
|
|
||||||
extern void NE_InitializeDLLs( HMODULE16 hModule );
|
|
||||||
extern void NE_DllProcessAttach( HMODULE16 hModule );
|
|
||||||
|
|
||||||
// loader/ne/convert.c
|
|
||||||
HGLOBAL16 NE_LoadPEResource( NE_MODULE *pModule, WORD type, LPVOID bits, DWORD size );
|
|
||||||
*/
|
|
||||||
/* relay32/builtin.c */
|
|
||||||
extern WINE_MODREF *BUILTIN32_LoadLibraryExA(LPCSTR name, DWORD flags);
|
|
||||||
extern HMODULE BUILTIN32_LoadExeModule( LPCSTR *filename );
|
|
||||||
extern void BUILTIN32_UnloadLibrary(WINE_MODREF *wm);
|
|
||||||
extern void *BUILTIN32_dlopen( const char *name );
|
|
||||||
extern int BUILTIN32_dlclose( void *handle );
|
|
||||||
|
|
||||||
#endif /* __WINE_MODULE_H */
|
|
|
@ -1,942 +0,0 @@
|
||||||
/*
|
|
||||||
* msacm.h - Declarations for MSACM
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef __WINE_MSACM_H
|
|
||||||
#define __WINE_MSACM_H
|
|
||||||
|
|
||||||
#include "windef.h"
|
|
||||||
#include "driver.h"
|
|
||||||
#include "mmreg.h"
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif /* defined(__cplusplus) */
|
|
||||||
|
|
||||||
//typedef WORD VERSION; /* major (high byte), minor (low byte) */
|
|
||||||
|
|
||||||
typedef UINT16 MMVERSION16;
|
|
||||||
typedef UINT MMVERSION;
|
|
||||||
typedef UINT16 MCIDEVICEID16;
|
|
||||||
typedef UINT MCIDEVICEID;
|
|
||||||
typedef UINT16 MMRESULT16;
|
|
||||||
typedef UINT MMRESULT;
|
|
||||||
typedef DWORD FOURCC; /* a four character code */
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define WAVE_FORMAT_PCM 1
|
|
||||||
|
|
||||||
/***********************************************************************
|
|
||||||
* Defines/Enums
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define ACMERR_BASE 512
|
|
||||||
#define ACMERR_NOTPOSSIBLE (ACMERR_BASE + 0)
|
|
||||||
#define ACMERR_BUSY (ACMERR_BASE + 1)
|
|
||||||
#define ACMERR_UNPREPARED (ACMERR_BASE + 2)
|
|
||||||
#define ACMERR_CANCELED (ACMERR_BASE + 3)
|
|
||||||
|
|
||||||
#define MM_ACM_OPEN MM_STREAM_OPEN
|
|
||||||
#define MM_ACM_CLOSE MM_STREAM_CLOSE
|
|
||||||
#define MM_ACM_DONE MM_STREAM_DONE
|
|
||||||
|
|
||||||
#define ACM_DRIVERADDF_FUNCTION 0x00000003L
|
|
||||||
#define ACM_DRIVERADDF_NOTIFYHWND 0x00000004L
|
|
||||||
#define ACM_DRIVERADDF_TYPEMASK 0x00000007L
|
|
||||||
#define ACM_DRIVERADDF_LOCAL 0x00000000L
|
|
||||||
#define ACM_DRIVERADDF_GLOBAL 0x00000008L
|
|
||||||
|
|
||||||
#define ACMDRIVERDETAILS_SHORTNAME_CHARS 32
|
|
||||||
#define ACMDRIVERDETAILS_LONGNAME_CHARS 128
|
|
||||||
#define ACMDRIVERDETAILS_COPYRIGHT_CHARS 80
|
|
||||||
#define ACMDRIVERDETAILS_LICENSING_CHARS 128
|
|
||||||
#define ACMDRIVERDETAILS_FEATURES_CHARS 512
|
|
||||||
|
|
||||||
#define ACMDRIVERDETAILS_FCCTYPE_AUDIOCODEC mmioFOURCC('a', 'u', 'd', 'c')
|
|
||||||
#define ACMDRIVERDETAILS_FCCCOMP_UNDEFINED mmioFOURCC('\0', '\0', '\0', '\0')
|
|
||||||
|
|
||||||
#define ACMDRIVERDETAILS_SUPPORTF_CODEC 0x00000001L
|
|
||||||
#define ACMDRIVERDETAILS_SUPPORTF_CONVERTER 0x00000002L
|
|
||||||
#define ACMDRIVERDETAILS_SUPPORTF_FILTER 0x00000004L
|
|
||||||
#define ACMDRIVERDETAILS_SUPPORTF_HARDWARE 0x00000008L
|
|
||||||
#define ACMDRIVERDETAILS_SUPPORTF_ASYNC 0x00000010L
|
|
||||||
#define ACMDRIVERDETAILS_SUPPORTF_LOCAL 0x40000000L
|
|
||||||
#define ACMDRIVERDETAILS_SUPPORTF_DISABLED 0x80000000L
|
|
||||||
|
|
||||||
#define ACM_DRIVERENUMF_NOLOCAL 0x40000000L
|
|
||||||
#define ACM_DRIVERENUMF_DISABLED 0x80000000L
|
|
||||||
|
|
||||||
#define ACM_DRIVERPRIORITYF_ENABLE 0x00000001L
|
|
||||||
#define ACM_DRIVERPRIORITYF_DISABLE 0x00000002L
|
|
||||||
#define ACM_DRIVERPRIORITYF_ABLEMASK 0x00000003L
|
|
||||||
#define ACM_DRIVERPRIORITYF_BEGIN 0x00010000L
|
|
||||||
#define ACM_DRIVERPRIORITYF_END 0x00020000L
|
|
||||||
#define ACM_DRIVERPRIORITYF_DEFERMASK 0x00030000L
|
|
||||||
|
|
||||||
#define MM_ACM_FILTERCHOOSE 0x8000
|
|
||||||
|
|
||||||
#define FILTERCHOOSE_MESSAGE 0
|
|
||||||
#define FILTERCHOOSE_FILTERTAG_VERIFY (FILTERCHOOSE_MESSAGE+0)
|
|
||||||
#define FILTERCHOOSE_FILTER_VERIFY (FILTERCHOOSE_MESSAGE+1)
|
|
||||||
#define FILTERCHOOSE_CUSTOM_VERIFY (FILTERCHOOSE_MESSAGE+2)
|
|
||||||
|
|
||||||
#define ACMFILTERCHOOSE_STYLEF_SHOWHELP 0x00000004L
|
|
||||||
#define ACMFILTERCHOOSE_STYLEF_ENABLEHOOK 0x00000008L
|
|
||||||
#define ACMFILTERCHOOSE_STYLEF_ENABLETEMPLATE 0x00000010L
|
|
||||||
#define ACMFILTERCHOOSE_STYLEF_ENABLETEMPLATEHANDLE 0x00000020L
|
|
||||||
#define ACMFILTERCHOOSE_STYLEF_INITTOFILTERSTRUCT 0x00000040L
|
|
||||||
#define ACMFILTERCHOOSE_STYLEF_CONTEXTHELP 0x00000080L
|
|
||||||
|
|
||||||
#define ACMFILTERDETAILS_FILTER_CHARS 128
|
|
||||||
|
|
||||||
#define ACM_FILTERDETAILSF_INDEX 0x00000000L
|
|
||||||
#define ACM_FILTERDETAILSF_FILTER 0x00000001L
|
|
||||||
#define ACM_FILTERDETAILSF_QUERYMASK 0x0000000FL
|
|
||||||
|
|
||||||
#define ACMFILTERTAGDETAILS_FILTERTAG_CHARS 48
|
|
||||||
|
|
||||||
#define ACM_FILTERTAGDETAILSF_INDEX 0x00000000L
|
|
||||||
#define ACM_FILTERTAGDETAILSF_FILTERTAG 0x00000001L
|
|
||||||
#define ACM_FILTERTAGDETAILSF_LARGESTSIZE 0x00000002L
|
|
||||||
#define ACM_FILTERTAGDETAILSF_QUERYMASK 0x0000000FL
|
|
||||||
|
|
||||||
#define ACM_FILTERENUMF_DWFILTERTAG 0x00010000L
|
|
||||||
|
|
||||||
#define ACMHELPMSGSTRINGA "acmchoose_help"
|
|
||||||
#define ACMHELPMSGSTRINGW L"acmchoose_help"
|
|
||||||
#define ACMHELPMSGSTRING16 "acmchoose_help"
|
|
||||||
|
|
||||||
#define ACMHELPMSGCONTEXTMENUA "acmchoose_contextmenu"
|
|
||||||
#define ACMHELPMSGCONTEXTMENUW L"acmchoose_contextmenu"
|
|
||||||
#define ACMHELPMSGCONTEXTMENU16 "acmchoose_contextmenu"
|
|
||||||
|
|
||||||
#define ACMHELPMSGCONTEXTHELPA "acmchoose_contexthelp"
|
|
||||||
#define ACMHELPMSGCONTEXTHELPW L"acmchoose_contexthelp"
|
|
||||||
#define ACMHELPMSGCONTEXTHELP16 "acmchoose_contexthelp"
|
|
||||||
|
|
||||||
#define MM_ACM_FORMATCHOOSE 0x8000
|
|
||||||
|
|
||||||
#define FORMATCHOOSE_MESSAGE 0
|
|
||||||
#define FORMATCHOOSE_FORMATTAG_VERIFY (FORMATCHOOSE_MESSAGE+0)
|
|
||||||
#define FORMATCHOOSE_FORMAT_VERIFY (FORMATCHOOSE_MESSAGE+1)
|
|
||||||
#define FORMATCHOOSE_CUSTOM_VERIFY (FORMATCHOOSE_MESSAGE+2)
|
|
||||||
|
|
||||||
#define ACMFORMATCHOOSE_STYLEF_SHOWHELP 0x00000004L
|
|
||||||
#define ACMFORMATCHOOSE_STYLEF_ENABLEHOOK 0x00000008L
|
|
||||||
#define ACMFORMATCHOOSE_STYLEF_ENABLETEMPLATE 0x00000010L
|
|
||||||
#define ACMFORMATCHOOSE_STYLEF_ENABLETEMPLATEHANDLE 0x00000020L
|
|
||||||
#define ACMFORMATCHOOSE_STYLEF_INITTOWFXSTRUCT 0x00000040L
|
|
||||||
#define ACMFORMATCHOOSE_STYLEF_CONTEXTHELP 0x00000080L
|
|
||||||
|
|
||||||
#define ACMFORMATDETAILS_FORMAT_CHARS 128
|
|
||||||
|
|
||||||
#define ACM_FORMATDETAILSF_INDEX 0x00000000L
|
|
||||||
#define ACM_FORMATDETAILSF_FORMAT 0x00000001L
|
|
||||||
#define ACM_FORMATDETAILSF_QUERYMASK 0x0000000FL
|
|
||||||
|
|
||||||
#define ACM_FORMATENUMF_WFORMATTAG 0x00010000L
|
|
||||||
#define ACM_FORMATENUMF_NCHANNELS 0x00020000L
|
|
||||||
#define ACM_FORMATENUMF_NSAMPLESPERSEC 0x00040000L
|
|
||||||
#define ACM_FORMATENUMF_WBITSPERSAMPLE 0x00080000L
|
|
||||||
#define ACM_FORMATENUMF_CONVERT 0x00100000L
|
|
||||||
#define ACM_FORMATENUMF_SUGGEST 0x00200000L
|
|
||||||
#define ACM_FORMATENUMF_HARDWARE 0x00400000L
|
|
||||||
#define ACM_FORMATENUMF_INPUT 0x00800000L
|
|
||||||
#define ACM_FORMATENUMF_OUTPUT 0x01000000L
|
|
||||||
|
|
||||||
#define ACM_FORMATSUGGESTF_WFORMATTAG 0x00010000L
|
|
||||||
#define ACM_FORMATSUGGESTF_NCHANNELS 0x00020000L
|
|
||||||
#define ACM_FORMATSUGGESTF_NSAMPLESPERSEC 0x00040000L
|
|
||||||
#define ACM_FORMATSUGGESTF_WBITSPERSAMPLE 0x00080000L
|
|
||||||
#define ACM_FORMATSUGGESTF_TYPEMASK 0x00FF0000L
|
|
||||||
|
|
||||||
#define ACMFORMATTAGDETAILS_FORMATTAG_CHARS 48
|
|
||||||
|
|
||||||
#define ACM_FORMATTAGDETAILSF_INDEX 0x00000000L
|
|
||||||
#define ACM_FORMATTAGDETAILSF_FORMATTAG 0x00000001L
|
|
||||||
#define ACM_FORMATTAGDETAILSF_LARGESTSIZE 0x00000002L
|
|
||||||
#define ACM_FORMATTAGDETAILSF_QUERYMASK 0x0000000FL
|
|
||||||
|
|
||||||
#define ACM_METRIC_COUNT_DRIVERS 1
|
|
||||||
#define ACM_METRIC_COUNT_CODECS 2
|
|
||||||
#define ACM_METRIC_COUNT_CONVERTERS 3
|
|
||||||
#define ACM_METRIC_COUNT_FILTERS 4
|
|
||||||
#define ACM_METRIC_COUNT_DISABLED 5
|
|
||||||
#define ACM_METRIC_COUNT_HARDWARE 6
|
|
||||||
#define ACM_METRIC_COUNT_LOCAL_DRIVERS 20
|
|
||||||
#define ACM_METRIC_COUNT_LOCAL_CODECS 21
|
|
||||||
#define ACM_METRIC_COUNT_LOCAL_CONVERTERS 22
|
|
||||||
#define ACM_METRIC_COUNT_LOCAL_FILTERS 23
|
|
||||||
#define ACM_METRIC_COUNT_LOCAL_DISABLED 24
|
|
||||||
#define ACM_METRIC_HARDWARE_WAVE_INPUT 30
|
|
||||||
#define ACM_METRIC_HARDWARE_WAVE_OUTPUT 31
|
|
||||||
#define ACM_METRIC_MAX_SIZE_FORMAT 50
|
|
||||||
#define ACM_METRIC_MAX_SIZE_FILTER 51
|
|
||||||
#define ACM_METRIC_DRIVER_SUPPORT 100
|
|
||||||
#define ACM_METRIC_DRIVER_PRIORITY 101
|
|
||||||
|
|
||||||
#define ACM_STREAMCONVERTF_BLOCKALIGN 0x00000004
|
|
||||||
#define ACM_STREAMCONVERTF_START 0x00000010
|
|
||||||
#define ACM_STREAMCONVERTF_END 0x00000020
|
|
||||||
|
|
||||||
#define ACMSTREAMHEADER_STATUSF_DONE 0x00010000L
|
|
||||||
#define ACMSTREAMHEADER_STATUSF_PREPARED 0x00020000L
|
|
||||||
#define ACMSTREAMHEADER_STATUSF_INQUEUE 0x00100000L
|
|
||||||
|
|
||||||
#define ACM_STREAMOPENF_QUERY 0x00000001
|
|
||||||
#define ACM_STREAMOPENF_ASYNC 0x00000002
|
|
||||||
#define ACM_STREAMOPENF_NONREALTIME 0x00000004
|
|
||||||
|
|
||||||
#define ACM_STREAMSIZEF_SOURCE 0x00000000L
|
|
||||||
#define ACM_STREAMSIZEF_DESTINATION 0x00000001L
|
|
||||||
#define ACM_STREAMSIZEF_QUERYMASK 0x0000000FL
|
|
||||||
|
|
||||||
#define ACMDM_USER (DRV_USER + 0x0000)
|
|
||||||
#define ACMDM_RESERVED_LOW (DRV_USER + 0x2000)
|
|
||||||
#define ACMDM_RESERVED_HIGH (DRV_USER + 0x2FFF)
|
|
||||||
|
|
||||||
#define ACMDM_BASE ACMDM_RESERVED_LOW
|
|
||||||
|
|
||||||
#define ACMDM_DRIVER_ABOUT (ACMDM_BASE + 11)
|
|
||||||
|
|
||||||
/***********************************************************************
|
|
||||||
* Callbacks
|
|
||||||
*/
|
|
||||||
|
|
||||||
typedef WIN_BOOL CALLBACK ( *ACMDRIVERENUMCB)(
|
|
||||||
HACMDRIVERID hadid, DWORD dwInstance, DWORD fdwSupport
|
|
||||||
);
|
|
||||||
|
|
||||||
typedef WIN_BOOL16 CALLBACK ( *ACMDRIVERENUMCB16)(
|
|
||||||
HACMDRIVERID16 hadid, DWORD dwInstance, DWORD fdwSupport
|
|
||||||
);
|
|
||||||
|
|
||||||
typedef UINT CALLBACK ( *ACMFILTERCHOOSEHOOKPROCA)(
|
|
||||||
HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam
|
|
||||||
);
|
|
||||||
|
|
||||||
typedef UINT CALLBACK ( *ACMFILTERCHOOSEHOOKPROCW)(
|
|
||||||
HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam
|
|
||||||
);
|
|
||||||
|
|
||||||
typedef UINT CALLBACK ( *ACMFILTERCHOOSEHOOKPROC16)(
|
|
||||||
HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam
|
|
||||||
);
|
|
||||||
|
|
||||||
typedef UINT CALLBACK ( *ACMFORMATCHOOSEHOOKPROCA)(
|
|
||||||
HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam
|
|
||||||
);
|
|
||||||
|
|
||||||
typedef UINT CALLBACK ( *ACMFORMATCHOOSEHOOKPROCW)(
|
|
||||||
HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam
|
|
||||||
);
|
|
||||||
|
|
||||||
typedef UINT16 CALLBACK ( *ACMFORMATCHOOSEHOOKPROC16)(
|
|
||||||
HWND16 hwnd, UINT16 uMsg, WPARAM16 wParam, LPARAM lParam
|
|
||||||
);
|
|
||||||
|
|
||||||
/***********************************************************************
|
|
||||||
* Structures
|
|
||||||
*/
|
|
||||||
|
|
||||||
typedef struct _ACMDRIVERDETAILSA
|
|
||||||
{
|
|
||||||
DWORD cbStruct;
|
|
||||||
|
|
||||||
FOURCC fccType;
|
|
||||||
FOURCC fccComp;
|
|
||||||
|
|
||||||
WORD wMid;
|
|
||||||
WORD wPid;
|
|
||||||
|
|
||||||
DWORD vdwACM;
|
|
||||||
DWORD vdwDriver;
|
|
||||||
|
|
||||||
DWORD fdwSupport;
|
|
||||||
DWORD cFormatTags;
|
|
||||||
DWORD cFilterTags;
|
|
||||||
|
|
||||||
HICON hicon;
|
|
||||||
|
|
||||||
CHAR szShortName[ACMDRIVERDETAILS_SHORTNAME_CHARS];
|
|
||||||
CHAR szLongName[ACMDRIVERDETAILS_LONGNAME_CHARS];
|
|
||||||
CHAR szCopyright[ACMDRIVERDETAILS_COPYRIGHT_CHARS];
|
|
||||||
CHAR szLicensing[ACMDRIVERDETAILS_LICENSING_CHARS];
|
|
||||||
CHAR szFeatures[ACMDRIVERDETAILS_FEATURES_CHARS];
|
|
||||||
} ACMDRIVERDETAILSA, *PACMDRIVERDETAILSA;
|
|
||||||
|
|
||||||
typedef struct _ACMDRIVERDETAILSW
|
|
||||||
{
|
|
||||||
DWORD cbStruct;
|
|
||||||
|
|
||||||
FOURCC fccType;
|
|
||||||
FOURCC fccComp;
|
|
||||||
|
|
||||||
WORD wMid;
|
|
||||||
WORD wPid;
|
|
||||||
|
|
||||||
DWORD vdwACM;
|
|
||||||
DWORD vdwDriver;
|
|
||||||
|
|
||||||
DWORD fdwSupport;
|
|
||||||
DWORD cFormatTags;
|
|
||||||
DWORD cFilterTags;
|
|
||||||
|
|
||||||
HICON hicon;
|
|
||||||
|
|
||||||
WCHAR szShortName[ACMDRIVERDETAILS_SHORTNAME_CHARS];
|
|
||||||
WCHAR szLongName[ACMDRIVERDETAILS_LONGNAME_CHARS];
|
|
||||||
WCHAR szCopyright[ACMDRIVERDETAILS_COPYRIGHT_CHARS];
|
|
||||||
WCHAR szLicensing[ACMDRIVERDETAILS_LICENSING_CHARS];
|
|
||||||
WCHAR szFeatures[ACMDRIVERDETAILS_FEATURES_CHARS];
|
|
||||||
} ACMDRIVERDETAILSW, *PACMDRIVERDETAILSW;
|
|
||||||
|
|
||||||
typedef struct _ACMDRIVERDETAILS16
|
|
||||||
{
|
|
||||||
DWORD cbStruct;
|
|
||||||
|
|
||||||
FOURCC fccType;
|
|
||||||
FOURCC fccComp;
|
|
||||||
|
|
||||||
WORD wMid;
|
|
||||||
WORD wPid;
|
|
||||||
|
|
||||||
DWORD vdwACM;
|
|
||||||
DWORD vdwDriver;
|
|
||||||
|
|
||||||
DWORD fdwSupport;
|
|
||||||
DWORD cFormatTags;
|
|
||||||
DWORD cFilterTags;
|
|
||||||
|
|
||||||
HICON16 hicon;
|
|
||||||
|
|
||||||
CHAR szShortName[ACMDRIVERDETAILS_SHORTNAME_CHARS];
|
|
||||||
CHAR szLongName[ACMDRIVERDETAILS_LONGNAME_CHARS];
|
|
||||||
CHAR szCopyright[ACMDRIVERDETAILS_COPYRIGHT_CHARS];
|
|
||||||
CHAR szLicensing[ACMDRIVERDETAILS_LICENSING_CHARS];
|
|
||||||
CHAR szFeatures[ACMDRIVERDETAILS_FEATURES_CHARS];
|
|
||||||
} ACMDRIVERDETAILS16, *NPACMDRIVERDETAILS16, *LPACMDRIVERDETAILS16;
|
|
||||||
|
|
||||||
typedef struct _ACMFILTERCHOOSEA
|
|
||||||
{
|
|
||||||
DWORD cbStruct;
|
|
||||||
DWORD fdwStyle;
|
|
||||||
|
|
||||||
HWND hwndOwner;
|
|
||||||
|
|
||||||
PWAVEFILTER pwfltr;
|
|
||||||
DWORD cbwfltr;
|
|
||||||
|
|
||||||
LPCSTR pszTitle;
|
|
||||||
|
|
||||||
CHAR szFilterTag[ACMFILTERTAGDETAILS_FILTERTAG_CHARS];
|
|
||||||
CHAR szFilter[ACMFILTERDETAILS_FILTER_CHARS];
|
|
||||||
LPSTR pszName;
|
|
||||||
DWORD cchName;
|
|
||||||
|
|
||||||
DWORD fdwEnum;
|
|
||||||
PWAVEFILTER pwfltrEnum;
|
|
||||||
|
|
||||||
HINSTANCE hInstance;
|
|
||||||
LPCSTR pszTemplateName;
|
|
||||||
LPARAM lCustData;
|
|
||||||
ACMFILTERCHOOSEHOOKPROCA pfnHook;
|
|
||||||
} ACMFILTERCHOOSEA, *PACMFILTERCHOOSEA;
|
|
||||||
|
|
||||||
typedef struct _ACMFILTERCHOOSEW
|
|
||||||
{
|
|
||||||
DWORD cbStruct;
|
|
||||||
DWORD fdwStyle;
|
|
||||||
|
|
||||||
HWND hwndOwner;
|
|
||||||
|
|
||||||
PWAVEFILTER pwfltr;
|
|
||||||
DWORD cbwfltr;
|
|
||||||
|
|
||||||
LPCWSTR pszTitle;
|
|
||||||
|
|
||||||
WCHAR szFilterTag[ACMFILTERTAGDETAILS_FILTERTAG_CHARS];
|
|
||||||
WCHAR szFilter[ACMFILTERDETAILS_FILTER_CHARS];
|
|
||||||
LPWSTR pszName;
|
|
||||||
DWORD cchName;
|
|
||||||
|
|
||||||
DWORD fdwEnum;
|
|
||||||
PWAVEFILTER pwfltrEnum;
|
|
||||||
|
|
||||||
HINSTANCE hInstance;
|
|
||||||
LPCWSTR pszTemplateName;
|
|
||||||
LPARAM lCustData;
|
|
||||||
ACMFILTERCHOOSEHOOKPROCW pfnHook;
|
|
||||||
} ACMFILTERCHOOSEW, *PACMFILTERCHOOSEW;
|
|
||||||
|
|
||||||
typedef struct _ACMFILTERCHOOSE16
|
|
||||||
{
|
|
||||||
DWORD cbStruct;
|
|
||||||
DWORD fdwStyle;
|
|
||||||
|
|
||||||
HWND16 hwndOwner;
|
|
||||||
|
|
||||||
LPWAVEFILTER pwfltr;
|
|
||||||
DWORD cbwfltr;
|
|
||||||
|
|
||||||
LPCSTR pszTitle;
|
|
||||||
|
|
||||||
char szFilterTag[ACMFILTERTAGDETAILS_FILTERTAG_CHARS];
|
|
||||||
char szFilter[ACMFILTERDETAILS_FILTER_CHARS];
|
|
||||||
LPSTR pszName;
|
|
||||||
DWORD cchName;
|
|
||||||
|
|
||||||
DWORD fdwEnum;
|
|
||||||
LPWAVEFILTER pwfltrEnum;
|
|
||||||
|
|
||||||
HINSTANCE16 hInstance;
|
|
||||||
LPCSTR pszTemplateName;
|
|
||||||
LPARAM lCustData;
|
|
||||||
ACMFILTERCHOOSEHOOKPROC16 pfnHook;
|
|
||||||
} ACMFILTERCHOOSE16, *NPACMFILTERCHOOSE16, *LPACMFILTERCHOOSE16;
|
|
||||||
|
|
||||||
typedef struct _ACMFILTERDETAILSA
|
|
||||||
{
|
|
||||||
DWORD cbStruct;
|
|
||||||
DWORD dwFilterIndex;
|
|
||||||
DWORD dwFilterTag;
|
|
||||||
DWORD fdwSupport;
|
|
||||||
PWAVEFILTER pwfltr;
|
|
||||||
DWORD cbwfltr;
|
|
||||||
CHAR szFilter[ACMFILTERDETAILS_FILTER_CHARS];
|
|
||||||
} ACMFILTERDETAILSA, *PACMFILTERDETAILSA;
|
|
||||||
|
|
||||||
typedef struct _ACMFILTERDETAILSW
|
|
||||||
{
|
|
||||||
DWORD cbStruct;
|
|
||||||
DWORD dwFilterIndex;
|
|
||||||
DWORD dwFilterTag;
|
|
||||||
DWORD fdwSupport;
|
|
||||||
PWAVEFILTER pwfltr;
|
|
||||||
DWORD cbwfltr;
|
|
||||||
WCHAR szFilter[ACMFILTERDETAILS_FILTER_CHARS];
|
|
||||||
} ACMFILTERDETAILSW, *PACMFILTERDETAILSW;
|
|
||||||
|
|
||||||
typedef struct _ACMFILTERDETAILS16
|
|
||||||
{
|
|
||||||
DWORD cbStruct;
|
|
||||||
DWORD dwFilterIndex;
|
|
||||||
DWORD dwFilterTag;
|
|
||||||
DWORD fdwSupport;
|
|
||||||
LPWAVEFILTER pwfltr;
|
|
||||||
DWORD cbwfltr;
|
|
||||||
CHAR szFilter[ACMFILTERDETAILS_FILTER_CHARS];
|
|
||||||
} ACMFILTERDETAILS16, *NPACMFILTERDETAILS16, *LPACMFILTERDETAILS16;
|
|
||||||
|
|
||||||
typedef struct _ACMFILTERTAGDETAILSA
|
|
||||||
{
|
|
||||||
DWORD cbStruct;
|
|
||||||
DWORD dwFilterTagIndex;
|
|
||||||
DWORD dwFilterTag;
|
|
||||||
DWORD cbFilterSize;
|
|
||||||
DWORD fdwSupport;
|
|
||||||
DWORD cStandardFilters;
|
|
||||||
CHAR szFilterTag[ACMFILTERTAGDETAILS_FILTERTAG_CHARS];
|
|
||||||
} ACMFILTERTAGDETAILSA, *PACMFILTERTAGDETAILSA;
|
|
||||||
|
|
||||||
typedef struct _ACMFILTERTAGDETAILSW
|
|
||||||
{
|
|
||||||
DWORD cbStruct;
|
|
||||||
DWORD dwFilterTagIndex;
|
|
||||||
DWORD dwFilterTag;
|
|
||||||
DWORD cbFilterSize;
|
|
||||||
DWORD fdwSupport;
|
|
||||||
DWORD cStandardFilters;
|
|
||||||
WCHAR szFilterTag[ACMFILTERTAGDETAILS_FILTERTAG_CHARS];
|
|
||||||
} ACMFILTERTAGDETAILSW, *PACMFILTERTAGDETAILSW;
|
|
||||||
|
|
||||||
typedef struct _ACMFILTERTAGDETAILS16
|
|
||||||
{
|
|
||||||
DWORD cbStruct;
|
|
||||||
DWORD dwFilterTagIndex;
|
|
||||||
DWORD dwFilterTag;
|
|
||||||
DWORD cbFilterSize;
|
|
||||||
DWORD fdwSupport;
|
|
||||||
DWORD cStandardFilters;
|
|
||||||
CHAR szFilterTag[ACMFILTERTAGDETAILS_FILTERTAG_CHARS];
|
|
||||||
} ACMFILTERTAGDETAILS16, *NPACMFILTERTAGDETAILS16, *LPACMFILTERTAGDETAILS16;
|
|
||||||
|
|
||||||
typedef struct _ACMFORMATCHOOSEA
|
|
||||||
{
|
|
||||||
DWORD cbStruct;
|
|
||||||
DWORD fdwStyle;
|
|
||||||
|
|
||||||
HWND hwndOwner;
|
|
||||||
|
|
||||||
PWAVEFORMATEX pwfx;
|
|
||||||
DWORD cbwfx;
|
|
||||||
LPCSTR pszTitle;
|
|
||||||
|
|
||||||
CHAR szFormatTag[ACMFORMATTAGDETAILS_FORMATTAG_CHARS];
|
|
||||||
CHAR szFormat[ACMFORMATDETAILS_FORMAT_CHARS];
|
|
||||||
|
|
||||||
LPSTR pszName;
|
|
||||||
DWORD cchName;
|
|
||||||
|
|
||||||
DWORD fdwEnum;
|
|
||||||
PWAVEFORMATEX pwfxEnum;
|
|
||||||
|
|
||||||
HINSTANCE hInstance;
|
|
||||||
LPCSTR pszTemplateName;
|
|
||||||
LPARAM lCustData;
|
|
||||||
ACMFORMATCHOOSEHOOKPROCA pfnHook;
|
|
||||||
} ACMFORMATCHOOSEA, *PACMFORMATCHOOSEA;
|
|
||||||
|
|
||||||
typedef struct _ACMFORMATCHOOSEW
|
|
||||||
{
|
|
||||||
DWORD cbStruct;
|
|
||||||
DWORD fdwStyle;
|
|
||||||
|
|
||||||
HWND hwndOwner;
|
|
||||||
|
|
||||||
PWAVEFORMATEX pwfx;
|
|
||||||
DWORD cbwfx;
|
|
||||||
LPCWSTR pszTitle;
|
|
||||||
|
|
||||||
WCHAR szFormatTag[ACMFORMATTAGDETAILS_FORMATTAG_CHARS];
|
|
||||||
WCHAR szFormat[ACMFORMATDETAILS_FORMAT_CHARS];
|
|
||||||
|
|
||||||
LPWSTR pszName;
|
|
||||||
DWORD cchName;
|
|
||||||
|
|
||||||
DWORD fdwEnum;
|
|
||||||
LPWAVEFORMATEX pwfxEnum;
|
|
||||||
|
|
||||||
HINSTANCE hInstance;
|
|
||||||
LPCWSTR pszTemplateName;
|
|
||||||
LPARAM lCustData;
|
|
||||||
ACMFORMATCHOOSEHOOKPROCW pfnHook;
|
|
||||||
} ACMFORMATCHOOSEW, *PACMFORMATCHOOSEW;
|
|
||||||
|
|
||||||
typedef struct _ACMFORMATCHOOSE16
|
|
||||||
{
|
|
||||||
DWORD cbStruct;
|
|
||||||
DWORD fdwStyle;
|
|
||||||
|
|
||||||
HWND16 hwndOwner;
|
|
||||||
|
|
||||||
LPWAVEFORMATEX pwfx;
|
|
||||||
DWORD cbwfx;
|
|
||||||
LPCSTR pszTitle;
|
|
||||||
|
|
||||||
CHAR szFormatTag[ACMFORMATTAGDETAILS_FORMATTAG_CHARS];
|
|
||||||
CHAR szFormat[ACMFORMATDETAILS_FORMAT_CHARS];
|
|
||||||
|
|
||||||
LPSTR pszName;
|
|
||||||
DWORD cchName;
|
|
||||||
|
|
||||||
DWORD fdwEnum;
|
|
||||||
LPWAVEFORMATEX pwfxEnum;
|
|
||||||
|
|
||||||
HINSTANCE16 hInstance;
|
|
||||||
LPCSTR pszTemplateName;
|
|
||||||
LPARAM lCustData;
|
|
||||||
ACMFORMATCHOOSEHOOKPROC16 pfnHook;
|
|
||||||
} ACMFORMATCHOOSE16, *NPACMFORMATCHOOSE16, *LPACMFORMATCHOOSE16;
|
|
||||||
|
|
||||||
typedef struct _ACMFORMATDETAILSA
|
|
||||||
{
|
|
||||||
DWORD cbStruct;
|
|
||||||
DWORD dwFormatIndex;
|
|
||||||
DWORD dwFormatTag;
|
|
||||||
DWORD fdwSupport;
|
|
||||||
PWAVEFORMATEX pwfx;
|
|
||||||
DWORD cbwfx;
|
|
||||||
CHAR szFormat[ACMFORMATDETAILS_FORMAT_CHARS];
|
|
||||||
} ACMFORMATDETAILSA, *PACMFORMATDETAILSA;
|
|
||||||
|
|
||||||
typedef struct _ACMFORMATDETAILSW
|
|
||||||
{
|
|
||||||
DWORD cbStruct;
|
|
||||||
DWORD dwFormatIndex;
|
|
||||||
DWORD dwFormatTag;
|
|
||||||
DWORD fdwSupport;
|
|
||||||
PWAVEFORMATEX pwfx;
|
|
||||||
DWORD cbwfx;
|
|
||||||
WCHAR szFormat[ACMFORMATDETAILS_FORMAT_CHARS];
|
|
||||||
} ACMFORMATDETAILSW, *PACMFORMATDETAILSW;
|
|
||||||
|
|
||||||
typedef struct _ACMFORMATDETAILS16
|
|
||||||
{
|
|
||||||
DWORD cbStruct;
|
|
||||||
DWORD dwFormatIndex;
|
|
||||||
DWORD dwFormatTag;
|
|
||||||
DWORD fdwSupport;
|
|
||||||
LPWAVEFORMATEX pwfx;
|
|
||||||
DWORD cbwfx;
|
|
||||||
CHAR szFormat[ACMFORMATDETAILS_FORMAT_CHARS];
|
|
||||||
} ACMFORMATDETAILS16, *NPACMFORMATDETAILS16, *LPACMFORMATDETAILS16;
|
|
||||||
|
|
||||||
typedef struct _ACMFORMATTAGDETAILSA
|
|
||||||
{
|
|
||||||
DWORD cbStruct;
|
|
||||||
DWORD dwFormatTagIndex;
|
|
||||||
DWORD dwFormatTag;
|
|
||||||
DWORD cbFormatSize;
|
|
||||||
DWORD fdwSupport;
|
|
||||||
DWORD cStandardFormats;
|
|
||||||
CHAR szFormatTag[ACMFORMATTAGDETAILS_FORMATTAG_CHARS];
|
|
||||||
} ACMFORMATTAGDETAILSA, *PACMFORMATTAGDETAILSA;
|
|
||||||
|
|
||||||
typedef struct _ACMFORMATTAGDETAILSW
|
|
||||||
{
|
|
||||||
DWORD cbStruct;
|
|
||||||
DWORD dwFormatTagIndex;
|
|
||||||
DWORD dwFormatTag;
|
|
||||||
DWORD cbFormatSize;
|
|
||||||
DWORD fdwSupport;
|
|
||||||
DWORD cStandardFormats;
|
|
||||||
WCHAR szFormatTag[ACMFORMATTAGDETAILS_FORMATTAG_CHARS];
|
|
||||||
} ACMFORMATTAGDETAILSW, *PACMFORMATTAGDETAILSW;
|
|
||||||
|
|
||||||
typedef struct _ACMFORMATTAGDETAILS16
|
|
||||||
{
|
|
||||||
DWORD cbStruct;
|
|
||||||
DWORD dwFormatTagIndex;
|
|
||||||
DWORD dwFormatTag;
|
|
||||||
DWORD cbFormatSize;
|
|
||||||
DWORD fdwSupport;
|
|
||||||
DWORD cStandardFormats;
|
|
||||||
CHAR szFormatTag[ACMFORMATTAGDETAILS_FORMATTAG_CHARS];
|
|
||||||
} ACMFORMATTAGDETAILS16, *NPACMFORMATTAGDETAILS16, *LPACMFORMATTAGDETAILS16;
|
|
||||||
|
|
||||||
typedef struct _ACMSTREAMHEADER
|
|
||||||
{
|
|
||||||
DWORD cbStruct;
|
|
||||||
DWORD fdwStatus;
|
|
||||||
DWORD dwUser;
|
|
||||||
LPBYTE pbSrc;
|
|
||||||
DWORD cbSrcLength;
|
|
||||||
DWORD cbSrcLengthUsed;
|
|
||||||
DWORD dwSrcUser;
|
|
||||||
LPBYTE pbDst;
|
|
||||||
DWORD cbDstLength;
|
|
||||||
DWORD cbDstLengthUsed;
|
|
||||||
DWORD dwDstUser;
|
|
||||||
DWORD dwReservedDriver[10];
|
|
||||||
} ACMSTREAMHEADER16, *NPACMSTREAMHEADER16, *LPACMSTREAMHEADER16,
|
|
||||||
ACMSTREAMHEADER, *PACMSTREAMHEADER;
|
|
||||||
|
|
||||||
/***********************************************************************
|
|
||||||
* Callbacks 2
|
|
||||||
*/
|
|
||||||
|
|
||||||
typedef WIN_BOOL CALLBACK ( *ACMFILTERENUMCBA)(
|
|
||||||
HACMDRIVERID hadid, PACMFILTERDETAILSA pafd,
|
|
||||||
DWORD dwInstance, DWORD fdwSupport
|
|
||||||
);
|
|
||||||
|
|
||||||
typedef WIN_BOOL CALLBACK ( *ACMFILTERENUMCBW)(
|
|
||||||
HACMDRIVERID hadid, PACMFILTERDETAILSW pafd,
|
|
||||||
DWORD dwInstance, DWORD fdwSupport
|
|
||||||
);
|
|
||||||
|
|
||||||
typedef WIN_BOOL16 CALLBACK ( *ACMFILTERENUMCB16)(
|
|
||||||
HACMDRIVERID16 hadid, LPACMFILTERDETAILS16 pafd,
|
|
||||||
DWORD dwInstance, DWORD fdwSupport
|
|
||||||
);
|
|
||||||
|
|
||||||
typedef WIN_BOOL CALLBACK ( *ACMFILTERTAGENUMCBA)(
|
|
||||||
HACMDRIVERID hadid, PACMFILTERTAGDETAILSA paftd,
|
|
||||||
DWORD dwInstance, DWORD fdwSupport
|
|
||||||
);
|
|
||||||
|
|
||||||
typedef WIN_BOOL CALLBACK ( *ACMFILTERTAGENUMCBW)(
|
|
||||||
HACMDRIVERID hadid, PACMFILTERTAGDETAILSW paftd,
|
|
||||||
DWORD dwInstance, DWORD fdwSupport
|
|
||||||
);
|
|
||||||
|
|
||||||
typedef WIN_BOOL16 CALLBACK ( *ACMFILTERTAGENUMCB16)(
|
|
||||||
HACMDRIVERID16 hadid, LPACMFILTERTAGDETAILS16 paftd,
|
|
||||||
DWORD dwInstance, DWORD fdwSupport
|
|
||||||
);
|
|
||||||
|
|
||||||
typedef WIN_BOOL CALLBACK ( *ACMFORMATENUMCBA)(
|
|
||||||
HACMDRIVERID hadid, PACMFORMATDETAILSA pafd,
|
|
||||||
DWORD dwInstance, DWORD fdwSupport
|
|
||||||
);
|
|
||||||
|
|
||||||
typedef WIN_BOOL CALLBACK ( *ACMFORMATENUMCBW)(
|
|
||||||
HACMDRIVERID hadid, PACMFORMATDETAILSW pafd,
|
|
||||||
DWORD dwInstance, DWORD fdwSupport
|
|
||||||
);
|
|
||||||
|
|
||||||
typedef WIN_BOOL16 CALLBACK ( *ACMFORMATENUMCB16)(
|
|
||||||
HACMDRIVERID16 hadid, LPACMFORMATDETAILS16 pafd,
|
|
||||||
DWORD dwInstance, DWORD fdwSupport
|
|
||||||
);
|
|
||||||
|
|
||||||
typedef WIN_BOOL CALLBACK ( *ACMFORMATTAGENUMCBA)(
|
|
||||||
HACMDRIVERID hadid, PACMFORMATTAGDETAILSA paftd,
|
|
||||||
DWORD dwInstance, DWORD fdwSupport
|
|
||||||
);
|
|
||||||
|
|
||||||
typedef WIN_BOOL CALLBACK ( *ACMFORMATTAGENUMCBW)(
|
|
||||||
HACMDRIVERID hadid, PACMFORMATTAGDETAILSW paftd,
|
|
||||||
DWORD dwInstance, DWORD fdwSupport
|
|
||||||
);
|
|
||||||
|
|
||||||
typedef WIN_BOOL16 CALLBACK ( *ACMFORMATTAGENUMCB16)(
|
|
||||||
HACMDRIVERID16 hadid, LPACMFORMATTAGDETAILS16 paftd,
|
|
||||||
DWORD dwInstance, DWORD fdwSupport
|
|
||||||
);
|
|
||||||
|
|
||||||
/***********************************************************************
|
|
||||||
* Functions - Win16
|
|
||||||
*/
|
|
||||||
|
|
||||||
DWORD WINAPI acmGetVersion16(
|
|
||||||
);
|
|
||||||
MMRESULT16 WINAPI acmMetrics16(
|
|
||||||
HACMOBJ16 hao, UINT16 uMetric, LPVOID pMetric
|
|
||||||
);
|
|
||||||
MMRESULT16 WINAPI acmDriverEnum16(
|
|
||||||
ACMDRIVERENUMCB16 fnCallback, DWORD dwInstance, DWORD fdwEnum
|
|
||||||
);
|
|
||||||
MMRESULT16 WINAPI acmDriverDetails16(
|
|
||||||
HACMDRIVERID16 hadid, LPACMDRIVERDETAILS16 padd, DWORD fdwDetails
|
|
||||||
);
|
|
||||||
MMRESULT16 WINAPI acmDriverAdd16(
|
|
||||||
LPHACMDRIVERID16 phadid, HINSTANCE16 hinstModule,
|
|
||||||
LPARAM lParam, DWORD dwPriority, DWORD fdwAdd
|
|
||||||
);
|
|
||||||
MMRESULT16 WINAPI acmDriverRemove16(
|
|
||||||
HACMDRIVERID16 hadid, DWORD fdwRemove
|
|
||||||
);
|
|
||||||
MMRESULT16 WINAPI acmDriverOpen16(
|
|
||||||
LPHACMDRIVER16 phad, HACMDRIVERID16 hadid, DWORD fdwOpen
|
|
||||||
);
|
|
||||||
MMRESULT16 WINAPI acmDriverClose16(
|
|
||||||
HACMDRIVER16 had, DWORD fdwClose
|
|
||||||
);
|
|
||||||
LRESULT WINAPI acmDriverMessage16(
|
|
||||||
HACMDRIVER16 had, UINT16 uMsg, LPARAM lParam1, LPARAM lParam2
|
|
||||||
);
|
|
||||||
MMRESULT16 WINAPI acmDriverID16(
|
|
||||||
HACMOBJ16 hao, LPHACMDRIVERID16 phadid, DWORD fdwDriverID
|
|
||||||
);
|
|
||||||
MMRESULT16 WINAPI acmDriverPriority16(
|
|
||||||
HACMDRIVERID16 hadid, DWORD dwPriority, DWORD fdwPriority
|
|
||||||
);
|
|
||||||
MMRESULT16 WINAPI acmFormatTagDetails16(
|
|
||||||
HACMDRIVER16 had, LPACMFORMATTAGDETAILS16 paftd, DWORD fdwDetails
|
|
||||||
);
|
|
||||||
MMRESULT16 WINAPI acmFormatTagEnum16(
|
|
||||||
HACMDRIVER16 had, LPACMFORMATTAGDETAILS16 paftd,
|
|
||||||
ACMFORMATTAGENUMCB16 fnCallback, DWORD dwInstance, DWORD fdwEnum
|
|
||||||
);
|
|
||||||
MMRESULT16 WINAPI acmFormatChoose16(
|
|
||||||
LPACMFORMATCHOOSE16 pafmtc
|
|
||||||
);
|
|
||||||
MMRESULT16 WINAPI acmFormatDetails16(
|
|
||||||
HACMDRIVER16 had, LPACMFORMATDETAILS16 pafd, DWORD fdwDetails
|
|
||||||
);
|
|
||||||
MMRESULT16 WINAPI acmFormatEnum16(
|
|
||||||
HACMDRIVER16 had, LPACMFORMATDETAILS16 pafd,
|
|
||||||
ACMFORMATENUMCB16 fnCallback, DWORD dwInstance, DWORD fdwEnum
|
|
||||||
);
|
|
||||||
MMRESULT16 WINAPI acmFormatSuggest16(
|
|
||||||
HACMDRIVER16 had, LPWAVEFORMATEX pwfxSrc,
|
|
||||||
LPWAVEFORMATEX pwfxDst, DWORD cbwfxDst, DWORD fdwSuggest
|
|
||||||
);
|
|
||||||
MMRESULT16 WINAPI acmFilterTagDetails16(
|
|
||||||
HACMDRIVER16 had, LPACMFILTERTAGDETAILS16 paftd, DWORD fdwDetails
|
|
||||||
);
|
|
||||||
MMRESULT16 WINAPI acmFilterTagEnum16(
|
|
||||||
HACMDRIVER16 had, LPACMFILTERTAGDETAILS16 paftd,
|
|
||||||
ACMFILTERTAGENUMCB16 fnCallback, DWORD dwInstance, DWORD fdwEnum
|
|
||||||
);
|
|
||||||
MMRESULT16 WINAPI acmFilterChoose16(
|
|
||||||
LPACMFILTERCHOOSE16 pafltrc
|
|
||||||
);
|
|
||||||
MMRESULT16 WINAPI acmFilterDetails16(
|
|
||||||
HACMDRIVER16 had, LPACMFILTERDETAILS16 pafd, DWORD fdwDetails
|
|
||||||
);
|
|
||||||
MMRESULT16 WINAPI acmFilterEnum16(
|
|
||||||
HACMDRIVER16 had, LPACMFILTERDETAILS16 pafd,
|
|
||||||
ACMFILTERENUMCB16 fnCallback, DWORD dwInstance, DWORD fdwEnum
|
|
||||||
);
|
|
||||||
MMRESULT16 WINAPI acmStreamOpen16(
|
|
||||||
LPHACMSTREAM16 phas, HACMDRIVER16 had,
|
|
||||||
LPWAVEFORMATEX pwfxSrc, LPWAVEFORMATEX pwfxDst,
|
|
||||||
LPWAVEFILTER pwfltr, DWORD dwCallback,
|
|
||||||
DWORD dwInstance, DWORD fdwOpen
|
|
||||||
);
|
|
||||||
MMRESULT16 WINAPI acmStreamClose16(
|
|
||||||
HACMSTREAM16 has, DWORD fdwClose
|
|
||||||
);
|
|
||||||
MMRESULT16 WINAPI acmStreamSize16(
|
|
||||||
HACMSTREAM16 has, DWORD cbInput,
|
|
||||||
LPDWORD pdwOutputBytes, DWORD fdwSize
|
|
||||||
);
|
|
||||||
MMRESULT16 WINAPI acmStreamConvert16(
|
|
||||||
HACMSTREAM16 has, LPACMSTREAMHEADER16 pash, DWORD fdwConvert
|
|
||||||
);
|
|
||||||
MMRESULT16 WINAPI acmStreamReset16(
|
|
||||||
HACMSTREAM16 has, DWORD fdwReset
|
|
||||||
);
|
|
||||||
MMRESULT16 WINAPI acmStreamPrepareHeader16(
|
|
||||||
HACMSTREAM16 has, LPACMSTREAMHEADER16 pash, DWORD fdwPrepare
|
|
||||||
);
|
|
||||||
MMRESULT16 WINAPI acmStreamUnprepareHeader16(
|
|
||||||
HACMSTREAM16 has, LPACMSTREAMHEADER16 pash, DWORD fdwUnprepare
|
|
||||||
);
|
|
||||||
|
|
||||||
/***********************************************************************
|
|
||||||
* Functions - Win32
|
|
||||||
*/
|
|
||||||
|
|
||||||
MMRESULT WINAPI acmDriverAddA(
|
|
||||||
PHACMDRIVERID phadid, HINSTANCE hinstModule,
|
|
||||||
LPARAM lParam, DWORD dwPriority, DWORD fdwAdd
|
|
||||||
);
|
|
||||||
MMRESULT WINAPI acmDriverAddW(
|
|
||||||
PHACMDRIVERID phadid, HINSTANCE hinstModule,
|
|
||||||
LPARAM lParam, DWORD dwPriority, DWORD fdwAdd
|
|
||||||
);
|
|
||||||
MMRESULT WINAPI acmDriverClose(
|
|
||||||
HACMDRIVER had, DWORD fdwClose
|
|
||||||
);
|
|
||||||
MMRESULT WINAPI acmDriverDetailsA(
|
|
||||||
HACMDRIVERID hadid, PACMDRIVERDETAILSA padd, DWORD fdwDetails
|
|
||||||
);
|
|
||||||
MMRESULT WINAPI acmDriverDetailsW(
|
|
||||||
HACMDRIVERID hadid, PACMDRIVERDETAILSW padd, DWORD fdwDetails
|
|
||||||
);
|
|
||||||
MMRESULT WINAPI acmDriverEnum(
|
|
||||||
ACMDRIVERENUMCB fnCallback, DWORD dwInstance, DWORD fdwEnum
|
|
||||||
);
|
|
||||||
MMRESULT WINAPI acmDriverID(
|
|
||||||
HACMOBJ hao, PHACMDRIVERID phadid, DWORD fdwDriverID
|
|
||||||
);
|
|
||||||
LRESULT WINAPI acmDriverMessage(
|
|
||||||
HACMDRIVER had, UINT uMsg, LPARAM lParam1, LPARAM lParam2
|
|
||||||
);
|
|
||||||
MMRESULT WINAPI acmDriverOpen(
|
|
||||||
PHACMDRIVER phad, HACMDRIVERID hadid, DWORD fdwOpen
|
|
||||||
);
|
|
||||||
MMRESULT WINAPI acmDriverPriority(
|
|
||||||
HACMDRIVERID hadid, DWORD dwPriority, DWORD fdwPriority
|
|
||||||
);
|
|
||||||
MMRESULT WINAPI acmDriverRemove(
|
|
||||||
HACMDRIVERID hadid, DWORD fdwRemove
|
|
||||||
);
|
|
||||||
MMRESULT WINAPI acmFilterChooseA(
|
|
||||||
PACMFILTERCHOOSEA pafltrc
|
|
||||||
);
|
|
||||||
MMRESULT WINAPI acmFilterChooseW(
|
|
||||||
PACMFILTERCHOOSEW pafltrc
|
|
||||||
);
|
|
||||||
MMRESULT WINAPI acmFilterDetailsA(
|
|
||||||
HACMDRIVER had, PACMFILTERDETAILSA pafd, DWORD fdwDetails
|
|
||||||
);
|
|
||||||
MMRESULT WINAPI acmFilterDetailsW(
|
|
||||||
HACMDRIVER had, PACMFILTERDETAILSW pafd, DWORD fdwDetails
|
|
||||||
);
|
|
||||||
MMRESULT WINAPI acmFilterEnumA(
|
|
||||||
HACMDRIVER had, PACMFILTERDETAILSA pafd,
|
|
||||||
ACMFILTERENUMCBA fnCallback, DWORD dwInstance, DWORD fdwEnum
|
|
||||||
);
|
|
||||||
MMRESULT WINAPI acmFilterEnumW(
|
|
||||||
HACMDRIVER had, PACMFILTERDETAILSW pafd,
|
|
||||||
ACMFILTERENUMCBW fnCallback, DWORD dwInstance, DWORD fdwEnum
|
|
||||||
);
|
|
||||||
MMRESULT WINAPI acmFilterTagDetailsA(
|
|
||||||
HACMDRIVER had, PACMFILTERTAGDETAILSA paftd, DWORD fdwDetails
|
|
||||||
);
|
|
||||||
MMRESULT WINAPI acmFilterTagDetailsW(
|
|
||||||
HACMDRIVER had, PACMFILTERTAGDETAILSW paftd, DWORD fdwDetails
|
|
||||||
);
|
|
||||||
MMRESULT WINAPI acmFilterTagEnumA(
|
|
||||||
HACMDRIVER had, PACMFILTERTAGDETAILSA paftd,
|
|
||||||
ACMFILTERTAGENUMCBA fnCallback, DWORD dwInstance, DWORD fdwEnum
|
|
||||||
);
|
|
||||||
MMRESULT WINAPI acmFilterTagEnumW(
|
|
||||||
HACMDRIVER had, PACMFILTERTAGDETAILSW paftd,
|
|
||||||
ACMFILTERTAGENUMCBW fnCallback, DWORD dwInstance, DWORD fdwEnum
|
|
||||||
);
|
|
||||||
MMRESULT WINAPI acmFormatChooseA(
|
|
||||||
PACMFORMATCHOOSEA pafmtc
|
|
||||||
);
|
|
||||||
MMRESULT WINAPI acmFormatChooseW(
|
|
||||||
PACMFORMATCHOOSEW pafmtc
|
|
||||||
);
|
|
||||||
MMRESULT WINAPI acmFormatDetailsA(
|
|
||||||
HACMDRIVER had, PACMFORMATDETAILSA pafd, DWORD fdwDetails
|
|
||||||
);
|
|
||||||
MMRESULT WINAPI acmFormatDetailsW(
|
|
||||||
HACMDRIVER had, PACMFORMATDETAILSW pafd, DWORD fdwDetails
|
|
||||||
);
|
|
||||||
MMRESULT WINAPI acmFormatEnumA(
|
|
||||||
HACMDRIVER had, PACMFORMATDETAILSA pafd,
|
|
||||||
ACMFORMATENUMCBA fnCallback, DWORD dwInstance, DWORD fdwEnum
|
|
||||||
);
|
|
||||||
MMRESULT WINAPI acmFormatEnumW(
|
|
||||||
HACMDRIVER had, PACMFORMATDETAILSW pafd,
|
|
||||||
ACMFORMATENUMCBW fnCallback, DWORD dwInstance, DWORD fdwEnum
|
|
||||||
);
|
|
||||||
MMRESULT WINAPI acmFormatSuggest(
|
|
||||||
HACMDRIVER had, PWAVEFORMATEX pwfxSrc, PWAVEFORMATEX pwfxDst,
|
|
||||||
DWORD cbwfxDst, DWORD fdwSuggest
|
|
||||||
);
|
|
||||||
MMRESULT WINAPI acmFormatTagDetailsA(
|
|
||||||
HACMDRIVER had, PACMFORMATTAGDETAILSA paftd, DWORD fdwDetails
|
|
||||||
);
|
|
||||||
MMRESULT WINAPI acmFormatTagDetailsW(
|
|
||||||
HACMDRIVER had, PACMFORMATTAGDETAILSW paftd, DWORD fdwDetails
|
|
||||||
);
|
|
||||||
MMRESULT WINAPI acmFormatTagEnumA(
|
|
||||||
HACMDRIVER had, PACMFORMATTAGDETAILSA paftd,
|
|
||||||
ACMFORMATTAGENUMCBA fnCallback, DWORD dwInstance, DWORD fdwEnum
|
|
||||||
);
|
|
||||||
MMRESULT WINAPI acmFormatTagEnumW(
|
|
||||||
HACMDRIVER had, PACMFORMATTAGDETAILSW paftd,
|
|
||||||
ACMFORMATTAGENUMCBW fnCallback, DWORD dwInstance, DWORD fdwEnum
|
|
||||||
);
|
|
||||||
DWORD WINAPI acmGetVersion(
|
|
||||||
);
|
|
||||||
MMRESULT WINAPI acmMetrics(
|
|
||||||
HACMOBJ hao, UINT uMetric, LPVOID pMetric
|
|
||||||
);
|
|
||||||
MMRESULT WINAPI acmStreamClose(
|
|
||||||
HACMSTREAM has, DWORD fdwClose
|
|
||||||
);
|
|
||||||
MMRESULT WINAPI acmStreamConvert(
|
|
||||||
HACMSTREAM has, PACMSTREAMHEADER pash, DWORD fdwConvert
|
|
||||||
);
|
|
||||||
MMRESULT WINAPI acmStreamMessage(
|
|
||||||
HACMSTREAM has, UINT uMsg, LPARAM lParam1, LPARAM lParam2
|
|
||||||
);
|
|
||||||
MMRESULT WINAPI acmStreamOpen(
|
|
||||||
PHACMSTREAM phas, HACMDRIVER had, PWAVEFORMATEX pwfxSrc,
|
|
||||||
PWAVEFORMATEX pwfxDst, PWAVEFILTER pwfltr, DWORD dwCallback,
|
|
||||||
DWORD dwInstance, DWORD fdwOpen
|
|
||||||
);
|
|
||||||
MMRESULT WINAPI acmStreamPrepareHeader(
|
|
||||||
HACMSTREAM has, PACMSTREAMHEADER pash, DWORD fdwPrepare
|
|
||||||
);
|
|
||||||
MMRESULT WINAPI acmStreamReset(
|
|
||||||
HACMSTREAM has, DWORD fdwReset
|
|
||||||
);
|
|
||||||
MMRESULT WINAPI acmStreamSize(
|
|
||||||
HACMSTREAM has, DWORD cbInput,
|
|
||||||
LPDWORD pdwOutputBytes, DWORD fdwSize
|
|
||||||
);
|
|
||||||
MMRESULT WINAPI acmStreamUnprepareHeader(
|
|
||||||
HACMSTREAM has, PACMSTREAMHEADER pash, DWORD fdwUnprepare
|
|
||||||
);
|
|
||||||
void MSACM_RegisterAllDrivers(void);
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
} /* extern "C" */
|
|
||||||
#endif /* defined(__cplusplus) */
|
|
||||||
|
|
||||||
#endif /* __WINE_MSACM_H */
|
|
||||||
|
|
||||||
|
|
|
@ -1,203 +0,0 @@
|
||||||
/*
|
|
||||||
* msacmdrv.h - Declarations for MSACM driver
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef __WINE_MSACMDRV_H
|
|
||||||
#define __WINE_MSACMDRV_H
|
|
||||||
|
|
||||||
#include "windef.h"
|
|
||||||
#include "msacm.h"
|
|
||||||
|
|
||||||
/***********************************************************************
|
|
||||||
* Types
|
|
||||||
*/
|
|
||||||
|
|
||||||
/***********************************************************************
|
|
||||||
* Defines/Enums
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define MAKE_ACM_VERSION(mjr, mnr, bld) \
|
|
||||||
(((long)(mjr)<<24) | ((long)(mnr)<<16) | ((long)bld))
|
|
||||||
|
|
||||||
#define ACMDRVOPENDESC_SECTIONNAME_CHARS
|
|
||||||
|
|
||||||
#define ACMDM_DRIVER_NOTIFY (ACMDM_BASE + 1)
|
|
||||||
#define ACMDM_DRIVER_DETAILS (ACMDM_BASE + 10)
|
|
||||||
|
|
||||||
#define ACMDM_HARDWARE_WAVE_CAPS_INPUT (ACMDM_BASE + 20)
|
|
||||||
#define ACMDM_HARDWARE_WAVE_CAPS_OUTPUT (ACMDM_BASE + 21)
|
|
||||||
|
|
||||||
#define ACMDM_FORMATTAG_DETAILS (ACMDM_BASE + 25)
|
|
||||||
#define ACMDM_FORMAT_DETAILS (ACMDM_BASE + 26)
|
|
||||||
#define ACMDM_FORMAT_SUGGEST (ACMDM_BASE + 27)
|
|
||||||
|
|
||||||
#define ACMDM_FILTERTAG_DETAILS (ACMDM_BASE + 50)
|
|
||||||
#define ACMDM_FILTER_DETAILS (ACMDM_BASE + 51)
|
|
||||||
|
|
||||||
#define ACMDM_STREAM_OPEN (ACMDM_BASE + 76)
|
|
||||||
#define ACMDM_STREAM_CLOSE (ACMDM_BASE + 77)
|
|
||||||
#define ACMDM_STREAM_SIZE (ACMDM_BASE + 78)
|
|
||||||
#define ACMDM_STREAM_CONVERT (ACMDM_BASE + 79)
|
|
||||||
#define ACMDM_STREAM_RESET (ACMDM_BASE + 80)
|
|
||||||
#define ACMDM_STREAM_PREPARE (ACMDM_BASE + 81)
|
|
||||||
#define ACMDM_STREAM_UNPREPARE (ACMDM_BASE + 82)
|
|
||||||
#define ACMDM_STREAM_UPDATE (ACMDM_BASE + 83)
|
|
||||||
|
|
||||||
/***********************************************************************
|
|
||||||
* Structures
|
|
||||||
*/
|
|
||||||
|
|
||||||
typedef struct _ACMDRVOPENDESCA
|
|
||||||
{
|
|
||||||
DWORD cbStruct;
|
|
||||||
FOURCC fccType;
|
|
||||||
FOURCC fccComp;
|
|
||||||
DWORD dwVersion;
|
|
||||||
DWORD dwFlags;
|
|
||||||
DWORD dwError;
|
|
||||||
LPCSTR pszSectionName;
|
|
||||||
LPCSTR pszAliasName;
|
|
||||||
DWORD dnDevNode;
|
|
||||||
} ACMDRVOPENDESCA, *PACMDRVOPENDESCA;
|
|
||||||
|
|
||||||
typedef struct _ACMDRVOPENDESCW
|
|
||||||
{
|
|
||||||
DWORD cbStruct;
|
|
||||||
FOURCC fccType;
|
|
||||||
FOURCC fccComp;
|
|
||||||
DWORD dwVersion;
|
|
||||||
DWORD dwFlags;
|
|
||||||
DWORD dwError;
|
|
||||||
LPCWSTR pszSectionName;
|
|
||||||
LPCWSTR pszAliasName;
|
|
||||||
DWORD dnDevNode;
|
|
||||||
} ACMDRVOPENDESCW, *PACMDRVOPENDESCW;
|
|
||||||
|
|
||||||
typedef struct _ACMDRVOPENDESC16
|
|
||||||
{
|
|
||||||
DWORD cbStruct;
|
|
||||||
FOURCC fccType;
|
|
||||||
FOURCC fccComp;
|
|
||||||
DWORD dwVersion;
|
|
||||||
DWORD dwFlags;
|
|
||||||
DWORD dwError;
|
|
||||||
LPCSTR pszSectionName;
|
|
||||||
LPCSTR pszAliasName;
|
|
||||||
DWORD dnDevNode;
|
|
||||||
} ACMDRVOPENDESC16, *NPACMDRVOPENDESC16, *LPACMDRVOPENDESC16;
|
|
||||||
|
|
||||||
typedef struct _ACMDRVSTREAMINSTANCE16
|
|
||||||
{
|
|
||||||
DWORD cbStruct;
|
|
||||||
LPWAVEFORMATEX pwfxSrc;
|
|
||||||
LPWAVEFORMATEX pwfxDst;
|
|
||||||
LPWAVEFILTER pwfltr;
|
|
||||||
DWORD dwCallback;
|
|
||||||
DWORD dwInstance;
|
|
||||||
DWORD fdwOpen;
|
|
||||||
DWORD fdwDriver;
|
|
||||||
DWORD dwDriver;
|
|
||||||
HACMSTREAM16 has;
|
|
||||||
} ACMDRVSTREAMINSTANCE16, *NPACMDRVSTREAMINSTANCE16, *LPACMDRVSTREAMINSTANCE16;
|
|
||||||
|
|
||||||
typedef struct _ACMDRVSTREAMINSTANCE
|
|
||||||
{
|
|
||||||
DWORD cbStruct;
|
|
||||||
PWAVEFORMATEX pwfxSrc;
|
|
||||||
PWAVEFORMATEX pwfxDst;
|
|
||||||
PWAVEFILTER pwfltr;
|
|
||||||
DWORD dwCallback;
|
|
||||||
DWORD dwInstance;
|
|
||||||
DWORD fdwOpen;
|
|
||||||
DWORD fdwDriver;
|
|
||||||
DWORD dwDriver;
|
|
||||||
HACMSTREAM has;
|
|
||||||
} ACMDRVSTREAMINSTANCE, *PACMDRVSTREAMINSTANCE;
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct _ACMDRVSTREAMHEADER16 *LPACMDRVSTREAMHEADER16;
|
|
||||||
typedef struct _ACMDRVSTREAMHEADER16 {
|
|
||||||
DWORD cbStruct;
|
|
||||||
DWORD fdwStatus;
|
|
||||||
DWORD dwUser;
|
|
||||||
LPBYTE pbSrc;
|
|
||||||
DWORD cbSrcLength;
|
|
||||||
DWORD cbSrcLengthUsed;
|
|
||||||
DWORD dwSrcUser;
|
|
||||||
LPBYTE pbDst;
|
|
||||||
DWORD cbDstLength;
|
|
||||||
DWORD cbDstLengthUsed;
|
|
||||||
DWORD dwDstUser;
|
|
||||||
|
|
||||||
DWORD fdwConvert;
|
|
||||||
LPACMDRVSTREAMHEADER16 *padshNext;
|
|
||||||
DWORD fdwDriver;
|
|
||||||
DWORD dwDriver;
|
|
||||||
|
|
||||||
/* Internal fields for ACM */
|
|
||||||
DWORD fdwPrepared;
|
|
||||||
DWORD dwPrepared;
|
|
||||||
LPBYTE pbPreparedSrc;
|
|
||||||
DWORD cbPreparedSrcLength;
|
|
||||||
LPBYTE pbPreparedDst;
|
|
||||||
DWORD cbPreparedDstLength;
|
|
||||||
} ACMDRVSTREAMHEADER16, *NPACMDRVSTREAMHEADER16;
|
|
||||||
|
|
||||||
typedef struct _ACMDRVSTREAMHEADER *PACMDRVSTREAMHEADER;
|
|
||||||
typedef struct _ACMDRVSTREAMHEADER {
|
|
||||||
DWORD cbStruct;
|
|
||||||
DWORD fdwStatus;
|
|
||||||
DWORD dwUser;
|
|
||||||
LPBYTE pbSrc;
|
|
||||||
DWORD cbSrcLength;
|
|
||||||
DWORD cbSrcLengthUsed;
|
|
||||||
DWORD dwSrcUser;
|
|
||||||
LPBYTE pbDst;
|
|
||||||
DWORD cbDstLength;
|
|
||||||
DWORD cbDstLengthUsed;
|
|
||||||
DWORD dwDstUser;
|
|
||||||
|
|
||||||
DWORD fdwConvert;
|
|
||||||
PACMDRVSTREAMHEADER *padshNext;
|
|
||||||
DWORD fdwDriver;
|
|
||||||
DWORD dwDriver;
|
|
||||||
|
|
||||||
/* Internal fields for ACM */
|
|
||||||
DWORD fdwPrepared;
|
|
||||||
DWORD dwPrepared;
|
|
||||||
LPBYTE pbPreparedSrc;
|
|
||||||
DWORD cbPreparedSrcLength;
|
|
||||||
LPBYTE pbPreparedDst;
|
|
||||||
DWORD cbPreparedDstLength;
|
|
||||||
} ACMDRVSTREAMHEADER;
|
|
||||||
|
|
||||||
typedef struct _ACMDRVSTREAMSIZE
|
|
||||||
{
|
|
||||||
DWORD cbStruct;
|
|
||||||
DWORD fdwSize;
|
|
||||||
DWORD cbSrcLength;
|
|
||||||
DWORD cbDstLength;
|
|
||||||
} ACMDRVSTREAMSIZE16, *NPACMDRVSTREAMSIZE16, *LPACMDRVSTREAMSIZE16,
|
|
||||||
ACMDRVSTREAMSIZE, *PACMDRVSTREAMSIZE;
|
|
||||||
|
|
||||||
typedef struct _ACMDRVFORMATSUGGEST16
|
|
||||||
{
|
|
||||||
DWORD cbStruct;
|
|
||||||
DWORD fdwSuggest;
|
|
||||||
LPWAVEFORMATEX pwfxSrc;
|
|
||||||
DWORD cbwfxSrc;
|
|
||||||
LPWAVEFORMATEX pwfxDst;
|
|
||||||
DWORD cbwfxDst;
|
|
||||||
} ACMDRVFORMATSUGGEST16, *NPACMDRVFORMATSUGGEST, *LPACMDRVFORMATSUGGEST;
|
|
||||||
|
|
||||||
typedef struct _ACMDRVFORMATSUGGEST
|
|
||||||
{
|
|
||||||
DWORD cbStruct;
|
|
||||||
DWORD fdwSuggest;
|
|
||||||
PWAVEFORMATEX pwfxSrc;
|
|
||||||
DWORD cbwfxSrc;
|
|
||||||
PWAVEFORMATEX pwfxDst;
|
|
||||||
DWORD cbwfxDst;
|
|
||||||
} ACMDRVFORMATSUGGEST, *PACMDRVFORMATSUGGEST;
|
|
||||||
|
|
||||||
#endif /* __WINE_MSACMDRV_H */
|
|
|
@ -1,101 +0,0 @@
|
||||||
#ifndef __WINE_NTDEF_H
|
|
||||||
#define __WINE_NTDEF_H
|
|
||||||
|
|
||||||
#include "basetsd.h"
|
|
||||||
#include "windef.h"
|
|
||||||
|
|
||||||
#include "pshpack1.h"
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define NTAPI __stdcall
|
|
||||||
|
|
||||||
#ifndef IN
|
|
||||||
#define IN
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef OUT
|
|
||||||
#define OUT
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef OPTIONAL
|
|
||||||
#define OPTIONAL
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef VOID
|
|
||||||
#define VOID void
|
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef LONG NTSTATUS;
|
|
||||||
typedef NTSTATUS *PNTSTATUS;
|
|
||||||
|
|
||||||
typedef short CSHORT;
|
|
||||||
typedef CSHORT *PCSHORT;
|
|
||||||
|
|
||||||
typedef WCHAR * PWCHAR;
|
|
||||||
|
|
||||||
/* NT lowlevel Strings (handled by Rtl* functions in NTDLL)
|
|
||||||
* If they are zero terminated, Length does not include the terminating 0.
|
|
||||||
*/
|
|
||||||
|
|
||||||
typedef struct _STRING {
|
|
||||||
USHORT Length;
|
|
||||||
USHORT MaximumLength;
|
|
||||||
PSTR Buffer;
|
|
||||||
} STRING,*PSTRING,ANSI_STRING,*PANSI_STRING;
|
|
||||||
|
|
||||||
typedef struct _CSTRING {
|
|
||||||
USHORT Length;
|
|
||||||
USHORT MaximumLength;
|
|
||||||
PCSTR Buffer;
|
|
||||||
} CSTRING,*PCSTRING;
|
|
||||||
|
|
||||||
typedef struct _UNICODE_STRING {
|
|
||||||
USHORT Length; /* bytes */
|
|
||||||
USHORT MaximumLength; /* bytes */
|
|
||||||
PWSTR Buffer;
|
|
||||||
} UNICODE_STRING,*PUNICODE_STRING;
|
|
||||||
|
|
||||||
/*
|
|
||||||
Objects
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define OBJ_INHERIT 0x00000002L
|
|
||||||
#define OBJ_PERMANENT 0x00000010L
|
|
||||||
#define OBJ_EXCLUSIVE 0x00000020L
|
|
||||||
#define OBJ_CASE_INSENSITIVE 0x00000040L
|
|
||||||
#define OBJ_OPENIF 0x00000080L
|
|
||||||
#define OBJ_OPENLINK 0x00000100L
|
|
||||||
#define OBJ_KERNEL_HANDLE 0x00000200L
|
|
||||||
#define OBJ_VALID_ATTRIBUTES 0x000003F2L
|
|
||||||
|
|
||||||
typedef struct _OBJECT_ATTRIBUTES
|
|
||||||
{ ULONG Length;
|
|
||||||
HANDLE RootDirectory;
|
|
||||||
PUNICODE_STRING ObjectName;
|
|
||||||
ULONG Attributes;
|
|
||||||
PVOID SecurityDescriptor; /* type SECURITY_DESCRIPTOR */
|
|
||||||
PVOID SecurityQualityOfService; /* type SECURITY_QUALITY_OF_SERVICE */
|
|
||||||
} OBJECT_ATTRIBUTES;
|
|
||||||
|
|
||||||
typedef OBJECT_ATTRIBUTES *POBJECT_ATTRIBUTES;
|
|
||||||
|
|
||||||
#define InitializeObjectAttributes(p,n,a,r,s) \
|
|
||||||
{ (p)->Length = sizeof(OBJECT_ATTRIBUTES); \
|
|
||||||
(p)->RootDirectory = r; \
|
|
||||||
(p)->Attributes = a; \
|
|
||||||
(p)->ObjectName = n; \
|
|
||||||
(p)->SecurityDescriptor = s; \
|
|
||||||
(p)->SecurityQualityOfService = NULL; \
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "poppack.h"
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -1,81 +0,0 @@
|
||||||
#ifndef __WINE_PE_IMAGE_H
|
|
||||||
#define __WINE_PE_IMAGE_H
|
|
||||||
|
|
||||||
#include "windef.h"
|
|
||||||
#include "winbase.h"
|
|
||||||
|
|
||||||
#define PE_HEADER(module) \
|
|
||||||
((IMAGE_NT_HEADERS*)((LPBYTE)(module) + \
|
|
||||||
(((IMAGE_DOS_HEADER*)(module))->e_lfanew)))
|
|
||||||
|
|
||||||
#define PE_SECTIONS(module) \
|
|
||||||
((IMAGE_SECTION_HEADER*)((LPBYTE)&PE_HEADER(module)->OptionalHeader + \
|
|
||||||
PE_HEADER(module)->FileHeader.SizeOfOptionalHeader))
|
|
||||||
|
|
||||||
#define RVA_PTR(module,field) ((LPBYTE)(module) + PE_HEADER(module)->field)
|
|
||||||
|
|
||||||
/* modreference used for attached processes
|
|
||||||
* all section are calculated here, relocations etc.
|
|
||||||
*/
|
|
||||||
typedef struct {
|
|
||||||
PIMAGE_IMPORT_DESCRIPTOR pe_import;
|
|
||||||
PIMAGE_EXPORT_DIRECTORY pe_export;
|
|
||||||
PIMAGE_RESOURCE_DIRECTORY pe_resource;
|
|
||||||
int tlsindex;
|
|
||||||
} PE_MODREF;
|
|
||||||
|
|
||||||
struct _wine_modref;
|
|
||||||
extern int PE_unloadImage(HMODULE hModule);
|
|
||||||
extern FARPROC PE_FindExportedFunction(struct _wine_modref *wm, LPCSTR funcName, WIN_BOOL snoop);
|
|
||||||
extern WIN_BOOL PE_EnumResourceTypesA(HMODULE,ENUMRESTYPEPROCA,LONG);
|
|
||||||
extern WIN_BOOL PE_EnumResourceTypesW(HMODULE,ENUMRESTYPEPROCW,LONG);
|
|
||||||
extern WIN_BOOL PE_EnumResourceNamesA(HMODULE,LPCSTR,ENUMRESNAMEPROCA,LONG);
|
|
||||||
extern WIN_BOOL PE_EnumResourceNamesW(HMODULE,LPCWSTR,ENUMRESNAMEPROCW,LONG);
|
|
||||||
extern WIN_BOOL PE_EnumResourceLanguagesA(HMODULE,LPCSTR,LPCSTR,ENUMRESLANGPROCA,LONG);
|
|
||||||
extern WIN_BOOL PE_EnumResourceLanguagesW(HMODULE,LPCWSTR,LPCWSTR,ENUMRESLANGPROCW,LONG);
|
|
||||||
extern HRSRC PE_FindResourceExW(struct _wine_modref*,LPCWSTR,LPCWSTR,WORD);
|
|
||||||
extern DWORD PE_SizeofResource(HMODULE,HRSRC);
|
|
||||||
extern struct _wine_modref *PE_LoadLibraryExA(LPCSTR, DWORD);
|
|
||||||
extern void PE_UnloadLibrary(struct _wine_modref *);
|
|
||||||
extern HGLOBAL PE_LoadResource(struct _wine_modref *wm,HRSRC);
|
|
||||||
extern HMODULE PE_LoadImage( int hFile, LPCSTR filename, WORD *version );
|
|
||||||
extern struct _wine_modref *PE_CreateModule( HMODULE hModule, LPCSTR filename,
|
|
||||||
DWORD flags, WIN_BOOL builtin );
|
|
||||||
extern WIN_BOOL PE_CreateProcess( HANDLE hFile, LPCSTR filename, LPCSTR cmd_line, LPCSTR env,
|
|
||||||
LPSECURITY_ATTRIBUTES psa, LPSECURITY_ATTRIBUTES tsa,
|
|
||||||
WIN_BOOL inherit, DWORD flags, LPSTARTUPINFOA startup,
|
|
||||||
LPPROCESS_INFORMATION info );
|
|
||||||
|
|
||||||
extern void PE_InitTls(void);
|
|
||||||
extern WIN_BOOL PE_InitDLL(struct _wine_modref *wm, DWORD type, LPVOID lpReserved);
|
|
||||||
|
|
||||||
extern PIMAGE_RESOURCE_DIRECTORY GetResDirEntryA(PIMAGE_RESOURCE_DIRECTORY,LPCSTR,DWORD,WIN_BOOL);
|
|
||||||
extern PIMAGE_RESOURCE_DIRECTORY GetResDirEntryW(PIMAGE_RESOURCE_DIRECTORY,LPCWSTR,DWORD,WIN_BOOL);
|
|
||||||
|
|
||||||
typedef DWORD CALLBACK (*DLLENTRYPROC)(HMODULE,DWORD,LPVOID);
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
WORD popl WINE_PACKED; /* 0x8f 0x05 */
|
|
||||||
DWORD addr_popped WINE_PACKED;/* ... */
|
|
||||||
BYTE pushl1 WINE_PACKED; /* 0x68 */
|
|
||||||
DWORD newret WINE_PACKED; /* ... */
|
|
||||||
BYTE pushl2 WINE_PACKED; /* 0x68 */
|
|
||||||
DWORD origfun WINE_PACKED; /* original function */
|
|
||||||
BYTE ret1 WINE_PACKED; /* 0xc3 */
|
|
||||||
WORD addesp WINE_PACKED; /* 0x83 0xc4 */
|
|
||||||
BYTE nrofargs WINE_PACKED; /* nr of arguments to add esp, */
|
|
||||||
BYTE pushl3 WINE_PACKED; /* 0x68 */
|
|
||||||
DWORD oldret WINE_PACKED; /* Filled out from popl above */
|
|
||||||
BYTE ret2 WINE_PACKED; /* 0xc3 */
|
|
||||||
} ELF_STDCALL_STUB;
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
void* dlhandle;
|
|
||||||
ELF_STDCALL_STUB *stubs;
|
|
||||||
} ELF_MODREF;
|
|
||||||
|
|
||||||
extern struct _wine_modref *ELF_LoadLibraryExA( LPCSTR libname, DWORD flags);
|
|
||||||
extern void ELF_UnloadLibrary(struct _wine_modref *);
|
|
||||||
extern FARPROC ELF_FindExportedFunction(struct _wine_modref *wm, LPCSTR funcName);
|
|
||||||
|
|
||||||
#endif /* __WINE_PE_IMAGE_H */
|
|
|
@ -1,15 +0,0 @@
|
||||||
#ifdef __WINE_PSHPACK_H
|
|
||||||
#undef __WINE_PSHPACK_H
|
|
||||||
|
|
||||||
#if defined(__GNUC__) || defined(__SUNPRO_C)
|
|
||||||
#pragma pack()
|
|
||||||
#elif defined(__SUNPRO_CC)
|
|
||||||
#warning "Assumes default alignment is 4"
|
|
||||||
#pragma pack(4)
|
|
||||||
#elif !defined(RC_INVOKED)
|
|
||||||
#error "Restoration of the previous alignment isn't supported by the compiler"
|
|
||||||
#endif /* defined(__GNUC__) || defined(__SUNPRO_C) ; !defined(RC_INVOKED) */
|
|
||||||
|
|
||||||
#else /* defined(__WINE_PSHPACK_H) */
|
|
||||||
#error "Popping alignment isn't possible since no alignment has been pushed"
|
|
||||||
#endif /* defined(__WINE_PSHPACK_H) */
|
|
|
@ -1,13 +0,0 @@
|
||||||
#ifndef __WINE_PSHPACK_H
|
|
||||||
#define __WINE_PSHPACK_H 1
|
|
||||||
|
|
||||||
#if defined(__GNUC__) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
|
|
||||||
#pragma pack(1)
|
|
||||||
#elif !defined(RC_INVOKED)
|
|
||||||
#error "1 as alignment isn't supported by the compiler"
|
|
||||||
#endif /* defined(__GNUC__) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) ; !defined(RC_INVOKED) */
|
|
||||||
|
|
||||||
#else /* !defined(__WINE_PSHPACK_H) */
|
|
||||||
#error "Nested pushing of alignment isn't supported by the compiler"
|
|
||||||
#endif /* !defined(__WINE_PSHPACK_H) */
|
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
#ifndef __WINE_PSHPACK_H
|
|
||||||
#define __WINE_PSHPACK_H 2
|
|
||||||
|
|
||||||
#if defined(__GNUC__) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
|
|
||||||
#pragma pack(2)
|
|
||||||
#elif !defined(RC_INVOKED)
|
|
||||||
#error "2 as alignment isn't supported by the compiler"
|
|
||||||
#endif /* defined(__GNUC__) || defined(__SUNPRO_CC) ; !defined(RC_INVOKED) */
|
|
||||||
|
|
||||||
#else /* !defined(__WINE_PSHPACK_H) */
|
|
||||||
#error "Nested pushing of alignment isn't supported by the compiler"
|
|
||||||
#endif /* !defined(__WINE_PSHPACK_H) */
|
|
|
@ -1,15 +0,0 @@
|
||||||
#ifndef __WINE_PSHPACK_H
|
|
||||||
#define __WINE_PSHPACK_H 4
|
|
||||||
|
|
||||||
#if defined(__GNUC__) || defined(__SUNPRO_CC)
|
|
||||||
#pragma pack(4)
|
|
||||||
#elif defined(__SUNPRO_C)
|
|
||||||
#pragma pack()
|
|
||||||
#elif !defined(RC_INVOKED)
|
|
||||||
#error "4 as alignment isn't supported by the compiler"
|
|
||||||
#endif /* defined(__GNUC__) || defined(__SUNPRO_CC) ; !defined(RC_INVOKED) */
|
|
||||||
|
|
||||||
#else /* !defined(__WINE_PSHPACK_H) */
|
|
||||||
#error "Nested pushing of alignment isn't supported by the compiler"
|
|
||||||
#endif /* !defined(__WINE_PSHPACK_H) */
|
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
#ifndef __WINE_PSHPACK_H
|
|
||||||
#define __WINE_PSHPACK_H 8
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
#pragma pack(8)
|
|
||||||
#elif !defined(RC_INVOKED)
|
|
||||||
#error "8 as alignment is not supported"
|
|
||||||
#endif /* 0 ; !defined(RC_INVOKED) */
|
|
||||||
|
|
||||||
#else /* !defined(__WINE_PSHPACK_H) */
|
|
||||||
#error "Nested pushing of alignment isn't supported by the compiler"
|
|
||||||
#endif /* !defined(__WINE_PSHPACK_H) */
|
|
|
@ -1,654 +0,0 @@
|
||||||
#ifndef __WINE_VFW_H
|
|
||||||
#define __WINE_VFW_H
|
|
||||||
#include "pshpack1.h"
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
#ifndef __WINE_WINGDI_H
|
|
||||||
|
|
||||||
typedef struct
|
|
||||||
{
|
|
||||||
short bfType;
|
|
||||||
long bfSize;
|
|
||||||
short bfReserved1;
|
|
||||||
short bfReserved2;
|
|
||||||
long bfOffBits;
|
|
||||||
} BITMAPFILEHEADER;
|
|
||||||
|
|
||||||
typedef struct
|
|
||||||
{
|
|
||||||
long biSize;
|
|
||||||
long biWidth;
|
|
||||||
long biHeight;
|
|
||||||
short biPlanes;
|
|
||||||
short biBitCount;
|
|
||||||
long biCompression;
|
|
||||||
long biSizeImage;
|
|
||||||
long biXPelsPerMeter;
|
|
||||||
long biYPelsPerMeter;
|
|
||||||
long biClrUsed;
|
|
||||||
long biClrImportant;
|
|
||||||
} BITMAPINFOHEADER, *PBITMAPINFOHEADER, *LPBITMAPINFOHEADER;
|
|
||||||
typedef struct {
|
|
||||||
BITMAPINFOHEADER bmiHeader;
|
|
||||||
int bmiColors[1];
|
|
||||||
} BITMAPINFO, *LPBITMAPINFO;
|
|
||||||
#endif
|
|
||||||
#define VFWAPI
|
|
||||||
#define VFWAPIV
|
|
||||||
#ifndef __WINE_WINDEF_H
|
|
||||||
typedef long (__stdcall__ *DRIVERPROC)(long,HDRVR,unsigned int,long,long);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef mmioFOURCC
|
|
||||||
#define mmioFOURCC( ch0, ch1, ch2, ch3 ) \
|
|
||||||
( (long)(unsigned char)(ch0) | ( (long)(unsigned char)(ch1) << 8 ) | \
|
|
||||||
( (long)(unsigned char)(ch2) << 16 ) | ( (long)(unsigned char)(ch3) << 24 ) )
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef aviTWOCC
|
|
||||||
#define aviTWOCC(ch0, ch1) ((short)(unsigned char)(ch0) | ((short)(unsigned char)(ch1) << 8))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define ICTYPE_VIDEO mmioFOURCC('v', 'i', 'd', 'c')
|
|
||||||
#define ICTYPE_AUDIO mmioFOURCC('a', 'u', 'd', 'c')
|
|
||||||
|
|
||||||
|
|
||||||
/* Installable Compressor M? */
|
|
||||||
|
|
||||||
/* HIC struct (same layout as Win95 one) */
|
|
||||||
typedef struct tagWINE_HIC {
|
|
||||||
long magic; /* 00: 'Smag' */
|
|
||||||
HANDLE curthread; /* 04: */
|
|
||||||
long type; /* 08: */
|
|
||||||
long handler; /* 0C: */
|
|
||||||
HDRVR hdrv; /* 10: */
|
|
||||||
#ifndef __cplusplus
|
|
||||||
long private; /* 14:(handled by SendDriverMessage)*/
|
|
||||||
#else
|
|
||||||
long _private; /* 14:(handled by SendDriverMessage)*/
|
|
||||||
#endif
|
|
||||||
DRIVERPROC driverproc; /* 18:(handled by SendDriverMessage)*/
|
|
||||||
long x1; /* 1c: name? */
|
|
||||||
short x2; /* 20: */
|
|
||||||
long x3; /* 22: */
|
|
||||||
/* 26: */
|
|
||||||
} WINE_HIC;
|
|
||||||
|
|
||||||
/* error return codes */
|
|
||||||
#define ICERR_OK 0
|
|
||||||
#define ICERR_DONTDRAW 1
|
|
||||||
#define ICERR_NEWPALETTE 2
|
|
||||||
#define ICERR_GOTOKEYFRAME 3
|
|
||||||
#define ICERR_STOPDRAWING 4
|
|
||||||
|
|
||||||
#define ICERR_UNSUPPORTED -1
|
|
||||||
#define ICERR_BADFORMAT -2
|
|
||||||
#define ICERR_MEMORY -3
|
|
||||||
#define ICERR_INTERNAL -4
|
|
||||||
#define ICERR_BADFLAGS -5
|
|
||||||
#define ICERR_BADPARAM -6
|
|
||||||
#define ICERR_BADSIZE -7
|
|
||||||
#define ICERR_BADHANDLE -8
|
|
||||||
#define ICERR_CANTUPDATE -9
|
|
||||||
#define ICERR_ABORT -10
|
|
||||||
#define ICERR_ERROR -100
|
|
||||||
#define ICERR_BADBITDEPTH -200
|
|
||||||
#define ICERR_BADIMAGESIZE -201
|
|
||||||
|
|
||||||
#define ICERR_CUSTOM -400
|
|
||||||
|
|
||||||
/* ICM Messages */
|
|
||||||
#define ICM_USER (DRV_USER+0x0000)
|
|
||||||
|
|
||||||
/* ICM driver message range */
|
|
||||||
#define ICM_RESERVED_LOW (DRV_USER+0x1000)
|
|
||||||
#define ICM_RESERVED_HIGH (DRV_USER+0x2000)
|
|
||||||
#define ICM_RESERVED ICM_RESERVED_LOW
|
|
||||||
|
|
||||||
#define ICM_GETSTATE (ICM_RESERVED+0)
|
|
||||||
#define ICM_SETSTATE (ICM_RESERVED+1)
|
|
||||||
#define ICM_GETINFO (ICM_RESERVED+2)
|
|
||||||
|
|
||||||
#define ICM_CONFIGURE (ICM_RESERVED+10)
|
|
||||||
#define ICM_ABOUT (ICM_RESERVED+11)
|
|
||||||
/* */
|
|
||||||
|
|
||||||
#define ICM_GETDEFAULTQUALITY (ICM_RESERVED+30)
|
|
||||||
#define ICM_GETQUALITY (ICM_RESERVED+31)
|
|
||||||
#define ICM_SETQUALITY (ICM_RESERVED+32)
|
|
||||||
|
|
||||||
#define ICM_SET (ICM_RESERVED+40)
|
|
||||||
#define ICM_GET (ICM_RESERVED+41)
|
|
||||||
|
|
||||||
/* 2 constant FOURCC codes */
|
|
||||||
#define ICM_FRAMERATE mmioFOURCC('F','r','m','R')
|
|
||||||
#define ICM_KEYFRAMERATE mmioFOURCC('K','e','y','R')
|
|
||||||
|
|
||||||
#define ICM_COMPRESS_GET_FORMAT (ICM_USER+4)
|
|
||||||
#define ICM_COMPRESS_GET_SIZE (ICM_USER+5)
|
|
||||||
#define ICM_COMPRESS_QUERY (ICM_USER+6)
|
|
||||||
#define ICM_COMPRESS_BEGIN (ICM_USER+7)
|
|
||||||
#define ICM_COMPRESS (ICM_USER+8)
|
|
||||||
#define ICM_COMPRESS_END (ICM_USER+9)
|
|
||||||
|
|
||||||
#define ICM_DECOMPRESS_GET_FORMAT (ICM_USER+10)
|
|
||||||
#define ICM_DECOMPRESS_QUERY (ICM_USER+11)
|
|
||||||
#define ICM_DECOMPRESS_BEGIN (ICM_USER+12)
|
|
||||||
#define ICM_DECOMPRESS (ICM_USER+13)
|
|
||||||
#define ICM_DECOMPRESS_END (ICM_USER+14)
|
|
||||||
#define ICM_DECOMPRESS_SET_PALETTE (ICM_USER+29)
|
|
||||||
#define ICM_DECOMPRESS_GET_PALETTE (ICM_USER+30)
|
|
||||||
|
|
||||||
#define ICM_DRAW_QUERY (ICM_USER+31)
|
|
||||||
#define ICM_DRAW_BEGIN (ICM_USER+15)
|
|
||||||
#define ICM_DRAW_GET_PALETTE (ICM_USER+16)
|
|
||||||
#define ICM_DRAW_START (ICM_USER+18)
|
|
||||||
#define ICM_DRAW_STOP (ICM_USER+19)
|
|
||||||
#define ICM_DRAW_END (ICM_USER+21)
|
|
||||||
#define ICM_DRAW_GETTIME (ICM_USER+32)
|
|
||||||
#define ICM_DRAW (ICM_USER+33)
|
|
||||||
#define ICM_DRAW_WINDOW (ICM_USER+34)
|
|
||||||
#define ICM_DRAW_SETTIME (ICM_USER+35)
|
|
||||||
#define ICM_DRAW_REALIZE (ICM_USER+36)
|
|
||||||
#define ICM_DRAW_FLUSH (ICM_USER+37)
|
|
||||||
#define ICM_DRAW_RENDERBUFFER (ICM_USER+38)
|
|
||||||
|
|
||||||
#define ICM_DRAW_START_PLAY (ICM_USER+39)
|
|
||||||
#define ICM_DRAW_STOP_PLAY (ICM_USER+40)
|
|
||||||
|
|
||||||
#define ICM_DRAW_SUGGESTFORMAT (ICM_USER+50)
|
|
||||||
#define ICM_DRAW_CHANGEPALETTE (ICM_USER+51)
|
|
||||||
|
|
||||||
#define ICM_GETBUFFERSWANTED (ICM_USER+41)
|
|
||||||
|
|
||||||
#define ICM_GETDEFAULTKEYFRAMERATE (ICM_USER+42)
|
|
||||||
|
|
||||||
#define ICM_DECOMPRESSEX_BEGIN (ICM_USER+60)
|
|
||||||
#define ICM_DECOMPRESSEX_QUERY (ICM_USER+61)
|
|
||||||
#define ICM_DECOMPRESSEX (ICM_USER+62)
|
|
||||||
#define ICM_DECOMPRESSEX_END (ICM_USER+63)
|
|
||||||
|
|
||||||
#define ICM_COMPRESS_FRAMES_INFO (ICM_USER+70)
|
|
||||||
#define ICM_SET_STATUS_PROC (ICM_USER+72)
|
|
||||||
|
|
||||||
/* structs */
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
long dwSize; /* 00: size */
|
|
||||||
long fccType; /* 04: type 'vidc' usually */
|
|
||||||
long fccHandler; /* 08: */
|
|
||||||
long dwVersion; /* 0c: version of compman opening you */
|
|
||||||
long dwFlags; /* 10: LOshort is type specific */
|
|
||||||
LRESULT dwError; /* 14: */
|
|
||||||
void* pV1Reserved; /* 18: */
|
|
||||||
void* pV2Reserved; /* 1c: */
|
|
||||||
long dnDevNode; /* 20: */
|
|
||||||
/* 24: */
|
|
||||||
} ICOPEN,*LPICOPEN;
|
|
||||||
|
|
||||||
#define ICCOMPRESS_KEYFRAME 0x00000001L
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
long dwFlags;
|
|
||||||
LPBITMAPINFOHEADER lpbiOutput;
|
|
||||||
void* lpOutput;
|
|
||||||
LPBITMAPINFOHEADER lpbiInput;
|
|
||||||
void* lpInput;
|
|
||||||
long* lpckid;
|
|
||||||
long* lpdwFlags;
|
|
||||||
long lFrameNum;
|
|
||||||
long dwFrameSize;
|
|
||||||
long dwQuality;
|
|
||||||
LPBITMAPINFOHEADER lpbiPrev;
|
|
||||||
void* lpPrev;
|
|
||||||
} ICCOMPRESS;
|
|
||||||
|
|
||||||
long VFWAPIV ICCompress(
|
|
||||||
HIC hic,long dwFlags,LPBITMAPINFOHEADER lpbiOutput,void* lpData,
|
|
||||||
LPBITMAPINFOHEADER lpbiInput,void* lpBits,long* lpckid,
|
|
||||||
long* lpdwFlags,long lFrameNum,long dwFrameSize,long dwQuality,
|
|
||||||
LPBITMAPINFOHEADER lpbiPrev,void* lpPrev
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
#define ICCompressGetFormat(hic, lpbiInput, lpbiOutput) \
|
|
||||||
ICSendMessage( \
|
|
||||||
hic,ICM_COMPRESS_GET_FORMAT,(long)(void*)(lpbiInput), \
|
|
||||||
(long)(void*)(lpbiOutput) \
|
|
||||||
)
|
|
||||||
|
|
||||||
#define ICCompressGetFormatSize(hic,lpbi) ICCompressGetFormat(hic,lpbi,NULL)
|
|
||||||
|
|
||||||
#define ICGetDefaultKeyFrameRate(hic,lpint) \
|
|
||||||
ICSendMessage( \
|
|
||||||
hic, ICM_GETDEFAULTKEYFRAMERATE, \
|
|
||||||
(long)(void*)(lpint), \
|
|
||||||
0 )
|
|
||||||
|
|
||||||
#define ICGetDefaultQuality(hic,lpint) \
|
|
||||||
ICSendMessage( \
|
|
||||||
hic, ICM_GETDEFAULTQUALITY, \
|
|
||||||
(long)(void*)(lpint), \
|
|
||||||
0 )
|
|
||||||
|
|
||||||
|
|
||||||
#define ICCompressBegin(hic, lpbiInput, lpbiOutput) \
|
|
||||||
ICSendMessage( \
|
|
||||||
hic, ICM_COMPRESS_BEGIN, (long)(void*)(lpbiInput), \
|
|
||||||
(long)(void*)(lpbiOutput) \
|
|
||||||
)
|
|
||||||
|
|
||||||
#define ICCompressGetSize(hic, lpbiInput, lpbiOutput) \
|
|
||||||
ICSendMessage( \
|
|
||||||
hic, ICM_COMPRESS_GET_SIZE, (long)(void*)(lpbiInput), \
|
|
||||||
(long)(void*)(lpbiOutput) \
|
|
||||||
)
|
|
||||||
|
|
||||||
#define ICCompressQuery(hic, lpbiInput, lpbiOutput) \
|
|
||||||
ICSendMessage( \
|
|
||||||
hic, ICM_COMPRESS_QUERY, (long)(void*)(lpbiInput), \
|
|
||||||
(long)(void*)(lpbiOutput) \
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
#define ICCompressEnd(hic) ICSendMessage(hic, ICM_COMPRESS_END, 0, 0)
|
|
||||||
|
|
||||||
/* ICCOMPRESSFRAMES.dwFlags */
|
|
||||||
#define ICCOMPRESSFRAMES_PADDING 0x00000001
|
|
||||||
typedef struct {
|
|
||||||
long dwFlags;
|
|
||||||
LPBITMAPINFOHEADER lpbiOutput;
|
|
||||||
LPARAM lOutput;
|
|
||||||
LPBITMAPINFOHEADER lpbiInput;
|
|
||||||
LPARAM lInput;
|
|
||||||
long lStartFrame;
|
|
||||||
long lFrameCount;
|
|
||||||
long lQuality;
|
|
||||||
long lDataRate;
|
|
||||||
long lKeyRate;
|
|
||||||
long dwRate;
|
|
||||||
long dwScale;
|
|
||||||
long dwOverheadPerFrame;
|
|
||||||
long dwReserved2;
|
|
||||||
long CALLBACK (*GetData)(LPARAM lInput,long lFrame,void* lpBits,long len);
|
|
||||||
long CALLBACK (*PutData)(LPARAM lOutput,long lFrame,void* lpBits,long len);
|
|
||||||
} ICCOMPRESSFRAMES;
|
|
||||||
|
|
||||||
/* Values for wMode of ICOpen() */
|
|
||||||
#define ICMODE_COMPRESS 1
|
|
||||||
#define ICMODE_DECOMPRESS 2
|
|
||||||
#define ICMODE_FASTDECOMPRESS 3
|
|
||||||
#define ICMODE_QUERY 4
|
|
||||||
#define ICMODE_FASTCOMPRESS 5
|
|
||||||
#define ICMODE_DRAW 8
|
|
||||||
|
|
||||||
/* quality flags */
|
|
||||||
#define ICQUALITY_LOW 0
|
|
||||||
#define ICQUALITY_HIGH 10000
|
|
||||||
#define ICQUALITY_DEFAULT -1
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
long dwSize; /* 00: */
|
|
||||||
long fccType; /* 04:compressor type 'vidc' 'audc' */
|
|
||||||
long fccHandler; /* 08:compressor sub-type 'rle ' 'jpeg' 'pcm '*/
|
|
||||||
long dwFlags; /* 0c:flags LOshort is type specific */
|
|
||||||
long dwVersion; /* 10:version of the driver */
|
|
||||||
long dwVersionICM; /* 14:version of the ICM used */
|
|
||||||
/*
|
|
||||||
* under Win32, the driver always returns UNICODE strings.
|
|
||||||
*/
|
|
||||||
WCHAR szName[16]; /* 18:short name */
|
|
||||||
WCHAR szDescription[128]; /* 38:long name */
|
|
||||||
WCHAR szDriver[128]; /* 138:driver that contains compressor*/
|
|
||||||
/* 238: */
|
|
||||||
} ICINFO;
|
|
||||||
|
|
||||||
/* ICINFO.dwFlags */
|
|
||||||
#define VIDCF_QUALITY 0x0001 /* supports quality */
|
|
||||||
#define VIDCF_CRUNCH 0x0002 /* supports crunching to a frame size */
|
|
||||||
#define VIDCF_TEMPORAL 0x0004 /* supports inter-frame compress */
|
|
||||||
#define VIDCF_COMPRESSFRAMES 0x0008 /* wants the compress all frames message */
|
|
||||||
#define VIDCF_DRAW 0x0010 /* supports drawing */
|
|
||||||
#define VIDCF_FASTTEMPORALC 0x0020 /* does not need prev frame on compress */
|
|
||||||
#define VIDCF_FASTTEMPORALD 0x0080 /* does not need prev frame on decompress */
|
|
||||||
#define VIDCF_QUALITYTIME 0x0040 /* supports temporal quality */
|
|
||||||
|
|
||||||
#define VIDCF_FASTTEMPORAL (VIDCF_FASTTEMPORALC|VIDCF_FASTTEMPORALD)
|
|
||||||
|
|
||||||
|
|
||||||
/* function shortcuts */
|
|
||||||
/* ICM_ABOUT */
|
|
||||||
#define ICMF_ABOUT_QUERY 0x00000001
|
|
||||||
|
|
||||||
#define ICQueryAbout(hic) \
|
|
||||||
(ICSendMessage(hic,ICM_ABOUT,(long)-1,ICMF_ABOUT_QUERY)==ICERR_OK)
|
|
||||||
|
|
||||||
#define ICAbout(hic, hwnd) ICSendMessage(hic,ICM_ABOUT,(long)(unsigned int)(hwnd),0)
|
|
||||||
|
|
||||||
/* ICM_CONFIGURE */
|
|
||||||
#define ICMF_CONFIGURE_QUERY 0x00000001
|
|
||||||
#define ICQueryConfigure(hic) \
|
|
||||||
(ICSendMessage(hic,ICM_CONFIGURE,(long)-1,ICMF_CONFIGURE_QUERY)==ICERR_OK)
|
|
||||||
|
|
||||||
#define ICConfigure(hic,hwnd) \
|
|
||||||
ICSendMessage(hic,ICM_CONFIGURE,(long)(unsigned int)(hwnd),0)
|
|
||||||
|
|
||||||
/* Decompression stuff */
|
|
||||||
#define ICDECOMPRESS_HURRYUP 0x80000000 /* don't draw just buffer (hurry up!) */
|
|
||||||
#define ICDECOMPRESS_UPDATE 0x40000000 /* don't draw just update screen */
|
|
||||||
#define ICDECOMPRESS_PREROL 0x20000000 /* this frame is before real start */
|
|
||||||
#define ICDECOMPRESS_NULLFRAME 0x10000000 /* repeat last frame */
|
|
||||||
#define ICDECOMPRESS_NOTKEYFRAME 0x08000000 /* this frame is not a key frame */
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
long dwFlags; /* flags (from AVI index...) */
|
|
||||||
LPBITMAPINFOHEADER lpbiInput; /* BITMAPINFO of compressed data */
|
|
||||||
void* lpInput; /* compressed data */
|
|
||||||
LPBITMAPINFOHEADER lpbiOutput; /* DIB to decompress to */
|
|
||||||
void* lpOutput;
|
|
||||||
long ckid; /* ckid from AVI file */
|
|
||||||
} ICDECOMPRESS;
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
long dwFlags;
|
|
||||||
LPBITMAPINFOHEADER lpbiSrc;
|
|
||||||
void* lpSrc;
|
|
||||||
LPBITMAPINFOHEADER lpbiDst;
|
|
||||||
void* lpDst;
|
|
||||||
|
|
||||||
/* changed for ICM_DECOMPRESSEX */
|
|
||||||
INT xDst; /* destination rectangle */
|
|
||||||
INT yDst;
|
|
||||||
INT dxDst;
|
|
||||||
INT dyDst;
|
|
||||||
|
|
||||||
INT xSrc; /* source rectangle */
|
|
||||||
INT ySrc;
|
|
||||||
INT dxSrc;
|
|
||||||
INT dySrc;
|
|
||||||
} ICDECOMPRESSEX;
|
|
||||||
|
|
||||||
|
|
||||||
long VFWAPIV ICDecompress(HIC hic,long dwFlags,LPBITMAPINFOHEADER lpbiFormat,void* lpData,LPBITMAPINFOHEADER lpbi,void* lpBits);
|
|
||||||
|
|
||||||
|
|
||||||
#define ICDecompressBegin(hic, lpbiInput, lpbiOutput) \
|
|
||||||
ICSendMessage( \
|
|
||||||
hic, ICM_DECOMPRESS_BEGIN, (long)(void*)(lpbiInput), \
|
|
||||||
(long)(void*)(lpbiOutput) \
|
|
||||||
)
|
|
||||||
|
|
||||||
#define ICDecompressQuery(hic, lpbiInput, lpbiOutput) \
|
|
||||||
ICSendMessage( \
|
|
||||||
hic,ICM_DECOMPRESS_QUERY, (long)(void*)(lpbiInput), \
|
|
||||||
(long) (void*)(lpbiOutput) \
|
|
||||||
)
|
|
||||||
|
|
||||||
#define ICDecompressGetFormat(hic, lpbiInput, lpbiOutput) \
|
|
||||||
((long)ICSendMessage( \
|
|
||||||
hic,ICM_DECOMPRESS_GET_FORMAT, (long)(void*)(lpbiInput), \
|
|
||||||
(long)(void*)(lpbiOutput) \
|
|
||||||
))
|
|
||||||
|
|
||||||
#define ICDecompressGetFormatSize(hic, lpbi) \
|
|
||||||
ICDecompressGetFormat(hic, lpbi, NULL)
|
|
||||||
|
|
||||||
#define ICDecompressGetPalette(hic, lpbiInput, lpbiOutput) \
|
|
||||||
ICSendMessage( \
|
|
||||||
hic, ICM_DECOMPRESS_GET_PALETTE, (long)(void*)(lpbiInput), \
|
|
||||||
(long)(void*)(lpbiOutput) \
|
|
||||||
)
|
|
||||||
|
|
||||||
#define ICDecompressSetPalette(hic,lpbiPalette) \
|
|
||||||
ICSendMessage( \
|
|
||||||
hic,ICM_DECOMPRESS_SET_PALETTE, \
|
|
||||||
(long)(void*)(lpbiPalette),0 \
|
|
||||||
)
|
|
||||||
|
|
||||||
#define ICDecompressEnd(hic) ICSendMessage(hic, ICM_DECOMPRESS_END, 0, 0)
|
|
||||||
|
|
||||||
|
|
||||||
#define ICDRAW_QUERY 0x00000001L /* test for support */
|
|
||||||
#define ICDRAW_FULLSCREEN 0x00000002L /* draw to full screen */
|
|
||||||
#define ICDRAW_HDC 0x00000004L /* draw to a HDC/HWND */
|
|
||||||
|
|
||||||
|
|
||||||
WIN_BOOL VFWAPI ICInfo(long fccType, long fccHandler, ICINFO * lpicinfo);
|
|
||||||
LRESULT VFWAPI ICGetInfo(HIC hic,ICINFO *picinfo, long cb);
|
|
||||||
HIC VFWAPI ICOpen(long fccType, long fccHandler, UINT wMode);
|
|
||||||
HIC VFWAPI ICOpenFunction(long fccType, long fccHandler, unsigned int wMode, void* lpfnHandler);
|
|
||||||
|
|
||||||
LRESULT VFWAPI ICClose(HIC hic);
|
|
||||||
LRESULT VFWAPI ICSendMessage(HIC hic, unsigned int msg, long dw1, long dw2);
|
|
||||||
HIC VFWAPI ICLocate(long fccType, long fccHandler, LPBITMAPINFOHEADER lpbiIn, LPBITMAPINFOHEADER lpbiOut, short wFlags);
|
|
||||||
|
|
||||||
int VFWAPI ICDoSomething();
|
|
||||||
|
|
||||||
long VFWAPIV ICDrawBegin(
|
|
||||||
HIC hic,
|
|
||||||
long dwFlags,/* flags */
|
|
||||||
HPALETTE hpal, /* palette to draw with */
|
|
||||||
HWND hwnd, /* window to draw to */
|
|
||||||
HDC hdc, /* HDC to draw to */
|
|
||||||
INT xDst, /* destination rectangle */
|
|
||||||
INT yDst,
|
|
||||||
INT dxDst,
|
|
||||||
INT dyDst,
|
|
||||||
LPBITMAPINFOHEADER lpbi, /* format of frame to draw */
|
|
||||||
INT xSrc, /* source rectangle */
|
|
||||||
INT ySrc,
|
|
||||||
INT dxSrc,
|
|
||||||
INT dySrc,
|
|
||||||
long dwRate, /* frames/second = (dwRate/dwScale) */
|
|
||||||
long dwScale
|
|
||||||
);
|
|
||||||
|
|
||||||
/* as passed to ICM_DRAW_BEGIN (FIXME: correct only for Win32?) */
|
|
||||||
typedef struct {
|
|
||||||
long dwFlags;
|
|
||||||
HPALETTE hpal;
|
|
||||||
HWND hwnd;
|
|
||||||
HDC hdc;
|
|
||||||
INT xDst;
|
|
||||||
INT yDst;
|
|
||||||
INT dxDst;
|
|
||||||
INT dyDst;
|
|
||||||
LPBITMAPINFOHEADER lpbi;
|
|
||||||
INT xSrc;
|
|
||||||
INT ySrc;
|
|
||||||
INT dxSrc;
|
|
||||||
INT dySrc;
|
|
||||||
long dwRate;
|
|
||||||
long dwScale;
|
|
||||||
} ICDRAWBEGIN;
|
|
||||||
|
|
||||||
#define ICDRAW_HURRYUP 0x80000000L /* don't draw just buffer (hurry up!) */
|
|
||||||
#define ICDRAW_UPDATE 0x40000000L /* don't draw just update screen */
|
|
||||||
#define ICDRAW_PREROLL 0x20000000L /* this frame is before real start */
|
|
||||||
#define ICDRAW_NULLFRAME 0x10000000L /* repeat last frame */
|
|
||||||
#define ICDRAW_NOTKEYFRAME 0x08000000L /* this frame is not a key frame */
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
long dwFlags;
|
|
||||||
void* lpFormat;
|
|
||||||
void* lpData;
|
|
||||||
long cbData;
|
|
||||||
long lTime;
|
|
||||||
} ICDRAW;
|
|
||||||
|
|
||||||
long VFWAPIV ICDraw(HIC hic,long dwFlags,void* lpFormat,void* lpData,long cbData,long lTime);
|
|
||||||
|
|
||||||
|
|
||||||
#define AVIGETFRAMEF_BESTDISPLAYFMT 1
|
|
||||||
|
|
||||||
typedef struct _AVISTREAMINFOA {
|
|
||||||
long fccType;
|
|
||||||
long fccHandler;
|
|
||||||
long dwFlags; /* AVIIF_* */
|
|
||||||
long dwCaps;
|
|
||||||
short wPriority;
|
|
||||||
short wLanguage;
|
|
||||||
long dwScale;
|
|
||||||
long dwRate; /* dwRate / dwScale == samples/second */
|
|
||||||
long dwStart;
|
|
||||||
long dwLength; /* In units above... */
|
|
||||||
long dwInitialFrames;
|
|
||||||
long dwSuggestedBufferSize;
|
|
||||||
long dwQuality;
|
|
||||||
long dwSampleSize;
|
|
||||||
RECT rcFrame;
|
|
||||||
long dwEditCount;
|
|
||||||
long dwFormatChangeCount;
|
|
||||||
char szName[64];
|
|
||||||
} AVISTREAMINFOA, * LPAVISTREAMINFOA, *PAVISTREAMINFOA;
|
|
||||||
|
|
||||||
typedef struct _AVISTREAMINFOW {
|
|
||||||
long fccType;
|
|
||||||
long fccHandler;
|
|
||||||
long dwFlags;
|
|
||||||
long dwCaps;
|
|
||||||
short wPriority;
|
|
||||||
short wLanguage;
|
|
||||||
long dwScale;
|
|
||||||
long dwRate; /* dwRate / dwScale == samples/second */
|
|
||||||
long dwStart;
|
|
||||||
long dwLength; /* In units above... */
|
|
||||||
long dwInitialFrames;
|
|
||||||
long dwSuggestedBufferSize;
|
|
||||||
long dwQuality;
|
|
||||||
long dwSampleSize;
|
|
||||||
RECT rcFrame;
|
|
||||||
long dwEditCount;
|
|
||||||
long dwFormatChangeCount;
|
|
||||||
short szName[64];
|
|
||||||
} AVISTREAMINFOW, * LPAVISTREAMINFOW, *PAVISTREAMINFOW;
|
|
||||||
DECL_WINELIB_TYPE_AW(AVISTREAMINFO)
|
|
||||||
DECL_WINELIB_TYPE_AW(LPAVISTREAMINFO)
|
|
||||||
DECL_WINELIB_TYPE_AW(PAVISTREAMINFO)
|
|
||||||
|
|
||||||
#define AVISTREAMINFO_DISABLED 0x00000001
|
|
||||||
#define AVISTREAMINFO_FORMATCHANGES 0x00010000
|
|
||||||
|
|
||||||
/* AVIFILEINFO.dwFlags */
|
|
||||||
#define AVIFILEINFO_HASINDEX 0x00000010
|
|
||||||
#define AVIFILEINFO_MUSTUSEINDEX 0x00000020
|
|
||||||
#define AVIFILEINFO_ISINTERLEAVED 0x00000100
|
|
||||||
#define AVIFILEINFO_WASCAPTUREFILE 0x00010000
|
|
||||||
#define AVIFILEINFO_COPYRIGHTED 0x00020000
|
|
||||||
|
|
||||||
/* AVIFILEINFO.dwCaps */
|
|
||||||
#define AVIFILECAPS_CANREAD 0x00000001
|
|
||||||
#define AVIFILECAPS_CANWRITE 0x00000002
|
|
||||||
#define AVIFILECAPS_ALLKEYFRAMES 0x00000010
|
|
||||||
#define AVIFILECAPS_NOCOMPRESSION 0x00000020
|
|
||||||
|
|
||||||
typedef struct _AVIFILEINFOW {
|
|
||||||
long dwMaxBytesPerSec;
|
|
||||||
long dwFlags;
|
|
||||||
long dwCaps;
|
|
||||||
long dwStreams;
|
|
||||||
long dwSuggestedBufferSize;
|
|
||||||
long dwWidth;
|
|
||||||
long dwHeight;
|
|
||||||
long dwScale;
|
|
||||||
long dwRate;
|
|
||||||
long dwLength;
|
|
||||||
long dwEditCount;
|
|
||||||
short szFileType[64];
|
|
||||||
} AVIFILEINFOW, * LPAVIFILEINFOW, *PAVIFILEINFOW;
|
|
||||||
|
|
||||||
typedef struct _AVIFILEINFOA {
|
|
||||||
long dwMaxBytesPerSec;
|
|
||||||
long dwFlags;
|
|
||||||
long dwCaps;
|
|
||||||
long dwStreams;
|
|
||||||
long dwSuggestedBufferSize;
|
|
||||||
long dwWidth;
|
|
||||||
long dwHeight;
|
|
||||||
long dwScale;
|
|
||||||
long dwRate;
|
|
||||||
long dwLength;
|
|
||||||
long dwEditCount;
|
|
||||||
char szFileType[64];
|
|
||||||
} AVIFILEINFOA, * LPAVIFILEINFOA, *PAVIFILEINFOA;
|
|
||||||
|
|
||||||
DECL_WINELIB_TYPE_AW(AVIFILEINFO)
|
|
||||||
DECL_WINELIB_TYPE_AW(PAVIFILEINFO)
|
|
||||||
DECL_WINELIB_TYPE_AW(LPAVIFILEINFO)
|
|
||||||
|
|
||||||
/* AVICOMPRESSOPTIONS.dwFlags. determines presence of fields in below struct */
|
|
||||||
#define AVICOMPRESSF_INTERLEAVE 0x00000001
|
|
||||||
#define AVICOMPRESSF_DATARATE 0x00000002
|
|
||||||
#define AVICOMPRESSF_KEYFRAMES 0x00000004
|
|
||||||
#define AVICOMPRESSF_VALID 0x00000008
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
long fccType; /* stream type, for consistency */
|
|
||||||
long fccHandler; /* compressor */
|
|
||||||
long dwKeyFrameEvery; /* keyframe rate */
|
|
||||||
long dwQuality; /* compress quality 0-10,000 */
|
|
||||||
long dwBytesPerSecond; /* unsigned chars per second */
|
|
||||||
long dwFlags; /* flags... see below */
|
|
||||||
void* lpFormat; /* save format */
|
|
||||||
long cbFormat;
|
|
||||||
void* lpParms; /* compressor options */
|
|
||||||
long cbParms;
|
|
||||||
long dwInterleaveEvery; /* for non-video streams only */
|
|
||||||
} AVICOMPRESSOPTIONS, *LPAVICOMPRESSOPTIONS,*PAVICOMPRESSOPTIONS;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
long cbSize; // set to sizeof(COMPVARS) before
|
|
||||||
// calling ICCompressorChoose
|
|
||||||
long dwFlags; // see below...
|
|
||||||
HIC hic; // HIC of chosen compressor
|
|
||||||
long fccType; // basically ICTYPE_VIDEO
|
|
||||||
long fccHandler; // handler of chosen compressor or
|
|
||||||
// "" or "DIB "
|
|
||||||
LPBITMAPINFO lpbiIn; // input format
|
|
||||||
LPBITMAPINFO lpbiOut; // output format - will compress to this
|
|
||||||
void* lpBitsOut;
|
|
||||||
void* lpBitsPrev;
|
|
||||||
long lFrame;
|
|
||||||
long lKey; // key frames how often?
|
|
||||||
long lDataRate; // desired data rate KB/Sec
|
|
||||||
long lQ; // desired quality
|
|
||||||
long lKeyCount;
|
|
||||||
void* lpState; // state of compressor
|
|
||||||
long cbState; // size of the state
|
|
||||||
} COMPVARS, *PCOMPVARS;
|
|
||||||
|
|
||||||
// FLAGS for dwFlags element of COMPVARS structure:
|
|
||||||
|
|
||||||
|
|
||||||
#define AVIERR_OK 0
|
|
||||||
#define MAKE_AVIERR(error) MAKE_SCODE(SEVERITY_ERROR,FACILITY_ITF,0x4000+error)
|
|
||||||
|
|
||||||
#define AVIERR_UNSUPPORTED MAKE_AVIERR(101)
|
|
||||||
#define AVIERR_BADFORMAT MAKE_AVIERR(102)
|
|
||||||
#define AVIERR_MEMORY MAKE_AVIERR(103)
|
|
||||||
#define AVIERR_INTERNAL MAKE_AVIERR(104)
|
|
||||||
#define AVIERR_BADFLAGS MAKE_AVIERR(105)
|
|
||||||
#define AVIERR_BADPARAM MAKE_AVIERR(106)
|
|
||||||
#define AVIERR_BADSIZE MAKE_AVIERR(107)
|
|
||||||
#define AVIERR_BADHANDLE MAKE_AVIERR(108)
|
|
||||||
#define AVIERR_FILEREAD MAKE_AVIERR(109)
|
|
||||||
#define AVIERR_FILEWRITE MAKE_AVIERR(110)
|
|
||||||
#define AVIERR_FILEOPEN MAKE_AVIERR(111)
|
|
||||||
#define AVIERR_COMPRESSOR MAKE_AVIERR(112)
|
|
||||||
#define AVIERR_NOCOMPRESSOR MAKE_AVIERR(113)
|
|
||||||
#define AVIERR_READONLY MAKE_AVIERR(114)
|
|
||||||
#define AVIERR_NODATA MAKE_AVIERR(115)
|
|
||||||
#define AVIERR_BUFFERTOOSMALL MAKE_AVIERR(116)
|
|
||||||
#define AVIERR_CANTCOMPRESS MAKE_AVIERR(117)
|
|
||||||
#define AVIERR_USERABORT MAKE_AVIERR(198)
|
|
||||||
#define AVIERR_ERROR MAKE_AVIERR(199)
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#endif /* __WINE_VFW_H */
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,656 +0,0 @@
|
||||||
/*
|
|
||||||
* Basic types definitions
|
|
||||||
*
|
|
||||||
* Copyright 1996 Alexandre Julliard
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef __WINE_WINDEF_H
|
|
||||||
#define __WINE_WINDEF_H
|
|
||||||
|
|
||||||
#ifdef __WINE__
|
|
||||||
# include "config.h"
|
|
||||||
# undef UNICODE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef _EGCS_
|
|
||||||
#define __stdcall
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Misc. constants. */
|
|
||||||
|
|
||||||
#ifdef FALSE
|
|
||||||
#undef FALSE
|
|
||||||
#endif
|
|
||||||
#define FALSE 0
|
|
||||||
|
|
||||||
#ifdef TRUE
|
|
||||||
#undef TRUE
|
|
||||||
#endif
|
|
||||||
#define TRUE 1
|
|
||||||
|
|
||||||
#ifdef NULL
|
|
||||||
#undef NULL
|
|
||||||
#endif
|
|
||||||
#define NULL 0
|
|
||||||
|
|
||||||
/* Macros to map Winelib names to the correct implementation name */
|
|
||||||
/* depending on __WINE__ and UNICODE macros. */
|
|
||||||
/* Note that Winelib is purely Win32. */
|
|
||||||
|
|
||||||
#ifdef __WINE__
|
|
||||||
# define WINELIB_NAME_AW(func) \
|
|
||||||
func##_must_be_suffixed_with_W_or_A_in_this_context \
|
|
||||||
func##_must_be_suffixed_with_W_or_A_in_this_context
|
|
||||||
#else /* __WINE__ */
|
|
||||||
# ifdef UNICODE
|
|
||||||
# define WINELIB_NAME_AW(func) func##W
|
|
||||||
# else
|
|
||||||
# define WINELIB_NAME_AW(func) func##A
|
|
||||||
# endif /* UNICODE */
|
|
||||||
#endif /* __WINE__ */
|
|
||||||
|
|
||||||
#ifdef __WINE__
|
|
||||||
# define DECL_WINELIB_TYPE_AW(type) /* nothing */
|
|
||||||
#else /* __WINE__ */
|
|
||||||
# define DECL_WINELIB_TYPE_AW(type) typedef WINELIB_NAME_AW(type) type;
|
|
||||||
#endif /* __WINE__ */
|
|
||||||
|
|
||||||
#ifndef NONAMELESSSTRUCT
|
|
||||||
# if defined(__WINE__) || !defined(_FORCENAMELESSSTRUCT)
|
|
||||||
# define NONAMELESSSTRUCT
|
|
||||||
# endif
|
|
||||||
#endif /* !defined(NONAMELESSSTRUCT) */
|
|
||||||
|
|
||||||
#ifndef NONAMELESSUNION
|
|
||||||
# if defined(__WINE__) || !defined(_FORCENAMELESSUNION) || !defined(__cplusplus)
|
|
||||||
# define NONAMELESSUNION
|
|
||||||
# endif
|
|
||||||
#endif /* !defined(NONAMELESSUNION) */
|
|
||||||
|
|
||||||
#ifndef NONAMELESSSTRUCT
|
|
||||||
#define DUMMYSTRUCTNAME
|
|
||||||
#define DUMMYSTRUCTNAME1
|
|
||||||
#define DUMMYSTRUCTNAME2
|
|
||||||
#define DUMMYSTRUCTNAME3
|
|
||||||
#define DUMMYSTRUCTNAME4
|
|
||||||
#define DUMMYSTRUCTNAME5
|
|
||||||
#else /* !defined(NONAMELESSSTRUCT) */
|
|
||||||
#define DUMMYSTRUCTNAME s
|
|
||||||
#define DUMMYSTRUCTNAME1 s1
|
|
||||||
#define DUMMYSTRUCTNAME2 s2
|
|
||||||
#define DUMMYSTRUCTNAME3 s3
|
|
||||||
#define DUMMYSTRUCTNAME4 s4
|
|
||||||
#define DUMMYSTRUCTNAME5 s5
|
|
||||||
#endif /* !defined(NONAMELESSSTRUCT) */
|
|
||||||
|
|
||||||
#ifndef NONAMELESSUNION
|
|
||||||
#define DUMMYUNIONNAME
|
|
||||||
#define DUMMYUNIONNAME1
|
|
||||||
#define DUMMYUNIONNAME2
|
|
||||||
#define DUMMYUNIONNAME3
|
|
||||||
#define DUMMYUNIONNAME4
|
|
||||||
#define DUMMYUNIONNAME5
|
|
||||||
#else /* !defined(NONAMELESSUNION) */
|
|
||||||
#define DUMMYUNIONNAME u
|
|
||||||
#define DUMMYUNIONNAME1 u1
|
|
||||||
#define DUMMYUNIONNAME2 u2
|
|
||||||
#define DUMMYUNIONNAME3 u3
|
|
||||||
#define DUMMYUNIONNAME4 u4
|
|
||||||
#define DUMMYUNIONNAME5 u5
|
|
||||||
#endif /* !defined(NONAMELESSUNION) */
|
|
||||||
|
|
||||||
/* Calling conventions definitions */
|
|
||||||
|
|
||||||
#ifdef __i386__
|
|
||||||
# if defined(__GNUC__) && ((__GNUC__ > 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ >= 7)))
|
|
||||||
# ifndef _EGCS_
|
|
||||||
#define __stdcall __attribute__((__stdcall__))
|
|
||||||
#define __cdecl __attribute__((__cdecl__))
|
|
||||||
# define __RESTORE_ES __asm__ __volatile__("pushl %ds\n\tpopl %es")
|
|
||||||
# endif
|
|
||||||
# else
|
|
||||||
# error You need gcc >= 2.7 to build Wine on a 386
|
|
||||||
# endif
|
|
||||||
#else
|
|
||||||
# define __stdcall
|
|
||||||
# define __cdecl
|
|
||||||
# define __RESTORE_ES
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define CALLBACK __stdcall
|
|
||||||
#define WINAPI __stdcall
|
|
||||||
#define APIPRIVATE __stdcall
|
|
||||||
#define PASCAL __stdcall
|
|
||||||
#define pascal __stdcall
|
|
||||||
#define _pascal __stdcall
|
|
||||||
#define _stdcall __stdcall
|
|
||||||
#define _fastcall __stdcall
|
|
||||||
#define __fastcall __stdcall
|
|
||||||
#define __export __stdcall
|
|
||||||
#define CDECL __cdecl
|
|
||||||
#define _CDECL __cdecl
|
|
||||||
#define cdecl __cdecl
|
|
||||||
#define _cdecl __cdecl
|
|
||||||
#define WINAPIV __cdecl
|
|
||||||
#define APIENTRY WINAPI
|
|
||||||
|
|
||||||
#define __declspec(x)
|
|
||||||
#define dllimport
|
|
||||||
#define dllexport
|
|
||||||
|
|
||||||
#define CONST const
|
|
||||||
|
|
||||||
/* Standard data types. These are the same for emulator and library. */
|
|
||||||
|
|
||||||
typedef void VOID;
|
|
||||||
typedef int INT;
|
|
||||||
typedef unsigned int UINT;
|
|
||||||
typedef unsigned short WORD;
|
|
||||||
typedef unsigned long DWORD;
|
|
||||||
typedef unsigned long ULONG;
|
|
||||||
typedef unsigned char BYTE;
|
|
||||||
typedef long LONG;
|
|
||||||
typedef short SHORT;
|
|
||||||
typedef unsigned short USHORT;
|
|
||||||
typedef char CHAR;
|
|
||||||
typedef unsigned char UCHAR;
|
|
||||||
|
|
||||||
typedef LONG SCODE;
|
|
||||||
|
|
||||||
/* Some systems might have wchar_t, but we really need 16 bit characters */
|
|
||||||
typedef unsigned short WCHAR;
|
|
||||||
typedef int WIN_BOOL;
|
|
||||||
typedef double DATE;
|
|
||||||
typedef double DOUBLE;
|
|
||||||
typedef double LONGLONG;
|
|
||||||
typedef double ULONGLONG;
|
|
||||||
|
|
||||||
/* FIXME: Wine does not compile with strict on, therefore strict
|
|
||||||
* handles are presently only usable on machines where sizeof(UINT) ==
|
|
||||||
* sizeof(void*). HANDLEs are supposed to be void* but a large amount
|
|
||||||
* of WINE code operates on HANDLES as if they are UINTs. So to WINE
|
|
||||||
* they exist as UINTs but to the Winelib user who turns on strict,
|
|
||||||
* they exist as void*. If there is a size difference between UINT and
|
|
||||||
* void* then things get ugly. */
|
|
||||||
#ifdef STRICT
|
|
||||||
typedef VOID* HANDLE;
|
|
||||||
#else
|
|
||||||
typedef UINT HANDLE;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
typedef HANDLE *LPHANDLE;
|
|
||||||
|
|
||||||
/* Integer types. These are the same for emulator and library. */
|
|
||||||
typedef UINT WPARAM;
|
|
||||||
typedef LONG LPARAM;
|
|
||||||
typedef LONG HRESULT;
|
|
||||||
typedef LONG LRESULT;
|
|
||||||
typedef WORD ATOM;
|
|
||||||
typedef WORD CATCHBUF[9];
|
|
||||||
typedef WORD *LPCATCHBUF;
|
|
||||||
typedef HANDLE HHOOK;
|
|
||||||
typedef HANDLE HMONITOR;
|
|
||||||
typedef DWORD LCID;
|
|
||||||
typedef WORD LANGID;
|
|
||||||
typedef DWORD LCTYPE;
|
|
||||||
typedef float FLOAT;
|
|
||||||
|
|
||||||
/* Pointers types. These are the same for emulator and library. */
|
|
||||||
/* winnt types */
|
|
||||||
typedef VOID *PVOID;
|
|
||||||
typedef const void *PCVOID;
|
|
||||||
typedef CHAR *PCHAR;
|
|
||||||
typedef UCHAR *PUCHAR;
|
|
||||||
typedef BYTE *PBYTE;
|
|
||||||
typedef WORD *PWORD;
|
|
||||||
typedef USHORT *PUSHORT;
|
|
||||||
typedef SHORT *PSHORT;
|
|
||||||
typedef ULONG *PULONG;
|
|
||||||
typedef LONG *PLONG;
|
|
||||||
typedef DWORD *PDWORD;
|
|
||||||
/* common win32 types */
|
|
||||||
typedef CHAR *LPSTR;
|
|
||||||
typedef CHAR *PSTR;
|
|
||||||
typedef const CHAR *LPCSTR;
|
|
||||||
typedef const CHAR *PCSTR;
|
|
||||||
typedef WCHAR *LPWSTR;
|
|
||||||
typedef WCHAR *PWSTR;
|
|
||||||
typedef const WCHAR *LPCWSTR;
|
|
||||||
typedef const WCHAR *PCWSTR;
|
|
||||||
typedef BYTE *LPBYTE;
|
|
||||||
typedef WORD *LPWORD;
|
|
||||||
typedef DWORD *LPDWORD;
|
|
||||||
typedef LONG *LPLONG;
|
|
||||||
typedef VOID *LPVOID;
|
|
||||||
typedef const VOID *LPCVOID;
|
|
||||||
typedef INT *PINT;
|
|
||||||
typedef INT *LPINT;
|
|
||||||
typedef UINT *PUINT;
|
|
||||||
typedef UINT *LPUINT;
|
|
||||||
typedef FLOAT *PFLOAT;
|
|
||||||
typedef FLOAT *LPFLOAT;
|
|
||||||
typedef WIN_BOOL *PWIN_BOOL;
|
|
||||||
typedef WIN_BOOL *LPWIN_BOOL;
|
|
||||||
|
|
||||||
/* Special case: a segmented pointer is just a pointer in the user's code. */
|
|
||||||
|
|
||||||
#ifdef __WINE__
|
|
||||||
typedef DWORD SEGPTR;
|
|
||||||
#else
|
|
||||||
typedef void* SEGPTR;
|
|
||||||
#endif /* __WINE__ */
|
|
||||||
|
|
||||||
/* Handle types that exist both in Win16 and Win32. */
|
|
||||||
|
|
||||||
#ifdef STRICT
|
|
||||||
#define DECLARE_HANDLE(a) \
|
|
||||||
typedef struct a##__ { int unused; } *a; \
|
|
||||||
typedef a *P##a; \
|
|
||||||
typedef a *LP##a
|
|
||||||
#else /*STRICT*/
|
|
||||||
#define DECLARE_HANDLE(a) \
|
|
||||||
typedef HANDLE a; \
|
|
||||||
typedef a *P##a; \
|
|
||||||
typedef a *LP##a
|
|
||||||
#endif /*STRICT*/
|
|
||||||
|
|
||||||
DECLARE_HANDLE(HACMDRIVERID);
|
|
||||||
DECLARE_HANDLE(HACMDRIVER);
|
|
||||||
DECLARE_HANDLE(HACMOBJ);
|
|
||||||
DECLARE_HANDLE(HACMSTREAM);
|
|
||||||
DECLARE_HANDLE(HMETAFILEPICT);
|
|
||||||
|
|
||||||
DECLARE_HANDLE(HACCEL);
|
|
||||||
DECLARE_HANDLE(HBITMAP);
|
|
||||||
DECLARE_HANDLE(HBRUSH);
|
|
||||||
DECLARE_HANDLE(HCOLORSPACE);
|
|
||||||
DECLARE_HANDLE(HCURSOR);
|
|
||||||
DECLARE_HANDLE(HDC);
|
|
||||||
DECLARE_HANDLE(HDROP);
|
|
||||||
DECLARE_HANDLE(HDRVR);
|
|
||||||
DECLARE_HANDLE(HDWP);
|
|
||||||
DECLARE_HANDLE(HENHMETAFILE);
|
|
||||||
DECLARE_HANDLE(HFILE);
|
|
||||||
DECLARE_HANDLE(HFONT);
|
|
||||||
DECLARE_HANDLE(HICON);
|
|
||||||
DECLARE_HANDLE(HINSTANCE);
|
|
||||||
DECLARE_HANDLE(HKEY);
|
|
||||||
DECLARE_HANDLE(HMENU);
|
|
||||||
DECLARE_HANDLE(HMETAFILE);
|
|
||||||
DECLARE_HANDLE(HMIDI);
|
|
||||||
DECLARE_HANDLE(HMIDIIN);
|
|
||||||
DECLARE_HANDLE(HMIDIOUT);
|
|
||||||
DECLARE_HANDLE(HMIDISTRM);
|
|
||||||
DECLARE_HANDLE(HMIXER);
|
|
||||||
DECLARE_HANDLE(HMIXEROBJ);
|
|
||||||
DECLARE_HANDLE(HMMIO);
|
|
||||||
DECLARE_HANDLE(HPALETTE);
|
|
||||||
DECLARE_HANDLE(HPEN);
|
|
||||||
DECLARE_HANDLE(HQUEUE);
|
|
||||||
DECLARE_HANDLE(HRGN);
|
|
||||||
DECLARE_HANDLE(HRSRC);
|
|
||||||
DECLARE_HANDLE(HTASK);
|
|
||||||
DECLARE_HANDLE(HWAVE);
|
|
||||||
DECLARE_HANDLE(HWAVEIN);
|
|
||||||
DECLARE_HANDLE(HWAVEOUT);
|
|
||||||
DECLARE_HANDLE(HWINSTA);
|
|
||||||
DECLARE_HANDLE(HDESK);
|
|
||||||
DECLARE_HANDLE(HWND);
|
|
||||||
DECLARE_HANDLE(HKL);
|
|
||||||
DECLARE_HANDLE(HIC);
|
|
||||||
DECLARE_HANDLE(HRASCONN);
|
|
||||||
|
|
||||||
/* Handle types that must remain interchangeable even with strict on */
|
|
||||||
|
|
||||||
typedef HINSTANCE HMODULE;
|
|
||||||
typedef HANDLE HGDIOBJ;
|
|
||||||
typedef HANDLE HGLOBAL;
|
|
||||||
typedef HANDLE HLOCAL;
|
|
||||||
typedef HANDLE GLOBALHANDLE;
|
|
||||||
typedef HANDLE LOCALHANDLE;
|
|
||||||
|
|
||||||
/* Callback function pointers types */
|
|
||||||
//WIN_BOOL CALLBACK DATEFMT_ENUMPROCA(LPSTR);
|
|
||||||
|
|
||||||
typedef WIN_BOOL CALLBACK (* DATEFMT_ENUMPROCA)(LPSTR);
|
|
||||||
typedef WIN_BOOL CALLBACK (* DATEFMT_ENUMPROCW)(LPWSTR);
|
|
||||||
DECL_WINELIB_TYPE_AW(DATEFMT_ENUMPROC)
|
|
||||||
typedef WIN_BOOL CALLBACK (*DLGPROC)(HWND,UINT,WPARAM,LPARAM);
|
|
||||||
typedef LRESULT CALLBACK (*DRIVERPROC)(DWORD,HDRVR,UINT,LPARAM,LPARAM);
|
|
||||||
typedef INT CALLBACK (*EDITWORDBREAKPROCA)(LPSTR,INT,INT,INT);
|
|
||||||
typedef INT CALLBACK (*EDITWORDBREAKPROCW)(LPWSTR,INT,INT,INT);
|
|
||||||
DECL_WINELIB_TYPE_AW(EDITWORDBREAKPROC)
|
|
||||||
typedef LRESULT CALLBACK (*FARPROC)();
|
|
||||||
typedef INT CALLBACK (*PROC)();
|
|
||||||
typedef WIN_BOOL CALLBACK (*GRAYSTRINGPROC)(HDC,LPARAM,INT);
|
|
||||||
typedef LRESULT CALLBACK (*HOOKPROC)(INT,WPARAM,LPARAM);
|
|
||||||
typedef WIN_BOOL CALLBACK (*PROPENUMPROCA)(HWND,LPCSTR,HANDLE);
|
|
||||||
typedef WIN_BOOL CALLBACK (*PROPENUMPROCW)(HWND,LPCWSTR,HANDLE);
|
|
||||||
DECL_WINELIB_TYPE_AW(PROPENUMPROC)
|
|
||||||
typedef WIN_BOOL CALLBACK (*PROPENUMPROCEXA)(HWND,LPCSTR,HANDLE,LPARAM);
|
|
||||||
typedef WIN_BOOL CALLBACK (*PROPENUMPROCEXW)(HWND,LPCWSTR,HANDLE,LPARAM);
|
|
||||||
DECL_WINELIB_TYPE_AW(PROPENUMPROCEX)
|
|
||||||
typedef WIN_BOOL CALLBACK (* TIMEFMT_ENUMPROCA)(LPSTR);
|
|
||||||
typedef WIN_BOOL CALLBACK (* TIMEFMT_ENUMPROCW)(LPWSTR);
|
|
||||||
DECL_WINELIB_TYPE_AW(TIMEFMT_ENUMPROC)
|
|
||||||
typedef VOID CALLBACK (*TIMERPROC)(HWND,UINT,UINT,DWORD);
|
|
||||||
typedef WIN_BOOL CALLBACK (*WNDENUMPROC)(HWND,LPARAM);
|
|
||||||
typedef LRESULT CALLBACK (*WNDPROC)(HWND,UINT,WPARAM,LPARAM);
|
|
||||||
|
|
||||||
/*----------------------------------------------------------------------------
|
|
||||||
** FIXME: Better isolate Wine's reliance on the xxx16 type definitions.
|
|
||||||
** For now, we just isolate them to make the situation clear.
|
|
||||||
**--------------------------------------------------------------------------*/
|
|
||||||
/*
|
|
||||||
* Basic type definitions for 16 bit variations on Windows types.
|
|
||||||
* These types are provided mostly to insure compatibility with
|
|
||||||
* 16 bit windows code.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef __WINE_WINDEF16_H
|
|
||||||
#define __WINE_WINDEF16_H
|
|
||||||
|
|
||||||
#include "windef.h"
|
|
||||||
|
|
||||||
/* Standard data types */
|
|
||||||
|
|
||||||
typedef short INT16;
|
|
||||||
typedef unsigned short UINT16;
|
|
||||||
typedef unsigned short WIN_BOOL16;
|
|
||||||
|
|
||||||
typedef UINT16 HANDLE16;
|
|
||||||
typedef HANDLE16 *LPHANDLE16;
|
|
||||||
|
|
||||||
typedef UINT16 WPARAM16;
|
|
||||||
typedef INT16 *LPINT16;
|
|
||||||
typedef UINT16 *LPUINT16;
|
|
||||||
|
|
||||||
#define DECLARE_HANDLE16(a) \
|
|
||||||
typedef HANDLE16 a##16; \
|
|
||||||
typedef a##16 *P##a##16; \
|
|
||||||
typedef a##16 *NP##a##16; \
|
|
||||||
typedef a##16 *LP##a##16
|
|
||||||
|
|
||||||
DECLARE_HANDLE16(HACMDRIVERID);
|
|
||||||
DECLARE_HANDLE16(HACMDRIVER);
|
|
||||||
DECLARE_HANDLE16(HACMOBJ);
|
|
||||||
DECLARE_HANDLE16(HACMSTREAM);
|
|
||||||
DECLARE_HANDLE16(HMETAFILEPICT);
|
|
||||||
|
|
||||||
DECLARE_HANDLE16(HACCEL);
|
|
||||||
DECLARE_HANDLE16(HBITMAP);
|
|
||||||
DECLARE_HANDLE16(HBRUSH);
|
|
||||||
DECLARE_HANDLE16(HCOLORSPACE);
|
|
||||||
DECLARE_HANDLE16(HCURSOR);
|
|
||||||
DECLARE_HANDLE16(HDC);
|
|
||||||
DECLARE_HANDLE16(HDROP);
|
|
||||||
DECLARE_HANDLE16(HDRVR);
|
|
||||||
DECLARE_HANDLE16(HDWP);
|
|
||||||
DECLARE_HANDLE16(HENHMETAFILE);
|
|
||||||
DECLARE_HANDLE16(HFILE);
|
|
||||||
DECLARE_HANDLE16(HFONT);
|
|
||||||
DECLARE_HANDLE16(HICON);
|
|
||||||
DECLARE_HANDLE16(HINSTANCE);
|
|
||||||
DECLARE_HANDLE16(HKEY);
|
|
||||||
DECLARE_HANDLE16(HMENU);
|
|
||||||
DECLARE_HANDLE16(HMETAFILE);
|
|
||||||
DECLARE_HANDLE16(HMIDI);
|
|
||||||
DECLARE_HANDLE16(HMIDIIN);
|
|
||||||
DECLARE_HANDLE16(HMIDIOUT);
|
|
||||||
DECLARE_HANDLE16(HMIDISTRM);
|
|
||||||
DECLARE_HANDLE16(HMIXER);
|
|
||||||
DECLARE_HANDLE16(HMIXEROBJ);
|
|
||||||
DECLARE_HANDLE16(HMMIO);
|
|
||||||
DECLARE_HANDLE16(HPALETTE);
|
|
||||||
DECLARE_HANDLE16(HPEN);
|
|
||||||
DECLARE_HANDLE16(HQUEUE);
|
|
||||||
DECLARE_HANDLE16(HRGN);
|
|
||||||
DECLARE_HANDLE16(HRSRC);
|
|
||||||
DECLARE_HANDLE16(HTASK);
|
|
||||||
DECLARE_HANDLE16(HWAVE);
|
|
||||||
DECLARE_HANDLE16(HWAVEIN);
|
|
||||||
DECLARE_HANDLE16(HWAVEOUT);
|
|
||||||
DECLARE_HANDLE16(HWINSTA);
|
|
||||||
DECLARE_HANDLE16(HDESK);
|
|
||||||
DECLARE_HANDLE16(HWND);
|
|
||||||
DECLARE_HANDLE16(HKL);
|
|
||||||
DECLARE_HANDLE16(HIC);
|
|
||||||
DECLARE_HANDLE16(HRASCONN);
|
|
||||||
#undef DECLARE_HANDLE16
|
|
||||||
|
|
||||||
typedef HINSTANCE16 HMODULE16;
|
|
||||||
typedef HANDLE16 HGDIOBJ16;
|
|
||||||
typedef HANDLE16 HGLOBAL16;
|
|
||||||
typedef HANDLE16 HLOCAL16;
|
|
||||||
|
|
||||||
/* The SIZE structure */
|
|
||||||
typedef struct
|
|
||||||
{
|
|
||||||
INT16 cx;
|
|
||||||
INT16 cy;
|
|
||||||
} SIZE16, *PSIZE16, *LPSIZE16;
|
|
||||||
|
|
||||||
/* The POINT structure */
|
|
||||||
|
|
||||||
typedef struct
|
|
||||||
{
|
|
||||||
INT16 x;
|
|
||||||
INT16 y;
|
|
||||||
} POINT16, *PPOINT16, *LPPOINT16;
|
|
||||||
|
|
||||||
/* The RECT structure */
|
|
||||||
|
|
||||||
typedef struct
|
|
||||||
{
|
|
||||||
INT16 left;
|
|
||||||
INT16 top;
|
|
||||||
INT16 right;
|
|
||||||
INT16 bottom;
|
|
||||||
} RECT16, *LPRECT16;
|
|
||||||
|
|
||||||
/* Callback function pointers types */
|
|
||||||
|
|
||||||
typedef LRESULT CALLBACK (*DRIVERPROC16)(DWORD,HDRVR16,UINT16,LPARAM,LPARAM);
|
|
||||||
typedef WIN_BOOL16 CALLBACK (*DLGPROC16)(HWND16,UINT16,WPARAM16,LPARAM);
|
|
||||||
typedef INT16 CALLBACK (*EDITWORDBREAKPROC16)(LPSTR,INT16,INT16,INT16);
|
|
||||||
typedef LRESULT CALLBACK (*FARPROC16)();
|
|
||||||
typedef INT16 CALLBACK (*PROC16)();
|
|
||||||
typedef WIN_BOOL16 CALLBACK (*GRAYSTRINGPROC16)(HDC16,LPARAM,INT16);
|
|
||||||
typedef LRESULT CALLBACK (*HOOKPROC16)(INT16,WPARAM16,LPARAM);
|
|
||||||
typedef WIN_BOOL16 CALLBACK (*PROPENUMPROC16)(HWND16,SEGPTR,HANDLE16);
|
|
||||||
typedef VOID CALLBACK (*TIMERPROC16)(HWND16,UINT16,UINT16,DWORD);
|
|
||||||
typedef LRESULT CALLBACK (*WNDENUMPROC16)(HWND16,LPARAM);
|
|
||||||
typedef LRESULT CALLBACK (*WNDPROC16)(HWND16,UINT16,WPARAM16,LPARAM);
|
|
||||||
|
|
||||||
#endif /* __WINE_WINDEF16_H */
|
|
||||||
|
|
||||||
/* Define some empty macros for compatibility with Windows code. */
|
|
||||||
|
|
||||||
#ifndef __WINE__
|
|
||||||
#define NEAR
|
|
||||||
#define FAR
|
|
||||||
#define near
|
|
||||||
#define far
|
|
||||||
#define _near
|
|
||||||
#define _far
|
|
||||||
#define IN
|
|
||||||
#define OUT
|
|
||||||
#define OPTIONAL
|
|
||||||
#endif /* __WINE__ */
|
|
||||||
|
|
||||||
/* Macro for structure packing. */
|
|
||||||
|
|
||||||
#ifdef __GNUC__
|
|
||||||
#ifndef _EGCS_
|
|
||||||
#define WINE_PACKED __attribute__((packed))
|
|
||||||
#define WINE_UNUSED __attribute__((unused))
|
|
||||||
#define WINE_NORETURN __attribute__((noreturn))
|
|
||||||
#endif
|
|
||||||
#else
|
|
||||||
#define WINE_PACKED /* nothing */
|
|
||||||
#define WINE_UNUSED /* nothing */
|
|
||||||
#define WINE_NORETURN /* nothing */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Macros to split words and longs. */
|
|
||||||
|
|
||||||
#define LOBYTE(w) ((BYTE)(WORD)(w))
|
|
||||||
#define HIBYTE(w) ((BYTE)((WORD)(w) >> 8))
|
|
||||||
|
|
||||||
#define LOWORD(l) ((WORD)(DWORD)(l))
|
|
||||||
#define HIWORD(l) ((WORD)((DWORD)(l) >> 16))
|
|
||||||
|
|
||||||
#define SLOWORD(l) ((INT16)(LONG)(l))
|
|
||||||
#define SHIWORD(l) ((INT16)((LONG)(l) >> 16))
|
|
||||||
|
|
||||||
#define MAKEWORD(low,high) ((WORD)(((BYTE)(low)) | ((WORD)((BYTE)(high))) << 8))
|
|
||||||
#define MAKELONG(low,high) ((LONG)(((WORD)(low)) | (((DWORD)((WORD)(high))) << 16)))
|
|
||||||
#define MAKELPARAM(low,high) ((LPARAM)MAKELONG(low,high))
|
|
||||||
#define MAKEWPARAM(low,high) ((WPARAM)MAKELONG(low,high))
|
|
||||||
#define MAKELRESULT(low,high) ((LRESULT)MAKELONG(low,high))
|
|
||||||
#define MAKEINTATOM(atom) ((LPCSTR)MAKELONG((atom),0))
|
|
||||||
|
|
||||||
#define SELECTOROF(ptr) (HIWORD(ptr))
|
|
||||||
#define OFFSETOF(ptr) (LOWORD(ptr))
|
|
||||||
|
|
||||||
#ifdef __WINE__
|
|
||||||
/* macros to set parts of a DWORD (not in the Windows API) */
|
|
||||||
#define SET_LOWORD(dw,val) ((dw) = ((dw) & 0xffff0000) | LOWORD(val))
|
|
||||||
#define SET_LOBYTE(dw,val) ((dw) = ((dw) & 0xffffff00) | LOBYTE(val))
|
|
||||||
#define SET_HIBYTE(dw,val) ((dw) = ((dw) & 0xffff00ff) | (LOWORD(val) & 0xff00))
|
|
||||||
#define ADD_LOWORD(dw,val) ((dw) = ((dw) & 0xffff0000) | LOWORD((DWORD)(dw)+(val)))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Macros to access unaligned or wrong-endian WORDs and DWORDs. */
|
|
||||||
/* Note: These macros are semantically broken, at least for wrc. wrc
|
|
||||||
spits out data in the platform's current binary format, *not* in
|
|
||||||
little-endian format. These macros are used throughout the resource
|
|
||||||
code to load and store data to the resources. Since it is unlikely
|
|
||||||
that we'll ever be dealing with little-endian resource data, the
|
|
||||||
byte-swapping nature of these macros has been disabled. Rather than
|
|
||||||
remove the use of these macros from the resource loading code, the
|
|
||||||
macros have simply been disabled. In the future, someone may want
|
|
||||||
to reactivate these macros for other purposes. In that case, the
|
|
||||||
resource code will have to be modified to use different macros. */
|
|
||||||
|
|
||||||
#if 1
|
|
||||||
#define PUT_WORD(ptr,w) (*(WORD *)(ptr) = (w))
|
|
||||||
#define GET_WORD(ptr) (*(WORD *)(ptr))
|
|
||||||
#define PUT_DWORD(ptr,dw) (*(DWORD *)(ptr) = (dw))
|
|
||||||
#define GET_DWORD(ptr) (*(DWORD *)(ptr))
|
|
||||||
#else
|
|
||||||
#define PUT_WORD(ptr,w) (*(BYTE *)(ptr) = LOBYTE(w), \
|
|
||||||
*((BYTE *)(ptr) + 1) = HIBYTE(w))
|
|
||||||
#define GET_WORD(ptr) ((WORD)(*(BYTE *)(ptr) | \
|
|
||||||
(WORD)(*((BYTE *)(ptr)+1) << 8)))
|
|
||||||
#define PUT_DWORD(ptr,dw) (PUT_WORD((ptr),LOWORD(dw)), \
|
|
||||||
PUT_WORD((WORD *)(ptr)+1,HIWORD(dw)))
|
|
||||||
#define GET_DWORD(ptr) ((DWORD)(GET_WORD(ptr) | \
|
|
||||||
((DWORD)GET_WORD((WORD *)(ptr)+1) << 16)))
|
|
||||||
#endif /* 1 */
|
|
||||||
|
|
||||||
/* min and max macros */
|
|
||||||
#define __max(a,b) (((a) > (b)) ? (a) : (b))
|
|
||||||
#define __min(a,b) (((a) < (b)) ? (a) : (b))
|
|
||||||
#ifndef max
|
|
||||||
#define max(a,b) (((a) > (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
#ifndef min
|
|
||||||
#define min(a,b) (((a) < (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define _MAX_PATH 260
|
|
||||||
#define MAX_PATH 260
|
|
||||||
#define _MAX_DRIVE 3
|
|
||||||
#define _MAX_DIR 256
|
|
||||||
#define _MAX_FNAME 255
|
|
||||||
#define _MAX_EXT 256
|
|
||||||
|
|
||||||
#define HFILE_ERROR16 ((HFILE16)-1)
|
|
||||||
#define HFILE_ERROR ((HFILE)-1)
|
|
||||||
|
|
||||||
/* The SIZE structure */
|
|
||||||
typedef struct tagSIZE
|
|
||||||
{
|
|
||||||
INT cx;
|
|
||||||
INT cy;
|
|
||||||
} SIZE, *PSIZE, *LPSIZE;
|
|
||||||
|
|
||||||
|
|
||||||
typedef SIZE SIZEL, *PSIZEL, *LPSIZEL;
|
|
||||||
|
|
||||||
#define CONV_SIZE16TO32(s16,s32) \
|
|
||||||
((s32)->cx = (INT)(s16)->cx, (s32)->cy = (INT)(s16)->cy)
|
|
||||||
#define CONV_SIZE32TO16(s32,s16) \
|
|
||||||
((s16)->cx = (INT16)(s32)->cx, (s16)->cy = (INT16)(s32)->cy)
|
|
||||||
|
|
||||||
/* The POINT structure */
|
|
||||||
typedef struct tagPOINT
|
|
||||||
{
|
|
||||||
LONG x;
|
|
||||||
LONG y;
|
|
||||||
} POINT, *PPOINT, *LPPOINT;
|
|
||||||
|
|
||||||
typedef struct _POINTL
|
|
||||||
{
|
|
||||||
LONG x;
|
|
||||||
LONG y;
|
|
||||||
} POINTL;
|
|
||||||
|
|
||||||
#define CONV_POINT16TO32(p16,p32) \
|
|
||||||
((p32)->x = (INT)(p16)->x, (p32)->y = (INT)(p16)->y)
|
|
||||||
#define CONV_POINT32TO16(p32,p16) \
|
|
||||||
((p16)->x = (INT16)(p32)->x, (p16)->y = (INT16)(p32)->y)
|
|
||||||
|
|
||||||
#define MAKEPOINT16(l) (*((POINT16 *)&(l)))
|
|
||||||
|
|
||||||
/* The POINTS structure */
|
|
||||||
|
|
||||||
typedef struct tagPOINTS
|
|
||||||
{
|
|
||||||
SHORT x;
|
|
||||||
SHORT y;
|
|
||||||
} POINTS, *PPOINTS, *LPPOINTS;
|
|
||||||
|
|
||||||
|
|
||||||
#define MAKEPOINTS(l) (*((POINTS *)&(l)))
|
|
||||||
|
|
||||||
|
|
||||||
/* The RECT structure */
|
|
||||||
typedef struct tagRECT
|
|
||||||
{
|
|
||||||
short left;
|
|
||||||
short top;
|
|
||||||
short right;
|
|
||||||
short bottom;
|
|
||||||
} RECT, *PRECT, *LPRECT;
|
|
||||||
typedef const RECT *LPCRECT;
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct tagRECTL
|
|
||||||
{
|
|
||||||
LONG left;
|
|
||||||
LONG top;
|
|
||||||
LONG right;
|
|
||||||
LONG bottom;
|
|
||||||
} RECTL, *PRECTL, *LPRECTL;
|
|
||||||
|
|
||||||
typedef const RECTL *LPCRECTL;
|
|
||||||
|
|
||||||
#define CONV_RECT16TO32(r16,r32) \
|
|
||||||
((r32)->left = (INT)(r16)->left, (r32)->top = (INT)(r16)->top, \
|
|
||||||
(r32)->right = (INT)(r16)->right, (r32)->bottom = (INT)(r16)->bottom)
|
|
||||||
#define CONV_RECT32TO16(r32,r16) \
|
|
||||||
((r16)->left = (INT16)(r32)->left, (r16)->top = (INT16)(r32)->top, \
|
|
||||||
(r16)->right = (INT16)(r32)->right, (r16)->bottom = (INT16)(r32)->bottom)
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* __WINE_WINDEF_H */
|
|
|
@ -1,38 +0,0 @@
|
||||||
#ifndef __WINE_WINDOWS_H
|
|
||||||
#define __WINE_WINDOWS_H
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "windef.h"
|
|
||||||
#include "winbase.h"
|
|
||||||
#include "winuser.h"
|
|
||||||
#include "shell.h"
|
|
||||||
#include "winreg.h"
|
|
||||||
#include "winnetwk.h"
|
|
||||||
#include "winver.h"
|
|
||||||
#include "lzexpand.h"
|
|
||||||
#include "shellapi.h"
|
|
||||||
#include "ole2.h"
|
|
||||||
#include "winnls.h"
|
|
||||||
#include "objbase.h"
|
|
||||||
#include "winspool.h"
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
Where does this belong? Nobody uses this stuff anyway.
|
|
||||||
typedef struct {
|
|
||||||
BYTE i; /* much more .... */
|
|
||||||
} KANJISTRUCT;
|
|
||||||
typedef KANJISTRUCT *LPKANJISTRUCT;
|
|
||||||
typedef KANJISTRUCT *NPKANJISTRUCT;
|
|
||||||
typedef KANJISTRUCT *PKANJISTRUCT;
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* 0 */
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* __WINE_WINDOWS_H */
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,13 +0,0 @@
|
||||||
#ifndef __WINE_WINE_WINESTRING_H
|
|
||||||
#define __WINE_WINE_WINESTRING_H
|
|
||||||
|
|
||||||
#include "windef.h"
|
|
||||||
|
|
||||||
LPWSTR WINAPI lstrcpyAtoW(LPWSTR,LPCSTR);
|
|
||||||
LPSTR WINAPI lstrcpyWtoA(LPSTR,LPCWSTR);
|
|
||||||
LPWSTR WINAPI lstrcpynAtoW(LPWSTR,LPCSTR,INT);
|
|
||||||
LPSTR WINAPI lstrcpynWtoA(LPSTR,LPCWSTR,INT);
|
|
||||||
|
|
||||||
#define lstrncmpiA strncasecmp
|
|
||||||
|
|
||||||
#endif /* __WINE_WINE_WINESTRING_H */
|
|
2665
include/wine/winnt.h
2665
include/wine/winnt.h
File diff suppressed because it is too large
Load diff
|
@ -1,57 +0,0 @@
|
||||||
/*
|
|
||||||
* Win32 registry defines (see also winnt.h)
|
|
||||||
*/
|
|
||||||
#ifndef __WINE_WINREG_H
|
|
||||||
#define __WINE_WINREG_H
|
|
||||||
|
|
||||||
#include "winbase.h"
|
|
||||||
#include "winnt.h"
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif /* defined(__cplusplus) */
|
|
||||||
|
|
||||||
/*
|
|
||||||
#define SHELL_ERROR_SUCCESS 0L
|
|
||||||
#define SHELL_ERROR_BADDB 1L
|
|
||||||
#define SHELL_ERROR_BADKEY 2L
|
|
||||||
#define SHELL_ERROR_CANTOPEN 3L
|
|
||||||
#define SHELL_ERROR_CANTREAD 4L
|
|
||||||
#define SHELL_ERROR_CANTWRITE 5L
|
|
||||||
#define SHELL_ERROR_OUTOFMEMORY 6L
|
|
||||||
#define SHELL_ERROR_INVALID_PARAMETER 7L
|
|
||||||
#define SHELL_ERROR_ACCESS_DENIED 8L
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define HKEY_CLASSES_ROOT ((HKEY) 0x80000000)
|
|
||||||
#define HKEY_CURRENT_USER ((HKEY) 0x80000001)
|
|
||||||
#define HKEY_LOCAL_MACHINE ((HKEY) 0x80000002)
|
|
||||||
#define HKEY_USERS ((HKEY) 0x80000003)
|
|
||||||
#define HKEY_PERFORMANCE_DATA ((HKEY) 0x80000004)
|
|
||||||
#define HKEY_CURRENT_CONFIG ((HKEY) 0x80000005)
|
|
||||||
#define HKEY_DYN_DATA ((HKEY) 0x80000006)
|
|
||||||
|
|
||||||
/*
|
|
||||||
* registry provider structs
|
|
||||||
*/
|
|
||||||
typedef struct value_entA
|
|
||||||
{ LPSTR ve_valuename;
|
|
||||||
DWORD ve_valuelen;
|
|
||||||
DWORD_PTR ve_valueptr;
|
|
||||||
DWORD ve_type;
|
|
||||||
} VALENTA, *PVALENTA;
|
|
||||||
|
|
||||||
typedef struct value_entW {
|
|
||||||
LPWSTR ve_valuename;
|
|
||||||
DWORD ve_valuelen;
|
|
||||||
DWORD_PTR ve_valueptr;
|
|
||||||
DWORD ve_type;
|
|
||||||
} VALENTW, *PVALENTW;
|
|
||||||
|
|
||||||
typedef ACCESS_MASK REGSAM;
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
} /* extern "C" */
|
|
||||||
#endif /* defined(__cplusplus) */
|
|
||||||
|
|
||||||
#endif /* __WINE_WINREG_H */
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,5 +1,89 @@
|
||||||
|
/* Gnome-Streamer
|
||||||
|
* Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Library General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Library General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Library General Public
|
||||||
|
* License along with this library; if not, write to the
|
||||||
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
|
* Boston, MA 02111-1307, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
#include "gstaudio.h"
|
#include "gstaudio.h"
|
||||||
|
|
||||||
|
int
|
||||||
|
gst_audio_frame_byte_size (GstPad* pad)
|
||||||
|
{
|
||||||
|
/* calculate byte size of an audio frame
|
||||||
|
* this should be moved closer to the gstreamer core
|
||||||
|
* and be implemented for every mime type IMO
|
||||||
|
* returns 0 if there's an error, or the byte size if everything's ok
|
||||||
|
*/
|
||||||
|
|
||||||
|
int width = 0;
|
||||||
|
int channels = 0;
|
||||||
|
|
||||||
|
GstCaps *caps = NULL;
|
||||||
|
|
||||||
|
/* get caps of pad */
|
||||||
|
caps = GST_PAD_CAPS (pad);
|
||||||
|
|
||||||
|
if (caps == NULL)
|
||||||
|
/* ERROR: could not get caps of pad */
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
width = gst_caps_get_int (caps, "width");
|
||||||
|
channels = gst_caps_get_int (caps, "channels");
|
||||||
|
return (width / 8) * channels;
|
||||||
|
}
|
||||||
|
|
||||||
|
long
|
||||||
|
gst_audio_frame_length (GstPad* pad, GstBuffer* buf)
|
||||||
|
/* calculate length of buffer in frames
|
||||||
|
* this should be moved closer to the gstreamer core
|
||||||
|
* and be implemented for every mime type IMO
|
||||||
|
* returns 0 if there's an error, or the number of frames if everything's ok
|
||||||
|
*/
|
||||||
|
{
|
||||||
|
int frame_byte_size = 0;
|
||||||
|
|
||||||
|
frame_byte_size = gst_audio_frame_byte_size (pad);
|
||||||
|
if (frame_byte_size == 0)
|
||||||
|
/* error */
|
||||||
|
return 0;
|
||||||
|
/* FIXME: this function assumes the buffer size to be a whole multiple
|
||||||
|
* of the frame byte size
|
||||||
|
*/
|
||||||
|
return GST_BUFFER_SIZE (buf) / frame_byte_size;
|
||||||
|
}
|
||||||
|
|
||||||
|
long
|
||||||
|
gst_audio_frame_rate (GstPad *pad)
|
||||||
|
/*
|
||||||
|
* calculate frame rate (based on caps of pad)
|
||||||
|
* returns 0 if failed, rate if success
|
||||||
|
*/
|
||||||
|
{
|
||||||
|
GstCaps *caps = NULL;
|
||||||
|
|
||||||
|
/* get caps of pad */
|
||||||
|
caps = GST_PAD_CAPS (pad);
|
||||||
|
|
||||||
|
if (caps == NULL)
|
||||||
|
/* ERROR: could not get caps of pad */
|
||||||
|
return 0;
|
||||||
|
else
|
||||||
|
return gst_caps_get_int (caps, "rate");
|
||||||
|
}
|
||||||
|
|
||||||
double
|
double
|
||||||
gst_audio_length (GstPad* pad, GstBuffer* buf)
|
gst_audio_length (GstPad* pad, GstBuffer* buf)
|
||||||
{
|
{
|
||||||
|
@ -35,3 +119,34 @@ gst_audio_length (GstPad* pad, GstBuffer* buf)
|
||||||
}
|
}
|
||||||
return length;
|
return length;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
long
|
||||||
|
gst_audio_highest_sample_value (GstPad* pad)
|
||||||
|
/* calculate highest possible sample value
|
||||||
|
* based on capabilities of pad
|
||||||
|
*/
|
||||||
|
{
|
||||||
|
gboolean is_signed = FALSE;
|
||||||
|
gint width = 0;
|
||||||
|
GstCaps *caps = NULL;
|
||||||
|
|
||||||
|
caps = GST_PAD_CAPS (pad);
|
||||||
|
// FIXME : Please change this to a better warning method !
|
||||||
|
if (caps == NULL)
|
||||||
|
printf ("WARNING: gstaudio: could not get caps of pad !\n");
|
||||||
|
width = gst_caps_get_int (caps, "width");
|
||||||
|
is_signed = gst_caps_get_boolean (caps, "signed");
|
||||||
|
if (is_signed) --width;
|
||||||
|
/* example : 16 bit, signed : samples between -32768 and 32767 */
|
||||||
|
return ((long) (1 << width));
|
||||||
|
}
|
||||||
|
|
||||||
|
gboolean
|
||||||
|
gst_audio_is_buffer_framed (GstPad* pad, GstBuffer* buf)
|
||||||
|
/* check if the buffer size is a whole multiple of the frame size */
|
||||||
|
{
|
||||||
|
if (GST_BUFFER_SIZE (buf) % gst_audio_frame_byte_size (pad) == 0)
|
||||||
|
return TRUE;
|
||||||
|
else
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
|
@ -25,7 +25,21 @@
|
||||||
|
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
|
|
||||||
/* calculate length in seconds of audio buffer buf based on caps of pad */
|
/* get byte size of audio frame (based on caps of pad */
|
||||||
|
int gst_audio_frame_byte_size (GstPad* pad);
|
||||||
|
|
||||||
|
/* get length in frames of buffer */
|
||||||
|
long gst_audio_frame_length (GstPad* pad, GstBuffer* buf);
|
||||||
|
|
||||||
|
/* get frame rate based on caps */
|
||||||
|
long gst_audio_frame_rate (GstPad *pad);
|
||||||
|
|
||||||
|
/* calculate length in seconds of audio buffer buf based on caps of pad */
|
||||||
double gst_audio_length (GstPad* pad, GstBuffer* buf);
|
double gst_audio_length (GstPad* pad, GstBuffer* buf);
|
||||||
|
|
||||||
|
/* calculate highest possible sample value based on capabilities of pad */
|
||||||
|
long gst_audio_highest_sample_value (GstPad* pad);
|
||||||
|
|
||||||
|
/* check if the buffer size is a whole multiple of the frame size */
|
||||||
|
gboolean gst_audio_is_buffer_framed (GstPad* pad, GstBuffer* buf);
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
chunk = (gst_riff_chunk *)(riffenc->dataleft + riffenc->nextlikely);\
|
chunk = (gst_riff_chunk *)(riffenc->dataleft + riffenc->nextlikely);\
|
||||||
chunk->id = chunkid; \
|
chunk->id = chunkid; \
|
||||||
chunk->size = chunksize; \
|
chunk->size = chunksize; \
|
||||||
riffenc->nextlikely += sizeof(gst_riff_chunk) + (chunksize&1); \
|
riffenc->nextlikely += sizeof(gst_riff_chunk); \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define ADD_LIST(riffenc, listsize, listtype) \
|
#define ADD_LIST(riffenc, listsize, listtype) \
|
||||||
|
|
|
@ -216,7 +216,7 @@ static void
|
||||||
gst_disksink_chain (GstPad *pad, GstBuffer *buf)
|
gst_disksink_chain (GstPad *pad, GstBuffer *buf)
|
||||||
{
|
{
|
||||||
GstDiskSink *disksink;
|
GstDiskSink *disksink;
|
||||||
guint16 bytes_written = 0;
|
gint bytes_written = 0;
|
||||||
|
|
||||||
g_return_if_fail (pad != NULL);
|
g_return_if_fail (pad != NULL);
|
||||||
g_return_if_fail (GST_IS_PAD (pad));
|
g_return_if_fail (GST_IS_PAD (pad));
|
||||||
|
|
|
@ -233,8 +233,10 @@ gst_disksrc_get (GstPad *pad)
|
||||||
src = GST_DISKSRC (gst_pad_get_parent (pad));
|
src = GST_DISKSRC (gst_pad_get_parent (pad));
|
||||||
g_return_val_if_fail (GST_FLAG_IS_SET (src, GST_DISKSRC_OPEN), NULL);
|
g_return_val_if_fail (GST_FLAG_IS_SET (src, GST_DISKSRC_OPEN), NULL);
|
||||||
|
|
||||||
|
|
||||||
/* deal with EOF state */
|
/* deal with EOF state */
|
||||||
if (src->curoffset >= src->size) {
|
if (src->curoffset >= src->size) {
|
||||||
|
GST_DEBUG (0,"map offset %ld >= size %ld --> eos\n", src->curoffset, src->size);
|
||||||
gst_pad_set_eos (pad);
|
gst_pad_set_eos (pad);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -296,8 +298,12 @@ gst_disksrc_get_region (GstPad *pad, GstRegionType type,guint64 offset,guint64 l
|
||||||
|
|
||||||
/* deal with EOF state */
|
/* deal with EOF state */
|
||||||
if (offset >= src->size) {
|
if (offset >= src->size) {
|
||||||
gst_pad_set_eos (pad);
|
//gst_pad_set_eos (pad);
|
||||||
return NULL;
|
GST_DEBUG (0,"map offset %lld >= size %ld --> eos\n", offset, src->size);
|
||||||
|
//FIXME
|
||||||
|
buf = gst_buffer_new();
|
||||||
|
GST_BUFFER_FLAG_SET (buf, GST_BUFFER_EOS);
|
||||||
|
return buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* create the buffer */
|
/* create the buffer */
|
||||||
|
|
|
@ -8,6 +8,10 @@ endif
|
||||||
SUBDIRS = $(GNOME_SUBDS) \
|
SUBDIRS = $(GNOME_SUBDS) \
|
||||||
helloworld helloworld2 \
|
helloworld helloworld2 \
|
||||||
queue queue2 queue3 queue4 \
|
queue queue2 queue3 queue4 \
|
||||||
launch thread xml typefind mixer
|
launch thread xml plugins typefind mixer cutter
|
||||||
|
|
||||||
|
DIST_SUBDIRS = autoplug \
|
||||||
|
helloworld helloworld2 \
|
||||||
|
queue queue2 queue3 queue4 \
|
||||||
|
launch thread xml plugins typefind mixer cutter
|
||||||
|
|
||||||
DIST_SUBDIRS = autoplug plugins
|
|
||||||
|
|
5
tests/old/examples/cutter/Makefile.am
Normal file
5
tests/old/examples/cutter/Makefile.am
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
noinst_PROGRAMS = cutter
|
||||||
|
noinst_HEADERS = cutter.h
|
||||||
|
|
||||||
|
LIBS += $(GST_LIBS)
|
||||||
|
CFLAGS += $(GST_CFLAGS)
|
210
tests/old/examples/cutter/cutter.c
Normal file
210
tests/old/examples/cutter/cutter.c
Normal file
|
@ -0,0 +1,210 @@
|
||||||
|
/*
|
||||||
|
* cutter.c - cut audio into pieces based on silence - thomas@apestaart.org
|
||||||
|
*
|
||||||
|
* construct a simple pipeline osssrc ! cutter ! disksink
|
||||||
|
* pause when necessary, change output
|
||||||
|
*
|
||||||
|
* Latest change : 03/06/2001
|
||||||
|
*
|
||||||
|
* Version : 0.3
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <gst/gst.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <time.h>
|
||||||
|
|
||||||
|
#define DEBUG
|
||||||
|
|
||||||
|
gboolean playing = TRUE;
|
||||||
|
gboolean cut_start_signalled = FALSE;
|
||||||
|
gboolean cut_stop_signalled = FALSE;
|
||||||
|
|
||||||
|
int id = 0; /* increment this for each new cut */
|
||||||
|
GstElement *main_bin;
|
||||||
|
GstElement *audiosrc;
|
||||||
|
GstElement *queue;
|
||||||
|
GstElement *thread;
|
||||||
|
GstElement *cutter;
|
||||||
|
GstElement *disksink;
|
||||||
|
GstElement *encoder;
|
||||||
|
char buffer[255];
|
||||||
|
|
||||||
|
/* signal callbacks */
|
||||||
|
|
||||||
|
void cut_start (GstElement *element)
|
||||||
|
{
|
||||||
|
g_print ("\nDEBUG: main: cut start\n");
|
||||||
|
/* we should pause the pipeline, disconnect cutter and disksink
|
||||||
|
* create a new disksink to a real file, reconnect, and set to play
|
||||||
|
*/
|
||||||
|
g_print ("DEBUG: cut_start: main_bin pausing\n");
|
||||||
|
gst_element_set_state (main_bin, GST_STATE_PAUSED);
|
||||||
|
g_print ("DEBUG: cut_start: main_bin paused\n");
|
||||||
|
|
||||||
|
{
|
||||||
|
long seconds;
|
||||||
|
struct tm *ct;
|
||||||
|
time (&seconds);
|
||||||
|
ct = localtime (&seconds);
|
||||||
|
// sprintf (buffer, "/news/incoming/audio/cutter.%06d.wav", id);
|
||||||
|
sprintf (buffer, "/news/incoming/audio/cutter.%04d%02d%02d.%02d%02d%02d.wav",
|
||||||
|
ct->tm_year + 1900, ct->tm_mon, ct->tm_mday,
|
||||||
|
ct->tm_hour, ct->tm_min, ct->tm_sec);
|
||||||
|
}
|
||||||
|
g_print ("DEBUG: cut_start: setting new location to %s\n", buffer);
|
||||||
|
gtk_object_set (G_OBJECT (disksink), "location", buffer, NULL);
|
||||||
|
gtk_object_set (G_OBJECT (disksink), "type", 4, NULL);
|
||||||
|
|
||||||
|
gst_element_set_state (main_bin, GST_STATE_PLAYING);
|
||||||
|
++id;
|
||||||
|
g_print ("start_cut_signal done\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
void cut_start_signal (GstElement *element)
|
||||||
|
{
|
||||||
|
g_print ("\nDEBUG: main: cut start signal\n");
|
||||||
|
cut_start_signalled = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
void cut_stop (GstElement *element)
|
||||||
|
{
|
||||||
|
g_print ("\nDEBUG: main: cut stop\n");
|
||||||
|
/* we should pause the pipeline, disconnect disksink, create a fake disksink,
|
||||||
|
* connect to pipeline, and set to play
|
||||||
|
*/
|
||||||
|
g_print ("DEBUG: cut_stop: main_bin paused\n");
|
||||||
|
gst_element_set_state (main_bin, GST_STATE_PAUSED);
|
||||||
|
|
||||||
|
g_print ("DEBUG: cut_stop: setting new location\n");
|
||||||
|
gtk_object_set (G_OBJECT (disksink), "location", "/dev/null", NULL);
|
||||||
|
|
||||||
|
gst_element_set_state (main_bin, GST_STATE_PLAYING);
|
||||||
|
g_print ("stop_cut_signal done\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
void cut_stop_signal (GstElement *element)
|
||||||
|
{
|
||||||
|
g_print ("\nDEBUG: main: cut stop signal\n");
|
||||||
|
cut_stop_signalled = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
int main (int argc, char *argv[])
|
||||||
|
{
|
||||||
|
//int i, j;
|
||||||
|
//gboolean done;
|
||||||
|
|
||||||
|
//char buffer[20];
|
||||||
|
|
||||||
|
//output_channel_t *channel_out;
|
||||||
|
|
||||||
|
GstElement *audiosrc;
|
||||||
|
|
||||||
|
gst_init (&argc,&argv);
|
||||||
|
/*
|
||||||
|
if (argc == 1)
|
||||||
|
{
|
||||||
|
g_print("usage: %s <filename1> <filename2> <...>\n", argv[0]);
|
||||||
|
exit(-1);
|
||||||
|
}*/
|
||||||
|
|
||||||
|
/* set up input channel and main bin */
|
||||||
|
|
||||||
|
g_print ("creating main bin\n");
|
||||||
|
/* create cutter */
|
||||||
|
cutter = gst_elementfactory_make ("cutter", "cutter");
|
||||||
|
|
||||||
|
gtk_object_set (G_OBJECT (cutter),
|
||||||
|
"threshold_dB", -40.0,
|
||||||
|
"runlength", 0.5,
|
||||||
|
NULL);
|
||||||
|
|
||||||
|
/* create an audio src */
|
||||||
|
audiosrc = gst_elementfactory_make ("osssrc", "audio_src");
|
||||||
|
|
||||||
|
/* set params */
|
||||||
|
|
||||||
|
gtk_object_set (G_OBJECT (audiosrc), "frequency", 44100,
|
||||||
|
"channels", 1,
|
||||||
|
"format", 16, NULL);
|
||||||
|
|
||||||
|
encoder = gst_elementfactory_make ("passthrough", "encoder");
|
||||||
|
disksink = gst_elementfactory_make ("afsink", "disk_sink");
|
||||||
|
|
||||||
|
gtk_object_set (G_OBJECT (disksink), "location", "/dev/null", NULL);
|
||||||
|
|
||||||
|
thread = gst_thread_new ("thread");
|
||||||
|
g_assert (thread != NULL);
|
||||||
|
|
||||||
|
/* create main bin */
|
||||||
|
main_bin = gst_pipeline_new ("bin");
|
||||||
|
g_assert (main_bin != NULL);
|
||||||
|
|
||||||
|
queue = gst_elementfactory_make ("queue", "queue");
|
||||||
|
|
||||||
|
/* add elements to bin */
|
||||||
|
gst_bin_add (GST_BIN (main_bin), audiosrc);
|
||||||
|
gst_bin_add (GST_BIN (thread), queue);
|
||||||
|
|
||||||
|
gst_bin_add (GST_BIN (thread), cutter);
|
||||||
|
gst_bin_add (GST_BIN (thread), encoder);
|
||||||
|
gst_bin_add (GST_BIN (thread), disksink);
|
||||||
|
|
||||||
|
/* connect adder and disksink */
|
||||||
|
|
||||||
|
gst_pad_connect (gst_element_get_pad (audiosrc, "src"),
|
||||||
|
gst_element_get_pad (queue, "sink"));
|
||||||
|
|
||||||
|
gst_pad_connect (gst_element_get_pad (queue, "src"),
|
||||||
|
gst_element_get_pad (cutter, "sink"));
|
||||||
|
gst_pad_connect (gst_element_get_pad (cutter, "src"),
|
||||||
|
gst_element_get_pad (encoder, "sink"));
|
||||||
|
gst_pad_connect (gst_element_get_pad (encoder, "src"),
|
||||||
|
gst_element_get_pad (disksink, "sink"));
|
||||||
|
|
||||||
|
gst_bin_add (GST_BIN (main_bin), thread);
|
||||||
|
|
||||||
|
/* set signal handlers */
|
||||||
|
g_print ("setting signal handlers\n");
|
||||||
|
gtk_signal_connect (G_OBJECT(cutter), "cut_start",
|
||||||
|
GTK_SIGNAL_FUNC(cut_start_signal), NULL);
|
||||||
|
gtk_signal_connect (G_OBJECT(cutter), "cut_stop",
|
||||||
|
GTK_SIGNAL_FUNC(cut_stop_signal), NULL);
|
||||||
|
|
||||||
|
/* start playing */
|
||||||
|
g_print ("setting to play\n");
|
||||||
|
gst_element_set_state (main_bin, GST_STATE_PLAYING);
|
||||||
|
/*
|
||||||
|
g_print ("setting thread to play\n");
|
||||||
|
gst_element_set_state (GST_ELEMENT (thread), GST_STATE_PLAYING);
|
||||||
|
*/
|
||||||
|
while (playing)
|
||||||
|
{
|
||||||
|
// g_print ("> ");
|
||||||
|
gst_bin_iterate (GST_BIN (main_bin));
|
||||||
|
// g_print (" <");
|
||||||
|
if (cut_start_signalled)
|
||||||
|
{
|
||||||
|
g_print ("\nDEBUG: main: cut_start_signalled true !\n");
|
||||||
|
cut_start (cutter);
|
||||||
|
cut_start_signalled = FALSE;
|
||||||
|
}
|
||||||
|
if (cut_stop_signalled)
|
||||||
|
{
|
||||||
|
g_print ("\nDEBUG: main: cut_stop_signalled true !\n");
|
||||||
|
cut_stop (cutter);
|
||||||
|
cut_stop_signalled = FALSE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
g_print ("we're done iterating.\n");
|
||||||
|
/* stop the bin */
|
||||||
|
|
||||||
|
gst_element_set_state (main_bin, GST_STATE_NULL);
|
||||||
|
|
||||||
|
gst_object_destroy (GST_OBJECT (disksink));
|
||||||
|
gst_object_destroy (GST_OBJECT (main_bin));
|
||||||
|
|
||||||
|
exit(0);
|
||||||
|
}
|
14
tests/old/examples/cutter/cutter.h
Normal file
14
tests/old/examples/cutter/cutter.h
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
/*
|
||||||
|
* cutter.h header file
|
||||||
|
* thomas@apestaart.org
|
||||||
|
*/
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
GstElement *pipe;
|
||||||
|
GstElement *disksink;
|
||||||
|
GstElement *audiosink;
|
||||||
|
|
||||||
|
char *location;
|
||||||
|
int channel_id;
|
||||||
|
} output_channel_t;
|
73
tools/README
73
tools/README
|
@ -8,13 +8,71 @@ feedback pipelines are the most complex.
|
||||||
|
|
||||||
A simple commandline looks like:
|
A simple commandline looks like:
|
||||||
|
|
||||||
./launch disksrc demo.mp3 | mp3parse | mpg123 | osssink
|
gstreamer-launch disksrc location=music.mp3 ! mad ! osssink
|
||||||
|
|
||||||
A more complex pipeline looks like:
|
This plays an mp3 music file music.mp3 using libmad, and:
|
||||||
|
|
||||||
./launch disksrc redpill.vob | css-descramble | private_stream_1.0| \
|
gstreamer-launch disksrc location=music.mp3 ! mp3parse ! mpg123 ! osssink
|
||||||
(ac3parse | ac3dec | audioink-oss) video_0| (mpeg2dec | videosink)
|
|
||||||
|
|
||||||
|
Plays and mp3 music file using mpg123
|
||||||
|
|
||||||
|
You can also stream files over http:
|
||||||
|
|
||||||
|
gstreamer-launch httpsrc location=http://domain.com/music.mp3 ! mad ! osssink
|
||||||
|
|
||||||
|
And using gnome-vfs you can do the same with:
|
||||||
|
|
||||||
|
gstreamer-launch gnomevfssrc location=music.mp3 ! mad ! osssink
|
||||||
|
gstreamer-launch gnomevfssrc location=http://domain.com/music.mp3 ! mad ! osssink
|
||||||
|
|
||||||
|
And too play the same song with gnome-vfs via smb:
|
||||||
|
|
||||||
|
gstreamer-launch gnomevfssrc location=smb://computer/music.mp3 ! mad ! osssink
|
||||||
|
|
||||||
|
Here we convert a Mp3 file into an Ogg Vorbis file:
|
||||||
|
|
||||||
|
gstreamer-launch disksrc location=music.mp3 ! mad ! vorbisenc ! disksink location=music.ogg
|
||||||
|
|
||||||
|
And then we can play that file with:
|
||||||
|
|
||||||
|
gstreamer-launch disksrc location=music.ogg ! vorbisdec ! osssink
|
||||||
|
|
||||||
|
Some other useful pipelines are..
|
||||||
|
Plays wav files (currently there are no wav encoders):
|
||||||
|
|
||||||
|
gstreamer-launch disksrc location=music.wav ! parsewav ! osssink
|
||||||
|
|
||||||
|
Converts wav files into mp3 and ogg files:
|
||||||
|
|
||||||
|
gstreamer-launch disksrc location=music.wav ! parsewav ! vorbisenc ! disksink location=music.ogg
|
||||||
|
gstreamer-launch disksrc location=music.wav ! parsewav ! mpegaudio ! disksink location=music.mp3
|
||||||
|
|
||||||
|
You can also use lame for mp3 encoding if you have it installed, it does a
|
||||||
|
much better job than mpegaudio.
|
||||||
|
|
||||||
|
Rips all songs from cd and saves them into a mp3 file:
|
||||||
|
|
||||||
|
gstreamer-launch cdparanoia ! mpegaudio ! disksink location=cd.mp3
|
||||||
|
|
||||||
|
You can toy around with gstreamer-inspect to discover the settings for
|
||||||
|
cdparanoia to rip individual tracks
|
||||||
|
|
||||||
|
Record sound from your sound input and encode it into an ogg file:
|
||||||
|
|
||||||
|
gstreamer-launch osssrc ! vorbisenc ! disksink location=input.ogg
|
||||||
|
|
||||||
|
gstreamer-launch not only handles audio but video as well:
|
||||||
|
For mpeg1 files (video and audio streams respectively):
|
||||||
|
|
||||||
|
gstreamer-launch disksrc location=video.mpg ! mpeg1parse video_00! queue ! { mp1videoparse ! mpeg_play ! sdlvideosink }
|
||||||
|
gstreamer-launch disksrc location=video.mpg ! mpeg1parse audio_00! queue ! { mad ! osssink }
|
||||||
|
|
||||||
|
For mpeg2 files (video and audio streams respectively):
|
||||||
|
|
||||||
|
gstreamer-launch disksrc location=video.mpeg ! mpeg2parse video_0! queue ! { mpeg2dec ! sdlvideosink }
|
||||||
|
gstreamer-launch disksrc location=video.mpeg ! mpeg2parse private_stream_1.0! queue ! { ac3dec ! osssink }
|
||||||
|
|
||||||
|
Note: The types of audio streams in the mpeg files can vary!
|
||||||
|
|
||||||
gstreamer-complete
|
gstreamer-complete
|
||||||
==================
|
==================
|
||||||
|
@ -22,8 +80,8 @@ gstreamer-complete
|
||||||
This is a simple utility which provides custom bash completion when
|
This is a simple utility which provides custom bash completion when
|
||||||
typing gstreamer-launch commands.
|
typing gstreamer-launch commands.
|
||||||
|
|
||||||
Simply run "gstreamer-compprep" to build the registry of completions, and
|
Simply run "gstreamer-compprep" as root to build the registry of completions,
|
||||||
then put, in your .bashrc,
|
and then put, in your .bashrc,
|
||||||
"complete -C gstreamer-complete gstreamer-launch"
|
"complete -C gstreamer-complete gstreamer-launch"
|
||||||
(ensuring that gstreamer-complete is on your path).
|
(ensuring that gstreamer-complete is on your path).
|
||||||
|
|
||||||
|
@ -37,7 +95,8 @@ gstreamer-register
|
||||||
This tool will perform an introspection on all available plugins and will
|
This tool will perform an introspection on all available plugins and will
|
||||||
create a registry file in /etc/gstreamer/reg.xml. Startup time will be
|
create a registry file in /etc/gstreamer/reg.xml. Startup time will be
|
||||||
much faster since the gstreamer core doesn't have to bring all the plugins
|
much faster since the gstreamer core doesn't have to bring all the plugins
|
||||||
files into memory at startup.
|
files into memory at startup. As with gstreamer-compprep you need to run this
|
||||||
|
as root for it too work correctly.
|
||||||
|
|
||||||
|
|
||||||
gstreamer-inspect
|
gstreamer-inspect
|
||||||
|
|
|
@ -1,29 +1,28 @@
|
||||||
.TH GStreamer 1 "June 2001"
|
.TH "gstreamer-compprep" "1" "0.2.0" "Richard Boulton" "GStreamer"
|
||||||
.SH NAME
|
.SH "NAME"
|
||||||
gstreamer\-compprep - create the registry for gstreamer\-complete
|
gstreamer\-compprep \- create the registry for gstreamer\-complete
|
||||||
.SH SYNOPSIS
|
.SH "SYNOPSIS"
|
||||||
.B compprep
|
gstreamer\-compprep
|
||||||
.SH DESCRIPTION
|
.SH "DESCRIPTION"
|
||||||
.PP
|
.LP
|
||||||
\fIgstreamer\-compprep\fP is a utility to build the registry of gstreamer
|
\fIgstreamer\-compprep\fR is a utility to build the registry of gstreamer
|
||||||
elements and their features to enable context sensitive tab completion for
|
elements and their features to enable context sensitive tab completion for
|
||||||
\fIgstreamer\-launch\fP command\-lines to be performed by
|
\fIgstreamer\-launch\fR command\-lines to be performed by
|
||||||
\fIgstreamer\-complete\fP.
|
\fIgstreamer\-complete\fR.
|
||||||
.
|
.LP
|
||||||
By default, the registry is stored in /etc/gstreamer/compreg.xml
|
By default, the registry is stored in /etc/gstreamer/compreg.xml
|
||||||
.
|
.SH "USAGE"
|
||||||
.SH USAGE
|
|
||||||
Whenever the available gstreamer plugins are modified, generate the registry of available plugins by running
|
Whenever the available gstreamer plugins are modified, generate the registry of available plugins by running
|
||||||
\fIgstreamer\-compprep\fP.
|
\fIgstreamer\-compprep\fP.
|
||||||
.SH FILES
|
.SH "FILES"
|
||||||
.TP 8
|
.TP 8
|
||||||
/etc/gstreamer/compreg.xml
|
/etc/gstreamer/compreg.xml
|
||||||
Registry generated by \fIgstreamer\-compprep\fP and used by \fIgstreamer\-complete\fP.
|
Registry generated by \fIgstreamer\-compprep\fP and used by \fIgstreamer\-complete\fP.
|
||||||
.SH SEE ALSO
|
.SH "SEE ALSO"
|
||||||
.BR gstreamer\-complete (1),
|
.BR gstreamer\-complete (1),
|
||||||
.BR gstreamer\-lanuch (1),
|
.BR gstreamer\-lanuch (1),
|
||||||
.BR gstreamer\-register (1),
|
.BR gstreamer\-register (1),
|
||||||
.BR gstreamer\-inspect (1),
|
.BR gstreamer\-inspect (1),
|
||||||
.BR gstreamer\-config (1)
|
.BR gstreamer\-config (1)
|
||||||
.SH AUTHOR
|
.SH "AUTHOR"
|
||||||
The GStreamer team at http://gstreamer.net/
|
The GStreamer team at http://gstreamer.net/
|
||||||
|
|
|
@ -98,9 +98,21 @@ main(int argc, char *argv[])
|
||||||
char **argvn;
|
char **argvn;
|
||||||
gchar *cmdline;
|
gchar *cmdline;
|
||||||
int i;
|
int i;
|
||||||
|
gboolean save_pipeline = FALSE;
|
||||||
|
gboolean run_pipeline = TRUE;
|
||||||
|
gchar *savefile = "";
|
||||||
|
|
||||||
gst_init (&argc, &argv);
|
gst_init (&argc, &argv);
|
||||||
|
|
||||||
|
if (argc >= 3 && !strcmp(argv[1], "-o")) {
|
||||||
|
save_pipeline = TRUE;
|
||||||
|
run_pipeline = FALSE;
|
||||||
|
savefile = argv[2];
|
||||||
|
argv[2] = argv[0];
|
||||||
|
argv+=2;
|
||||||
|
argc-=2;
|
||||||
|
}
|
||||||
|
|
||||||
launch_argc = argc;
|
launch_argc = argc;
|
||||||
launch_argv = argv;
|
launch_argv = argv;
|
||||||
|
|
||||||
|
@ -132,19 +144,22 @@ main(int argc, char *argv[])
|
||||||
|
|
||||||
gst_parse_launch (cmdline, GST_BIN (pipeline));
|
gst_parse_launch (cmdline, GST_BIN (pipeline));
|
||||||
|
|
||||||
|
if (save_pipeline) {
|
||||||
|
xmlSaveFile (savefile, gst_xml_write (pipeline));
|
||||||
|
}
|
||||||
|
if (run_pipeline) {
|
||||||
arg_search(GST_BIN(pipeline),"xid",xid_handler,NULL);
|
arg_search(GST_BIN(pipeline),"xid",xid_handler,NULL);
|
||||||
|
|
||||||
// xmlSaveFile("gstreamer-launch.gst",gst_xml_write(pipeline));
|
|
||||||
|
|
||||||
fprintf(stderr,"RUNNING pipeline\n");
|
fprintf(stderr,"RUNNING pipeline\n");
|
||||||
gst_element_set_state (pipeline, GST_STATE_PLAYING);
|
gst_element_set_state (pipeline, GST_STATE_PLAYING);
|
||||||
|
|
||||||
//g_idle_add(idle_func,pipeline);
|
// g_idle_add(idle_func,pipeline);
|
||||||
// g_main_loop_run (g_main_loop_new (NULL, FALSE));
|
// g_main_loop_run (g_main_loop_new (NULL, FALSE));
|
||||||
while (1)
|
while (1)
|
||||||
gst_bin_iterate (GST_BIN (pipeline));
|
gst_bin_iterate (GST_BIN (pipeline));
|
||||||
|
|
||||||
gst_element_set_state (pipeline, GST_STATE_NULL);
|
gst_element_set_state (pipeline, GST_STATE_NULL);
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue