}
static gboolean
-_src_shader_init (gpointer impl, GstGLContext * context, GstVideoInfo * v_info)
+_src_shader_init (gpointer impl, GstGLContext * context,
+ const GstVideoInfo * v_info)
{
struct SrcShader *src = impl;
const GstGLFuncs *gl = context->gl_vtable;
" out_uv = position.xy;\n"
"}";
-static const gchar *snow_fragment_src =
+static const gchar *snow_fragment_src =
"uniform float time;\n"
"varying vec2 out_uv;\n"
"\n"
}
static gboolean
-_src_smpte_init (gpointer impl, GstGLContext * context, GstVideoInfo * v_info)
+_src_smpte_init (gpointer impl, GstGLContext * context,
+ const GstVideoInfo * v_info)
{
struct SrcSMPTE *src = impl;
struct XYZWRGB *coord;
static gboolean
_src_uni_color_init (gpointer impl, GstGLContext * context,
- GstVideoInfo * v_info)
+ const GstVideoInfo * v_info)
{
struct SrcUniColor *src = impl;
static gboolean
_src_checkers_init (gpointer impl, GstGLContext * context,
- GstVideoInfo * v_info)
+ const GstVideoInfo * v_info)
{
struct SrcCheckers *src = impl;
GError *error = NULL;
SRC_CHECKERS (8);
static gboolean
-_src_snow_init (gpointer impl, GstGLContext * context, GstVideoInfo * v_info)
+_src_snow_init (gpointer impl, GstGLContext * context,
+ const GstVideoInfo * v_info)
{
struct SrcShader *src = impl;
GError *error = NULL;
" fractal_position *= 2.5;\n"
"}";
-static const gchar *mandelbrot_fragment_src =
+static const gchar *mandelbrot_fragment_src =
"uniform float time;\n"
"varying vec2 fractal_position;\n"
"const vec4 K = vec4(1.0, 0.66, 0.33, 3.0);\n"
static gboolean
_src_mandelbrot_init (gpointer impl, GstGLContext * context,
- GstVideoInfo * v_info)
+ const GstVideoInfo * v_info)
{
struct SrcShader *src = impl;
GError *error = NULL;
static gboolean
_src_circular_init (gpointer impl, GstGLContext * context,
- GstVideoInfo * v_info)
+ const GstVideoInfo * v_info)
{
struct SrcShader *src = impl;
GError *error = NULL;
{
GstGLTestSrcPattern pattern;
gpointer (*new) (GstGLTestSrc * src);
- gboolean (*init) (gpointer impl, GstGLContext * context, GstVideoInfo * v_info);
+ gboolean (*init) (gpointer impl, GstGLContext * context, const GstVideoInfo * v_info);
gboolean (*fill_bound_fbo) (gpointer impl);
void (*free) (gpointer impl);
};
static gboolean
configure_display_from_info (GstGLImageSink * glimage_sink,
- GstVideoInfo * vinfo)
+ const GstVideoInfo * vinfo)
{
gint width;
gint height;
* target.
*/
static int
-_drm_rgba_fourcc_from_info (GstVideoInfo * info, int plane,
+_drm_rgba_fourcc_from_info (const GstVideoInfo * info, int plane,
GstGLFormat * out_format)
{
GstVideoFormat format = GST_VIDEO_INFO_FORMAT (info);
*/
GstEGLImage *
gst_egl_image_from_dmabuf (GstGLContext * context,
- gint dmabuf, GstVideoInfo * in_info, gint plane, gsize offset)
+ gint dmabuf, const GstVideoInfo * in_info, gint plane, gsize offset)
{
GstGLFormat format = 0;
guintptr attribs[13];
* YUV->RGB conversion matrices etc.)
*/
static int
-_drm_direct_fourcc_from_info (GstVideoInfo * info)
+_drm_direct_fourcc_from_info (const GstVideoInfo * info)
{
GstVideoFormat format = GST_VIDEO_INFO_FORMAT (info);
*/
gboolean
gst_egl_image_check_dmabuf_direct (GstGLContext * context,
- GstVideoInfo * in_info, GstGLTextureTarget target)
+ const GstVideoInfo * in_info, GstGLTextureTarget target)
{
EGLDisplay egl_display = EGL_DEFAULT_DISPLAY;
GstGLDisplayEGL *display_egl;
*/
GstEGLImage *
gst_egl_image_from_dmabuf_direct_target (GstGLContext * context,
- gint * fd, gsize * offset, GstVideoInfo * in_info,
+ gint * fd, const gsize * offset, const GstVideoInfo * in_info,
GstGLTextureTarget target)
{
*/
GstEGLImage *
gst_egl_image_from_dmabuf_direct (GstGLContext * context,
- gint * fd, gsize * offset, GstVideoInfo * in_info)
+ gint * fd, const gsize * offset, const GstVideoInfo * in_info)
{
return gst_egl_image_from_dmabuf_direct_target (context, fd, offset, in_info,
GST_GL_TEXTURE_TARGET_2D);
GST_GL_API
GstEGLImage * gst_egl_image_from_dmabuf (GstGLContext * context,
gint dmabuf,
- GstVideoInfo * in_info,
+ const GstVideoInfo * in_info,
gint plane,
gsize offset);
GST_GL_API
GstEGLImage * gst_egl_image_from_dmabuf_direct (GstGLContext * context,
gint *fd,
- gsize *offset,
- GstVideoInfo * in_info);
+ const gsize *offset,
+ const GstVideoInfo * in_info);
GST_GL_API
GstEGLImage * gst_egl_image_from_dmabuf_direct_target (GstGLContext * context,
gint *fd,
- gsize *offset,
- GstVideoInfo * in_info,
+ const gsize *offset,
+ const GstVideoInfo * in_info,
GstGLTextureTarget target);
GST_GL_API
G_GNUC_INTERNAL
gboolean gst_egl_image_check_dmabuf_direct (GstGLContext * context,
- GstVideoInfo * in_info,
+ const GstVideoInfo * in_info,
GstGLTextureTarget target);
*/
void
gst_gl_base_memory_init (GstGLBaseMemory * mem, GstAllocator * allocator,
- GstMemory * parent, GstGLContext * context, GstAllocationParams * params,
- gsize size, gpointer user_data, GDestroyNotify notify)
+ GstMemory * parent, GstGLContext * context,
+ const GstAllocationParams * params, gsize size, gpointer user_data,
+ GDestroyNotify notify)
{
gsize align = gst_memory_alignment, offset = 0, maxsize;
GstMemoryFlags flags = 0;
gst_gl_allocation_params_init (GstGLAllocationParams * params,
gsize struct_size, guint alloc_flags, GstGLAllocationParamsCopyFunc copy,
GstGLAllocationParamsFreeFunc free, GstGLContext * context,
- gsize alloc_size, GstAllocationParams * alloc_params,
+ gsize alloc_size, const GstAllocationParams * alloc_params,
gpointer wrapped_data, gpointer gl_handle, gpointer user_data,
GDestroyNotify notify)
{
GstGLAllocationParamsFreeFunc free,
GstGLContext * context,
gsize alloc_size,
- GstAllocationParams * alloc_params,
+ const GstAllocationParams * alloc_params,
gpointer wrapped_data,
gpointer gl_handle,
gpointer user_data,
GstAllocator * allocator,
GstMemory * parent,
GstGLContext * context,
- GstAllocationParams * params,
+ const GstAllocationParams * params,
gsize size,
gpointer user_data,
GDestroyNotify notify);
static void
_gl_buffer_init (GstGLBuffer * mem, GstAllocator * allocator,
GstMemory * parent, GstGLContext * context, guint gl_target, guint gl_usage,
- GstAllocationParams * params, gsize size)
+ const GstAllocationParams * params, gsize size)
{
mem->target = gl_target;
mem->usage_hints = gl_usage;
static GstGLBuffer *
_gl_buffer_new (GstAllocator * allocator, GstMemory * parent,
GstGLContext * context, guint gl_target, guint gl_usage,
- GstAllocationParams * params, gsize size)
+ const GstAllocationParams * params, gsize size)
{
GstGLBuffer *ret = g_new0 (GstGLBuffer, 1);
_gl_buffer_init (ret, allocator, parent, context, gl_target, gl_usage,
*/
GstGLBufferAllocationParams *
gst_gl_buffer_allocation_params_new (GstGLContext * context, gsize alloc_size,
- GstAllocationParams * alloc_params, guint gl_target, guint gl_usage)
+ const GstAllocationParams * alloc_params, guint gl_target, guint gl_usage)
{
GstGLBufferAllocationParams *params;
GST_GL_API
GstGLBufferAllocationParams * gst_gl_buffer_allocation_params_new (GstGLContext * context,
gsize alloc_size,
- GstAllocationParams * alloc_params,
+ const GstAllocationParams * alloc_params,
guint gl_target,
guint gl_usage);
*/
void
gst_buffer_pool_config_set_gl_allocation_params (GstStructure * config,
- GstGLAllocationParams * params)
+ const GstGLAllocationParams * params)
{
g_return_if_fail (config != NULL);
g_return_if_fail (params != NULL);
GstGLAllocationParams * gst_buffer_pool_config_get_gl_allocation_params (GstStructure * config);
GST_GL_API
void gst_buffer_pool_config_set_gl_allocation_params (GstStructure * config,
- GstGLAllocationParams * params);
+ const GstGLAllocationParams * params);
G_END_DECLS
}
static gboolean
-_gst_gl_color_convert_can_passthrough_info (GstVideoInfo * in,
- GstVideoInfo * out)
+_gst_gl_color_convert_can_passthrough_info (const GstVideoInfo * in,
+ const GstVideoInfo * out)
{
gint i;
* Returns: the #GstGLFormat necessary for holding the data in @plane of @vinfo
*/
GstGLFormat
-gst_gl_format_from_video_info (GstGLContext * context, GstVideoInfo * vinfo,
- guint plane)
+gst_gl_format_from_video_info (GstGLContext * context,
+ const GstVideoInfo * vinfo, guint plane)
{
gboolean texture_rg =
gst_gl_context_check_feature (context, "GL_EXT_texture_rg")
guint type);
GST_GL_API
GstGLFormat gst_gl_format_from_video_info (GstGLContext * context,
- GstVideoInfo * vinfo,
+ const GstVideoInfo * vinfo,
guint plane);
GST_GL_API
guint gst_gl_sized_gl_format_from_gl_format_type (GstGLContext * context,
} GstGLMemoryCopyParams;
static inline guint
-_get_plane_width (GstVideoInfo * info, guint plane)
+_get_plane_width (const GstVideoInfo * info, guint plane)
{
if (GST_VIDEO_INFO_IS_YUV (info))
/* For now component width and plane width are the same and the
}
static inline guint
-_get_plane_height (GstVideoInfo * info, guint plane)
+_get_plane_height (const GstVideoInfo * info, guint plane)
{
if (GST_VIDEO_INFO_IS_YUV (info))
/* For now component width and plane width are the same and the
void
gst_gl_memory_init (GstGLMemory * mem, GstAllocator * allocator,
GstMemory * parent, GstGLContext * context, GstGLTextureTarget target,
- GstGLFormat tex_format, GstAllocationParams * params,
- GstVideoInfo * info, guint plane, GstVideoAlignment * valign,
+ GstGLFormat tex_format, const GstAllocationParams * params,
+ const GstVideoInfo * info, guint plane, const GstVideoAlignment * valign,
gpointer user_data, GDestroyNotify notify)
{
const gchar *target_str;
static void
_gst_gl_video_allocation_params_set_video_alignment (GstGLVideoAllocationParams
- * params, GstVideoAlignment * valign)
+ * params, const GstVideoAlignment * valign)
{
g_return_if_fail (params != NULL);
gst_gl_video_allocation_params_init_full (GstGLVideoAllocationParams * params,
gsize struct_size, guint alloc_flags, GstGLAllocationParamsCopyFunc copy,
GstGLAllocationParamsFreeFunc free, GstGLContext * context,
- GstAllocationParams * alloc_params, GstVideoInfo * v_info,
- guint plane, GstVideoAlignment * valign, GstGLTextureTarget target,
+ const GstAllocationParams * alloc_params, const GstVideoInfo * v_info,
+ guint plane, const GstVideoAlignment * valign, GstGLTextureTarget target,
GstGLFormat tex_format, gpointer wrapped_data, gpointer gl_handle,
gpointer user_data, GDestroyNotify notify)
{
*/
GstGLVideoAllocationParams *
gst_gl_video_allocation_params_new (GstGLContext * context,
- GstAllocationParams * alloc_params, GstVideoInfo * v_info, guint plane,
- GstVideoAlignment * valign, GstGLTextureTarget target,
+ const GstAllocationParams * alloc_params, const GstVideoInfo * v_info,
+ guint plane, const GstVideoAlignment * valign, GstGLTextureTarget target,
GstGLFormat tex_format)
{
GstGLVideoAllocationParams *params = g_new0 (GstGLVideoAllocationParams, 1);
*/
GstGLVideoAllocationParams *
gst_gl_video_allocation_params_new_wrapped_data (GstGLContext * context,
- GstAllocationParams * alloc_params, GstVideoInfo * v_info, guint plane,
- GstVideoAlignment * valign, GstGLTextureTarget target,
+ const GstAllocationParams * alloc_params, const GstVideoInfo * v_info,
+ guint plane, const GstVideoAlignment * valign, GstGLTextureTarget target,
GstGLFormat tex_format, gpointer wrapped_data, gpointer user_data,
GDestroyNotify notify)
{
*/
GstGLVideoAllocationParams *
gst_gl_video_allocation_params_new_wrapped_gl_handle (GstGLContext * context,
- GstAllocationParams * alloc_params, GstVideoInfo * v_info, guint plane,
- GstVideoAlignment * valign, GstGLTextureTarget target,
+ const GstAllocationParams * alloc_params, const GstVideoInfo * v_info,
+ guint plane, const GstVideoAlignment * valign, GstGLTextureTarget target,
GstGLFormat tex_format, gpointer gl_handle, gpointer user_data,
GDestroyNotify notify)
{
*/
GstGLVideoAllocationParams *
gst_gl_video_allocation_params_new_wrapped_texture (GstGLContext * context,
- GstAllocationParams * alloc_params, GstVideoInfo * v_info, guint plane,
- GstVideoAlignment * valign, GstGLTextureTarget target,
+ const GstAllocationParams * alloc_params, const GstVideoInfo * v_info,
+ guint plane, const GstVideoAlignment * valign, GstGLTextureTarget target,
GstGLFormat tex_format, guint tex_id, gpointer user_data,
GDestroyNotify notify)
{
GstGLAllocationParamsCopyFunc copy,
GstGLAllocationParamsFreeFunc free,
GstGLContext * context,
- GstAllocationParams * alloc_params,
- GstVideoInfo * v_info,
+ const GstAllocationParams * alloc_params,
+ const GstVideoInfo * v_info,
guint plane,
- GstVideoAlignment * valign,
+ const GstVideoAlignment * valign,
GstGLTextureTarget target,
GstGLFormat tex_format,
gpointer wrapped_data,
GDestroyNotify notify);
GST_GL_API
GstGLVideoAllocationParams * gst_gl_video_allocation_params_new (GstGLContext * context,
- GstAllocationParams * alloc_params,
- GstVideoInfo * v_info,
+ const GstAllocationParams * alloc_params,
+ const GstVideoInfo * v_info,
guint plane,
- GstVideoAlignment * valign,
+ const GstVideoAlignment * valign,
GstGLTextureTarget target,
GstGLFormat tex_format);
GST_GL_API
GstGLVideoAllocationParams * gst_gl_video_allocation_params_new_wrapped_data (GstGLContext * context,
- GstAllocationParams * alloc_params,
- GstVideoInfo * v_info,
+ const GstAllocationParams * alloc_params,
+ const GstVideoInfo * v_info,
guint plane,
- GstVideoAlignment * valign,
+ const GstVideoAlignment * valign,
GstGLTextureTarget target,
GstGLFormat tex_format,
gpointer wrapped_data,
GST_GL_API
GstGLVideoAllocationParams * gst_gl_video_allocation_params_new_wrapped_texture (GstGLContext * context,
- GstAllocationParams * alloc_params,
- GstVideoInfo * v_info,
+ const GstAllocationParams * alloc_params,
+ const GstVideoInfo * v_info,
guint plane,
- GstVideoAlignment * valign,
+ const GstVideoAlignment * valign,
GstGLTextureTarget target,
GstGLFormat tex_format,
guint tex_id,
GST_GL_API
GstGLVideoAllocationParams * gst_gl_video_allocation_params_new_wrapped_gl_handle (GstGLContext * context,
- GstAllocationParams * alloc_params,
- GstVideoInfo * v_info,
+ const GstAllocationParams * alloc_params,
+ const GstVideoInfo * v_info,
guint plane,
- GstVideoAlignment * valign,
+ const GstVideoAlignment * valign,
GstGLTextureTarget target,
GstGLFormat tex_format,
gpointer gl_handle,
GstGLContext * context,
GstGLTextureTarget target,
GstGLFormat tex_format,
- GstAllocationParams *params,
- GstVideoInfo * info,
+ const GstAllocationParams *params,
+ const GstVideoInfo * info,
guint plane,
- GstVideoAlignment *valign,
+ const GstVideoAlignment *valign,
gpointer user_data,
GDestroyNotify notify);
} GstGLMemoryPBOCopyParams;
static inline guint
-_get_plane_height (GstVideoInfo * info, guint plane)
+_get_plane_height (const GstVideoInfo * info, guint plane)
{
if (GST_VIDEO_INFO_IS_YUV (info))
/* For now component width and plane width are the same and the
static void
gst_gl_renderbuffer_init (GstGLRenderbuffer * mem, GstAllocator * allocator,
GstMemory * parent, GstGLContext * context,
- GstGLFormat renderbuffer_format, GstAllocationParams * params,
+ GstGLFormat renderbuffer_format, const GstAllocationParams * params,
guint width, guint height, gpointer user_data, GDestroyNotify notify)
{
gsize size;
(GstGLRenderbufferAllocationParams * params, gsize struct_size,
guint alloc_flags, GstGLAllocationParamsCopyFunc copy,
GstGLAllocationParamsFreeFunc free, GstGLContext * context,
- GstAllocationParams * alloc_params, guint width, guint height,
+ const GstAllocationParams * alloc_params, guint width, guint height,
GstGLFormat renderbuffer_format, gpointer wrapped_data,
gpointer gl_handle, gpointer user_data, GDestroyNotify notify)
{
*/
GstGLRenderbufferAllocationParams *
gst_gl_renderbuffer_allocation_params_new (GstGLContext * context,
- GstAllocationParams * alloc_params, GstGLFormat renderbuffer_format,
+ const GstAllocationParams * alloc_params, GstGLFormat renderbuffer_format,
guint width, guint height)
{
GstGLRenderbufferAllocationParams *params =
*/
GstGLRenderbufferAllocationParams *
gst_gl_renderbuffer_allocation_params_new_wrapped (GstGLContext * context,
- GstAllocationParams * alloc_params, GstGLFormat renderbuffer_format,
+ const GstAllocationParams * alloc_params, GstGLFormat renderbuffer_format,
guint width, guint height, gpointer gl_handle, gpointer user_data,
GDestroyNotify notify)
{
GST_GL_API
GstGLRenderbufferAllocationParams * gst_gl_renderbuffer_allocation_params_new (GstGLContext * context,
- GstAllocationParams * alloc_params,
+ const GstAllocationParams * alloc_params,
GstGLFormat renderbuffer_format,
guint width,
guint height);
GST_GL_API
GstGLRenderbufferAllocationParams * gst_gl_renderbuffer_allocation_params_new_wrapped (GstGLContext * context,
- GstAllocationParams * alloc_params,
+ const GstAllocationParams * alloc_params,
GstGLFormat renderbuffer_format,
guint width,
guint height,
-/*
+/*
* GStreamer
* Copyright (C) 2013 Matthew Waters <ystreet00@gmail.com>
*
* Retrieve the size in bytes of a video plane of data with a certain alignment
*/
gsize
-gst_gl_get_plane_data_size (GstVideoInfo * info, GstVideoAlignment * align,
- guint plane)
+gst_gl_get_plane_data_size (const GstVideoInfo * info,
+ const GstVideoAlignment * align, guint plane)
{
gint padded_height;
gsize plane_size;
* and where the data from the previous plane ends.
*/
gsize
-gst_gl_get_plane_start (GstVideoInfo * info, GstVideoAlignment * valign,
- guint plane)
+gst_gl_get_plane_start (const GstVideoInfo * info,
+ const GstVideoAlignment * valign, guint plane)
{
gsize plane_start;
gint i;
gboolean gst_gl_ensure_element_data (gpointer element,
GstGLDisplay **display_ptr, GstGLContext ** other_context_ptr);
GST_GL_API
-gboolean gst_gl_handle_set_context (GstElement * element, GstContext * context,
+gboolean gst_gl_handle_set_context (GstElement * element, GstContext * context,
GstGLDisplay ** display, GstGLContext ** other_context);
GST_GL_API
-gboolean gst_gl_handle_context_query (GstElement * element, GstQuery * query,
+gboolean gst_gl_handle_context_query (GstElement * element, GstQuery * query,
GstGLDisplay * display, GstGLContext * context, GstGLContext * other_context);
GST_GL_API
gboolean gst_gl_query_local_gl_context (GstElement * element, GstPadDirection direction,
void gst_gl_element_propagate_display_context (GstElement * element, GstGLDisplay * display);
GST_GL_API
-gsize gst_gl_get_plane_data_size (GstVideoInfo * info, GstVideoAlignment * align,
+gsize gst_gl_get_plane_data_size (const GstVideoInfo * info, const GstVideoAlignment * align,
guint plane);
GST_GL_API
-gsize gst_gl_get_plane_start (GstVideoInfo * info, GstVideoAlignment * valign,
+gsize gst_gl_get_plane_start (const GstVideoInfo * info, const GstVideoAlignment * valign,
guint plane);
GST_GL_API
static gboolean
_view_convert_set_format (GstGLViewConvert * viewconvert,
- GstVideoInfo * in_info, GstGLTextureTarget from_target,
- GstVideoInfo * out_info, GstGLTextureTarget to_target)
+ const GstVideoInfo * in_info, GstGLTextureTarget from_target,
+ const GstVideoInfo * out_info, GstGLTextureTarget to_target)
{
gboolean passthrough;
g_return_val_if_fail (GST_IS_GL_VIEW_CONVERT (viewconvert), FALSE);
static gboolean
gst_audio_visualizer_set_allocation (GstAudioVisualizer * scope,
GstBufferPool * pool, GstAllocator * allocator,
- GstAllocationParams * params, GstQuery * query)
+ const GstAllocationParams * params, GstQuery * query)
{
GstAllocator *oldalloc;
GstBufferPool *oldpool;
*/
void
gst_buffer_pool_config_set_video_alignment (GstStructure * config,
- GstVideoAlignment * align)
+ const GstVideoAlignment * align)
{
g_return_if_fail (config != NULL);
g_return_if_fail (align != NULL);
/* setting a bufferpool config */
GST_VIDEO_API
-void gst_buffer_pool_config_set_video_alignment (GstStructure *config, GstVideoAlignment *align);
+void gst_buffer_pool_config_set_video_alignment (GstStructure *config, const GstVideoAlignment *align);
GST_VIDEO_API
gboolean gst_buffer_pool_config_get_video_alignment (GstStructure *config, GstVideoAlignment *align);
* Since: 1.20
*/
GstVideoConverter *
-gst_video_converter_new_with_pool (GstVideoInfo * in_info,
- GstVideoInfo * out_info, GstStructure * config, GstTaskPool * pool)
+gst_video_converter_new_with_pool (const GstVideoInfo * in_info,
+ const GstVideoInfo * out_info, GstStructure * config, GstTaskPool * pool)
{
GstVideoConverter *convert;
GstLineCache *prev;
* Since: 1.6
*/
GstVideoConverter *
-gst_video_converter_new (GstVideoInfo * in_info, GstVideoInfo * out_info,
- GstStructure * config)
+gst_video_converter_new (const GstVideoInfo * in_info,
+ const GstVideoInfo * out_info, GstStructure * config)
{
return gst_video_converter_new_with_pool (in_info, out_info, config, NULL);
}
typedef struct _GstVideoConverter GstVideoConverter;
GST_VIDEO_API
-GstVideoConverter * gst_video_converter_new (GstVideoInfo *in_info,
- GstVideoInfo *out_info,
+GstVideoConverter * gst_video_converter_new (const GstVideoInfo *in_info,
+ const GstVideoInfo *out_info,
GstStructure *config);
GST_VIDEO_API
-GstVideoConverter * gst_video_converter_new_with_pool (GstVideoInfo * in_info,
- GstVideoInfo * out_info,
+GstVideoConverter * gst_video_converter_new_with_pool (const GstVideoInfo * in_info,
+ const GstVideoInfo * out_info,
GstStructure * config,
GstTaskPool * pool);
* Returns: %TRUE on success.
*/
gboolean
-gst_video_frame_map_id (GstVideoFrame * frame, GstVideoInfo * info,
+gst_video_frame_map_id (GstVideoFrame * frame, const GstVideoInfo * info,
GstBuffer * buffer, gint id, GstMapFlags flags)
{
GstVideoMeta *meta;
* Returns: %TRUE on success.
*/
gboolean
-gst_video_frame_map (GstVideoFrame * frame, GstVideoInfo * info,
+gst_video_frame_map (GstVideoFrame * frame, const GstVideoInfo * info,
GstBuffer * buffer, GstMapFlags flags)
{
return gst_video_frame_map_id (frame, info, buffer, -1, flags);
};
GST_VIDEO_API
-gboolean gst_video_frame_map (GstVideoFrame *frame, GstVideoInfo *info,
+gboolean gst_video_frame_map (GstVideoFrame *frame, const GstVideoInfo *info,
GstBuffer *buffer, GstMapFlags flags);
GST_VIDEO_API
-gboolean gst_video_frame_map_id (GstVideoFrame *frame, GstVideoInfo *info,
+gboolean gst_video_frame_map_id (GstVideoFrame *frame, const GstVideoInfo *info,
GstBuffer *buffer, gint id, GstMapFlags flags);
GST_VIDEO_API
* Returns: TRUE if the conversion was successful.
*/
gboolean
-gst_video_info_convert (GstVideoInfo * info,
+gst_video_info_convert (const GstVideoInfo * info,
GstFormat src_format, gint64 src_value,
GstFormat dest_format, gint64 * dest_value)
{
* @align: alignment parameters
* @plane_size: (out) (allow-none): array used to store the plane sizes
*
+ * Extra padding will be added to the right side when stride alignment padding
+ * is required and @align will be updated with the new padding values.
+ *
* This variant of gst_video_info_align() provides the updated size, in bytes,
* of each video plane after the alignment, including all horizontal and vertical
* paddings.
GstCaps * gst_video_info_to_caps (const GstVideoInfo *info);
GST_VIDEO_API
-gboolean gst_video_info_convert (GstVideoInfo *info,
+gboolean gst_video_info_convert (const GstVideoInfo *info,
GstFormat src_format,
gint64 src_value,
GstFormat dest_format,
}
static void
-gst_video_overlay_rectangle_convert (GstVideoInfo * src, GstBuffer * src_buffer,
- GstVideoFormat dest_format, GstVideoInfo * dest, GstBuffer ** dest_buffer)
+gst_video_overlay_rectangle_convert (const GstVideoInfo * src,
+ GstBuffer * src_buffer, GstVideoFormat dest_format, GstVideoInfo * dest,
+ GstBuffer ** dest_buffer)
{
gint width, height, stride;
GstVideoFrame src_frame, dest_frame;
gst_compositor_child_proxy_init));
static gboolean
-set_functions (GstCompositor * self, GstVideoInfo * info)
+set_functions (GstCompositor * self, const GstVideoInfo * info)
{
gboolean ret = FALSE;
*
*/
-/*
+/*
* Formulas for PAR, DAR, width and height relations:
*
* dar_n w par_n
* par_n h dar_n
* ----- = - * -----
* par_d w dar_d
- *
+ *
* dar_n par_d
* w = h * ----- * -----
* dar_d par_n
/* This function tries to get a format matching with a given caps in the
supported list of formats we generated in gst_xvimagesink_get_xv_support */
gint
-gst_xvcontext_get_format_from_info (GstXvContext * context, GstVideoInfo * info)
+gst_xvcontext_get_format_from_info (GstXvContext * context,
+ const GstVideoInfo * info)
{
GList *list = NULL;
}
gint gst_xvcontext_get_format_from_info (GstXvContext * xvcontext,
- GstVideoInfo * info);
+ const GstVideoInfo * info);
void gst_xvcontext_set_synchronous (GstXvContext * xvcontext,
GST_END_TEST;
static GstMemory *
-create_memory (const gchar * allocator_name, GstVideoInfo * v_info, guint plane)
+create_memory (const gchar * allocator_name, const GstVideoInfo * v_info,
+ guint plane)
{
GstAllocator *gl_allocator;
GstGLBaseMemoryAllocator *base_mem_alloc;
GST_END_TEST;
static GstMemory *
-wrap_raw_data (const gchar * allocator_name, GstVideoInfo * v_info,
+wrap_raw_data (const gchar * allocator_name, const GstVideoInfo * v_info,
guint plane, guint8 * data)
{
GstAllocator *gl_allocator;