Commit graph

75 commits

Author SHA1 Message Date
Wim Taymans 3f80cb272e query: use more generic structure for meta params 2012-07-06 11:49:47 +02:00
Wim Taymans 8173622844 query: add flags to allocation query
Make it possible to add API specific flags to the ALLOCATION query. This makes
it possible to also check what kinds of subfeatures of the metadata API are
supported.
2012-07-06 11:00:38 +02:00
Wim Taymans a3d5db491c trans: add transform_ip_on_passthrough
Add an option to control if transform_ip is called in passthrough mode or not.
for elements that don't want to look at the data in passthrough mode, this can
avoid some extra processing, mostly in subclasses.
2012-04-02 11:09:50 +02:00
Wim Taymans 07c9fba116 basetransform: make more stuff private 2012-03-16 22:51:14 +01:00
Wim Taymans 7eae198be2 basetransform: refine metadata filter and transform
Add a vmethod to filter metadata that should be passed upstream. By default,
don't pass anything.
Add a vmethod to transform metadata from the input buffer to the output buffer.
By default, nothing is transformed or copied.
2012-03-02 17:32:28 +01:00
Wim Taymans bdcf1dc3cd basetransform: remove metadata tagged with the memory tag
Remove metadata that describes the particular memory of the buffer it is
attached to. We need to do this because in non-passthrough mode we will allocate
new memory for our output buffer.
2012-03-01 17:41:57 +01:00
Wim Taymans d6a28a6e3a basetransform: improve propose_allocation
Improve the propose allocation vmethod by passing the downstream allocation
query to it. This way the vmethod implementation can use properties of the
downstream allocation to generate the upstream query result. If there is no
downstream quety, it means that the element is working in passthrough mode.
Implement a default decide_allocation.
2012-03-01 17:41:57 +01:00
Wim Taymans beea57dca7 basetransform: fix reconfigure methods
Rename gst_base_transform_suggest to gst_base_transform_reconfigure_sink because
that is what it does. Also remove the caps and size because that is not needed.
Rename gst_base_transform_reconfigure to gst_base_transform_reconfigure_src.
Remove some old unused code in capsfilter.
2012-02-24 11:00:21 +01:00
Wim Taymans d052c778af basetransform: remove transform lock
This is not needed anymore by the baseclass. subclasses should do their own
locking when needed.
2012-02-23 11:08:26 +01:00
Wim Taymans f3ca3f89f7 basetransform: improve propose_allocation
Always call the propose_allocation method and provide a default implementation
that passes the query on in passthrough mode so that subclasses can also call
this. Also pass if the transform is in passthrough mode so that the
implementation can adjust its algorithm.
2012-02-22 15:26:05 +01:00
Wim Taymans 90a82c7e81 basetrans: improve fixate_caps function
Make it possible to also implement non-inplace fixate functions. Let the fixate
function make the caps writable when needed because some fixate functions might
not need to modify the caps.
2012-02-22 12:24:34 +01:00
Wim Taymans 252327f87a Update for new gthread API 2012-01-19 09:27:04 +01:00
Sebastian Dröge b56bef1418 basetransform: Always call ::propose_allocation vfunc
And only forward the allocation query if we're working in
passthrough mode if no ::propose_allocation is implemented.
In place buffer transformations will change the buffer
content and require explicit handling of all metas.
2012-01-18 12:07:46 +01:00
Wim Taymans 947276484f docs: fix some more docs 2011-09-28 11:16:33 +02:00
Wim Taymans d924c30f5b base: rename allocation vmethods
Name the allocation vmethod on srcpad decide_allocation because source pads will
have to decide what allocation parameters will be used.
Name the allocation vmethod on sinkpads propose_allocation because they will
need to configure the allocation query with a proposed values for upstream.
2011-08-26 14:18:33 +02:00
Wim Taymans 5c8efa9ffe basetransform: remove some unused variables 2011-08-26 12:28:28 +02:00
Wim Taymans b91a5ab60a basetransform: add vmethod to configure upstream bufferpool
Add a vmethod that can be implemented to influence the bufferpool that upstream
elements will use.
2011-08-26 11:44:12 +02:00
Wim Taymans f1566e85c0 basetransform: use pad direction like other vmethods 2011-08-26 11:24:42 +02:00
Wim Taymans 31b70ea701 Merge branch 'master' into 0.11
Conflicts:
	libs/gst/base/gstbasetransform.c
	libs/gst/base/gstbasetransform.h
