mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-07 07:58:51 +00:00
gst/: allow probes to work on ghost pads by realizing the pad probe debugging
Original commit message from CVS: * gst/gstpad.h: * gst/gstprobe.c: allow probes to work on ghost pads by realizing the pad probe debugging
This commit is contained in:
parent
bbf6413bdf
commit
805ecd1f81
3 changed files with 86 additions and 65 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2005-01-13 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||||
|
|
||||||
|
* gst/gstpad.h:
|
||||||
|
* gst/gstprobe.c:
|
||||||
|
allow probes to work on ghost pads by realizing the pad
|
||||||
|
probe debugging
|
||||||
|
|
||||||
2005-01-11 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
|
2005-01-11 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
|
||||||
|
|
||||||
* docs/gst/gstreamer-sections.txt:
|
* docs/gst/gstreamer-sections.txt:
|
||||||
|
|
128
gst/gstpad.h
128
gst/gstpad.h
|
@ -40,10 +40,10 @@ GST_EXPORT GType _gst_pad_type;
|
||||||
GST_EXPORT GType _gst_real_pad_type;
|
GST_EXPORT GType _gst_real_pad_type;
|
||||||
GST_EXPORT GType _gst_ghost_pad_type;
|
GST_EXPORT GType _gst_ghost_pad_type;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Pad base class
|
* Pad base class
|
||||||
*/
|
*/
|
||||||
#define GST_TYPE_PAD (_gst_pad_type)
|
#define GST_TYPE_PAD (_gst_pad_type)
|
||||||
#define GST_IS_PAD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_PAD))
|
#define GST_IS_PAD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_PAD))
|
||||||
#define GST_IS_PAD_FAST(obj) (G_OBJECT_TYPE(obj) == GST_TYPE_REAL_PAD || \
|
#define GST_IS_PAD_FAST(obj) (G_OBJECT_TYPE(obj) == GST_TYPE_REAL_PAD || \
|
||||||
G_OBJECT_TYPE(obj) == GST_TYPE_GHOST_PAD)
|
G_OBJECT_TYPE(obj) == GST_TYPE_GHOST_PAD)
|
||||||
|
@ -51,7 +51,7 @@ GST_EXPORT GType _gst_ghost_pad_type;
|
||||||
#define GST_PAD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_PAD, GstPad))
|
#define GST_PAD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_PAD, GstPad))
|
||||||
#define GST_PAD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_PAD, GstPadClass))
|
#define GST_PAD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_PAD, GstPadClass))
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Real Pads
|
* Real Pads
|
||||||
*/
|
*/
|
||||||
#define GST_TYPE_REAL_PAD (_gst_real_pad_type)
|
#define GST_TYPE_REAL_PAD (_gst_real_pad_type)
|
||||||
|
@ -61,7 +61,7 @@ GST_EXPORT GType _gst_ghost_pad_type;
|
||||||
#define GST_REAL_PAD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_REAL_PAD, GstRealPad))
|
#define GST_REAL_PAD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_REAL_PAD, GstRealPad))
|
||||||
#define GST_REAL_PAD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_REAL_PAD, GstRealPadClass))
|
#define GST_REAL_PAD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_REAL_PAD, GstRealPadClass))
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Ghost Pads
|
* Ghost Pads
|
||||||
*/
|
*/
|
||||||
#define GST_TYPE_GHOST_PAD (_gst_ghost_pad_type)
|
#define GST_TYPE_GHOST_PAD (_gst_ghost_pad_type)
|
||||||
|
@ -97,39 +97,39 @@ typedef enum {
|
||||||
#ifndef GST_DISABLE_DEPRECATED
|
#ifndef GST_DISABLE_DEPRECATED
|
||||||
#ifdef G_HAVE_ISO_VARARGS
|
#ifdef G_HAVE_ISO_VARARGS
|
||||||
#define GST_PAD_QUERY_TYPE_FUNCTION(functionname, ...) GST_QUERY_TYPE_FUNCTION (GstPad *, functionname, __VA_ARGS__);
|
#define GST_PAD_QUERY_TYPE_FUNCTION(functionname, ...) GST_QUERY_TYPE_FUNCTION (GstPad *, functionname, __VA_ARGS__);
|
||||||
#define GST_PAD_FORMATS_FUNCTION(functionname, ...) GST_FORMATS_FUNCTION (GstPad *, functionname, __VA_ARGS__);
|
#define GST_PAD_FORMATS_FUNCTION(functionname, ...) GST_FORMATS_FUNCTION (GstPad *, functionname, __VA_ARGS__);
|
||||||
#define GST_PAD_EVENT_MASK_FUNCTION(functionname, ...) GST_EVENT_MASK_FUNCTION (GstPad *, functionname, __VA_ARGS__);
|
#define GST_PAD_EVENT_MASK_FUNCTION(functionname, ...) GST_EVENT_MASK_FUNCTION (GstPad *, functionname, __VA_ARGS__);
|
||||||
#elif defined(G_HAVE_GNUC_VARARGS)
|
#elif defined(G_HAVE_GNUC_VARARGS)
|
||||||
#define GST_PAD_QUERY_TYPE_FUNCTION(functionname, a...) GST_QUERY_TYPE_FUNCTION (GstPad *, functionname, a);
|
#define GST_PAD_QUERY_TYPE_FUNCTION(functionname, a...) GST_QUERY_TYPE_FUNCTION (GstPad *, functionname, a);
|
||||||
#define GST_PAD_FORMATS_FUNCTION(functionname, a...) GST_FORMATS_FUNCTION (GstPad *, functionname, a);
|
#define GST_PAD_FORMATS_FUNCTION(functionname, a...) GST_FORMATS_FUNCTION (GstPad *, functionname, a);
|
||||||
#define GST_PAD_EVENT_MASK_FUNCTION(functionname, a...) GST_EVENT_MASK_FUNCTION (GstPad *, functionname, a);
|
#define GST_PAD_EVENT_MASK_FUNCTION(functionname, a...) GST_EVENT_MASK_FUNCTION (GstPad *, functionname, a);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* this defines the functions used to chain buffers
|
/* this defines the functions used to chain buffers
|
||||||
* pad is the sink pad (so the same chain function can be used for N pads)
|
* pad is the sink pad (so the same chain function can be used for N pads)
|
||||||
* buf is the buffer being passed */
|
* buf is the buffer being passed */
|
||||||
typedef void (*GstPadChainFunction) (GstPad *pad,GstData *data);
|
typedef void (*GstPadChainFunction) (GstPad *pad,GstData *data);
|
||||||
typedef GstData* (*GstPadGetFunction) (GstPad *pad);
|
typedef GstData* (*GstPadGetFunction) (GstPad *pad);
|
||||||
typedef gboolean (*GstPadEventFunction) (GstPad *pad, GstEvent *event);
|
typedef gboolean (*GstPadEventFunction) (GstPad *pad, GstEvent *event);
|
||||||
typedef gboolean (*GstPadConvertFunction) (GstPad *pad,
|
typedef gboolean (*GstPadConvertFunction) (GstPad *pad,
|
||||||
GstFormat src_format, gint64 src_value,
|
GstFormat src_format, gint64 src_value,
|
||||||
GstFormat *dest_format, gint64 *dest_value);
|
GstFormat *dest_format, gint64 *dest_value);
|
||||||
typedef gboolean (*GstPadQueryFunction) (GstPad *pad, GstQueryType type,
|
typedef gboolean (*GstPadQueryFunction) (GstPad *pad, GstQueryType type,
|
||||||
GstFormat *format, gint64 *value);
|
GstFormat *format, gint64 *value);
|
||||||
typedef GList* (*GstPadIntLinkFunction) (GstPad *pad);
|
typedef GList* (*GstPadIntLinkFunction) (GstPad *pad);
|
||||||
typedef const GstFormat* (*GstPadFormatsFunction) (GstPad *pad);
|
typedef const GstFormat* (*GstPadFormatsFunction) (GstPad *pad);
|
||||||
typedef const GstEventMask* (*GstPadEventMaskFunction) (GstPad *pad);
|
typedef const GstEventMask* (*GstPadEventMaskFunction) (GstPad *pad);
|
||||||
typedef const GstQueryType* (*GstPadQueryTypeFunction) (GstPad *pad);
|
typedef const GstQueryType* (*GstPadQueryTypeFunction) (GstPad *pad);
|
||||||
|
|
||||||
typedef GstPadLinkReturn (*GstPadLinkFunction) (GstPad *pad, const GstCaps *caps);
|
typedef GstPadLinkReturn (*GstPadLinkFunction) (GstPad *pad, const GstCaps *caps);
|
||||||
typedef void (*GstPadUnlinkFunction) (GstPad *pad);
|
typedef void (*GstPadUnlinkFunction) (GstPad *pad);
|
||||||
typedef GstCaps* (*GstPadGetCapsFunction) (GstPad *pad);
|
typedef GstCaps* (*GstPadGetCapsFunction) (GstPad *pad);
|
||||||
typedef GstCaps* (*GstPadFixateFunction) (GstPad *pad, const GstCaps *caps);
|
typedef GstCaps* (*GstPadFixateFunction) (GstPad *pad, const GstCaps *caps);
|
||||||
typedef GstBuffer* (*GstPadBufferAllocFunction) (GstPad *pad, guint64 offset, guint size);
|
typedef GstBuffer* (*GstPadBufferAllocFunction) (GstPad *pad, guint64 offset, guint size);
|
||||||
|
|
||||||
typedef gboolean (*GstPadDispatcherFunction) (GstPad *pad, gpointer data);
|
typedef gboolean (*GstPadDispatcherFunction) (GstPad *pad, gpointer data);
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
GST_PAD_UNKNOWN,
|
GST_PAD_UNKNOWN,
|
||||||
|
@ -146,11 +146,11 @@ typedef enum {
|
||||||
} GstPadFlags;
|
} GstPadFlags;
|
||||||
|
|
||||||
struct _GstPad {
|
struct _GstPad {
|
||||||
GstObject object;
|
GstObject object;
|
||||||
|
|
||||||
gpointer element_private;
|
gpointer element_private;
|
||||||
|
|
||||||
GstPadTemplate *padtemplate; /* the template for this pad */
|
GstPadTemplate *padtemplate; /* the template for this pad */
|
||||||
|
|
||||||
gpointer _gst_reserved[GST_PADDING];
|
gpointer _gst_reserved[GST_PADDING];
|
||||||
};
|
};
|
||||||
|
@ -162,33 +162,33 @@ struct _GstPadClass {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstRealPad {
|
struct _GstRealPad {
|
||||||
GstPad pad;
|
GstPad pad;
|
||||||
|
|
||||||
/* the pad capabilities */
|
/* the pad capabilities */
|
||||||
GstCaps *caps;
|
GstCaps *caps;
|
||||||
GstPadFixateFunction appfixatefunc;
|
GstPadFixateFunction appfixatefunc;
|
||||||
GstCaps *appfilter;
|
GstCaps *appfilter;
|
||||||
GstPadGetCapsFunction getcapsfunc;
|
GstPadGetCapsFunction getcapsfunc;
|
||||||
GstPadFixateFunction fixatefunc;
|
GstPadFixateFunction fixatefunc;
|
||||||
|
|
||||||
GstPadDirection direction;
|
|
||||||
|
|
||||||
GstPadLinkFunction linkfunc;
|
GstPadDirection direction;
|
||||||
GstPadUnlinkFunction unlinkfunc;
|
|
||||||
GstRealPad *peer;
|
|
||||||
|
|
||||||
gpointer sched_private;
|
GstPadLinkFunction linkfunc;
|
||||||
|
GstPadUnlinkFunction unlinkfunc;
|
||||||
|
GstRealPad *peer;
|
||||||
|
|
||||||
|
gpointer sched_private;
|
||||||
|
|
||||||
/* data transport functions */
|
/* data transport functions */
|
||||||
GstPadChainFunction chainfunc;
|
GstPadChainFunction chainfunc;
|
||||||
GstPadChainFunction chainhandler;
|
GstPadChainFunction chainhandler;
|
||||||
GstPadGetFunction getfunc;
|
GstPadGetFunction getfunc;
|
||||||
GstPadGetFunction gethandler;
|
GstPadGetFunction gethandler;
|
||||||
GstPadEventFunction eventfunc;
|
GstPadEventFunction eventfunc;
|
||||||
GstPadEventFunction eventhandler;
|
GstPadEventFunction eventhandler;
|
||||||
GstPadEventMaskFunction eventmaskfunc;
|
GstPadEventMaskFunction eventmaskfunc;
|
||||||
|
|
||||||
GList *ghostpads;
|
GList *ghostpads;
|
||||||
|
|
||||||
/* query/convert/formats functions */
|
/* query/convert/formats functions */
|
||||||
GstPadConvertFunction convertfunc;
|
GstPadConvertFunction convertfunc;
|
||||||
|
@ -199,7 +199,7 @@ struct _GstRealPad {
|
||||||
|
|
||||||
GstPadBufferAllocFunction bufferallocfunc;
|
GstPadBufferAllocFunction bufferallocfunc;
|
||||||
|
|
||||||
GstProbeDispatcher probedisp;
|
GstProbeDispatcher probedisp;
|
||||||
|
|
||||||
GstPadLink *link;
|
GstPadLink *link;
|
||||||
GstCaps *explicit_caps;
|
GstCaps *explicit_caps;
|
||||||
|
@ -208,13 +208,13 @@ struct _GstRealPad {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstRealPadClass {
|
struct _GstRealPadClass {
|
||||||
GstPadClass parent_class;
|
GstPadClass parent_class;
|
||||||
|
|
||||||
/* signal callbacks */
|
/* signal callbacks */
|
||||||
void (*caps_nego_failed) (GstPad *pad, GstCaps *caps);
|
void (*caps_nego_failed) (GstPad *pad, GstCaps *caps);
|
||||||
|
|
||||||
void (*linked) (GstPad *pad, GstPad *peer);
|
void (*linked) (GstPad *pad, GstPad *peer);
|
||||||
void (*unlinked) (GstPad *pad, GstPad *peer);
|
void (*unlinked) (GstPad *pad, GstPad *peer);
|
||||||
GstPadFixateFunction appfixatefunc;
|
GstPadFixateFunction appfixatefunc;
|
||||||
|
|
||||||
gpointer _gst_reserved[GST_PADDING];
|
gpointer _gst_reserved[GST_PADDING];
|
||||||
|
@ -399,12 +399,12 @@ G_CONST_RETURN GstEventMask*
|
||||||
|
|
||||||
/* pad links */
|
/* pad links */
|
||||||
void gst_pad_set_link_function (GstPad *pad, GstPadLinkFunction link);
|
void gst_pad_set_link_function (GstPad *pad, GstPadLinkFunction link);
|
||||||
gboolean gst_pad_can_link (GstPad *srcpad, GstPad *sinkpad);
|
gboolean gst_pad_can_link (GstPad *srcpad, GstPad *sinkpad);
|
||||||
gboolean gst_pad_can_link_filtered (GstPad *srcpad, GstPad *sinkpad, const GstCaps *filtercaps);
|
gboolean gst_pad_can_link_filtered (GstPad *srcpad, GstPad *sinkpad, const GstCaps *filtercaps);
|
||||||
void gst_pad_set_unlink_function (GstPad *pad, GstPadUnlinkFunction unlink);
|
void gst_pad_set_unlink_function (GstPad *pad, GstPadUnlinkFunction unlink);
|
||||||
|
|
||||||
gboolean gst_pad_link (GstPad *srcpad, GstPad *sinkpad);
|
gboolean gst_pad_link (GstPad *srcpad, GstPad *sinkpad);
|
||||||
gboolean gst_pad_link_filtered (GstPad *srcpad, GstPad *sinkpad, const GstCaps *filtercaps);
|
gboolean gst_pad_link_filtered (GstPad *srcpad, GstPad *sinkpad, const GstCaps *filtercaps);
|
||||||
void gst_pad_unlink (GstPad *srcpad, GstPad *sinkpad);
|
void gst_pad_unlink (GstPad *srcpad, GstPad *sinkpad);
|
||||||
gboolean gst_pad_is_linked (GstPad *pad);
|
gboolean gst_pad_is_linked (GstPad *pad);
|
||||||
|
|
||||||
|
@ -421,11 +421,11 @@ gboolean gst_pad_check_compatibility (GstPad *srcpad, GstPad *sinkpad);
|
||||||
|
|
||||||
void gst_pad_set_getcaps_function (GstPad *pad, GstPadGetCapsFunction getcaps);
|
void gst_pad_set_getcaps_function (GstPad *pad, GstPadGetCapsFunction getcaps);
|
||||||
void gst_pad_set_fixate_function (GstPad *pad, GstPadFixateFunction fixate);
|
void gst_pad_set_fixate_function (GstPad *pad, GstPadFixateFunction fixate);
|
||||||
GstCaps * gst_pad_proxy_getcaps (GstPad *pad);
|
GstCaps * gst_pad_proxy_getcaps (GstPad *pad);
|
||||||
GstPadLinkReturn gst_pad_proxy_pad_link (GstPad *pad, const GstCaps *caps);
|
GstPadLinkReturn gst_pad_proxy_pad_link (GstPad *pad, const GstCaps *caps);
|
||||||
GstCaps * gst_pad_proxy_fixate (GstPad *pad, const GstCaps *caps);
|
GstCaps * gst_pad_proxy_fixate (GstPad *pad, const GstCaps *caps);
|
||||||
#ifndef GST_DISABLE_DEPRECATED
|
#ifndef GST_DISABLE_DEPRECATED
|
||||||
GstPadLinkReturn gst_pad_proxy_link (GstPad *pad, const GstCaps *caps);
|
GstPadLinkReturn gst_pad_proxy_link (GstPad *pad, const GstCaps *caps);
|
||||||
#endif
|
#endif
|
||||||
gboolean gst_pad_set_explicit_caps (GstPad *pad, const GstCaps *caps);
|
gboolean gst_pad_set_explicit_caps (GstPad *pad, const GstCaps *caps);
|
||||||
void gst_pad_use_explicit_caps (GstPad *pad);
|
void gst_pad_use_explicit_caps (GstPad *pad);
|
||||||
|
@ -436,10 +436,10 @@ gboolean gst_pad_perform_negotiate (GstPad *srcpad, GstPad *sinkpad);
|
||||||
GstPadLinkReturn gst_pad_renegotiate (GstPad *pad);
|
GstPadLinkReturn gst_pad_renegotiate (GstPad *pad);
|
||||||
void gst_pad_unnegotiate (GstPad *pad);
|
void gst_pad_unnegotiate (GstPad *pad);
|
||||||
gboolean gst_pad_try_relink_filtered (GstPad *srcpad, GstPad *sinkpad, const GstCaps *filtercaps);
|
gboolean gst_pad_try_relink_filtered (GstPad *srcpad, GstPad *sinkpad, const GstCaps *filtercaps);
|
||||||
GstCaps* gst_pad_get_allowed_caps (GstPad *pad);
|
GstCaps* gst_pad_get_allowed_caps (GstPad *pad);
|
||||||
void gst_pad_caps_change_notify (GstPad *pad);
|
void gst_pad_caps_change_notify (GstPad *pad);
|
||||||
|
|
||||||
gboolean gst_pad_recover_caps_error (GstPad *pad, const GstCaps *allowed);
|
gboolean gst_pad_recover_caps_error (GstPad *pad, const GstCaps *allowed);
|
||||||
|
|
||||||
/* data passing functions */
|
/* data passing functions */
|
||||||
void gst_pad_push (GstPad *pad, GstData *data);
|
void gst_pad_push (GstPad *pad, GstData *data);
|
||||||
|
@ -457,7 +457,7 @@ GstData * gst_pad_collect (GstPad **selected, GstPad *pad, ...);
|
||||||
GstData * gst_pad_collect_valist (GstPad **selected, GstPad *pad, va_list varargs);
|
GstData * gst_pad_collect_valist (GstPad **selected, GstPad *pad, va_list varargs);
|
||||||
|
|
||||||
/* convert/query/format functions */
|
/* convert/query/format functions */
|
||||||
void gst_pad_set_formats_function (GstPad *pad,
|
void gst_pad_set_formats_function (GstPad *pad,
|
||||||
GstPadFormatsFunction formats);
|
GstPadFormatsFunction formats);
|
||||||
G_CONST_RETURN GstFormat*
|
G_CONST_RETURN GstFormat*
|
||||||
gst_pad_get_formats (GstPad *pad);
|
gst_pad_get_formats (GstPad *pad);
|
||||||
|
@ -465,11 +465,11 @@ G_CONST_RETURN GstFormat*
|
||||||
gst_pad_get_formats_default (GstPad *pad);
|
gst_pad_get_formats_default (GstPad *pad);
|
||||||
|
|
||||||
void gst_pad_set_convert_function (GstPad *pad, GstPadConvertFunction convert);
|
void gst_pad_set_convert_function (GstPad *pad, GstPadConvertFunction convert);
|
||||||
gboolean gst_pad_convert (GstPad *pad,
|
gboolean gst_pad_convert (GstPad *pad,
|
||||||
GstFormat src_format, gint64 src_value,
|
GstFormat src_format, gint64 src_value,
|
||||||
GstFormat *dest_format, gint64 *dest_value);
|
GstFormat *dest_format, gint64 *dest_value);
|
||||||
gboolean gst_pad_convert_default (GstPad *pad,
|
gboolean gst_pad_convert_default (GstPad *pad,
|
||||||
GstFormat src_format, gint64 src_value,
|
GstFormat src_format, gint64 src_value,
|
||||||
GstFormat *dest_format, gint64 *dest_value);
|
GstFormat *dest_format, gint64 *dest_value);
|
||||||
|
|
||||||
void gst_pad_set_query_function (GstPad *pad, GstPadQueryFunction query);
|
void gst_pad_set_query_function (GstPad *pad, GstPadQueryFunction query);
|
||||||
|
@ -480,21 +480,21 @@ G_CONST_RETURN GstQueryType*
|
||||||
gst_pad_get_query_types_default (GstPad *pad);
|
gst_pad_get_query_types_default (GstPad *pad);
|
||||||
gboolean gst_pad_query (GstPad *pad, GstQueryType type,
|
gboolean gst_pad_query (GstPad *pad, GstQueryType type,
|
||||||
GstFormat *format, gint64 *value);
|
GstFormat *format, gint64 *value);
|
||||||
gboolean gst_pad_query_default (GstPad *pad, GstQueryType type,
|
gboolean gst_pad_query_default (GstPad *pad, GstQueryType type,
|
||||||
GstFormat *format, gint64 *value);
|
GstFormat *format, gint64 *value);
|
||||||
|
|
||||||
void gst_pad_set_internal_link_function (GstPad *pad, GstPadIntLinkFunction intlink);
|
void gst_pad_set_internal_link_function (GstPad *pad, GstPadIntLinkFunction intlink);
|
||||||
GList* gst_pad_get_internal_links (GstPad *pad);
|
GList* gst_pad_get_internal_links (GstPad *pad);
|
||||||
GList* gst_pad_get_internal_links_default (GstPad *pad);
|
GList* gst_pad_get_internal_links_default (GstPad *pad);
|
||||||
|
|
||||||
/* misc helper functions */
|
/* misc helper functions */
|
||||||
gboolean gst_pad_dispatcher (GstPad *pad, GstPadDispatcherFunction dispatch,
|
gboolean gst_pad_dispatcher (GstPad *pad, GstPadDispatcherFunction dispatch,
|
||||||
gpointer data);
|
gpointer data);
|
||||||
|
|
||||||
#define gst_pad_add_probe(pad, probe) \
|
#define gst_pad_add_probe(pad, probe) \
|
||||||
(gst_probe_dispatcher_add_probe (&(GST_REAL_PAD (pad)->probedisp), probe))
|
(gst_probe_dispatcher_add_probe (&(GST_PAD_REALIZE (pad)->probedisp), probe))
|
||||||
#define gst_pad_remove_probe(pad, probe) \
|
#define gst_pad_remove_probe(pad, probe) \
|
||||||
(gst_probe_dispatcher_remove_probe (&(GST_REAL_PAD (pad)->probedisp), probe))
|
(gst_probe_dispatcher_remove_probe (&(GST_PAD_REALIZE (pad)->probedisp), probe))
|
||||||
|
|
||||||
#ifndef GST_DISABLE_LOADSAVE
|
#ifndef GST_DISABLE_LOADSAVE
|
||||||
void gst_pad_load_and_link (xmlNodePtr self, GstObject *parent);
|
void gst_pad_load_and_link (xmlNodePtr self, GstObject *parent);
|
||||||
|
@ -509,7 +509,7 @@ GstPad* gst_ghost_pad_new (const gchar *name, GstPad *pad);
|
||||||
GType gst_pad_template_get_type (void);
|
GType gst_pad_template_get_type (void);
|
||||||
|
|
||||||
GstPadTemplate* gst_pad_template_new (const gchar *name_template,
|
GstPadTemplate* gst_pad_template_new (const gchar *name_template,
|
||||||
GstPadDirection direction, GstPadPresence presence,
|
GstPadDirection direction, GstPadPresence presence,
|
||||||
GstCaps *caps);
|
GstCaps *caps);
|
||||||
|
|
||||||
GstPadTemplate * gst_static_pad_template_get (GstStaticPadTemplate *pad_template);
|
GstPadTemplate * gst_static_pad_template_get (GstStaticPadTemplate *pad_template);
|
||||||
|
@ -519,16 +519,14 @@ const GstCaps* gst_pad_template_get_caps_by_name (GstPadTemplate *templ, const
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef GST_DISABLE_LOADSAVE
|
#ifndef GST_DISABLE_LOADSAVE
|
||||||
xmlNodePtr gst_ghost_pad_save_thyself (GstPad *pad,
|
xmlNodePtr gst_ghost_pad_save_thyself (GstPad *pad,
|
||||||
xmlNodePtr parent);
|
xmlNodePtr parent);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* for schedulers only */
|
/* for schedulers only */
|
||||||
void gst_pad_call_chain_function (GstPad *pad, GstData *data);
|
void gst_pad_call_chain_function (GstPad *pad, GstData *data);
|
||||||
GstData * gst_pad_call_get_function (GstPad *pad);
|
GstData * gst_pad_call_get_function (GstPad *pad);
|
||||||
|
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
|
||||||
#endif /* __GST_PAD_H__ */
|
#endif /* __GST_PAD_H__ */
|
||||||
|
|
|
@ -23,6 +23,9 @@
|
||||||
#include "gst_private.h"
|
#include "gst_private.h"
|
||||||
#include "gstprobe.h"
|
#include "gstprobe.h"
|
||||||
|
|
||||||
|
GST_DEBUG_CATEGORY_STATIC (debug_probe);
|
||||||
|
#define GST_CAT_DEFAULT debug_probe
|
||||||
|
|
||||||
static GstProbe *
|
static GstProbe *
|
||||||
_gst_probe_copy (const GstProbe * src)
|
_gst_probe_copy (const GstProbe * src)
|
||||||
{
|
{
|
||||||
|
@ -37,9 +40,12 @@ gst_probe_get_type (void)
|
||||||
if (!gst_probe_type) {
|
if (!gst_probe_type) {
|
||||||
gst_probe_type = g_boxed_type_register_static ("GstProbe",
|
gst_probe_type = g_boxed_type_register_static ("GstProbe",
|
||||||
(GBoxedCopyFunc) _gst_probe_copy, (GBoxedFreeFunc) gst_probe_destroy);
|
(GBoxedCopyFunc) _gst_probe_copy, (GBoxedFreeFunc) gst_probe_destroy);
|
||||||
|
GST_DEBUG_CATEGORY_INIT (debug_probe, "GST_PROBE",
|
||||||
|
GST_DEBUG_BOLD | GST_DEBUG_FG_GREEN, "pad probes");
|
||||||
}
|
}
|
||||||
|
|
||||||
return gst_probe_type;
|
return gst_probe_type;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -66,6 +72,8 @@ gst_probe_new (gboolean single_shot,
|
||||||
probe->callback = callback;
|
probe->callback = callback;
|
||||||
probe->user_data = user_data;
|
probe->user_data = user_data;
|
||||||
|
|
||||||
|
GST_DEBUG ("created probe %p", probe);
|
||||||
|
|
||||||
return probe;
|
return probe;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -103,6 +111,8 @@ gst_probe_perform (GstProbe * probe, GstData ** data)
|
||||||
|
|
||||||
g_return_val_if_fail (probe, res);
|
g_return_val_if_fail (probe, res);
|
||||||
|
|
||||||
|
GST_DEBUG ("performing probe %p", probe);
|
||||||
|
|
||||||
if (probe->callback)
|
if (probe->callback)
|
||||||
res = probe->callback (probe, data, probe->user_data);
|
res = probe->callback (probe, data, probe->user_data);
|
||||||
|
|
||||||
|
@ -193,6 +203,8 @@ gst_probe_dispatcher_add_probe (GstProbeDispatcher * disp, GstProbe * probe)
|
||||||
g_return_if_fail (disp);
|
g_return_if_fail (disp);
|
||||||
g_return_if_fail (probe);
|
g_return_if_fail (probe);
|
||||||
|
|
||||||
|
GST_DEBUG ("adding probe %p to dispatcher %p", probe, disp);
|
||||||
|
|
||||||
disp->probes = g_slist_prepend (disp->probes, probe);
|
disp->probes = g_slist_prepend (disp->probes, probe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -209,6 +221,8 @@ gst_probe_dispatcher_remove_probe (GstProbeDispatcher * disp, GstProbe * probe)
|
||||||
g_return_if_fail (disp);
|
g_return_if_fail (disp);
|
||||||
g_return_if_fail (probe);
|
g_return_if_fail (probe);
|
||||||
|
|
||||||
|
GST_DEBUG ("removing probe %p from dispatcher %p", probe, disp);
|
||||||
|
|
||||||
disp->probes = g_slist_remove (disp->probes, probe);
|
disp->probes = g_slist_remove (disp->probes, probe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -229,6 +243,8 @@ gst_probe_dispatcher_dispatch (GstProbeDispatcher * disp, GstData ** data)
|
||||||
|
|
||||||
g_return_val_if_fail (disp, res);
|
g_return_val_if_fail (disp, res);
|
||||||
|
|
||||||
|
GST_DEBUG ("dispatching data %p on dispatcher %p", *data, disp);
|
||||||
|
|
||||||
walk = disp->probes;
|
walk = disp->probes;
|
||||||
while (walk) {
|
while (walk) {
|
||||||
GstProbe *probe = (GstProbe *) walk->data;
|
GstProbe *probe = (GstProbe *) walk->data;
|
||||||
|
|
Loading…
Reference in a new issue