diff --git a/gst-libs/gst/gl/egl/gstglcontext_egl.h b/gst-libs/gst/gl/egl/gstglcontext_egl.h index 1923664d0f..40adc99788 100644 --- a/gst-libs/gst/gl/egl/gstglcontext_egl.h +++ b/gst-libs/gst/gl/egl/gstglcontext_egl.h @@ -32,7 +32,7 @@ G_BEGIN_DECLS typedef struct _GstGLContextEGL GstGLContextEGL; typedef struct _GstGLContextEGLClass GstGLContextEGLClass; -GType gst_gl_context_egl_get_type (void); +G_GNUC_INTERNAL GType gst_gl_context_egl_get_type (void); #define GST_TYPE_GL_CONTEXT_EGL (gst_gl_context_egl_get_type()) /* FIXME: remove this when moving to -base */ @@ -84,8 +84,13 @@ struct _GstGLContextEGLClass GstGLContextClass parent; }; +G_GNUC_INTERNAL GstGLContextEGL * gst_gl_context_egl_new (GstGLDisplay * display); + +G_GNUC_INTERNAL guintptr gst_gl_context_egl_get_current_context (void); + +G_GNUC_INTERNAL gpointer gst_gl_context_egl_get_proc_address (GstGLAPI gl_api, const gchar * name); G_END_DECLS diff --git a/gst-libs/gst/gl/gstglcontext.c b/gst-libs/gst/gl/gstglcontext.c index aed46185ef..8c1b7b5972 100644 --- a/gst-libs/gst/gl/gstglcontext.c +++ b/gst-libs/gst/gl/gstglcontext.c @@ -234,7 +234,7 @@ typedef struct } GstGLWrappedContextClass; #define GST_TYPE_GL_WRAPPED_CONTEXT (gst_gl_wrapped_context_get_type()) -GType gst_gl_wrapped_context_get_type (void); +static GType gst_gl_wrapped_context_get_type (void); G_DEFINE_TYPE (GstGLWrappedContext, gst_gl_wrapped_context, GST_TYPE_GL_CONTEXT); diff --git a/gst-libs/gst/gl/gstglwindow.c b/gst-libs/gst/gl/gstglwindow.c index c2e8be07c0..4a5891a53e 100644 --- a/gst-libs/gst/gl/gstglwindow.c +++ b/gst-libs/gst/gl/gstglwindow.c @@ -115,7 +115,7 @@ typedef struct _GstGLDummyWindowCass GstGLWindowClass parent; } GstGLDummyWindowClass; -GstGLDummyWindow *gst_gl_dummy_window_new (void); +static GstGLDummyWindow *gst_gl_dummy_window_new (void); enum { @@ -964,7 +964,7 @@ gst_gl_window_resize (GstGLWindow * window, guint width, guint height) window->queue_resize = FALSE; } -GType gst_gl_dummy_window_get_type (void); +static GType gst_gl_dummy_window_get_type (void); G_DEFINE_TYPE (GstGLDummyWindow, gst_gl_dummy_window, GST_TYPE_GL_WINDOW); @@ -1009,7 +1009,7 @@ gst_gl_dummy_window_init (GstGLDummyWindow * dummy) dummy->handle = 0; } -GstGLDummyWindow * +static GstGLDummyWindow * gst_gl_dummy_window_new (void) { GstGLDummyWindow *window; diff --git a/gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.h b/gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.h index 16a0543ea3..07c7ad1b95 100644 --- a/gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.h +++ b/gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.h @@ -95,10 +95,13 @@ struct _GstGLWindowWaylandEGLClass { gpointer _reserved[GST_PADDING]; }; -GType gst_gl_window_wayland_egl_get_type (void); +G_GNUC_INTERNAL +GType gst_gl_window_wayland_egl_get_type (void); +G_GNUC_INTERNAL GstGLWindowWaylandEGL * gst_gl_window_wayland_egl_new (GstGLDisplay * display); +G_GNUC_INTERNAL void gst_gl_window_wayland_egl_create_window (GstGLWindowWaylandEGL * window_egl); G_END_DECLS diff --git a/gst-libs/gst/gl/x11/gstglcontext_glx.c b/gst-libs/gst/gl/x11/gstglcontext_glx.c index 795cd9b981..06b7b6c5c5 100644 --- a/gst-libs/gst/gl/x11/gstglcontext_glx.c +++ b/gst-libs/gst/gl/x11/gstglcontext_glx.c @@ -55,7 +55,7 @@ static gboolean gst_gl_context_glx_create_context (GstGLContext * static void gst_gl_context_glx_destroy_context (GstGLContext * context); static gboolean gst_gl_context_glx_choose_format (GstGLContext * context, GError ** error); -GstGLAPI gst_gl_context_glx_get_gl_api (GstGLContext * context); +static GstGLAPI gst_gl_context_glx_get_gl_api (GstGLContext * context); static GstGLPlatform gst_gl_context_glx_get_gl_platform (GstGLContext * context); static void gst_gl_context_glx_get_gl_platform_version (GstGLContext * context, diff --git a/gst-libs/gst/gl/x11/gstglcontext_glx.h b/gst-libs/gst/gl/x11/gstglcontext_glx.h index a58c70df45..e3eb8fe3c7 100644 --- a/gst-libs/gst/gl/x11/gstglcontext_glx.h +++ b/gst-libs/gst/gl/x11/gstglcontext_glx.h @@ -28,7 +28,7 @@ G_BEGIN_DECLS #define GST_TYPE_GL_CONTEXT_GLX (gst_gl_context_glx_get_type()) -GType gst_gl_context_glx_get_type (void); +G_GNUC_INTERNAL GType gst_gl_context_glx_get_type (void); /* FIXME: remove this when moving to -base */ #ifndef GST_DISABLE_DEPRECATED @@ -63,8 +63,13 @@ struct _GstGLContextGLXClass { gpointer _reserved[GST_PADDING]; }; +G_GNUC_INTERNAL GstGLContextGLX * gst_gl_context_glx_new (GstGLDisplay * display); + +G_GNUC_INTERNAL guintptr gst_gl_context_glx_get_current_context (void); + +G_GNUC_INTERNAL gpointer gst_gl_context_glx_get_proc_address (GstGLAPI gl_api, const gchar * name); G_END_DECLS diff --git a/gst-libs/gst/gl/x11/gstgldisplay_x11.c b/gst-libs/gst/gl/x11/gstgldisplay_x11.c index c19d7a61a2..07c2962145 100644 --- a/gst-libs/gst/gl/x11/gstgldisplay_x11.c +++ b/gst-libs/gst/gl/x11/gstgldisplay_x11.c @@ -34,7 +34,9 @@ G_DEFINE_TYPE (GstGLDisplayX11, gst_gl_display_x11, GST_TYPE_GL_DISPLAY); static void gst_gl_display_x11_finalize (GObject * object); static guintptr gst_gl_display_x11_get_handle (GstGLDisplay * display); -gboolean gst_gl_display_x11_handle_event (GstGLDisplayX11 * display_x11); +G_GNUC_INTERNAL + gboolean gst_gl_display_x11_handle_event (GstGLDisplayX11 * display_x11); + extern gboolean gst_gl_window_x11_handle_event (GstGLWindowX11 * window_x11, xcb_generic_event_t * event); diff --git a/gst-libs/gst/gl/x11/gstglwindow_x11.c b/gst-libs/gst/gl/x11/gstglwindow_x11.c index 62e901868b..a98b2c3994 100644 --- a/gst-libs/gst/gl/x11/gstglwindow_x11.c +++ b/gst-libs/gst/gl/x11/gstglwindow_x11.c @@ -41,7 +41,8 @@ #define gst_gl_window_x11_parent_class parent_class G_DEFINE_TYPE (GstGLWindowX11, gst_gl_window_x11, GST_TYPE_GL_WINDOW); -gboolean gst_gl_window_x11_handle_event (GstGLWindowX11 * window_x11, +G_GNUC_INTERNAL + gboolean gst_gl_window_x11_handle_event (GstGLWindowX11 * window_x11, xcb_generic_event_t * event); /* X error trap */ @@ -67,23 +68,23 @@ struct _GstGLWindowX11Private GstVideoRectangle render_rect; }; -guintptr gst_gl_window_x11_get_display (GstGLWindow * window); +static guintptr gst_gl_window_x11_get_display (GstGLWindow * window); guintptr gst_gl_window_x11_get_gl_context (GstGLWindow * window); gboolean gst_gl_window_x11_activate (GstGLWindow * window, gboolean activate); -void gst_gl_window_x11_set_window_handle (GstGLWindow * window, +static void gst_gl_window_x11_set_window_handle (GstGLWindow * window, guintptr handle); static gboolean gst_gl_window_x11_set_render_rectangle (GstGLWindow * window, int x, int y, int width, int height); -guintptr gst_gl_window_x11_get_window_handle (GstGLWindow * window); +static guintptr gst_gl_window_x11_get_window_handle (GstGLWindow * window); static void gst_gl_window_x11_set_preferred_size (GstGLWindow * window, gint width, gint height); -void gst_gl_window_x11_show (GstGLWindow * window); -void gst_gl_window_x11_draw (GstGLWindow * window); +static void gst_gl_window_x11_show (GstGLWindow * window); +static void gst_gl_window_x11_draw (GstGLWindow * window); gboolean gst_gl_window_x11_create_context (GstGLWindow * window, GstGLAPI gl_api, guintptr external_gl_context, GError ** error); -gboolean gst_gl_window_x11_open (GstGLWindow * window, GError ** error); -void gst_gl_window_x11_close (GstGLWindow * window); -void gst_gl_window_x11_handle_events (GstGLWindow * window, +static gboolean gst_gl_window_x11_open (GstGLWindow * window, GError ** error); +static void gst_gl_window_x11_close (GstGLWindow * window); +static void gst_gl_window_x11_handle_events (GstGLWindow * window, gboolean handle_events); static void @@ -144,7 +145,7 @@ gst_gl_window_x11_new (GstGLDisplay * display) return window; } -gboolean +static gboolean gst_gl_window_x11_open (GstGLWindow * window, GError ** error) { GstGLWindowX11 *window_x11 = GST_GL_WINDOW_X11 (window); @@ -261,7 +262,7 @@ gst_gl_window_x11_create_window (GstGLWindowX11 * window_x11) return TRUE; } -void +static void gst_gl_window_x11_close (GstGLWindow * window) { GstGLWindowX11 *window_x11 = GST_GL_WINDOW_X11 (window); @@ -283,7 +284,7 @@ gst_gl_window_x11_close (GstGLWindow * window) } /* called by the gl thread */ -void +static void gst_gl_window_x11_set_window_handle (GstGLWindow * window, guintptr id) { GstGLWindowX11 *window_x11; @@ -378,7 +379,7 @@ gst_gl_window_x11_set_render_rectangle (GstGLWindow * window, return TRUE; } -guintptr +static guintptr gst_gl_window_x11_get_window_handle (GstGLWindow * window) { GstGLWindowX11 *window_x11; @@ -417,7 +418,7 @@ _show_window (GstGLWindow * window) } } -void +static void gst_gl_window_x11_show (GstGLWindow * window) { gst_gl_window_send_message (window, (GstGLWindowCB) _show_window, window); @@ -491,13 +492,13 @@ draw_cb (gpointer data) } /* Not called by the gl thread */ -void +static void gst_gl_window_x11_draw (GstGLWindow * window) { gst_gl_window_send_message (window, (GstGLWindowCB) draw_cb, window); } -void +static void gst_gl_window_x11_handle_events (GstGLWindow * window, gboolean handle_events) { GstGLWindowX11 *window_x11; @@ -657,7 +658,7 @@ gst_gl_window_x11_untrap_x_errors (void) return TrappedErrorCode; } -guintptr +static guintptr gst_gl_window_x11_get_display (GstGLWindow * window) { GstGLWindowX11 *window_x11 = GST_GL_WINDOW_X11 (window); diff --git a/gst-libs/gst/gl/x11/gstglwindow_x11.h b/gst-libs/gst/gl/x11/gstglwindow_x11.h index 77092ba60b..e612ff1907 100644 --- a/gst-libs/gst/gl/x11/gstglwindow_x11.h +++ b/gst-libs/gst/gl/x11/gstglwindow_x11.h @@ -29,7 +29,8 @@ G_BEGIN_DECLS #define GST_TYPE_GL_WINDOW_X11 (gst_gl_window_x11_get_type()) -GType gst_gl_window_x11_get_type (void); +G_GNUC_INTERNAL GType gst_gl_window_x11_get_type (void); + #define GST_GL_WINDOW_X11(o) (G_TYPE_CHECK_INSTANCE_CAST((o), GST_TYPE_GL_WINDOW_X11, GstGLWindowX11)) #define GST_GL_WINDOW_X11_CLASS(k) (G_TYPE_CHECK_CLASS((k), GST_TYPE_GL_WINDOW_X11, GstGLWindowX11Class)) #define GST_IS_GL_WINDOW_X11(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), GST_TYPE_GL_WINDOW_X11)) @@ -93,11 +94,16 @@ struct _GstGLWindowX11Class { gpointer _reserved[GST_PADDING_LARGE]; }; +G_GNUC_INTERNAL GstGLWindowX11 * gst_gl_window_x11_new (GstGLDisplay * display); +G_GNUC_INTERNAL void gst_gl_window_x11_trap_x_errors (void); + +G_GNUC_INTERNAL gint gst_gl_window_x11_untrap_x_errors (void); +G_GNUC_INTERNAL gboolean gst_gl_window_x11_create_window (GstGLWindowX11 * window_x11); G_END_DECLS diff --git a/gst-libs/gst/gl/x11/xcb_event_source.c b/gst-libs/gst/gl/x11/xcb_event_source.c index 4077223945..8dbb15398a 100644 --- a/gst-libs/gst/gl/x11/xcb_event_source.c +++ b/gst-libs/gst/gl/x11/xcb_event_source.c @@ -29,7 +29,9 @@ #include "gstgldisplay_x11.h" #include "gstglwindow_x11.h" -extern gboolean gst_gl_display_x11_handle_event (GstGLDisplayX11 * display_x11); +G_GNUC_INTERNAL + extern gboolean gst_gl_display_x11_handle_event (GstGLDisplayX11 * + display_x11); typedef struct _XCBEventSource {