2011-08-26 11:09:07 +02:00
Sjoerd Simons 63a21ca8b1 BaseTransform: Add a query vfunc 2011-08-26 10:39:44 +02:00
Wim Taymans e4db8d0f55 docs: improve some docs 2011-08-17 09:25:04 +02:00
Wim Taymans 2ff17fb622 basetransform: fix sink event handling
Implement the sink event handling like the src event handler. Make the default
implementation parse and forward the event. This makes it possible to actually
return an error value from the event handler.
2011-07-22 21:17:42 +02:00
Wim Taymans 85d2355125 basetrans: Remove ref in passthrough
Remove the requirement to have to return a ref to the input buffer when in
passthrough mode. This saves a few ref/unref cycles and fixes another 0.11
FIXME.
2011-07-21 17:42:08 +02:00
Wim Taymans 70d13ae70e basetransform: make new copy_metadata vmethod
Make a new copy_metadata vmethod and move the code to copy the timestamps, flags
and offsets into a default implementation. This will allow us to give the
subclasses a chance to override the copy method.
2011-07-21 17:29:13 +02:00
Wim Taymans e4ee356449 basetrans: remove useless variables from prepare_output_buffer
Remove the caps and size from the prepare_output_buffer function. with
bufferpools and capsnego done differently, we don't need this in most cases and
if we do, we can simply use the transform_size function and get the caps from
the srcpad.
2011-07-21 13:56:11 +02:00
Wim Taymans 3822eea7cf basetransform: inprove allocation handling
Add vmethod for subclasses to influence the pool and allocator.
Log when query fails.
Respect negotiated allocator and alignment.
2011-06-20 16:53:04 +02:00
Sebastian Dröge bdf9022861 base: Improve negotiation with new getcaps() filter 2011-05-16 15:33:10 +02:00
Wim Taymans bdbc069348 Rework GstSegment handling
Improve GstSegment, rename some fields. The idea is to have the GstSegment
structure represent the timing structure of the buffers as they are generated by
the source or demuxer element.
gst_segment_set_seek() -> gst_segment_do_seek()
Rename the NEWSEGMENT event to SEGMENT.
Make parsing of the SEGMENT event into a GstSegment structure.
Pass a GstSegment structure when making a new SEGMENT event. This allows us to
pass the timing info directly to the next element. No accumulation is needed in
the receiving element, all the info is inside the element.
Remove gst_segment_set_newsegment(): This function as used to accumulate
segments received from upstream, which is now not needed anymore because the
segment event contains the complete timing information.
2011-05-16 11:37:52 +02:00
Wim Taymans a12ede3fb1 Merge branch 'master' into 0.11-fdo
Conflicts:
	gst/gst.c
	libs/gst/base/gstcollectpads.c
2011-03-28 20:11:20 +02:00
Wim Taymans d82c8bd2af memory: port code to new buffer data API 2011-03-28 20:08:45 +02:00
Stefan Kost 02eda0e3d9 docs: cleanup and xref fixes
Deal with the hints from gtk-doc and fix the xrefs. Apply a work-around for ()
precedence over @. Move "MT Safe" text to doc body in many places. Trim eol
whitespaces.
2011-03-24 18:32:20 +02:00
Wim Taymans 1218511185 libs: cleanups for 0.11
Remove deprecated stuff, fix padding, rearrange methods.
2011-02-22 19:09:48 +01:00
Tim-Philipp Müller b0d7c61f18 docs: fix misc. gtk-doc warnings in libs
(for gtk-doc 1.15)
2010-10-16 19:19:47 +01:00
Wim Taymans 76f7a001fc basetransform: add accept_caps vmethod
Allow subclasses to override the acceptcaps function because in some cases a
custom implementation can be much much faster than the default one.

