Commit graph

176 commits

Author SHA1 Message Date
Stéphane Cerveau 783e19b04c coreelements: allow per features registration
Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661>
2020-12-10 12:45:16 +01:00
Mathieu Duponchelle 0c1ce6e8c4 utils: expose GstPluginAPIFlags
These can be passed to gst_type_mark_as_plugin_api, to inform
plugin cache generation.

For now a single flag is specified, "IGNORE_ENUM_MEMBERS", it
can be used for dynamically generated enums to avoid documenting
environment-specific enumeration members. An example is
GstX265EncTune.
2020-06-06 00:38:29 +02:00
Sebastian Dröge 5bdbde32da plugins: Use gst_type_mark_as_plugin_api() for all non-element plugin types 2020-06-04 15:49:24 -04:00
Sebastian Dröge d25a88e3a1 tee: First deactivate the pad and then remove it when releasing pads
This reverts a96002bb28, which is not
necessary anymore. If we release the pad after removing it then none of
the deactivation code will actually be called because the pad has no
parent anymore, and we require a parent on the pad for deactivation to
happen.

This can then, among other things, cause a streaming thread to be still
stuck in a pad probe because the pad was never flushed, and waiting
there forever because now the pad will actually never be flushed anymore.
2019-10-24 22:49:41 +00:00
Sebastian Dröge 7f7da6a0d0 tee: Check for the removed pad flag also in the slow pushing path
If a pad is currently being released we don't want to forward the
FLUSHING flow return but instead consider it as NOT_LINKED. FLUSHING
would also cause upstream to be FLUSHING.

This part was missed in a3c4a3201a and
resulted in a different (and wrong) workaround in
a96002bb28.
2019-10-24 22:49:41 +00:00
Sebastian Dröge aa29864317 tee: Lock mutex before reading the removed flag of the pads
Otherwise we're not guaranteed to read the very latest value that
another thread might've written in there when the pad was released, and
could instead work with an old value.
2019-10-24 22:49:41 +00:00
luz.paz 4a402c1c7d Fix typos in comments and docs
Found via `codespell`

https://bugzilla.gnome.org/show_bug.cgi?id=795610
2018-05-01 11:18:03 +01:00
Stefan Sauer 21c3f0ff22 tee: don't create a pool if none is needed
If the aggregated size is 0 and we create a pool, the pool would provide
buffers with no memory assigned. Handle that case and skip the pool.
This was the behaviour before cf803ea9f4.

Add a test for this scenario.

https://bugzilla.gnome.org/show_bug.cgi?id=730758
2017-10-02 13:58:04 -04:00
Nicolas Dufresne 1cd0dd3503 tee: Allocate one more buffer when multi-plexing
This extra buffer ensure that the downstream threads are not starved
when multiplexing a stream.

https://bugzilla.gnome.org/show_bug.cgi?id=730758
2017-09-05 16:00:09 -04:00
Nicolas Dufresne cf803ea9f4 tee: Implement allocation query aggregation
This will aggregate allocation params, pool and will keep all
meta that has no parameters.

https://bugzilla.gnome.org/show_bug.cgi?id=730758
2017-09-05 16:00:09 -04:00
Nicolas Dufresne 945322f5a6 tee: Deprecate alloc-pad property
It has no effect, not implemented, and would lead to bad rendering.

https://bugzilla.gnome.org/show_bug.cgi?id=730758
2017-09-05 15:59:46 -04:00
Thibault Saunier a87b4551a6 Port gtk-doc comments to their equivalent markdown syntax
Modernizing our documentation and preparing a possible move to hotdoc.
This commits also adds missing @title metadatas to all SECTIONs
2017-01-27 16:36:38 -03:00
Sebastian Dröge e02405b284 elements: Handle GstIterator RESYNC return value correctly in gst_iterator_foreach() 2016-12-05 11:01:45 +02:00
Sebastian Dröge 25bf63d6f7 tee: Set GST_PAD_FLAG_PROXY_CAPS before forwarding sticky events
https://bugzilla.gnome.org/show_bug.cgi?id=752213
2016-11-01 20:53:43 +02:00
Nicolas Dufresne 4603722e2d tee: Properly handle return value when only 1 pad
This patch handle the case when you have 1 pad (so the fast path is
being used) but this pad is removed. If we are in allow-not-linked, we
should return GST_FLOW_OK, otherwise, we should return GST_FLOW_UNLINKED
and ignore the meaningless return value obtained from pushing.

