2000-12-28 22:12:02 +00:00
|
|
|
/* GStreamer
|
|
|
|
* Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
|
2001-01-19 02:23:35 +00:00
|
|
|
* 2000 Wim Taymans <wim.taymans@chello.be>
|
2000-12-28 22:12:02 +00:00
|
|
|
*
|
|
|
|
* gstpad.h: Header for GstPad object
|
2000-01-30 09:03:00 +00:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Library General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Library General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Library General Public
|
|
|
|
* License along with this library; if not, write to the
|
2012-11-03 20:44:48 +00:00
|
|
|
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
|
|
|
* Boston, MA 02110-1301, USA.
|
2000-01-30 09:03:00 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef __GST_PAD_H__
|
|
|
|
#define __GST_PAD_H__
|
|
|
|
|
2001-10-17 10:21:27 +00:00
|
|
|
#include <gst/gstconfig.h>
|
2001-02-16 13:13:16 +00:00
|
|
|
|
2011-06-07 11:25:26 +00:00
|
|
|
typedef struct _GstPad GstPad;
|
|
|
|
typedef struct _GstPadPrivate GstPadPrivate;
|
|
|
|
typedef struct _GstPadClass GstPadClass;
|
2012-03-29 11:34:50 +00:00
|
|
|
typedef struct _GstPadProbeInfo GstPadProbeInfo;
|
2011-06-07 11:25:26 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* GstPadDirection:
|
|
|
|
* @GST_PAD_UNKNOWN: direction is unknown.
|
|
|
|
* @GST_PAD_SRC: the pad is a source pad.
|
|
|
|
* @GST_PAD_SINK: the pad is a sink pad.
|
|
|
|
*
|
|
|
|
* The direction of a pad.
|
|
|
|
*/
|
|
|
|
typedef enum {
|
|
|
|
GST_PAD_UNKNOWN,
|
|
|
|
GST_PAD_SRC,
|
|
|
|
GST_PAD_SINK
|
|
|
|
} GstPadDirection;
|
|
|
|
|
2011-11-18 16:27:16 +00:00
|
|
|
/**
|
|
|
|
* GstPadMode:
|
|
|
|
* @GST_PAD_MODE_NONE: Pad will not handle dataflow
|
|
|
|
* @GST_PAD_MODE_PUSH: Pad handles dataflow in downstream push mode
|
|
|
|
* @GST_PAD_MODE_PULL: Pad handles dataflow in upstream pull mode
|
|
|
|
*
|
|
|
|
* The status of a GstPad. After activating a pad, which usually happens when the
|
|
|
|
* parent element goes from READY to PAUSED, the GstPadMode defines if the
|
|
|
|
* pad operates in push or pull mode.
|
|
|
|
*/
|
|
|
|
typedef enum {
|
|
|
|
GST_PAD_MODE_NONE,
|
|
|
|
GST_PAD_MODE_PUSH,
|
|
|
|
GST_PAD_MODE_PULL
|
|
|
|
} GstPadMode;
|
|
|
|
|
2015-08-10 22:35:21 +00:00
|
|
|
#include <glib.h>
|
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2013-11-21 11:28:00 +00:00
|
|
|
const gchar * gst_pad_mode_get_name (GstPadMode mode);
|
|
|
|
|
2000-01-30 09:03:00 +00:00
|
|
|
#include <gst/gstobject.h>
|
|
|
|
#include <gst/gstbuffer.h>
|
2009-05-12 11:10:55 +00:00
|
|
|
#include <gst/gstbufferlist.h>
|
2003-12-22 01:58:20 +00:00
|
|
|
#include <gst/gstcaps.h>
|
2011-06-07 11:25:26 +00:00
|
|
|
#include <gst/gstpadtemplate.h>
|
2001-12-19 02:19:00 +00:00
|
|
|
#include <gst/gstevent.h>
|
2002-12-30 17:42:11 +00:00
|
|
|
#include <gst/gstquery.h>
|
2005-03-21 17:34:02 +00:00
|
|
|
#include <gst/gsttask.h>
|
2000-01-30 09:03:00 +00:00
|
|
|
|
2004-03-15 14:43:35 +00:00
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
2005-01-13 15:29:40 +00:00
|
|
|
/*
|
2001-10-17 10:21:27 +00:00
|
|
|
* Pad base class
|
|
|
|
*/
|
2005-10-15 16:33:09 +00:00
|
|
|
#define GST_TYPE_PAD (gst_pad_get_type ())
|
2001-06-25 01:20:11 +00:00
|
|
|
#define GST_IS_PAD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_PAD))
|
2002-12-19 21:31:03 +00:00
|
|
|
#define GST_IS_PAD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_PAD))
|
2003-12-13 16:58:29 +00:00
|
|
|
#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))
|
2005-03-07 18:27:42 +00:00
|
|
|
#define GST_PAD_CAST(obj) ((GstPad*)(obj))
|
2001-10-17 10:21:27 +00:00
|
|
|
|
2005-10-28 16:46:58 +00:00
|
|
|
|
WARNING: Don't grab this updated unless you're really, REALLY sure.
Original commit message from CVS:
WARNING: Don't grab this updated unless you're really, REALLY sure.
WARNING: Wait for the next one.
Whole lotta changes here, including a few random bits:
examples/*/Makefile: updated to use `libtool gcc`, not just `gcc`
gst/
gstbuffer.h: updated to new flag style
gst.c, gstdebug.h: added new debugging for function ptrs
gstpipeline.c: set type of parent_class to the class, not the object
gstthread.c: ditto
plugins/
cdparanoia/cdparanoia.c: added an argument type, updated some defaults
cobin/spindentity.c: updated to new do/while loopfunction style
mp3encode/lame/gstlame.c: argument types, whole lotta lame options
tests/: various changes
Now, for the big changes: Once again, the scheduling system has changed.
And once again, it broke a whole bunch of things. The gist of the change
is that there is now a function pointer for gst_pad_push and gst_pad_pull,
instead of a hard-wired function. Well, currently they are functions, but
that's for debugging purposes only, they just call the function pointer
after spewing lots of DEBUG().
This changed the GstPad structure a bit, and the GstPad API as well.
Where elements used to provide chain() and pull() functions, they provide
chain() and get() functions. gst_pad_set_pull[region]_function has been
changed to get_pad_set_get[region]_function. This means all the elements
out there that used to have pull functions need to be updated. The calls
to that function have been changed in the normal elements, but the names
of the functions passed is still _pull[region](), which is an aesthetic
issue more than anything.
As for what doesn't work yet, just about anything dealing with Connections
is hosed, meaning threaded stuff won't work. This will be fixed about 12
hours from now, after I've slept, etc. The simplefake.c test works in
both cothreaded and chained cases, but not much else will work due to the
Connection problem. Needless to say, don't grab this unless you *need*
these features *now*, else wait to update this stuff until tomorrow.
I'm going to sleep now.
2000-12-16 10:18:09 +00:00
|
|
|
|
check/gst/gstghostpad.c: Added some more tests for wrong hierarchy
Original commit message from CVS:
* check/gst/gstghostpad.c: (GST_START_TEST), (gst_ghost_pad_suite):
Added some more tests for wrong hierarchy
* docs/design/part-overview.txt:
Some updates.
* gst/gstbin.c: (gst_bin_remove_func), (gst_bin_dispose):
Cleanups.
* gst/gstelement.c: (gst_element_remove_pad), (gst_element_seek),
(gst_element_dispose):
Some more cleanups.
* gst/gstpad.c: (gst_pad_link_check_compatible_unlocked),
(gst_pad_link_check_hierarchy), (gst_pad_link_prepare),
(gst_pad_get_caps_unlocked), (gst_pad_accept_caps),
(gst_pad_set_caps), (gst_pad_send_event):
Check for correct hierarchy when linking pads. Moving to
strict requirement for ghostpads when linking elements in
different bins.
* gst/gstpad.h:
Clean ups. Added WRONG_HIERARCHY return value.
2005-07-28 11:24:33 +00:00
|
|
|
/**
|
|
|
|
* GstPadLinkReturn:
|
2005-09-11 12:57:36 +00:00
|
|
|
* @GST_PAD_LINK_OK : link succeeded
|
|
|
|
* @GST_PAD_LINK_WRONG_HIERARCHY: pads have no common grandparent
|
|
|
|
* @GST_PAD_LINK_WAS_LINKED : pad was already linked
|
|
|
|
* @GST_PAD_LINK_WRONG_DIRECTION: pads have wrong direction
|
|
|
|
* @GST_PAD_LINK_NOFORMAT : pads do not have common format
|
|
|
|
* @GST_PAD_LINK_NOSCHED : pads cannot cooperate in scheduling
|
|
|
|
* @GST_PAD_LINK_REFUSED : refused for some reason
|
2005-11-24 09:44:07 +00:00
|
|
|
*
|
|
|
|
* Result values from gst_pad_link and friends.
|
check/gst/gstghostpad.c: Added some more tests for wrong hierarchy
Original commit message from CVS:
* check/gst/gstghostpad.c: (GST_START_TEST), (gst_ghost_pad_suite):
Added some more tests for wrong hierarchy
* docs/design/part-overview.txt:
Some updates.
* gst/gstbin.c: (gst_bin_remove_func), (gst_bin_dispose):
Cleanups.
* gst/gstelement.c: (gst_element_remove_pad), (gst_element_seek),
(gst_element_dispose):
Some more cleanups.
* gst/gstpad.c: (gst_pad_link_check_compatible_unlocked),
(gst_pad_link_check_hierarchy), (gst_pad_link_prepare),
(gst_pad_get_caps_unlocked), (gst_pad_accept_caps),
(gst_pad_set_caps), (gst_pad_send_event):
Check for correct hierarchy when linking pads. Moving to
strict requirement for ghostpads when linking elements in
different bins.
* gst/gstpad.h:
Clean ups. Added WRONG_HIERARCHY return value.
2005-07-28 11:24:33 +00:00
|
|
|
*/
|
2004-03-15 14:43:35 +00:00
|
|
|
typedef enum {
|
check/gst/gstghostpad.c: Added some more tests for wrong hierarchy
Original commit message from CVS:
* check/gst/gstghostpad.c: (GST_START_TEST), (gst_ghost_pad_suite):
Added some more tests for wrong hierarchy
* docs/design/part-overview.txt:
Some updates.
* gst/gstbin.c: (gst_bin_remove_func), (gst_bin_dispose):
Cleanups.
* gst/gstelement.c: (gst_element_remove_pad), (gst_element_seek),
(gst_element_dispose):
Some more cleanups.
* gst/gstpad.c: (gst_pad_link_check_compatible_unlocked),
(gst_pad_link_check_hierarchy), (gst_pad_link_prepare),
(gst_pad_get_caps_unlocked), (gst_pad_accept_caps),
(gst_pad_set_caps), (gst_pad_send_event):
Check for correct hierarchy when linking pads. Moving to
strict requirement for ghostpads when linking elements in
different bins.
* gst/gstpad.h:
Clean ups. Added WRONG_HIERARCHY return value.
2005-07-28 11:24:33 +00:00
|
|
|
GST_PAD_LINK_OK = 0,
|
|
|
|
GST_PAD_LINK_WRONG_HIERARCHY = -1,
|
|
|
|
GST_PAD_LINK_WAS_LINKED = -2,
|
|
|
|
GST_PAD_LINK_WRONG_DIRECTION = -3,
|
|
|
|
GST_PAD_LINK_NOFORMAT = -4,
|
|
|
|
GST_PAD_LINK_NOSCHED = -5,
|
2006-07-06 09:21:03 +00:00
|
|
|
GST_PAD_LINK_REFUSED = -6
|
2004-03-15 14:43:35 +00:00
|
|
|
} GstPadLinkReturn;
|
2001-02-05 17:16:23 +00:00
|
|
|
|
inlined two more docs factored gstpadtemplate out of gstpad
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* docs/gst/tmpl/.cvsignore:
* docs/gst/tmpl/gstpad.sgml:
* docs/gst/tmpl/gstpadtemplate.sgml:
* gst/Makefile.am:
* gst/gstpad.c: (gst_pad_class_init), (gst_pad_dispose),
(gst_pad_finalize), (gst_pad_set_pad_template):
* gst/gstpad.h:
* gst/gstpadtemplate.c: (gst_pad_template_get_type),
(gst_pad_template_class_init), (gst_pad_template_init),
(gst_pad_template_dispose), (name_is_valid),
(gst_static_pad_template_get), (gst_pad_template_new),
(gst_static_pad_template_get_caps), (gst_pad_template_get_caps),
(gst_pad_template_pad_created):
* gst/gstpadtemplate.h:
inlined two more docs
factored gstpadtemplate out of gstpad
2005-09-25 11:19:22 +00:00
|
|
|
/**
|
|
|
|
* GST_PAD_LINK_FAILED:
|
|
|
|
* @ret: the #GstPadLinkReturn value
|
|
|
|
*
|
|
|
|
* Macro to test if the given #GstPadLinkReturn value indicates a failed
|
docs/design/part-states.txt: Some more docs.
Original commit message from CVS:
* docs/design/part-states.txt:
Some more docs.
* gst/gstbin.c: (gst_bin_set_clock_func), (gst_bin_recalc_state),
(gst_bin_change_state_func), (bin_bus_handler):
Doc updates. Don't distribute the same clock over and over again.
* gst/gstclock.c:
* gst/gstclock.h:
Doc updates.
* gst/gstpad.c: (gst_flow_get_name), (gst_flow_to_quark),
(gst_pad_get_type), (gst_pad_push), (gst_pad_push_event),
(gst_pad_send_event):
* gst/gstpad.h:
Make probe emission threadsafe again.
Register quarks and move _get_name() from utils.
Doc updates.
* gst/gstpipeline.c: (gst_pipeline_class_init),
(gst_pipeline_change_state), (gst_pipeline_provide_clock_func):
Only redistribute the clock of it changed.
* gst/gstsystemclock.h:
Doc updates.
* gst/gstutils.c:
* gst/gstutils.h:
Moved the _flow_get_name() to GstPad.
2005-10-11 11:08:52 +00:00
|
|
|
* link step.
|
inlined two more docs factored gstpadtemplate out of gstpad
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* docs/gst/tmpl/.cvsignore:
* docs/gst/tmpl/gstpad.sgml:
* docs/gst/tmpl/gstpadtemplate.sgml:
* gst/Makefile.am:
* gst/gstpad.c: (gst_pad_class_init), (gst_pad_dispose),
(gst_pad_finalize), (gst_pad_set_pad_template):
* gst/gstpad.h:
* gst/gstpadtemplate.c: (gst_pad_template_get_type),
(gst_pad_template_class_init), (gst_pad_template_init),
(gst_pad_template_dispose), (name_is_valid),
(gst_static_pad_template_get), (gst_pad_template_new),
(gst_static_pad_template_get_caps), (gst_pad_template_get_caps),
(gst_pad_template_pad_created):
* gst/gstpadtemplate.h:
inlined two more docs
factored gstpadtemplate out of gstpad
2005-09-25 11:19:22 +00:00
|
|
|
*/
|
gst/: Simplify pad activation.
Original commit message from CVS:
* gst/base/Makefile.am:
* gst/base/README:
* gst/base/gstbasesink.c: (gst_basesink_get_type),
(gst_basesink_base_init), (gst_basesink_class_init),
(gst_basesink_pad_getcaps), (gst_basesink_init),
(gst_basesink_activate), (gst_basesink_change_state):
* gst/base/gstbasesink.h:
* gst/base/gstbasetransform.c: (gst_base_transform_get_type),
(gst_base_transform_base_init), (gst_base_transform_finalize),
(gst_base_transform_class_init), (gst_base_transform_init),
(gst_base_transform_proxy_getcaps), (gst_base_transform_setcaps),
(gst_base_transform_event), (gst_base_transform_getrange),
(gst_base_transform_chain), (gst_base_transform_handle_buffer),
(gst_base_transform_set_property),
(gst_base_transform_get_property),
(gst_base_transform_sink_activate),
(gst_base_transform_src_activate),
(gst_base_transform_change_state):
* gst/base/gstbasetransform.h:
* gst/elements/gstidentity.c: (gst_identity_finalize),
(gst_identity_class_init), (gst_identity_init),
(gst_identity_event), (gst_identity_check_perfect),
(gst_identity_transform), (gst_identity_set_property),
(gst_identity_get_property), (gst_identity_change_state):
* gst/elements/gstidentity.h:
* gst/gstelement.c: (gst_element_get_state_func),
(gst_element_lost_state), (gst_element_pads_activate):
* gst/gstpad.c: (gst_pad_set_active), (gst_pad_peer_set_active),
(gst_pad_check_pull_range), (gst_pad_pull_range):
* gst/gstpad.h:
Simplify pad activation.
Added function to check if pull_range can be performed.
Error out when pulling inactive or flushing pads.
Removed const from refcounted types as it does not make sense.
Simplify pad templates in basesink
Added base class for simple 1-to-1 transforms.
Make identity subclass the base transform.
2005-03-29 16:18:12 +00:00
|
|
|
#define GST_PAD_LINK_FAILED(ret) ((ret) < GST_PAD_LINK_OK)
|
inlined two more docs factored gstpadtemplate out of gstpad
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* docs/gst/tmpl/.cvsignore:
* docs/gst/tmpl/gstpad.sgml:
* docs/gst/tmpl/gstpadtemplate.sgml:
* gst/Makefile.am:
* gst/gstpad.c: (gst_pad_class_init), (gst_pad_dispose),
(gst_pad_finalize), (gst_pad_set_pad_template):
* gst/gstpad.h:
* gst/gstpadtemplate.c: (gst_pad_template_get_type),
(gst_pad_template_class_init), (gst_pad_template_init),
(gst_pad_template_dispose), (name_is_valid),
(gst_static_pad_template_get), (gst_pad_template_new),
(gst_static_pad_template_get_caps), (gst_pad_template_get_caps),
(gst_pad_template_pad_created):
* gst/gstpadtemplate.h:
inlined two more docs
factored gstpadtemplate out of gstpad
2005-09-25 11:19:22 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* GST_PAD_LINK_SUCCESSFUL:
|
|
|
|
* @ret: the #GstPadLinkReturn value
|
|
|
|
*
|
2005-10-12 19:10:46 +00:00
|
|
|
* Macro to test if the given #GstPadLinkReturn value indicates a successful
|
docs/design/part-states.txt: Some more docs.
Original commit message from CVS:
* docs/design/part-states.txt:
Some more docs.
* gst/gstbin.c: (gst_bin_set_clock_func), (gst_bin_recalc_state),
(gst_bin_change_state_func), (bin_bus_handler):
Doc updates. Don't distribute the same clock over and over again.
* gst/gstclock.c:
* gst/gstclock.h:
Doc updates.
* gst/gstpad.c: (gst_flow_get_name), (gst_flow_to_quark),
(gst_pad_get_type), (gst_pad_push), (gst_pad_push_event),
(gst_pad_send_event):
* gst/gstpad.h:
Make probe emission threadsafe again.
Register quarks and move _get_name() from utils.
Doc updates.
* gst/gstpipeline.c: (gst_pipeline_class_init),
(gst_pipeline_change_state), (gst_pipeline_provide_clock_func):
Only redistribute the clock of it changed.
* gst/gstsystemclock.h:
Doc updates.
* gst/gstutils.c:
* gst/gstutils.h:
Moved the _flow_get_name() to GstPad.
2005-10-11 11:08:52 +00:00
|
|
|
* link step.
|
inlined two more docs factored gstpadtemplate out of gstpad
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* docs/gst/tmpl/.cvsignore:
* docs/gst/tmpl/gstpad.sgml:
* docs/gst/tmpl/gstpadtemplate.sgml:
* gst/Makefile.am:
* gst/gstpad.c: (gst_pad_class_init), (gst_pad_dispose),
(gst_pad_finalize), (gst_pad_set_pad_template):
* gst/gstpad.h:
* gst/gstpadtemplate.c: (gst_pad_template_get_type),
(gst_pad_template_class_init), (gst_pad_template_init),
(gst_pad_template_dispose), (name_is_valid),
(gst_static_pad_template_get), (gst_pad_template_new),
(gst_static_pad_template_get_caps), (gst_pad_template_get_caps),
(gst_pad_template_pad_created):
* gst/gstpadtemplate.h:
inlined two more docs
factored gstpadtemplate out of gstpad
2005-09-25 11:19:22 +00:00
|
|
|
*/
|
gst/: Simplify pad activation.
Original commit message from CVS:
* gst/base/Makefile.am:
* gst/base/README:
* gst/base/gstbasesink.c: (gst_basesink_get_type),
(gst_basesink_base_init), (gst_basesink_class_init),
(gst_basesink_pad_getcaps), (gst_basesink_init),
(gst_basesink_activate), (gst_basesink_change_state):
* gst/base/gstbasesink.h:
* gst/base/gstbasetransform.c: (gst_base_transform_get_type),
(gst_base_transform_base_init), (gst_base_transform_finalize),
(gst_base_transform_class_init), (gst_base_transform_init),
(gst_base_transform_proxy_getcaps), (gst_base_transform_setcaps),
(gst_base_transform_event), (gst_base_transform_getrange),
(gst_base_transform_chain), (gst_base_transform_handle_buffer),
(gst_base_transform_set_property),
(gst_base_transform_get_property),
(gst_base_transform_sink_activate),
(gst_base_transform_src_activate),
(gst_base_transform_change_state):
* gst/base/gstbasetransform.h:
* gst/elements/gstidentity.c: (gst_identity_finalize),
(gst_identity_class_init), (gst_identity_init),
(gst_identity_event), (gst_identity_check_perfect),
(gst_identity_transform), (gst_identity_set_property),
(gst_identity_get_property), (gst_identity_change_state):
* gst/elements/gstidentity.h:
* gst/gstelement.c: (gst_element_get_state_func),
(gst_element_lost_state), (gst_element_pads_activate):
* gst/gstpad.c: (gst_pad_set_active), (gst_pad_peer_set_active),
(gst_pad_check_pull_range), (gst_pad_pull_range):
* gst/gstpad.h:
Simplify pad activation.
Added function to check if pull_range can be performed.
Error out when pulling inactive or flushing pads.
Removed const from refcounted types as it does not make sense.
Simplify pad templates in basesink
Added base class for simple 1-to-1 transforms.
Make identity subclass the base transform.
2005-03-29 16:18:12 +00:00
|
|
|
#define GST_PAD_LINK_SUCCESSFUL(ret) ((ret) >= GST_PAD_LINK_OK)
|
2003-12-23 21:39:35 +00:00
|
|
|
|
docs/design/part-states.txt: Some more docs.
Original commit message from CVS:
* docs/design/part-states.txt:
Some more docs.
* gst/gstbin.c: (gst_bin_set_clock_func), (gst_bin_recalc_state),
(gst_bin_change_state_func), (bin_bus_handler):
Doc updates. Don't distribute the same clock over and over again.
* gst/gstclock.c:
* gst/gstclock.h:
Doc updates.
* gst/gstpad.c: (gst_flow_get_name), (gst_flow_to_quark),
(gst_pad_get_type), (gst_pad_push), (gst_pad_push_event),
(gst_pad_send_event):
* gst/gstpad.h:
Make probe emission threadsafe again.
Register quarks and move _get_name() from utils.
Doc updates.
* gst/gstpipeline.c: (gst_pipeline_class_init),
(gst_pipeline_change_state), (gst_pipeline_provide_clock_func):
Only redistribute the clock of it changed.
* gst/gstsystemclock.h:
Doc updates.
* gst/gstutils.c:
* gst/gstutils.h:
Moved the _flow_get_name() to GstPad.
2005-10-11 11:08:52 +00:00
|
|
|
/**
|
|
|
|
* GstFlowReturn:
|
2005-10-12 19:10:46 +00:00
|
|
|
* @GST_FLOW_OK: Data passing was ok.
|
2006-05-14 21:16:58 +00:00
|
|
|
* @GST_FLOW_NOT_LINKED: Pad is not linked.
|
2012-02-08 14:16:46 +00:00
|
|
|
* @GST_FLOW_FLUSHING: Pad is flushing.
|
2011-10-10 09:33:51 +00:00
|
|
|
* @GST_FLOW_EOS: Pad is EOS.
|
2006-05-14 21:16:58 +00:00
|
|
|
* @GST_FLOW_NOT_NEGOTIATED: Pad is not negotiated.
|
2013-12-07 14:38:19 +00:00
|
|
|
* @GST_FLOW_ERROR: Some (fatal) error occurred. Element generating
|
2006-05-23 11:13:51 +00:00
|
|
|
* this error should post an error message with more
|
|
|
|
* details.
|
2006-05-14 21:16:58 +00:00
|
|
|
* @GST_FLOW_NOT_SUPPORTED: This operation is not supported.
|
2010-04-16 13:22:18 +00:00
|
|
|
* @GST_FLOW_CUSTOM_SUCCESS: Elements can use values starting from
|
|
|
|
* this (and higher) to define custom success
|
2012-07-10 09:46:41 +00:00
|
|
|
* codes.
|
2010-04-16 13:22:18 +00:00
|
|
|
* @GST_FLOW_CUSTOM_SUCCESS_1: Pre-defined custom success code (define your
|
|
|
|
* custom success code to this to avoid compiler
|
2012-07-10 09:46:41 +00:00
|
|
|
* warnings).
|
|
|
|
* @GST_FLOW_CUSTOM_SUCCESS_2: Pre-defined custom success code.
|
2006-05-23 11:13:51 +00:00
|
|
|
* @GST_FLOW_CUSTOM_ERROR: Elements can use values starting from
|
2010-04-16 13:22:18 +00:00
|
|
|
* this (and lower) to define custom error codes.
|
|
|
|
* @GST_FLOW_CUSTOM_ERROR_1: Pre-defined custom error code (define your
|
|
|
|
* custom error code to this to avoid compiler
|
2012-07-10 09:46:41 +00:00
|
|
|
* warnings).
|
|
|
|
* @GST_FLOW_CUSTOM_ERROR_2: Pre-defined custom error code.
|
docs/design/part-states.txt: Some more docs.
Original commit message from CVS:
* docs/design/part-states.txt:
Some more docs.
* gst/gstbin.c: (gst_bin_set_clock_func), (gst_bin_recalc_state),
(gst_bin_change_state_func), (bin_bus_handler):
Doc updates. Don't distribute the same clock over and over again.
* gst/gstclock.c:
* gst/gstclock.h:
Doc updates.
* gst/gstpad.c: (gst_flow_get_name), (gst_flow_to_quark),
(gst_pad_get_type), (gst_pad_push), (gst_pad_push_event),
(gst_pad_send_event):
* gst/gstpad.h:
Make probe emission threadsafe again.
Register quarks and move _get_name() from utils.
Doc updates.
* gst/gstpipeline.c: (gst_pipeline_class_init),
(gst_pipeline_change_state), (gst_pipeline_provide_clock_func):
Only redistribute the clock of it changed.
* gst/gstsystemclock.h:
Doc updates.
* gst/gstutils.c:
* gst/gstutils.h:
Moved the _flow_get_name() to GstPad.
2005-10-11 11:08:52 +00:00
|
|
|
*
|
gst/gstelement.c (gst_element_requires_clock, gst_element_provides_clock, gst_element_request_pad, gst_element_class_...
Original commit message from CVS:
* gst/gstelement.c (gst_element_requires_clock,
gst_element_provides_clock, gst_element_request_pad,
gst_element_class_set_details, gst_element_class_set_details_simple,
gst_element_default_send_event, gst_element_abort_state,
gst_element_continue_state, gst_element_set_state,
gst_element_set_state_func, iterator_activate_fold_with_resync):
* gst/gstpad.c (gst_pad_activate_pull, gst_pad_set_getcaps_function,
gst_pad_fixate_caps, gst_pad_configure_sink, gst_pad_configure_src,
gst_pad_query, gst_pad_save_thyself, handle_pad_block, gst_pad_push,
gst_pad_get_range, gst_pad_pull_range):
* gst/gstpad.h (GST_PAD_LINK_SUCCESSFUL, GST_FLOW_CUSTOM_SUCCESS,
GST_FLOW_NOT_SUPPORTED, GST_FLOW_IS_FATAL, GstPadActivateFunction,
GstPadActivateModeFunction, GstPadChainFunction,
GstPadGetCapsFunction, GstPadAcceptCapsFunction,
GstPadFixateCapsFunction, GstPadTemplate):
* gst/gstpipeline.c (gst_pipeline_change_state,
gst_pipeline_set_new_stream_time, gst_pipeline_use_clock,
gst_pipeline_set_clock, gst_pipeline_auto_clock,
gst_pipeline_get_delay):
Whitespace and docs fixes.
2007-05-22 06:37:37 +00:00
|
|
|
* The result of passing data to a pad.
|
2006-05-23 11:13:51 +00:00
|
|
|
*
|
gst/gstelement.c (gst_element_requires_clock, gst_element_provides_clock, gst_element_request_pad, gst_element_class_...
Original commit message from CVS:
* gst/gstelement.c (gst_element_requires_clock,
gst_element_provides_clock, gst_element_request_pad,
gst_element_class_set_details, gst_element_class_set_details_simple,
gst_element_default_send_event, gst_element_abort_state,
gst_element_continue_state, gst_element_set_state,
gst_element_set_state_func, iterator_activate_fold_with_resync):
* gst/gstpad.c (gst_pad_activate_pull, gst_pad_set_getcaps_function,
gst_pad_fixate_caps, gst_pad_configure_sink, gst_pad_configure_src,
gst_pad_query, gst_pad_save_thyself, handle_pad_block, gst_pad_push,
gst_pad_get_range, gst_pad_pull_range):
* gst/gstpad.h (GST_PAD_LINK_SUCCESSFUL, GST_FLOW_CUSTOM_SUCCESS,
GST_FLOW_NOT_SUPPORTED, GST_FLOW_IS_FATAL, GstPadActivateFunction,
GstPadActivateModeFunction, GstPadChainFunction,
GstPadGetCapsFunction, GstPadAcceptCapsFunction,
GstPadFixateCapsFunction, GstPadTemplate):
* gst/gstpipeline.c (gst_pipeline_change_state,
gst_pipeline_set_new_stream_time, gst_pipeline_use_clock,
gst_pipeline_set_clock, gst_pipeline_auto_clock,
gst_pipeline_get_delay):
Whitespace and docs fixes.
2007-05-22 06:37:37 +00:00
|
|
|
* Note that the custom return values should not be exposed outside of the
|
2012-07-10 09:46:41 +00:00
|
|
|
* element scope.
|
docs/design/part-states.txt: Some more docs.
Original commit message from CVS:
* docs/design/part-states.txt:
Some more docs.
* gst/gstbin.c: (gst_bin_set_clock_func), (gst_bin_recalc_state),
(gst_bin_change_state_func), (bin_bus_handler):
Doc updates. Don't distribute the same clock over and over again.
* gst/gstclock.c:
* gst/gstclock.h:
Doc updates.
* gst/gstpad.c: (gst_flow_get_name), (gst_flow_to_quark),
(gst_pad_get_type), (gst_pad_push), (gst_pad_push_event),
(gst_pad_send_event):
* gst/gstpad.h:
Make probe emission threadsafe again.
Register quarks and move _get_name() from utils.
Doc updates.
* gst/gstpipeline.c: (gst_pipeline_class_init),
(gst_pipeline_change_state), (gst_pipeline_provide_clock_func):
Only redistribute the clock of it changed.
* gst/gstsystemclock.h:
Doc updates.
* gst/gstutils.c:
* gst/gstutils.h:
Moved the _flow_get_name() to GstPad.
2005-10-11 11:08:52 +00:00
|
|
|
*/
|
2005-03-07 18:27:42 +00:00
|
|
|
typedef enum {
|
gst/gstelement.c (gst_element_requires_clock, gst_element_provides_clock, gst_element_request_pad, gst_element_class_...
Original commit message from CVS:
* gst/gstelement.c (gst_element_requires_clock,
gst_element_provides_clock, gst_element_request_pad,
gst_element_class_set_details, gst_element_class_set_details_simple,
gst_element_default_send_event, gst_element_abort_state,
gst_element_continue_state, gst_element_set_state,
gst_element_set_state_func, iterator_activate_fold_with_resync):
* gst/gstpad.c (gst_pad_activate_pull, gst_pad_set_getcaps_function,
gst_pad_fixate_caps, gst_pad_configure_sink, gst_pad_configure_src,
gst_pad_query, gst_pad_save_thyself, handle_pad_block, gst_pad_push,
gst_pad_get_range, gst_pad_pull_range):
* gst/gstpad.h (GST_PAD_LINK_SUCCESSFUL, GST_FLOW_CUSTOM_SUCCESS,
GST_FLOW_NOT_SUPPORTED, GST_FLOW_IS_FATAL, GstPadActivateFunction,
GstPadActivateModeFunction, GstPadChainFunction,
GstPadGetCapsFunction, GstPadAcceptCapsFunction,
GstPadFixateCapsFunction, GstPadTemplate):
* gst/gstpipeline.c (gst_pipeline_change_state,
gst_pipeline_set_new_stream_time, gst_pipeline_use_clock,
gst_pipeline_set_clock, gst_pipeline_auto_clock,
gst_pipeline_get_delay):
Whitespace and docs fixes.
2007-05-22 06:37:37 +00:00
|
|
|
/* custom success starts here */
|
2010-04-16 13:22:18 +00:00
|
|
|
GST_FLOW_CUSTOM_SUCCESS_2 = 102,
|
|
|
|
GST_FLOW_CUSTOM_SUCCESS_1 = 101,
|
2006-05-23 11:13:51 +00:00
|
|
|
GST_FLOW_CUSTOM_SUCCESS = 100,
|
|
|
|
|
gst/gstelement.c (gst_element_requires_clock, gst_element_provides_clock, gst_element_request_pad, gst_element_class_...
Original commit message from CVS:
* gst/gstelement.c (gst_element_requires_clock,
gst_element_provides_clock, gst_element_request_pad,
gst_element_class_set_details, gst_element_class_set_details_simple,
gst_element_default_send_event, gst_element_abort_state,
gst_element_continue_state, gst_element_set_state,
gst_element_set_state_func, iterator_activate_fold_with_resync):
* gst/gstpad.c (gst_pad_activate_pull, gst_pad_set_getcaps_function,
gst_pad_fixate_caps, gst_pad_configure_sink, gst_pad_configure_src,
gst_pad_query, gst_pad_save_thyself, handle_pad_block, gst_pad_push,
gst_pad_get_range, gst_pad_pull_range):
* gst/gstpad.h (GST_PAD_LINK_SUCCESSFUL, GST_FLOW_CUSTOM_SUCCESS,
GST_FLOW_NOT_SUPPORTED, GST_FLOW_IS_FATAL, GstPadActivateFunction,
GstPadActivateModeFunction, GstPadChainFunction,
GstPadGetCapsFunction, GstPadAcceptCapsFunction,
GstPadFixateCapsFunction, GstPadTemplate):
* gst/gstpipeline.c (gst_pipeline_change_state,
gst_pipeline_set_new_stream_time, gst_pipeline_use_clock,
gst_pipeline_set_clock, gst_pipeline_auto_clock,
gst_pipeline_get_delay):
Whitespace and docs fixes.
2007-05-22 06:37:37 +00:00
|
|
|
/* core predefined */
|
docs/design/part-states.txt: Some more docs.
Original commit message from CVS:
* docs/design/part-states.txt:
Some more docs.
* gst/gstbin.c: (gst_bin_set_clock_func), (gst_bin_recalc_state),
(gst_bin_change_state_func), (bin_bus_handler):
Doc updates. Don't distribute the same clock over and over again.
* gst/gstclock.c:
* gst/gstclock.h:
Doc updates.
* gst/gstpad.c: (gst_flow_get_name), (gst_flow_to_quark),
(gst_pad_get_type), (gst_pad_push), (gst_pad_push_event),
(gst_pad_send_event):
* gst/gstpad.h:
Make probe emission threadsafe again.
Register quarks and move _get_name() from utils.
Doc updates.
* gst/gstpipeline.c: (gst_pipeline_class_init),
(gst_pipeline_change_state), (gst_pipeline_provide_clock_func):
Only redistribute the clock of it changed.
* gst/gstsystemclock.h:
Doc updates.
* gst/gstutils.c:
* gst/gstutils.h:
Moved the _flow_get_name() to GstPad.
2005-10-11 11:08:52 +00:00
|
|
|
GST_FLOW_OK = 0,
|
2005-07-14 18:10:04 +00:00
|
|
|
/* expected failures */
|
docs/design/part-states.txt: Some more docs.
Original commit message from CVS:
* docs/design/part-states.txt:
Some more docs.
* gst/gstbin.c: (gst_bin_set_clock_func), (gst_bin_recalc_state),
(gst_bin_change_state_func), (bin_bus_handler):
Doc updates. Don't distribute the same clock over and over again.
* gst/gstclock.c:
* gst/gstclock.h:
Doc updates.
* gst/gstpad.c: (gst_flow_get_name), (gst_flow_to_quark),
(gst_pad_get_type), (gst_pad_push), (gst_pad_push_event),
(gst_pad_send_event):
* gst/gstpad.h:
Make probe emission threadsafe again.
Register quarks and move _get_name() from utils.
Doc updates.
* gst/gstpipeline.c: (gst_pipeline_class_init),
(gst_pipeline_change_state), (gst_pipeline_provide_clock_func):
Only redistribute the clock of it changed.
* gst/gstsystemclock.h:
Doc updates.
* gst/gstutils.c:
* gst/gstutils.h:
Moved the _flow_get_name() to GstPad.
2005-10-11 11:08:52 +00:00
|
|
|
GST_FLOW_NOT_LINKED = -1,
|
2012-02-08 14:16:46 +00:00
|
|
|
GST_FLOW_FLUSHING = -2,
|
2005-07-14 18:10:04 +00:00
|
|
|
/* error cases */
|
2011-10-10 09:33:51 +00:00
|
|
|
GST_FLOW_EOS = -3,
|
docs/design/part-states.txt: Some more docs.
Original commit message from CVS:
* docs/design/part-states.txt:
Some more docs.
* gst/gstbin.c: (gst_bin_set_clock_func), (gst_bin_recalc_state),
(gst_bin_change_state_func), (bin_bus_handler):
Doc updates. Don't distribute the same clock over and over again.
* gst/gstclock.c:
* gst/gstclock.h:
Doc updates.
* gst/gstpad.c: (gst_flow_get_name), (gst_flow_to_quark),
(gst_pad_get_type), (gst_pad_push), (gst_pad_push_event),
(gst_pad_send_event):
* gst/gstpad.h:
Make probe emission threadsafe again.
Register quarks and move _get_name() from utils.
Doc updates.
* gst/gstpipeline.c: (gst_pipeline_class_init),
(gst_pipeline_change_state), (gst_pipeline_provide_clock_func):
Only redistribute the clock of it changed.
* gst/gstsystemclock.h:
Doc updates.
* gst/gstutils.c:
* gst/gstutils.h:
Moved the _flow_get_name() to GstPad.
2005-10-11 11:08:52 +00:00
|
|
|
GST_FLOW_NOT_NEGOTIATED = -4,
|
|
|
|
GST_FLOW_ERROR = -5,
|
2006-05-23 11:13:51 +00:00
|
|
|
GST_FLOW_NOT_SUPPORTED = -6,
|
|
|
|
|
gst/gstelement.c (gst_element_requires_clock, gst_element_provides_clock, gst_element_request_pad, gst_element_class_...
Original commit message from CVS:
* gst/gstelement.c (gst_element_requires_clock,
gst_element_provides_clock, gst_element_request_pad,
gst_element_class_set_details, gst_element_class_set_details_simple,
gst_element_default_send_event, gst_element_abort_state,
gst_element_continue_state, gst_element_set_state,
gst_element_set_state_func, iterator_activate_fold_with_resync):
* gst/gstpad.c (gst_pad_activate_pull, gst_pad_set_getcaps_function,
gst_pad_fixate_caps, gst_pad_configure_sink, gst_pad_configure_src,
gst_pad_query, gst_pad_save_thyself, handle_pad_block, gst_pad_push,
gst_pad_get_range, gst_pad_pull_range):
* gst/gstpad.h (GST_PAD_LINK_SUCCESSFUL, GST_FLOW_CUSTOM_SUCCESS,
GST_FLOW_NOT_SUPPORTED, GST_FLOW_IS_FATAL, GstPadActivateFunction,
GstPadActivateModeFunction, GstPadChainFunction,
GstPadGetCapsFunction, GstPadAcceptCapsFunction,
GstPadFixateCapsFunction, GstPadTemplate):
* gst/gstpipeline.c (gst_pipeline_change_state,
gst_pipeline_set_new_stream_time, gst_pipeline_use_clock,
gst_pipeline_set_clock, gst_pipeline_auto_clock,
gst_pipeline_get_delay):
Whitespace and docs fixes.
2007-05-22 06:37:37 +00:00
|
|
|
/* custom error starts here */
|
2010-04-16 13:22:18 +00:00
|
|
|
GST_FLOW_CUSTOM_ERROR = -100,
|
|
|
|
GST_FLOW_CUSTOM_ERROR_1 = -101,
|
|
|
|
GST_FLOW_CUSTOM_ERROR_2 = -102
|
2005-03-07 18:27:42 +00:00
|
|
|
} GstFlowReturn;
|
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2017-05-10 09:56:16 +00:00
|
|
|
const gchar * gst_flow_get_name (GstFlowReturn ret);
|
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2017-05-10 09:56:16 +00:00
|
|
|
GQuark gst_flow_to_quark (GstFlowReturn ret);
|
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2017-05-10 09:56:16 +00:00
|
|
|
const gchar * gst_pad_link_get_name (GstPadLinkReturn ret);
|
docs/design/part-states.txt: Some more docs.
Original commit message from CVS:
* docs/design/part-states.txt:
Some more docs.
* gst/gstbin.c: (gst_bin_set_clock_func), (gst_bin_recalc_state),
(gst_bin_change_state_func), (bin_bus_handler):
Doc updates. Don't distribute the same clock over and over again.
* gst/gstclock.c:
* gst/gstclock.h:
Doc updates.
* gst/gstpad.c: (gst_flow_get_name), (gst_flow_to_quark),
(gst_pad_get_type), (gst_pad_push), (gst_pad_push_event),
(gst_pad_send_event):
* gst/gstpad.h:
Make probe emission threadsafe again.
Register quarks and move _get_name() from utils.
Doc updates.
* gst/gstpipeline.c: (gst_pipeline_class_init),
(gst_pipeline_change_state), (gst_pipeline_provide_clock_func):
Only redistribute the clock of it changed.
* gst/gstsystemclock.h:
Doc updates.
* gst/gstutils.c:
* gst/gstutils.h:
Moved the _flow_get_name() to GstPad.
2005-10-11 11:08:52 +00:00
|
|
|
|
2010-06-23 14:45:19 +00:00
|
|
|
/**
|
|
|
|
* GstPadLinkCheck:
|
2010-06-25 16:52:02 +00:00
|
|
|
* @GST_PAD_LINK_CHECK_NOTHING: Don't check hierarchy or caps compatibility.
|
|
|
|
* @GST_PAD_LINK_CHECK_HIERARCHY: Check the pads have same parents/grandparents.
|
2010-07-05 14:50:33 +00:00
|
|
|
* Could be omitted if it is already known that the two elements that own the
|
2011-05-02 12:36:14 +00:00
|
|
|
* pads are in the same bin.
|
2010-07-05 14:50:33 +00:00
|
|
|
* @GST_PAD_LINK_CHECK_TEMPLATE_CAPS: Check if the pads are compatible by using
|
|
|
|
* their template caps. This is much faster than @GST_PAD_LINK_CHECK_CAPS, but
|
|
|
|
* would be unsafe e.g. if one pad has %GST_CAPS_ANY.
|
|
|
|
* @GST_PAD_LINK_CHECK_CAPS: Check if the pads are compatible by comparing the
|
2011-11-15 15:46:37 +00:00
|
|
|
* caps returned by gst_pad_query_caps().
|
2015-11-05 20:13:25 +00:00
|
|
|
* @GST_PAD_LINK_CHECK_NO_RECONFIGURE: Disables pushing a reconfigure event when pads are
|
|
|
|
* linked.
|
2012-07-29 22:44:45 +00:00
|
|
|
* @GST_PAD_LINK_CHECK_DEFAULT: The default checks done when linking
|
|
|
|
* pads (i.e. the ones used by gst_pad_link()).
|
2010-07-05 14:50:33 +00:00
|
|
|
*
|
|
|
|
* The amount of checking to be done when linking pads. @GST_PAD_LINK_CHECK_CAPS
|
|
|
|
* and @GST_PAD_LINK_CHECK_TEMPLATE_CAPS are mutually exclusive. If both are
|
|
|
|
* specified, expensive but safe @GST_PAD_LINK_CHECK_CAPS are performed.
|
|
|
|
*
|
2017-01-16 14:26:16 +00:00
|
|
|
* > Only disable some of the checks if you are 100% certain you know the link
|
|
|
|
* > will not fail because of hierarchy/caps compatibility failures. If uncertain,
|
|
|
|
* > use the default checks (%GST_PAD_LINK_CHECK_DEFAULT) or the regular methods
|
|
|
|
* > for linking the pads.
|
2010-06-23 14:45:19 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
typedef enum {
|
2010-06-25 16:18:55 +00:00
|
|
|
GST_PAD_LINK_CHECK_NOTHING = 0,
|
|
|
|
GST_PAD_LINK_CHECK_HIERARCHY = 1 << 0,
|
|
|
|
GST_PAD_LINK_CHECK_TEMPLATE_CAPS = 1 << 1,
|
2012-07-29 22:44:45 +00:00
|
|
|
GST_PAD_LINK_CHECK_CAPS = 1 << 2,
|
2010-06-23 14:45:19 +00:00
|
|
|
|
2015-11-05 20:13:25 +00:00
|
|
|
|
|
|
|
/* Not really checks, more like flags
|
|
|
|
* Added here to avoid creating a new gst_pad_link_variant */
|
|
|
|
GST_PAD_LINK_CHECK_NO_RECONFIGURE = 1 << 3,
|
|
|
|
|
2012-07-29 22:44:45 +00:00
|
|
|
GST_PAD_LINK_CHECK_DEFAULT = GST_PAD_LINK_CHECK_HIERARCHY | GST_PAD_LINK_CHECK_CAPS
|
|
|
|
} GstPadLinkCheck;
|
2010-06-23 14:45:19 +00:00
|
|
|
|
2005-03-07 18:27:42 +00:00
|
|
|
/* pad states */
|
2005-11-24 09:44:07 +00:00
|
|
|
/**
|
|
|
|
* GstPadActivateFunction:
|
|
|
|
* @pad: a #GstPad
|
2011-11-18 16:27:16 +00:00
|
|
|
* @parent: the parent of @pad
|
2005-11-24 09:44:07 +00:00
|
|
|
*
|
|
|
|
* This function is called when the pad is activated during the element
|
|
|
|
* READY to PAUSED state change. By default this function will call the
|
|
|
|
* activate function that puts the pad in push mode but elements can
|
|
|
|
* override this function to activate the pad in pull mode if they wish.
|
|
|
|
*
|
2014-05-29 21:54:34 +00:00
|
|
|
* Returns: %TRUE if the pad could be activated.
|
2005-11-24 09:44:07 +00:00
|
|
|
*/
|
2011-11-18 12:46:46 +00:00
|
|
|
typedef gboolean (*GstPadActivateFunction) (GstPad *pad, GstObject *parent);
|
2005-11-24 09:44:07 +00:00
|
|
|
/**
|
|
|
|
* GstPadActivateModeFunction:
|
|
|
|
* @pad: a #GstPad
|
2011-11-18 16:27:16 +00:00
|
|
|
* @parent: the parent of @pad
|
2011-11-21 12:29:05 +00:00
|
|
|
* @mode: the requested activation mode of @pad
|
2005-11-24 09:44:07 +00:00
|
|
|
* @active: activate or deactivate the pad.
|
|
|
|
*
|
gst/gstelement.c (gst_element_requires_clock, gst_element_provides_clock, gst_element_request_pad, gst_element_class_...
Original commit message from CVS:
* gst/gstelement.c (gst_element_requires_clock,
gst_element_provides_clock, gst_element_request_pad,
gst_element_class_set_details, gst_element_class_set_details_simple,
gst_element_default_send_event, gst_element_abort_state,
gst_element_continue_state, gst_element_set_state,
gst_element_set_state_func, iterator_activate_fold_with_resync):
* gst/gstpad.c (gst_pad_activate_pull, gst_pad_set_getcaps_function,
gst_pad_fixate_caps, gst_pad_configure_sink, gst_pad_configure_src,
gst_pad_query, gst_pad_save_thyself, handle_pad_block, gst_pad_push,
gst_pad_get_range, gst_pad_pull_range):
* gst/gstpad.h (GST_PAD_LINK_SUCCESSFUL, GST_FLOW_CUSTOM_SUCCESS,
GST_FLOW_NOT_SUPPORTED, GST_FLOW_IS_FATAL, GstPadActivateFunction,
GstPadActivateModeFunction, GstPadChainFunction,
GstPadGetCapsFunction, GstPadAcceptCapsFunction,
GstPadFixateCapsFunction, GstPadTemplate):
* gst/gstpipeline.c (gst_pipeline_change_state,
gst_pipeline_set_new_stream_time, gst_pipeline_use_clock,
gst_pipeline_set_clock, gst_pipeline_auto_clock,
gst_pipeline_get_delay):
Whitespace and docs fixes.
2007-05-22 06:37:37 +00:00
|
|
|
* The prototype of the push and pull activate functions.
|
2005-11-24 09:44:07 +00:00
|
|
|
*
|
2014-05-29 21:54:34 +00:00
|
|
|
* Returns: %TRUE if the pad could be activated or deactivated.
|
2005-11-24 09:44:07 +00:00
|
|
|
*/
|
2011-11-18 12:46:46 +00:00
|
|
|
typedef gboolean (*GstPadActivateModeFunction) (GstPad *pad, GstObject *parent,
|
2011-11-21 12:29:05 +00:00
|
|
|
GstPadMode mode, gboolean active);
|
2005-01-13 15:29:40 +00:00
|
|
|
|
inlined two more docs factored gstpadtemplate out of gstpad
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* docs/gst/tmpl/.cvsignore:
* docs/gst/tmpl/gstpad.sgml:
* docs/gst/tmpl/gstpadtemplate.sgml:
* gst/Makefile.am:
* gst/gstpad.c: (gst_pad_class_init), (gst_pad_dispose),
(gst_pad_finalize), (gst_pad_set_pad_template):
* gst/gstpad.h:
* gst/gstpadtemplate.c: (gst_pad_template_get_type),
(gst_pad_template_class_init), (gst_pad_template_init),
(gst_pad_template_dispose), (name_is_valid),
(gst_static_pad_template_get), (gst_pad_template_new),
(gst_static_pad_template_get_caps), (gst_pad_template_get_caps),
(gst_pad_template_pad_created):
* gst/gstpadtemplate.h:
inlined two more docs
factored gstpadtemplate out of gstpad
2005-09-25 11:19:22 +00:00
|
|
|
|
2005-03-21 17:34:02 +00:00
|
|
|
/* data passing */
|
inlined two more docs factored gstpadtemplate out of gstpad
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* docs/gst/tmpl/.cvsignore:
* docs/gst/tmpl/gstpad.sgml:
* docs/gst/tmpl/gstpadtemplate.sgml:
* gst/Makefile.am:
* gst/gstpad.c: (gst_pad_class_init), (gst_pad_dispose),
(gst_pad_finalize), (gst_pad_set_pad_template):
* gst/gstpad.h:
* gst/gstpadtemplate.c: (gst_pad_template_get_type),
(gst_pad_template_class_init), (gst_pad_template_init),
(gst_pad_template_dispose), (name_is_valid),
(gst_static_pad_template_get), (gst_pad_template_new),
(gst_static_pad_template_get_caps), (gst_pad_template_get_caps),
(gst_pad_template_pad_created):
* gst/gstpadtemplate.h:
inlined two more docs
factored gstpadtemplate out of gstpad
2005-09-25 11:19:22 +00:00
|
|
|
/**
|
|
|
|
* GstPadChainFunction:
|
2006-07-06 15:21:46 +00:00
|
|
|
* @pad: the sink #GstPad that performed the chain.
|
2014-06-11 23:19:01 +00:00
|
|
|
* @parent: (allow-none): the parent of @pad. If the #GST_PAD_FLAG_NEED_PARENT
|
|
|
|
* flag is set, @parent is guaranteed to be not-%NULL and remain valid
|
|
|
|
* during the execution of this function.
|
2014-08-23 11:24:27 +00:00
|
|
|
* @buffer: (transfer full): the #GstBuffer that is chained, not %NULL.
|
2005-10-15 15:30:24 +00:00
|
|
|
*
|
2005-10-21 11:36:32 +00:00
|
|
|
* A function that will be called on sinkpads when chaining buffers.
|
gst/gstelement.c (gst_element_requires_clock, gst_element_provides_clock, gst_element_request_pad, gst_element_class_...
Original commit message from CVS:
* gst/gstelement.c (gst_element_requires_clock,
gst_element_provides_clock, gst_element_request_pad,
gst_element_class_set_details, gst_element_class_set_details_simple,
gst_element_default_send_event, gst_element_abort_state,
gst_element_continue_state, gst_element_set_state,
gst_element_set_state_func, iterator_activate_fold_with_resync):
* gst/gstpad.c (gst_pad_activate_pull, gst_pad_set_getcaps_function,
gst_pad_fixate_caps, gst_pad_configure_sink, gst_pad_configure_src,
gst_pad_query, gst_pad_save_thyself, handle_pad_block, gst_pad_push,
gst_pad_get_range, gst_pad_pull_range):
* gst/gstpad.h (GST_PAD_LINK_SUCCESSFUL, GST_FLOW_CUSTOM_SUCCESS,
GST_FLOW_NOT_SUPPORTED, GST_FLOW_IS_FATAL, GstPadActivateFunction,
GstPadActivateModeFunction, GstPadChainFunction,
GstPadGetCapsFunction, GstPadAcceptCapsFunction,
GstPadFixateCapsFunction, GstPadTemplate):
* gst/gstpipeline.c (gst_pipeline_change_state,
gst_pipeline_set_new_stream_time, gst_pipeline_use_clock,
gst_pipeline_set_clock, gst_pipeline_auto_clock,
gst_pipeline_get_delay):
Whitespace and docs fixes.
2007-05-22 06:37:37 +00:00
|
|
|
* The function typically processes the data contained in the buffer and
|
2006-07-06 15:21:46 +00:00
|
|
|
* either consumes the data or passes it on to the internally linked pad(s).
|
inlined two more docs factored gstpadtemplate out of gstpad
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* docs/gst/tmpl/.cvsignore:
* docs/gst/tmpl/gstpad.sgml:
* docs/gst/tmpl/gstpadtemplate.sgml:
* gst/Makefile.am:
* gst/gstpad.c: (gst_pad_class_init), (gst_pad_dispose),
(gst_pad_finalize), (gst_pad_set_pad_template):
* gst/gstpad.h:
* gst/gstpadtemplate.c: (gst_pad_template_get_type),
(gst_pad_template_class_init), (gst_pad_template_init),
(gst_pad_template_dispose), (name_is_valid),
(gst_static_pad_template_get), (gst_pad_template_new),
(gst_static_pad_template_get_caps), (gst_pad_template_get_caps),
(gst_pad_template_pad_created):
* gst/gstpadtemplate.h:
inlined two more docs
factored gstpadtemplate out of gstpad
2005-09-25 11:19:22 +00:00
|
|
|
*
|
2006-07-06 15:21:46 +00:00
|
|
|
* The implementer of this function receives a refcount to @buffer and should
|
|
|
|
* gst_buffer_unref() when the buffer is no longer needed.
|
|
|
|
*
|
|
|
|
* When a chain function detects an error in the data stream, it must post an
|
2009-01-15 10:04:37 +00:00
|
|
|
* error on the bus and return an appropriate #GstFlowReturn value.
|
2006-07-06 15:21:46 +00:00
|
|
|
*
|
|
|
|
* Returns: #GST_FLOW_OK for success
|
inlined two more docs factored gstpadtemplate out of gstpad
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* docs/gst/tmpl/.cvsignore:
* docs/gst/tmpl/gstpad.sgml:
* docs/gst/tmpl/gstpadtemplate.sgml:
* gst/Makefile.am:
* gst/gstpad.c: (gst_pad_class_init), (gst_pad_dispose),
(gst_pad_finalize), (gst_pad_set_pad_template):
* gst/gstpad.h:
* gst/gstpadtemplate.c: (gst_pad_template_get_type),
(gst_pad_template_class_init), (gst_pad_template_init),
(gst_pad_template_dispose), (name_is_valid),
(gst_static_pad_template_get), (gst_pad_template_new),
(gst_static_pad_template_get_caps), (gst_pad_template_get_caps),
(gst_pad_template_pad_created):
* gst/gstpadtemplate.h:
inlined two more docs
factored gstpadtemplate out of gstpad
2005-09-25 11:19:22 +00:00
|
|
|
*/
|
2011-11-17 11:40:45 +00:00
|
|
|
typedef GstFlowReturn (*GstPadChainFunction) (GstPad *pad, GstObject *parent,
|
|
|
|
GstBuffer *buffer);
|
2009-05-12 11:10:55 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* GstPadChainListFunction:
|
|
|
|
* @pad: the sink #GstPad that performed the chain.
|
2014-06-11 23:19:01 +00:00
|
|
|
* @parent: (allow-none): the parent of @pad. If the #GST_PAD_FLAG_NEED_PARENT
|
|
|
|
* flag is set, @parent is guaranteed to be not-%NULL and remain valid
|
|
|
|
* during the execution of this function.
|
2014-08-23 11:24:27 +00:00
|
|
|
* @list: (transfer full): the #GstBufferList that is chained, not %NULL.
|
2009-05-12 11:10:55 +00:00
|
|
|
*
|
|
|
|
* A function that will be called on sinkpads when chaining buffer lists.
|
|
|
|
* The function typically processes the data contained in the buffer list and
|
|
|
|
* either consumes the data or passes it on to the internally linked pad(s).
|
|
|
|
*
|
|
|
|
* The implementer of this function receives a refcount to @list and
|
|
|
|
* should gst_buffer_list_unref() when the list is no longer needed.
|
|
|
|
*
|
|
|
|
* When a chainlist function detects an error in the data stream, it must
|
|
|
|
* post an error on the bus and return an appropriate #GstFlowReturn value.
|
|
|
|
*
|
|
|
|
* Returns: #GST_FLOW_OK for success
|
|
|
|
*/
|
2011-11-17 11:40:45 +00:00
|
|
|
typedef GstFlowReturn (*GstPadChainListFunction) (GstPad *pad, GstObject *parent,
|
|
|
|
GstBufferList *list);
|
2009-05-12 11:10:55 +00:00
|
|
|
|
2005-10-21 11:36:32 +00:00
|
|
|
/**
|
|
|
|
* GstPadGetRangeFunction:
|
2006-07-06 15:21:46 +00:00
|
|
|
* @pad: the src #GstPad to perform the getrange on.
|
2014-06-11 23:19:01 +00:00
|
|
|
* @parent: (allow-none): the parent of @pad. If the #GST_PAD_FLAG_NEED_PARENT
|
|
|
|
* flag is set, @parent is guaranteed to be not-%NULL and remain valid
|
|
|
|
* during the execution of this function.
|
2005-10-21 11:36:32 +00:00
|
|
|
* @offset: the offset of the range
|
|
|
|
* @length: the length of the range
|
2014-05-29 21:54:34 +00:00
|
|
|
* @buffer: a memory location to hold the result buffer, cannot be %NULL.
|
2005-10-21 11:36:32 +00:00
|
|
|
*
|
2006-07-06 15:21:46 +00:00
|
|
|
* This function will be called on source pads when a peer element
|
|
|
|
* request a buffer at the specified @offset and @length. If this function
|
gst/gstelement.c (gst_element_requires_clock, gst_element_provides_clock, gst_element_request_pad, gst_element_class_...
Original commit message from CVS:
* gst/gstelement.c (gst_element_requires_clock,
gst_element_provides_clock, gst_element_request_pad,
gst_element_class_set_details, gst_element_class_set_details_simple,
gst_element_default_send_event, gst_element_abort_state,
gst_element_continue_state, gst_element_set_state,
gst_element_set_state_func, iterator_activate_fold_with_resync):
* gst/gstpad.c (gst_pad_activate_pull, gst_pad_set_getcaps_function,
gst_pad_fixate_caps, gst_pad_configure_sink, gst_pad_configure_src,
gst_pad_query, gst_pad_save_thyself, handle_pad_block, gst_pad_push,
gst_pad_get_range, gst_pad_pull_range):
* gst/gstpad.h (GST_PAD_LINK_SUCCESSFUL, GST_FLOW_CUSTOM_SUCCESS,
GST_FLOW_NOT_SUPPORTED, GST_FLOW_IS_FATAL, GstPadActivateFunction,
GstPadActivateModeFunction, GstPadChainFunction,
GstPadGetCapsFunction, GstPadAcceptCapsFunction,
GstPadFixateCapsFunction, GstPadTemplate):
* gst/gstpipeline.c (gst_pipeline_change_state,
gst_pipeline_set_new_stream_time, gst_pipeline_use_clock,
gst_pipeline_set_clock, gst_pipeline_auto_clock,
gst_pipeline_get_delay):
Whitespace and docs fixes.
2007-05-22 06:37:37 +00:00
|
|
|
* returns #GST_FLOW_OK, the result buffer will be stored in @buffer. The
|
2005-10-21 11:36:32 +00:00
|
|
|
* contents of @buffer is invalid for any other return value.
|
|
|
|
*
|
2006-07-06 15:21:46 +00:00
|
|
|
* This function is installed on a source pad with
|
gst/gstelement.c (gst_element_requires_clock, gst_element_provides_clock, gst_element_request_pad, gst_element_class_...
Original commit message from CVS:
* gst/gstelement.c (gst_element_requires_clock,
gst_element_provides_clock, gst_element_request_pad,
gst_element_class_set_details, gst_element_class_set_details_simple,
gst_element_default_send_event, gst_element_abort_state,
gst_element_continue_state, gst_element_set_state,
gst_element_set_state_func, iterator_activate_fold_with_resync):
* gst/gstpad.c (gst_pad_activate_pull, gst_pad_set_getcaps_function,
gst_pad_fixate_caps, gst_pad_configure_sink, gst_pad_configure_src,
gst_pad_query, gst_pad_save_thyself, handle_pad_block, gst_pad_push,
gst_pad_get_range, gst_pad_pull_range):
* gst/gstpad.h (GST_PAD_LINK_SUCCESSFUL, GST_FLOW_CUSTOM_SUCCESS,
GST_FLOW_NOT_SUPPORTED, GST_FLOW_IS_FATAL, GstPadActivateFunction,
GstPadActivateModeFunction, GstPadChainFunction,
GstPadGetCapsFunction, GstPadAcceptCapsFunction,
GstPadFixateCapsFunction, GstPadTemplate):
* gst/gstpipeline.c (gst_pipeline_change_state,
gst_pipeline_set_new_stream_time, gst_pipeline_use_clock,
gst_pipeline_set_clock, gst_pipeline_auto_clock,
gst_pipeline_get_delay):
Whitespace and docs fixes.
2007-05-22 06:37:37 +00:00
|
|
|
* gst_pad_set_getrange_function() and can only be called on source pads after
|
2012-09-28 08:41:54 +00:00
|
|
|
* they are successfully activated with gst_pad_activate_mode() with the
|
|
|
|
* #GST_PAD_MODE_PULL.
|
2006-07-06 15:21:46 +00:00
|
|
|
*
|
|
|
|
* @offset and @length are always given in byte units. @offset must normally be a value
|
|
|
|
* between 0 and the length in bytes of the data available on @pad. The
|
|
|
|
* length (duration in bytes) can be retrieved with a #GST_QUERY_DURATION or with a
|
gst/gstelement.c (gst_element_requires_clock, gst_element_provides_clock, gst_element_request_pad, gst_element_class_...
Original commit message from CVS:
* gst/gstelement.c (gst_element_requires_clock,
gst_element_provides_clock, gst_element_request_pad,
gst_element_class_set_details, gst_element_class_set_details_simple,
gst_element_default_send_event, gst_element_abort_state,
gst_element_continue_state, gst_element_set_state,
gst_element_set_state_func, iterator_activate_fold_with_resync):
* gst/gstpad.c (gst_pad_activate_pull, gst_pad_set_getcaps_function,
gst_pad_fixate_caps, gst_pad_configure_sink, gst_pad_configure_src,
gst_pad_query, gst_pad_save_thyself, handle_pad_block, gst_pad_push,
gst_pad_get_range, gst_pad_pull_range):
* gst/gstpad.h (GST_PAD_LINK_SUCCESSFUL, GST_FLOW_CUSTOM_SUCCESS,
GST_FLOW_NOT_SUPPORTED, GST_FLOW_IS_FATAL, GstPadActivateFunction,
GstPadActivateModeFunction, GstPadChainFunction,
GstPadGetCapsFunction, GstPadAcceptCapsFunction,
GstPadFixateCapsFunction, GstPadTemplate):
* gst/gstpipeline.c (gst_pipeline_change_state,
gst_pipeline_set_new_stream_time, gst_pipeline_use_clock,
gst_pipeline_set_clock, gst_pipeline_auto_clock,
gst_pipeline_get_delay):
Whitespace and docs fixes.
2007-05-22 06:37:37 +00:00
|
|
|
* #GST_QUERY_SEEKING.
|
2006-07-06 15:21:46 +00:00
|
|
|
*
|
|
|
|
* Any @offset larger or equal than the length will make the function return
|
2012-03-28 16:12:23 +00:00
|
|
|
* #GST_FLOW_EOS, which corresponds to EOS. In this case @buffer does not
|
2006-07-06 15:21:46 +00:00
|
|
|
* contain a valid buffer.
|
|
|
|
*
|
2010-05-05 10:01:50 +00:00
|
|
|
* The buffer size of @buffer will only be smaller than @length when @offset is
|
|
|
|
* near the end of the stream. In all other cases, the size of @buffer must be
|
|
|
|
* exactly the requested size.
|
2006-07-06 15:21:46 +00:00
|
|
|
*
|
gst/gstelement.c (gst_element_requires_clock, gst_element_provides_clock, gst_element_request_pad, gst_element_class_...
Original commit message from CVS:
* gst/gstelement.c (gst_element_requires_clock,
gst_element_provides_clock, gst_element_request_pad,
gst_element_class_set_details, gst_element_class_set_details_simple,
gst_element_default_send_event, gst_element_abort_state,
gst_element_continue_state, gst_element_set_state,
gst_element_set_state_func, iterator_activate_fold_with_resync):
* gst/gstpad.c (gst_pad_activate_pull, gst_pad_set_getcaps_function,
gst_pad_fixate_caps, gst_pad_configure_sink, gst_pad_configure_src,
gst_pad_query, gst_pad_save_thyself, handle_pad_block, gst_pad_push,
gst_pad_get_range, gst_pad_pull_range):
* gst/gstpad.h (GST_PAD_LINK_SUCCESSFUL, GST_FLOW_CUSTOM_SUCCESS,
GST_FLOW_NOT_SUPPORTED, GST_FLOW_IS_FATAL, GstPadActivateFunction,
GstPadActivateModeFunction, GstPadChainFunction,
GstPadGetCapsFunction, GstPadAcceptCapsFunction,
GstPadFixateCapsFunction, GstPadTemplate):
* gst/gstpipeline.c (gst_pipeline_change_state,
gst_pipeline_set_new_stream_time, gst_pipeline_use_clock,
gst_pipeline_set_clock, gst_pipeline_auto_clock,
gst_pipeline_get_delay):
Whitespace and docs fixes.
2007-05-22 06:37:37 +00:00
|
|
|
* It is allowed to call this function with a 0 @length and valid @offset, in
|
2006-07-06 15:21:46 +00:00
|
|
|
* which case @buffer will contain a 0-sized buffer and the function returns
|
|
|
|
* #GST_FLOW_OK.
|
|
|
|
*
|
|
|
|
* When this function is called with a -1 @offset, the sequentially next buffer
|
gst/gstelement.c (gst_element_requires_clock, gst_element_provides_clock, gst_element_request_pad, gst_element_class_...
Original commit message from CVS:
* gst/gstelement.c (gst_element_requires_clock,
gst_element_provides_clock, gst_element_request_pad,
gst_element_class_set_details, gst_element_class_set_details_simple,
gst_element_default_send_event, gst_element_abort_state,
gst_element_continue_state, gst_element_set_state,
gst_element_set_state_func, iterator_activate_fold_with_resync):
* gst/gstpad.c (gst_pad_activate_pull, gst_pad_set_getcaps_function,
gst_pad_fixate_caps, gst_pad_configure_sink, gst_pad_configure_src,
gst_pad_query, gst_pad_save_thyself, handle_pad_block, gst_pad_push,
gst_pad_get_range, gst_pad_pull_range):
* gst/gstpad.h (GST_PAD_LINK_SUCCESSFUL, GST_FLOW_CUSTOM_SUCCESS,
GST_FLOW_NOT_SUPPORTED, GST_FLOW_IS_FATAL, GstPadActivateFunction,
GstPadActivateModeFunction, GstPadChainFunction,
GstPadGetCapsFunction, GstPadAcceptCapsFunction,
GstPadFixateCapsFunction, GstPadTemplate):
* gst/gstpipeline.c (gst_pipeline_change_state,
gst_pipeline_set_new_stream_time, gst_pipeline_use_clock,
gst_pipeline_set_clock, gst_pipeline_auto_clock,
gst_pipeline_get_delay):
Whitespace and docs fixes.
2007-05-22 06:37:37 +00:00
|
|
|
* of length @length in the stream is returned.
|
2006-07-06 15:21:46 +00:00
|
|
|
*
|
|
|
|
* When this function is called with a -1 @length, a buffer with a default
|
|
|
|
* optimal length is returned in @buffer. The length might depend on the value
|
|
|
|
* of @offset.
|
|
|
|
*
|
2010-05-05 10:01:50 +00:00
|
|
|
* Returns: #GST_FLOW_OK for success and a valid buffer in @buffer. Any other
|
|
|
|
* return value leaves @buffer undefined.
|
2005-10-21 11:36:32 +00:00
|
|
|
*/
|
2011-11-17 11:40:45 +00:00
|
|
|
typedef GstFlowReturn (*GstPadGetRangeFunction) (GstPad *pad, GstObject *parent,
|
|
|
|
guint64 offset, guint length,
|
|
|
|
GstBuffer **buffer);
|
inlined two more docs factored gstpadtemplate out of gstpad
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* docs/gst/tmpl/.cvsignore:
* docs/gst/tmpl/gstpad.sgml:
* docs/gst/tmpl/gstpadtemplate.sgml:
* gst/Makefile.am:
* gst/gstpad.c: (gst_pad_class_init), (gst_pad_dispose),
(gst_pad_finalize), (gst_pad_set_pad_template):
* gst/gstpad.h:
* gst/gstpadtemplate.c: (gst_pad_template_get_type),
(gst_pad_template_class_init), (gst_pad_template_init),
(gst_pad_template_dispose), (name_is_valid),
(gst_static_pad_template_get), (gst_pad_template_new),
(gst_static_pad_template_get_caps), (gst_pad_template_get_caps),
(gst_pad_template_pad_created):
* gst/gstpadtemplate.h:
inlined two more docs
factored gstpadtemplate out of gstpad
2005-09-25 11:19:22 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* GstPadEventFunction:
|
|
|
|
* @pad: the #GstPad to handle the event.
|
2014-06-11 23:19:01 +00:00
|
|
|
* @parent: (allow-none): the parent of @pad. If the #GST_PAD_FLAG_NEED_PARENT
|
|
|
|
* flag is set, @parent is guaranteed to be not-%NULL and remain valid
|
|
|
|
* during the execution of this function.
|
2014-08-22 08:32:38 +00:00
|
|
|
* @event: (transfer full): the #GstEvent to handle.
|
inlined two more docs factored gstpadtemplate out of gstpad
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* docs/gst/tmpl/.cvsignore:
* docs/gst/tmpl/gstpad.sgml:
* docs/gst/tmpl/gstpadtemplate.sgml:
* gst/Makefile.am:
* gst/gstpad.c: (gst_pad_class_init), (gst_pad_dispose),
(gst_pad_finalize), (gst_pad_set_pad_template):
* gst/gstpad.h:
* gst/gstpadtemplate.c: (gst_pad_template_get_type),
(gst_pad_template_class_init), (gst_pad_template_init),
(gst_pad_template_dispose), (name_is_valid),
(gst_static_pad_template_get), (gst_pad_template_new),
(gst_static_pad_template_get_caps), (gst_pad_template_get_caps),
(gst_pad_template_pad_created):
* gst/gstpadtemplate.h:
inlined two more docs
factored gstpadtemplate out of gstpad
2005-09-25 11:19:22 +00:00
|
|
|
*
|
|
|
|
* Function signature to handle an event for the pad.
|
|
|
|
*
|
2014-05-29 21:54:34 +00:00
|
|
|
* Returns: %TRUE if the pad could handle the event.
|
inlined two more docs factored gstpadtemplate out of gstpad
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* docs/gst/tmpl/.cvsignore:
* docs/gst/tmpl/gstpad.sgml:
* docs/gst/tmpl/gstpadtemplate.sgml:
* gst/Makefile.am:
* gst/gstpad.c: (gst_pad_class_init), (gst_pad_dispose),
(gst_pad_finalize), (gst_pad_set_pad_template):
* gst/gstpad.h:
* gst/gstpadtemplate.c: (gst_pad_template_get_type),
(gst_pad_template_class_init), (gst_pad_template_init),
(gst_pad_template_dispose), (name_is_valid),
(gst_static_pad_template_get), (gst_pad_template_new),
(gst_static_pad_template_get_caps), (gst_pad_template_get_caps),
(gst_pad_template_pad_created):
* gst/gstpadtemplate.h:
inlined two more docs
factored gstpadtemplate out of gstpad
2005-09-25 11:19:22 +00:00
|
|
|
*/
|
2011-11-17 11:40:45 +00:00
|
|
|
typedef gboolean (*GstPadEventFunction) (GstPad *pad, GstObject *parent,
|
|
|
|
GstEvent *event);
|
Bump version number, we're now 0.9.0
Original commit message from CVS:
* configure.ac:
* gst/gst_private.h:
* gst/gstbin.c: (gst_bin_add_func), (gst_bin_add),
(gst_bin_remove_func), (gst_bin_remove),
(gst_bin_get_by_name_recurse_up):
* gst/gstclock.c: (gst_clock_id_ref), (gst_clock_id_unref),
(gst_clock_id_compare_func), (gst_clock_id_wait),
(gst_clock_id_wait_async), (gst_clock_init),
(gst_clock_adjust_unlocked), (gst_clock_get_time):
* gst/gstelement.h:
* gst/gstinfo.c: (_gst_debug_init):
* gst/gstobject.h:
* gst/gstpad.c: (_gst_pad_default_fixate_foreach),
(gst_pad_collectv), (gst_pad_collect_valist), (gst_pad_query):
* gst/gstpad.h:
Bump version number, we're now 0.9.0
Add future debugging category.
Fix NULL _unref() in _get_by_name_recurse_up
Rearrange gstpad.h.
Update some docs.
2005-03-09 11:08:18 +00:00
|
|
|
|
2015-11-12 16:15:37 +00:00
|
|
|
/**
|
|
|
|
* GstPadEventFullFunction:
|
|
|
|
* @pad: the #GstPad to handle the event.
|
|
|
|
* @parent: (allow-none): the parent of @pad. If the #GST_PAD_FLAG_NEED_PARENT
|
|
|
|
* flag is set, @parent is guaranteed to be not-%NULL and remain valid
|
|
|
|
* during the execution of this function.
|
|
|
|
* @event: (transfer full): the #GstEvent to handle.
|
|
|
|
*
|
|
|
|
* Function signature to handle an event for the pad.
|
|
|
|
*
|
|
|
|
* This variant is for specific elements that will take into account the
|
|
|
|
* last downstream flow return (from a pad push), in which case they can
|
|
|
|
* return it.
|
|
|
|
*
|
|
|
|
* Returns: %GST_FLOW_OK if the event was handled properly, or any other
|
|
|
|
* #GstFlowReturn dependent on downstream state.
|
2015-12-31 19:27:12 +00:00
|
|
|
*
|
|
|
|
* Since: 1.8
|
2015-11-12 16:15:37 +00:00
|
|
|
*/
|
|
|
|
typedef GstFlowReturn (*GstPadEventFullFunction) (GstPad *pad, GstObject *parent,
|
|
|
|
GstEvent *event);
|
|
|
|
|
inlined two more docs factored gstpadtemplate out of gstpad
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* docs/gst/tmpl/.cvsignore:
* docs/gst/tmpl/gstpad.sgml:
* docs/gst/tmpl/gstpadtemplate.sgml:
* gst/Makefile.am:
* gst/gstpad.c: (gst_pad_class_init), (gst_pad_dispose),
(gst_pad_finalize), (gst_pad_set_pad_template):
* gst/gstpad.h:
* gst/gstpadtemplate.c: (gst_pad_template_get_type),
(gst_pad_template_class_init), (gst_pad_template_init),
(gst_pad_template_dispose), (name_is_valid),
(gst_static_pad_template_get), (gst_pad_template_new),
(gst_static_pad_template_get_caps), (gst_pad_template_get_caps),
(gst_pad_template_pad_created):
* gst/gstpadtemplate.h:
inlined two more docs
factored gstpadtemplate out of gstpad
2005-09-25 11:19:22 +00:00
|
|
|
|
2005-05-09 10:53:13 +00:00
|
|
|
/* internal links */
|
2008-09-01 10:42:04 +00:00
|
|
|
/**
|
|
|
|
* GstPadIterIntLinkFunction:
|
|
|
|
* @pad: The #GstPad to query.
|
2014-06-11 23:19:01 +00:00
|
|
|
* @parent: (allow-none): the parent of @pad. If the #GST_PAD_FLAG_NEED_PARENT
|
|
|
|
* flag is set, @parent is guaranteed to be not-%NULL and remain valid
|
|
|
|
* during the execution of this function.
|
2008-09-01 10:42:04 +00:00
|
|
|
*
|
|
|
|
* The signature of the internal pad link iterator function.
|
|
|
|
*
|
|
|
|
* Returns: a new #GstIterator that will iterate over all pads that are
|
|
|
|
* linked to the given pad on the inside of the parent element.
|
|
|
|
*
|
|
|
|
* the caller must call gst_iterator_free() after usage.
|
|
|
|
*/
|
2011-11-16 16:49:46 +00:00
|
|
|
typedef GstIterator* (*GstPadIterIntLinkFunction) (GstPad *pad, GstObject *parent);
|
inlined two more docs factored gstpadtemplate out of gstpad
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* docs/gst/tmpl/.cvsignore:
* docs/gst/tmpl/gstpad.sgml:
* docs/gst/tmpl/gstpadtemplate.sgml:
* gst/Makefile.am:
* gst/gstpad.c: (gst_pad_class_init), (gst_pad_dispose),
(gst_pad_finalize), (gst_pad_set_pad_template):
* gst/gstpad.h:
* gst/gstpadtemplate.c: (gst_pad_template_get_type),
(gst_pad_template_class_init), (gst_pad_template_init),
(gst_pad_template_dispose), (name_is_valid),
(gst_static_pad_template_get), (gst_pad_template_new),
(gst_static_pad_template_get_caps), (gst_pad_template_get_caps),
(gst_pad_template_pad_created):
* gst/gstpadtemplate.h:
inlined two more docs
factored gstpadtemplate out of gstpad
2005-09-25 11:19:22 +00:00
|
|
|
|
gst/gstquery.h
Original commit message from CVS:
2005-05-06 Andy Wingo <wingo@pobox.com>
* gst/gstquery.h
* gst/gstquery.c (_gst_query_initialize): Extend GstQuery from
GstData, init a memchunk.
(standard_definitions): Add a few query types, deprecate a few.
(gst_query_get_type): New proc.
(_gst_query_copy, _gst_query_free, gst_query_new): GstData
implementation.
(gst_query_new_application, gst_query_get_structure): New public
procs.
* docs/design/draft-query.txt: Removed LINKS from the query types,
because all the rest can be dispatched to other pads -- seemed
ugly to have a query that couldn't be dispatched. internal_links
is fine as a pad method.
* gst/gstpad.h: Add query2 as a pad method, add the new functions
in gstpad.c, but maintain binary compatibility for the moment.
Will fix before 0.9 is out.
* gst/gstqueryutils.c:
* gst/gstqueryutils.h: New files, implement 3 methods for each
query type: parse_query, parse_response, and set. Probably need an
allocator as well.
* gst/gst.h: Add gstquery.h and gstqueryutils.h to the list.
* gst/elements/gstfilesink.c (gst_filesink_query2):
* gst/base/gstbasesrc.c (gst_basesrc_query2): Replace old query,
query_types, and formats methods.
* gst/gstpad.c (gst_pad_query2, gst_pad_query2_default)
(gst_pad_set_query2_function): New functions.
(gst_real_pad_init): Set query2_default as the default query2
function. Basically just dispatches to internally linked pads.
Needs review!
* gst/gstdata_private.h (_GST_DATA_INIT): Set data->refcount to 1
without using the atomic operations. Only one thread can possibly
be accessing the data at this point. Changed so as to avoid
gst_atomic operations.
2005-05-06 21:41:22 +00:00
|
|
|
/* generic query function */
|
inlined two more docs factored gstpadtemplate out of gstpad
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* docs/gst/tmpl/.cvsignore:
* docs/gst/tmpl/gstpad.sgml:
* docs/gst/tmpl/gstpadtemplate.sgml:
* gst/Makefile.am:
* gst/gstpad.c: (gst_pad_class_init), (gst_pad_dispose),
(gst_pad_finalize), (gst_pad_set_pad_template):
* gst/gstpad.h:
* gst/gstpadtemplate.c: (gst_pad_template_get_type),
(gst_pad_template_class_init), (gst_pad_template_init),
(gst_pad_template_dispose), (name_is_valid),
(gst_static_pad_template_get), (gst_pad_template_new),
(gst_static_pad_template_get_caps), (gst_pad_template_get_caps),
(gst_pad_template_pad_created):
* gst/gstpadtemplate.h:
inlined two more docs
factored gstpadtemplate out of gstpad
2005-09-25 11:19:22 +00:00
|
|
|
/**
|
|
|
|
* GstPadQueryFunction:
|
|
|
|
* @pad: the #GstPad to query.
|
2014-06-11 23:19:01 +00:00
|
|
|
* @parent: (allow-none): the parent of @pad. If the #GST_PAD_FLAG_NEED_PARENT
|
|
|
|
* flag is set, @parent is guaranteed to be not-%NULL and remain valid
|
|
|
|
* during the execution of this function.
|
2011-05-17 09:20:05 +00:00
|
|
|
* @query: the #GstQuery object to execute
|
inlined two more docs factored gstpadtemplate out of gstpad
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* docs/gst/tmpl/.cvsignore:
* docs/gst/tmpl/gstpad.sgml:
* docs/gst/tmpl/gstpadtemplate.sgml:
* gst/Makefile.am:
* gst/gstpad.c: (gst_pad_class_init), (gst_pad_dispose),
(gst_pad_finalize), (gst_pad_set_pad_template):
* gst/gstpad.h:
* gst/gstpadtemplate.c: (gst_pad_template_get_type),
(gst_pad_template_class_init), (gst_pad_template_init),
(gst_pad_template_dispose), (name_is_valid),
(gst_static_pad_template_get), (gst_pad_template_new),
(gst_static_pad_template_get_caps), (gst_pad_template_get_caps),
(gst_pad_template_pad_created):
* gst/gstpadtemplate.h:
inlined two more docs
factored gstpadtemplate out of gstpad
2005-09-25 11:19:22 +00:00
|
|
|
*
|
2011-05-17 09:20:05 +00:00
|
|
|
* The signature of the query function.
|
2005-10-15 15:30:24 +00:00
|
|
|
*
|
2014-05-29 21:54:34 +00:00
|
|
|
* Returns: %TRUE if the query could be performed.
|
inlined two more docs factored gstpadtemplate out of gstpad
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* docs/gst/tmpl/.cvsignore:
* docs/gst/tmpl/gstpad.sgml:
* docs/gst/tmpl/gstpadtemplate.sgml:
* gst/Makefile.am:
* gst/gstpad.c: (gst_pad_class_init), (gst_pad_dispose),
(gst_pad_finalize), (gst_pad_set_pad_template):
* gst/gstpad.h:
* gst/gstpadtemplate.c: (gst_pad_template_get_type),
(gst_pad_template_class_init), (gst_pad_template_init),
(gst_pad_template_dispose), (name_is_valid),
(gst_static_pad_template_get), (gst_pad_template_new),
(gst_static_pad_template_get_caps), (gst_pad_template_get_caps),
(gst_pad_template_pad_created):
* gst/gstpadtemplate.h:
inlined two more docs
factored gstpadtemplate out of gstpad
2005-09-25 11:19:22 +00:00
|
|
|
*/
|
2011-11-16 16:22:56 +00:00
|
|
|
typedef gboolean (*GstPadQueryFunction) (GstPad *pad, GstObject *parent,
|
|
|
|
GstQuery *query);
|
gst/gstquery.h
Original commit message from CVS:
2005-05-06 Andy Wingo <wingo@pobox.com>
* gst/gstquery.h
* gst/gstquery.c (_gst_query_initialize): Extend GstQuery from
GstData, init a memchunk.
(standard_definitions): Add a few query types, deprecate a few.
(gst_query_get_type): New proc.
(_gst_query_copy, _gst_query_free, gst_query_new): GstData
implementation.
(gst_query_new_application, gst_query_get_structure): New public
procs.
* docs/design/draft-query.txt: Removed LINKS from the query types,
because all the rest can be dispatched to other pads -- seemed
ugly to have a query that couldn't be dispatched. internal_links
is fine as a pad method.
* gst/gstpad.h: Add query2 as a pad method, add the new functions
in gstpad.c, but maintain binary compatibility for the moment.
Will fix before 0.9 is out.
* gst/gstqueryutils.c:
* gst/gstqueryutils.h: New files, implement 3 methods for each
query type: parse_query, parse_response, and set. Probably need an
allocator as well.
* gst/gst.h: Add gstquery.h and gstqueryutils.h to the list.
* gst/elements/gstfilesink.c (gst_filesink_query2):
* gst/base/gstbasesrc.c (gst_basesrc_query2): Replace old query,
query_types, and formats methods.
* gst/gstpad.c (gst_pad_query2, gst_pad_query2_default)
(gst_pad_set_query2_function): New functions.
(gst_real_pad_init): Set query2_default as the default query2
function. Basically just dispatches to internally linked pads.
Needs review!
* gst/gstdata_private.h (_GST_DATA_INIT): Set data->refcount to 1
without using the atomic operations. Only one thread can possibly
be accessing the data at this point. Changed so as to avoid
gst_atomic operations.
2005-05-06 21:41:22 +00:00
|
|
|
|
inlined two more docs factored gstpadtemplate out of gstpad
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* docs/gst/tmpl/.cvsignore:
* docs/gst/tmpl/gstpad.sgml:
* docs/gst/tmpl/gstpadtemplate.sgml:
* gst/Makefile.am:
* gst/gstpad.c: (gst_pad_class_init), (gst_pad_dispose),
(gst_pad_finalize), (gst_pad_set_pad_template):
* gst/gstpad.h:
* gst/gstpadtemplate.c: (gst_pad_template_get_type),
(gst_pad_template_class_init), (gst_pad_template_init),
(gst_pad_template_dispose), (name_is_valid),
(gst_static_pad_template_get), (gst_pad_template_new),
(gst_static_pad_template_get_caps), (gst_pad_template_get_caps),
(gst_pad_template_pad_created):
* gst/gstpadtemplate.h:
inlined two more docs
factored gstpadtemplate out of gstpad
2005-09-25 11:19:22 +00:00
|
|
|
|
Bump version number, we're now 0.9.0
Original commit message from CVS:
* configure.ac:
* gst/gst_private.h:
* gst/gstbin.c: (gst_bin_add_func), (gst_bin_add),
(gst_bin_remove_func), (gst_bin_remove),
(gst_bin_get_by_name_recurse_up):
* gst/gstclock.c: (gst_clock_id_ref), (gst_clock_id_unref),
(gst_clock_id_compare_func), (gst_clock_id_wait),
(gst_clock_id_wait_async), (gst_clock_init),
(gst_clock_adjust_unlocked), (gst_clock_get_time):
* gst/gstelement.h:
* gst/gstinfo.c: (_gst_debug_init):
* gst/gstobject.h:
* gst/gstpad.c: (_gst_pad_default_fixate_foreach),
(gst_pad_collectv), (gst_pad_collect_valist), (gst_pad_query):
* gst/gstpad.h:
Bump version number, we're now 0.9.0
Add future debugging category.
Fix NULL _unref() in _get_by_name_recurse_up
Rearrange gstpad.h.
Update some docs.
2005-03-09 11:08:18 +00:00
|
|
|
/* linking */
|
inlined two more docs factored gstpadtemplate out of gstpad
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* docs/gst/tmpl/.cvsignore:
* docs/gst/tmpl/gstpad.sgml:
* docs/gst/tmpl/gstpadtemplate.sgml:
* gst/Makefile.am:
* gst/gstpad.c: (gst_pad_class_init), (gst_pad_dispose),
(gst_pad_finalize), (gst_pad_set_pad_template):
* gst/gstpad.h:
* gst/gstpadtemplate.c: (gst_pad_template_get_type),
(gst_pad_template_class_init), (gst_pad_template_init),
(gst_pad_template_dispose), (name_is_valid),
(gst_static_pad_template_get), (gst_pad_template_new),
(gst_static_pad_template_get_caps), (gst_pad_template_get_caps),
(gst_pad_template_pad_created):
* gst/gstpadtemplate.h:
inlined two more docs
factored gstpadtemplate out of gstpad
2005-09-25 11:19:22 +00:00
|
|
|
/**
|
2012-06-15 23:43:30 +00:00
|
|
|
* GstPadLinkFunction:
|
inlined two more docs factored gstpadtemplate out of gstpad
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* docs/gst/tmpl/.cvsignore:
* docs/gst/tmpl/gstpad.sgml:
* docs/gst/tmpl/gstpadtemplate.sgml:
* gst/Makefile.am:
* gst/gstpad.c: (gst_pad_class_init), (gst_pad_dispose),
(gst_pad_finalize), (gst_pad_set_pad_template):
* gst/gstpad.h:
* gst/gstpadtemplate.c: (gst_pad_template_get_type),
(gst_pad_template_class_init), (gst_pad_template_init),
(gst_pad_template_dispose), (name_is_valid),
(gst_static_pad_template_get), (gst_pad_template_new),
(gst_static_pad_template_get_caps), (gst_pad_template_get_caps),
(gst_pad_template_pad_created):
* gst/gstpadtemplate.h:
inlined two more docs
factored gstpadtemplate out of gstpad
2005-09-25 11:19:22 +00:00
|
|
|
* @pad: the #GstPad that is linked.
|
2014-06-11 23:19:01 +00:00
|
|
|
* @parent: (allow-none): the parent of @pad. If the #GST_PAD_FLAG_NEED_PARENT
|
|
|
|
* flag is set, @parent is guaranteed to be not-%NULL and remain valid
|
|
|
|
* during the execution of this function.
|
inlined two more docs factored gstpadtemplate out of gstpad
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* docs/gst/tmpl/.cvsignore:
* docs/gst/tmpl/gstpad.sgml:
* docs/gst/tmpl/gstpadtemplate.sgml:
* gst/Makefile.am:
* gst/gstpad.c: (gst_pad_class_init), (gst_pad_dispose),
(gst_pad_finalize), (gst_pad_set_pad_template):
* gst/gstpad.h:
* gst/gstpadtemplate.c: (gst_pad_template_get_type),
(gst_pad_template_class_init), (gst_pad_template_init),
(gst_pad_template_dispose), (name_is_valid),
(gst_static_pad_template_get), (gst_pad_template_new),
(gst_static_pad_template_get_caps), (gst_pad_template_get_caps),
(gst_pad_template_pad_created):
* gst/gstpadtemplate.h:
inlined two more docs
factored gstpadtemplate out of gstpad
2005-09-25 11:19:22 +00:00
|
|
|
* @peer: the peer #GstPad of the link
|
|
|
|
*
|
|
|
|
* Function signature to handle a new link on the pad.
|
|
|
|
*
|
|
|
|
* Returns: the result of the link with the specified peer.
|
|
|
|
*/
|
2012-09-17 11:09:58 +00:00
|
|
|
typedef GstPadLinkReturn (*GstPadLinkFunction) (GstPad *pad, GstObject *parent, GstPad *peer);
|
inlined two more docs factored gstpadtemplate out of gstpad
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* docs/gst/tmpl/.cvsignore:
* docs/gst/tmpl/gstpad.sgml:
* docs/gst/tmpl/gstpadtemplate.sgml:
* gst/Makefile.am:
* gst/gstpad.c: (gst_pad_class_init), (gst_pad_dispose),
(gst_pad_finalize), (gst_pad_set_pad_template):
* gst/gstpad.h:
* gst/gstpadtemplate.c: (gst_pad_template_get_type),
(gst_pad_template_class_init), (gst_pad_template_init),
(gst_pad_template_dispose), (name_is_valid),
(gst_static_pad_template_get), (gst_pad_template_new),
(gst_static_pad_template_get_caps), (gst_pad_template_get_caps),
(gst_pad_template_pad_created):
* gst/gstpadtemplate.h:
inlined two more docs
factored gstpadtemplate out of gstpad
2005-09-25 11:19:22 +00:00
|
|
|
/**
|
2012-06-15 23:43:30 +00:00
|
|
|
* GstPadUnlinkFunction:
|
inlined two more docs factored gstpadtemplate out of gstpad
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* docs/gst/tmpl/.cvsignore:
* docs/gst/tmpl/gstpad.sgml:
* docs/gst/tmpl/gstpadtemplate.sgml:
* gst/Makefile.am:
* gst/gstpad.c: (gst_pad_class_init), (gst_pad_dispose),
(gst_pad_finalize), (gst_pad_set_pad_template):
* gst/gstpad.h:
* gst/gstpadtemplate.c: (gst_pad_template_get_type),
(gst_pad_template_class_init), (gst_pad_template_init),
(gst_pad_template_dispose), (name_is_valid),
(gst_static_pad_template_get), (gst_pad_template_new),
(gst_static_pad_template_get_caps), (gst_pad_template_get_caps),
(gst_pad_template_pad_created):
* gst/gstpadtemplate.h:
inlined two more docs
factored gstpadtemplate out of gstpad
2005-09-25 11:19:22 +00:00
|
|
|
* @pad: the #GstPad that is linked.
|
2014-06-11 23:19:01 +00:00
|
|
|
* @parent: (allow-none): the parent of @pad. If the #GST_PAD_FLAG_NEED_PARENT
|
|
|
|
* flag is set, @parent is guaranteed to be not-%NULL and remain valid
|
|
|
|
* during the execution of this function.
|
inlined two more docs factored gstpadtemplate out of gstpad
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* docs/gst/tmpl/.cvsignore:
* docs/gst/tmpl/gstpad.sgml:
* docs/gst/tmpl/gstpadtemplate.sgml:
* gst/Makefile.am:
* gst/gstpad.c: (gst_pad_class_init), (gst_pad_dispose),
(gst_pad_finalize), (gst_pad_set_pad_template):
* gst/gstpad.h:
* gst/gstpadtemplate.c: (gst_pad_template_get_type),
(gst_pad_template_class_init), (gst_pad_template_init),
(gst_pad_template_dispose), (name_is_valid),
(gst_static_pad_template_get), (gst_pad_template_new),
(gst_static_pad_template_get_caps), (gst_pad_template_get_caps),
(gst_pad_template_pad_created):
* gst/gstpadtemplate.h:
inlined two more docs
factored gstpadtemplate out of gstpad
2005-09-25 11:19:22 +00:00
|
|
|
*
|
|
|
|
* Function signature to handle a unlinking the pad prom its peer.
|
2019-02-11 02:21:21 +00:00
|
|
|
*
|
|
|
|
* The pad's lock is already held when the unlink function is called, so most
|
|
|
|
* pad functions cannot be called from within the callback.
|
inlined two more docs factored gstpadtemplate out of gstpad
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* docs/gst/tmpl/.cvsignore:
* docs/gst/tmpl/gstpad.sgml:
* docs/gst/tmpl/gstpadtemplate.sgml:
* gst/Makefile.am:
* gst/gstpad.c: (gst_pad_class_init), (gst_pad_dispose),
(gst_pad_finalize), (gst_pad_set_pad_template):
* gst/gstpad.h:
* gst/gstpadtemplate.c: (gst_pad_template_get_type),
(gst_pad_template_class_init), (gst_pad_template_init),
(gst_pad_template_dispose), (name_is_valid),
(gst_static_pad_template_get), (gst_pad_template_new),
(gst_static_pad_template_get_caps), (gst_pad_template_get_caps),
(gst_pad_template_pad_created):
* gst/gstpadtemplate.h:
inlined two more docs
factored gstpadtemplate out of gstpad
2005-09-25 11:19:22 +00:00
|
|
|
*/
|
2012-09-17 11:09:58 +00:00
|
|
|
typedef void (*GstPadUnlinkFunction) (GstPad *pad, GstObject *parent);
|
Bump version number, we're now 0.9.0
Original commit message from CVS:
* configure.ac:
* gst/gst_private.h:
* gst/gstbin.c: (gst_bin_add_func), (gst_bin_add),
(gst_bin_remove_func), (gst_bin_remove),
(gst_bin_get_by_name_recurse_up):
* gst/gstclock.c: (gst_clock_id_ref), (gst_clock_id_unref),
(gst_clock_id_compare_func), (gst_clock_id_wait),
(gst_clock_id_wait_async), (gst_clock_init),
(gst_clock_adjust_unlocked), (gst_clock_get_time):
* gst/gstelement.h:
* gst/gstinfo.c: (_gst_debug_init):
* gst/gstobject.h:
* gst/gstpad.c: (_gst_pad_default_fixate_foreach),
(gst_pad_collectv), (gst_pad_collect_valist), (gst_pad_query):
* gst/gstpad.h:
Bump version number, we're now 0.9.0
Add future debugging category.
Fix NULL _unref() in _get_by_name_recurse_up
Rearrange gstpad.h.
Update some docs.
2005-03-09 11:08:18 +00:00
|
|
|
|
inlined two more docs factored gstpadtemplate out of gstpad
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* docs/gst/tmpl/.cvsignore:
* docs/gst/tmpl/gstpad.sgml:
* docs/gst/tmpl/gstpadtemplate.sgml:
* gst/Makefile.am:
* gst/gstpad.c: (gst_pad_class_init), (gst_pad_dispose),
(gst_pad_finalize), (gst_pad_set_pad_template):
* gst/gstpad.h:
* gst/gstpadtemplate.c: (gst_pad_template_get_type),
(gst_pad_template_class_init), (gst_pad_template_init),
(gst_pad_template_dispose), (name_is_valid),
(gst_static_pad_template_get), (gst_pad_template_new),
(gst_static_pad_template_get_caps), (gst_pad_template_get_caps),
(gst_pad_template_pad_created):
* gst/gstpadtemplate.h:
inlined two more docs
factored gstpadtemplate out of gstpad
2005-09-25 11:19:22 +00:00
|
|
|
|
Bump version number, we're now 0.9.0
Original commit message from CVS:
* configure.ac:
* gst/gst_private.h:
* gst/gstbin.c: (gst_bin_add_func), (gst_bin_add),
(gst_bin_remove_func), (gst_bin_remove),
(gst_bin_get_by_name_recurse_up):
* gst/gstclock.c: (gst_clock_id_ref), (gst_clock_id_unref),
(gst_clock_id_compare_func), (gst_clock_id_wait),
(gst_clock_id_wait_async), (gst_clock_init),
(gst_clock_adjust_unlocked), (gst_clock_get_time):
* gst/gstelement.h:
* gst/gstinfo.c: (_gst_debug_init):
* gst/gstobject.h:
* gst/gstpad.c: (_gst_pad_default_fixate_foreach),
(gst_pad_collectv), (gst_pad_collect_valist), (gst_pad_query):
* gst/gstpad.h:
Bump version number, we're now 0.9.0
Add future debugging category.
Fix NULL _unref() in _get_by_name_recurse_up
Rearrange gstpad.h.
Update some docs.
2005-03-09 11:08:18 +00:00
|
|
|
/* misc */
|
inlined two more docs factored gstpadtemplate out of gstpad
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* docs/gst/tmpl/.cvsignore:
* docs/gst/tmpl/gstpad.sgml:
* docs/gst/tmpl/gstpadtemplate.sgml:
* gst/Makefile.am:
* gst/gstpad.c: (gst_pad_class_init), (gst_pad_dispose),
(gst_pad_finalize), (gst_pad_set_pad_template):
* gst/gstpad.h:
* gst/gstpadtemplate.c: (gst_pad_template_get_type),
(gst_pad_template_class_init), (gst_pad_template_init),
(gst_pad_template_dispose), (name_is_valid),
(gst_static_pad_template_get), (gst_pad_template_new),
(gst_static_pad_template_get_caps), (gst_pad_template_get_caps),
(gst_pad_template_pad_created):
* gst/gstpadtemplate.h:
inlined two more docs
factored gstpadtemplate out of gstpad
2005-09-25 11:19:22 +00:00
|
|
|
/**
|
2011-06-07 08:02:06 +00:00
|
|
|
* GstPadForwardFunction:
|
|
|
|
* @pad: the #GstPad that is forwarded.
|
|
|
|
* @user_data: the gpointer to optional user data.
|
inlined two more docs factored gstpadtemplate out of gstpad
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* docs/gst/tmpl/.cvsignore:
* docs/gst/tmpl/gstpad.sgml:
* docs/gst/tmpl/gstpadtemplate.sgml:
* gst/Makefile.am:
* gst/gstpad.c: (gst_pad_class_init), (gst_pad_dispose),
(gst_pad_finalize), (gst_pad_set_pad_template):
* gst/gstpad.h:
* gst/gstpadtemplate.c: (gst_pad_template_get_type),
(gst_pad_template_class_init), (gst_pad_template_init),
(gst_pad_template_dispose), (name_is_valid),
(gst_static_pad_template_get), (gst_pad_template_new),
(gst_static_pad_template_get_caps), (gst_pad_template_get_caps),
(gst_pad_template_pad_created):
* gst/gstpadtemplate.h:
inlined two more docs
factored gstpadtemplate out of gstpad
2005-09-25 11:19:22 +00:00
|
|
|
*
|
2011-06-07 08:02:06 +00:00
|
|
|
* A forward function is called for all internally linked pads, see
|
|
|
|
* gst_pad_forward().
|
inlined two more docs factored gstpadtemplate out of gstpad
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* docs/gst/tmpl/.cvsignore:
* docs/gst/tmpl/gstpad.sgml:
* docs/gst/tmpl/gstpadtemplate.sgml:
* gst/Makefile.am:
* gst/gstpad.c: (gst_pad_class_init), (gst_pad_dispose),
(gst_pad_finalize), (gst_pad_set_pad_template):
* gst/gstpad.h:
* gst/gstpadtemplate.c: (gst_pad_template_get_type),
(gst_pad_template_class_init), (gst_pad_template_init),
(gst_pad_template_dispose), (name_is_valid),
(gst_static_pad_template_get), (gst_pad_template_new),
(gst_static_pad_template_get_caps), (gst_pad_template_get_caps),
(gst_pad_template_pad_created):
* gst/gstpadtemplate.h:
inlined two more docs
factored gstpadtemplate out of gstpad
2005-09-25 11:19:22 +00:00
|
|
|
*
|
2014-05-29 21:54:34 +00:00
|
|
|
* Returns: %TRUE if the dispatching procedure has to be stopped.
|
inlined two more docs factored gstpadtemplate out of gstpad
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* docs/gst/tmpl/.cvsignore:
* docs/gst/tmpl/gstpad.sgml:
* docs/gst/tmpl/gstpadtemplate.sgml:
* gst/Makefile.am:
* gst/gstpad.c: (gst_pad_class_init), (gst_pad_dispose),
(gst_pad_finalize), (gst_pad_set_pad_template):
* gst/gstpad.h:
* gst/gstpadtemplate.c: (gst_pad_template_get_type),
(gst_pad_template_class_init), (gst_pad_template_init),
(gst_pad_template_dispose), (name_is_valid),
(gst_static_pad_template_get), (gst_pad_template_new),
(gst_static_pad_template_get_caps), (gst_pad_template_get_caps),
(gst_pad_template_pad_created):
* gst/gstpadtemplate.h:
inlined two more docs
factored gstpadtemplate out of gstpad
2005-09-25 11:19:22 +00:00
|
|
|
*/
|
2011-06-07 08:02:06 +00:00
|
|
|
typedef gboolean (*GstPadForwardFunction) (GstPad *pad, gpointer user_data);
|
2005-03-21 17:34:02 +00:00
|
|
|
|
2011-05-30 16:29:06 +00:00
|
|
|
/**
|
2011-11-01 00:13:35 +00:00
|
|
|
* GstPadProbeType:
|
|
|
|
* @GST_PAD_PROBE_TYPE_INVALID: invalid probe type
|
2016-05-15 12:02:49 +00:00
|
|
|
* @GST_PAD_PROBE_TYPE_IDLE: probe idle pads and block while the callback is called
|
2011-11-01 00:13:35 +00:00
|
|
|
* @GST_PAD_PROBE_TYPE_BLOCK: probe and block pads
|
|
|
|
* @GST_PAD_PROBE_TYPE_BUFFER: probe buffers
|
|
|
|
* @GST_PAD_PROBE_TYPE_BUFFER_LIST: probe buffer lists
|
2011-11-07 16:04:13 +00:00
|
|
|
* @GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM: probe downstream events
|
|
|
|
* @GST_PAD_PROBE_TYPE_EVENT_UPSTREAM: probe upstream events
|
2011-12-06 17:09:13 +00:00
|
|
|
* @GST_PAD_PROBE_TYPE_EVENT_FLUSH: probe flush events. This probe has to be
|
|
|
|
* explicitly enabled and is not included in the
|
|
|
|
* @@GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM or
|
|
|
|
* @@GST_PAD_PROBE_TYPE_EVENT_UPSTREAM probe types.
|
2011-11-08 14:48:34 +00:00
|
|
|
* @GST_PAD_PROBE_TYPE_QUERY_DOWNSTREAM: probe downstream queries
|
|
|
|
* @GST_PAD_PROBE_TYPE_QUERY_UPSTREAM: probe upstream queries
|
2011-11-01 00:13:35 +00:00
|
|
|
* @GST_PAD_PROBE_TYPE_PUSH: probe push
|
|
|
|
* @GST_PAD_PROBE_TYPE_PULL: probe pull
|
2012-11-23 13:36:09 +00:00
|
|
|
* @GST_PAD_PROBE_TYPE_BLOCKING: probe and block at the next opportunity, at data flow or when idle
|
|
|
|
* @GST_PAD_PROBE_TYPE_DATA_DOWNSTREAM: probe downstream data (buffers, buffer lists, and events)
|
|
|
|
* @GST_PAD_PROBE_TYPE_DATA_UPSTREAM: probe upstream data (events)
|
|
|
|
* @GST_PAD_PROBE_TYPE_DATA_BOTH: probe upstream and downstream data (buffers, buffer lists, and events)
|
|
|
|
* @GST_PAD_PROBE_TYPE_BLOCK_DOWNSTREAM: probe and block downstream data (buffers, buffer lists, and events)
|
|
|
|
* @GST_PAD_PROBE_TYPE_BLOCK_UPSTREAM: probe and block upstream data (events)
|
|
|
|
* @GST_PAD_PROBE_TYPE_EVENT_BOTH: probe upstream and downstream events
|
|
|
|
* @GST_PAD_PROBE_TYPE_QUERY_BOTH: probe upstream and downstream queries
|
|
|
|
* @GST_PAD_PROBE_TYPE_ALL_BOTH: probe upstream events and queries and downstream buffers, buffer lists, events and queries
|
|
|
|
* @GST_PAD_PROBE_TYPE_SCHEDULING: probe push and pull
|
2011-05-31 17:16:09 +00:00
|
|
|
*
|
2011-06-03 15:24:45 +00:00
|
|
|
* The different probing types that can occur. When either one of
|
2011-11-01 00:13:35 +00:00
|
|
|
* @GST_PAD_PROBE_TYPE_IDLE or @GST_PAD_PROBE_TYPE_BLOCK is used, the probe will be a
|
2011-06-03 15:24:45 +00:00
|
|
|
* blocking probe.
|
2011-05-31 17:16:09 +00:00
|
|
|
*/
|
|
|
|
typedef enum
|
|
|
|
{
|
2011-11-07 16:04:13 +00:00
|
|
|
GST_PAD_PROBE_TYPE_INVALID = 0,
|
2011-06-03 15:24:45 +00:00
|
|
|
/* flags to control blocking */
|
2011-11-07 16:04:13 +00:00
|
|
|
GST_PAD_PROBE_TYPE_IDLE = (1 << 0),
|
|
|
|
GST_PAD_PROBE_TYPE_BLOCK = (1 << 1),
|
2011-06-03 15:24:45 +00:00
|
|
|
/* flags to select datatypes */
|
2011-11-08 14:48:34 +00:00
|
|
|
GST_PAD_PROBE_TYPE_BUFFER = (1 << 4),
|
|
|
|
GST_PAD_PROBE_TYPE_BUFFER_LIST = (1 << 5),
|
|
|
|
GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM = (1 << 6),
|
|
|
|
GST_PAD_PROBE_TYPE_EVENT_UPSTREAM = (1 << 7),
|
2011-12-06 17:09:13 +00:00
|
|
|
GST_PAD_PROBE_TYPE_EVENT_FLUSH = (1 << 8),
|
|
|
|
GST_PAD_PROBE_TYPE_QUERY_DOWNSTREAM = (1 << 9),
|
|
|
|
GST_PAD_PROBE_TYPE_QUERY_UPSTREAM = (1 << 10),
|
2011-06-03 15:24:45 +00:00
|
|
|
/* flags to select scheduling mode */
|
2011-11-08 14:48:34 +00:00
|
|
|
GST_PAD_PROBE_TYPE_PUSH = (1 << 12),
|
2012-11-23 09:58:25 +00:00
|
|
|
GST_PAD_PROBE_TYPE_PULL = (1 << 13),
|
|
|
|
|
|
|
|
/* flag combinations */
|
2012-11-23 12:47:25 +00:00
|
|
|
GST_PAD_PROBE_TYPE_BLOCKING = GST_PAD_PROBE_TYPE_IDLE | GST_PAD_PROBE_TYPE_BLOCK,
|
|
|
|
GST_PAD_PROBE_TYPE_DATA_DOWNSTREAM = GST_PAD_PROBE_TYPE_BUFFER | GST_PAD_PROBE_TYPE_BUFFER_LIST | GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM,
|
|
|
|
GST_PAD_PROBE_TYPE_DATA_UPSTREAM = GST_PAD_PROBE_TYPE_EVENT_UPSTREAM,
|
|
|
|
GST_PAD_PROBE_TYPE_DATA_BOTH = GST_PAD_PROBE_TYPE_DATA_DOWNSTREAM | GST_PAD_PROBE_TYPE_DATA_UPSTREAM,
|
|
|
|
GST_PAD_PROBE_TYPE_BLOCK_DOWNSTREAM = GST_PAD_PROBE_TYPE_BLOCK | GST_PAD_PROBE_TYPE_DATA_DOWNSTREAM,
|
|
|
|
GST_PAD_PROBE_TYPE_BLOCK_UPSTREAM = GST_PAD_PROBE_TYPE_BLOCK | GST_PAD_PROBE_TYPE_DATA_UPSTREAM,
|
|
|
|
GST_PAD_PROBE_TYPE_EVENT_BOTH = GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM | GST_PAD_PROBE_TYPE_EVENT_UPSTREAM,
|
|
|
|
GST_PAD_PROBE_TYPE_QUERY_BOTH = GST_PAD_PROBE_TYPE_QUERY_DOWNSTREAM | GST_PAD_PROBE_TYPE_QUERY_UPSTREAM,
|
|
|
|
GST_PAD_PROBE_TYPE_ALL_BOTH = GST_PAD_PROBE_TYPE_DATA_BOTH | GST_PAD_PROBE_TYPE_QUERY_BOTH,
|
|
|
|
GST_PAD_PROBE_TYPE_SCHEDULING = GST_PAD_PROBE_TYPE_PUSH | GST_PAD_PROBE_TYPE_PULL
|
2011-11-01 00:13:35 +00:00
|
|
|
} GstPadProbeType;
|
2011-05-31 17:16:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
2011-11-01 00:13:35 +00:00
|
|
|
* GstPadProbeReturn:
|
2015-07-06 05:46:27 +00:00
|
|
|
* @GST_PAD_PROBE_OK: normal probe return value. This leaves the probe in
|
|
|
|
* place, and defers decisions about dropping or passing data to other
|
|
|
|
* probes, if any. If there are no other probes, the default behaviour
|
2017-02-15 19:58:49 +00:00
|
|
|
* for the probe type applies ('block' for blocking probes,
|
|
|
|
* and 'pass' for non-blocking probes).
|
2012-03-16 20:37:10 +00:00
|
|
|
* @GST_PAD_PROBE_DROP: drop data in data probes. For push mode this means that
|
2015-07-06 05:46:27 +00:00
|
|
|
* the data item is not sent downstream. For pull mode, it means that
|
2017-01-03 12:30:02 +00:00
|
|
|
* the data item is not passed upstream. In both cases, no other probes
|
2017-02-15 19:37:40 +00:00
|
|
|
* are called for this item and %GST_FLOW_OK or %TRUE is returned to the
|
2017-01-03 12:30:02 +00:00
|
|
|
* caller.
|
2015-07-06 05:46:27 +00:00
|
|
|
* @GST_PAD_PROBE_REMOVE: remove this probe.
|
|
|
|
* @GST_PAD_PROBE_PASS: pass the data item in the block probe and block on the
|
|
|
|
* next item.
|
2015-04-29 13:49:17 +00:00
|
|
|
* @GST_PAD_PROBE_HANDLED: Data has been handled in the probe and will not be
|
|
|
|
* forwarded further. For events and buffers this is the same behaviour as
|
2017-02-15 19:37:40 +00:00
|
|
|
* %GST_PAD_PROBE_DROP (except that in this case you need to unref the buffer
|
2015-04-29 13:49:17 +00:00
|
|
|
* or event yourself). For queries it will also return %TRUE to the caller.
|
|
|
|
* The probe can also modify the #GstFlowReturn value by using the
|
|
|
|
* #GST_PAD_PROBE_INFO_FLOW_RETURN() accessor.
|
|
|
|
* Note that the resulting query must contain valid entries.
|
|
|
|
* Since: 1.6
|
2011-05-30 16:29:06 +00:00
|
|
|
*
|
2011-06-03 16:10:24 +00:00
|
|
|
* Different return values for the #GstPadProbeCallback.
|
2011-05-30 16:29:06 +00:00
|
|
|
*/
|
|
|
|
typedef enum
|
|
|
|
{
|
2011-11-01 00:13:35 +00:00
|
|
|
GST_PAD_PROBE_DROP,
|
|
|
|
GST_PAD_PROBE_OK,
|
|
|
|
GST_PAD_PROBE_REMOVE,
|
|
|
|
GST_PAD_PROBE_PASS,
|
2015-04-29 13:49:17 +00:00
|
|
|
GST_PAD_PROBE_HANDLED
|
2011-11-01 00:13:35 +00:00
|
|
|
} GstPadProbeReturn;
|
2011-05-30 16:29:06 +00:00
|
|
|
|
2011-11-08 10:04:19 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* GstPadProbeInfo:
|
|
|
|
* @type: the current probe type
|
2012-01-26 10:01:21 +00:00
|
|
|
* @id: the id of the probe
|
2014-06-11 23:19:01 +00:00
|
|
|
* @data: (allow-none): type specific data, check the @type field to know the
|
|
|
|
* datatype. This field can be %NULL.
|
2011-11-08 11:47:33 +00:00
|
|
|
* @offset: offset of pull probe, this field is valid when @type contains
|
|
|
|
* #GST_PAD_PROBE_TYPE_PULL
|
|
|
|
* @size: size of pull probe, this field is valid when @type contains
|
|
|
|
* #GST_PAD_PROBE_TYPE_PULL
|
2011-11-08 10:04:19 +00:00
|
|
|
*
|
|
|
|
* Info passed in the #GstPadProbeCallback.
|
|
|
|
*/
|
2012-03-29 11:34:50 +00:00
|
|
|
struct _GstPadProbeInfo
|
2011-11-08 10:04:19 +00:00
|
|
|
{
|
|
|
|
GstPadProbeType type;
|
2012-01-26 10:01:21 +00:00
|
|
|
gulong id;
|
2011-11-08 10:04:19 +00:00
|
|
|
gpointer data;
|
2011-11-08 11:47:33 +00:00
|
|
|
guint64 offset;
|
|
|
|
guint size;
|
2011-11-11 15:52:41 +00:00
|
|
|
|
2012-03-29 11:34:50 +00:00
|
|
|
/*< private >*/
|
2015-04-29 13:49:17 +00:00
|
|
|
union {
|
|
|
|
gpointer _gst_reserved[GST_PADDING];
|
|
|
|
struct {
|
|
|
|
GstFlowReturn flow_ret;
|
|
|
|
} abi;
|
|
|
|
} ABI;
|
2012-03-29 11:34:50 +00:00
|
|
|
};
|
2011-11-08 10:04:19 +00:00
|
|
|
|
|
|
|
#define GST_PAD_PROBE_INFO_TYPE(d) ((d)->type)
|
2012-01-26 10:01:21 +00:00
|
|
|
#define GST_PAD_PROBE_INFO_ID(d) ((d)->id)
|
2011-11-08 10:04:19 +00:00
|
|
|
#define GST_PAD_PROBE_INFO_DATA(d) ((d)->data)
|
2015-04-29 13:49:17 +00:00
|
|
|
#define GST_PAD_PROBE_INFO_FLOW_RETURN(d) ((d)->ABI.abi.flow_ret)
|
2011-11-08 10:04:19 +00:00
|
|
|
|
|
|
|
#define GST_PAD_PROBE_INFO_BUFFER(d) GST_BUFFER_CAST(GST_PAD_PROBE_INFO_DATA(d))
|
|
|
|
#define GST_PAD_PROBE_INFO_BUFFER_LIST(d) GST_BUFFER_LIST_CAST(GST_PAD_PROBE_INFO_DATA(d))
|
|
|
|
#define GST_PAD_PROBE_INFO_EVENT(d) GST_EVENT_CAST(GST_PAD_PROBE_INFO_DATA(d))
|
2011-11-08 14:48:34 +00:00
|
|
|
#define GST_PAD_PROBE_INFO_QUERY(d) GST_QUERY_CAST(GST_PAD_PROBE_INFO_DATA(d))
|
2011-11-08 10:04:19 +00:00
|
|
|
|
2011-11-08 11:47:33 +00:00
|
|
|
#define GST_PAD_PROBE_INFO_OFFSET(d) ((d)->offset)
|
|
|
|
#define GST_PAD_PROBE_INFO_SIZE(d) ((d)->size)
|
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2012-09-19 19:01:46 +00:00
|
|
|
GstEvent* gst_pad_probe_info_get_event (GstPadProbeInfo * info);
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2012-09-19 19:01:46 +00:00
|
|
|
GstQuery* gst_pad_probe_info_get_query (GstPadProbeInfo * info);
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2012-09-19 19:01:46 +00:00
|
|
|
GstBuffer* gst_pad_probe_info_get_buffer (GstPadProbeInfo * info);
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2012-09-19 19:01:46 +00:00
|
|
|
GstBufferList* gst_pad_probe_info_get_buffer_list (GstPadProbeInfo * info);
|
|
|
|
|
2005-10-09 20:49:46 +00:00
|
|
|
/**
|
2012-06-15 23:43:30 +00:00
|
|
|
* GstPadProbeCallback:
|
2011-05-30 16:29:06 +00:00
|
|
|
* @pad: the #GstPad that is blocked
|
2011-11-08 10:04:19 +00:00
|
|
|
* @info: #GstPadProbeInfo
|
2005-10-09 20:49:46 +00:00
|
|
|
* @user_data: the gpointer to optional user data.
|
|
|
|
*
|
2011-05-31 17:16:09 +00:00
|
|
|
* Callback used by gst_pad_add_probe(). Gets called to notify about the current
|
2011-05-30 16:29:06 +00:00
|
|
|
* blocking type.
|
2011-11-08 11:47:33 +00:00
|
|
|
*
|
|
|
|
* The callback is allowed to modify the data pointer in @info.
|
2012-10-09 08:24:34 +00:00
|
|
|
*
|
|
|
|
* Returns: a #GstPadProbeReturn
|
2005-10-09 20:49:46 +00:00
|
|
|
*/
|
2011-11-08 11:47:33 +00:00
|
|
|
typedef GstPadProbeReturn (*GstPadProbeCallback) (GstPad *pad, GstPadProbeInfo *info,
|
|
|
|
gpointer user_data);
|
2004-03-15 14:43:35 +00:00
|
|
|
|
2011-05-24 14:08:41 +00:00
|
|
|
/**
|
|
|
|
* GstPadStickyEventsForeachFunction:
|
|
|
|
* @pad: the #GstPad.
|
2014-06-11 23:19:01 +00:00
|
|
|
* @event: (allow-none): a sticky #GstEvent.
|
2011-05-24 14:08:41 +00:00
|
|
|
* @user_data: the #gpointer to optional user data.
|
|
|
|
*
|
|
|
|
* Callback used by gst_pad_sticky_events_foreach().
|
|
|
|
*
|
2011-11-23 16:50:17 +00:00
|
|
|
* When this function returns %TRUE, the next event will be
|
|
|
|
* returned. When %FALSE is returned, gst_pad_sticky_events_foreach() will return.
|
|
|
|
*
|
2014-05-29 21:54:34 +00:00
|
|
|
* When @event is set to %NULL, the item will be removed from the list of sticky events.
|
2013-04-04 13:45:23 +00:00
|
|
|
* @event can be replaced by assigning a new reference to it.
|
|
|
|
* This function is responsible for unreffing the old event when
|
2011-11-23 16:50:17 +00:00
|
|
|
* removing or modifying.
|
|
|
|
*
|
|
|
|
* Returns: %TRUE if the iteration should continue
|
2011-05-24 14:08:41 +00:00
|
|
|
*/
|
2011-11-23 16:50:17 +00:00
|
|
|
typedef gboolean (*GstPadStickyEventsForeachFunction) (GstPad *pad, GstEvent **event,
|
|
|
|
gpointer user_data);
|
2011-05-24 14:08:41 +00:00
|
|
|
|
2005-09-27 20:40:35 +00:00
|
|
|
/**
|
|
|
|
* GstPadFlags:
|
2011-11-16 11:36:51 +00:00
|
|
|
* @GST_PAD_FLAG_BLOCKED: is dataflow on a pad blocked
|
2012-06-04 09:46:42 +00:00
|
|
|
* @GST_PAD_FLAG_FLUSHING: is pad flushing
|
|
|
|
* @GST_PAD_FLAG_EOS: is pad in EOS state
|
2011-11-16 11:36:51 +00:00
|
|
|
* @GST_PAD_FLAG_BLOCKING: is pad currently blocking on a buffer or event
|
2012-02-02 11:05:37 +00:00
|
|
|
* @GST_PAD_FLAG_NEED_PARENT: ensure that there is a parent object before calling
|
|
|
|
* into the pad callbacks.
|
2011-11-16 11:36:51 +00:00
|
|
|
* @GST_PAD_FLAG_NEED_RECONFIGURE: the pad should be reconfigured/renegotiated.
|
2011-05-03 11:42:44 +00:00
|
|
|
* The flag has to be unset manually after
|
|
|
|
* reconfiguration happened.
|
2011-11-22 17:32:51 +00:00
|
|
|
* @GST_PAD_FLAG_PENDING_EVENTS: the pad has pending events
|
2014-04-26 16:02:18 +00:00
|
|
|
* @GST_PAD_FLAG_FIXED_CAPS: the pad is using fixed caps. This means that
|
|
|
|
* once the caps are set on the pad, the default caps query function
|
|
|
|
* will only return those caps.
|
2011-11-16 11:36:51 +00:00
|
|
|
* @GST_PAD_FLAG_PROXY_CAPS: the default event and query handler will forward
|
2011-11-15 10:20:48 +00:00
|
|
|
* all events and queries to the internally linked pads
|
|
|
|
* instead of discarding them.
|
2012-02-02 11:05:37 +00:00
|
|
|
* @GST_PAD_FLAG_PROXY_ALLOCATION: the default query handler will forward
|
|
|
|
* allocation queries to the internally linked pads
|
|
|
|
* instead of discarding them.
|
2012-07-18 15:30:30 +00:00
|
|
|
* @GST_PAD_FLAG_PROXY_SCHEDULING: the default query handler will forward
|
|
|
|
* scheduling queries to the internally linked pads
|
|
|
|
* instead of discarding them.
|
2013-12-03 20:46:19 +00:00
|
|
|
* @GST_PAD_FLAG_ACCEPT_INTERSECT: the default accept-caps handler will check
|
|
|
|
* it the caps intersect the query-caps result instead
|
|
|
|
* of checking for a subset. This is interesting for
|
|
|
|
* parsers that can accept incompletely specified caps.
|
2015-08-14 10:51:07 +00:00
|
|
|
* @GST_PAD_FLAG_ACCEPT_TEMPLATE: the default accept-caps handler will use
|
|
|
|
* the template pad caps instead of query caps to
|
|
|
|
* compare with the accept caps. Use this in combination
|
2019-04-23 12:08:18 +00:00
|
|
|
* with %GST_PAD_FLAG_ACCEPT_INTERSECT. (Since: 1.6)
|
2005-09-27 20:40:35 +00:00
|
|
|
* @GST_PAD_FLAG_LAST: offset to define more flags
|
|
|
|
*
|
|
|
|
* Pad state flags
|
|
|
|
*/
|
2004-03-15 14:43:35 +00:00
|
|
|
typedef enum {
|
2011-11-16 11:36:51 +00:00
|
|
|
GST_PAD_FLAG_BLOCKED = (GST_OBJECT_FLAG_LAST << 0),
|
|
|
|
GST_PAD_FLAG_FLUSHING = (GST_OBJECT_FLAG_LAST << 1),
|
2012-06-04 09:46:42 +00:00
|
|
|
GST_PAD_FLAG_EOS = (GST_OBJECT_FLAG_LAST << 2),
|
|
|
|
GST_PAD_FLAG_BLOCKING = (GST_OBJECT_FLAG_LAST << 3),
|
|
|
|
GST_PAD_FLAG_NEED_PARENT = (GST_OBJECT_FLAG_LAST << 4),
|
|
|
|
GST_PAD_FLAG_NEED_RECONFIGURE = (GST_OBJECT_FLAG_LAST << 5),
|
|
|
|
GST_PAD_FLAG_PENDING_EVENTS = (GST_OBJECT_FLAG_LAST << 6),
|
|
|
|
GST_PAD_FLAG_FIXED_CAPS = (GST_OBJECT_FLAG_LAST << 7),
|
|
|
|
GST_PAD_FLAG_PROXY_CAPS = (GST_OBJECT_FLAG_LAST << 8),
|
|
|
|
GST_PAD_FLAG_PROXY_ALLOCATION = (GST_OBJECT_FLAG_LAST << 9),
|
2012-07-18 15:30:30 +00:00
|
|
|
GST_PAD_FLAG_PROXY_SCHEDULING = (GST_OBJECT_FLAG_LAST << 10),
|
2013-12-03 20:46:19 +00:00
|
|
|
GST_PAD_FLAG_ACCEPT_INTERSECT = (GST_OBJECT_FLAG_LAST << 11),
|
2015-08-14 10:51:07 +00:00
|
|
|
GST_PAD_FLAG_ACCEPT_TEMPLATE = (GST_OBJECT_FLAG_LAST << 12),
|
renamed GST_FLAGS macros to GST_OBJECT_FLAGS moved bitshift from macro to enum definition
Original commit message from CVS:
* check/gst/gstbin.c: (GST_START_TEST):
* docs/gst/gstreamer-sections.txt:
* gst/base/gstbasesink.c: (gst_base_sink_init):
* gst/base/gstbasesrc.c: (gst_base_src_init),
(gst_base_src_get_range), (gst_base_src_check_get_range),
(gst_base_src_start), (gst_base_src_stop):
* gst/base/gstbasesrc.h:
* gst/elements/gstfakesrc.c: (gst_fake_src_set_property):
* gst/gstbin.c: (gst_bin_add_func), (gst_bin_remove_func),
(bin_element_is_sink), (reset_degree), (gst_bin_element_set_state),
(bin_bus_handler):
* gst/gstbin.h:
* gst/gstbuffer.h:
* gst/gstbus.c: (gst_bus_post), (gst_bus_set_flushing):
* gst/gstbus.h:
* gst/gstelement.c: (gst_element_is_locked_state),
(gst_element_set_locked_state), (gst_element_commit_state),
(gst_element_set_state):
* gst/gstelement.h:
* gst/gstindex.c: (gst_index_init):
* gst/gstindex.h:
* gst/gstminiobject.h:
* gst/gstobject.c: (gst_object_init), (gst_object_sink),
(gst_object_set_parent):
* gst/gstobject.h:
* gst/gstpad.c: (gst_pad_set_blocked_async), (gst_pad_is_blocked),
(gst_pad_get_caps_unlocked), (gst_pad_set_caps):
* gst/gstpad.h:
* gst/gstpadtemplate.h:
* gst/gstpipeline.c: (gst_pipeline_provide_clock_func),
(gst_pipeline_use_clock), (gst_pipeline_auto_clock):
* gst/gstpipeline.h:
* gst/indexers/gstfileindex.c: (gst_file_index_load),
(gst_file_index_commit):
* testsuite/bytestream/filepadsink.c: (gst_fp_sink_init):
* testsuite/pad/link.c: (gst_test_src_init),
(gst_test_filter_init), (gst_test_sink_init):
* testsuite/states/locked.c: (main):
renamed GST_FLAGS macros to GST_OBJECT_FLAGS
moved bitshift from macro to enum definition
2005-10-12 14:28:39 +00:00
|
|
|
/* padding */
|
2011-05-03 11:42:44 +00:00
|
|
|
GST_PAD_FLAG_LAST = (GST_OBJECT_FLAG_LAST << 16)
|
2004-03-15 14:43:35 +00:00
|
|
|
} GstPadFlags;
|
2000-11-25 07:02:55 +00:00
|
|
|
|
2005-11-24 09:44:07 +00:00
|
|
|
/**
|
|
|
|
* GstPad:
|
|
|
|
* @element_private: private data owned by the parent element
|
|
|
|
* @padtemplate: padtemplate for this pad
|
|
|
|
* @direction: the direction of the pad, cannot change after creating
|
|
|
|
* the pad.
|
gst/gstelement.c (gst_element_requires_clock, gst_element_provides_clock, gst_element_request_pad, gst_element_class_...
Original commit message from CVS:
* gst/gstelement.c (gst_element_requires_clock,
gst_element_provides_clock, gst_element_request_pad,
gst_element_class_set_details, gst_element_class_set_details_simple,
gst_element_default_send_event, gst_element_abort_state,
gst_element_continue_state, gst_element_set_state,
gst_element_set_state_func, iterator_activate_fold_with_resync):
* gst/gstpad.c (gst_pad_activate_pull, gst_pad_set_getcaps_function,
gst_pad_fixate_caps, gst_pad_configure_sink, gst_pad_configure_src,
gst_pad_query, gst_pad_save_thyself, handle_pad_block, gst_pad_push,
gst_pad_get_range, gst_pad_pull_range):
* gst/gstpad.h (GST_PAD_LINK_SUCCESSFUL, GST_FLOW_CUSTOM_SUCCESS,
GST_FLOW_NOT_SUPPORTED, GST_FLOW_IS_FATAL, GstPadActivateFunction,
GstPadActivateModeFunction, GstPadChainFunction,
GstPadGetCapsFunction, GstPadAcceptCapsFunction,
GstPadFixateCapsFunction, GstPadTemplate):
* gst/gstpipeline.c (gst_pipeline_change_state,
gst_pipeline_set_new_stream_time, gst_pipeline_use_clock,
gst_pipeline_set_clock, gst_pipeline_auto_clock,
gst_pipeline_get_delay):
Whitespace and docs fixes.
2007-05-22 06:37:37 +00:00
|
|
|
*
|
2005-11-24 09:44:07 +00:00
|
|
|
* The #GstPad structure. Use the functions to update the variables.
|
|
|
|
*/
|
2004-03-15 14:43:35 +00:00
|
|
|
struct _GstPad {
|
2011-05-06 10:09:00 +00:00
|
|
|
GstObject object;
|
2000-01-30 09:03:00 +00:00
|
|
|
|
2005-11-24 09:44:07 +00:00
|
|
|
/*< public >*/
|
2011-05-06 10:09:00 +00:00
|
|
|
gpointer element_private;
|
2000-01-30 09:03:00 +00:00
|
|
|
|
2011-05-06 10:09:00 +00:00
|
|
|
GstPadTemplate *padtemplate;
|
2003-10-07 21:58:42 +00:00
|
|
|
|
2011-05-06 10:09:00 +00:00
|
|
|
GstPadDirection direction;
|
Bump version number, we're now 0.9.0
Original commit message from CVS:
* configure.ac:
* gst/gst_private.h:
* gst/gstbin.c: (gst_bin_add_func), (gst_bin_add),
(gst_bin_remove_func), (gst_bin_remove),
(gst_bin_get_by_name_recurse_up):
* gst/gstclock.c: (gst_clock_id_ref), (gst_clock_id_unref),
(gst_clock_id_compare_func), (gst_clock_id_wait),
(gst_clock_id_wait_async), (gst_clock_init),
(gst_clock_adjust_unlocked), (gst_clock_get_time):
* gst/gstelement.h:
* gst/gstinfo.c: (_gst_debug_init):
* gst/gstobject.h:
* gst/gstpad.c: (_gst_pad_default_fixate_foreach),
(gst_pad_collectv), (gst_pad_collect_valist), (gst_pad_query):
* gst/gstpad.h:
Bump version number, we're now 0.9.0
Add future debugging category.
Fix NULL _unref() in _get_by_name_recurse_up
Rearrange gstpad.h.
Update some docs.
2005-03-09 11:08:18 +00:00
|
|
|
|
2011-11-21 14:47:01 +00:00
|
|
|
/*< private >*/
|
2005-03-21 17:34:02 +00:00
|
|
|
/* streaming rec_lock */
|
2012-01-19 08:27:04 +00:00
|
|
|
GRecMutex stream_rec_lock;
|
2005-03-21 17:34:02 +00:00
|
|
|
GstTask *task;
|
|
|
|
|
|
|
|
/* block cond, mutex is from the object */
|
2012-01-19 08:27:04 +00:00
|
|
|
GCond block_cond;
|
2011-05-31 17:16:09 +00:00
|
|
|
GHookList probes;
|
2005-03-21 17:34:02 +00:00
|
|
|
|
2011-11-18 11:35:46 +00:00
|
|
|
GstPadMode mode;
|
2005-03-21 17:34:02 +00:00
|
|
|
GstPadActivateFunction activatefunc;
|
2012-01-26 18:28:01 +00:00
|
|
|
gpointer activatedata;
|
2011-11-21 14:47:01 +00:00
|
|
|
GDestroyNotify activatenotify;
|
2011-11-21 12:29:05 +00:00
|
|
|
GstPadActivateModeFunction activatemodefunc;
|
2012-01-26 18:28:01 +00:00
|
|
|
gpointer activatemodedata;
|
2011-11-21 14:47:01 +00:00
|
|
|
GDestroyNotify activatemodenotify;
|
2000-01-30 09:03:00 +00:00
|
|
|
|
Bump version number, we're now 0.9.0
Original commit message from CVS:
* configure.ac:
* gst/gst_private.h:
* gst/gstbin.c: (gst_bin_add_func), (gst_bin_add),
(gst_bin_remove_func), (gst_bin_remove),
(gst_bin_get_by_name_recurse_up):
* gst/gstclock.c: (gst_clock_id_ref), (gst_clock_id_unref),
(gst_clock_id_compare_func), (gst_clock_id_wait),
(gst_clock_id_wait_async), (gst_clock_init),
(gst_clock_adjust_unlocked), (gst_clock_get_time):
* gst/gstelement.h:
* gst/gstinfo.c: (_gst_debug_init):
* gst/gstobject.h:
* gst/gstpad.c: (_gst_pad_default_fixate_foreach),
(gst_pad_collectv), (gst_pad_collect_valist), (gst_pad_query):
* gst/gstpad.h:
Bump version number, we're now 0.9.0
Add future debugging category.
Fix NULL _unref() in _get_by_name_recurse_up
Rearrange gstpad.h.
Update some docs.
2005-03-09 11:08:18 +00:00
|
|
|
/* pad link */
|
2011-05-06 10:09:00 +00:00
|
|
|
GstPad *peer;
|
2005-06-19 00:52:31 +00:00
|
|
|
GstPadLinkFunction linkfunc;
|
2012-01-26 18:28:01 +00:00
|
|
|
gpointer linkdata;
|
2011-11-21 14:47:01 +00:00
|
|
|
GDestroyNotify linknotify;
|
2005-06-19 00:52:31 +00:00
|
|
|
GstPadUnlinkFunction unlinkfunc;
|
2012-01-26 18:28:01 +00:00
|
|
|
gpointer unlinkdata;
|
2011-11-21 14:47:01 +00:00
|
|
|
GDestroyNotify unlinknotify;
|
2000-01-30 09:03:00 +00:00
|
|
|
|
2002-07-24 21:04:50 +00:00
|
|
|
/* data transport functions */
|
2005-06-19 00:52:31 +00:00
|
|
|
GstPadChainFunction chainfunc;
|
2012-01-26 18:28:01 +00:00
|
|
|
gpointer chaindata;
|
2011-11-21 14:47:01 +00:00
|
|
|
GDestroyNotify chainnotify;
|
2010-12-07 15:52:47 +00:00
|
|
|
GstPadChainListFunction chainlistfunc;
|
2012-01-26 18:28:01 +00:00
|
|
|
gpointer chainlistdata;
|
2011-11-21 14:47:01 +00:00
|
|
|
GDestroyNotify chainlistnotify;
|
2005-06-19 00:52:31 +00:00
|
|
|
GstPadGetRangeFunction getrangefunc;
|
2012-01-26 18:28:01 +00:00
|
|
|
gpointer getrangedata;
|
2011-11-21 14:47:01 +00:00
|
|
|
GDestroyNotify getrangenotify;
|
2004-03-15 14:43:35 +00:00
|
|
|
GstPadEventFunction eventfunc;
|
2012-01-26 18:28:01 +00:00
|
|
|
gpointer eventdata;
|
2011-11-21 14:47:01 +00:00
|
|
|
GDestroyNotify eventnotify;
|
Bump version number, we're now 0.9.0
Original commit message from CVS:
* configure.ac:
* gst/gst_private.h:
* gst/gstbin.c: (gst_bin_add_func), (gst_bin_add),
(gst_bin_remove_func), (gst_bin_remove),
(gst_bin_get_by_name_recurse_up):
* gst/gstclock.c: (gst_clock_id_ref), (gst_clock_id_unref),
(gst_clock_id_compare_func), (gst_clock_id_wait),
(gst_clock_id_wait_async), (gst_clock_init),
(gst_clock_adjust_unlocked), (gst_clock_get_time):
* gst/gstelement.h:
* gst/gstinfo.c: (_gst_debug_init):
* gst/gstobject.h:
* gst/gstpad.c: (_gst_pad_default_fixate_foreach),
(gst_pad_collectv), (gst_pad_collect_valist), (gst_pad_query):
* gst/gstpad.h:
Bump version number, we're now 0.9.0
Add future debugging category.
Fix NULL _unref() in _get_by_name_recurse_up
Rearrange gstpad.h.
Update some docs.
2005-03-09 11:08:18 +00:00
|
|
|
|
2011-05-19 14:26:06 +00:00
|
|
|
/* pad offset */
|
|
|
|
gint64 offset;
|
|
|
|
|
2005-05-09 10:53:13 +00:00
|
|
|
/* generic query method */
|
|
|
|
GstPadQueryFunction queryfunc;
|
2012-01-26 18:28:01 +00:00
|
|
|
gpointer querydata;
|
2011-11-21 14:47:01 +00:00
|
|
|
GDestroyNotify querynotify;
|
2005-05-09 10:53:13 +00:00
|
|
|
|
|
|
|
/* internal links */
|
2010-12-07 15:52:47 +00:00
|
|
|
GstPadIterIntLinkFunction iterintlinkfunc;
|
2012-01-26 18:28:01 +00:00
|
|
|
gpointer iterintlinkdata;
|
2011-11-21 14:47:01 +00:00
|
|
|
GDestroyNotify iterintlinknotify;
|
2002-07-24 21:04:50 +00:00
|
|
|
|
2011-06-02 10:39:34 +00:00
|
|
|
/* counts number of probes attached. */
|
2011-06-01 17:27:55 +00:00
|
|
|
gint num_probes;
|
2011-05-31 17:16:09 +00:00
|
|
|
gint num_blocked;
|
2003-10-07 21:58:42 +00:00
|
|
|
|
2010-12-07 15:52:47 +00:00
|
|
|
GstPadPrivate *priv;
|
|
|
|
|
2014-05-23 16:25:35 +00:00
|
|
|
union {
|
|
|
|
gpointer _gst_reserved[GST_PADDING];
|
|
|
|
struct {
|
|
|
|
GstFlowReturn last_flowret;
|
2015-11-12 16:15:37 +00:00
|
|
|
GstPadEventFullFunction eventfullfunc;
|
2014-05-23 16:25:35 +00:00
|
|
|
} abi;
|
|
|
|
} ABI;
|
2000-01-30 09:03:00 +00:00
|
|
|
};
|
|
|
|
|
gst/gstutils.c: RPAD fixes all around.
Original commit message from CVS:
2005-06-08 Andy Wingo <wingo@pobox.com>
* gst/gstutils.c: RPAD fixes all around.
(gst_element_link_pads): Refcounting fixes.
* tools/gst-inspect.c:
* tools/gst-xmlinspect.c:
* parse/grammar.y:
* gst/base/gsttypefindhelper.c:
* gst/base/gstbasesink.c:
* gst/gstqueue.c: RPAD fixes.
* gst/gstghostpad.h:
* gst/gstghostpad.c: New ghost pad implementation as full proxy
pads. The tricky thing is they provide both source and sink
interfaces, since they proxy the internal pad for the external
pad, and vice versa. Implement with lower-level ProxyPad objects,
with the interior proxy pad as a child of the exterior ghost pad.
Should write a doc on this.
* gst/gstpad.h: s/RPAD/PAD/, s/RealPad/Pad/.
(gst_pad_set_name, gst_pad_set_parent): Macros removed, use
gst_object API.
* gst/gstpad.c: Big changes. No more stub base GstPad, now all
pads are real pads. No ghost pads in this file. Not documenting
the myriad s/RPAD/PAD/ and REALIZE fixes.
(gst_pad_class_init): Add properties for "direction" and
"template". Both are construct-only, so they can't change during
the life of the pad. Fixes properly deriving from GstPad.
(gst_pad_custom_new, gst_pad_custom_new_from_template): Gone. For
derived objects, just set properties when creating the objects via
g_object_new.
(gst_pad_get_parent): Implement as a function, return NULL if the
parent is not an element.
(gst_pad_get_real_parent, gst_pad_add_ghost_pad)
(gst_pad_remove_ghost_pad, gst_pad_realize): Removed.
* gst/gstobject.c (gst_object_class_init): Make name a construct
property. Don't set it in the object init.
* gst/gstelement.c (gst_element_add_pad): Don't allow adding pads
with UNKNOWN direction.
(gst_element_add_ghost_pad): Remove non-orthogonal API. Replace
with gst_element_add_pad (e, gst_ghost_pad_new (name, pad)).
(gst_element_remove_pad): Remove ghost-pad special cases.
(gst_element_pads_activate): Remove rpad cruft.
* gst/gstbin.c (gst_bin_change_state): Use gst_pad_get_parent to
catch the pad's-parent-not-an-element case.
* gst/gst.h: Include gstghostpad.h.
* gst/gst.c (init_post): No more real, ghost pads.
* gst/Makefile.am: Add gstghostpad.[ch].
* check/Makefile.am:
* check/gst/gstbin.c:
* check/gst/gstghostpad.c (test_ghost_pads): Check that linking
into a bin creates ghost pads, and that the refcounts are right.
Partly moved from gstbin.c.
2005-06-08 22:16:27 +00:00
|
|
|
struct _GstPadClass {
|
|
|
|
GstObjectClass parent_class;
|
2000-11-25 07:02:55 +00:00
|
|
|
|
|
|
|
/* signal callbacks */
|
2005-01-13 15:29:40 +00:00
|
|
|
void (*linked) (GstPad *pad, GstPad *peer);
|
|
|
|
void (*unlinked) (GstPad *pad, GstPad *peer);
|
Bump version number, we're now 0.9.0
Original commit message from CVS:
* configure.ac:
* gst/gst_private.h:
* gst/gstbin.c: (gst_bin_add_func), (gst_bin_add),
(gst_bin_remove_func), (gst_bin_remove),
(gst_bin_get_by_name_recurse_up):
* gst/gstclock.c: (gst_clock_id_ref), (gst_clock_id_unref),
(gst_clock_id_compare_func), (gst_clock_id_wait),
(gst_clock_id_wait_async), (gst_clock_init),
(gst_clock_adjust_unlocked), (gst_clock_get_time):
* gst/gstelement.h:
* gst/gstinfo.c: (_gst_debug_init):
* gst/gstobject.h:
* gst/gstpad.c: (_gst_pad_default_fixate_foreach),
(gst_pad_collectv), (gst_pad_collect_valist), (gst_pad_query):
* gst/gstpad.h:
Bump version number, we're now 0.9.0
Add future debugging category.
Fix NULL _unref() in _get_by_name_recurse_up
Rearrange gstpad.h.
Update some docs.
2005-03-09 11:08:18 +00:00
|
|
|
|
|
|
|
/*< private >*/
|
2004-02-04 21:35:39 +00:00
|
|
|
gpointer _gst_reserved[GST_PADDING];
|
2000-01-30 09:03:00 +00:00
|
|
|
};
|
|
|
|
|
2001-01-19 09:37:32 +00:00
|
|
|
|
|
|
|
/***** helper macros *****/
|
|
|
|
/* GstPad */
|
2014-04-26 16:02:18 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* GST_PAD_NAME:
|
|
|
|
* @pad: a #GstPad
|
|
|
|
*
|
|
|
|
* Get name of the given pad.
|
|
|
|
* No locking is performed in this function, use gst_pad_get_name() instead.
|
|
|
|
*/
|
2001-01-29 00:06:02 +00:00
|
|
|
#define GST_PAD_NAME(pad) (GST_OBJECT_NAME(pad))
|
2014-04-26 16:02:18 +00:00
|
|
|
/**
|
|
|
|
* GST_PAD_PARENT:
|
|
|
|
* @pad: a #GstPad
|
|
|
|
*
|
|
|
|
* Get the @pad parent.
|
|
|
|
* No locking is performed in this function, use gst_pad_get_parent() instead.
|
|
|
|
*/
|
Bump version number, we're now 0.9.0
Original commit message from CVS:
* configure.ac:
* gst/gst_private.h:
* gst/gstbin.c: (gst_bin_add_func), (gst_bin_add),
(gst_bin_remove_func), (gst_bin_remove),
(gst_bin_get_by_name_recurse_up):
* gst/gstclock.c: (gst_clock_id_ref), (gst_clock_id_unref),
(gst_clock_id_compare_func), (gst_clock_id_wait),
(gst_clock_id_wait_async), (gst_clock_init),
(gst_clock_adjust_unlocked), (gst_clock_get_time):
* gst/gstelement.h:
* gst/gstinfo.c: (_gst_debug_init):
* gst/gstobject.h:
* gst/gstpad.c: (_gst_pad_default_fixate_foreach),
(gst_pad_collectv), (gst_pad_collect_valist), (gst_pad_query):
* gst/gstpad.h:
Bump version number, we're now 0.9.0
Add future debugging category.
Fix NULL _unref() in _get_by_name_recurse_up
Rearrange gstpad.h.
Update some docs.
2005-03-09 11:08:18 +00:00
|
|
|
#define GST_PAD_PARENT(pad) (GST_ELEMENT_CAST(GST_OBJECT_PARENT(pad)))
|
2014-04-26 16:02:18 +00:00
|
|
|
/**
|
|
|
|
* GST_PAD_ELEMENT_PRIVATE:
|
|
|
|
* @pad: a #GstPad
|
|
|
|
*
|
|
|
|
* Get the private data of @pad, which is usually some pad- or stream-specific
|
|
|
|
* structure created by the element and set on the pad when creating it.
|
|
|
|
* No locking is performed in this function.
|
|
|
|
*/
|
2011-05-06 10:09:00 +00:00
|
|
|
#define GST_PAD_ELEMENT_PRIVATE(pad) (GST_PAD_CAST(pad)->element_private)
|
2014-04-26 16:02:18 +00:00
|
|
|
/**
|
|
|
|
* GST_PAD_PAD_TEMPLATE:
|
|
|
|
* @pad: a #GstPad
|
|
|
|
*
|
|
|
|
* Get the @pad #GstPadTemplate. It describes the possible media types
|
|
|
|
* a @pad or an element factory can handle.
|
|
|
|
*/
|
Bump version number, we're now 0.9.0
Original commit message from CVS:
* configure.ac:
* gst/gst_private.h:
* gst/gstbin.c: (gst_bin_add_func), (gst_bin_add),
(gst_bin_remove_func), (gst_bin_remove),
(gst_bin_get_by_name_recurse_up):
* gst/gstclock.c: (gst_clock_id_ref), (gst_clock_id_unref),
(gst_clock_id_compare_func), (gst_clock_id_wait),
(gst_clock_id_wait_async), (gst_clock_init),
(gst_clock_adjust_unlocked), (gst_clock_get_time):
* gst/gstelement.h:
* gst/gstinfo.c: (_gst_debug_init):
* gst/gstobject.h:
* gst/gstpad.c: (_gst_pad_default_fixate_foreach),
(gst_pad_collectv), (gst_pad_collect_valist), (gst_pad_query):
* gst/gstpad.h:
Bump version number, we're now 0.9.0
Add future debugging category.
Fix NULL _unref() in _get_by_name_recurse_up
Rearrange gstpad.h.
Update some docs.
2005-03-09 11:08:18 +00:00
|
|
|
#define GST_PAD_PAD_TEMPLATE(pad) (GST_PAD_CAST(pad)->padtemplate)
|
2014-04-26 16:02:18 +00:00
|
|
|
/**
|
|
|
|
* GST_PAD_DIRECTION:
|
|
|
|
* @pad: a #GstPad
|
|
|
|
*
|
|
|
|
* Get the #GstPadDirection of the given @pad. Accessor macro, use
|
|
|
|
* gst_pad_get_direction() instead.
|
|
|
|
*/
|
gst/gstutils.c: RPAD fixes all around.
Original commit message from CVS:
2005-06-08 Andy Wingo <wingo@pobox.com>
* gst/gstutils.c: RPAD fixes all around.
(gst_element_link_pads): Refcounting fixes.
* tools/gst-inspect.c:
* tools/gst-xmlinspect.c:
* parse/grammar.y:
* gst/base/gsttypefindhelper.c:
* gst/base/gstbasesink.c:
* gst/gstqueue.c: RPAD fixes.
* gst/gstghostpad.h:
* gst/gstghostpad.c: New ghost pad implementation as full proxy
pads. The tricky thing is they provide both source and sink
interfaces, since they proxy the internal pad for the external
pad, and vice versa. Implement with lower-level ProxyPad objects,
with the interior proxy pad as a child of the exterior ghost pad.
Should write a doc on this.
* gst/gstpad.h: s/RPAD/PAD/, s/RealPad/Pad/.
(gst_pad_set_name, gst_pad_set_parent): Macros removed, use
gst_object API.
* gst/gstpad.c: Big changes. No more stub base GstPad, now all
pads are real pads. No ghost pads in this file. Not documenting
the myriad s/RPAD/PAD/ and REALIZE fixes.
(gst_pad_class_init): Add properties for "direction" and
"template". Both are construct-only, so they can't change during
the life of the pad. Fixes properly deriving from GstPad.
(gst_pad_custom_new, gst_pad_custom_new_from_template): Gone. For
derived objects, just set properties when creating the objects via
g_object_new.
(gst_pad_get_parent): Implement as a function, return NULL if the
parent is not an element.
(gst_pad_get_real_parent, gst_pad_add_ghost_pad)
(gst_pad_remove_ghost_pad, gst_pad_realize): Removed.
* gst/gstobject.c (gst_object_class_init): Make name a construct
property. Don't set it in the object init.
* gst/gstelement.c (gst_element_add_pad): Don't allow adding pads
with UNKNOWN direction.
(gst_element_add_ghost_pad): Remove non-orthogonal API. Replace
with gst_element_add_pad (e, gst_ghost_pad_new (name, pad)).
(gst_element_remove_pad): Remove ghost-pad special cases.
(gst_element_pads_activate): Remove rpad cruft.
* gst/gstbin.c (gst_bin_change_state): Use gst_pad_get_parent to
catch the pad's-parent-not-an-element case.
* gst/gst.h: Include gstghostpad.h.
* gst/gst.c (init_post): No more real, ghost pads.
* gst/Makefile.am: Add gstghostpad.[ch].
* check/Makefile.am:
* check/gst/gstbin.c:
* check/gst/gstghostpad.c (test_ghost_pads): Check that linking
into a bin creates ghost pads, and that the refcounts are right.
Partly moved from gstbin.c.
2005-06-08 22:16:27 +00:00
|
|
|
#define GST_PAD_DIRECTION(pad) (GST_PAD_CAST(pad)->direction)
|
2014-04-26 16:02:18 +00:00
|
|
|
/**
|
|
|
|
* GST_PAD_TASK:
|
|
|
|
* @pad: a #GstPad
|
|
|
|
*
|
|
|
|
* Get the #GstTask of @pad. Accessor macro used by GStreamer. Use the
|
|
|
|
* gst_pad_start_task(), gst_pad_stop_task() and gst_pad_pause_task()
|
|
|
|
* functions instead.
|
|
|
|
*/
|
gst/gstutils.c: RPAD fixes all around.
Original commit message from CVS:
2005-06-08 Andy Wingo <wingo@pobox.com>
* gst/gstutils.c: RPAD fixes all around.
(gst_element_link_pads): Refcounting fixes.
* tools/gst-inspect.c:
* tools/gst-xmlinspect.c:
* parse/grammar.y:
* gst/base/gsttypefindhelper.c:
* gst/base/gstbasesink.c:
* gst/gstqueue.c: RPAD fixes.
* gst/gstghostpad.h:
* gst/gstghostpad.c: New ghost pad implementation as full proxy
pads. The tricky thing is they provide both source and sink
interfaces, since they proxy the internal pad for the external
pad, and vice versa. Implement with lower-level ProxyPad objects,
with the interior proxy pad as a child of the exterior ghost pad.
Should write a doc on this.
* gst/gstpad.h: s/RPAD/PAD/, s/RealPad/Pad/.
(gst_pad_set_name, gst_pad_set_parent): Macros removed, use
gst_object API.
* gst/gstpad.c: Big changes. No more stub base GstPad, now all
pads are real pads. No ghost pads in this file. Not documenting
the myriad s/RPAD/PAD/ and REALIZE fixes.
(gst_pad_class_init): Add properties for "direction" and
"template". Both are construct-only, so they can't change during
the life of the pad. Fixes properly deriving from GstPad.
(gst_pad_custom_new, gst_pad_custom_new_from_template): Gone. For
derived objects, just set properties when creating the objects via
g_object_new.
(gst_pad_get_parent): Implement as a function, return NULL if the
parent is not an element.
(gst_pad_get_real_parent, gst_pad_add_ghost_pad)
(gst_pad_remove_ghost_pad, gst_pad_realize): Removed.
* gst/gstobject.c (gst_object_class_init): Make name a construct
property. Don't set it in the object init.
* gst/gstelement.c (gst_element_add_pad): Don't allow adding pads
with UNKNOWN direction.
(gst_element_add_ghost_pad): Remove non-orthogonal API. Replace
with gst_element_add_pad (e, gst_ghost_pad_new (name, pad)).
(gst_element_remove_pad): Remove ghost-pad special cases.
(gst_element_pads_activate): Remove rpad cruft.
* gst/gstbin.c (gst_bin_change_state): Use gst_pad_get_parent to
catch the pad's-parent-not-an-element case.
* gst/gst.h: Include gstghostpad.h.
* gst/gst.c (init_post): No more real, ghost pads.
* gst/Makefile.am: Add gstghostpad.[ch].
* check/Makefile.am:
* check/gst/gstbin.c:
* check/gst/gstghostpad.c (test_ghost_pads): Check that linking
into a bin creates ghost pads, and that the refcounts are right.
Partly moved from gstbin.c.
2005-06-08 22:16:27 +00:00
|
|
|
#define GST_PAD_TASK(pad) (GST_PAD_CAST(pad)->task)
|
2014-04-26 16:02:18 +00:00
|
|
|
/**
|
|
|
|
* GST_PAD_MODE:
|
|
|
|
* @pad: a #GstPad
|
|
|
|
*
|
|
|
|
* Get the #GstPadMode of pad, which will be GST_PAD_MODE_NONE if the pad
|
|
|
|
* has not been activated yet, and otherwise either GST_PAD_MODE_PUSH or
|
|
|
|
* GST_PAD_MODE_PULL depending on which mode the pad was activated in.
|
|
|
|
*/
|
2011-11-18 11:35:46 +00:00
|
|
|
#define GST_PAD_MODE(pad) (GST_PAD_CAST(pad)->mode)
|
2014-04-26 16:02:18 +00:00
|
|
|
/**
|
|
|
|
* GST_PAD_ACTIVATEFUNC:
|
|
|
|
* @pad: a #GstPad
|
|
|
|
*
|
|
|
|
* Get the #GstPadActivateFunction from @pad.
|
|
|
|
*/
|
gst/gstutils.c: RPAD fixes all around.
Original commit message from CVS:
2005-06-08 Andy Wingo <wingo@pobox.com>
* gst/gstutils.c: RPAD fixes all around.
(gst_element_link_pads): Refcounting fixes.
* tools/gst-inspect.c:
* tools/gst-xmlinspect.c:
* parse/grammar.y:
* gst/base/gsttypefindhelper.c:
* gst/base/gstbasesink.c:
* gst/gstqueue.c: RPAD fixes.
* gst/gstghostpad.h:
* gst/gstghostpad.c: New ghost pad implementation as full proxy
pads. The tricky thing is they provide both source and sink
interfaces, since they proxy the internal pad for the external
pad, and vice versa. Implement with lower-level ProxyPad objects,
with the interior proxy pad as a child of the exterior ghost pad.
Should write a doc on this.
* gst/gstpad.h: s/RPAD/PAD/, s/RealPad/Pad/.
(gst_pad_set_name, gst_pad_set_parent): Macros removed, use
gst_object API.
* gst/gstpad.c: Big changes. No more stub base GstPad, now all
pads are real pads. No ghost pads in this file. Not documenting
the myriad s/RPAD/PAD/ and REALIZE fixes.
(gst_pad_class_init): Add properties for "direction" and
"template". Both are construct-only, so they can't change during
the life of the pad. Fixes properly deriving from GstPad.
(gst_pad_custom_new, gst_pad_custom_new_from_template): Gone. For
derived objects, just set properties when creating the objects via
g_object_new.
(gst_pad_get_parent): Implement as a function, return NULL if the
parent is not an element.
(gst_pad_get_real_parent, gst_pad_add_ghost_pad)
(gst_pad_remove_ghost_pad, gst_pad_realize): Removed.
* gst/gstobject.c (gst_object_class_init): Make name a construct
property. Don't set it in the object init.
* gst/gstelement.c (gst_element_add_pad): Don't allow adding pads
with UNKNOWN direction.
(gst_element_add_ghost_pad): Remove non-orthogonal API. Replace
with gst_element_add_pad (e, gst_ghost_pad_new (name, pad)).
(gst_element_remove_pad): Remove ghost-pad special cases.
(gst_element_pads_activate): Remove rpad cruft.
* gst/gstbin.c (gst_bin_change_state): Use gst_pad_get_parent to
catch the pad's-parent-not-an-element case.
* gst/gst.h: Include gstghostpad.h.
* gst/gst.c (init_post): No more real, ghost pads.
* gst/Makefile.am: Add gstghostpad.[ch].
* check/Makefile.am:
* check/gst/gstbin.c:
* check/gst/gstghostpad.c (test_ghost_pads): Check that linking
into a bin creates ghost pads, and that the refcounts are right.
Partly moved from gstbin.c.
2005-06-08 22:16:27 +00:00
|
|
|
#define GST_PAD_ACTIVATEFUNC(pad) (GST_PAD_CAST(pad)->activatefunc)
|
2014-04-26 16:02:18 +00:00
|
|
|
/**
|
|
|
|
* GST_PAD_ACTIVATEMODEFUNC:
|
|
|
|
* @pad: a #GstPad
|
|
|
|
*
|
|
|
|
* Get the #GstPadActivateModeFunction from the given @pad.
|
|
|
|
*/
|
2011-11-21 12:29:05 +00:00
|
|
|
#define GST_PAD_ACTIVATEMODEFUNC(pad) (GST_PAD_CAST(pad)->activatemodefunc)
|
2014-04-26 16:02:18 +00:00
|
|
|
/**
|
|
|
|
* GST_PAD_CHAINFUNC:
|
|
|
|
* @pad: a #GstPad
|
|
|
|
*
|
|
|
|
* Get the #GstPadChainFunction from the given @pad.
|
|
|
|
*/
|
gst/gstutils.c: RPAD fixes all around.
Original commit message from CVS:
2005-06-08 Andy Wingo <wingo@pobox.com>
* gst/gstutils.c: RPAD fixes all around.
(gst_element_link_pads): Refcounting fixes.
* tools/gst-inspect.c:
* tools/gst-xmlinspect.c:
* parse/grammar.y:
* gst/base/gsttypefindhelper.c:
* gst/base/gstbasesink.c:
* gst/gstqueue.c: RPAD fixes.
* gst/gstghostpad.h:
* gst/gstghostpad.c: New ghost pad implementation as full proxy
pads. The tricky thing is they provide both source and sink
interfaces, since they proxy the internal pad for the external
pad, and vice versa. Implement with lower-level ProxyPad objects,
with the interior proxy pad as a child of the exterior ghost pad.
Should write a doc on this.
* gst/gstpad.h: s/RPAD/PAD/, s/RealPad/Pad/.
(gst_pad_set_name, gst_pad_set_parent): Macros removed, use
gst_object API.
* gst/gstpad.c: Big changes. No more stub base GstPad, now all
pads are real pads. No ghost pads in this file. Not documenting
the myriad s/RPAD/PAD/ and REALIZE fixes.
(gst_pad_class_init): Add properties for "direction" and
"template". Both are construct-only, so they can't change during
the life of the pad. Fixes properly deriving from GstPad.
(gst_pad_custom_new, gst_pad_custom_new_from_template): Gone. For
derived objects, just set properties when creating the objects via
g_object_new.
(gst_pad_get_parent): Implement as a function, return NULL if the
parent is not an element.
(gst_pad_get_real_parent, gst_pad_add_ghost_pad)
(gst_pad_remove_ghost_pad, gst_pad_realize): Removed.
* gst/gstobject.c (gst_object_class_init): Make name a construct
property. Don't set it in the object init.
* gst/gstelement.c (gst_element_add_pad): Don't allow adding pads
with UNKNOWN direction.
(gst_element_add_ghost_pad): Remove non-orthogonal API. Replace
with gst_element_add_pad (e, gst_ghost_pad_new (name, pad)).
(gst_element_remove_pad): Remove ghost-pad special cases.
(gst_element_pads_activate): Remove rpad cruft.
* gst/gstbin.c (gst_bin_change_state): Use gst_pad_get_parent to
catch the pad's-parent-not-an-element case.
* gst/gst.h: Include gstghostpad.h.
* gst/gst.c (init_post): No more real, ghost pads.
* gst/Makefile.am: Add gstghostpad.[ch].
* check/Makefile.am:
* check/gst/gstbin.c:
* check/gst/gstghostpad.c (test_ghost_pads): Check that linking
into a bin creates ghost pads, and that the refcounts are right.
Partly moved from gstbin.c.
2005-06-08 22:16:27 +00:00
|
|
|
#define GST_PAD_CHAINFUNC(pad) (GST_PAD_CAST(pad)->chainfunc)
|
2014-04-26 16:02:18 +00:00
|
|
|
/**
|
|
|
|
* GST_PAD_CHAINLISTFUNC:
|
|
|
|
* @pad: a #GstPad
|
|
|
|
*
|
|
|
|
* Get the #GstPadChainListFunction from the given @pad.
|
|
|
|
*/
|
2010-12-07 15:52:47 +00:00
|
|
|
#define GST_PAD_CHAINLISTFUNC(pad) (GST_PAD_CAST(pad)->chainlistfunc)
|
2014-04-26 16:02:18 +00:00
|
|
|
/**
|
|
|
|
* GST_PAD_GETRANGEFUNC:
|
|
|
|
* @pad: a #GstPad
|
|
|
|
*
|
|
|
|
* Get the #GstPadGetRangeFunction from the given @pad.
|
|
|
|
*/
|
gst/gstutils.c: RPAD fixes all around.
Original commit message from CVS:
2005-06-08 Andy Wingo <wingo@pobox.com>
* gst/gstutils.c: RPAD fixes all around.
(gst_element_link_pads): Refcounting fixes.
* tools/gst-inspect.c:
* tools/gst-xmlinspect.c:
* parse/grammar.y:
* gst/base/gsttypefindhelper.c:
* gst/base/gstbasesink.c:
* gst/gstqueue.c: RPAD fixes.
* gst/gstghostpad.h:
* gst/gstghostpad.c: New ghost pad implementation as full proxy
pads. The tricky thing is they provide both source and sink
interfaces, since they proxy the internal pad for the external
pad, and vice versa. Implement with lower-level ProxyPad objects,
with the interior proxy pad as a child of the exterior ghost pad.
Should write a doc on this.
* gst/gstpad.h: s/RPAD/PAD/, s/RealPad/Pad/.
(gst_pad_set_name, gst_pad_set_parent): Macros removed, use
gst_object API.
* gst/gstpad.c: Big changes. No more stub base GstPad, now all
pads are real pads. No ghost pads in this file. Not documenting
the myriad s/RPAD/PAD/ and REALIZE fixes.
(gst_pad_class_init): Add properties for "direction" and
"template". Both are construct-only, so they can't change during
the life of the pad. Fixes properly deriving from GstPad.
(gst_pad_custom_new, gst_pad_custom_new_from_template): Gone. For
derived objects, just set properties when creating the objects via
g_object_new.
(gst_pad_get_parent): Implement as a function, return NULL if the
parent is not an element.
(gst_pad_get_real_parent, gst_pad_add_ghost_pad)
(gst_pad_remove_ghost_pad, gst_pad_realize): Removed.
* gst/gstobject.c (gst_object_class_init): Make name a construct
property. Don't set it in the object init.
* gst/gstelement.c (gst_element_add_pad): Don't allow adding pads
with UNKNOWN direction.
(gst_element_add_ghost_pad): Remove non-orthogonal API. Replace
with gst_element_add_pad (e, gst_ghost_pad_new (name, pad)).
(gst_element_remove_pad): Remove ghost-pad special cases.
(gst_element_pads_activate): Remove rpad cruft.
* gst/gstbin.c (gst_bin_change_state): Use gst_pad_get_parent to
catch the pad's-parent-not-an-element case.
* gst/gst.h: Include gstghostpad.h.
* gst/gst.c (init_post): No more real, ghost pads.
* gst/Makefile.am: Add gstghostpad.[ch].
* check/Makefile.am:
* check/gst/gstbin.c:
* check/gst/gstghostpad.c (test_ghost_pads): Check that linking
into a bin creates ghost pads, and that the refcounts are right.
Partly moved from gstbin.c.
2005-06-08 22:16:27 +00:00
|
|
|
#define GST_PAD_GETRANGEFUNC(pad) (GST_PAD_CAST(pad)->getrangefunc)
|
2014-04-26 16:02:18 +00:00
|
|
|
/**
|
|
|
|
* GST_PAD_EVENTFUNC:
|
|
|
|
* @pad: a #GstPad
|
|
|
|
*
|
|
|
|
* Get the #GstPadEventFunction from the given @pad, which
|
|
|
|
* is the function that handles events on the pad. You can
|
|
|
|
* use this to set your own event handling function on a pad
|
|
|
|
* after you create it. If your element derives from a base
|
|
|
|
* class, use the base class's virtual functions instead.
|
|
|
|
*/
|
gst/gstutils.c: RPAD fixes all around.
Original commit message from CVS:
2005-06-08 Andy Wingo <wingo@pobox.com>
* gst/gstutils.c: RPAD fixes all around.
(gst_element_link_pads): Refcounting fixes.
* tools/gst-inspect.c:
* tools/gst-xmlinspect.c:
* parse/grammar.y:
* gst/base/gsttypefindhelper.c:
* gst/base/gstbasesink.c:
* gst/gstqueue.c: RPAD fixes.
* gst/gstghostpad.h:
* gst/gstghostpad.c: New ghost pad implementation as full proxy
pads. The tricky thing is they provide both source and sink
interfaces, since they proxy the internal pad for the external
pad, and vice versa. Implement with lower-level ProxyPad objects,
with the interior proxy pad as a child of the exterior ghost pad.
Should write a doc on this.
* gst/gstpad.h: s/RPAD/PAD/, s/RealPad/Pad/.
(gst_pad_set_name, gst_pad_set_parent): Macros removed, use
gst_object API.
* gst/gstpad.c: Big changes. No more stub base GstPad, now all
pads are real pads. No ghost pads in this file. Not documenting
the myriad s/RPAD/PAD/ and REALIZE fixes.
(gst_pad_class_init): Add properties for "direction" and
"template". Both are construct-only, so they can't change during
the life of the pad. Fixes properly deriving from GstPad.
(gst_pad_custom_new, gst_pad_custom_new_from_template): Gone. For
derived objects, just set properties when creating the objects via
g_object_new.
(gst_pad_get_parent): Implement as a function, return NULL if the
parent is not an element.
(gst_pad_get_real_parent, gst_pad_add_ghost_pad)
(gst_pad_remove_ghost_pad, gst_pad_realize): Removed.
* gst/gstobject.c (gst_object_class_init): Make name a construct
property. Don't set it in the object init.
* gst/gstelement.c (gst_element_add_pad): Don't allow adding pads
with UNKNOWN direction.
(gst_element_add_ghost_pad): Remove non-orthogonal API. Replace
with gst_element_add_pad (e, gst_ghost_pad_new (name, pad)).
(gst_element_remove_pad): Remove ghost-pad special cases.
(gst_element_pads_activate): Remove rpad cruft.
* gst/gstbin.c (gst_bin_change_state): Use gst_pad_get_parent to
catch the pad's-parent-not-an-element case.
* gst/gst.h: Include gstghostpad.h.
* gst/gst.c (init_post): No more real, ghost pads.
* gst/Makefile.am: Add gstghostpad.[ch].
* check/Makefile.am:
* check/gst/gstbin.c:
* check/gst/gstghostpad.c (test_ghost_pads): Check that linking
into a bin creates ghost pads, and that the refcounts are right.
Partly moved from gstbin.c.
2005-06-08 22:16:27 +00:00
|
|
|
#define GST_PAD_EVENTFUNC(pad) (GST_PAD_CAST(pad)->eventfunc)
|
2015-11-12 16:15:37 +00:00
|
|
|
/**
|
|
|
|
* GST_PAD_EVENTFULLFUNC:
|
|
|
|
* @pad: a #GstPad
|
|
|
|
*
|
|
|
|
* Get the #GstPadEventFullFunction from the given @pad, which
|
|
|
|
* is the function that handles events on the pad. You can
|
|
|
|
* use this to set your own event handling function on a pad
|
|
|
|
* after you create it. If your element derives from a base
|
|
|
|
* class, use the base class's virtual functions instead.
|
2015-12-31 19:27:12 +00:00
|
|
|
*
|
|
|
|
* Since: 1.8
|
2015-11-12 16:15:37 +00:00
|
|
|
*/
|
|
|
|
#define GST_PAD_EVENTFULLFUNC(pad) (GST_PAD_CAST(pad)->ABI.abi.eventfullfunc)
|
2014-04-26 16:02:18 +00:00
|
|
|
/**
|
|
|
|
* GST_PAD_QUERYFUNC:
|
|
|
|
* @pad: a #GstPad
|
|
|
|
*
|
|
|
|
* Get the #GstPadQueryFunction from @pad, which is the function
|
|
|
|
* that handles queries on the pad. You can use this to set your
|
|
|
|
* own query handling function on a pad after you create it. If your
|
|
|
|
* element derives from a base class, use the base class's virtual
|
|
|
|
* functions instead.
|
|
|
|
*/
|
gst/gstutils.c: RPAD fixes all around.
Original commit message from CVS:
2005-06-08 Andy Wingo <wingo@pobox.com>
* gst/gstutils.c: RPAD fixes all around.
(gst_element_link_pads): Refcounting fixes.
* tools/gst-inspect.c:
* tools/gst-xmlinspect.c:
* parse/grammar.y:
* gst/base/gsttypefindhelper.c:
* gst/base/gstbasesink.c:
* gst/gstqueue.c: RPAD fixes.
* gst/gstghostpad.h:
* gst/gstghostpad.c: New ghost pad implementation as full proxy
pads. The tricky thing is they provide both source and sink
interfaces, since they proxy the internal pad for the external
pad, and vice versa. Implement with lower-level ProxyPad objects,
with the interior proxy pad as a child of the exterior ghost pad.
Should write a doc on this.
* gst/gstpad.h: s/RPAD/PAD/, s/RealPad/Pad/.
(gst_pad_set_name, gst_pad_set_parent): Macros removed, use
gst_object API.
* gst/gstpad.c: Big changes. No more stub base GstPad, now all
pads are real pads. No ghost pads in this file. Not documenting
the myriad s/RPAD/PAD/ and REALIZE fixes.
(gst_pad_class_init): Add properties for "direction" and
"template". Both are construct-only, so they can't change during
the life of the pad. Fixes properly deriving from GstPad.
(gst_pad_custom_new, gst_pad_custom_new_from_template): Gone. For
derived objects, just set properties when creating the objects via
g_object_new.
(gst_pad_get_parent): Implement as a function, return NULL if the
parent is not an element.
(gst_pad_get_real_parent, gst_pad_add_ghost_pad)
(gst_pad_remove_ghost_pad, gst_pad_realize): Removed.
* gst/gstobject.c (gst_object_class_init): Make name a construct
property. Don't set it in the object init.
* gst/gstelement.c (gst_element_add_pad): Don't allow adding pads
with UNKNOWN direction.
(gst_element_add_ghost_pad): Remove non-orthogonal API. Replace
with gst_element_add_pad (e, gst_ghost_pad_new (name, pad)).
(gst_element_remove_pad): Remove ghost-pad special cases.
(gst_element_pads_activate): Remove rpad cruft.
* gst/gstbin.c (gst_bin_change_state): Use gst_pad_get_parent to
catch the pad's-parent-not-an-element case.
* gst/gst.h: Include gstghostpad.h.
* gst/gst.c (init_post): No more real, ghost pads.
* gst/Makefile.am: Add gstghostpad.[ch].
* check/Makefile.am:
* check/gst/gstbin.c:
* check/gst/gstghostpad.c (test_ghost_pads): Check that linking
into a bin creates ghost pads, and that the refcounts are right.
Partly moved from gstbin.c.
2005-06-08 22:16:27 +00:00
|
|
|
#define GST_PAD_QUERYFUNC(pad) (GST_PAD_CAST(pad)->queryfunc)
|
2014-04-26 16:02:18 +00:00
|
|
|
/**
|
|
|
|
* GST_PAD_ITERINTLINKFUNC:
|
|
|
|
* @pad: a #GstPad
|
|
|
|
*
|
|
|
|
* Get the #GstPadIterIntLinkFunction from the given @pad.
|
|
|
|
*/
|
2008-09-01 10:42:04 +00:00
|
|
|
#define GST_PAD_ITERINTLINKFUNC(pad) (GST_PAD_CAST(pad)->iterintlinkfunc)
|
2014-04-26 16:02:18 +00:00
|
|
|
/**
|
|
|
|
* GST_PAD_PEER:
|
|
|
|
* @pad: a #GstPad
|
|
|
|
*
|
|
|
|
* Return the pad's peer member. This member is a pointer to the linked @pad.
|
|
|
|
* No locking is performed in this function, use gst_pad_get_peer() instead.
|
|
|
|
*/
|
gst/gstutils.c: RPAD fixes all around.
Original commit message from CVS:
2005-06-08 Andy Wingo <wingo@pobox.com>
* gst/gstutils.c: RPAD fixes all around.
(gst_element_link_pads): Refcounting fixes.
* tools/gst-inspect.c:
* tools/gst-xmlinspect.c:
* parse/grammar.y:
* gst/base/gsttypefindhelper.c:
* gst/base/gstbasesink.c:
* gst/gstqueue.c: RPAD fixes.
* gst/gstghostpad.h:
* gst/gstghostpad.c: New ghost pad implementation as full proxy
pads. The tricky thing is they provide both source and sink
interfaces, since they proxy the internal pad for the external
pad, and vice versa. Implement with lower-level ProxyPad objects,
with the interior proxy pad as a child of the exterior ghost pad.
Should write a doc on this.
* gst/gstpad.h: s/RPAD/PAD/, s/RealPad/Pad/.
(gst_pad_set_name, gst_pad_set_parent): Macros removed, use
gst_object API.
* gst/gstpad.c: Big changes. No more stub base GstPad, now all
pads are real pads. No ghost pads in this file. Not documenting
the myriad s/RPAD/PAD/ and REALIZE fixes.
(gst_pad_class_init): Add properties for "direction" and
"template". Both are construct-only, so they can't change during
the life of the pad. Fixes properly deriving from GstPad.
(gst_pad_custom_new, gst_pad_custom_new_from_template): Gone. For
derived objects, just set properties when creating the objects via
g_object_new.
(gst_pad_get_parent): Implement as a function, return NULL if the
parent is not an element.
(gst_pad_get_real_parent, gst_pad_add_ghost_pad)
(gst_pad_remove_ghost_pad, gst_pad_realize): Removed.
* gst/gstobject.c (gst_object_class_init): Make name a construct
property. Don't set it in the object init.
* gst/gstelement.c (gst_element_add_pad): Don't allow adding pads
with UNKNOWN direction.
(gst_element_add_ghost_pad): Remove non-orthogonal API. Replace
with gst_element_add_pad (e, gst_ghost_pad_new (name, pad)).
(gst_element_remove_pad): Remove ghost-pad special cases.
(gst_element_pads_activate): Remove rpad cruft.
* gst/gstbin.c (gst_bin_change_state): Use gst_pad_get_parent to
catch the pad's-parent-not-an-element case.
* gst/gst.h: Include gstghostpad.h.
* gst/gst.c (init_post): No more real, ghost pads.
* gst/Makefile.am: Add gstghostpad.[ch].
* check/Makefile.am:
* check/gst/gstbin.c:
* check/gst/gstghostpad.c (test_ghost_pads): Check that linking
into a bin creates ghost pads, and that the refcounts are right.
Partly moved from gstbin.c.
2005-06-08 22:16:27 +00:00
|
|
|
#define GST_PAD_PEER(pad) (GST_PAD_CAST(pad)->peer)
|
2014-04-26 16:02:18 +00:00
|
|
|
/**
|
|
|
|
* GST_PAD_LINKFUNC:
|
|
|
|
* @pad: a #GstPad
|
|
|
|
*
|
|
|
|
* Get the #GstPadLinkFunction for the given @pad.
|
|
|
|
*/
|
gst/gstutils.c: RPAD fixes all around.
Original commit message from CVS:
2005-06-08 Andy Wingo <wingo@pobox.com>
* gst/gstutils.c: RPAD fixes all around.
(gst_element_link_pads): Refcounting fixes.
* tools/gst-inspect.c:
* tools/gst-xmlinspect.c:
* parse/grammar.y:
* gst/base/gsttypefindhelper.c:
* gst/base/gstbasesink.c:
* gst/gstqueue.c: RPAD fixes.
* gst/gstghostpad.h:
* gst/gstghostpad.c: New ghost pad implementation as full proxy
pads. The tricky thing is they provide both source and sink
interfaces, since they proxy the internal pad for the external
pad, and vice versa. Implement with lower-level ProxyPad objects,
with the interior proxy pad as a child of the exterior ghost pad.
Should write a doc on this.
* gst/gstpad.h: s/RPAD/PAD/, s/RealPad/Pad/.
(gst_pad_set_name, gst_pad_set_parent): Macros removed, use
gst_object API.
* gst/gstpad.c: Big changes. No more stub base GstPad, now all
pads are real pads. No ghost pads in this file. Not documenting
the myriad s/RPAD/PAD/ and REALIZE fixes.
(gst_pad_class_init): Add properties for "direction" and
"template". Both are construct-only, so they can't change during
the life of the pad. Fixes properly deriving from GstPad.
(gst_pad_custom_new, gst_pad_custom_new_from_template): Gone. For
derived objects, just set properties when creating the objects via
g_object_new.
(gst_pad_get_parent): Implement as a function, return NULL if the
parent is not an element.
(gst_pad_get_real_parent, gst_pad_add_ghost_pad)
(gst_pad_remove_ghost_pad, gst_pad_realize): Removed.
* gst/gstobject.c (gst_object_class_init): Make name a construct
property. Don't set it in the object init.
* gst/gstelement.c (gst_element_add_pad): Don't allow adding pads
with UNKNOWN direction.
(gst_element_add_ghost_pad): Remove non-orthogonal API. Replace
with gst_element_add_pad (e, gst_ghost_pad_new (name, pad)).
(gst_element_remove_pad): Remove ghost-pad special cases.
(gst_element_pads_activate): Remove rpad cruft.
* gst/gstbin.c (gst_bin_change_state): Use gst_pad_get_parent to
catch the pad's-parent-not-an-element case.
* gst/gst.h: Include gstghostpad.h.
* gst/gst.c (init_post): No more real, ghost pads.
* gst/Makefile.am: Add gstghostpad.[ch].
* check/Makefile.am:
* check/gst/gstbin.c:
* check/gst/gstghostpad.c (test_ghost_pads): Check that linking
into a bin creates ghost pads, and that the refcounts are right.
Partly moved from gstbin.c.
2005-06-08 22:16:27 +00:00
|
|
|
#define GST_PAD_LINKFUNC(pad) (GST_PAD_CAST(pad)->linkfunc)
|
2014-04-26 16:02:18 +00:00
|
|
|
/**
|
|
|
|
* GST_PAD_UNLINKFUNC:
|
|
|
|
* @pad: a #GstPad
|
|
|
|
*
|
|
|
|
* Get the #GstPadUnlinkFunction from the given @pad.
|
|
|
|
*/
|
gst/gstutils.c: RPAD fixes all around.
Original commit message from CVS:
2005-06-08 Andy Wingo <wingo@pobox.com>
* gst/gstutils.c: RPAD fixes all around.
(gst_element_link_pads): Refcounting fixes.
* tools/gst-inspect.c:
* tools/gst-xmlinspect.c:
* parse/grammar.y:
* gst/base/gsttypefindhelper.c:
* gst/base/gstbasesink.c:
* gst/gstqueue.c: RPAD fixes.
* gst/gstghostpad.h:
* gst/gstghostpad.c: New ghost pad implementation as full proxy
pads. The tricky thing is they provide both source and sink
interfaces, since they proxy the internal pad for the external
pad, and vice versa. Implement with lower-level ProxyPad objects,
with the interior proxy pad as a child of the exterior ghost pad.
Should write a doc on this.
* gst/gstpad.h: s/RPAD/PAD/, s/RealPad/Pad/.
(gst_pad_set_name, gst_pad_set_parent): Macros removed, use
gst_object API.
* gst/gstpad.c: Big changes. No more stub base GstPad, now all
pads are real pads. No ghost pads in this file. Not documenting
the myriad s/RPAD/PAD/ and REALIZE fixes.
(gst_pad_class_init): Add properties for "direction" and
"template". Both are construct-only, so they can't change during
the life of the pad. Fixes properly deriving from GstPad.
(gst_pad_custom_new, gst_pad_custom_new_from_template): Gone. For
derived objects, just set properties when creating the objects via
g_object_new.
(gst_pad_get_parent): Implement as a function, return NULL if the
parent is not an element.
(gst_pad_get_real_parent, gst_pad_add_ghost_pad)
(gst_pad_remove_ghost_pad, gst_pad_realize): Removed.
* gst/gstobject.c (gst_object_class_init): Make name a construct
property. Don't set it in the object init.
* gst/gstelement.c (gst_element_add_pad): Don't allow adding pads
with UNKNOWN direction.
(gst_element_add_ghost_pad): Remove non-orthogonal API. Replace
with gst_element_add_pad (e, gst_ghost_pad_new (name, pad)).
(gst_element_remove_pad): Remove ghost-pad special cases.
(gst_element_pads_activate): Remove rpad cruft.
* gst/gstbin.c (gst_bin_change_state): Use gst_pad_get_parent to
catch the pad's-parent-not-an-element case.
* gst/gst.h: Include gstghostpad.h.
* gst/gst.c (init_post): No more real, ghost pads.
* gst/Makefile.am: Add gstghostpad.[ch].
* check/Makefile.am:
* check/gst/gstbin.c:
* check/gst/gstghostpad.c (test_ghost_pads): Check that linking
into a bin creates ghost pads, and that the refcounts are right.
Partly moved from gstbin.c.
2005-06-08 22:16:27 +00:00
|
|
|
#define GST_PAD_UNLINKFUNC(pad) (GST_PAD_CAST(pad)->unlinkfunc)
|
2014-04-26 16:02:18 +00:00
|
|
|
/**
|
|
|
|
* GST_PAD_IS_SRC:
|
|
|
|
* @pad: a #GstPad
|
|
|
|
*
|
2014-05-29 21:54:34 +00:00
|
|
|
* Returns: %TRUE if the pad is a source pad (i.e. produces data).
|
2014-04-26 16:02:18 +00:00
|
|
|
*/
|
2011-05-06 15:59:33 +00:00
|
|
|
#define GST_PAD_IS_SRC(pad) (GST_PAD_DIRECTION(pad) == GST_PAD_SRC)
|
2014-04-26 16:02:18 +00:00
|
|
|
/**
|
|
|
|
* GST_PAD_IS_SINK:
|
|
|
|
* @pad: a #GstPad
|
|
|
|
*
|
2014-05-29 21:54:34 +00:00
|
|
|
* Returns: %TRUE if the pad is a sink pad (i.e. consumes data).
|
2014-04-26 16:02:18 +00:00
|
|
|
*/
|
2011-05-06 15:59:33 +00:00
|
|
|
#define GST_PAD_IS_SINK(pad) (GST_PAD_DIRECTION(pad) == GST_PAD_SINK)
|
2014-04-26 16:02:18 +00:00
|
|
|
/**
|
|
|
|
* GST_PAD_IS_LINKED:
|
|
|
|
* @pad: a #GstPad
|
|
|
|
*
|
2014-05-29 21:54:34 +00:00
|
|
|
* Returns: %TRUE if the pad is linked to another pad. Use gst_pad_is_linked()
|
2014-04-26 16:02:18 +00:00
|
|
|
* instead.
|
|
|
|
*/
|
gst/gstutils.c: RPAD fixes all around.
Original commit message from CVS:
2005-06-08 Andy Wingo <wingo@pobox.com>
* gst/gstutils.c: RPAD fixes all around.
(gst_element_link_pads): Refcounting fixes.
* tools/gst-inspect.c:
* tools/gst-xmlinspect.c:
* parse/grammar.y:
* gst/base/gsttypefindhelper.c:
* gst/base/gstbasesink.c:
* gst/gstqueue.c: RPAD fixes.
* gst/gstghostpad.h:
* gst/gstghostpad.c: New ghost pad implementation as full proxy
pads. The tricky thing is they provide both source and sink
interfaces, since they proxy the internal pad for the external
pad, and vice versa. Implement with lower-level ProxyPad objects,
with the interior proxy pad as a child of the exterior ghost pad.
Should write a doc on this.
* gst/gstpad.h: s/RPAD/PAD/, s/RealPad/Pad/.
(gst_pad_set_name, gst_pad_set_parent): Macros removed, use
gst_object API.
* gst/gstpad.c: Big changes. No more stub base GstPad, now all
pads are real pads. No ghost pads in this file. Not documenting
the myriad s/RPAD/PAD/ and REALIZE fixes.
(gst_pad_class_init): Add properties for "direction" and
"template". Both are construct-only, so they can't change during
the life of the pad. Fixes properly deriving from GstPad.
(gst_pad_custom_new, gst_pad_custom_new_from_template): Gone. For
derived objects, just set properties when creating the objects via
g_object_new.
(gst_pad_get_parent): Implement as a function, return NULL if the
parent is not an element.
(gst_pad_get_real_parent, gst_pad_add_ghost_pad)
(gst_pad_remove_ghost_pad, gst_pad_realize): Removed.
* gst/gstobject.c (gst_object_class_init): Make name a construct
property. Don't set it in the object init.
* gst/gstelement.c (gst_element_add_pad): Don't allow adding pads
with UNKNOWN direction.
(gst_element_add_ghost_pad): Remove non-orthogonal API. Replace
with gst_element_add_pad (e, gst_ghost_pad_new (name, pad)).
(gst_element_remove_pad): Remove ghost-pad special cases.
(gst_element_pads_activate): Remove rpad cruft.
* gst/gstbin.c (gst_bin_change_state): Use gst_pad_get_parent to
catch the pad's-parent-not-an-element case.
* gst/gst.h: Include gstghostpad.h.
* gst/gst.c (init_post): No more real, ghost pads.
* gst/Makefile.am: Add gstghostpad.[ch].
* check/Makefile.am:
* check/gst/gstbin.c:
* check/gst/gstghostpad.c (test_ghost_pads): Check that linking
into a bin creates ghost pads, and that the refcounts are right.
Partly moved from gstbin.c.
2005-06-08 22:16:27 +00:00
|
|
|
#define GST_PAD_IS_LINKED(pad) (GST_PAD_PEER(pad) != NULL)
|
2014-04-26 16:02:18 +00:00
|
|
|
/**
|
|
|
|
* GST_PAD_IS_ACTIVE:
|
|
|
|
* @pad: a #GstPad
|
|
|
|
*
|
2014-05-29 21:54:34 +00:00
|
|
|
* Returns: %TRUE if the pad has been activated.
|
2014-04-26 16:02:18 +00:00
|
|
|
*/
|
2011-11-18 11:35:46 +00:00
|
|
|
#define GST_PAD_IS_ACTIVE(pad) (GST_PAD_MODE(pad) != GST_PAD_MODE_NONE)
|
2014-04-26 16:02:18 +00:00
|
|
|
/**
|
|
|
|
* GST_PAD_IS_BLOCKED:
|
|
|
|
* @pad: a #GstPad
|
|
|
|
*
|
|
|
|
* Check if the dataflow on a @pad is blocked. Use gst_pad_is_blocked() instead.
|
|
|
|
*/
|
2011-11-16 11:36:51 +00:00
|
|
|
#define GST_PAD_IS_BLOCKED(pad) (GST_OBJECT_FLAG_IS_SET (pad, GST_PAD_FLAG_BLOCKED))
|
2014-04-26 16:02:18 +00:00
|
|
|
/**
|
|
|
|
* GST_PAD_IS_BLOCKING:
|
|
|
|
* @pad: a #GstPad
|
|
|
|
*
|
|
|
|
* Check if the @pad is currently blocking on a buffer or event. Use
|
|
|
|
* gst_pad_is_blocking() instead.
|
|
|
|
*/
|
2011-11-16 11:36:51 +00:00
|
|
|
#define GST_PAD_IS_BLOCKING(pad) (GST_OBJECT_FLAG_IS_SET (pad, GST_PAD_FLAG_BLOCKING))
|
2014-04-26 16:02:18 +00:00
|
|
|
/**
|
|
|
|
* GST_PAD_IS_FLUSHING:
|
|
|
|
* @pad: a #GstPad
|
|
|
|
*
|
|
|
|
* Check if the given @pad is flushing.
|
|
|
|
*/
|
2011-11-16 11:36:51 +00:00
|
|
|
#define GST_PAD_IS_FLUSHING(pad) (GST_OBJECT_FLAG_IS_SET (pad, GST_PAD_FLAG_FLUSHING))
|
2014-04-26 16:02:18 +00:00
|
|
|
/**
|
|
|
|
* GST_PAD_SET_FLUSHING:
|
|
|
|
* @pad: a #GstPad
|
|
|
|
*
|
|
|
|
* Set the given @pad to flushing state, which means it will not accept any
|
|
|
|
* more events, queries or buffers, and return GST_FLOW_FLUSHING if any buffers
|
|
|
|
* are pushed on it. This usually happens when the pad is shut down or when
|
|
|
|
* a flushing seek happens. This is used inside GStreamer when flush start/stop
|
|
|
|
* events pass through pads, or when an element state is changed and pads are
|
|
|
|
* activated or deactivated.
|
|
|
|
*/
|
2011-11-16 11:36:51 +00:00
|
|
|
#define GST_PAD_SET_FLUSHING(pad) (GST_OBJECT_FLAG_SET (pad, GST_PAD_FLAG_FLUSHING))
|
2014-04-26 16:02:18 +00:00
|
|
|
/**
|
|
|
|
* GST_PAD_UNSET_FLUSHING:
|
|
|
|
* @pad: a #GstPad
|
|
|
|
*
|
|
|
|
* Unset the flushing flag.
|
|
|
|
*/
|
2011-11-16 11:36:51 +00:00
|
|
|
#define GST_PAD_UNSET_FLUSHING(pad) (GST_OBJECT_FLAG_UNSET (pad, GST_PAD_FLAG_FLUSHING))
|
2014-04-26 16:02:18 +00:00
|
|
|
/**
|
|
|
|
* GST_PAD_IS_EOS:
|
|
|
|
* @pad: a #GstPad
|
|
|
|
*
|
|
|
|
* Check if the @pad is in EOS state.
|
|
|
|
*/
|
2012-06-04 09:46:42 +00:00
|
|
|
#define GST_PAD_IS_EOS(pad) (GST_OBJECT_FLAG_IS_SET (pad, GST_PAD_FLAG_EOS))
|
2014-04-26 16:02:18 +00:00
|
|
|
/**
|
|
|
|
* GST_PAD_NEEDS_RECONFIGURE:
|
|
|
|
* @pad: a #GstPad
|
|
|
|
*
|
|
|
|
* Check if the @pad should be reconfigured/renegotiated.
|
|
|
|
* The flag has to be unset manually after reconfiguration happened.
|
|
|
|
* Use gst_pad_needs_reconfigure() or gst_pad_check_reconfigure() instead.
|
|
|
|
*/
|
2011-11-16 11:36:51 +00:00
|
|
|
#define GST_PAD_NEEDS_RECONFIGURE(pad) (GST_OBJECT_FLAG_IS_SET (pad, GST_PAD_FLAG_NEED_RECONFIGURE))
|
2014-04-26 16:02:18 +00:00
|
|
|
/**
|
|
|
|
* GST_PAD_HAS_PENDING_EVENTS:
|
|
|
|
* @pad: a #GstPad
|
|
|
|
*
|
|
|
|
* Check if the given @pad has pending events. This is used internally by
|
|
|
|
* GStreamer.
|
|
|
|
*/
|
2011-11-22 17:32:51 +00:00
|
|
|
#define GST_PAD_HAS_PENDING_EVENTS(pad) (GST_OBJECT_FLAG_IS_SET (pad, GST_PAD_FLAG_PENDING_EVENTS))
|
2014-04-26 16:02:18 +00:00
|
|
|
/**
|
|
|
|
* GST_PAD_IS_FIXED_CAPS:
|
|
|
|
* @pad: a #GstPad
|
|
|
|
*
|
|
|
|
* Check if the given @pad is using fixed caps, which means that
|
|
|
|
* once the caps are set on the @pad, the caps query function will
|
|
|
|
* only return those caps. See gst_pad_use_fixed_caps().
|
|
|
|
*/
|
2011-11-16 11:36:51 +00:00
|
|
|
#define GST_PAD_IS_FIXED_CAPS(pad) (GST_OBJECT_FLAG_IS_SET (pad, GST_PAD_FLAG_FIXED_CAPS))
|
2014-04-26 16:02:18 +00:00
|
|
|
/**
|
|
|
|
* GST_PAD_NEEDS_PARENT:
|
|
|
|
* @pad: a #GstPad
|
|
|
|
*
|
|
|
|
* Check if there is a parent object before calling into the @pad callbacks.
|
|
|
|
* This is used internally by GStreamer.
|
|
|
|
*/
|
2011-11-16 11:36:51 +00:00
|
|
|
#define GST_PAD_NEEDS_PARENT(pad) (GST_OBJECT_FLAG_IS_SET (pad, GST_PAD_FLAG_NEED_PARENT))
|
2014-04-26 16:02:18 +00:00
|
|
|
/**
|
|
|
|
* GST_PAD_IS_PROXY_CAPS:
|
|
|
|
* @pad: a #GstPad
|
|
|
|
*
|
|
|
|
* Check if the given @pad is set to proxy caps. This means that the default
|
|
|
|
* event and query handler will forward all events and queries to the
|
|
|
|
* internally linked @pads instead of discarding them.
|
|
|
|
*/
|
2011-11-16 11:36:51 +00:00
|
|
|
#define GST_PAD_IS_PROXY_CAPS(pad) (GST_OBJECT_FLAG_IS_SET (pad, GST_PAD_FLAG_PROXY_CAPS))
|
2014-04-26 16:02:18 +00:00
|
|
|
/**
|
|
|
|
* GST_PAD_SET_PROXY_CAPS:
|
|
|
|
* @pad: a #GstPad
|
|
|
|
*
|
|
|
|
* Set @pad to proxy caps, so that all caps-related events and queries are
|
|
|
|
* proxied down- or upstream to the other side of the element automatically.
|
|
|
|
* Set this if the element always outputs data in the exact same format as it
|
|
|
|
* receives as input. This is just for convenience to avoid implementing some
|
|
|
|
* standard event and query handling code in an element.
|
|
|
|
*/
|
2011-11-16 11:36:51 +00:00
|
|
|
#define GST_PAD_SET_PROXY_CAPS(pad) (GST_OBJECT_FLAG_SET (pad, GST_PAD_FLAG_PROXY_CAPS))
|
2014-04-26 16:02:18 +00:00
|
|
|
/**
|
|
|
|
* GST_PAD_UNSET_PROXY_CAPS:
|
|
|
|
* @pad: a #GstPad
|
|
|
|
*
|
|
|
|
* Unset proxy caps flag.
|
|
|
|
*/
|
2011-11-16 11:36:51 +00:00
|
|
|
#define GST_PAD_UNSET_PROXY_CAPS(pad) (GST_OBJECT_FLAG_UNSET (pad, GST_PAD_FLAG_PROXY_CAPS))
|
2014-04-26 16:02:18 +00:00
|
|
|
/**
|
|
|
|
* GST_PAD_IS_PROXY_ALLOCATION:
|
|
|
|
* @pad: a #GstPad
|
|
|
|
*
|
|
|
|
* Check if the given @pad is set as proxy allocation which means
|
|
|
|
* that the default query handler will forward allocation queries to the
|
|
|
|
* internally linked @pads instead of discarding them.
|
|
|
|
*/
|
2012-02-02 11:05:37 +00:00
|
|
|
#define GST_PAD_IS_PROXY_ALLOCATION(pad) (GST_OBJECT_FLAG_IS_SET (pad, GST_PAD_FLAG_PROXY_ALLOCATION))
|
2014-04-26 16:02:18 +00:00
|
|
|
/**
|
|
|
|
* GST_PAD_SET_PROXY_ALLOCATION:
|
|
|
|
* @pad: a #GstPad
|
|
|
|
*
|
|
|
|
* Set @pad to proxy allocation queries, which means that the default query
|
|
|
|
* handler will forward allocation queries to the internally linked @pads
|
|
|
|
* instead of discarding them.
|
|
|
|
* Set this if the element always outputs data in the exact same format as it
|
|
|
|
* receives as input. This is just for convenience to avoid implementing some
|
|
|
|
* standard query handling code in an element.
|
|
|
|
*/
|
2012-02-02 11:05:37 +00:00
|
|
|
#define GST_PAD_SET_PROXY_ALLOCATION(pad) (GST_OBJECT_FLAG_SET (pad, GST_PAD_FLAG_PROXY_ALLOCATION))
|
2014-04-26 16:02:18 +00:00
|
|
|
/**
|
|
|
|
* GST_PAD_UNSET_PROXY_ALLOCATION:
|
|
|
|
* @pad: a #GstPad
|
|
|
|
*
|
|
|
|
* Unset proxy allocation flag.
|
|
|
|
*/
|
2012-02-02 11:05:37 +00:00
|
|
|
#define GST_PAD_UNSET_PROXY_ALLOCATION(pad) (GST_OBJECT_FLAG_UNSET (pad, GST_PAD_FLAG_PROXY_ALLOCATION))
|
2014-04-26 16:02:18 +00:00
|
|
|
/**
|
|
|
|
* GST_PAD_IS_PROXY_SCHEDULING:
|
|
|
|
* @pad: a #GstPad
|
|
|
|
*
|
|
|
|
* Check if the given @pad is set to proxy scheduling queries, which means that
|
|
|
|
* the default query handler will forward scheduling queries to the internally
|
|
|
|
* linked @pads instead of discarding them.
|
|
|
|
*/
|
2012-07-18 15:30:30 +00:00
|
|
|
#define GST_PAD_IS_PROXY_SCHEDULING(pad) (GST_OBJECT_FLAG_IS_SET (pad, GST_PAD_FLAG_PROXY_SCHEDULING))
|
2014-04-26 16:02:18 +00:00
|
|
|
/**
|
|
|
|
* GST_PAD_SET_PROXY_SCHEDULING:
|
|
|
|
* @pad: a #GstPad
|
|
|
|
*
|
|
|
|
* Set @pad to proxy scheduling queries, which means that the default query
|
|
|
|
* handler will forward scheduling queries to the internally linked @pads
|
|
|
|
* instead of discarding them. You will usually want to handle scheduling
|
|
|
|
* queries explicitly if your element supports multiple scheduling modes.
|
|
|
|
*/
|
2012-07-18 15:30:30 +00:00
|
|
|
#define GST_PAD_SET_PROXY_SCHEDULING(pad) (GST_OBJECT_FLAG_SET (pad, GST_PAD_FLAG_PROXY_SCHEDULING))
|
2014-04-26 16:02:18 +00:00
|
|
|
/**
|
|
|
|
* GST_PAD_UNSET_PROXY_SCHEDULING:
|
|
|
|
* @pad: a #GstPad
|
|
|
|
*
|
|
|
|
* Unset proxy scheduling flag.
|
|
|
|
*/
|
2012-07-18 15:30:30 +00:00
|
|
|
#define GST_PAD_UNSET_PROXY_SCHEDULING(pad) (GST_OBJECT_FLAG_UNSET (pad, GST_PAD_FLAG_PROXY_SCHEDULING))
|
2014-04-26 16:02:18 +00:00
|
|
|
/**
|
|
|
|
* GST_PAD_IS_ACCEPT_INTERSECT:
|
|
|
|
* @pad: a #GstPad
|
|
|
|
*
|
|
|
|
* Check if the pad's accept intersect flag is set. The default accept-caps
|
2015-09-19 11:27:26 +00:00
|
|
|
* handler will check if the caps intersect the query-caps result instead of
|
2014-04-26 16:02:18 +00:00
|
|
|
* checking for a subset. This is interesting for parser elements that can
|
|
|
|
* accept incompletely specified caps.
|
|
|
|
*/
|
2013-12-03 20:46:19 +00:00
|
|
|
#define GST_PAD_IS_ACCEPT_INTERSECT(pad) (GST_OBJECT_FLAG_IS_SET (pad, GST_PAD_FLAG_ACCEPT_INTERSECT))
|
2014-04-26 16:02:18 +00:00
|
|
|
/**
|
|
|
|
* GST_PAD_SET_ACCEPT_INTERSECT:
|
|
|
|
* @pad: a #GstPad
|
|
|
|
*
|
|
|
|
* Set @pad to by default accept caps by intersecting the result instead of
|
|
|
|
* checking for a subset. This is interesting for parser elements that can
|
|
|
|
* accept incompletely specified caps.
|
|
|
|
*/
|
2013-12-03 20:46:19 +00:00
|
|
|
#define GST_PAD_SET_ACCEPT_INTERSECT(pad) (GST_OBJECT_FLAG_SET (pad, GST_PAD_FLAG_ACCEPT_INTERSECT))
|
2014-04-26 16:02:18 +00:00
|
|
|
/**
|
|
|
|
* GST_PAD_UNSET_ACCEPT_INTERSECT:
|
|
|
|
* @pad: a #GstPad
|
|
|
|
*
|
|
|
|
* Unset accept intersect flag.
|
|
|
|
*/
|
2013-12-03 20:46:19 +00:00
|
|
|
#define GST_PAD_UNSET_ACCEPT_INTERSECT(pad) (GST_OBJECT_FLAG_UNSET (pad, GST_PAD_FLAG_ACCEPT_INTERSECT))
|
2015-08-14 10:51:07 +00:00
|
|
|
/**
|
|
|
|
* GST_PAD_IS_ACCEPT_TEMPLATE:
|
|
|
|
* @pad: a #GstPad
|
|
|
|
*
|
|
|
|
* Check if the pad's accept caps operation will use the pad template caps.
|
|
|
|
* The default accept-caps will do a query caps to get the caps, which might
|
|
|
|
* be querying downstream causing unnecessary overhead. It is recommended to
|
|
|
|
* implement a proper accept-caps query handler or to use this flag to prevent
|
|
|
|
* recursive accept-caps handling.
|
|
|
|
*
|
|
|
|
* Since: 1.6
|
|
|
|
*/
|
|
|
|
#define GST_PAD_IS_ACCEPT_TEMPLATE(pad) (GST_OBJECT_FLAG_IS_SET (pad, GST_PAD_FLAG_ACCEPT_TEMPLATE))
|
|
|
|
/**
|
|
|
|
* GST_PAD_SET_ACCEPT_TEMPLATE:
|
|
|
|
* @pad: a #GstPad
|
|
|
|
*
|
|
|
|
* Set @pad to by default use the pad template caps to compare with
|
|
|
|
* the accept caps instead of using a caps query result.
|
|
|
|
*
|
|
|
|
* Since: 1.6
|
|
|
|
*/
|
|
|
|
#define GST_PAD_SET_ACCEPT_TEMPLATE(pad) (GST_OBJECT_FLAG_SET (pad, GST_PAD_FLAG_ACCEPT_TEMPLATE))
|
|
|
|
/**
|
|
|
|
* GST_PAD_UNSET_ACCEPT_TEMPLATE:
|
|
|
|
* @pad: a #GstPad
|
|
|
|
*
|
|
|
|
* Unset accept template flag.
|
|
|
|
*
|
|
|
|
* Since: 1.6
|
|
|
|
*/
|
|
|
|
#define GST_PAD_UNSET_ACCEPT_TEMPLATE(pad) (GST_OBJECT_FLAG_UNSET (pad, GST_PAD_FLAG_ACCEPT_TEMPLATE))
|
2005-11-24 09:44:07 +00:00
|
|
|
/**
|
|
|
|
* GST_PAD_GET_STREAM_LOCK:
|
|
|
|
* @pad: a #GstPad
|
|
|
|
*
|
|
|
|
* Get the stream lock of @pad. The stream lock is protecting the
|
2014-04-26 16:02:18 +00:00
|
|
|
* resources used in the data processing functions of @pad. Accessor
|
|
|
|
* macro, use GST_PAD_STREAM_LOCK() and GST_PAD_STREAM_UNLOCK() instead
|
|
|
|
* to take/release the pad's stream lock.
|
2005-11-24 09:44:07 +00:00
|
|
|
*/
|
2011-06-02 11:46:26 +00:00
|
|
|
#define GST_PAD_GET_STREAM_LOCK(pad) (&(GST_PAD_CAST(pad)->stream_rec_lock))
|
2005-11-24 09:44:07 +00:00
|
|
|
/**
|
|
|
|
* GST_PAD_STREAM_LOCK:
|
|
|
|
* @pad: a #GstPad
|
|
|
|
*
|
2014-04-26 16:02:18 +00:00
|
|
|
* Take the pad's stream lock. The stream lock is recursive and will be taken
|
|
|
|
* when buffers or serialized downstream events are pushed on a pad.
|
2005-11-24 09:44:07 +00:00
|
|
|
*/
|
2012-03-08 19:55:30 +00:00
|
|
|
#define GST_PAD_STREAM_LOCK(pad) g_rec_mutex_lock(GST_PAD_GET_STREAM_LOCK(pad))
|
2005-11-24 09:44:07 +00:00
|
|
|
/**
|
|
|
|
* GST_PAD_STREAM_TRYLOCK:
|
|
|
|
* @pad: a #GstPad
|
|
|
|
*
|
2014-05-29 21:54:34 +00:00
|
|
|
* Try to take the pad's stream lock, and return %TRUE if the lock could be
|
|
|
|
* taken, and otherwise %FALSE.
|
2005-11-24 09:44:07 +00:00
|
|
|
*/
|
2012-03-08 19:55:30 +00:00
|
|
|
#define GST_PAD_STREAM_TRYLOCK(pad) g_rec_mutex_trylock(GST_PAD_GET_STREAM_LOCK(pad))
|
2005-11-24 09:44:07 +00:00
|
|
|
/**
|
|
|
|
* GST_PAD_STREAM_UNLOCK:
|
|
|
|
* @pad: a #GstPad
|
|
|
|
*
|
2014-04-26 16:02:18 +00:00
|
|
|
* Release the pad's stream lock.
|
2005-11-24 09:44:07 +00:00
|
|
|
*/
|
2012-03-08 19:55:30 +00:00
|
|
|
#define GST_PAD_STREAM_UNLOCK(pad) g_rec_mutex_unlock(GST_PAD_GET_STREAM_LOCK(pad))
|
2014-05-23 16:25:35 +00:00
|
|
|
/**
|
|
|
|
* GST_PAD_LAST_FLOW_RETURN:
|
|
|
|
* @pad: a #GstPad
|
|
|
|
*
|
|
|
|
* Gets the last flow return on this pad
|
2014-05-27 12:36:29 +00:00
|
|
|
*
|
|
|
|
* Since: 1.4
|
2014-05-23 16:25:35 +00:00
|
|
|
*/
|
|
|
|
#define GST_PAD_LAST_FLOW_RETURN(pad) (GST_PAD_CAST(pad)->ABI.abi.last_flowret)
|
2005-11-21 17:21:15 +00:00
|
|
|
|
2012-01-19 08:27:04 +00:00
|
|
|
#define GST_PAD_BLOCK_GET_COND(pad) (&GST_PAD_CAST(pad)->block_cond)
|
2005-11-21 16:34:26 +00:00
|
|
|
#define GST_PAD_BLOCK_WAIT(pad) (g_cond_wait(GST_PAD_BLOCK_GET_COND (pad), GST_OBJECT_GET_LOCK (pad)))
|
2005-03-21 17:34:02 +00:00
|
|
|
#define GST_PAD_BLOCK_SIGNAL(pad) (g_cond_signal(GST_PAD_BLOCK_GET_COND (pad)))
|
2006-11-03 13:57:28 +00:00
|
|
|
#define GST_PAD_BLOCK_BROADCAST(pad) (g_cond_broadcast(GST_PAD_BLOCK_GET_COND (pad)))
|
2005-03-21 17:34:02 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2004-03-15 14:43:35 +00:00
|
|
|
GType gst_pad_get_type (void);
|
2000-12-12 19:29:43 +00:00
|
|
|
|
2002-07-24 21:04:50 +00:00
|
|
|
/* creating pads */
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2004-03-15 14:43:35 +00:00
|
|
|
GstPad* gst_pad_new (const gchar *name, GstPadDirection direction);
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2004-03-15 14:43:35 +00:00
|
|
|
GstPad* gst_pad_new_from_template (GstPadTemplate *templ, const gchar *name);
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2005-11-16 16:09:49 +00:00
|
|
|
GstPad* gst_pad_new_from_static_template (GstStaticPadTemplate *templ, const gchar *name);
|
|
|
|
|
2005-03-07 18:27:42 +00:00
|
|
|
|
2005-10-08 14:48:17 +00:00
|
|
|
/**
|
|
|
|
* gst_pad_get_name:
|
|
|
|
* @pad: the pad to get the name from
|
|
|
|
*
|
2005-10-21 11:36:32 +00:00
|
|
|
* Get a copy of the name of the pad. g_free() after usage.
|
2005-10-08 14:48:17 +00:00
|
|
|
*
|
|
|
|
* MT safe.
|
|
|
|
*/
|
gst/gstutils.c: RPAD fixes all around.
Original commit message from CVS:
2005-06-08 Andy Wingo <wingo@pobox.com>
* gst/gstutils.c: RPAD fixes all around.
(gst_element_link_pads): Refcounting fixes.
* tools/gst-inspect.c:
* tools/gst-xmlinspect.c:
* parse/grammar.y:
* gst/base/gsttypefindhelper.c:
* gst/base/gstbasesink.c:
* gst/gstqueue.c: RPAD fixes.
* gst/gstghostpad.h:
* gst/gstghostpad.c: New ghost pad implementation as full proxy
pads. The tricky thing is they provide both source and sink
interfaces, since they proxy the internal pad for the external
pad, and vice versa. Implement with lower-level ProxyPad objects,
with the interior proxy pad as a child of the exterior ghost pad.
Should write a doc on this.
* gst/gstpad.h: s/RPAD/PAD/, s/RealPad/Pad/.
(gst_pad_set_name, gst_pad_set_parent): Macros removed, use
gst_object API.
* gst/gstpad.c: Big changes. No more stub base GstPad, now all
pads are real pads. No ghost pads in this file. Not documenting
the myriad s/RPAD/PAD/ and REALIZE fixes.
(gst_pad_class_init): Add properties for "direction" and
"template". Both are construct-only, so they can't change during
the life of the pad. Fixes properly deriving from GstPad.
(gst_pad_custom_new, gst_pad_custom_new_from_template): Gone. For
derived objects, just set properties when creating the objects via
g_object_new.
(gst_pad_get_parent): Implement as a function, return NULL if the
parent is not an element.
(gst_pad_get_real_parent, gst_pad_add_ghost_pad)
(gst_pad_remove_ghost_pad, gst_pad_realize): Removed.
* gst/gstobject.c (gst_object_class_init): Make name a construct
property. Don't set it in the object init.
* gst/gstelement.c (gst_element_add_pad): Don't allow adding pads
with UNKNOWN direction.
(gst_element_add_ghost_pad): Remove non-orthogonal API. Replace
with gst_element_add_pad (e, gst_ghost_pad_new (name, pad)).
(gst_element_remove_pad): Remove ghost-pad special cases.
(gst_element_pads_activate): Remove rpad cruft.
* gst/gstbin.c (gst_bin_change_state): Use gst_pad_get_parent to
catch the pad's-parent-not-an-element case.
* gst/gst.h: Include gstghostpad.h.
* gst/gst.c (init_post): No more real, ghost pads.
* gst/Makefile.am: Add gstghostpad.[ch].
* check/Makefile.am:
* check/gst/gstbin.c:
* check/gst/gstghostpad.c (test_ghost_pads): Check that linking
into a bin creates ghost pads, and that the refcounts are right.
Partly moved from gstbin.c.
2005-06-08 22:16:27 +00:00
|
|
|
#define gst_pad_get_name(pad) gst_object_get_name (GST_OBJECT_CAST (pad))
|
2005-10-08 14:48:17 +00:00
|
|
|
/**
|
|
|
|
* gst_pad_get_parent:
|
|
|
|
* @pad: the pad to get the parent of
|
|
|
|
*
|
2005-10-21 11:36:32 +00:00
|
|
|
* Get the parent of @pad. This function increases the refcount
|
2005-10-08 14:48:17 +00:00
|
|
|
* of the parent object so you should gst_object_unref() it after usage.
|
2014-05-29 21:54:34 +00:00
|
|
|
* Can return %NULL if the pad did not have a parent.
|
2005-10-08 14:48:17 +00:00
|
|
|
*
|
|
|
|
* MT safe.
|
2014-06-11 22:21:34 +00:00
|
|
|
*
|
|
|
|
* Returns: (nullable): the parent
|
2005-10-08 14:48:17 +00:00
|
|
|
*/
|
2005-07-18 12:49:53 +00:00
|
|
|
#define gst_pad_get_parent(pad) gst_object_get_parent (GST_OBJECT_CAST (pad))
|
2001-08-06 20:37:21 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2004-03-15 14:43:35 +00:00
|
|
|
GstPadDirection gst_pad_get_direction (GstPad *pad);
|
2000-01-30 09:03:00 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
gst/base/gsttypefindhelper.c (gst_type_find_helper): Unref any remaining buffer.
Original commit message from CVS:
2005-06-27 Andy Wingo <wingo@pobox.com>
* gst/base/gsttypefindhelper.c (gst_type_find_helper): Unref any
remaining buffer.
* gst/gsttrace.c (gst_alloc_trace_list_sorted): New helper,
returns a sorted copy of the trace list.
(gst_alloc_trace_print_live): New API, only prints traces with
live objects. Sort the list.
(gst_alloc_trace_print_all): Sort the list.
(gst_alloc_trace_print): Align columns.
* gst/elements/gstttypefindelement.c:
* gst/elements/gsttee.c:
* gst/base/gstbasesrc.c:
* gst/base/gstbasesink.c:
* gst/base/gstbasetransform.c:
* gst/gstqueue.c: Adapt for pad activation changes.
* gst/gstpipeline.c (gst_pipeline_init): Unref after parenting
sched.
(gst_pipeline_dispose): Drop ref on sched.
* gst/gstpad.c (gst_pad_init): Set the default activate func.
(gst_pad_activate_default): Push mode by default.
(pre_activate_switch, post_activate_switch): New stubs, things to
do before and after switching activation modes on pads.
(gst_pad_set_active): Take a boolean and not a mode, dispatch to
the pad's activate function to choose which mode to activate.
Shortcut on deactivation and call the right function directly.
(gst_pad_activate_pull): New API, (de)activates a pad in pull
mode.
(gst_pad_activate_push): New API, same for push mode.
(gst_pad_set_activate_function)
(gst_pad_set_activatepull_function)
(gst_pad_set_activatepush_function): Setters for new API.
* gst/gstminiobject.c (gst_mini_object_new, gst_mini_object_free):
Trace all miniobjects.
(gst_mini_object_make_writable): Unref the arg if we copy, like
gst_caps_make_writable.
* gst/gstmessage.c (_gst_message_initialize): No trace init.
* gst/gstghostpad.c (gst_proxy_pad_do_activate)
(gst_proxy_pad_do_activatepull, gst_proxy_pad_do_activatepush):
Adapt for new pad API.
* gst/gstevent.c (_gst_event_initialize): Don't initialize trace.
* gst/gstelement.h:
* gst/gstelement.c (gst_element_iterate_src_pads)
(gst_element_iterate_sink_pads): New API functions.
* gst/gstelement.c (iterator_fold_with_resync): New utility,
should fold into gstiterator.c in some form.
(gst_element_pads_activate): Simplified via use of fold and
delegation of decisions to gstpad->activate.
* gst/gstbus.c (gst_bus_source_finalize): Set the bus to NULL,
help in debugging.
* gst/gstbuffer.c (_gst_buffer_initialize): Ref the buffer type
class once in init, like gstmessage. Didn't run into this issue
but it seems correct. Don't initialize a trace, gstminiobject does
that.
* check/pipelines/simple_launch_lines.c (test_stop_from_app): New
test, runs fakesrc ! fakesink, stopping on ::handoff via a message
to the bus.
(assert_live_count): New util function, uses alloc traces to check
cleanup.
* check/gst/gstghostpad.c (test_ghost_pads): More refcount checks.
To be modified when unlink drops the internal pad.
2005-06-27 18:35:05 +00:00
|
|
|
gboolean gst_pad_set_active (GstPad *pad, gboolean active);
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2004-03-15 14:43:35 +00:00
|
|
|
gboolean gst_pad_is_active (GstPad *pad);
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2011-11-21 12:29:05 +00:00
|
|
|
gboolean gst_pad_activate_mode (GstPad *pad, GstPadMode mode,
|
|
|
|
gboolean active);
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2011-05-31 17:16:09 +00:00
|
|
|
gulong gst_pad_add_probe (GstPad *pad,
|
2011-11-01 00:13:35 +00:00
|
|
|
GstPadProbeType mask,
|
2011-05-31 17:16:09 +00:00
|
|
|
GstPadProbeCallback callback,
|
2011-05-30 16:29:06 +00:00
|
|
|
gpointer user_data,
|
2009-03-12 09:48:21 +00:00
|
|
|
GDestroyNotify destroy_data);
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2011-05-31 17:16:09 +00:00
|
|
|
void gst_pad_remove_probe (GstPad *pad, gulong id);
|
2011-05-30 16:29:06 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2005-03-21 17:34:02 +00:00
|
|
|
gboolean gst_pad_is_blocked (GstPad *pad);
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2006-10-02 16:01:54 +00:00
|
|
|
gboolean gst_pad_is_blocking (GstPad *pad);
|
2000-01-30 09:03:00 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2011-08-04 15:12:21 +00:00
|
|
|
void gst_pad_mark_reconfigure (GstPad *pad);
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2012-08-04 14:42:05 +00:00
|
|
|
gboolean gst_pad_needs_reconfigure (GstPad *pad);
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2011-06-10 15:32:20 +00:00
|
|
|
gboolean gst_pad_check_reconfigure (GstPad *pad);
|
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2004-03-15 14:43:35 +00:00
|
|
|
void gst_pad_set_element_private (GstPad *pad, gpointer priv);
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2004-03-15 14:43:35 +00:00
|
|
|
gpointer gst_pad_get_element_private (GstPad *pad);
|
2001-01-11 22:03:01 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2004-03-15 14:43:35 +00:00
|
|
|
GstPadTemplate* gst_pad_get_pad_template (GstPad *pad);
|
2000-01-30 09:03:00 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2013-04-04 14:20:24 +00:00
|
|
|
GstFlowReturn gst_pad_store_sticky_event (GstPad *pad, GstEvent *event);
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2011-11-23 16:50:17 +00:00
|
|
|
GstEvent* gst_pad_get_sticky_event (GstPad *pad, GstEventType event_type,
|
|
|
|
guint idx);
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2011-11-23 16:50:17 +00:00
|
|
|
void gst_pad_sticky_events_foreach (GstPad *pad, GstPadStickyEventsForeachFunction foreach_func, gpointer user_data);
|
2011-05-18 14:26:31 +00:00
|
|
|
|
2002-07-24 21:04:50 +00:00
|
|
|
/* data passing setup functions */
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2011-11-21 14:47:01 +00:00
|
|
|
void gst_pad_set_activate_function_full (GstPad *pad,
|
|
|
|
GstPadActivateFunction activate,
|
2012-01-26 18:28:01 +00:00
|
|
|
gpointer user_data,
|
2011-11-21 14:47:01 +00:00
|
|
|
GDestroyNotify notify);
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2011-11-21 14:47:01 +00:00
|
|
|
void gst_pad_set_activatemode_function_full (GstPad *pad,
|
|
|
|
GstPadActivateModeFunction activatemode,
|
2012-01-26 18:28:01 +00:00
|
|
|
gpointer user_data,
|
2011-11-21 14:47:01 +00:00
|
|
|
GDestroyNotify notify);
|
|
|
|
/* data passing functions */
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2011-11-21 14:47:01 +00:00
|
|
|
void gst_pad_set_chain_function_full (GstPad *pad,
|
|
|
|
GstPadChainFunction chain,
|
2012-01-26 18:28:01 +00:00
|
|
|
gpointer user_data,
|
2011-11-21 14:47:01 +00:00
|
|
|
GDestroyNotify notify);
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2011-11-21 14:47:01 +00:00
|
|
|
void gst_pad_set_chain_list_function_full (GstPad *pad,
|
|
|
|
GstPadChainListFunction chainlist,
|
2012-01-26 18:28:01 +00:00
|
|
|
gpointer user_data,
|
2011-11-21 14:47:01 +00:00
|
|
|
GDestroyNotify notify);
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2011-11-21 14:47:01 +00:00
|
|
|
void gst_pad_set_getrange_function_full (GstPad *pad,
|
|
|
|
GstPadGetRangeFunction get,
|
2012-01-26 18:28:01 +00:00
|
|
|
gpointer user_data,
|
2011-11-21 14:47:01 +00:00
|
|
|
GDestroyNotify notify);
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2011-11-21 14:47:01 +00:00
|
|
|
void gst_pad_set_event_function_full (GstPad *pad,
|
|
|
|
GstPadEventFunction event,
|
2012-01-26 18:28:01 +00:00
|
|
|
gpointer user_data,
|
2011-11-21 14:47:01 +00:00
|
|
|
GDestroyNotify notify);
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2015-11-12 16:15:37 +00:00
|
|
|
void gst_pad_set_event_full_function_full (GstPad *pad,
|
|
|
|
GstPadEventFullFunction event,
|
|
|
|
gpointer user_data,
|
|
|
|
GDestroyNotify notify);
|
2011-11-21 14:47:01 +00:00
|
|
|
|
2012-01-26 18:28:01 +00:00
|
|
|
#define gst_pad_set_activate_function(p,f) gst_pad_set_activate_function_full((p),(f),NULL,NULL)
|
|
|
|
#define gst_pad_set_activatemode_function(p,f) gst_pad_set_activatemode_function_full((p),(f),NULL,NULL)
|
|
|
|
#define gst_pad_set_chain_function(p,f) gst_pad_set_chain_function_full((p),(f),NULL,NULL)
|
|
|
|
#define gst_pad_set_chain_list_function(p,f) gst_pad_set_chain_list_function_full((p),(f),NULL,NULL)
|
|
|
|
#define gst_pad_set_getrange_function(p,f) gst_pad_set_getrange_function_full((p),(f),NULL,NULL)
|
|
|
|
#define gst_pad_set_event_function(p,f) gst_pad_set_event_function_full((p),(f),NULL,NULL)
|
2015-11-12 16:15:37 +00:00
|
|
|
#define gst_pad_set_event_full_function(p,f) gst_pad_set_event_full_function_full((p),(f),NULL,NULL)
|
2002-07-24 21:04:50 +00:00
|
|
|
|
2003-01-09 14:15:37 +00:00
|
|
|
/* pad links */
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2011-11-21 14:47:01 +00:00
|
|
|
void gst_pad_set_link_function_full (GstPad *pad,
|
|
|
|
GstPadLinkFunction link,
|
2012-01-26 18:28:01 +00:00
|
|
|
gpointer user_data,
|
2011-11-21 14:47:01 +00:00
|
|
|
GDestroyNotify notify);
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2011-11-21 14:47:01 +00:00
|
|
|
void gst_pad_set_unlink_function_full (GstPad *pad,
|
|
|
|
GstPadUnlinkFunction unlink,
|
2012-01-26 18:28:01 +00:00
|
|
|
gpointer user_data,
|
2011-11-21 14:47:01 +00:00
|
|
|
GDestroyNotify notify);
|
|
|
|
|
2012-01-26 18:28:01 +00:00
|
|
|
#define gst_pad_set_link_function(p,f) gst_pad_set_link_function_full((p),(f),NULL,NULL)
|
|
|
|
#define gst_pad_set_unlink_function(p,f) gst_pad_set_unlink_function_full((p),(f),NULL,NULL)
|
2002-01-28 00:51:39 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2009-03-18 16:01:16 +00:00
|
|
|
gboolean gst_pad_can_link (GstPad *srcpad, GstPad *sinkpad);
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2005-06-19 00:52:31 +00:00
|
|
|
GstPadLinkReturn gst_pad_link (GstPad *srcpad, GstPad *sinkpad);
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2010-06-23 14:45:19 +00:00
|
|
|
GstPadLinkReturn gst_pad_link_full (GstPad *srcpad, GstPad *sinkpad, GstPadLinkCheck flags);
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2005-03-21 17:34:02 +00:00
|
|
|
gboolean gst_pad_unlink (GstPad *srcpad, GstPad *sinkpad);
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2004-03-15 14:43:35 +00:00
|
|
|
gboolean gst_pad_is_linked (GstPad *pad);
|
2000-01-30 09:03:00 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2004-03-15 14:43:35 +00:00
|
|
|
GstPad* gst_pad_get_peer (GstPad *pad);
|
2002-07-24 21:04:50 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2011-05-17 09:59:00 +00:00
|
|
|
GstCaps* gst_pad_get_pad_template_caps (GstPad *pad);
|
Bump version number, we're now 0.9.0
Original commit message from CVS:
* configure.ac:
* gst/gst_private.h:
* gst/gstbin.c: (gst_bin_add_func), (gst_bin_add),
(gst_bin_remove_func), (gst_bin_remove),
(gst_bin_get_by_name_recurse_up):
* gst/gstclock.c: (gst_clock_id_ref), (gst_clock_id_unref),
(gst_clock_id_compare_func), (gst_clock_id_wait),
(gst_clock_id_wait_async), (gst_clock_init),
(gst_clock_adjust_unlocked), (gst_clock_get_time):
* gst/gstelement.h:
* gst/gstinfo.c: (_gst_debug_init):
* gst/gstobject.h:
* gst/gstpad.c: (_gst_pad_default_fixate_foreach),
(gst_pad_collectv), (gst_pad_collect_valist), (gst_pad_query):
* gst/gstpad.h:
Bump version number, we're now 0.9.0
Add future debugging category.
Fix NULL _unref() in _get_by_name_recurse_up
Rearrange gstpad.h.
Update some docs.
2005-03-09 11:08:18 +00:00
|
|
|
|
2008-05-25 16:34:32 +00:00
|
|
|
/* capsnego function for linked/unlinked pads */
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2011-05-06 17:03:33 +00:00
|
|
|
GstCaps * gst_pad_get_current_caps (GstPad * pad);
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2011-05-06 17:03:33 +00:00
|
|
|
gboolean gst_pad_has_current_caps (GstPad * pad);
|
Bump version number, we're now 0.9.0
Original commit message from CVS:
* configure.ac:
* gst/gst_private.h:
* gst/gstbin.c: (gst_bin_add_func), (gst_bin_add),
(gst_bin_remove_func), (gst_bin_remove),
(gst_bin_get_by_name_recurse_up):
* gst/gstclock.c: (gst_clock_id_ref), (gst_clock_id_unref),
(gst_clock_id_compare_func), (gst_clock_id_wait),
(gst_clock_id_wait_async), (gst_clock_init),
(gst_clock_adjust_unlocked), (gst_clock_get_time):
* gst/gstelement.h:
* gst/gstinfo.c: (_gst_debug_init):
* gst/gstobject.h:
* gst/gstpad.c: (_gst_pad_default_fixate_foreach),
(gst_pad_collectv), (gst_pad_collect_valist), (gst_pad_query):
* gst/gstpad.h:
Bump version number, we're now 0.9.0
Add future debugging category.
Fix NULL _unref() in _get_by_name_recurse_up
Rearrange gstpad.h.
Update some docs.
2005-03-09 11:08:18 +00:00
|
|
|
|
2008-05-25 16:34:32 +00:00
|
|
|
/* capsnego for linked pads */
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2007-01-10 21:15:08 +00:00
|
|
|
GstCaps * gst_pad_get_allowed_caps (GstPad * pad);
|
2005-03-07 18:27:42 +00:00
|
|
|
|
2011-05-19 14:26:06 +00:00
|
|
|
/* pad offsets */
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2011-05-19 14:26:06 +00:00
|
|
|
gint64 gst_pad_get_offset (GstPad *pad);
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2011-05-19 14:26:06 +00:00
|
|
|
void gst_pad_set_offset (GstPad *pad, gint64 offset);
|
|
|
|
|
gst/: Implement gst_pad_pause/start/stop_task(), take STREAM lock in task function.
Original commit message from CVS:
* gst/base/gstadapter.c: (gst_adapter_peek), (gst_adapter_flush):
* gst/base/gstbasesink.c: (gst_basesink_preroll_queue_push),
(gst_basesink_finish_preroll), (gst_basesink_chain),
(gst_basesink_loop), (gst_basesink_activate),
(gst_basesink_change_state):
* gst/base/gstbasesrc.c: (gst_basesrc_do_seek),
(gst_basesrc_get_range), (gst_basesrc_loop),
(gst_basesrc_activate):
* gst/elements/gsttee.c: (gst_tee_sink_activate):
* gst/gstpad.c: (gst_pad_dispose), (gst_real_pad_class_init),
(gst_real_pad_init), (gst_real_pad_set_property),
(gst_real_pad_get_property), (gst_pad_set_active),
(gst_pad_is_active), (gst_pad_get_query_types), (gst_pad_unlink),
(gst_pad_link_prepare), (gst_pad_link), (gst_pad_get_real_parent),
(gst_real_pad_get_caps_unlocked), (gst_pad_peer_get_caps),
(gst_pad_accept_caps), (gst_pad_get_peer), (gst_pad_realize),
(gst_pad_event_default_dispatch), (gst_pad_event_default),
(gst_pad_dispatcher), (gst_pad_query), (gst_real_pad_dispose),
(gst_pad_save_thyself), (handle_pad_block), (gst_pad_chain),
(gst_pad_push), (gst_pad_get_range), (gst_pad_pull_range),
(gst_pad_send_event), (gst_pad_start_task), (gst_pad_pause_task),
(gst_pad_stop_task):
* gst/gstpad.h:
* gst/gstqueue.c: (gst_queue_handle_sink_event), (gst_queue_chain),
(gst_queue_loop), (gst_queue_src_activate):
* gst/gsttask.c: (gst_task_init), (gst_task_set_lock),
(gst_task_get_state):
* gst/gsttask.h:
* gst/schedulers/threadscheduler.c:
(gst_thread_scheduler_task_start), (gst_thread_scheduler_func):
Implement gst_pad_pause/start/stop_task(), take STREAM lock
in task function.
Remove ACTIVE pad flag, use FLUSHING everywhere
Added _pad_chain(), _pad_get_range() to call chain/getrange
functions.
Add locks around IS_FLUSHING when reading.
Take STREAM lock in chain(), get_range() functions so plugins
don't need to take it anymore.
2005-05-25 11:50:11 +00:00
|
|
|
/* data passing functions to peer */
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2005-03-21 17:34:02 +00:00
|
|
|
GstFlowReturn gst_pad_push (GstPad *pad, GstBuffer *buffer);
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2009-05-12 11:10:55 +00:00
|
|
|
GstFlowReturn gst_pad_push_list (GstPad *pad, GstBufferList *list);
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2005-03-21 17:34:02 +00:00
|
|
|
GstFlowReturn gst_pad_pull_range (GstPad *pad, guint64 offset, guint size,
|
|
|
|
GstBuffer **buffer);
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2005-03-21 17:34:02 +00:00
|
|
|
gboolean gst_pad_push_event (GstPad *pad, GstEvent *event);
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2011-11-17 11:40:45 +00:00
|
|
|
gboolean gst_pad_event_default (GstPad *pad, GstObject *parent,
|
|
|
|
GstEvent *event);
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2014-05-23 16:25:35 +00:00
|
|
|
GstFlowReturn gst_pad_get_last_flow_return (GstPad *pad);
|
2005-03-21 17:34:02 +00:00
|
|
|
|
gst/: Implement gst_pad_pause/start/stop_task(), take STREAM lock in task function.
Original commit message from CVS:
* gst/base/gstadapter.c: (gst_adapter_peek), (gst_adapter_flush):
* gst/base/gstbasesink.c: (gst_basesink_preroll_queue_push),
(gst_basesink_finish_preroll), (gst_basesink_chain),
(gst_basesink_loop), (gst_basesink_activate),
(gst_basesink_change_state):
* gst/base/gstbasesrc.c: (gst_basesrc_do_seek),
(gst_basesrc_get_range), (gst_basesrc_loop),
(gst_basesrc_activate):
* gst/elements/gsttee.c: (gst_tee_sink_activate):
* gst/gstpad.c: (gst_pad_dispose), (gst_real_pad_class_init),
(gst_real_pad_init), (gst_real_pad_set_property),
(gst_real_pad_get_property), (gst_pad_set_active),
(gst_pad_is_active), (gst_pad_get_query_types), (gst_pad_unlink),
(gst_pad_link_prepare), (gst_pad_link), (gst_pad_get_real_parent),
(gst_real_pad_get_caps_unlocked), (gst_pad_peer_get_caps),
(gst_pad_accept_caps), (gst_pad_get_peer), (gst_pad_realize),
(gst_pad_event_default_dispatch), (gst_pad_event_default),
(gst_pad_dispatcher), (gst_pad_query), (gst_real_pad_dispose),
(gst_pad_save_thyself), (handle_pad_block), (gst_pad_chain),
(gst_pad_push), (gst_pad_get_range), (gst_pad_pull_range),
(gst_pad_send_event), (gst_pad_start_task), (gst_pad_pause_task),
(gst_pad_stop_task):
* gst/gstpad.h:
* gst/gstqueue.c: (gst_queue_handle_sink_event), (gst_queue_chain),
(gst_queue_loop), (gst_queue_src_activate):
* gst/gsttask.c: (gst_task_init), (gst_task_set_lock),
(gst_task_get_state):
* gst/gsttask.h:
* gst/schedulers/threadscheduler.c:
(gst_thread_scheduler_task_start), (gst_thread_scheduler_func):
Implement gst_pad_pause/start/stop_task(), take STREAM lock
in task function.
Remove ACTIVE pad flag, use FLUSHING everywhere
Added _pad_chain(), _pad_get_range() to call chain/getrange
functions.
Add locks around IS_FLUSHING when reading.
Take STREAM lock in chain(), get_range() functions so plugins
don't need to take it anymore.
2005-05-25 11:50:11 +00:00
|
|
|
/* data passing functions on pad */
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
gst/: Implement gst_pad_pause/start/stop_task(), take STREAM lock in task function.
Original commit message from CVS:
* gst/base/gstadapter.c: (gst_adapter_peek), (gst_adapter_flush):
* gst/base/gstbasesink.c: (gst_basesink_preroll_queue_push),
(gst_basesink_finish_preroll), (gst_basesink_chain),
(gst_basesink_loop), (gst_basesink_activate),
(gst_basesink_change_state):
* gst/base/gstbasesrc.c: (gst_basesrc_do_seek),
(gst_basesrc_get_range), (gst_basesrc_loop),
(gst_basesrc_activate):
* gst/elements/gsttee.c: (gst_tee_sink_activate):
* gst/gstpad.c: (gst_pad_dispose), (gst_real_pad_class_init),
(gst_real_pad_init), (gst_real_pad_set_property),
(gst_real_pad_get_property), (gst_pad_set_active),
(gst_pad_is_active), (gst_pad_get_query_types), (gst_pad_unlink),
(gst_pad_link_prepare), (gst_pad_link), (gst_pad_get_real_parent),
(gst_real_pad_get_caps_unlocked), (gst_pad_peer_get_caps),
(gst_pad_accept_caps), (gst_pad_get_peer), (gst_pad_realize),
(gst_pad_event_default_dispatch), (gst_pad_event_default),
(gst_pad_dispatcher), (gst_pad_query), (gst_real_pad_dispose),
(gst_pad_save_thyself), (handle_pad_block), (gst_pad_chain),
(gst_pad_push), (gst_pad_get_range), (gst_pad_pull_range),
(gst_pad_send_event), (gst_pad_start_task), (gst_pad_pause_task),
(gst_pad_stop_task):
* gst/gstpad.h:
* gst/gstqueue.c: (gst_queue_handle_sink_event), (gst_queue_chain),
(gst_queue_loop), (gst_queue_src_activate):
* gst/gsttask.c: (gst_task_init), (gst_task_set_lock),
(gst_task_get_state):
* gst/gsttask.h:
* gst/schedulers/threadscheduler.c:
(gst_thread_scheduler_task_start), (gst_thread_scheduler_func):
Implement gst_pad_pause/start/stop_task(), take STREAM lock
in task function.
Remove ACTIVE pad flag, use FLUSHING everywhere
Added _pad_chain(), _pad_get_range() to call chain/getrange
functions.
Add locks around IS_FLUSHING when reading.
Take STREAM lock in chain(), get_range() functions so plugins
don't need to take it anymore.
2005-05-25 11:50:11 +00:00
|
|
|
GstFlowReturn gst_pad_chain (GstPad *pad, GstBuffer *buffer);
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2009-05-12 11:10:55 +00:00
|
|
|
GstFlowReturn gst_pad_chain_list (GstPad *pad, GstBufferList *list);
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
gst/: Implement gst_pad_pause/start/stop_task(), take STREAM lock in task function.
Original commit message from CVS:
* gst/base/gstadapter.c: (gst_adapter_peek), (gst_adapter_flush):
* gst/base/gstbasesink.c: (gst_basesink_preroll_queue_push),
(gst_basesink_finish_preroll), (gst_basesink_chain),
(gst_basesink_loop), (gst_basesink_activate),
(gst_basesink_change_state):
* gst/base/gstbasesrc.c: (gst_basesrc_do_seek),
(gst_basesrc_get_range), (gst_basesrc_loop),
(gst_basesrc_activate):
* gst/elements/gsttee.c: (gst_tee_sink_activate):
* gst/gstpad.c: (gst_pad_dispose), (gst_real_pad_class_init),
(gst_real_pad_init), (gst_real_pad_set_property),
(gst_real_pad_get_property), (gst_pad_set_active),
(gst_pad_is_active), (gst_pad_get_query_types), (gst_pad_unlink),
(gst_pad_link_prepare), (gst_pad_link), (gst_pad_get_real_parent),
(gst_real_pad_get_caps_unlocked), (gst_pad_peer_get_caps),
(gst_pad_accept_caps), (gst_pad_get_peer), (gst_pad_realize),
(gst_pad_event_default_dispatch), (gst_pad_event_default),
(gst_pad_dispatcher), (gst_pad_query), (gst_real_pad_dispose),
(gst_pad_save_thyself), (handle_pad_block), (gst_pad_chain),
(gst_pad_push), (gst_pad_get_range), (gst_pad_pull_range),
(gst_pad_send_event), (gst_pad_start_task), (gst_pad_pause_task),
(gst_pad_stop_task):
* gst/gstpad.h:
* gst/gstqueue.c: (gst_queue_handle_sink_event), (gst_queue_chain),
(gst_queue_loop), (gst_queue_src_activate):
* gst/gsttask.c: (gst_task_init), (gst_task_set_lock),
(gst_task_get_state):
* gst/gsttask.h:
* gst/schedulers/threadscheduler.c:
(gst_thread_scheduler_task_start), (gst_thread_scheduler_func):
Implement gst_pad_pause/start/stop_task(), take STREAM lock
in task function.
Remove ACTIVE pad flag, use FLUSHING everywhere
Added _pad_chain(), _pad_get_range() to call chain/getrange
functions.
Add locks around IS_FLUSHING when reading.
Take STREAM lock in chain(), get_range() functions so plugins
don't need to take it anymore.
2005-05-25 11:50:11 +00:00
|
|
|
GstFlowReturn gst_pad_get_range (GstPad *pad, guint64 offset, guint size,
|
|
|
|
GstBuffer **buffer);
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
gst/: Implement gst_pad_pause/start/stop_task(), take STREAM lock in task function.
Original commit message from CVS:
* gst/base/gstadapter.c: (gst_adapter_peek), (gst_adapter_flush):
* gst/base/gstbasesink.c: (gst_basesink_preroll_queue_push),
(gst_basesink_finish_preroll), (gst_basesink_chain),
(gst_basesink_loop), (gst_basesink_activate),
(gst_basesink_change_state):
* gst/base/gstbasesrc.c: (gst_basesrc_do_seek),
(gst_basesrc_get_range), (gst_basesrc_loop),
(gst_basesrc_activate):
* gst/elements/gsttee.c: (gst_tee_sink_activate):
* gst/gstpad.c: (gst_pad_dispose), (gst_real_pad_class_init),
(gst_real_pad_init), (gst_real_pad_set_property),
(gst_real_pad_get_property), (gst_pad_set_active),
(gst_pad_is_active), (gst_pad_get_query_types), (gst_pad_unlink),
(gst_pad_link_prepare), (gst_pad_link), (gst_pad_get_real_parent),
(gst_real_pad_get_caps_unlocked), (gst_pad_peer_get_caps),
(gst_pad_accept_caps), (gst_pad_get_peer), (gst_pad_realize),
(gst_pad_event_default_dispatch), (gst_pad_event_default),
(gst_pad_dispatcher), (gst_pad_query), (gst_real_pad_dispose),
(gst_pad_save_thyself), (handle_pad_block), (gst_pad_chain),
(gst_pad_push), (gst_pad_get_range), (gst_pad_pull_range),
(gst_pad_send_event), (gst_pad_start_task), (gst_pad_pause_task),
(gst_pad_stop_task):
* gst/gstpad.h:
* gst/gstqueue.c: (gst_queue_handle_sink_event), (gst_queue_chain),
(gst_queue_loop), (gst_queue_src_activate):
* gst/gsttask.c: (gst_task_init), (gst_task_set_lock),
(gst_task_get_state):
* gst/gsttask.h:
* gst/schedulers/threadscheduler.c:
(gst_thread_scheduler_task_start), (gst_thread_scheduler_func):
Implement gst_pad_pause/start/stop_task(), take STREAM lock
in task function.
Remove ACTIVE pad flag, use FLUSHING everywhere
Added _pad_chain(), _pad_get_range() to call chain/getrange
functions.
Add locks around IS_FLUSHING when reading.
Take STREAM lock in chain(), get_range() functions so plugins
don't need to take it anymore.
2005-05-25 11:50:11 +00:00
|
|
|
gboolean gst_pad_send_event (GstPad *pad, GstEvent *event);
|
|
|
|
|
2005-03-21 17:34:02 +00:00
|
|
|
/* pad tasks */
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2005-06-19 00:52:31 +00:00
|
|
|
gboolean gst_pad_start_task (GstPad *pad, GstTaskFunction func,
|
2012-06-20 08:31:49 +00:00
|
|
|
gpointer user_data, GDestroyNotify notify);
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2005-06-19 00:52:31 +00:00
|
|
|
gboolean gst_pad_pause_task (GstPad *pad);
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2005-06-19 00:52:31 +00:00
|
|
|
gboolean gst_pad_stop_task (GstPad *pad);
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2017-02-17 18:48:17 +00:00
|
|
|
GstTaskState gst_pad_get_task_state (GstPad *pad);
|
2002-05-26 21:54:27 +00:00
|
|
|
|
2005-05-09 10:53:13 +00:00
|
|
|
/* internal links */
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2011-11-21 14:47:01 +00:00
|
|
|
void gst_pad_set_iterate_internal_links_function_full (GstPad * pad,
|
|
|
|
GstPadIterIntLinkFunction iterintlink,
|
2012-01-26 18:28:01 +00:00
|
|
|
gpointer user_data,
|
2011-11-21 14:47:01 +00:00
|
|
|
GDestroyNotify notify);
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2008-09-01 10:42:04 +00:00
|
|
|
GstIterator * gst_pad_iterate_internal_links (GstPad * pad);
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2011-11-16 16:49:46 +00:00
|
|
|
GstIterator * gst_pad_iterate_internal_links_default (GstPad * pad, GstObject *parent);
|
2008-09-01 10:42:04 +00:00
|
|
|
|
2012-01-26 18:28:01 +00:00
|
|
|
#define gst_pad_set_iterate_internal_links_function(p,f) gst_pad_set_iterate_internal_links_function_full((p),(f),NULL,NULL)
|
2008-09-01 10:42:04 +00:00
|
|
|
|
2005-05-09 10:53:13 +00:00
|
|
|
/* generic query function */
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2011-05-17 09:20:05 +00:00
|
|
|
gboolean gst_pad_query (GstPad *pad, GstQuery *query);
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2011-05-17 09:20:05 +00:00
|
|
|
gboolean gst_pad_peer_query (GstPad *pad, GstQuery *query);
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2011-11-21 14:47:01 +00:00
|
|
|
void gst_pad_set_query_function_full (GstPad *pad, GstPadQueryFunction query,
|
2012-01-26 18:28:01 +00:00
|
|
|
gpointer user_data,
|
2011-11-21 14:47:01 +00:00
|
|
|
GDestroyNotify notify);
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2011-11-16 16:22:56 +00:00
|
|
|
gboolean gst_pad_query_default (GstPad *pad, GstObject *parent,
|
|
|
|
GstQuery *query);
|
2005-05-09 06:21:10 +00:00
|
|
|
|
2012-01-26 18:28:01 +00:00
|
|
|
#define gst_pad_set_query_function(p,f) gst_pad_set_query_function_full((p),(f),NULL,NULL)
|
2011-11-21 14:47:01 +00:00
|
|
|
|
2002-07-24 21:04:50 +00:00
|
|
|
/* misc helper functions */
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2011-06-07 08:02:06 +00:00
|
|
|
gboolean gst_pad_forward (GstPad *pad, GstPadForwardFunction forward,
|
|
|
|
gpointer user_data);
|
2001-08-06 20:37:21 +00:00
|
|
|
|
2015-11-10 17:38:59 +00:00
|
|
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstPad, gst_object_unref)
|
|
|
|
|
2002-07-08 19:22:02 +00:00
|
|
|
G_END_DECLS
|
2004-03-15 14:43:35 +00:00
|
|
|
|
2001-01-29 00:06:02 +00:00
|
|
|
#endif /* __GST_PAD_H__ */
|