See #621190
2010-06-14 12:45:20 +02:00
Wim Taymans b90bef8ee5 libs/gst/base/gstbasetransform.*: Add vmethod that is called before we start the transform and which can be used to c...
Original commit message from CVS:
* libs/gst/base/gstbasetransform.c:
(gst_base_transform_prepare_output_buffer),
(gst_base_transform_getrange), (gst_base_transform_chain):
* libs/gst/base/gstbasetransform.h:
Add vmethod that is called before we start the transform and which can
be used to configure the transform, such as dynamic properties.
2008-12-08 18:35:44 +00:00
Wim Taymans 8337ce91aa Implement method for reconfiguring basetransform.
Original commit message from CVS:
* docs/libs/gstreamer-libs-sections.txt:
* libs/gst/base/gstbasetransform.c:
(gst_base_transform_handle_buffer), (gst_base_transform_getrange),
(gst_base_transform_chain), (gst_base_transform_suggest),
(gst_base_transform_reconfigure):
* libs/gst/base/gstbasetransform.h:
Implement method for reconfiguring basetransform.
API: GstBaseTransform::gst_base_transform_reconfigure()
2008-08-20 10:52:09 +00:00
Wim Taymans 30f8603645 docs/libs/gstreamer-libs-sections.txt: Add new function:
Original commit message from CVS:
* docs/libs/gstreamer-libs-sections.txt:
Add new function:
API: GstBaseTransform::gst_base_transform_suggest()
* libs/gst/base/gstbasetransform.c: (gst_base_transform_finalize),
(gst_base_transform_init), (gst_base_transform_transform_caps),
(gst_base_transform_transform_size),
(gst_base_transform_configure_caps),
(gst_base_transform_can_transform),
(gst_base_transform_find_transform), (gst_base_transform_setcaps),
(gst_base_transform_prepare_output_buffer),
(gst_base_transform_buffer_alloc),
(gst_base_transform_handle_buffer), (gst_base_transform_getrange),
(gst_base_transform_chain), (gst_base_transform_activate),
(gst_base_transform_set_passthrough),
(gst_base_transform_is_passthrough),
(gst_base_transform_set_in_place),
(gst_base_transform_is_in_place), (gst_base_transform_update_qos),
(gst_base_transform_set_qos_enabled),
(gst_base_transform_is_qos_enabled),
(gst_base_transform_set_gap_aware), (gst_base_transform_suggest),
(gst_base_transform_reconfigure):
* libs/gst/base/gstbasetransform.h:
Rewrite of basetransform to perform negotiation outside of the
buffer_alloc functions.  Fixes #545853.
* tests/check/libs/transform1.c: (GST_START_TEST),
(buffer_alloc_ct2):
Update unit test.
2008-08-05 11:11:00 +00:00
Stefan Kost f368d089df libs/gst/base/: Fix doc typos and unify caps a bit.
Original commit message from CVS:
* libs/gst/base/gstbasesink.h:
* libs/gst/base/gstbasesrc.h:
* libs/gst/base/gstbasetransform.h:
* libs/gst/base/gstcollectpads.h:
Fix doc typos and unify caps a bit.
2008-04-25 13:22:32 +00:00
Sebastian Dröge 5f55ba792a API: Add gst_base_transform_set_gap_aware() to control whether the element correctly handles GST_BUFFER_FLAG_GAP or s...
Original commit message from CVS:
* docs/libs/gstreamer-libs-sections.txt:
* libs/gst/base/gstbasetransform.c: (gst_base_transform_init),
(gst_base_transform_prepare_output_buffer),
(gst_base_transform_set_gap_aware):
* libs/gst/base/gstbasetransform.h:
API: Add gst_base_transform_set_gap_aware() to control whether
the element correctly handles GST_BUFFER_FLAG_GAP or shouldn't
get buffers with this flag at all. Fixes #503231.
2007-12-14 16:52:38 +00:00
Wim Taymans 58cc3d675b libs/gst/base/gstbasetransform.c: Work around the brokenness of the event vmethod in basetransform. Prefer to return ...
Original commit message from CVS:
* libs/gst/base/gstbasetransform.c:
(gst_base_transform_sink_event):
Work around the brokenness of the event vmethod in basetransform. Prefer
to return TRUE when the subclass returned FALSE (meaning don't forward
the event).
* libs/gst/base/gstbasetransform.h:
Clarify the docs.
2007-06-15 10:48:19 +00:00
Wim Taymans caa1b7d068 libs/gst/base/gstbasetransform.h: Fix macro for locking/unlocking the transform lock.
Original commit message from CVS:
* libs/gst/base/gstbasetransform.h:
Fix macro for locking/unlocking the transform lock.
2007-05-21 11:29:28 +00:00
Stefan Kost 63a26ed519 docs/random/ensonic/dynlink.txt: More work on proposal for new core api.
Original commit message from CVS:
* docs/random/ensonic/dynlink.txt:
More work on proposal for new core api.
* docs/libs/gstreamer-libs-sections.txt:
* libs/gst/base/gstbasetransform.h:
API: GST_BASE_TRANSFORM_LOCK/UNLOCK added
* libs/gst/controller/gstcontroller.c:
(on_object_controlled_property_changed),
(gst_controller_sync_values),
(gst_controller_set_interpolation_mode):
* libs/gst/controller/gstcontroller.h:
Less verbose logging add docs for unimplemented parts and correctly
return when using unavailable parts.
2007-04-02 14:48:12 +00:00
Wim Taymans ecc37d9389 libs/gst/base/gstbasetransform.*: Add support for dropping buffers with custom GstFlowReturn.
Original commit message from CVS:
* libs/gst/base/gstbasetransform.c:
(gst_base_transform_sink_eventfunc),
(gst_base_transform_handle_buffer), (gst_base_transform_chain),
(gst_base_transform_activate):
* libs/gst/base/gstbasetransform.h:
Add support for dropping buffers with custom GstFlowReturn.
Set DISCONT flags on outgoing buffers based on QoS, incomming DISCONT
buffers or dropped buffers.
* docs/libs/gstreamer-libs-sections.txt:
docs for new custom return code.
* plugins/elements/gstidentity.c: (gst_identity_transform_ip):
Use drop support in base class to implement drop-probability.
2007-03-08 11:40:18 +00:00
Stefan Kost efb8033bac More docs coverage and some ChangeLog surgery (add missing names)
Original commit message from CVS:
* gst/gstchildproxy.h:
* libs/gst/base/gstbasesink.h:
* libs/gst/base/gstbasesrc.h:
* libs/gst/base/gstbasetransform.h:
More docs coverage and some ChangeLog surgery (add missing names)
2007-02-15 12:05:09 +00:00
Thomas Vander Stichele da6dcf9a64 docs/libs/gstreamer-libs-sections.txt: make sure GstBaseTransformClass shows up in the docs
Original commit message from CVS:

