mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-06 16:19:59 +00:00
gstbasetranform: replace GST_BASE_TRANSFORM with GST_BASE_TRANSFORM_CAST
To avoid a global type-lock on chain etc.
This commit is contained in:
parent
b63ed9e066
commit
df27ec3e67
3 changed files with 17 additions and 16 deletions
|
@ -1551,7 +1551,7 @@ gst_base_transform_query (GstPad * pad, GstObject * parent, GstQuery * query)
|
|||
GstBaseTransformClass *bclass;
|
||||
gboolean ret = FALSE;
|
||||
|
||||
trans = GST_BASE_TRANSFORM (parent);
|
||||
trans = GST_BASE_TRANSFORM_CAST (parent);
|
||||
bclass = GST_BASE_TRANSFORM_GET_CLASS (trans);
|
||||
|
||||
if (bclass->query)
|
||||
|
@ -1832,7 +1832,7 @@ gst_base_transform_sink_event (GstPad * pad, GstObject * parent,
|
|||
GstBaseTransformClass *bclass;
|
||||
gboolean ret = TRUE;
|
||||
|
||||
trans = GST_BASE_TRANSFORM (parent);
|
||||
trans = GST_BASE_TRANSFORM_CAST (parent);
|
||||
bclass = GST_BASE_TRANSFORM_GET_CLASS (trans);
|
||||
|
||||
if (bclass->sink_event)
|
||||
|
@ -1913,7 +1913,7 @@ gst_base_transform_src_event (GstPad * pad, GstObject * parent,
|
|||
GstBaseTransformClass *bclass;
|
||||
gboolean ret = TRUE;
|
||||
|
||||
trans = GST_BASE_TRANSFORM (parent);
|
||||
trans = GST_BASE_TRANSFORM_CAST (parent);
|
||||
bclass = GST_BASE_TRANSFORM_GET_CLASS (trans);
|
||||
|
||||
if (bclass->src_event)
|
||||
|
@ -2160,7 +2160,7 @@ gst_base_transform_getrange (GstPad * pad, GstObject * parent, guint64 offset,
|
|||
guint length, GstBuffer ** buffer)
|
||||
{
|
||||
GstBaseTransformClass *klass = GST_BASE_TRANSFORM_GET_CLASS (parent);
|
||||
GstBaseTransform *trans = GST_BASE_TRANSFORM (parent);
|
||||
GstBaseTransform *trans = GST_BASE_TRANSFORM_CAST (parent);
|
||||
GstBaseTransformPrivate *priv = trans->priv;
|
||||
GstFlowReturn ret;
|
||||
GstBuffer *inbuf = NULL;
|
||||
|
@ -2237,7 +2237,7 @@ pull_error:
|
|||
static GstFlowReturn
|
||||
gst_base_transform_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
|
||||
{
|
||||
GstBaseTransform *trans = GST_BASE_TRANSFORM (parent);
|
||||
GstBaseTransform *trans = GST_BASE_TRANSFORM_CAST (parent);
|
||||
GstBaseTransformClass *klass = GST_BASE_TRANSFORM_GET_CLASS (trans);
|
||||
GstBaseTransformPrivate *priv = trans->priv;
|
||||
GstFlowReturn ret;
|
||||
|
@ -2334,7 +2334,7 @@ gst_base_transform_set_property (GObject * object, guint prop_id,
|
|||
{
|
||||
GstBaseTransform *trans;
|
||||
|
||||
trans = GST_BASE_TRANSFORM (object);
|
||||
trans = GST_BASE_TRANSFORM_CAST (object);
|
||||
|
||||
switch (prop_id) {
|
||||
case PROP_QOS:
|
||||
|
@ -2352,7 +2352,7 @@ gst_base_transform_get_property (GObject * object, guint prop_id,
|
|||
{
|
||||
GstBaseTransform *trans;
|
||||
|
||||
trans = GST_BASE_TRANSFORM (object);
|
||||
trans = GST_BASE_TRANSFORM_CAST (object);
|
||||
|
||||
switch (prop_id) {
|
||||
case PROP_QOS:
|
||||
|
@ -2439,7 +2439,7 @@ gst_base_transform_sink_activate_mode (GstPad * pad, GstObject * parent,
|
|||
gboolean result = FALSE;
|
||||
GstBaseTransform *trans;
|
||||
|
||||
trans = GST_BASE_TRANSFORM (parent);
|
||||
trans = GST_BASE_TRANSFORM_CAST (parent);
|
||||
|
||||
switch (mode) {
|
||||
case GST_PAD_MODE_PUSH:
|
||||
|
@ -2465,7 +2465,7 @@ gst_base_transform_src_activate_mode (GstPad * pad, GstObject * parent,
|
|||
gboolean result = FALSE;
|
||||
GstBaseTransform *trans;
|
||||
|
||||
trans = GST_BASE_TRANSFORM (parent);
|
||||
trans = GST_BASE_TRANSFORM_CAST (parent);
|
||||
|
||||
switch (mode) {
|
||||
case GST_PAD_MODE_PULL:
|
||||
|
|
|
@ -128,7 +128,7 @@ static void
|
|||
gst_funnel_set_property (GObject * object, guint prop_id,
|
||||
const GValue * value, GParamSpec * pspec)
|
||||
{
|
||||
GstFunnel *funnel = GST_FUNNEL (object);
|
||||
GstFunnel *funnel = GST_FUNNEL_CAST (object);
|
||||
|
||||
switch (prop_id) {
|
||||
case PROP_FORWARD_STICKY_EVENTS:
|
||||
|
@ -144,7 +144,7 @@ static void
|
|||
gst_funnel_get_property (GObject * object, guint prop_id, GValue * value,
|
||||
GParamSpec * pspec)
|
||||
{
|
||||
GstFunnel *funnel = GST_FUNNEL (object);
|
||||
GstFunnel *funnel = GST_FUNNEL_CAST (object);
|
||||
|
||||
switch (prop_id) {
|
||||
case PROP_FORWARD_STICKY_EVENTS:
|
||||
|
@ -159,7 +159,7 @@ gst_funnel_get_property (GObject * object, guint prop_id, GValue * value,
|
|||
static void
|
||||
gst_funnel_dispose (GObject * object)
|
||||
{
|
||||
GstFunnel *funnel = GST_FUNNEL (object);
|
||||
GstFunnel *funnel = GST_FUNNEL_CAST (object);
|
||||
GList *item;
|
||||
|
||||
gst_object_replace ((GstObject **) & funnel->last_sinkpad, NULL);
|
||||
|
@ -278,7 +278,7 @@ done:
|
|||
static void
|
||||
gst_funnel_release_pad (GstElement * element, GstPad * pad)
|
||||
{
|
||||
GstFunnel *funnel = GST_FUNNEL (element);
|
||||
GstFunnel *funnel = GST_FUNNEL_CAST (element);
|
||||
GstFunnelPad *fpad = GST_FUNNEL_PAD_CAST (pad);
|
||||
gboolean got_eos;
|
||||
gboolean send_eos = FALSE;
|
||||
|
@ -350,7 +350,7 @@ static GstFlowReturn
|
|||
gst_funnel_sink_chain_list (GstPad * pad, GstObject * parent,
|
||||
GstBufferList * list)
|
||||
{
|
||||
GstFunnel *funnel = GST_FUNNEL (parent);
|
||||
GstFunnel *funnel = GST_FUNNEL_CAST (parent);
|
||||
|
||||
return gst_funnel_sink_chain_object (pad, funnel, TRUE,
|
||||
GST_MINI_OBJECT_CAST (list));
|
||||
|
@ -359,7 +359,7 @@ gst_funnel_sink_chain_list (GstPad * pad, GstObject * parent,
|
|||
static GstFlowReturn
|
||||
gst_funnel_sink_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
|
||||
{
|
||||
GstFunnel *funnel = GST_FUNNEL (parent);
|
||||
GstFunnel *funnel = GST_FUNNEL_CAST (parent);
|
||||
|
||||
return gst_funnel_sink_chain_object (pad, funnel, FALSE,
|
||||
GST_MINI_OBJECT_CAST (buffer));
|
||||
|
@ -368,7 +368,7 @@ gst_funnel_sink_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
|
|||
static gboolean
|
||||
gst_funnel_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||
{
|
||||
GstFunnel *funnel = GST_FUNNEL (parent);
|
||||
GstFunnel *funnel = GST_FUNNEL_CAST (parent);
|
||||
GstFunnelPad *fpad = GST_FUNNEL_PAD_CAST (pad);
|
||||
gboolean forward = TRUE;
|
||||
gboolean res = TRUE;
|
||||
|
|
|
@ -40,6 +40,7 @@ G_BEGIN_DECLS
|
|||
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_FUNNEL))
|
||||
#define GST_IS_FUNNEL_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_FUNNEL))
|
||||
#define GST_FUNNEL_CAST(obj) ((GstFunnel *)(obj))
|
||||
|
||||
typedef struct _GstFunnel GstFunnel;
|
||||
typedef struct _GstFunnelClass GstFunnelClass;
|
||||
|
|
Loading…
Reference in a new issue