GstQuery * gst_droid_query_new_video_color_format () { GstQuery *query; GstStructure *structure; structure = gst_structure_new_empty (GST_DROID_VIDEO_COLOR_FORMAT_QUERY_NAME); query = gst_query_new_custom (GST_QUERY_CUSTOM, structure); return query; }
/** * gst_navigation_query_new_angles: * * Create a new #GstNavigation angles query. When executed, it will * query the pipeline for the set of currently available angles, which may be * greater than one in a multiangle video. * * Returns: The new query. */ GstQuery * gst_navigation_query_new_angles (void) { GstQuery *query; GstStructure *structure; structure = gst_structure_new (GST_NAVIGATION_QUERY_NAME, "type", G_TYPE_STRING, "angles", NULL); query = gst_query_new_custom (GST_QUERY_CUSTOM, structure); return query; }
static gboolean progress_buffer_checkgetrange(GstPad *pad) { ProgressBuffer *element = PROGRESS_BUFFER(GST_PAD_PARENT(pad)); #if ENABLE_PULL_MODE gboolean result = FALSE; GstStructure *s = gst_structure_new(GETRANGE_QUERY_NAME, NULL, NULL); GstQuery *query = gst_query_new_custom(GST_QUERY_CUSTOM, s); if (gst_pad_peer_query(pad, query)) result = gst_structure_get_boolean(s, GETRANGE_QUERY_SUPPORTS_FIELDNANE, &result) && result; // INLINE - gst_query_unref() gst_query_unref(query); return result; #else return gst_pad_check_pull_range(element->sinkpad); #endif }
static GstFlowReturn gst_egl_image_buffer_pool_alloc_buffer (GstBufferPool * bpool, GstBuffer ** buffer, GstBufferPoolAcquireParams * params) { GstEGLImageBufferPool *pool = GST_EGL_IMAGE_BUFFER_POOL (bpool); *buffer = NULL; if (!pool->add_metavideo || !pool->want_eglimage) return GST_BUFFER_POOL_CLASS (gst_egl_image_buffer_pool_parent_class)->alloc_buffer (bpool, buffer, params); if (!pool->allocator) return GST_FLOW_NOT_NEGOTIATED; switch (pool->info.finfo->format) { case GST_VIDEO_FORMAT_RGBA:{ GstFlowReturn ret; GstQuery *query; GstStructure *s; const GValue *v; s = gst_structure_new ("eglglessink-allocate-eglimage", "format", GST_TYPE_VIDEO_FORMAT, pool->info.finfo->format, "width", G_TYPE_INT, pool->info.width, "height", G_TYPE_INT, pool->info.height, NULL); query = gst_query_new_custom (GST_QUERY_CUSTOM, s); ret = queue_object (state, GST_MINI_OBJECT_CAST (query), TRUE); if (ret != TRUE || !gst_structure_has_field (s, "buffer")) { GST_WARNING ("Fallback memory allocation"); gst_query_unref (query); return GST_BUFFER_POOL_CLASS (gst_egl_image_buffer_pool_parent_class)->alloc_buffer (bpool, buffer, params); } v = gst_structure_get_value (s, "buffer"); *buffer = GST_BUFFER_CAST (g_value_get_pointer (v)); gst_query_unref (query); if (!*buffer) { GST_WARNING ("Fallback memory allocation"); return GST_BUFFER_POOL_CLASS (gst_egl_image_buffer_pool_parent_class)->alloc_buffer (bpool, buffer, params); } return GST_FLOW_OK; break; } default: return GST_BUFFER_POOL_CLASS (gst_egl_image_buffer_pool_parent_class)->alloc_buffer (bpool, buffer, params); break; } return GST_FLOW_ERROR; }