mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 18:05:37 +00:00
gl,video: Make ptrs to VideoInfo and (GL)AllocationParams immutable
These parameters are incorrectly regarded as mutable in G-IR making them "incompatible" with languages that are explicit about mutability like Rust. In order to clean up the code and expected API there, update the signatures here, right at the source (instead of overriding them in Gir.toml and hoping for the best). Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1005>
This commit is contained in:
parent
fa8b5b9a6d
commit
abb026ec6a
38 changed files with 126 additions and 116 deletions
|
@ -166,7 +166,8 @@ _unbind_buffer (struct SrcShader *src)
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
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;
|
struct SrcShader *src = impl;
|
||||||
const GstGLFuncs *gl = context->gl_vtable;
|
const GstGLFuncs *gl = context->gl_vtable;
|
||||||
|
@ -280,7 +281,7 @@ static const gchar *snow_vertex_src =
|
||||||
" out_uv = position.xy;\n"
|
" out_uv = position.xy;\n"
|
||||||
"}";
|
"}";
|
||||||
|
|
||||||
static const gchar *snow_fragment_src =
|
static const gchar *snow_fragment_src =
|
||||||
"uniform float time;\n"
|
"uniform float time;\n"
|
||||||
"varying vec2 out_uv;\n"
|
"varying vec2 out_uv;\n"
|
||||||
"\n"
|
"\n"
|
||||||
|
@ -314,7 +315,8 @@ _src_smpte_new (GstGLTestSrc * test)
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
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 SrcSMPTE *src = impl;
|
||||||
struct XYZWRGB *coord;
|
struct XYZWRGB *coord;
|
||||||
|
@ -595,7 +597,7 @@ _src_uni_color_new (GstGLTestSrc * test)
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
_src_uni_color_init (gpointer impl, GstGLContext * context,
|
_src_uni_color_init (gpointer impl, GstGLContext * context,
|
||||||
GstVideoInfo * v_info)
|
const GstVideoInfo * v_info)
|
||||||
{
|
{
|
||||||
struct SrcUniColor *src = impl;
|
struct SrcUniColor *src = impl;
|
||||||
|
|
||||||
|
@ -712,7 +714,7 @@ struct SrcCheckers
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
_src_checkers_init (gpointer impl, GstGLContext * context,
|
_src_checkers_init (gpointer impl, GstGLContext * context,
|
||||||
GstVideoInfo * v_info)
|
const GstVideoInfo * v_info)
|
||||||
{
|
{
|
||||||
struct SrcCheckers *src = impl;
|
struct SrcCheckers *src = impl;
|
||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
|
@ -813,7 +815,8 @@ SRC_CHECKERS (4);
|
||||||
SRC_CHECKERS (8);
|
SRC_CHECKERS (8);
|
||||||
|
|
||||||
static gboolean
|
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;
|
struct SrcShader *src = impl;
|
||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
|
@ -918,7 +921,7 @@ static const gchar *mandelbrot_vertex_src = "attribute vec4 position;\n"
|
||||||
" fractal_position *= 2.5;\n"
|
" fractal_position *= 2.5;\n"
|
||||||
"}";
|
"}";
|
||||||
|
|
||||||
static const gchar *mandelbrot_fragment_src =
|
static const gchar *mandelbrot_fragment_src =
|
||||||
"uniform float time;\n"
|
"uniform float time;\n"
|
||||||
"varying vec2 fractal_position;\n"
|
"varying vec2 fractal_position;\n"
|
||||||
"const vec4 K = vec4(1.0, 0.66, 0.33, 3.0);\n"
|
"const vec4 K = vec4(1.0, 0.66, 0.33, 3.0);\n"
|
||||||
|
@ -952,7 +955,7 @@ static const gchar *mandelbrot_fragment_src =
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
_src_mandelbrot_init (gpointer impl, GstGLContext * context,
|
_src_mandelbrot_init (gpointer impl, GstGLContext * context,
|
||||||
GstVideoInfo * v_info)
|
const GstVideoInfo * v_info)
|
||||||
{
|
{
|
||||||
struct SrcShader *src = impl;
|
struct SrcShader *src = impl;
|
||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
|
@ -1080,7 +1083,7 @@ static const gchar *circular_fragment_src =
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
_src_circular_init (gpointer impl, GstGLContext * context,
|
_src_circular_init (gpointer impl, GstGLContext * context,
|
||||||
GstVideoInfo * v_info)
|
const GstVideoInfo * v_info)
|
||||||
{
|
{
|
||||||
struct SrcShader *src = impl;
|
struct SrcShader *src = impl;
|
||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
|
|
|
@ -71,7 +71,7 @@ struct SrcFuncs
|
||||||
{
|
{
|
||||||
GstGLTestSrcPattern pattern;
|
GstGLTestSrcPattern pattern;
|
||||||
gpointer (*new) (GstGLTestSrc * src);
|
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);
|
gboolean (*fill_bound_fbo) (gpointer impl);
|
||||||
void (*free) (gpointer impl);
|
void (*free) (gpointer impl);
|
||||||
};
|
};
|
||||||
|
|
|
@ -1426,7 +1426,7 @@ gst_glimage_sink_get_caps (GstBaseSink * bsink, GstCaps * filter)
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
configure_display_from_info (GstGLImageSink * glimage_sink,
|
configure_display_from_info (GstGLImageSink * glimage_sink,
|
||||||
GstVideoInfo * vinfo)
|
const GstVideoInfo * vinfo)
|
||||||
{
|
{
|
||||||
gint width;
|
gint width;
|
||||||
gint height;
|
gint height;
|
||||||
|
|
|
@ -460,7 +460,7 @@ gst_egl_image_from_texture (GstGLContext * context, GstGLMemory * gl_mem,
|
||||||
* target.
|
* target.
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
_drm_rgba_fourcc_from_info (GstVideoInfo * info, int plane,
|
_drm_rgba_fourcc_from_info (const GstVideoInfo * info, int plane,
|
||||||
GstGLFormat * out_format)
|
GstGLFormat * out_format)
|
||||||
{
|
{
|
||||||
GstVideoFormat format = GST_VIDEO_INFO_FORMAT (info);
|
GstVideoFormat format = GST_VIDEO_INFO_FORMAT (info);
|
||||||
|
@ -571,7 +571,7 @@ _drm_rgba_fourcc_from_info (GstVideoInfo * info, int plane,
|
||||||
*/
|
*/
|
||||||
GstEGLImage *
|
GstEGLImage *
|
||||||
gst_egl_image_from_dmabuf (GstGLContext * context,
|
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;
|
GstGLFormat format = 0;
|
||||||
guintptr attribs[13];
|
guintptr attribs[13];
|
||||||
|
@ -621,7 +621,7 @@ gst_egl_image_from_dmabuf (GstGLContext * context,
|
||||||
* YUV->RGB conversion matrices etc.)
|
* YUV->RGB conversion matrices etc.)
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
_drm_direct_fourcc_from_info (GstVideoInfo * info)
|
_drm_direct_fourcc_from_info (const GstVideoInfo * info)
|
||||||
{
|
{
|
||||||
GstVideoFormat format = GST_VIDEO_INFO_FORMAT (info);
|
GstVideoFormat format = GST_VIDEO_INFO_FORMAT (info);
|
||||||
|
|
||||||
|
@ -729,7 +729,7 @@ _drm_direct_fourcc_from_info (GstVideoInfo * info)
|
||||||
*/
|
*/
|
||||||
gboolean
|
gboolean
|
||||||
gst_egl_image_check_dmabuf_direct (GstGLContext * context,
|
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;
|
EGLDisplay egl_display = EGL_DEFAULT_DISPLAY;
|
||||||
GstGLDisplayEGL *display_egl;
|
GstGLDisplayEGL *display_egl;
|
||||||
|
@ -857,7 +857,7 @@ gst_egl_image_check_dmabuf_direct (GstGLContext * context,
|
||||||
*/
|
*/
|
||||||
GstEGLImage *
|
GstEGLImage *
|
||||||
gst_egl_image_from_dmabuf_direct_target (GstGLContext * context,
|
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)
|
GstGLTextureTarget target)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -1022,7 +1022,7 @@ gst_egl_image_from_dmabuf_direct_target (GstGLContext * context,
|
||||||
*/
|
*/
|
||||||
GstEGLImage *
|
GstEGLImage *
|
||||||
gst_egl_image_from_dmabuf_direct (GstGLContext * context,
|
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,
|
return gst_egl_image_from_dmabuf_direct_target (context, fd, offset, in_info,
|
||||||
GST_GL_TEXTURE_TARGET_2D);
|
GST_GL_TEXTURE_TARGET_2D);
|
||||||
|
|
|
@ -85,19 +85,19 @@ GstEGLImage * gst_egl_image_from_texture (GstGLContext *
|
||||||
GST_GL_API
|
GST_GL_API
|
||||||
GstEGLImage * gst_egl_image_from_dmabuf (GstGLContext * context,
|
GstEGLImage * gst_egl_image_from_dmabuf (GstGLContext * context,
|
||||||
gint dmabuf,
|
gint dmabuf,
|
||||||
GstVideoInfo * in_info,
|
const GstVideoInfo * in_info,
|
||||||
gint plane,
|
gint plane,
|
||||||
gsize offset);
|
gsize offset);
|
||||||
GST_GL_API
|
GST_GL_API
|
||||||
GstEGLImage * gst_egl_image_from_dmabuf_direct (GstGLContext * context,
|
GstEGLImage * gst_egl_image_from_dmabuf_direct (GstGLContext * context,
|
||||||
gint *fd,
|
gint *fd,
|
||||||
gsize *offset,
|
const gsize *offset,
|
||||||
GstVideoInfo * in_info);
|
const GstVideoInfo * in_info);
|
||||||
GST_GL_API
|
GST_GL_API
|
||||||
GstEGLImage * gst_egl_image_from_dmabuf_direct_target (GstGLContext * context,
|
GstEGLImage * gst_egl_image_from_dmabuf_direct_target (GstGLContext * context,
|
||||||
gint *fd,
|
gint *fd,
|
||||||
gsize *offset,
|
const gsize *offset,
|
||||||
GstVideoInfo * in_info,
|
const GstVideoInfo * in_info,
|
||||||
GstGLTextureTarget target);
|
GstGLTextureTarget target);
|
||||||
|
|
||||||
GST_GL_API
|
GST_GL_API
|
||||||
|
|
|
@ -28,7 +28,7 @@ G_BEGIN_DECLS
|
||||||
|
|
||||||
G_GNUC_INTERNAL
|
G_GNUC_INTERNAL
|
||||||
gboolean gst_egl_image_check_dmabuf_direct (GstGLContext * context,
|
gboolean gst_egl_image_check_dmabuf_direct (GstGLContext * context,
|
||||||
GstVideoInfo * in_info,
|
const GstVideoInfo * in_info,
|
||||||
GstGLTextureTarget target);
|
GstGLTextureTarget target);
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -128,8 +128,9 @@ _mem_create_gl (GstGLContext * context, struct create_data *transfer)
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gst_gl_base_memory_init (GstGLBaseMemory * mem, GstAllocator * allocator,
|
gst_gl_base_memory_init (GstGLBaseMemory * mem, GstAllocator * allocator,
|
||||||
GstMemory * parent, GstGLContext * context, GstAllocationParams * params,
|
GstMemory * parent, GstGLContext * context,
|
||||||
gsize size, gpointer user_data, GDestroyNotify notify)
|
const GstAllocationParams * params, gsize size, gpointer user_data,
|
||||||
|
GDestroyNotify notify)
|
||||||
{
|
{
|
||||||
gsize align = gst_memory_alignment, offset = 0, maxsize;
|
gsize align = gst_memory_alignment, offset = 0, maxsize;
|
||||||
GstMemoryFlags flags = 0;
|
GstMemoryFlags flags = 0;
|
||||||
|
@ -631,7 +632,7 @@ gboolean
|
||||||
gst_gl_allocation_params_init (GstGLAllocationParams * params,
|
gst_gl_allocation_params_init (GstGLAllocationParams * params,
|
||||||
gsize struct_size, guint alloc_flags, GstGLAllocationParamsCopyFunc copy,
|
gsize struct_size, guint alloc_flags, GstGLAllocationParamsCopyFunc copy,
|
||||||
GstGLAllocationParamsFreeFunc free, GstGLContext * context,
|
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,
|
gpointer wrapped_data, gpointer gl_handle, gpointer user_data,
|
||||||
GDestroyNotify notify)
|
GDestroyNotify notify)
|
||||||
{
|
{
|
||||||
|
|
|
@ -227,7 +227,7 @@ gboolean gst_gl_allocation_params_init (GstGLAllocationPara
|
||||||
GstGLAllocationParamsFreeFunc free,
|
GstGLAllocationParamsFreeFunc free,
|
||||||
GstGLContext * context,
|
GstGLContext * context,
|
||||||
gsize alloc_size,
|
gsize alloc_size,
|
||||||
GstAllocationParams * alloc_params,
|
const GstAllocationParams * alloc_params,
|
||||||
gpointer wrapped_data,
|
gpointer wrapped_data,
|
||||||
gpointer gl_handle,
|
gpointer gl_handle,
|
||||||
gpointer user_data,
|
gpointer user_data,
|
||||||
|
@ -398,7 +398,7 @@ void gst_gl_base_memory_init (GstGLBaseMemory * mem,
|
||||||
GstAllocator * allocator,
|
GstAllocator * allocator,
|
||||||
GstMemory * parent,
|
GstMemory * parent,
|
||||||
GstGLContext * context,
|
GstGLContext * context,
|
||||||
GstAllocationParams * params,
|
const GstAllocationParams * params,
|
||||||
gsize size,
|
gsize size,
|
||||||
gpointer user_data,
|
gpointer user_data,
|
||||||
GDestroyNotify notify);
|
GDestroyNotify notify);
|
||||||
|
|
|
@ -97,7 +97,7 @@ struct create_data
|
||||||
static void
|
static void
|
||||||
_gl_buffer_init (GstGLBuffer * mem, GstAllocator * allocator,
|
_gl_buffer_init (GstGLBuffer * mem, GstAllocator * allocator,
|
||||||
GstMemory * parent, GstGLContext * context, guint gl_target, guint gl_usage,
|
GstMemory * parent, GstGLContext * context, guint gl_target, guint gl_usage,
|
||||||
GstAllocationParams * params, gsize size)
|
const GstAllocationParams * params, gsize size)
|
||||||
{
|
{
|
||||||
mem->target = gl_target;
|
mem->target = gl_target;
|
||||||
mem->usage_hints = gl_usage;
|
mem->usage_hints = gl_usage;
|
||||||
|
@ -112,7 +112,7 @@ _gl_buffer_init (GstGLBuffer * mem, GstAllocator * allocator,
|
||||||
static GstGLBuffer *
|
static GstGLBuffer *
|
||||||
_gl_buffer_new (GstAllocator * allocator, GstMemory * parent,
|
_gl_buffer_new (GstAllocator * allocator, GstMemory * parent,
|
||||||
GstGLContext * context, guint gl_target, guint gl_usage,
|
GstGLContext * context, guint gl_target, guint gl_usage,
|
||||||
GstAllocationParams * params, gsize size)
|
const GstAllocationParams * params, gsize size)
|
||||||
{
|
{
|
||||||
GstGLBuffer *ret = g_new0 (GstGLBuffer, 1);
|
GstGLBuffer *ret = g_new0 (GstGLBuffer, 1);
|
||||||
_gl_buffer_init (ret, allocator, parent, context, gl_target, gl_usage,
|
_gl_buffer_init (ret, allocator, parent, context, gl_target, gl_usage,
|
||||||
|
@ -371,7 +371,7 @@ G_DEFINE_BOXED_TYPE (GstGLBufferAllocationParams,
|
||||||
*/
|
*/
|
||||||
GstGLBufferAllocationParams *
|
GstGLBufferAllocationParams *
|
||||||
gst_gl_buffer_allocation_params_new (GstGLContext * context, gsize alloc_size,
|
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;
|
GstGLBufferAllocationParams *params;
|
||||||
|
|
||||||
|
|
|
@ -87,7 +87,7 @@ struct _GstGLBufferAllocationParams
|
||||||
GST_GL_API
|
GST_GL_API
|
||||||
GstGLBufferAllocationParams * gst_gl_buffer_allocation_params_new (GstGLContext * context,
|
GstGLBufferAllocationParams * gst_gl_buffer_allocation_params_new (GstGLContext * context,
|
||||||
gsize alloc_size,
|
gsize alloc_size,
|
||||||
GstAllocationParams * alloc_params,
|
const GstAllocationParams * alloc_params,
|
||||||
guint gl_target,
|
guint gl_target,
|
||||||
guint gl_usage);
|
guint gl_usage);
|
||||||
|
|
||||||
|
|
|
@ -406,7 +406,7 @@ gst_buffer_pool_config_get_gl_allocation_params (GstStructure * config)
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gst_buffer_pool_config_set_gl_allocation_params (GstStructure * config,
|
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 (config != NULL);
|
||||||
g_return_if_fail (params != NULL);
|
g_return_if_fail (params != NULL);
|
||||||
|
|
|
@ -73,7 +73,7 @@ GST_GL_API
|
||||||
GstGLAllocationParams * gst_buffer_pool_config_get_gl_allocation_params (GstStructure * config);
|
GstGLAllocationParams * gst_buffer_pool_config_get_gl_allocation_params (GstStructure * config);
|
||||||
GST_GL_API
|
GST_GL_API
|
||||||
void gst_buffer_pool_config_set_gl_allocation_params (GstStructure * config,
|
void gst_buffer_pool_config_set_gl_allocation_params (GstStructure * config,
|
||||||
GstGLAllocationParams * params);
|
const GstGLAllocationParams * params);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
|
|
@ -658,8 +658,8 @@ gst_gl_color_convert_reset (GstGLColorConvert * convert)
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
_gst_gl_color_convert_can_passthrough_info (GstVideoInfo * in,
|
_gst_gl_color_convert_can_passthrough_info (const GstVideoInfo * in,
|
||||||
GstVideoInfo * out)
|
const GstVideoInfo * out)
|
||||||
{
|
{
|
||||||
gint i;
|
gint i;
|
||||||
|
|
||||||
|
|
|
@ -148,8 +148,8 @@ gst_gl_format_type_n_bytes (guint format, guint type)
|
||||||
* Returns: the #GstGLFormat necessary for holding the data in @plane of @vinfo
|
* Returns: the #GstGLFormat necessary for holding the data in @plane of @vinfo
|
||||||
*/
|
*/
|
||||||
GstGLFormat
|
GstGLFormat
|
||||||
gst_gl_format_from_video_info (GstGLContext * context, GstVideoInfo * vinfo,
|
gst_gl_format_from_video_info (GstGLContext * context,
|
||||||
guint plane)
|
const GstVideoInfo * vinfo, guint plane)
|
||||||
{
|
{
|
||||||
gboolean texture_rg =
|
gboolean texture_rg =
|
||||||
gst_gl_context_check_feature (context, "GL_EXT_texture_rg")
|
gst_gl_context_check_feature (context, "GL_EXT_texture_rg")
|
||||||
|
|
|
@ -140,7 +140,7 @@ guint gst_gl_format_type_n_bytes (guint forma
|
||||||
guint type);
|
guint type);
|
||||||
GST_GL_API
|
GST_GL_API
|
||||||
GstGLFormat gst_gl_format_from_video_info (GstGLContext * context,
|
GstGLFormat gst_gl_format_from_video_info (GstGLContext * context,
|
||||||
GstVideoInfo * vinfo,
|
const GstVideoInfo * vinfo,
|
||||||
guint plane);
|
guint plane);
|
||||||
GST_GL_API
|
GST_GL_API
|
||||||
guint gst_gl_sized_gl_format_from_gl_format_type (GstGLContext * context,
|
guint gst_gl_sized_gl_format_from_gl_format_type (GstGLContext * context,
|
||||||
|
|
|
@ -105,7 +105,7 @@ typedef struct
|
||||||
} GstGLMemoryCopyParams;
|
} GstGLMemoryCopyParams;
|
||||||
|
|
||||||
static inline guint
|
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))
|
if (GST_VIDEO_INFO_IS_YUV (info))
|
||||||
/* For now component width and plane width are the same and the
|
/* For now component width and plane width are the same and the
|
||||||
|
@ -117,7 +117,7 @@ _get_plane_width (GstVideoInfo * info, guint plane)
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline guint
|
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))
|
if (GST_VIDEO_INFO_IS_YUV (info))
|
||||||
/* For now component width and plane width are the same and the
|
/* For now component width and plane width are the same and the
|
||||||
|
@ -316,8 +316,8 @@ _gst_gl_memory_end_log (GstGLMemory * gl_mem)
|
||||||
void
|
void
|
||||||
gst_gl_memory_init (GstGLMemory * mem, GstAllocator * allocator,
|
gst_gl_memory_init (GstGLMemory * mem, GstAllocator * allocator,
|
||||||
GstMemory * parent, GstGLContext * context, GstGLTextureTarget target,
|
GstMemory * parent, GstGLContext * context, GstGLTextureTarget target,
|
||||||
GstGLFormat tex_format, GstAllocationParams * params,
|
GstGLFormat tex_format, const GstAllocationParams * params,
|
||||||
GstVideoInfo * info, guint plane, GstVideoAlignment * valign,
|
const GstVideoInfo * info, guint plane, const GstVideoAlignment * valign,
|
||||||
gpointer user_data, GDestroyNotify notify)
|
gpointer user_data, GDestroyNotify notify)
|
||||||
{
|
{
|
||||||
const gchar *target_str;
|
const gchar *target_str;
|
||||||
|
@ -1148,7 +1148,7 @@ G_DEFINE_BOXED_TYPE (GstGLVideoAllocationParams, gst_gl_video_allocation_params,
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_gst_gl_video_allocation_params_set_video_alignment (GstGLVideoAllocationParams
|
_gst_gl_video_allocation_params_set_video_alignment (GstGLVideoAllocationParams
|
||||||
* params, GstVideoAlignment * valign)
|
* params, const GstVideoAlignment * valign)
|
||||||
{
|
{
|
||||||
g_return_if_fail (params != NULL);
|
g_return_if_fail (params != NULL);
|
||||||
|
|
||||||
|
@ -1191,8 +1191,8 @@ gboolean
|
||||||
gst_gl_video_allocation_params_init_full (GstGLVideoAllocationParams * params,
|
gst_gl_video_allocation_params_init_full (GstGLVideoAllocationParams * params,
|
||||||
gsize struct_size, guint alloc_flags, GstGLAllocationParamsCopyFunc copy,
|
gsize struct_size, guint alloc_flags, GstGLAllocationParamsCopyFunc copy,
|
||||||
GstGLAllocationParamsFreeFunc free, GstGLContext * context,
|
GstGLAllocationParamsFreeFunc free, GstGLContext * context,
|
||||||
GstAllocationParams * alloc_params, GstVideoInfo * v_info,
|
const GstAllocationParams * alloc_params, const GstVideoInfo * v_info,
|
||||||
guint plane, GstVideoAlignment * valign, GstGLTextureTarget target,
|
guint plane, const GstVideoAlignment * valign, GstGLTextureTarget target,
|
||||||
GstGLFormat tex_format, gpointer wrapped_data, gpointer gl_handle,
|
GstGLFormat tex_format, gpointer wrapped_data, gpointer gl_handle,
|
||||||
gpointer user_data, GDestroyNotify notify)
|
gpointer user_data, GDestroyNotify notify)
|
||||||
{
|
{
|
||||||
|
@ -1241,8 +1241,8 @@ gst_gl_video_allocation_params_init_full (GstGLVideoAllocationParams * params,
|
||||||
*/
|
*/
|
||||||
GstGLVideoAllocationParams *
|
GstGLVideoAllocationParams *
|
||||||
gst_gl_video_allocation_params_new (GstGLContext * context,
|
gst_gl_video_allocation_params_new (GstGLContext * context,
|
||||||
GstAllocationParams * alloc_params, GstVideoInfo * v_info, guint plane,
|
const GstAllocationParams * alloc_params, const GstVideoInfo * v_info,
|
||||||
GstVideoAlignment * valign, GstGLTextureTarget target,
|
guint plane, const GstVideoAlignment * valign, GstGLTextureTarget target,
|
||||||
GstGLFormat tex_format)
|
GstGLFormat tex_format)
|
||||||
{
|
{
|
||||||
GstGLVideoAllocationParams *params = g_new0 (GstGLVideoAllocationParams, 1);
|
GstGLVideoAllocationParams *params = g_new0 (GstGLVideoAllocationParams, 1);
|
||||||
|
@ -1282,8 +1282,8 @@ gst_gl_video_allocation_params_new (GstGLContext * context,
|
||||||
*/
|
*/
|
||||||
GstGLVideoAllocationParams *
|
GstGLVideoAllocationParams *
|
||||||
gst_gl_video_allocation_params_new_wrapped_data (GstGLContext * context,
|
gst_gl_video_allocation_params_new_wrapped_data (GstGLContext * context,
|
||||||
GstAllocationParams * alloc_params, GstVideoInfo * v_info, guint plane,
|
const GstAllocationParams * alloc_params, const GstVideoInfo * v_info,
|
||||||
GstVideoAlignment * valign, GstGLTextureTarget target,
|
guint plane, const GstVideoAlignment * valign, GstGLTextureTarget target,
|
||||||
GstGLFormat tex_format, gpointer wrapped_data, gpointer user_data,
|
GstGLFormat tex_format, gpointer wrapped_data, gpointer user_data,
|
||||||
GDestroyNotify notify)
|
GDestroyNotify notify)
|
||||||
{
|
{
|
||||||
|
@ -1329,8 +1329,8 @@ gst_gl_video_allocation_params_new_wrapped_data (GstGLContext * context,
|
||||||
*/
|
*/
|
||||||
GstGLVideoAllocationParams *
|
GstGLVideoAllocationParams *
|
||||||
gst_gl_video_allocation_params_new_wrapped_gl_handle (GstGLContext * context,
|
gst_gl_video_allocation_params_new_wrapped_gl_handle (GstGLContext * context,
|
||||||
GstAllocationParams * alloc_params, GstVideoInfo * v_info, guint plane,
|
const GstAllocationParams * alloc_params, const GstVideoInfo * v_info,
|
||||||
GstVideoAlignment * valign, GstGLTextureTarget target,
|
guint plane, const GstVideoAlignment * valign, GstGLTextureTarget target,
|
||||||
GstGLFormat tex_format, gpointer gl_handle, gpointer user_data,
|
GstGLFormat tex_format, gpointer gl_handle, gpointer user_data,
|
||||||
GDestroyNotify notify)
|
GDestroyNotify notify)
|
||||||
{
|
{
|
||||||
|
@ -1372,8 +1372,8 @@ gst_gl_video_allocation_params_new_wrapped_gl_handle (GstGLContext * context,
|
||||||
*/
|
*/
|
||||||
GstGLVideoAllocationParams *
|
GstGLVideoAllocationParams *
|
||||||
gst_gl_video_allocation_params_new_wrapped_texture (GstGLContext * context,
|
gst_gl_video_allocation_params_new_wrapped_texture (GstGLContext * context,
|
||||||
GstAllocationParams * alloc_params, GstVideoInfo * v_info, guint plane,
|
const GstAllocationParams * alloc_params, const GstVideoInfo * v_info,
|
||||||
GstVideoAlignment * valign, GstGLTextureTarget target,
|
guint plane, const GstVideoAlignment * valign, GstGLTextureTarget target,
|
||||||
GstGLFormat tex_format, guint tex_id, gpointer user_data,
|
GstGLFormat tex_format, guint tex_id, gpointer user_data,
|
||||||
GDestroyNotify notify)
|
GDestroyNotify notify)
|
||||||
{
|
{
|
||||||
|
|
|
@ -145,10 +145,10 @@ gboolean gst_gl_video_allocation_params_init_full (GstGLVideoAlloc
|
||||||
GstGLAllocationParamsCopyFunc copy,
|
GstGLAllocationParamsCopyFunc copy,
|
||||||
GstGLAllocationParamsFreeFunc free,
|
GstGLAllocationParamsFreeFunc free,
|
||||||
GstGLContext * context,
|
GstGLContext * context,
|
||||||
GstAllocationParams * alloc_params,
|
const GstAllocationParams * alloc_params,
|
||||||
GstVideoInfo * v_info,
|
const GstVideoInfo * v_info,
|
||||||
guint plane,
|
guint plane,
|
||||||
GstVideoAlignment * valign,
|
const GstVideoAlignment * valign,
|
||||||
GstGLTextureTarget target,
|
GstGLTextureTarget target,
|
||||||
GstGLFormat tex_format,
|
GstGLFormat tex_format,
|
||||||
gpointer wrapped_data,
|
gpointer wrapped_data,
|
||||||
|
@ -157,18 +157,18 @@ gboolean gst_gl_video_allocation_params_init_full (GstGLVideoAlloc
|
||||||
GDestroyNotify notify);
|
GDestroyNotify notify);
|
||||||
GST_GL_API
|
GST_GL_API
|
||||||
GstGLVideoAllocationParams * gst_gl_video_allocation_params_new (GstGLContext * context,
|
GstGLVideoAllocationParams * gst_gl_video_allocation_params_new (GstGLContext * context,
|
||||||
GstAllocationParams * alloc_params,
|
const GstAllocationParams * alloc_params,
|
||||||
GstVideoInfo * v_info,
|
const GstVideoInfo * v_info,
|
||||||
guint plane,
|
guint plane,
|
||||||
GstVideoAlignment * valign,
|
const GstVideoAlignment * valign,
|
||||||
GstGLTextureTarget target,
|
GstGLTextureTarget target,
|
||||||
GstGLFormat tex_format);
|
GstGLFormat tex_format);
|
||||||
GST_GL_API
|
GST_GL_API
|
||||||
GstGLVideoAllocationParams * gst_gl_video_allocation_params_new_wrapped_data (GstGLContext * context,
|
GstGLVideoAllocationParams * gst_gl_video_allocation_params_new_wrapped_data (GstGLContext * context,
|
||||||
GstAllocationParams * alloc_params,
|
const GstAllocationParams * alloc_params,
|
||||||
GstVideoInfo * v_info,
|
const GstVideoInfo * v_info,
|
||||||
guint plane,
|
guint plane,
|
||||||
GstVideoAlignment * valign,
|
const GstVideoAlignment * valign,
|
||||||
GstGLTextureTarget target,
|
GstGLTextureTarget target,
|
||||||
GstGLFormat tex_format,
|
GstGLFormat tex_format,
|
||||||
gpointer wrapped_data,
|
gpointer wrapped_data,
|
||||||
|
@ -177,10 +177,10 @@ GstGLVideoAllocationParams * gst_gl_video_allocation_params_new_wrapped_data
|
||||||
|
|
||||||
GST_GL_API
|
GST_GL_API
|
||||||
GstGLVideoAllocationParams * gst_gl_video_allocation_params_new_wrapped_texture (GstGLContext * context,
|
GstGLVideoAllocationParams * gst_gl_video_allocation_params_new_wrapped_texture (GstGLContext * context,
|
||||||
GstAllocationParams * alloc_params,
|
const GstAllocationParams * alloc_params,
|
||||||
GstVideoInfo * v_info,
|
const GstVideoInfo * v_info,
|
||||||
guint plane,
|
guint plane,
|
||||||
GstVideoAlignment * valign,
|
const GstVideoAlignment * valign,
|
||||||
GstGLTextureTarget target,
|
GstGLTextureTarget target,
|
||||||
GstGLFormat tex_format,
|
GstGLFormat tex_format,
|
||||||
guint tex_id,
|
guint tex_id,
|
||||||
|
@ -189,10 +189,10 @@ GstGLVideoAllocationParams * gst_gl_video_allocation_params_new_wrapped_texture
|
||||||
|
|
||||||
GST_GL_API
|
GST_GL_API
|
||||||
GstGLVideoAllocationParams * gst_gl_video_allocation_params_new_wrapped_gl_handle (GstGLContext * context,
|
GstGLVideoAllocationParams * gst_gl_video_allocation_params_new_wrapped_gl_handle (GstGLContext * context,
|
||||||
GstAllocationParams * alloc_params,
|
const GstAllocationParams * alloc_params,
|
||||||
GstVideoInfo * v_info,
|
const GstVideoInfo * v_info,
|
||||||
guint plane,
|
guint plane,
|
||||||
GstVideoAlignment * valign,
|
const GstVideoAlignment * valign,
|
||||||
GstGLTextureTarget target,
|
GstGLTextureTarget target,
|
||||||
GstGLFormat tex_format,
|
GstGLFormat tex_format,
|
||||||
gpointer gl_handle,
|
gpointer gl_handle,
|
||||||
|
@ -270,10 +270,10 @@ void gst_gl_memory_init (GstGLMemory * mem,
|
||||||
GstGLContext * context,
|
GstGLContext * context,
|
||||||
GstGLTextureTarget target,
|
GstGLTextureTarget target,
|
||||||
GstGLFormat tex_format,
|
GstGLFormat tex_format,
|
||||||
GstAllocationParams *params,
|
const GstAllocationParams *params,
|
||||||
GstVideoInfo * info,
|
const GstVideoInfo * info,
|
||||||
guint plane,
|
guint plane,
|
||||||
GstVideoAlignment *valign,
|
const GstVideoAlignment *valign,
|
||||||
gpointer user_data,
|
gpointer user_data,
|
||||||
GDestroyNotify notify);
|
GDestroyNotify notify);
|
||||||
|
|
||||||
|
|
|
@ -122,7 +122,7 @@ typedef struct
|
||||||
} GstGLMemoryPBOCopyParams;
|
} GstGLMemoryPBOCopyParams;
|
||||||
|
|
||||||
static inline guint
|
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))
|
if (GST_VIDEO_INFO_IS_YUV (info))
|
||||||
/* For now component width and plane width are the same and the
|
/* For now component width and plane width are the same and the
|
||||||
|
|
|
@ -115,7 +115,7 @@ _gl_rbo_create (GstGLRenderbuffer * gl_mem, GError ** error)
|
||||||
static void
|
static void
|
||||||
gst_gl_renderbuffer_init (GstGLRenderbuffer * mem, GstAllocator * allocator,
|
gst_gl_renderbuffer_init (GstGLRenderbuffer * mem, GstAllocator * allocator,
|
||||||
GstMemory * parent, GstGLContext * context,
|
GstMemory * parent, GstGLContext * context,
|
||||||
GstGLFormat renderbuffer_format, GstAllocationParams * params,
|
GstGLFormat renderbuffer_format, const GstAllocationParams * params,
|
||||||
guint width, guint height, gpointer user_data, GDestroyNotify notify)
|
guint width, guint height, gpointer user_data, GDestroyNotify notify)
|
||||||
{
|
{
|
||||||
gsize size;
|
gsize size;
|
||||||
|
@ -379,7 +379,7 @@ static gboolean
|
||||||
(GstGLRenderbufferAllocationParams * params, gsize struct_size,
|
(GstGLRenderbufferAllocationParams * params, gsize struct_size,
|
||||||
guint alloc_flags, GstGLAllocationParamsCopyFunc copy,
|
guint alloc_flags, GstGLAllocationParamsCopyFunc copy,
|
||||||
GstGLAllocationParamsFreeFunc free, GstGLContext * context,
|
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,
|
GstGLFormat renderbuffer_format, gpointer wrapped_data,
|
||||||
gpointer gl_handle, gpointer user_data, GDestroyNotify notify)
|
gpointer gl_handle, gpointer user_data, GDestroyNotify notify)
|
||||||
{
|
{
|
||||||
|
@ -416,7 +416,7 @@ static gboolean
|
||||||
*/
|
*/
|
||||||
GstGLRenderbufferAllocationParams *
|
GstGLRenderbufferAllocationParams *
|
||||||
gst_gl_renderbuffer_allocation_params_new (GstGLContext * context,
|
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)
|
guint width, guint height)
|
||||||
{
|
{
|
||||||
GstGLRenderbufferAllocationParams *params =
|
GstGLRenderbufferAllocationParams *params =
|
||||||
|
@ -455,7 +455,7 @@ gst_gl_renderbuffer_allocation_params_new (GstGLContext * context,
|
||||||
*/
|
*/
|
||||||
GstGLRenderbufferAllocationParams *
|
GstGLRenderbufferAllocationParams *
|
||||||
gst_gl_renderbuffer_allocation_params_new_wrapped (GstGLContext * context,
|
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,
|
guint width, guint height, gpointer gl_handle, gpointer user_data,
|
||||||
GDestroyNotify notify)
|
GDestroyNotify notify)
|
||||||
{
|
{
|
||||||
|
|
|
@ -128,14 +128,14 @@ struct _GstGLRenderbufferAllocationParams
|
||||||
|
|
||||||
GST_GL_API
|
GST_GL_API
|
||||||
GstGLRenderbufferAllocationParams * gst_gl_renderbuffer_allocation_params_new (GstGLContext * context,
|
GstGLRenderbufferAllocationParams * gst_gl_renderbuffer_allocation_params_new (GstGLContext * context,
|
||||||
GstAllocationParams * alloc_params,
|
const GstAllocationParams * alloc_params,
|
||||||
GstGLFormat renderbuffer_format,
|
GstGLFormat renderbuffer_format,
|
||||||
guint width,
|
guint width,
|
||||||
guint height);
|
guint height);
|
||||||
|
|
||||||
GST_GL_API
|
GST_GL_API
|
||||||
GstGLRenderbufferAllocationParams * gst_gl_renderbuffer_allocation_params_new_wrapped (GstGLContext * context,
|
GstGLRenderbufferAllocationParams * gst_gl_renderbuffer_allocation_params_new_wrapped (GstGLContext * context,
|
||||||
GstAllocationParams * alloc_params,
|
const GstAllocationParams * alloc_params,
|
||||||
GstGLFormat renderbuffer_format,
|
GstGLFormat renderbuffer_format,
|
||||||
guint width,
|
guint width,
|
||||||
guint height,
|
guint height,
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/*
|
/*
|
||||||
* GStreamer
|
* GStreamer
|
||||||
* Copyright (C) 2013 Matthew Waters <ystreet00@gmail.com>
|
* Copyright (C) 2013 Matthew Waters <ystreet00@gmail.com>
|
||||||
*
|
*
|
||||||
|
@ -610,8 +610,8 @@ gst_gl_query_local_gl_context (GstElement * element, GstPadDirection direction,
|
||||||
* Retrieve the size in bytes of a video plane of data with a certain alignment
|
* Retrieve the size in bytes of a video plane of data with a certain alignment
|
||||||
*/
|
*/
|
||||||
gsize
|
gsize
|
||||||
gst_gl_get_plane_data_size (GstVideoInfo * info, GstVideoAlignment * align,
|
gst_gl_get_plane_data_size (const GstVideoInfo * info,
|
||||||
guint plane)
|
const GstVideoAlignment * align, guint plane)
|
||||||
{
|
{
|
||||||
gint padded_height;
|
gint padded_height;
|
||||||
gsize plane_size;
|
gsize plane_size;
|
||||||
|
@ -639,8 +639,8 @@ gst_gl_get_plane_data_size (GstVideoInfo * info, GstVideoAlignment * align,
|
||||||
* and where the data from the previous plane ends.
|
* and where the data from the previous plane ends.
|
||||||
*/
|
*/
|
||||||
gsize
|
gsize
|
||||||
gst_gl_get_plane_start (GstVideoInfo * info, GstVideoAlignment * valign,
|
gst_gl_get_plane_start (const GstVideoInfo * info,
|
||||||
guint plane)
|
const GstVideoAlignment * valign, guint plane)
|
||||||
{
|
{
|
||||||
gsize plane_start;
|
gsize plane_start;
|
||||||
gint i;
|
gint i;
|
||||||
|
|
|
@ -32,10 +32,10 @@ GST_GL_API
|
||||||
gboolean gst_gl_ensure_element_data (gpointer element,
|
gboolean gst_gl_ensure_element_data (gpointer element,
|
||||||
GstGLDisplay **display_ptr, GstGLContext ** other_context_ptr);
|
GstGLDisplay **display_ptr, GstGLContext ** other_context_ptr);
|
||||||
GST_GL_API
|
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);
|
GstGLDisplay ** display, GstGLContext ** other_context);
|
||||||
GST_GL_API
|
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);
|
GstGLDisplay * display, GstGLContext * context, GstGLContext * other_context);
|
||||||
GST_GL_API
|
GST_GL_API
|
||||||
gboolean gst_gl_query_local_gl_context (GstElement * element, GstPadDirection direction,
|
gboolean gst_gl_query_local_gl_context (GstElement * element, GstPadDirection direction,
|
||||||
|
@ -45,10 +45,10 @@ GST_GL_API
|
||||||
void gst_gl_element_propagate_display_context (GstElement * element, GstGLDisplay * display);
|
void gst_gl_element_propagate_display_context (GstElement * element, GstGLDisplay * display);
|
||||||
|
|
||||||
GST_GL_API
|
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);
|
guint plane);
|
||||||
GST_GL_API
|
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);
|
guint plane);
|
||||||
|
|
||||||
GST_GL_API
|
GST_GL_API
|
||||||
|
|
|
@ -376,8 +376,8 @@ gst_gl_view_convert_set_context (GstGLViewConvert * viewconvert,
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
_view_convert_set_format (GstGLViewConvert * viewconvert,
|
_view_convert_set_format (GstGLViewConvert * viewconvert,
|
||||||
GstVideoInfo * in_info, GstGLTextureTarget from_target,
|
const GstVideoInfo * in_info, GstGLTextureTarget from_target,
|
||||||
GstVideoInfo * out_info, GstGLTextureTarget to_target)
|
const GstVideoInfo * out_info, GstGLTextureTarget to_target)
|
||||||
{
|
{
|
||||||
gboolean passthrough;
|
gboolean passthrough;
|
||||||
g_return_val_if_fail (GST_IS_GL_VIEW_CONVERT (viewconvert), FALSE);
|
g_return_val_if_fail (GST_IS_GL_VIEW_CONVERT (viewconvert), FALSE);
|
||||||
|
|
|
@ -844,7 +844,7 @@ no_format:
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_audio_visualizer_set_allocation (GstAudioVisualizer * scope,
|
gst_audio_visualizer_set_allocation (GstAudioVisualizer * scope,
|
||||||
GstBufferPool * pool, GstAllocator * allocator,
|
GstBufferPool * pool, GstAllocator * allocator,
|
||||||
GstAllocationParams * params, GstQuery * query)
|
const GstAllocationParams * params, GstQuery * query)
|
||||||
{
|
{
|
||||||
GstAllocator *oldalloc;
|
GstAllocator *oldalloc;
|
||||||
GstBufferPool *oldpool;
|
GstBufferPool *oldpool;
|
||||||
|
|
|
@ -50,7 +50,7 @@ GST_DEBUG_CATEGORY_STATIC (gst_video_pool_debug);
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gst_buffer_pool_config_set_video_alignment (GstStructure * config,
|
gst_buffer_pool_config_set_video_alignment (GstStructure * config,
|
||||||
GstVideoAlignment * align)
|
const GstVideoAlignment * align)
|
||||||
{
|
{
|
||||||
g_return_if_fail (config != NULL);
|
g_return_if_fail (config != NULL);
|
||||||
g_return_if_fail (align != NULL);
|
g_return_if_fail (align != NULL);
|
||||||
|
|
|
@ -48,7 +48,7 @@ G_BEGIN_DECLS
|
||||||
/* setting a bufferpool config */
|
/* setting a bufferpool config */
|
||||||
|
|
||||||
GST_VIDEO_API
|
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
|
GST_VIDEO_API
|
||||||
gboolean gst_buffer_pool_config_get_video_alignment (GstStructure *config, GstVideoAlignment *align);
|
gboolean gst_buffer_pool_config_get_video_alignment (GstStructure *config, GstVideoAlignment *align);
|
||||||
|
|
|
@ -2249,8 +2249,8 @@ convert_get_alpha_mode (GstVideoConverter * convert)
|
||||||
* Since: 1.20
|
* Since: 1.20
|
||||||
*/
|
*/
|
||||||
GstVideoConverter *
|
GstVideoConverter *
|
||||||
gst_video_converter_new_with_pool (GstVideoInfo * in_info,
|
gst_video_converter_new_with_pool (const GstVideoInfo * in_info,
|
||||||
GstVideoInfo * out_info, GstStructure * config, GstTaskPool * pool)
|
const GstVideoInfo * out_info, GstStructure * config, GstTaskPool * pool)
|
||||||
{
|
{
|
||||||
GstVideoConverter *convert;
|
GstVideoConverter *convert;
|
||||||
GstLineCache *prev;
|
GstLineCache *prev;
|
||||||
|
@ -2490,8 +2490,8 @@ no_pack_func:
|
||||||
* Since: 1.6
|
* Since: 1.6
|
||||||
*/
|
*/
|
||||||
GstVideoConverter *
|
GstVideoConverter *
|
||||||
gst_video_converter_new (GstVideoInfo * in_info, GstVideoInfo * out_info,
|
gst_video_converter_new (const GstVideoInfo * in_info,
|
||||||
GstStructure * config)
|
const GstVideoInfo * out_info, GstStructure * config)
|
||||||
{
|
{
|
||||||
return gst_video_converter_new_with_pool (in_info, out_info, config, NULL);
|
return gst_video_converter_new_with_pool (in_info, out_info, config, NULL);
|
||||||
}
|
}
|
||||||
|
|
|
@ -276,13 +276,13 @@ typedef enum {
|
||||||
typedef struct _GstVideoConverter GstVideoConverter;
|
typedef struct _GstVideoConverter GstVideoConverter;
|
||||||
|
|
||||||
GST_VIDEO_API
|
GST_VIDEO_API
|
||||||
GstVideoConverter * gst_video_converter_new (GstVideoInfo *in_info,
|
GstVideoConverter * gst_video_converter_new (const GstVideoInfo *in_info,
|
||||||
GstVideoInfo *out_info,
|
const GstVideoInfo *out_info,
|
||||||
GstStructure *config);
|
GstStructure *config);
|
||||||
|
|
||||||
GST_VIDEO_API
|
GST_VIDEO_API
|
||||||
GstVideoConverter * gst_video_converter_new_with_pool (GstVideoInfo * in_info,
|
GstVideoConverter * gst_video_converter_new_with_pool (const GstVideoInfo * in_info,
|
||||||
GstVideoInfo * out_info,
|
const GstVideoInfo * out_info,
|
||||||
GstStructure * config,
|
GstStructure * config,
|
||||||
GstTaskPool * pool);
|
GstTaskPool * pool);
|
||||||
|
|
||||||
|
|
|
@ -67,7 +67,7 @@ video_frame_get_perf_category (void)
|
||||||
* Returns: %TRUE on success.
|
* Returns: %TRUE on success.
|
||||||
*/
|
*/
|
||||||
gboolean
|
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)
|
GstBuffer * buffer, gint id, GstMapFlags flags)
|
||||||
{
|
{
|
||||||
GstVideoMeta *meta;
|
GstVideoMeta *meta;
|
||||||
|
@ -240,7 +240,7 @@ invalid_size:
|
||||||
* Returns: %TRUE on success.
|
* Returns: %TRUE on success.
|
||||||
*/
|
*/
|
||||||
gboolean
|
gboolean
|
||||||
gst_video_frame_map (GstVideoFrame * frame, GstVideoInfo * info,
|
gst_video_frame_map (GstVideoFrame * frame, const GstVideoInfo * info,
|
||||||
GstBuffer * buffer, GstMapFlags flags)
|
GstBuffer * buffer, GstMapFlags flags)
|
||||||
{
|
{
|
||||||
return gst_video_frame_map_id (frame, info, buffer, -1, flags);
|
return gst_video_frame_map_id (frame, info, buffer, -1, flags);
|
||||||
|
|
|
@ -94,11 +94,11 @@ struct _GstVideoFrame {
|
||||||
};
|
};
|
||||||
|
|
||||||
GST_VIDEO_API
|
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);
|
GstBuffer *buffer, GstMapFlags flags);
|
||||||
|
|
||||||
GST_VIDEO_API
|
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);
|
GstBuffer *buffer, gint id, GstMapFlags flags);
|
||||||
|
|
||||||
GST_VIDEO_API
|
GST_VIDEO_API
|
||||||
|
|
|
@ -1208,7 +1208,7 @@ fill_planes (GstVideoInfo * info, gsize plane_size[GST_VIDEO_MAX_PLANES])
|
||||||
* Returns: TRUE if the conversion was successful.
|
* Returns: TRUE if the conversion was successful.
|
||||||
*/
|
*/
|
||||||
gboolean
|
gboolean
|
||||||
gst_video_info_convert (GstVideoInfo * info,
|
gst_video_info_convert (const GstVideoInfo * info,
|
||||||
GstFormat src_format, gint64 src_value,
|
GstFormat src_format, gint64 src_value,
|
||||||
GstFormat dest_format, gint64 * dest_value)
|
GstFormat dest_format, gint64 * dest_value)
|
||||||
{
|
{
|
||||||
|
@ -1324,6 +1324,9 @@ done:
|
||||||
* @align: alignment parameters
|
* @align: alignment parameters
|
||||||
* @plane_size: (out) (allow-none): array used to store the plane sizes
|
* @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,
|
* 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
|
* of each video plane after the alignment, including all horizontal and vertical
|
||||||
* paddings.
|
* paddings.
|
||||||
|
|
|
@ -455,7 +455,7 @@ GST_VIDEO_API
|
||||||
GstCaps * gst_video_info_to_caps (const GstVideoInfo *info);
|
GstCaps * gst_video_info_to_caps (const GstVideoInfo *info);
|
||||||
|
|
||||||
GST_VIDEO_API
|
GST_VIDEO_API
|
||||||
gboolean gst_video_info_convert (GstVideoInfo *info,
|
gboolean gst_video_info_convert (const GstVideoInfo *info,
|
||||||
GstFormat src_format,
|
GstFormat src_format,
|
||||||
gint64 src_value,
|
gint64 src_value,
|
||||||
GstFormat dest_format,
|
GstFormat dest_format,
|
||||||
|
|
|
@ -1078,8 +1078,9 @@ gst_video_overlay_rectangle_apply_global_alpha (GstVideoOverlayRectangle * rect,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_video_overlay_rectangle_convert (GstVideoInfo * src, GstBuffer * src_buffer,
|
gst_video_overlay_rectangle_convert (const GstVideoInfo * src,
|
||||||
GstVideoFormat dest_format, GstVideoInfo * dest, GstBuffer ** dest_buffer)
|
GstBuffer * src_buffer, GstVideoFormat dest_format, GstVideoInfo * dest,
|
||||||
|
GstBuffer ** dest_buffer)
|
||||||
{
|
{
|
||||||
gint width, height, stride;
|
gint width, height, stride;
|
||||||
GstVideoFrame src_frame, dest_frame;
|
GstVideoFrame src_frame, dest_frame;
|
||||||
|
|
|
@ -612,7 +612,7 @@ G_DEFINE_TYPE_WITH_CODE (GstCompositor, gst_compositor,
|
||||||
gst_compositor_child_proxy_init));
|
gst_compositor_child_proxy_init));
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
set_functions (GstCompositor * self, GstVideoInfo * info)
|
set_functions (GstCompositor * self, const GstVideoInfo * info)
|
||||||
{
|
{
|
||||||
gboolean ret = FALSE;
|
gboolean ret = FALSE;
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Formulas for PAR, DAR, width and height relations:
|
* Formulas for PAR, DAR, width and height relations:
|
||||||
*
|
*
|
||||||
* dar_n w par_n
|
* dar_n w par_n
|
||||||
|
@ -57,7 +57,7 @@
|
||||||
* par_n h dar_n
|
* par_n h dar_n
|
||||||
* ----- = - * -----
|
* ----- = - * -----
|
||||||
* par_d w dar_d
|
* par_d w dar_d
|
||||||
*
|
*
|
||||||
* dar_n par_d
|
* dar_n par_d
|
||||||
* w = h * ----- * -----
|
* w = h * ----- * -----
|
||||||
* dar_d par_n
|
* dar_d par_n
|
||||||
|
|
|
@ -886,7 +886,8 @@ gst_xvcontext_update_colorbalance (GstXvContext * context,
|
||||||
/* This function tries to get a format matching with a given caps in the
|
/* 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 */
|
supported list of formats we generated in gst_xvimagesink_get_xv_support */
|
||||||
gint
|
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;
|
GList *list = NULL;
|
||||||
|
|
||||||
|
|
|
@ -196,7 +196,7 @@ gst_xvcontext_unref (GstXvContext * xvcontext)
|
||||||
}
|
}
|
||||||
|
|
||||||
gint gst_xvcontext_get_format_from_info (GstXvContext * xvcontext,
|
gint gst_xvcontext_get_format_from_info (GstXvContext * xvcontext,
|
||||||
GstVideoInfo * info);
|
const GstVideoInfo * info);
|
||||||
|
|
||||||
|
|
||||||
void gst_xvcontext_set_synchronous (GstXvContext * xvcontext,
|
void gst_xvcontext_set_synchronous (GstXvContext * xvcontext,
|
||||||
|
|
|
@ -100,7 +100,8 @@ GST_START_TEST (test_allocator_pbo_alloc)
|
||||||
GST_END_TEST;
|
GST_END_TEST;
|
||||||
|
|
||||||
static GstMemory *
|
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;
|
GstAllocator *gl_allocator;
|
||||||
GstGLBaseMemoryAllocator *base_mem_alloc;
|
GstGLBaseMemoryAllocator *base_mem_alloc;
|
||||||
|
@ -194,7 +195,7 @@ GST_START_TEST (test_memory_copy)
|
||||||
GST_END_TEST;
|
GST_END_TEST;
|
||||||
|
|
||||||
static GstMemory *
|
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)
|
guint plane, guint8 * data)
|
||||||
{
|
{
|
||||||
GstAllocator *gl_allocator;
|
GstAllocator *gl_allocator;
|
||||||
|
|
Loading…
Reference in a new issue