diff options
author | David Schleef <ds@schleef.org> | 2007-12-22 05:01:58 +0000 |
---|---|---|
committer | David Schleef <ds@schleef.org> | 2007-12-22 05:01:58 +0000 |
commit | 11b0b3dd23e7f44adeea7639a515f6d00f96df82 (patch) | |
tree | 63e4a96e8f99635b5d82dbc95c059455c659bbf0 /sys/glsink/gstglupload.c | |
parent | 21962cbffe8d7255726b34bfc3a773ffcc3fa43b (diff) | |
download | gst-plugins-bad-11b0b3dd23e7f44adeea7639a515f6d00f96df82.tar.gz gst-plugins-bad-11b0b3dd23e7f44adeea7639a515f6d00f96df82.tar.bz2 gst-plugins-bad-11b0b3dd23e7f44adeea7639a515f6d00f96df82.zip |
sys/glsink/: A careful read of the documentation reveals that I can't use renderbuffers as textures. Duh. Checkpoin...
Original commit message from CVS:
* sys/glsink/glextensions.c:
* sys/glsink/glextensions.h:
* sys/glsink/glvideo.c:
* sys/glsink/glvideo.h:
* sys/glsink/gstglbuffer.c:
* sys/glsink/gstgldownload.c:
* sys/glsink/gstglupload.c:
A careful read of the documentation reveals that I can't use
renderbuffers as textures. Duh. Checkpoint because I'm about
to rewrite a bunch of code.
Diffstat (limited to 'sys/glsink/gstglupload.c')
-rw-r--r-- | sys/glsink/gstglupload.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/sys/glsink/gstglupload.c b/sys/glsink/gstglupload.c index 81d73175..1b0d78f1 100644 --- a/sys/glsink/gstglupload.c +++ b/sys/glsink/gstglupload.c @@ -53,6 +53,8 @@ struct _GstGLUpload GstVideoFormat format; int width; int height; + + gboolean peek; }; struct _GstGLUploadClass @@ -78,7 +80,7 @@ static GstStaticPadTemplate gst_gl_upload_sink_pad_template = GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, - GST_STATIC_CAPS (GST_VIDEO_CAPS_BGRx) + GST_STATIC_CAPS (GST_VIDEO_CAPS_RGB) ); enum @@ -176,7 +178,8 @@ gst_gl_upload_reset (GstGLUpload * upload) g_object_unref (upload->display); upload->display = NULL; } - upload->format = GST_VIDEO_FORMAT_BGRx; + upload->format = GST_VIDEO_FORMAT_RGB; + upload->peek = TRUE; } static gboolean @@ -184,7 +187,7 @@ gst_gl_upload_start (GstGLUpload * upload) { gboolean ret; - upload->format = GST_VIDEO_FORMAT_BGRx; + upload->format = GST_VIDEO_FORMAT_RGB; upload->display = gst_gl_display_new (); ret = gst_gl_display_connect (upload->display, NULL); @@ -247,6 +250,12 @@ gst_gl_upload_chain (GstPad * pad, GstBuffer * buf) GST_DEBUG ("uploading %p size %d", GST_BUFFER_DATA (buf), GST_BUFFER_SIZE (buf)); gst_gl_buffer_upload (outbuf, GST_BUFFER_DATA (buf)); + gst_buffer_unref (buf); + + if (upload->peek) { + gst_gl_display_draw_rbo (outbuf->display, outbuf->rbo, + outbuf->width, outbuf->height); + } gst_pad_push (upload->srcpad, GST_BUFFER (outbuf)); |