mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-23 15:48:23 +00:00
glcolorconvert: add support for converting texture targets
Solved with a simple shader templating mechanism and string replacements of the necessary sampler types/texture accesses and texture coordinate mangling for rectangular and external-oes textures.
This commit is contained in:
parent
681cb5b16d
commit
6141d3fc7e
3 changed files with 573 additions and 355 deletions
|
@ -238,18 +238,8 @@ static GstCaps *
|
|||
gst_gl_color_convert_element_fixate_caps (GstBaseTransform *
|
||||
bt, GstPadDirection direction, GstCaps * caps, GstCaps * othercaps)
|
||||
{
|
||||
GstGLContext *context = GST_GL_BASE_FILTER (bt)->context;
|
||||
GstCaps *ret;
|
||||
|
||||
ret =
|
||||
GST_BASE_TRANSFORM_CLASS
|
||||
(gst_gl_color_convert_element_parent_class)->fixate_caps (bt, direction,
|
||||
caps, othercaps);
|
||||
|
||||
if (direction == GST_PAD_SINK) {
|
||||
if (gst_caps_is_subset (caps, ret)) {
|
||||
gst_caps_replace (&ret, caps);
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
return gst_gl_color_convert_fixate_caps (context, direction, caps, othercaps);
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -100,7 +100,7 @@ struct _GstGLColorConvertClass
|
|||
"width = " GST_VIDEO_SIZE_RANGE ", " \
|
||||
"height = " GST_VIDEO_SIZE_RANGE ", " \
|
||||
"framerate = " GST_VIDEO_FPS_RANGE ", " \
|
||||
"texture-target = (string) 2D " \
|
||||
"texture-target = (string) { 2D, rectangle, oes } " \
|
||||
" ; " \
|
||||
"video/x-raw(" GST_CAPS_FEATURE_MEMORY_GL_MEMORY "," \
|
||||
GST_CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION "), " \
|
||||
|
@ -108,7 +108,7 @@ struct _GstGLColorConvertClass
|
|||
"width = " GST_VIDEO_SIZE_RANGE ", " \
|
||||
"height = " GST_VIDEO_SIZE_RANGE ", " \
|
||||
"framerate = " GST_VIDEO_FPS_RANGE ", " \
|
||||
"texture-target = (string) 2D"
|
||||
"texture-target = (string) { 2D, rectangle, oes }"
|
||||
|
||||
GstGLColorConvert * gst_gl_color_convert_new (GstGLContext * context);
|
||||
|
||||
|
@ -116,6 +116,10 @@ GstCaps * gst_gl_color_convert_transform_caps (GstGLContext * convert,
|
|||
GstPadDirection direction,
|
||||
GstCaps * caps,
|
||||
GstCaps * filter);
|
||||
GstCaps * gst_gl_color_convert_fixate_caps (GstGLContext * convert,
|
||||
GstPadDirection direction,
|
||||
GstCaps * caps,
|
||||
GstCaps * other);
|
||||
gboolean gst_gl_color_convert_set_caps (GstGLColorConvert * convert,
|
||||
GstCaps * in_caps,
|
||||
GstCaps * out_caps);
|
||||
|
|
Loading…
Reference in a new issue