* docs/libs/gstreamer-libs-sections.txt:
make sure GstBaseTransformClass shows up in the docs
* libs/gst/base/gstbasetransform.c:
* libs/gst/base/gstbasetransform.h:
move docs so gtk-doc picks it up now
2006-05-03 16:45:11 +00:00
Stefan Kost 7e2286d79c Fix broken GObject macros
Original commit message from CVS:
* gst/gstindex.h:
* gst/gstxml.h:
* libs/gst/base/gstadapter.h:
* libs/gst/base/gstbasesink.h:
* libs/gst/base/gstbasesrc.h:
* libs/gst/base/gstbasetransform.h:
* libs/gst/base/gstcollectpads.h:
* libs/gst/base/gstpushsrc.h:
Fix broken GObject macros
2006-04-08 18:05:16 +00:00
Wim Taymans 1dcaa1fc4b 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
Wim Taymans c45bd3fb9f Fix #333669, Add pad accessor defines for GstBaseTransform
Original commit message from CVS:
* docs/libs/gstreamer-libs-sections.txt:
* libs/gst/base/gstbasetransform.h:
Fix #333669, Add pad accessor defines for GstBaseTransform
Fix docs for GstBaseSrc.
2006-03-07 15:14:51 +00:00
Wim Taymans 37d77aaeee Small documentation fixes.
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstbuffer.h:
* gst/gstvalue.c:
* libs/gst/base/gstbasetransform.h:
Small documentation fixes.
2006-03-07 15:08:57 +00:00
Wim Taymans 588e11ad39 libs/gst/: Documentation updates.
Original commit message from CVS:
* libs/gst/base/gstadapter.c:
* libs/gst/base/gstadapter.h:
* libs/gst/base/gstbasesink.c: (gst_base_sink_class_init),
(gst_base_sink_get_position):
* libs/gst/base/gstbasesink.h:
* libs/gst/base/gstbasesrc.c: (gst_base_src_class_init),
(gst_base_src_default_query), (gst_base_src_default_do_seek),
(gst_base_src_do_seek), (gst_base_src_perform_seek),
(gst_base_src_send_event), (gst_base_src_update_length),
(gst_base_src_get_range), (gst_base_src_loop),
(gst_base_src_start):
* libs/gst/base/gstbasesrc.h:
* libs/gst/base/gstbasetransform.h:
* libs/gst/base/gstcollectpads.h:
* libs/gst/base/gstpushsrc.c:
* libs/gst/base/gstpushsrc.h:
* libs/gst/dataprotocol/dataprotocol.c:
* libs/gst/dataprotocol/dataprotocol.h:
* libs/gst/net/gstnetclientclock.h:
* libs/gst/net/gstnettimeprovider.h:
Documentation updates.
2005-12-18 16:04:41 +00:00