mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-17 21:06:17 +00:00
[198/906] add fxtest vs8 project
This commit is contained in:
parent
631a06c6ab
commit
352f0d4180
3 changed files with 26 additions and 9 deletions
|
@ -194,11 +194,11 @@ gst_gl_differencematte_draw_texture (GstGLDifferenceMatte * differencematte, GLu
|
||||||
|
|
||||||
glTexCoord2f (0.0, 0.0);
|
glTexCoord2f (0.0, 0.0);
|
||||||
glVertex2f (-1.0, -1.0);
|
glVertex2f (-1.0, -1.0);
|
||||||
glTexCoord2f (filter->width, 0.0);
|
glTexCoord2f ((gfloat)filter->width, 0.0);
|
||||||
glVertex2f (1.0, -1.0);
|
glVertex2f (1.0, -1.0);
|
||||||
glTexCoord2f (filter->width, filter->height);
|
glTexCoord2f ((gfloat)filter->width, (gfloat)filter->height);
|
||||||
glVertex2f (1.0, 1.0);
|
glVertex2f (1.0, 1.0);
|
||||||
glTexCoord2f (0.0, filter->height);
|
glTexCoord2f (0.0, (gfloat)filter->height);
|
||||||
glVertex2f (-1.0, 1.0);
|
glVertex2f (-1.0, 1.0);
|
||||||
|
|
||||||
glEnd ();
|
glEnd ();
|
||||||
|
@ -333,9 +333,9 @@ gst_gl_differencematte_hblur (gint width, gint height, guint texture, gpointer s
|
||||||
{
|
{
|
||||||
GstGLDifferenceMatte* differencematte = GST_GL_DIFFERENCEMATTE (stuff);
|
GstGLDifferenceMatte* differencematte = GST_GL_DIFFERENCEMATTE (stuff);
|
||||||
gfloat gauss_kernel[9] = {
|
gfloat gauss_kernel[9] = {
|
||||||
0.026995, 0.064759, 0.120985,
|
0.026995f, 0.064759f, 0.120985f,
|
||||||
0.176033, 0.199471, 0.176033,
|
0.176033f, 0.199471f, 0.176033f,
|
||||||
0.120985, 0.064759, 0.026995
|
0.120985f, 0.064759f, 0.026995f
|
||||||
};
|
};
|
||||||
|
|
||||||
glMatrixMode (GL_PROJECTION);
|
glMatrixMode (GL_PROJECTION);
|
||||||
|
@ -362,9 +362,9 @@ gst_gl_differencematte_vblur (gint width, gint height, guint texture, gpointer s
|
||||||
{
|
{
|
||||||
GstGLDifferenceMatte* differencematte = GST_GL_DIFFERENCEMATTE (stuff);
|
GstGLDifferenceMatte* differencematte = GST_GL_DIFFERENCEMATTE (stuff);
|
||||||
gfloat gauss_kernel[9] = {
|
gfloat gauss_kernel[9] = {
|
||||||
0.026995, 0.064759, 0.120985,
|
0.026995f, 0.064759f, 0.120985f,
|
||||||
0.176033, 0.199471, 0.176033,
|
0.176033f, 0.199471f, 0.176033f,
|
||||||
0.120985, 0.064759, 0.026995
|
0.120985f, 0.064759f, 0.026995f
|
||||||
};
|
};
|
||||||
|
|
||||||
glMatrixMode (GL_PROJECTION);
|
glMatrixMode (GL_PROJECTION);
|
||||||
|
|
|
@ -2,7 +2,13 @@
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
#include <gdk/gdk.h>
|
#include <gdk/gdk.h>
|
||||||
#include <gdk-pixbuf/gdk-pixbuf.h>
|
#include <gdk-pixbuf/gdk-pixbuf.h>
|
||||||
|
|
||||||
|
#ifdef WIN32
|
||||||
|
#include <gdk/gdkwin32.h>
|
||||||
|
#else
|
||||||
#include <gdk/gdkx.h>
|
#include <gdk/gdkx.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <gst/interfaces/xoverlay.h>
|
#include <gst/interfaces/xoverlay.h>
|
||||||
|
|
||||||
|
|
||||||
|
@ -13,7 +19,12 @@ expose_cb (GtkWidget * widget, GdkEventExpose * event, gpointer data)
|
||||||
GstXOverlay *overlay =
|
GstXOverlay *overlay =
|
||||||
GST_X_OVERLAY (gst_bin_get_by_interface (GST_BIN (data),
|
GST_X_OVERLAY (gst_bin_get_by_interface (GST_BIN (data),
|
||||||
GST_TYPE_X_OVERLAY));
|
GST_TYPE_X_OVERLAY));
|
||||||
|
#ifdef WIN32
|
||||||
|
gst_x_overlay_set_xwindow_id (overlay, (gulong)GDK_WINDOW_HWND(widget->window));
|
||||||
|
#else
|
||||||
gst_x_overlay_set_xwindow_id (overlay, GDK_WINDOW_XWINDOW (widget->window));
|
gst_x_overlay_set_xwindow_id (overlay, GDK_WINDOW_XWINDOW (widget->window));
|
||||||
|
#endif
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,13 @@
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
#include <gdk/gdk.h>
|
#include <gdk/gdk.h>
|
||||||
#include <gdk-pixbuf/gdk-pixbuf.h>
|
#include <gdk-pixbuf/gdk-pixbuf.h>
|
||||||
|
|
||||||
|
#ifdef WIN32
|
||||||
|
#include <gdk/gdkwin32.h>
|
||||||
|
#else
|
||||||
#include <gdk/gdkx.h>
|
#include <gdk/gdkx.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <gst/interfaces/xoverlay.h>
|
#include <gst/interfaces/xoverlay.h>
|
||||||
|
|
||||||
static gint delay = 0;
|
static gint delay = 0;
|
||||||
|
|
Loading…
Reference in a new issue