mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-24 23:16:30 +00:00
waylandsink/waylandpool: move code around for better readability
This commit is contained in:
parent
1e45b1480c
commit
0ee558f4c6
1 changed files with 34 additions and 30 deletions
|
@ -168,11 +168,45 @@ shm_pool_reset (struct shm_pool *pool)
|
||||||
|
|
||||||
/* bufferpool */
|
/* bufferpool */
|
||||||
static void gst_wayland_buffer_pool_finalize (GObject * object);
|
static void gst_wayland_buffer_pool_finalize (GObject * object);
|
||||||
|
static gboolean wayland_buffer_pool_set_config (GstBufferPool * pool,
|
||||||
|
GstStructure * config);
|
||||||
|
static GstFlowReturn wayland_buffer_pool_alloc (GstBufferPool * pool,
|
||||||
|
GstBuffer ** buffer, GstBufferPoolAcquireParams * params);
|
||||||
|
|
||||||
#define gst_wayland_buffer_pool_parent_class parent_class
|
#define gst_wayland_buffer_pool_parent_class parent_class
|
||||||
G_DEFINE_TYPE (GstWaylandBufferPool, gst_wayland_buffer_pool,
|
G_DEFINE_TYPE (GstWaylandBufferPool, gst_wayland_buffer_pool,
|
||||||
GST_TYPE_BUFFER_POOL);
|
GST_TYPE_BUFFER_POOL);
|
||||||
|
|
||||||
|
static void
|
||||||
|
gst_wayland_buffer_pool_class_init (GstWaylandBufferPoolClass * klass)
|
||||||
|
{
|
||||||
|
GObjectClass *gobject_class = (GObjectClass *) klass;
|
||||||
|
GstBufferPoolClass *gstbufferpool_class = (GstBufferPoolClass *) klass;
|
||||||
|
|
||||||
|
gobject_class->finalize = gst_wayland_buffer_pool_finalize;
|
||||||
|
|
||||||
|
gstbufferpool_class->set_config = wayland_buffer_pool_set_config;
|
||||||
|
gstbufferpool_class->alloc_buffer = wayland_buffer_pool_alloc;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gst_wayland_buffer_pool_init (GstWaylandBufferPool * pool)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gst_wayland_buffer_pool_finalize (GObject * object)
|
||||||
|
{
|
||||||
|
GstWaylandBufferPool *pool = GST_WAYLAND_BUFFER_POOL_CAST (object);
|
||||||
|
|
||||||
|
if (pool->shm_pool)
|
||||||
|
shm_pool_destroy (pool->shm_pool);
|
||||||
|
|
||||||
|
gst_object_unref (pool->sink);
|
||||||
|
|
||||||
|
G_OBJECT_CLASS (gst_wayland_buffer_pool_parent_class)->finalize (object);
|
||||||
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
wayland_buffer_pool_set_config (GstBufferPool * pool, GstStructure * config)
|
wayland_buffer_pool_set_config (GstBufferPool * pool, GstStructure * config)
|
||||||
{
|
{
|
||||||
|
@ -301,33 +335,3 @@ gst_wayland_buffer_pool_new (GstWaylandSink * waylandsink)
|
||||||
|
|
||||||
return GST_BUFFER_POOL_CAST (pool);
|
return GST_BUFFER_POOL_CAST (pool);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
gst_wayland_buffer_pool_class_init (GstWaylandBufferPoolClass * klass)
|
|
||||||
{
|
|
||||||
GObjectClass *gobject_class = (GObjectClass *) klass;
|
|
||||||
GstBufferPoolClass *gstbufferpool_class = (GstBufferPoolClass *) klass;
|
|
||||||
|
|
||||||
gobject_class->finalize = gst_wayland_buffer_pool_finalize;
|
|
||||||
|
|
||||||
gstbufferpool_class->set_config = wayland_buffer_pool_set_config;
|
|
||||||
gstbufferpool_class->alloc_buffer = wayland_buffer_pool_alloc;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
gst_wayland_buffer_pool_init (GstWaylandBufferPool * pool)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
gst_wayland_buffer_pool_finalize (GObject * object)
|
|
||||||
{
|
|
||||||
GstWaylandBufferPool *pool = GST_WAYLAND_BUFFER_POOL_CAST (object);
|
|
||||||
|
|
||||||
if (pool->shm_pool)
|
|
||||||
shm_pool_destroy (pool->shm_pool);
|
|
||||||
|
|
||||||
gst_object_unref (pool->sink);
|
|
||||||
|
|
||||||
G_OBJECT_CLASS (gst_wayland_buffer_pool_parent_class)->finalize (object);
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in a new issue