diff options
author | David Schleef <ds@schleef.org> | 2007-12-21 00:03:11 +0000 |
---|---|---|
committer | David Schleef <ds@schleef.org> | 2007-12-21 00:03:11 +0000 |
commit | bb4e1d10e99c206fdf0ca22a43ef20efa24236ef (patch) | |
tree | 5d99e25822404edf4c91fd1e96ee33be00cee66b /sys/glsink/glimagesink.c | |
parent | 1bc2202132e729b40e002eb98520ee7b2a788149 (diff) | |
download | gst-plugins-bad-bb4e1d10e99c206fdf0ca22a43ef20efa24236ef.tar.gz gst-plugins-bad-bb4e1d10e99c206fdf0ca22a43ef20efa24236ef.tar.bz2 gst-plugins-bad-bb4e1d10e99c206fdf0ca22a43ef20efa24236ef.zip |
sys/glsink/: Switch to using framebuffer_objects instead of GLXPixmaps, because that's what my driver supports. Remo...
Original commit message from CVS:
* sys/glsink/Makefile.am:
* sys/glsink/glextensions.c:
* sys/glsink/glextensions.h:
* sys/glsink/glimagesink.c:
* sys/glsink/glimagesink.h:
* sys/glsink/glvideo.c:
* sys/glsink/glvideo.h:
* sys/glsink/gstglbuffer.c:
* sys/glsink/gstglbuffer.h:
* sys/glsink/gstgldownload.c:
* sys/glsink/gstglfilter.c:
* sys/glsink/gstglupload.c:
* sys/glsink/gstopengl.c:
Switch to using framebuffer_objects instead of GLXPixmaps,
because that's what my driver supports. Remove GLDrawable,
since GstGLDisplay now has a default drawable and context.
Diffstat (limited to 'sys/glsink/glimagesink.c')
-rw-r--r-- | sys/glsink/glimagesink.c | 29 |
1 files changed, 9 insertions, 20 deletions
diff --git a/sys/glsink/glimagesink.c b/sys/glsink/glimagesink.c index 8df11e00..560a523f 100644 --- a/sys/glsink/glimagesink.c +++ b/sys/glsink/glimagesink.c @@ -282,27 +282,22 @@ static gboolean gst_glimage_sink_start (GstBaseSink * bsink) { GstGLImageSink *glimage_sink; + gboolean ret; GST_DEBUG ("start"); glimage_sink = GST_GLIMAGE_SINK (bsink); - glimage_sink->display = gst_gl_display_new (glimage_sink->display_name); - if (glimage_sink->display == NULL) { + glimage_sink->display = gst_gl_display_new (); + ret = gst_gl_display_connect (glimage_sink->display, + glimage_sink->display_name); + if (!ret) { GST_ERROR ("failed to open display"); return FALSE; } if (glimage_sink->window_id) { - glimage_sink->drawable = - gst_gl_drawable_new_from_window (glimage_sink->display, - glimage_sink->window_id); - } else { - glimage_sink->drawable = gst_gl_drawable_new_window (glimage_sink->display); - } - if (glimage_sink->drawable == NULL) { - GST_ERROR ("failed to create window"); - return FALSE; + gst_gl_display_set_window (glimage_sink->display, glimage_sink->window_id); } GST_DEBUG ("start done"); @@ -319,11 +314,9 @@ gst_glimage_sink_stop (GstBaseSink * bsink) glimage_sink = GST_GLIMAGE_SINK (bsink); - gst_gl_drawable_free (glimage_sink->drawable); - gst_gl_display_free (glimage_sink->display); + g_object_unref (glimage_sink->display); glimage_sink->display = NULL; - glimage_sink->drawable = NULL; return TRUE; } @@ -461,7 +454,7 @@ gst_glimage_sink_render (GstBaseSink * bsink, GstBuffer * buf) glimage_sink = GST_GLIMAGE_SINK (bsink); - gst_gl_drawable_draw_image (glimage_sink->drawable, + gst_gl_display_draw_image (glimage_sink->display, glimage_sink->type, GST_BUFFER_DATA (buf), GST_VIDEO_SINK_WIDTH (glimage_sink), GST_VIDEO_SINK_HEIGHT (glimage_sink)); @@ -495,11 +488,7 @@ gst_glimage_sink_set_xwindow_id (GstXOverlay * overlay, XID window_id) return; } glimage_sink->window_id = window_id; - if (glimage_sink->drawable) { - gst_gl_drawable_free (glimage_sink->drawable); - glimage_sink->drawable = - gst_gl_drawable_new_from_window (glimage_sink->display, window_id); - } + gst_gl_display_set_window (glimage_sink->display, glimage_sink->window_id); } static void |