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
|
|
|
/* GStreamer
|
|
|
|
* Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
|
|
|
|
* 2005 Wim Taymans <wim@fluendo.com>
|
|
|
|
*
|
|
|
|
* 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.
|
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
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __GST_BASE_TRANSFORM_H__
|
|
|
|
#define __GST_BASE_TRANSFORM_H__
|
|
|
|
|
|
|
|
#include <gst/gst.h>
|
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
2006-04-08 18:05:16 +00:00
|
|
|
#define GST_TYPE_BASE_TRANSFORM (gst_base_transform_get_type())
|
|
|
|
#define GST_BASE_TRANSFORM(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_BASE_TRANSFORM,GstBaseTransform))
|
|
|
|
#define GST_BASE_TRANSFORM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_BASE_TRANSFORM,GstBaseTransformClass))
|
|
|
|
#define GST_BASE_TRANSFORM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj),GST_TYPE_BASE_TRANSFORM,GstBaseTransformClass))
|
|
|
|
#define GST_IS_BASE_TRANSFORM(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_BASE_TRANSFORM))
|
|
|
|
#define GST_IS_BASE_TRANSFORM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_BASE_TRANSFORM))
|
2006-03-07 15:14:51 +00:00
|
|
|
#define GST_BASE_TRANSFORM_CAST(obj) ((GstBaseTransform *)(obj))
|
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
|
|
|
|
2005-09-25 18:34:49 +00:00
|
|
|
/**
|
|
|
|
* GST_BASE_TRANSFORM_SINK_NAME:
|
|
|
|
*
|
2008-04-25 13:22:32 +00:00
|
|
|
* The name of the templates for the sink pad.
|
2005-09-25 18:34:49 +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_BASE_TRANSFORM_SINK_NAME "sink"
|
2005-09-25 18:34:49 +00:00
|
|
|
/**
|
|
|
|
* GST_BASE_TRANSFORM_SRC_NAME:
|
|
|
|
*
|
2008-04-25 13:22:32 +00:00
|
|
|
* The name of the templates for the source pad.
|
2005-09-25 18:34:49 +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_BASE_TRANSFORM_SRC_NAME "src"
|
|
|
|
|
2006-03-07 15:14:51 +00:00
|
|
|
/**
|
|
|
|
* GST_BASE_TRANSFORM_SRC_PAD:
|
|
|
|
* @obj: base transform instance
|
2006-05-03 16:45:11 +00:00
|
|
|
*
|
2006-03-07 15:14:51 +00:00
|
|
|
* Gives the pointer to the source #GstPad object of the element.
|
|
|
|
*/
|
|
|
|
#define GST_BASE_TRANSFORM_SRC_PAD(obj) (GST_BASE_TRANSFORM_CAST (obj)->srcpad)
|
|
|
|
|
|
|
|
/**
|
|
|
|
* GST_BASE_TRANSFORM_SINK_PAD:
|
|
|
|
* @obj: base transform instance
|
2006-05-03 16:45:11 +00:00
|
|
|
*
|
2006-03-07 15:14:51 +00:00
|
|
|
* Gives the pointer to the sink #GstPad object of the element.
|
|
|
|
*/
|
|
|
|
#define GST_BASE_TRANSFORM_SINK_PAD(obj) (GST_BASE_TRANSFORM_CAST (obj)->sinkpad)
|
|
|
|
|
2007-03-08 11:40:18 +00:00
|
|
|
/**
|
|
|
|
* GST_BASE_TRANSFORM_FLOW_DROPPED:
|
|
|
|
*
|
|
|
|
* A #GstFlowReturn that can be returned from transform and transform_ip to
|
|
|
|
* indicate that no output buffer was generated.
|
|
|
|
*/
|
|
|
|
#define GST_BASE_TRANSFORM_FLOW_DROPPED GST_FLOW_CUSTOM_SUCCESS
|
|
|
|
|
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
|
|
|
typedef struct _GstBaseTransform GstBaseTransform;
|
|
|
|
typedef struct _GstBaseTransformClass GstBaseTransformClass;
|
libs/gst/base/gstbasetransform.*: Make basetransform virtual method for src events too.
Original commit message from CVS:
* libs/gst/base/gstbasetransform.c:
(gst_base_transform_class_init), (gst_base_transform_init),
(gst_base_transform_sink_event),
(gst_base_transform_sink_eventfunc),
(gst_base_transform_src_event), (gst_base_transform_src_eventfunc),
(gst_base_transform_handle_buffer), (gst_base_transform_chain),
(gst_base_transform_set_property),
(gst_base_transform_get_property),
(gst_base_transform_change_state), (gst_base_transform_update_qos),
(gst_base_transform_set_qos_enabled),
(gst_base_transform_is_qos_enabled):
* libs/gst/base/gstbasetransform.h:
Make basetransform virtual method for src events too.
Handle QOS in basetransform.
API: gst_base_transform_update_qos
API: gst_base_transform_set_qos_enabled
API: gst_base_transform_is_qos_enabled
2006-03-13 11:27:57 +00:00
|
|
|
typedef struct _GstBaseTransformPrivate GstBaseTransformPrivate;
|
|
|
|
|
2005-11-24 09:44:07 +00:00
|
|
|
/**
|
|
|
|
* GstBaseTransform:
|
|
|
|
*
|
|
|
|
* The opaque #GstBaseTransform data structure.
|
|
|
|
*/
|
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
|
|
|
struct _GstBaseTransform {
|
2005-06-27 14:40:09 +00:00
|
|
|
GstElement element;
|
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
|
|
|
|
2005-11-24 09:44:07 +00:00
|
|
|
/*< protected >*/
|
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
|
|
|
/* source and sink pads */
|
2005-06-27 14:40:09 +00:00
|
|
|
GstPad *sinkpad;
|
|
|
|
GstPad *srcpad;
|
gst/base/gstbasetransform.*: Make passthrough work using the bufferpools.
Original commit message from CVS:
* gst/base/gstbasetransform.c: (gst_base_transform_init),
(gst_base_transform_transform_caps), (gst_base_transform_getcaps),
(gst_base_transform_configure_caps), (gst_base_transform_setcaps),
(gst_base_transform_get_size), (gst_base_transform_buffer_alloc),
(gst_base_transform_handle_buffer), (gst_base_transform_getrange),
(gst_base_transform_chain), (gst_base_transform_change_state),
(gst_base_transform_set_passthrough),
(gst_base_transform_is_passthrough):
* gst/base/gstbasetransform.h:
Make passthrough work using the bufferpools.
Changed API a bit, subclasses have to write into a buffer
provided by the base class.
More debug info in nego functions.
* gst/elements/gstidentity.c: (gst_identity_init),
(gst_identity_transform):
Port to new base class.
2005-07-15 10:41:32 +00:00
|
|
|
|
2005-10-26 18:57:43 +00:00
|
|
|
/* MT-protected (with STREAM_LOCK) */
|
2012-03-16 21:51:14 +00:00
|
|
|
gboolean have_segment;
|
More segment updates, replace code in plugins with segment helper functions.
Original commit message from CVS:
* check/gst/gstsegment.c: (GST_START_TEST):
* docs/design/part-TODO.txt:
* gst/base/gstbasesink.c: (gst_base_sink_handle_object),
(gst_base_sink_event), (gst_base_sink_do_sync),
(gst_base_sink_activate_pull), (gst_base_sink_get_position),
(gst_base_sink_query), (gst_base_sink_change_state):
* gst/base/gstbasesink.h:
* gst/base/gstbasesrc.c: (gst_base_src_init), (gst_base_src_query),
(gst_base_src_default_newsegment),
(gst_base_src_configure_segment), (gst_base_src_do_seek),
(gst_base_src_get_range), (gst_base_src_loop),
(gst_base_src_change_state):
* gst/base/gstbasesrc.h:
* gst/base/gstbasetransform.c:
(gst_base_transform_prepare_output_buf),
(gst_base_transform_event), (gst_base_transform_change_state):
* gst/base/gstbasetransform.h:
* gst/base/gstcollectpads.c: (gst_collect_pads_add_pad),
(gst_collect_pads_event):
* gst/base/gstcollectpads.h:
* gst/elements/gstfakesrc.c: (gst_fake_src_init),
(gst_fake_src_create):
* gst/elements/gstfakesrc.h:
* gst/elements/gstidentity.c: (gst_identity_transform_ip):
* gst/gstsegment.c: (gst_segment_init), (gst_segment_set_duration),
(gst_segment_set_last_stop), (gst_segment_set_seek),
(gst_segment_set_newsegment), (gst_segment_to_stream_time),
(gst_segment_to_running_time), (gst_segment_clip):
* gst/gstsegment.h:
More segment updates, replace code in plugins with segment
helper functions.
2005-11-21 17:09:45 +00:00
|
|
|
GstSegment segment;
|
2015-05-22 15:08:29 +00:00
|
|
|
/* Default submit_input_buffer places the buffer here,
|
|
|
|
* for consumption by the generate_output method: */
|
|
|
|
GstBuffer *queued_buf;
|
More segment updates, replace code in plugins with segment helper functions.
Original commit message from CVS:
* check/gst/gstsegment.c: (GST_START_TEST):
* docs/design/part-TODO.txt:
* gst/base/gstbasesink.c: (gst_base_sink_handle_object),
(gst_base_sink_event), (gst_base_sink_do_sync),
(gst_base_sink_activate_pull), (gst_base_sink_get_position),
(gst_base_sink_query), (gst_base_sink_change_state):
* gst/base/gstbasesink.h:
* gst/base/gstbasesrc.c: (gst_base_src_init), (gst_base_src_query),
(gst_base_src_default_newsegment),
(gst_base_src_configure_segment), (gst_base_src_do_seek),
(gst_base_src_get_range), (gst_base_src_loop),
(gst_base_src_change_state):
* gst/base/gstbasesrc.h:
* gst/base/gstbasetransform.c:
(gst_base_transform_prepare_output_buf),
(gst_base_transform_event), (gst_base_transform_change_state):
* gst/base/gstbasetransform.h:
* gst/base/gstcollectpads.c: (gst_collect_pads_add_pad),
(gst_collect_pads_event):
* gst/base/gstcollectpads.h:
* gst/elements/gstfakesrc.c: (gst_fake_src_init),
(gst_fake_src_create):
* gst/elements/gstfakesrc.h:
* gst/elements/gstidentity.c: (gst_identity_transform_ip):
* gst/gstsegment.c: (gst_segment_init), (gst_segment_set_duration),
(gst_segment_set_last_stop), (gst_segment_set_seek),
(gst_segment_set_newsegment), (gst_segment_to_stream_time),
(gst_segment_to_running_time), (gst_segment_clip):
* gst/gstsegment.h:
More segment updates, replace code in plugins with segment
helper functions.
2005-11-21 17:09:45 +00:00
|
|
|
|
|
|
|
/*< private >*/
|
libs/gst/base/gstbasetransform.*: Make basetransform virtual method for src events too.
Original commit message from CVS:
* libs/gst/base/gstbasetransform.c:
(gst_base_transform_class_init), (gst_base_transform_init),
(gst_base_transform_sink_event),
(gst_base_transform_sink_eventfunc),
(gst_base_transform_src_event), (gst_base_transform_src_eventfunc),
(gst_base_transform_handle_buffer), (gst_base_transform_chain),
(gst_base_transform_set_property),
(gst_base_transform_get_property),
(gst_base_transform_change_state), (gst_base_transform_update_qos),
(gst_base_transform_set_qos_enabled),
(gst_base_transform_is_qos_enabled):
* libs/gst/base/gstbasetransform.h:
Make basetransform virtual method for src events too.
Handle QOS in basetransform.
API: gst_base_transform_update_qos
API: gst_base_transform_set_qos_enabled
API: gst_base_transform_is_qos_enabled
2006-03-13 11:27:57 +00:00
|
|
|
GstBaseTransformPrivate *priv;
|
|
|
|
|
2015-05-22 15:08:29 +00:00
|
|
|
gpointer _gst_reserved[GST_PADDING_LARGE-1];
|
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
|
|
|
};
|
|
|
|
|
2005-08-24 11:44:24 +00:00
|
|
|
/**
|
2006-05-03 16:45:11 +00:00
|
|
|
* GstBaseTransformClass:
|
2011-03-24 11:22:57 +00:00
|
|
|
* @parent_class: Element parent class
|
2012-04-02 09:09:50 +00:00
|
|
|
* @passthrough_on_same_caps: If set to %TRUE, passthrough mode will be
|
2011-07-22 19:17:42 +00:00
|
|
|
* automatically enabled if the caps are the same.
|
2012-04-02 09:09:50 +00:00
|
|
|
* Set to %FALSE by default.
|
|
|
|
* @transform_ip_on_passthrough: If set to %TRUE, @transform_ip will be called in
|
|
|
|
* passthrough mode. The passed buffer might not be
|
|
|
|
* writable. When %FALSE, neither @transform nor
|
|
|
|
* @transform_ip will be called in passthrough mode.
|
|
|
|
* Set to %TRUE by default.
|
2008-04-25 13:22:32 +00:00
|
|
|
* @transform_caps: Optional. Given the pad in this direction and the given
|
2006-05-03 16:45:11 +00:00
|
|
|
* caps, what caps are allowed on the other pad in this
|
|
|
|
* element ?
|
|
|
|
* @fixate_caps: Optional. Given the pad in this direction and the given
|
2012-02-22 11:24:34 +00:00
|
|
|
* caps, fixate the caps on the other pad. The function takes
|
|
|
|
* ownership of @othercaps and returns a fixated version of
|
|
|
|
* @othercaps. @othercaps is not guaranteed to be writable.
|
2012-07-10 09:46:41 +00:00
|
|
|
* @accept_caps: Optional.
|
2011-07-22 19:17:42 +00:00
|
|
|
* Subclasses can override this method to check if @caps can be
|
|
|
|
* handled by the element. The default implementation might not be
|
|
|
|
* the most optimal way to check this in all cases.
|
|
|
|
* @set_caps: allows the subclass to be notified of the actual caps set.
|
2012-07-10 09:46:41 +00:00
|
|
|
* @query: Optional.
|
2011-08-26 09:09:07 +00:00
|
|
|
* Handle a requested query. Subclasses that implement this
|
|
|
|
* should must chain up to the parent if they didn't handle the
|
|
|
|
* query
|
2011-09-28 09:16:33 +00:00
|
|
|
* @decide_allocation: Setup the allocation parameters for allocating output
|
2011-08-26 09:24:42 +00:00
|
|
|
* buffers. The passed in query contains the result of the
|
|
|
|
* downstream allocation query. This function is only called
|
2012-03-02 16:32:28 +00:00
|
|
|
* when not operating in passthrough mode. The default
|
|
|
|
* implementation will remove all memory dependent metadata.
|
2013-12-07 14:38:19 +00:00
|
|
|
* If there is a @filter_meta method implementation, it will
|
2012-03-02 16:32:28 +00:00
|
|
|
* be called for all metadata API in the downstream query,
|
|
|
|
* otherwise the metadata API is removed.
|
2014-06-05 19:38:20 +00:00
|
|
|
* @filter_meta: Return %TRUE if the metadata API should be proposed in the
|
|
|
|
* upstream allocation query. The default implementation is %NULL
|
2012-03-02 16:32:28 +00:00
|
|
|
* and will cause all metadata to be removed.
|
2012-03-01 13:30:58 +00:00
|
|
|
* @propose_allocation: Propose buffer allocation parameters for upstream elements.
|
|
|
|
* This function must be implemented if the element reads or
|
|
|
|
* writes the buffer content. The query that was passed to
|
2014-06-05 19:38:20 +00:00
|
|
|
* the decide_allocation is passed in this method (or %NULL
|
2012-03-01 13:30:58 +00:00
|
|
|
* when the element is in passthrough mode). The default
|
|
|
|
* implementation will pass the query downstream when in
|
2012-03-02 16:32:28 +00:00
|
|
|
* passthrough mode and will copy all the filtered metadata
|
|
|
|
* API in non-passthrough mode.
|
2008-04-25 13:22:32 +00:00
|
|
|
* @transform_size: Optional. Given the size of a buffer in the given direction
|
2006-05-03 16:45:11 +00:00
|
|
|
* with the given caps, calculate the size in bytes of a buffer
|
|
|
|
* on the other pad with the given other caps.
|
|
|
|
* The default implementation uses get_unit_size and keeps
|
|
|
|
* the number of units the same.
|
|
|
|
* @get_unit_size: Required if the transform is not in-place.
|
|
|
|
* get the size in bytes of one unit for the given caps.
|
|
|
|
* @start: Optional.
|
|
|
|
* Called when the element starts processing.
|
|
|
|
* Allows opening external resources.
|
|
|
|
* @stop: Optional.
|
|
|
|
* Called when the element stops processing.
|
|
|
|
* Allows closing external resources.
|
2011-07-22 19:17:42 +00:00
|
|
|
* @sink_event: Optional.
|
|
|
|
* Event handler on the sink pad. The default implementation
|
|
|
|
* handles the event and forwards it downstream.
|
2006-05-03 16:45:11 +00:00
|
|
|
* @src_event: Optional.
|
2011-07-22 19:17:42 +00:00
|
|
|
* Event handler on the source pad. The default implementation
|
|
|
|
* handles the event and forwards it upstream.
|
2006-05-03 16:45:11 +00:00
|
|
|
* @prepare_output_buffer: Optional.
|
|
|
|
* Subclasses can override this to do their own
|
|
|
|
* allocation of output buffers. Elements that only do
|
|
|
|
* analysis can return a subbuffer or even just
|
2011-07-21 15:42:08 +00:00
|
|
|
* return a reference to the input buffer (if in
|
2011-07-21 15:29:13 +00:00
|
|
|
* passthrough mode). The default implementation will
|
|
|
|
* use the negotiated allocator or bufferpool and
|
2011-07-21 15:42:08 +00:00
|
|
|
* transform_size to allocate an output buffer or it
|
|
|
|
* will return the input buffer in passthrough mode.
|
2011-07-21 15:29:13 +00:00
|
|
|
* @copy_metadata: Optional.
|
|
|
|
* Copy the metadata from the input buffer to the output buffer.
|
|
|
|
* The default implementation will copy the flags, timestamps and
|
|
|
|
* offsets of the buffer.
|
2012-03-02 16:32:28 +00:00
|
|
|
* @transform_meta: Optional. Transform the metadata on the input buffer to the
|
2015-06-29 11:58:04 +00:00
|
|
|
* output buffer. By default this method copies all meta without
|
|
|
|
* tags. subclasses can implement this method and return %TRUE if
|
|
|
|
* the metadata is to be copied.
|
2012-07-10 09:46:41 +00:00
|
|
|
* @before_transform: Optional.
|
2008-12-08 18:35:44 +00:00
|
|
|
* This method is called right before the base class will
|
|
|
|
* start processing. Dynamic properties or other delayed
|
|
|
|
* configuration could be performed in this method.
|
2011-08-26 09:44:12 +00:00
|
|
|
* @transform: Required if the element does not operate in-place.
|
|
|
|
* Transforms one incoming buffer to one outgoing buffer.
|
|
|
|
* The function is allowed to change size/timestamp/duration
|
|
|
|
* of the outgoing buffer.
|
|
|
|
* @transform_ip: Required if the element operates in-place.
|
|
|
|
* Transform the incoming buffer in-place.
|
2015-05-22 15:08:29 +00:00
|
|
|
* @submit_input_buffer: Function which accepts a new input buffer and pre-processes it.
|
|
|
|
* The default implementation performs caps (re)negotiation, then
|
|
|
|
* QoS if needed, and places the input buffer into the @queued_buf
|
|
|
|
* member variable. If the buffer is dropped due to QoS, it returns
|
|
|
|
* GST_BASE_TRANSFORM_FLOW_DROPPED. If this input buffer is not
|
|
|
|
* contiguous with any previous input buffer, then @is_discont
|
2015-06-18 15:51:48 +00:00
|
|
|
* is set to #TRUE. (Since 1.6)
|
2015-05-22 15:08:29 +00:00
|
|
|
* @generate_output: Called after each new input buffer is submitted repeatedly
|
|
|
|
* until it either generates an error or fails to generate an output
|
|
|
|
* buffer. The default implementation takes the contents of the
|
|
|
|
* @queued_buf variable, generates an output buffer if needed
|
|
|
|
* by calling the class @prepare_output_buffer, and then
|
|
|
|
* calls either @transform or @transform_ip. Elements that don't
|
|
|
|
* do 1-to-1 transformations on input to output buffers can either
|
|
|
|
* return GST_BASE_TRANSFORM_FLOW_DROPPED or simply not generate
|
2015-06-18 15:51:48 +00:00
|
|
|
* an output buffer until they are ready to do so. (Since 1.6)
|
2015-05-22 15:08:29 +00:00
|
|
|
*
|
2007-02-15 12:05:09 +00:00
|
|
|
* Subclasses can override any of the available virtual methods or not, as
|
|
|
|
* needed. At minimum either @transform or @transform_ip need to be overridden.
|
|
|
|
* If the element can overwrite the input data with the results (data is of the
|
|
|
|
* same type and quantity) it should provide @transform_ip.
|
2005-08-24 11:44:24 +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
|
|
|
struct _GstBaseTransformClass {
|
|
|
|
GstElementClass parent_class;
|
|
|
|
|
2005-06-27 14:40:09 +00:00
|
|
|
/*< public >*/
|
2011-02-22 18:09:48 +00:00
|
|
|
gboolean passthrough_on_same_caps;
|
2012-04-02 09:09:50 +00:00
|
|
|
gboolean transform_ip_on_passthrough;
|
2005-06-27 14:40:09 +00:00
|
|
|
|
2011-02-22 18:09:48 +00:00
|
|
|
/* virtual methods for subclasses */
|
2005-08-24 13:33:21 +00:00
|
|
|
GstCaps* (*transform_caps) (GstBaseTransform *trans,
|
|
|
|
GstPadDirection direction,
|
2011-05-11 13:12:04 +00:00
|
|
|
GstCaps *caps, GstCaps *filter);
|
2012-02-22 11:24:34 +00:00
|
|
|
GstCaps* (*fixate_caps) (GstBaseTransform *trans,
|
2005-08-24 11:44:24 +00:00
|
|
|
GstPadDirection direction, GstCaps *caps,
|
|
|
|
GstCaps *othercaps);
|
2011-02-22 18:09:48 +00:00
|
|
|
gboolean (*accept_caps) (GstBaseTransform *trans, GstPadDirection direction,
|
|
|
|
GstCaps *caps);
|
|
|
|
gboolean (*set_caps) (GstBaseTransform *trans, GstCaps *incaps,
|
|
|
|
GstCaps *outcaps);
|
2011-08-26 09:24:42 +00:00
|
|
|
gboolean (*query) (GstBaseTransform *trans, GstPadDirection direction,
|
2011-08-26 09:09:07 +00:00
|
|
|
GstQuery *query);
|
2011-02-22 18:09:48 +00:00
|
|
|
|
2011-08-26 12:18:33 +00:00
|
|
|
/* decide allocation query for output buffers */
|
2012-02-22 14:26:05 +00:00
|
|
|
gboolean (*decide_allocation) (GstBaseTransform *trans, GstQuery *query);
|
2012-07-06 09:00:38 +00:00
|
|
|
gboolean (*filter_meta) (GstBaseTransform *trans, GstQuery *query,
|
2012-07-06 09:49:47 +00:00
|
|
|
GType api, const GstStructure *params);
|
2012-03-02 16:32:28 +00:00
|
|
|
|
2012-03-01 13:30:58 +00:00
|
|
|
/* propose allocation query parameters for input buffers */
|
|
|
|
gboolean (*propose_allocation) (GstBaseTransform *trans, GstQuery *decide_query,
|
|
|
|
GstQuery *query);
|
2005-08-24 11:44:24 +00:00
|
|
|
|
2011-06-20 14:47:40 +00:00
|
|
|
/* transform size */
|
2005-08-24 13:33:21 +00:00
|
|
|
gboolean (*transform_size) (GstBaseTransform *trans,
|
2005-08-24 11:44:24 +00:00
|
|
|
GstPadDirection direction,
|
2011-03-21 17:13:55 +00:00
|
|
|
GstCaps *caps, gsize size,
|
|
|
|
GstCaps *othercaps, gsize *othersize);
|
2005-08-24 11:44:24 +00:00
|
|
|
|
2005-08-24 13:33:21 +00:00
|
|
|
gboolean (*get_unit_size) (GstBaseTransform *trans, GstCaps *caps,
|
2011-03-21 17:13:55 +00:00
|
|
|
gsize *size);
|
2005-08-24 11:44:24 +00:00
|
|
|
|
2011-06-20 14:47:40 +00:00
|
|
|
/* states */
|
gst/: Added start/stop methods to transform base class so subclasses don't need to deal with state changes even.
Original commit message from CVS:
* gst/base/gstbasetransform.c: (gst_base_transform_base_init),
(gst_base_transform_class_init), (gst_base_transform_init),
(gst_base_transform_setcaps), (gst_base_transform_handle_buffer),
(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_class_init),
(gst_identity_event), (gst_identity_check_perfect),
(gst_identity_transform), (gst_identity_start),
(gst_identity_stop):
Added start/stop methods to transform base class so subclasses
don't need to deal with state changes even.
2005-03-31 10:10:55 +00:00
|
|
|
gboolean (*start) (GstBaseTransform *trans);
|
|
|
|
gboolean (*stop) (GstBaseTransform *trans);
|
|
|
|
|
2011-07-22 19:17:42 +00:00
|
|
|
/* sink and src pad event handlers */
|
|
|
|
gboolean (*sink_event) (GstBaseTransform *trans, GstEvent *event);
|
2011-02-22 18:09:48 +00:00
|
|
|
gboolean (*src_event) (GstBaseTransform *trans, GstEvent *event);
|
check/elements/identity.c: Make the error a little clearer when the test fails because identity made a copy of the bu...
Original commit message from CVS:
* check/elements/identity.c: (GST_START_TEST):
Make the error a little clearer when the test fails because
identity made a copy of the buffer.
* docs/gst/gstreamer-sections.txt:
New symbols in gstbasetransform.h
* gst/base/gstbasetransform.c: (gst_base_transform_class_init),
(gst_base_transform_init), (gst_base_transform_transform_size),
(gst_base_transform_configure_caps), (gst_base_transform_setcaps),
(gst_base_transform_default_prepare_buf),
(gst_base_transform_get_unit_size),
(gst_base_transform_buffer_alloc),
(gst_base_transform_handle_buffer), (gst_base_transform_chain),
(gst_base_transform_change_state),
(gst_base_transform_set_passthrough),
(gst_base_transform_set_in_place),
(gst_base_transform_is_in_place):
* gst/base/gstbasetransform.h:
Change BaseTransform to separate in_place operate from same_caps
output. in_place implies that the element can perform the transform
on incoming buffers in-place, even if the caps on the output are
different.
Sub-class elements can now implement special buffer allocation
methods for outgoing buffers if they wish to.
Big documentation addition.
* gst/elements/gstcapsfilter.c: (gst_capsfilter_transform_ip):
* gst/elements/gstelements.c:
Changes for basetransform modifications.
* gst/elements/Makefile.am:
* gst/elements/gstfdsrc.c: (gst_fdsrc_init), (gst_fdsrc_create):
Compile fix. Extra debug output.
2005-09-09 17:42:20 +00:00
|
|
|
|
2005-10-15 15:30:24 +00:00
|
|
|
GstFlowReturn (*prepare_output_buffer) (GstBaseTransform * trans,
|
2011-08-26 09:09:07 +00:00
|
|
|
GstBuffer *input, GstBuffer **outbuf);
|
2011-07-21 15:29:13 +00:00
|
|
|
|
2012-03-02 16:32:28 +00:00
|
|
|
/* metadata */
|
|
|
|
gboolean (*copy_metadata) (GstBaseTransform *trans, GstBuffer *input,
|
2011-08-26 09:09:07 +00:00
|
|
|
GstBuffer *outbuf);
|
2012-03-02 16:32:28 +00:00
|
|
|
gboolean (*transform_meta) (GstBaseTransform *trans, GstBuffer *outbuf,
|
|
|
|
GstMeta *meta, GstBuffer *inbuf);
|
check/elements/identity.c: Make the error a little clearer when the test fails because identity made a copy of the bu...
Original commit message from CVS:
* check/elements/identity.c: (GST_START_TEST):
Make the error a little clearer when the test fails because
identity made a copy of the buffer.
* docs/gst/gstreamer-sections.txt:
New symbols in gstbasetransform.h
* gst/base/gstbasetransform.c: (gst_base_transform_class_init),
(gst_base_transform_init), (gst_base_transform_transform_size),
(gst_base_transform_configure_caps), (gst_base_transform_setcaps),
(gst_base_transform_default_prepare_buf),
(gst_base_transform_get_unit_size),
(gst_base_transform_buffer_alloc),
(gst_base_transform_handle_buffer), (gst_base_transform_chain),
(gst_base_transform_change_state),
(gst_base_transform_set_passthrough),
(gst_base_transform_set_in_place),
(gst_base_transform_is_in_place):
* gst/base/gstbasetransform.h:
Change BaseTransform to separate in_place operate from same_caps
output. in_place implies that the element can perform the transform
on incoming buffers in-place, even if the caps on the output are
different.
Sub-class elements can now implement special buffer allocation
methods for outgoing buffers if they wish to.
Big documentation addition.
* gst/elements/gstcapsfilter.c: (gst_capsfilter_transform_ip):
* gst/elements/gstelements.c:
Changes for basetransform modifications.
* gst/elements/Makefile.am:
* gst/elements/gstfdsrc.c: (gst_fdsrc_init), (gst_fdsrc_create):
Compile fix. Extra debug output.
2005-09-09 17:42:20 +00:00
|
|
|
|
2008-12-08 18:35:44 +00:00
|
|
|
void (*before_transform) (GstBaseTransform *trans, GstBuffer *buffer);
|
|
|
|
|
2011-06-20 14:47:40 +00:00
|
|
|
/* transform */
|
2011-02-22 18:09:48 +00:00
|
|
|
GstFlowReturn (*transform) (GstBaseTransform *trans, GstBuffer *inbuf,
|
|
|
|
GstBuffer *outbuf);
|
|
|
|
GstFlowReturn (*transform_ip) (GstBaseTransform *trans, GstBuffer *buf);
|
2010-06-14 10:36:54 +00:00
|
|
|
|
2015-05-22 15:08:29 +00:00
|
|
|
GstFlowReturn (*submit_input_buffer) (GstBaseTransform *trans, gboolean is_discont, GstBuffer *input);
|
|
|
|
GstFlowReturn (*generate_output) (GstBaseTransform *trans, GstBuffer **outbuf);
|
|
|
|
|
2005-08-08 13:31:09 +00:00
|
|
|
/*< private >*/
|
2015-05-22 15:08:29 +00:00
|
|
|
gpointer _gst_reserved[GST_PADDING_LARGE - 2];
|
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
|
|
|
};
|
|
|
|
|
More segment updates, replace code in plugins with segment helper functions.
Original commit message from CVS:
* check/gst/gstsegment.c: (GST_START_TEST):
* docs/design/part-TODO.txt:
* gst/base/gstbasesink.c: (gst_base_sink_handle_object),
(gst_base_sink_event), (gst_base_sink_do_sync),
(gst_base_sink_activate_pull), (gst_base_sink_get_position),
(gst_base_sink_query), (gst_base_sink_change_state):
* gst/base/gstbasesink.h:
* gst/base/gstbasesrc.c: (gst_base_src_init), (gst_base_src_query),
(gst_base_src_default_newsegment),
(gst_base_src_configure_segment), (gst_base_src_do_seek),
(gst_base_src_get_range), (gst_base_src_loop),
(gst_base_src_change_state):
* gst/base/gstbasesrc.h:
* gst/base/gstbasetransform.c:
(gst_base_transform_prepare_output_buf),
(gst_base_transform_event), (gst_base_transform_change_state):
* gst/base/gstbasetransform.h:
* gst/base/gstcollectpads.c: (gst_collect_pads_add_pad),
(gst_collect_pads_event):
* gst/base/gstcollectpads.h:
* gst/elements/gstfakesrc.c: (gst_fake_src_init),
(gst_fake_src_create):
* gst/elements/gstfakesrc.h:
* gst/elements/gstidentity.c: (gst_identity_transform_ip):
* gst/gstsegment.c: (gst_segment_init), (gst_segment_set_duration),
(gst_segment_set_last_stop), (gst_segment_set_seek),
(gst_segment_set_newsegment), (gst_segment_to_stream_time),
(gst_segment_to_running_time), (gst_segment_clip):
* gst/gstsegment.h:
More segment updates, replace code in plugins with segment
helper functions.
2005-11-21 17:09:45 +00:00
|
|
|
GType gst_base_transform_get_type (void);
|
|
|
|
|
|
|
|
void gst_base_transform_set_passthrough (GstBaseTransform *trans,
|
|
|
|
gboolean passthrough);
|
|
|
|
gboolean gst_base_transform_is_passthrough (GstBaseTransform *trans);
|
gst/base/gstbasetransform.*: Make passthrough work using the bufferpools.
Original commit message from CVS:
* gst/base/gstbasetransform.c: (gst_base_transform_init),
(gst_base_transform_transform_caps), (gst_base_transform_getcaps),
(gst_base_transform_configure_caps), (gst_base_transform_setcaps),
(gst_base_transform_get_size), (gst_base_transform_buffer_alloc),
(gst_base_transform_handle_buffer), (gst_base_transform_getrange),
(gst_base_transform_chain), (gst_base_transform_change_state),
(gst_base_transform_set_passthrough),
(gst_base_transform_is_passthrough):
* gst/base/gstbasetransform.h:
Make passthrough work using the bufferpools.
Changed API a bit, subclasses have to write into a buffer
provided by the base class.
More debug info in nego functions.
* gst/elements/gstidentity.c: (gst_identity_init),
(gst_identity_transform):
Port to new base class.
2005-07-15 10:41:32 +00:00
|
|
|
|
More segment updates, replace code in plugins with segment helper functions.
Original commit message from CVS:
* check/gst/gstsegment.c: (GST_START_TEST):
* docs/design/part-TODO.txt:
* gst/base/gstbasesink.c: (gst_base_sink_handle_object),
(gst_base_sink_event), (gst_base_sink_do_sync),
(gst_base_sink_activate_pull), (gst_base_sink_get_position),
(gst_base_sink_query), (gst_base_sink_change_state):
* gst/base/gstbasesink.h:
* gst/base/gstbasesrc.c: (gst_base_src_init), (gst_base_src_query),
(gst_base_src_default_newsegment),
(gst_base_src_configure_segment), (gst_base_src_do_seek),
(gst_base_src_get_range), (gst_base_src_loop),
(gst_base_src_change_state):
* gst/base/gstbasesrc.h:
* gst/base/gstbasetransform.c:
(gst_base_transform_prepare_output_buf),
(gst_base_transform_event), (gst_base_transform_change_state):
* gst/base/gstbasetransform.h:
* gst/base/gstcollectpads.c: (gst_collect_pads_add_pad),
(gst_collect_pads_event):
* gst/base/gstcollectpads.h:
* gst/elements/gstfakesrc.c: (gst_fake_src_init),
(gst_fake_src_create):
* gst/elements/gstfakesrc.h:
* gst/elements/gstidentity.c: (gst_identity_transform_ip):
* gst/gstsegment.c: (gst_segment_init), (gst_segment_set_duration),
(gst_segment_set_last_stop), (gst_segment_set_seek),
(gst_segment_set_newsegment), (gst_segment_to_stream_time),
(gst_segment_to_running_time), (gst_segment_clip):
* gst/gstsegment.h:
More segment updates, replace code in plugins with segment
helper functions.
2005-11-21 17:09:45 +00:00
|
|
|
void gst_base_transform_set_in_place (GstBaseTransform *trans,
|
|
|
|
gboolean in_place);
|
|
|
|
gboolean gst_base_transform_is_in_place (GstBaseTransform *trans);
|
check/elements/identity.c: Make the error a little clearer when the test fails because identity made a copy of the bu...
Original commit message from CVS:
* check/elements/identity.c: (GST_START_TEST):
Make the error a little clearer when the test fails because
identity made a copy of the buffer.
* docs/gst/gstreamer-sections.txt:
New symbols in gstbasetransform.h
* gst/base/gstbasetransform.c: (gst_base_transform_class_init),
(gst_base_transform_init), (gst_base_transform_transform_size),
(gst_base_transform_configure_caps), (gst_base_transform_setcaps),
(gst_base_transform_default_prepare_buf),
(gst_base_transform_get_unit_size),
(gst_base_transform_buffer_alloc),
(gst_base_transform_handle_buffer), (gst_base_transform_chain),
(gst_base_transform_change_state),
(gst_base_transform_set_passthrough),
(gst_base_transform_set_in_place),
(gst_base_transform_is_in_place):
* gst/base/gstbasetransform.h:
Change BaseTransform to separate in_place operate from same_caps
output. in_place implies that the element can perform the transform
on incoming buffers in-place, even if the caps on the output are
different.
Sub-class elements can now implement special buffer allocation
methods for outgoing buffers if they wish to.
Big documentation addition.
* gst/elements/gstcapsfilter.c: (gst_capsfilter_transform_ip):
* gst/elements/gstelements.c:
Changes for basetransform modifications.
* gst/elements/Makefile.am:
* gst/elements/gstfdsrc.c: (gst_fdsrc_init), (gst_fdsrc_create):
Compile fix. Extra debug output.
2005-09-09 17:42:20 +00:00
|
|
|
|
2006-05-03 16:45:11 +00:00
|
|
|
void gst_base_transform_update_qos (GstBaseTransform *trans,
|
|
|
|
gdouble proportion,
|
|
|
|
GstClockTimeDiff diff,
|
libs/gst/base/gstbasetransform.*: Make basetransform virtual method for src events too.
Original commit message from CVS:
* libs/gst/base/gstbasetransform.c:
(gst_base_transform_class_init), (gst_base_transform_init),
(gst_base_transform_sink_event),
(gst_base_transform_sink_eventfunc),
(gst_base_transform_src_event), (gst_base_transform_src_eventfunc),
(gst_base_transform_handle_buffer), (gst_base_transform_chain),
(gst_base_transform_set_property),
(gst_base_transform_get_property),
(gst_base_transform_change_state), (gst_base_transform_update_qos),
(gst_base_transform_set_qos_enabled),
(gst_base_transform_is_qos_enabled):
* libs/gst/base/gstbasetransform.h:
Make basetransform virtual method for src events too.
Handle QOS in basetransform.
API: gst_base_transform_update_qos
API: gst_base_transform_set_qos_enabled
API: gst_base_transform_is_qos_enabled
2006-03-13 11:27:57 +00:00
|
|
|
GstClockTime timestamp);
|
2006-05-03 16:45:11 +00:00
|
|
|
void gst_base_transform_set_qos_enabled (GstBaseTransform *trans,
|
libs/gst/base/gstbasetransform.*: Make basetransform virtual method for src events too.
Original commit message from CVS:
* libs/gst/base/gstbasetransform.c:
(gst_base_transform_class_init), (gst_base_transform_init),
(gst_base_transform_sink_event),
(gst_base_transform_sink_eventfunc),
(gst_base_transform_src_event), (gst_base_transform_src_eventfunc),
(gst_base_transform_handle_buffer), (gst_base_transform_chain),
(gst_base_transform_set_property),
(gst_base_transform_get_property),
(gst_base_transform_change_state), (gst_base_transform_update_qos),
(gst_base_transform_set_qos_enabled),
(gst_base_transform_is_qos_enabled):
* libs/gst/base/gstbasetransform.h:
Make basetransform virtual method for src events too.
Handle QOS in basetransform.
API: gst_base_transform_update_qos
API: gst_base_transform_set_qos_enabled
API: gst_base_transform_is_qos_enabled
2006-03-13 11:27:57 +00:00
|
|
|
gboolean enabled);
|
|
|
|
gboolean gst_base_transform_is_qos_enabled (GstBaseTransform *trans);
|
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
|
|
|
|
2007-12-14 16:52:38 +00:00
|
|
|
void gst_base_transform_set_gap_aware (GstBaseTransform *trans,
|
|
|
|
gboolean gap_aware);
|
|
|
|
|
2012-10-04 09:15:36 +00:00
|
|
|
void gst_base_transform_set_prefer_passthrough (GstBaseTransform *trans,
|
|
|
|
gboolean prefer_passthrough);
|
|
|
|
|
2012-08-07 15:38:53 +00:00
|
|
|
GstBufferPool * gst_base_transform_get_buffer_pool (GstBaseTransform *trans);
|
|
|
|
void gst_base_transform_get_allocator (GstBaseTransform *trans,
|
|
|
|
GstAllocator **allocator,
|
|
|
|
GstAllocationParams *params);
|
|
|
|
|
2012-02-24 10:00:21 +00:00
|
|
|
void gst_base_transform_reconfigure_sink (GstBaseTransform *trans);
|
|
|
|
void gst_base_transform_reconfigure_src (GstBaseTransform *trans);
|
2015-02-20 16:50:48 +00:00
|
|
|
gboolean gst_base_transform_update_src_caps (GstBaseTransform *trans,
|
|
|
|
GstCaps *updated_caps);
|
2015-11-10 17:38:59 +00:00
|
|
|
#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
|
|
|
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstBaseTransform, gst_object_unref)
|
|
|
|
#endif
|
|
|
|
|
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
|
|
|
G_END_DECLS
|
|
|
|
|
|
|
|
#endif /* __GST_BASE_TRANSFORM_H__ */
|