Add directdrawsink to build and dist it, so it gets built when compiling with MingW on win32 and the required headers...
Original commit message from CVS: Patch by: Vincent Torri <vtorri at univ-evry fr> * configure.ac: * sys/Makefile.am: * sys/directdraw/Makefile.am: Add directdrawsink to build and dist it, so it gets built when compiling with MingW on win32 and the required headers and libraries are available (fixes: #392313). * sys/directdraw/gstdirectdrawsink.c: (gst_directdrawsink_center_rect), (gst_directdrawsink_show_frame), (gst_directdrawsink_setup_ddraw), (gst_directdrawsink_surface_create): Comment out some unused things and fix some printf format issues in order to avoid warnings when buildling with MingW (#392313).
This commit is contained in:
parent
9b1bffb456
commit
e163953b0e
18
ChangeLog
18
ChangeLog
@ -1,3 +1,21 @@
|
|||||||
|
2007-01-03 Tim-Philipp Müller <tim at centricular dot net>
|
||||||
|
|
||||||
|
Patch by: Vincent Torri <vtorri at univ-evry fr>
|
||||||
|
|
||||||
|
* configure.ac:
|
||||||
|
* sys/Makefile.am:
|
||||||
|
* sys/directdraw/Makefile.am:
|
||||||
|
Add directdrawsink to build and dist it, so it gets built when
|
||||||
|
compiling with MingW on win32 and the required headers and libraries
|
||||||
|
are available (fixes: #392313).
|
||||||
|
|
||||||
|
* sys/directdraw/gstdirectdrawsink.c:
|
||||||
|
(gst_directdrawsink_center_rect), (gst_directdrawsink_show_frame),
|
||||||
|
(gst_directdrawsink_setup_ddraw),
|
||||||
|
(gst_directdrawsink_surface_create):
|
||||||
|
Comment out some unused things and fix some printf format issues in
|
||||||
|
order to avoid warnings when buildling with MingW (#392313).
|
||||||
|
|
||||||
2007-01-03 Tim-Philipp Müller <tim at centricular dot net>
|
2007-01-03 Tim-Philipp Müller <tim at centricular dot net>
|
||||||
|
|
||||||
Patch by: Jens Granseuer <jensgr at gmx net>
|
Patch by: Jens Granseuer <jensgr at gmx net>
|
||||||
|
37
configure.ac
37
configure.ac
@ -280,6 +280,42 @@ GST_CHECK_FEATURE(X, [X libraries and plugins],
|
|||||||
CPPFLAGS="$ac_cppflags_save"
|
CPPFLAGS="$ac_cppflags_save"
|
||||||
])
|
])
|
||||||
|
|
||||||
|
dnl DirectDraw
|
||||||
|
translit(dnm, m, l) AM_CONDITIONAL(USE_DIRECTDRAW, true)
|
||||||
|
GST_CHECK_FEATURE(DIRECTDRAW, [DirectDraw plug-in], directdrawsink, [
|
||||||
|
HAVE_DIRECTDRAW="no"
|
||||||
|
AC_CHECK_HEADERS(windows.h ddraw.h, have_ddraw_headers="yes", have_ddraw_headers="no")
|
||||||
|
if test "x$have_ddraw_headers" = "xyes" ; then
|
||||||
|
save_LIBS="$LIBS"
|
||||||
|
LIBS="$LIBS -lddraw -lgdi32"
|
||||||
|
AC_MSG_CHECKING(for DirectDraw LDFLAGS)
|
||||||
|
AC_LINK_IFELSE([
|
||||||
|
#include <windows.h>
|
||||||
|
#include <ddraw.h>
|
||||||
|
|
||||||
|
int main ()
|
||||||
|
{
|
||||||
|
GetStockObject(0);
|
||||||
|
DirectDrawCreate(NULL, NULL, NULL);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
],
|
||||||
|
HAVE_DIRECTDRAW="yes",
|
||||||
|
HAVE_DIRECTDRAW="no")
|
||||||
|
AC_MSG_RESULT($HAVE_DIRECTDRAW)
|
||||||
|
LIBS=$save_LIBS
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "x$HAVE_DIRECTDRAW" = "xyes"; then
|
||||||
|
dnl this is much more than we want
|
||||||
|
DIRECTDRAW_LIBS="-lddraw -lgdi32"
|
||||||
|
AC_SUBST(DIRECTDRAW_CFLAGS)
|
||||||
|
AC_SUBST(DIRECTDRAW_LIBS)
|
||||||
|
fi
|
||||||
|
AC_SUBST(HAVE_DIRECTDRAW)
|
||||||
|
])
|
||||||
|
|
||||||
dnl *** ext plug-ins ***
|
dnl *** ext plug-ins ***
|
||||||
dnl keep this list sorted alphabetically !
|
dnl keep this list sorted alphabetically !
|
||||||
|
|
||||||
@ -851,6 +887,7 @@ gst-libs/gst/Makefile
|
|||||||
sys/Makefile
|
sys/Makefile
|
||||||
sys/glsink/Makefile
|
sys/glsink/Makefile
|
||||||
sys/dvb/Makefile
|
sys/dvb/Makefile
|
||||||
|
sys/directdraw/Makefile
|
||||||
examples/Makefile
|
examples/Makefile
|
||||||
examples/directfb/Makefile
|
examples/directfb/Makefile
|
||||||
ext/amrwb/amrwb-code/Makefile
|
ext/amrwb/amrwb-code/Makefile
|
||||||
|
@ -34,6 +34,12 @@ else
|
|||||||
DVB_DIR=
|
DVB_DIR=
|
||||||
endif
|
endif
|
||||||
|
|
||||||
SUBDIRS = $(GL_DIR) $(DVB_DIR)
|
if USE_DIRECTDRAW
|
||||||
|
DIRECTDRAW_DIR=directdraw
|
||||||
|
else
|
||||||
|
DIRECTDRAW_DIR=
|
||||||
|
endif
|
||||||
|
|
||||||
DIST_SUBDIRS = glsink dvb
|
SUBDIRS = $(GL_DIR) $(DVB_DIR) $(DIRECTDRAW_DIR)
|
||||||
|
|
||||||
|
DIST_SUBDIRS = glsink dvb directdraw
|
||||||
|
9
sys/directdraw/Makefile.am
Normal file
9
sys/directdraw/Makefile.am
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
plugin_LTLIBRARIES = libgstdirectdrawsink.la
|
||||||
|
|
||||||
|
libgstdirectdrawsink_la_SOURCES = gstdirectdrawsink.c gstdirectdrawplugin.c
|
||||||
|
libgstdirectdrawsink_la_CFLAGS = $(GST_CFLAGS) $(GST_BASE_CFLAGS) \
|
||||||
|
$(GST_PLUGINS_BASE_CFLAGS)
|
||||||
|
libgstdirectdrawsink_la_LIBADD = $(DIRECTDRAW_LIBS) \
|
||||||
|
$(GST_BASE_LIBS) $(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_MAJORMINOR) \
|
||||||
|
-lgstinterfaces-$(GST_MAJORMINOR)
|
||||||
|
libgstdirectdrawsink_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
|
@ -168,6 +168,7 @@ gst_ddrawvideosink_get_format_from_caps (GstCaps * caps,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
static GstCaps *
|
static GstCaps *
|
||||||
gst_ddrawvideosink_get_caps_from_format (DDPIXELFORMAT pixel_format)
|
gst_ddrawvideosink_get_caps_from_format (DDPIXELFORMAT pixel_format)
|
||||||
{
|
{
|
||||||
@ -201,6 +202,7 @@ gst_ddrawvideosink_get_caps_from_format (DDPIXELFORMAT pixel_format)
|
|||||||
|
|
||||||
return caps;
|
return caps;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_directdrawsink_center_rect (RECT src, RECT dst, RECT * result)
|
gst_directdrawsink_center_rect (RECT src, RECT dst, RECT * result)
|
||||||
@ -241,7 +243,7 @@ gst_directdrawsink_center_rect (RECT src, RECT dst, RECT * result)
|
|||||||
}
|
}
|
||||||
|
|
||||||
GST_CAT_INFO (directdrawsink_debug,
|
GST_CAT_INFO (directdrawsink_debug,
|
||||||
"source is %dx%d dest is %dx%d, result is %dx%d with x,y %dx%d",
|
"source is %ldx%ld dest is %ldx%ld, result is %ldx%ld with x,y %ldx%ld",
|
||||||
src_width, src_height, dst_width, dst_heigth,
|
src_width, src_height, dst_width, dst_heigth,
|
||||||
result->right - result->left, result->bottom - result->top, result->left,
|
result->right - result->left, result->bottom - result->top, result->left,
|
||||||
result->right);
|
result->right);
|
||||||
@ -1189,8 +1191,7 @@ gst_directdrawsink_show_frame (GstBaseSink * bsink, GstBuffer * buf)
|
|||||||
"IDirectDrawSurface_Blt returned %s", DDErrorString (hRes));
|
"IDirectDrawSurface_Blt returned %s", DDErrorString (hRes));
|
||||||
else
|
else
|
||||||
GST_CAT_INFO (directdrawsink_debug,
|
GST_CAT_INFO (directdrawsink_debug,
|
||||||
"allocated surface was blit to our primary",
|
"allocated surface was blit to our primary");
|
||||||
DDErrorString (hRes));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1212,7 +1213,7 @@ gst_directdrawsink_setup_ddraw (GstDirectDrawSink * ddrawsink)
|
|||||||
/*UUID IDirectDraw7_ID;
|
/*UUID IDirectDraw7_ID;
|
||||||
|
|
||||||
//IDirectDraw_QueryInterface()
|
//IDirectDraw_QueryInterface()
|
||||||
/*create an instance of the ddraw object
|
create an instance of the ddraw object
|
||||||
hRes = DirectDrawCreateEx (DDCREATE_EMULATIONONLY, (void**)&ddrawsink->ddraw_object,
|
hRes = DirectDrawCreateEx (DDCREATE_EMULATIONONLY, (void**)&ddrawsink->ddraw_object,
|
||||||
(REFIID)IID_IDirectDraw7, NULL);
|
(REFIID)IID_IDirectDraw7, NULL);
|
||||||
*/
|
*/
|
||||||
@ -1679,7 +1680,7 @@ gst_directdrawsink_surface_create (GstDirectDrawSink * ddrawsink,
|
|||||||
|
|
||||||
if (surf_lock_desc.lPitch != pitch) {
|
if (surf_lock_desc.lPitch != pitch) {
|
||||||
GST_CAT_INFO (directdrawsink_debug,
|
GST_CAT_INFO (directdrawsink_debug,
|
||||||
"DDraw stride/pitch %d isn't as expected value %d, let's continue allocating buffer.",
|
"DDraw stride/pitch %ld isn't as expected value %d, let's continue allocating buffer.",
|
||||||
surf_lock_desc.lPitch, pitch);
|
surf_lock_desc.lPitch, pitch);
|
||||||
|
|
||||||
/*Unlock the surface as we will change it to use system memory with a GStreamer compatible pitch */
|
/*Unlock the surface as we will change it to use system memory with a GStreamer compatible pitch */
|
||||||
@ -1688,7 +1689,7 @@ gst_directdrawsink_surface_create (GstDirectDrawSink * ddrawsink,
|
|||||||
}
|
}
|
||||||
|
|
||||||
GST_CAT_INFO (directdrawsink_debug,
|
GST_CAT_INFO (directdrawsink_debug,
|
||||||
"allocating a surface of %d bytes (stride=%d)\n", size,
|
"allocating a surface of %d bytes (stride=%ld)\n", size,
|
||||||
surf_lock_desc.lPitch);
|
surf_lock_desc.lPitch);
|
||||||
GST_BUFFER_DATA (surface) = surf_lock_desc.lpSurface;
|
GST_BUFFER_DATA (surface) = surf_lock_desc.lpSurface;
|
||||||
GST_BUFFER_SIZE (surface) = surf_lock_desc.lPitch * surface->height;
|
GST_BUFFER_SIZE (surface) = surf_lock_desc.lPitch * surface->height;
|
||||||
@ -1718,7 +1719,9 @@ gst_directdrawsink_surface_create (GstDirectDrawSink * ddrawsink,
|
|||||||
/* Keep a ref to our sink */
|
/* Keep a ref to our sink */
|
||||||
surface->ddrawsink = gst_object_ref (ddrawsink);
|
surface->ddrawsink = gst_object_ref (ddrawsink);
|
||||||
|
|
||||||
beach:
|
/*
|
||||||
|
beach:
|
||||||
|
*/
|
||||||
return surface;
|
return surface;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user