diff options
author | David Schleef <ds@schleef.org> | 2007-12-27 05:26:05 +0000 |
---|---|---|
committer | David Schleef <ds@schleef.org> | 2007-12-27 05:26:05 +0000 |
commit | f7bf973cc0fe86d1707981b8033f2429a834315d (patch) | |
tree | 4083a4f0af6ce6c86e25a434a3868ab11b91a27b /sys/glsink/gstglupload.c | |
parent | 2b704cae584bb3f0749389d57e52dddac32ab89f (diff) | |
download | gst-plugins-bad-f7bf973cc0fe86d1707981b8033f2429a834315d.tar.gz gst-plugins-bad-f7bf973cc0fe86d1707981b8033f2429a834315d.tar.bz2 gst-plugins-bad-f7bf973cc0fe86d1707981b8033f2429a834315d.zip |
sys/glsink/: Change glimagesink over to using GL buffers. This breaks glimagesink for normal operation, but should b...
Original commit message from CVS:
* sys/glsink/glimagesink.c:
* sys/glsink/gstglupload.c:
Change glimagesink over to using GL buffers. This breaks
glimagesink for normal operation, but should be fixed soon.
Diffstat (limited to 'sys/glsink/gstglupload.c')
-rw-r--r-- | sys/glsink/gstglupload.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/sys/glsink/gstglupload.c b/sys/glsink/gstglupload.c index cab99359..2405d61f 100644 --- a/sys/glsink/gstglupload.c +++ b/sys/glsink/gstglupload.c @@ -214,10 +214,14 @@ gst_gl_upload_sink_setcaps (GstPad * pad, GstCaps * caps) int width; gboolean ret; GstCaps *srccaps; + int fps_n, fps_d; + int par_n, par_d; upload = GST_GL_UPLOAD (gst_pad_get_parent (pad)); ret = gst_video_format_parse_caps (caps, &video_format, &width, &height); + ret &= gst_video_parse_caps_framerate (caps, &fps_n, &fps_d); + if (!ret) return FALSE; @@ -227,8 +231,16 @@ gst_gl_upload_sink_setcaps (GstPad * pad, GstCaps * caps) GST_DEBUG ("setcaps %d %d %d", video_format, width, height); + par_n = 1; + par_d = 1; + gst_video_parse_caps_pixel_aspect_ratio (caps, &par_n, &par_d); + srccaps = gst_caps_new_simple ("video/x-raw-gl", - "width", G_TYPE_INT, width, "height", G_TYPE_INT, height, NULL); + "format", G_TYPE_INT, 0, + "width", G_TYPE_INT, width, "height", G_TYPE_INT, height, + "framerate", GST_TYPE_FRACTION, fps_n, fps_d, + "pixel-aspect-ratio", GST_TYPE_FRACTION, par_n, par_d, NULL); + ret = gst_pad_set_caps (upload->srcpad, srccaps); gst_caps_unref (srccaps); |