typedef void (*GLCB) (gint, gint, guint, gpointer stuff);
typedef void (*GLCB_V2) (gpointer stuff);
-#define GST_GL_DISPLAY_ERR_MSG(obj) (GST_GL_DISPLAY_CAST(obj)->error_message)
+#define GST_GL_DISPLAY_ERR_MSG(obj) ("%s", GST_GL_DISPLAY_CAST(obj)->error_message)
struct _GstGLDisplay
{
if (!isPerformed)
GST_ELEMENT_ERROR (filter, RESOURCE, NOT_FOUND,
- (GST_GL_DISPLAY_ERR_MSG (filter->display)), (NULL));
+ GST_GL_DISPLAY_ERR_MSG (filter->display), (NULL));
}
}
if (!ret) {
GST_ELEMENT_ERROR (filter, RESOURCE, NOT_FOUND,
- (GST_GL_DISPLAY_ERR_MSG (filter->display)), (NULL));
+ GST_GL_DISPLAY_ERR_MSG (filter->display), (NULL));
return FALSE;
}
if (!ret) {
GST_ELEMENT_ERROR (filter, RESOURCE, NOT_FOUND,
- (GST_GL_DISPLAY_ERR_MSG (filter->display)), (NULL));
+ GST_GL_DISPLAY_ERR_MSG (filter->display), (NULL));
return FALSE;
}
if (!ret) {
GST_ELEMENT_ERROR (filter, RESOURCE, NOT_FOUND,
- (GST_GL_DISPLAY_ERR_MSG (filter->display)), (NULL));
+ GST_GL_DISPLAY_ERR_MSG (filter->display), (NULL));
return FALSE;
}
sink_pad->display, NULL);
else
GST_ELEMENT_ERROR (mix, RESOURCE, NOT_FOUND,
- (GST_GL_DISPLAY_ERR_MSG (sink_pad->display)), (NULL));
+ GST_GL_DISPLAY_ERR_MSG (sink_pad->display), (NULL));
/* does not work:
* res = gst_pad_query_default (GST_PAD_CAST (sink_pad), query);*/
if (!gst_gl_display_gen_fbo (mix->display, mix->width, mix->height,
&mix->fbo, &mix->depthbuffer)) {
GST_ELEMENT_ERROR (mix, RESOURCE, NOT_FOUND,
- (GST_GL_DISPLAY_ERR_MSG (mix->display)), (NULL));
+ GST_GL_DISPLAY_ERR_MSG (mix->display), (NULL));
gst_object_unref (mix);
return FALSE;
}
gst_gl_display_set_error (GST_GL_FILTER (effects)->display,
"Failed to initialize bulge shader");
GST_ELEMENT_ERROR (effects, RESOURCE, NOT_FOUND,
- (GST_GL_DISPLAY_ERR_MSG (GST_GL_FILTER (effects)->display)), (NULL));
+ GST_GL_DISPLAY_ERR_MSG (GST_GL_FILTER (effects)->display), (NULL));
return;
}
gst_gl_display_set_error (GST_GL_FILTER (effects)->display,
"Failed to initialize fisheye shader");
GST_ELEMENT_ERROR (effects, RESOURCE, NOT_FOUND,
- (GST_GL_DISPLAY_ERR_MSG (GST_GL_FILTER (effects)->display)), (NULL));
+ GST_GL_DISPLAY_ERR_MSG (GST_GL_FILTER (effects)->display), (NULL));
return;
}
gst_gl_display_set_error (GST_GL_FILTER (effects)->display,
"Failed to initialize luma threshold shader");
GST_ELEMENT_ERROR (effects, RESOURCE, NOT_FOUND,
- (GST_GL_DISPLAY_ERR_MSG (GST_GL_FILTER (effects)->display)), (NULL));
+ GST_GL_DISPLAY_ERR_MSG (GST_GL_FILTER (effects)->display), (NULL));
return;
}
gst_gl_display_set_error (GST_GL_FILTER (effects)->display,
"Failed to initialize hconv7 shader");
GST_ELEMENT_ERROR (effects, RESOURCE, NOT_FOUND,
- (GST_GL_DISPLAY_ERR_MSG (GST_GL_FILTER (effects)->display)), (NULL));
+ GST_GL_DISPLAY_ERR_MSG (GST_GL_FILTER (effects)->display), (NULL));
return;
}
gst_gl_display_set_error (GST_GL_FILTER (effects)->display,
"Failed to initialize vcon7 shader");
GST_ELEMENT_ERROR (effects, RESOURCE, NOT_FOUND,
- (GST_GL_DISPLAY_ERR_MSG (GST_GL_FILTER (effects)->display)), (NULL));
+ GST_GL_DISPLAY_ERR_MSG (GST_GL_FILTER (effects)->display), (NULL));
return;
}
gst_gl_display_set_error (GST_GL_FILTER (effects)->display,
"Failed to initialize sum shader");
GST_ELEMENT_ERROR (effects, RESOURCE, NOT_FOUND,
- (GST_GL_DISPLAY_ERR_MSG (GST_GL_FILTER (effects)->display)), (NULL));
+ GST_GL_DISPLAY_ERR_MSG (GST_GL_FILTER (effects)->display), (NULL));
return;
}
gst_gl_display_set_error (GST_GL_FILTER (effects)->display,
"Failed to initialize luma to curve shader");
GST_ELEMENT_ERROR (effects, RESOURCE, NOT_FOUND,
- (GST_GL_DISPLAY_ERR_MSG (GST_GL_FILTER (effects)->display)), (NULL));
+ GST_GL_DISPLAY_ERR_MSG (GST_GL_FILTER (effects)->display), (NULL));
return;
}
error = NULL;
gst_gl_shader_use (NULL);
GST_ELEMENT_ERROR (effects, RESOURCE, NOT_FOUND,
- (GST_GL_DISPLAY_ERR_MSG (GST_GL_FILTER (effects)->display)),
- (NULL));
+ GST_GL_DISPLAY_ERR_MSG (GST_GL_FILTER (effects)->display), (NULL));
} else {
effects->draw_attr_position_loc =
gst_gl_shader_get_attribute_location (shader, "a_position");
gst_gl_display_set_error (GST_GL_FILTER (effects)->display,
"Failed to initialize mirror shader");
GST_ELEMENT_ERROR (effects, RESOURCE, NOT_FOUND,
- (GST_GL_DISPLAY_ERR_MSG (GST_GL_FILTER (effects)->display)), (NULL));
+ GST_GL_DISPLAY_ERR_MSG (GST_GL_FILTER (effects)->display), (NULL));
return;
}
gst_gl_display_set_error (GST_GL_FILTER (effects)->display,
"Failed to initialize rgb to curve shader");
GST_ELEMENT_ERROR (effects, RESOURCE, NOT_FOUND,
- (GST_GL_DISPLAY_ERR_MSG (GST_GL_FILTER (effects)->display)), (NULL));
+ GST_GL_DISPLAY_ERR_MSG (GST_GL_FILTER (effects)->display), (NULL));
return;
}
gst_gl_display_set_error (GST_GL_FILTER (effects)->display,
"Failed to initialize sin shader");
GST_ELEMENT_ERROR (effects, RESOURCE, NOT_FOUND,
- (GST_GL_DISPLAY_ERR_MSG (GST_GL_FILTER (effects)->display)), (NULL));
+ GST_GL_DISPLAY_ERR_MSG (GST_GL_FILTER (effects)->display), (NULL));
return;
}
gst_gl_display_set_error (GST_GL_FILTER (effects)->display,
"Failed to initialize square shader");
GST_ELEMENT_ERROR (effects, RESOURCE, NOT_FOUND,
- (GST_GL_DISPLAY_ERR_MSG (GST_GL_FILTER (effects)->display)), (NULL));
+ GST_GL_DISPLAY_ERR_MSG (GST_GL_FILTER (effects)->display), (NULL));
return;
}
error = NULL;
gst_gl_shader_use (NULL);
GST_ELEMENT_ERROR (effects, RESOURCE, NOT_FOUND,
- (GST_GL_DISPLAY_ERR_MSG (GST_GL_FILTER (effects)->display)),
- (NULL));
+ GST_GL_DISPLAY_ERR_MSG (GST_GL_FILTER (effects)->display), (NULL));
} else {
effects->draw_attr_position_loc =
gst_gl_shader_get_attribute_location (shader, "a_position");
gst_gl_display_set_error (GST_GL_FILTER (effects)->display,
"Failed to initialize squeeze shader");
GST_ELEMENT_ERROR (effects, RESOURCE, NOT_FOUND,
- (GST_GL_DISPLAY_ERR_MSG (GST_GL_FILTER (effects)->display)), (NULL));
+ GST_GL_DISPLAY_ERR_MSG (GST_GL_FILTER (effects)->display), (NULL));
return;
}
glMatrixMode (GL_PROJECTION);
gst_gl_display_set_error (GST_GL_FILTER (effects)->display,
"Failed to initialize stretch shader");
GST_ELEMENT_ERROR (effects, RESOURCE, NOT_FOUND,
- (GST_GL_DISPLAY_ERR_MSG (GST_GL_FILTER (effects)->display)), (NULL));
+ GST_GL_DISPLAY_ERR_MSG (GST_GL_FILTER (effects)->display), (NULL));
return;
}
gst_gl_display_set_error (GST_GL_FILTER (effects)->display,
"Failed to initialize tunnel shader");
GST_ELEMENT_ERROR (effects, RESOURCE, NOT_FOUND,
- (GST_GL_DISPLAY_ERR_MSG (GST_GL_FILTER (effects)->display)), (NULL));
+ GST_GL_DISPLAY_ERR_MSG (GST_GL_FILTER (effects)->display), (NULL));
return;
}
gst_gl_display_set_error (GST_GL_FILTER (effects)->display,
"Failed to initialize twirl shader");
GST_ELEMENT_ERROR (effects, RESOURCE, NOT_FOUND,
- (GST_GL_DISPLAY_ERR_MSG (GST_GL_FILTER (effects)->display)), (NULL));
+ GST_GL_DISPLAY_ERR_MSG (GST_GL_FILTER (effects)->display), (NULL));
return;
}
gst_gl_display_set_error (GST_GL_FILTER (effects)->display,
"Failed to initialize hconv7 shader");
GST_ELEMENT_ERROR (effects, RESOURCE, NOT_FOUND,
- (GST_GL_DISPLAY_ERR_MSG (GST_GL_FILTER (effects)->display)), (NULL));
+ GST_GL_DISPLAY_ERR_MSG (GST_GL_FILTER (effects)->display), (NULL));
return;
}
gst_gl_display_set_error (GST_GL_FILTER (effects)->display,
"Failed to initialize vconv7 shader");
GST_ELEMENT_ERROR (effects, RESOURCE, NOT_FOUND,
- (GST_GL_DISPLAY_ERR_MSG (GST_GL_FILTER (effects)->display)), (NULL));
+ GST_GL_DISPLAY_ERR_MSG (GST_GL_FILTER (effects)->display), (NULL));
return;
}
gst_gl_display_set_error (GST_GL_FILTER (effects)->display,
"Failed to initialize desaturate shader");
GST_ELEMENT_ERROR (effects, RESOURCE, NOT_FOUND,
- (GST_GL_DISPLAY_ERR_MSG (GST_GL_FILTER (effects)->display)), (NULL));
+ GST_GL_DISPLAY_ERR_MSG (GST_GL_FILTER (effects)->display), (NULL));
return;
}
gst_gl_display_set_error (GST_GL_FILTER (effects)->display,
"Failed to initialize sobel hvonc3 shader");
GST_ELEMENT_ERROR (effects, RESOURCE, NOT_FOUND,
- (GST_GL_DISPLAY_ERR_MSG (GST_GL_FILTER (effects)->display)), (NULL));
+ GST_GL_DISPLAY_ERR_MSG (GST_GL_FILTER (effects)->display), (NULL));
return;
}
gst_gl_display_set_error (GST_GL_FILTER (effects)->display,
"Failed to initialize sobel vconv3 shader");
GST_ELEMENT_ERROR (effects, RESOURCE, NOT_FOUND,
- (GST_GL_DISPLAY_ERR_MSG (GST_GL_FILTER (effects)->display)), (NULL));
+ GST_GL_DISPLAY_ERR_MSG (GST_GL_FILTER (effects)->display), (NULL));
return;
}
gst_gl_display_set_error (GST_GL_FILTER (effects)->display,
"Failed to initialize seobel length shader");
GST_ELEMENT_ERROR (effects, RESOURCE, NOT_FOUND,
- (GST_GL_DISPLAY_ERR_MSG (GST_GL_FILTER (effects)->display)), (NULL));
+ GST_GL_DISPLAY_ERR_MSG (GST_GL_FILTER (effects)->display), (NULL));
return;
}
gst_gl_display_set_error (GST_GL_FILTER (effects)->display,
"Failed to initialize multiply shader");
GST_ELEMENT_ERROR (effects, RESOURCE, NOT_FOUND,
- (GST_GL_DISPLAY_ERR_MSG (GST_GL_FILTER (effects)->display)), (NULL));
+ GST_GL_DISPLAY_ERR_MSG (GST_GL_FILTER (effects)->display), (NULL));
return;
}
if (!ret) {
GST_ELEMENT_ERROR (colorscale, RESOURCE, NOT_FOUND,
- (GST_GL_DISPLAY_ERR_MSG (colorscale->display)), (NULL));
+ GST_GL_DISPLAY_ERR_MSG (colorscale->display), (NULL));
return FALSE;
}
//blocking call, init colorspace conversion if needed
if (!ret) {
GST_ELEMENT_ERROR (colorscale, RESOURCE, NOT_FOUND,
- (GST_GL_DISPLAY_ERR_MSG (colorscale->display)), (NULL));
+ GST_GL_DISPLAY_ERR_MSG (colorscale->display), (NULL));
return FALSE;
}
//blocking call, init colorspace conversion if needed
if (!ret)
GST_ELEMENT_ERROR (colorscale, RESOURCE, NOT_FOUND,
- (GST_GL_DISPLAY_ERR_MSG (colorscale->display)), (NULL));
+ GST_GL_DISPLAY_ERR_MSG (colorscale->display), (NULL));
return ret;
}
gst_gl_display_set_error (GST_GL_FILTER (differencematte)->display,
"Failed to initialize difference shader");
GST_ELEMENT_ERROR (differencematte, RESOURCE, NOT_FOUND,
- (GST_GL_DISPLAY_ERR_MSG (GST_GL_FILTER (differencematte)->display)),
+ GST_GL_DISPLAY_ERR_MSG (GST_GL_FILTER (differencematte)->display),
(NULL));
return;
}
gst_gl_display_set_error (GST_GL_FILTER (differencematte)->display,
"Failed to initialize hconv7 shader");
GST_ELEMENT_ERROR (differencematte, RESOURCE, NOT_FOUND,
- (GST_GL_DISPLAY_ERR_MSG (GST_GL_FILTER (differencematte)->display)),
+ GST_GL_DISPLAY_ERR_MSG (GST_GL_FILTER (differencematte)->display),
(NULL));
return;
}
gst_gl_display_set_error (GST_GL_FILTER (differencematte)->display,
"Failed to initialize vconv7 shader");
GST_ELEMENT_ERROR (differencematte, RESOURCE, NOT_FOUND,
- (GST_GL_DISPLAY_ERR_MSG (GST_GL_FILTER (differencematte)->display)),
+ GST_GL_DISPLAY_ERR_MSG (GST_GL_FILTER (differencematte)->display),
(NULL));
return;
}
gst_gl_display_set_error (GST_GL_FILTER (differencematte)->display,
"Failed to initialize interp shader");
GST_ELEMENT_ERROR (differencematte, RESOURCE, NOT_FOUND,
- (GST_GL_DISPLAY_ERR_MSG (GST_GL_FILTER (differencematte)->display)),
+ GST_GL_DISPLAY_ERR_MSG (GST_GL_FILTER (differencematte)->display),
(NULL));
return;
}
download->display = gst_gl_display_new ();
if (!gst_gl_display_create_context (download->display, 0)) {
GST_ELEMENT_ERROR (download, RESOURCE, NOT_FOUND,
- (GST_GL_DISPLAY_ERR_MSG (download->display)), (NULL));
+ GST_GL_DISPLAY_ERR_MSG (download->display), (NULL));
return FALSE;
}
download->width, download->height);
if (!ret)
GST_ELEMENT_ERROR (download, RESOURCE, NOT_FOUND,
- (GST_GL_DISPLAY_ERR_MSG (download->display)), (NULL));
+ GST_GL_DISPLAY_ERR_MSG (download->display), (NULL));
return ret;
}
ok = gst_gl_display_create_context (glimage_sink->display, 0);
if (!ok) {
GST_ELEMENT_ERROR (glimage_sink, RESOURCE, NOT_FOUND,
- (GST_GL_DISPLAY_ERR_MSG (glimage_sink->display)), (NULL));
+ GST_GL_DISPLAY_ERR_MSG (glimage_sink->display), (NULL));
if (glimage_sink->display) {
g_object_unref (glimage_sink->display);
if (!ok) {
GST_ELEMENT_ERROR (glimage_sink, RESOURCE, NOT_FOUND,
- (GST_GL_DISPLAY_ERR_MSG (glimage_sink->display)), (NULL));
+ GST_GL_DISPLAY_ERR_MSG (glimage_sink->display), (NULL));
return FALSE;
}
}
return GST_FLOW_OK;
else {
GST_ELEMENT_ERROR (glimage_sink, RESOURCE, NOT_FOUND,
- (GST_GL_DISPLAY_ERR_MSG (glimage_sink->display)), (NULL));
+ GST_GL_DISPLAY_ERR_MSG (glimage_sink->display), (NULL));
return GST_FLOW_ERROR;
}
}
if (!res)
GST_ELEMENT_ERROR (gltestsrc, RESOURCE, NOT_FOUND,
- (GST_GL_DISPLAY_ERR_MSG (gltestsrc->display)), (NULL));
+ GST_GL_DISPLAY_ERR_MSG (gltestsrc->display), (NULL));
}
return res;
}
if (!isPerformed)
GST_ELEMENT_ERROR (src, RESOURCE, NOT_FOUND,
- (GST_GL_DISPLAY_ERR_MSG (src->display)), (NULL));
+ GST_GL_DISPLAY_ERR_MSG (src->display), (NULL));
}
}
if (!isPerformed)
GST_ELEMENT_ERROR (upload, RESOURCE, NOT_FOUND,
- (GST_GL_DISPLAY_ERR_MSG (upload->display)), (NULL));
+ GST_GL_DISPLAY_ERR_MSG (upload->display), (NULL));
}
}
if (!ret)
GST_ELEMENT_ERROR (upload, RESOURCE, NOT_FOUND,
- (GST_GL_DISPLAY_ERR_MSG (upload->display)), (NULL));
+ GST_GL_DISPLAY_ERR_MSG (upload->display), (NULL));
return ret;
}