#define gst_app_sink_parent_class parent_class
G_DEFINE_TYPE_WITH_CODE (GstAppSink, gst_app_sink, GST_TYPE_BASE_SINK,
+ G_ADD_PRIVATE (GstAppSink)
G_IMPLEMENT_INTERFACE (GST_TYPE_URI_HANDLER,
gst_app_sink_uri_handler_init));
klass->pull_sample = gst_app_sink_pull_sample;
klass->try_pull_preroll = gst_app_sink_try_pull_preroll;
klass->try_pull_sample = gst_app_sink_try_pull_sample;
-
- g_type_class_add_private (klass, sizeof (GstAppSinkPrivate));
}
static void
{
GstAppSinkPrivate *priv;
- priv = appsink->priv =
- G_TYPE_INSTANCE_GET_PRIVATE (appsink, GST_TYPE_APP_SINK,
- GstAppSinkPrivate);
+ priv = appsink->priv = gst_app_sink_get_instance_private (appsink);
g_mutex_init (&priv->mutex);
g_cond_init (&priv->cond);
#define gst_app_src_parent_class parent_class
G_DEFINE_TYPE_WITH_CODE (GstAppSrc, gst_app_src, GST_TYPE_BASE_SRC,
+ G_ADD_PRIVATE (GstAppSrc)
G_IMPLEMENT_INTERFACE (GST_TYPE_URI_HANDLER, gst_app_src_uri_handler_init));
static void
klass->push_buffer_list = gst_app_src_push_buffer_list_action;
klass->push_sample = gst_app_src_push_sample_action;
klass->end_of_stream = gst_app_src_end_of_stream;
-
- g_type_class_add_private (klass, sizeof (GstAppSrcPrivate));
}
static void
{
GstAppSrcPrivate *priv;
- priv = appsrc->priv = G_TYPE_INSTANCE_GET_PRIVATE (appsrc, GST_TYPE_APP_SRC,
- GstAppSrcPrivate);
+ priv = appsrc->priv = gst_app_src_get_instance_private (appsrc);
g_mutex_init (&priv->mutex);
g_cond_init (&priv->cond);