https://bugzilla.gnome.org/show_bug.cgi?id=767413
2016-06-17 13:03:20 +03:00
Tim-Philipp Müller cf0680017e elements: use new gst_element_class_add_static_pad_template()
https://bugzilla.gnome.org/show_bug.cgi?id=762778
2016-02-28 13:10:07 +00:00
Sebastian Dröge 7e761798bd tee: Check if parsing the name template with sscanf() was successful
If not, go back to the automatic pad numbering.

CID 1195129
2015-12-14 13:06:57 +01:00
Tim-Philipp Müller a7ea17a83d tee: fix typo in allow-not-linked property description 2015-07-14 12:44:31 +01:00
Tim-Philipp Müller 1a9a3c7ef9 docs: gst-launch -> gst-launch-1.0 in example pipelines
And some small example pipeline fix-ups.
2015-05-10 11:35:50 +01:00
Tim-Philipp Müller 3191440485 tee: fix use of possibly-freed pad in debug statement
The gst_object_unref() in the block above may be dropping
the last ref to the pad and free the pad. Set pad pointer
to NULL here, so that we don't accidentally use a
possibly-freed pad pointer in the debug log statements
further below, and also use the tee element as log object
since that's more appropriate anyway.

Fixes valgrind warnings and crashes in tee test_stress
unit test when debug logging is enabled.
2015-04-18 12:01:54 +01:00
Jose Antonio Santos Cadenas 3e8e0a7065 tee: Add allow-not-linked property
This property avoids not linked error when all the pads are unlinked
or when there are no source pads. This is useful in dynamic pipelines
where it can happen that for a short time there are no pads at all or
all downstream pads are not linked yet.

https://bugzilla.gnome.org/show_bug.cgi?id=746436
2015-03-26 10:46:26 +01:00
Sebastian Dröge 7f9c0d06dd docs: There is no decodebin2 anymore, don't pretend otherwise 2014-07-08 11:18:05 +02:00
Stefan Sauer 6d20be1702 tee: use store_sticky events add add more logging
Use the pad as object for logging to get more context. Use
gst_pad_store_sticky_event() instead of sending the event. This avoids a warning
as here the pad is not yet linked and we actually don't want to send anyway.
2014-03-11 21:50:35 +01:00
Sebastian Dröge 24a3102b21 tee: Make sure to give pads the name that was requested
Also check for uniqueness and make sure we create a new
pad index properly if some were requested with names but
the new one is not.
2014-01-14 16:45:53 +01:00
Sebastian Dröge 34f8b4d6f3 tee: Remove dyn lock
It was used for pad-alloc in 0.10 but currently is completely unused
and not necessary. All pad access is protected by the tee object lock
and keeping another reference to the current pad.
2014-01-02 11:13:27 +01:00
Sebastian Dröge e80fd39947 tee: Keep another ref to our one and only srcpad around while pushing
A pad probe on that pad might otherwise just release the pad, drop
the last reference and cause great misery.

https://bugzilla.gnome.org/show_bug.cgi?id=721300
2014-01-02 11:09:59 +01:00
Tim-Philipp Müller 789b68e506 tee: fix property description for now-unused "alloc-pad" property
Should probably proxy ALLOCATION queries on that though, if set.
But what else? CAPS and ACCEPT_CAPS too?
2013-05-24 23:28:04 +01:00
Tim-Philipp Müller 666c8c11c6 Fix FSF address
https://bugzilla.gnome.org/show_bug.cgi?id=687520
2012-11-03 20:44:48 +00:00
Josep Torra Valles 111fcc6e31 Make intel compiler happier
https://bugzilla.gnome.org/show_bug.cgi?id=552657
2012-09-25 00:56:26 +01:00
Wim Taymans 3abc720345 docs: fix some docs
from git grep for ffmpegcolorspace and x-raw-
2012-09-13 11:35:41 +02:00
Tim-Philipp Müller 388237756e tee: remove unimplemented has-sink-loop property 2012-07-06 11:26:14 +01:00
Руслан Ижбулатов f771d4619e tee: Remove unneeded unlock 2012-04-18 13:43:32 +02:00
Sebastian Dröge d2811b19f2 tee: Store pad state directly inside the pads instead of GObject qdata 2012-04-16 10:05:02 +02:00
Tim-Philipp Müller a63829b4ff plugins: use new gst_element_class_set_static_metadata() 2012-04-09 13:05:07 +01:00
Wim Taymans cfa639c56c tee: fix refcount error 2012-03-08 10:47:39 +01:00
Sebastian Dröge 6b4091a30d Merge branch 'master' into 0.11
Conflicts:
	libs/gst/base/gstbaseparse.c
	libs/gst/base/gstbasetransform.c
	plugins/elements/gsttee.c
2012-03-08 10:19:52 +01:00
Sebastian Dröge f000bbe924 tee: Fix 'use of logical '&&' with constant operand' compiler warning
This is actually a real bug.
2012-03-06 12:27:33 +01:00
Tim-Philipp Müller 13d91d1f6c Use recent GLib API unconditionally now that we depend on the latest GLib 2012-01-22 01:25:22 +00:00
Wim Taymans 252327f87a Update for new gthread API 2012-01-19 09:27:04 +01:00
Tim-Philipp Müller a1daf846f3 Merge remote-tracking branch 'origin/master' into 0.11
Conflicts:
	gst/gstobject.h
	libs/gst/check/gstcheck.h
	libs/gst/controller/gstcontroller.c
	plugins/elements/gstidentity.c
	tools/gst-xmlinspect.c
2011-12-04 15:38:09 +00:00
Tim-Philipp Müller 5889260d5a Work around deprecated thread API in glib master
Add private replacements for deprecated functions such as
g_mutex_new(), g_mutex_free(), g_cond_new() etc., mostly
to avoid the deprecation warnings. We can't change most of
these in 0.10 because they're part of our API and ABI.
2011-12-04 13:35:38 +00:00
Wim Taymans 407f45dc7f event: add STICKY_MULTY events
Add a new event flag for sticky events so that multiple events of that type can
be stored on a pad at the same time. Change the _get_sticky_event() function to
loop over the multiple events of a type.
Change the foreach function to make it possible to removed and modify the sticky
events on a pad.
Use an variable size array now to store the events. This could later be
optimized some more.
2011-11-23 18:05:00 +01:00
Wim Taymans 2f1ed65339 pad: Merge pad mode activation functions
Add the pad mode to the activate function so that we can reuse the same function
for all activation modes. This makes the core logic smaller and allows for some
elements to make their activation code easier. It would allow us to add more
scheduling modes later without having to add more activate functions.
2011-11-21 13:29:05 +01:00
Wim Taymans 39a5e26ea9 pad: add parent to activate functions 2011-11-18 13:54:29 +01:00
Wim Taymans 12d5f03453 pad: fix scheduling mode enums
GstPadActivateMode -> GstPadMode
GST_PAD_ACTIVATE_* -> GST_PAD_MODE_*
2011-11-18 12:39:55 +01:00
Wim Taymans 612b1fbb14 pad: add parent to other functions
Add parent to chain, chain_list, getrange and event functions.
2011-11-17 12:40:45 +01:00
Wim Taymans 09a8294d36 pad: add parent to the query function 2011-11-16 17:22:56 +01:00
Wim Taymans 54e1174060 GstPadFlags: rename flags GST_PAD_* -> GST_PAD_FLAG_* 2011-11-16 12:36:51 +01:00
Wim Taymans 06d4828df3 plugins: remove obsolete parent checks 2011-11-16 12:11:12 +01:00
Wim Taymans b5c3e254b1 pad: remove getcaps and use caps query
Remove the getcaps function on the pad and use the CAPS query for
the same effect.
Add PROXY_CAPS to the pad flags. This instructs the default caps event and query
handlers to pass on the CAPS related queries and events. This simplifies a lot
of elements that passtrough caps negotiation.
Make two utility functions to proxy caps queries and aggregate the result. Needs
to use the pad forward function instead later.
Make the _query_peer_ utility functions use the gst_pad_peer_query() function to
make sure the probes are emited properly.
2011-11-15 11:20:48 +01:00