Commit graph

673 commits

Author SHA1 Message Date
Sebastian Dröge
82e01491a0 element: Clarify docs about gst_element_get_request_pad() and remove deprecation part
This function is not really pad or slow for the common case of requesting a
pad with the name of the template. It is only slower if you to name your pads
directly instead of letting the element handle it.

Also there's no reason to deprecate it in favor of a more complicated function
for the common case.
2014-08-13 12:37:08 +03:00
Evan Nemerson
4088363aea introspection: add some missing allow-none annotations to in params
https://bugzilla.gnome.org/show_bug.cgi?id=730957
2014-06-26 19:00:58 +02:00
Evan Nemerson
2759882379 introspection: add missing (nullable) annotations to return values
Support for (nullable) was added to G-I at the same time as nullable
return values.  Previous versions of G-I will not mark return values as
nullable, even when an (allow-none) annotation is present, so it is
not necessary to add (allow-none) annotations for compatibility with
older versions of G-I.

https://bugzilla.gnome.org/show_bug.cgi?id=730957
2014-06-26 18:56:38 +02:00
Evan Nemerson
e10266e3f3 docs: convert NULL, TRUE, and FALSE to %NULL, %TRUE, and %FALSE
This should help improve documentation generated for
languages other than C.

https://bugzilla.gnome.org/show_bug.cgi?id=730961
2014-05-30 00:20:27 +01:00
Thiago Santos
1911554cff element: set pads need-parent flag to false when removing
When a pad is added the need-parent flag is set to true, so when
they are removed the flag should be set back to false

This was preventing GstPads to be reused in elements (removed and
later re-added). A unit tests was added to verify that this is
working now.

The use case is tsdemux that has a program-number property and
allows the user to switch programs. In order to do that tsdemux
will remove the pads of the current program and add from the new
ones. The removed pads are kept in the demuxer for later if the
user selects the old program again.
2014-05-29 17:01:20 -03:00
Wim Taymans
35a1822d7a pads: update docs for request pads
We would like to encourage the use of gst_element_request_pad()
2014-05-08 09:13:04 +02:00
Tim-Philipp Müller
6eb6d9ec38 docs: remove outdated and pointless 'Last reviewed' lines from docs
They are very confusing for people, and more often than not
also just not very accurate. Seeing 'last reviewed: 2005' in
your docs is not very confidence-inspiring. Let's just remove
those comments.
2014-04-26 21:21:51 +01:00
Sebastian Rasmussen
53ae1b2c9c docs: Fix typos in function/object descriptions
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=720029
2013-12-07 17:11:12 +00:00
Sebastian Dröge
014690326f element: Remove GstContext caching 2013-09-17 13:16:40 +02:00
Sebastian Dröge
e47270ee24 element: Return an empty GstContext if none was set yet 2013-07-16 15:34:57 +02:00
Tim-Philipp Müller
0e1dd050a5 printf: don't build if debugging subsystem was disabled 2013-04-13 01:19:41 +01:00
Tim-Philipp Müller
7b19944280 info: use new internal printf for debug message printing
and remove all the printf extension/specifier stuff for
the system printf. Next we need to add back the custom
specifiers to our own printf implementation.

https://bugzilla.gnome.org/show_bug.cgi?id=613081
2013-04-12 23:05:57 +01:00
Stefan Sauer
28b0cb5721 element: make post_message and query more alike 2013-04-01 16:39:17 +02:00
Sebastian Dröge
dd831b8114 element: Add API to get the last set context from an element
Elements should override GstElement::set_context() and also call
gst_element_set_context() to keep this context up-to-date with
the very latest context they internally use.
2013-03-31 11:26:32 +02:00
Sebastian Dröge
b909061031 gst: Add new GstContext miniobject for sharing contexts in a pipeline 2013-03-29 16:40:21 +01:00
Stefan Sauer
f9ce7e711b docs: link to the appropriate messages from gst_elements_set_state() docs
For an async state change return one would wait for ASYNC_DONE or STATE_CHANGED.
2013-02-17 13:21:36 +01:00
Wim Taymans
474610b191 element: remove old docs about iterators 2013-02-07 13:08:49 +01:00
Wim Taymans
63cc762626 element: improve debug 2012-12-14 11:08:57 +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
Sebastian Dröge
1c4fe1bf1a element: API: Add GstElement::post_message() vfunc
Conflicts:
	gst/gstelement.h
2012-10-16 12:35:56 +02:00
Sebastian Dröge
24cad1a91c elementfactory: Fail if no valid element factory metadata is set 2012-09-25 15:10:32 +02:00
Edward Hervey
7a89e5d046 element: Specify the order of pad iterators
The order of returned pads wasn't specified before, so let's specify
it and use an order which might prove the most useful : the order in
which pads were added to the element.

If someone changes the order, make sure users of those iterators from
now on don't rely on that order !
2012-08-06 11:36:29 +02:00
Wim Taymans
f05b0e222f Update for new seeking variable name
When seeking, the start value and type are now called start and start_type.
2012-07-27 15:24:52 +02:00
Edward Hervey
d3ffa82639 Remove 0.10-related documentation and "Since" markers 2012-07-10 12:03:27 +02:00
Tim-Philipp Müller
0841ac48f1 pads: make pad activation debug logs a bit more readable 2012-07-03 22:20:40 +01:00
Vincent Penquerc'h
c65eebe28c element: fix pad transfer annotation from none to full
since the pad will be unreffed.
2012-06-14 14:06:12 +01:00
Matej Knopp
a362b844f8 gstelement: Start over if subclass removed the next pad too
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=677818
2012-06-11 10:43:34 +02:00
Wim Taymans
6758e5f00d element: fix pad cleanup in dispose
In the dispose handler we first need to release all the request pads and then
remove the remaining pads. This is because it is possible that releasing the
request pad might also cleanly remove some of the other dynamic pads, like
what rtpsession does.

https://bugzilla.gnome.org/show_bug.cgi?id=677436
2012-06-06 15:33:57 +02:00
Stefan Sauer
37f7fc165d docs: improve the seeking docs more.
Also mention it on _element_seek{,_simple} and be more precise why it happens.
2012-05-21 15:17:08 +02:00
Stefan Sauer
dca0c19d3e docs: fix a typo and clarify event handling a bit more
Tell about async_done messages for some events and review the _event_new_seek
docs.
2012-05-21 14:34:33 +02:00
Sebastian Dröge
91e13d4970 Merge remote-tracking branch 'origin/0.10' 2012-04-09 16:04:22 +02:00
Sebastian Dröge
1484a211f1 element: Fail if a pad for a non-request template is requested 2012-04-09 16:01:02 +02:00
Tim-Philipp Müller
4f1df6d094 element: use quarks when storing standard metadata in structures 2012-04-09 13:40:35 +01:00
Tim-Philipp Müller
bca1ae8fb0 element: add gst_element_class_{set,add}_static_metadata()
Add gst_element_class_{add,set}_metadata() variants for static strings,
so we can avoid unnecessary g_strdup()s.

API: gst_element_class_add_static_metadata()
API: gst_element_class_set_static_metadata()
2012-04-09 12:49:38 +01:00
Wim Taymans
9aa9751938 review some docs 2012-03-28 18:12:23 +02:00
Sebastian Dröge
cfe71423f0 gst: Remove gstmarshal.[ch] completely and use the generic marshaller
Fixes bug #671130.
2012-03-02 11:05:48 +01:00
Wim Taymans
76a60c4c42 element: don't crash on missing template
Some request pads don't have a padtemplate (mostly those from encodebin). Avoid
crashing in this case.
2012-01-31 16:27:55 +01:00
David Schleef
9048b4dc2a element: call ->release_pad() to clean up pad
https://bugzilla.gnome.org/show_bug.cgi?id=636011
https://bugzilla.gnome.org/show_bug.cgi?id=402562
2012-01-26 15:44:10 +00:00
Wim Taymans
252327f87a Update for new gthread API 2012-01-19 09:27:04 +01:00
Tim-Philipp Müller
be04f3945c index: remove GstIndex and GstIndexFactory for now
There are many good use cases for GstIndex and we want
to add it back again in some form, but possibly not with
the current API, which is very powerful (maybe too powerful),
but also a bit confusing. At the very least we'd need to
make the API bindings-friendly.
2011-12-30 18:32:57 +00: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
2666450864 Suppress deprecation warnings in selected files, for g_static_rec_mutex_* mostly
GStaticRecMutex is part of our API/ABI, not much we can do here in 0.10.
2011-12-04 14:38:26 +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
1754ee91ad element: add indexable flag
Remove the is_indexable method check and use an element flag to check if the
element can use an index.
2011-11-28 18:13:27 +01:00
Wim Taymans
40616aeb63 element: use flags for require/provide clock
Remove the _require/_provide_clock() methods and use element flags to mark
elements instead of looking at the implementation of the vmethod.
2011-11-28 17:22:44 +01:00
Wim Taymans
d65773b5fa element: clean up element flags
Clean up the element flags
2011-11-28 16:54:55 +01:00
Vincent Penquerc'h
c0ba7985bd gstelement: add gst_element_class_add_pad_template_from_static
This function helps ensure the pad template is unreffed
without having to complicate the calling code.

https://bugzilla.gnome.org/show_bug.cgi?id=662664
2011-11-28 13:09:07 +00:00
Stefan Sauer
52e3861e91 warnings: avoid set-but-unused warnings with load-save disabled 2011-11-27 20:39:42 +01:00
Wim Taymans
54e1174060 GstPadFlags: rename flags GST_PAD_* -> GST_PAD_FLAG_* 2011-11-16 12:36:51 +01:00
Wim Taymans
fe3af1d67b pad: keep the parent alive when requested
Add a new pad flag NEED_PARENT that ensures that the parent of a pad is
reffed and not NULL when the event, query and internal links functions
are called.
When a pad is added to an element automatically make sure the NEED_PARENT flag
is enabled.
2011-11-16 12:08:22 +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
Wim Taymans
13754e87fc element: add a default set_clock implementation
Add a default set_clock implementation and avoid doing work in the vmethod
trampoline. This requires subclasses to chain up.
2011-11-10 12:09:57 +01:00
Wim Taymans
2227d80f93 element: don't do anything in the vmethod trampoline
Avoid doing stuff in the vmethod trampoline, just let the default
implementation of the method take care of things.
2011-11-10 12:08:51 +01:00
Wim Taymans
996d3dd5e4 element: fix some docs 2011-11-10 12:08:15 +01:00
Wim Taymans
6cc7254166 remove query types
It was not really useful
2011-11-09 11:47:10 +01:00
Wim Taymans
e4725d9df2 structure: cleanup API
gst_structure_empty_new() -> gst_structure_new_empty()
  gst_structure_id_empty_new() -> gst_structure_new_id_empty()
  gst_structure_id_new() -> gst_structure_new_id()
2011-11-02 08:59:44 +01:00
Tim-Philipp Müller
534e077c18 elementfactory: don't export private _gst_elementclass_factory quark 2011-10-08 20:46:55 +01:00
Sebastian Dröge
43538e2e75 Merge branch 'master' into 0.11
Conflicts:
	docs/design/draft-buffer2.txt
	docs/design/part-TODO.txt
	docs/design/part-block.txt
	docs/design/part-bufferlist.txt
	docs/design/part-caps.txt
	docs/design/part-element-transform.txt
	docs/design/part-events.txt
	docs/design/part-negotiation.txt
	gst/gstcaps.c
	gst/gstevent.h
	gst/gstghostpad.c
	gst/gstinterface.c
	gst/gstpad.c
	gst/gstpad.h
	gst/gstutils.c
	libs/gst/base/gstbasesink.c
	libs/gst/base/gstbasesrc.c
	libs/gst/base/gstbasetransform.c
	libs/gst/base/gsttypefindhelper.c
	plugins/elements/gstcapsfilter.c
	plugins/elements/gsttee.c
	tests/check/generic/sinks.c
	tools/gst-launch.1.in
2011-09-08 14:28:23 +02:00
Piotr Fusik
14f5518f3d docs, gst: typo fixes
https://bugzilla.gnome.org/show_bug.cgi?id=658449
2011-09-07 18:03:17 +01:00
Stefan Sauer
83eb2d42fa docs: escape % in docblob 2011-09-07 14:08:35 +02:00
Wim Taymans
8170c34c94 Merge branch 'master' into 0.11
Conflicts:
	gst/gstbuffer.h
	gst/gstcaps.c
	gst/gstcaps.h
	gst/gstevent.c
2011-08-22 12:33:35 +02:00
Stefan Kost
cce32ba0a2 docs: more clarification for element docs
Don't suggest deprecated method in the desction docs and try to be more helpful
in other places by suggesting related functions.
2011-08-20 14:07:55 +02:00
Stefan Kost
a3611c139a docs: small clarification in the gst_element_get_request_pad docs
Make it more obvious that one should pass the template name.
2011-08-20 09:57:14 +02:00
Tim-Philipp Müller
388548222d element: don't use G_CONST_RETURN
It's been deprecated in newer GLib versions
2011-07-28 12:11:36 +01:00
Wim Taymans
3cb8b33935 message: move the new_base_time flag to async_done
Move the flag to indicate that a new_base_time should be distributed to the
pipeline, from the async_start to the async_done message. This would allow us to
decide when to reset the pipeline time based on other reasons than the
FLUSH_START event.

The main goal eventually is to make the FLUSH events not reset time at all but
reset the time based on the first buffer or segment that prerolls the pipeline
again.
2011-06-08 13:45:19 +02:00
Wim Taymans
0de2f64e12 element: small cleanups 2011-06-02 15:37:41 +02:00
Wim Taymans
9555a7f8d0 element: inline the recursice state lock 2011-06-02 14:09:46 +02:00
Edward Hervey
ceb86a586e gst: Remove obvious dead assignments 2011-05-31 18:30:30 +02:00
Wim Taymans
0d546490f6 remove some more deprecated methods 2011-05-24 18:39:41 +02:00
Wim Taymans
e8080ab874 element: add method to get metadata
Add a method to get the metadata from a klass.
2011-05-20 12:45:06 +02:00
Sebastian Dröge
5f406248eb element: Consider GstPadTemplate as immutable
Don't copy the templates when creating subclasses but only increase
their refcount.
2011-05-17 13:13:51 +02:00
Sebastian Dröge
be00534878 padtemplate: Create pad templates with floating refs
And take ownership of the floating ref in gst_element_add_pad_template()
2011-05-17 13:13:51 +02:00
Sebastian Dröge
3d2127f865 Revert "query: allow _make_writable on query handlers"
This reverts commit cf4fbc005c.

This change did not improve the situation for bindings because
queries are usually created, then directly passed to a function
and not stored elsewhere, and the writability problem with
miniobjects usually happens with buffers or caps instead.
2011-05-17 11:21:41 +02:00
Sebastian Dröge
b935a814d9 Merge branch 'master' into 0.11
Conflicts:
	configure.ac
	docs/gst/gstreamer-sections.txt
	gst/gstbin.c
	gst/gstelement.c
	gst/gstelement.h
	gst/gstghostpad.c
	gst/gstminiobject.c
	gst/gstminiobject.h
	libs/gst/base/gstbasesrc.c
	libs/gst/base/gstbasetransform.c
	plugins/elements/gstinputselector.c
	tests/check/gst/gstminiobject.c
2011-05-16 16:53:04 +02:00
Sebastian Dröge
3872b816d2 element: Add GstElement::state_changed vfunc
API: GstElement::state_changed

This is always called when the state of an element has changed and
before the corresponding state-changed message is posted on the bus.
2011-05-14 11:39:35 +02:00
Sebastian Dröge
2f947f3993 element: If activating one pad failed error out early instead of trying to activate the next pads
If one pad fails to activate the complete activation process will fail
anyway and trying to activate the other pads only wastes time.
2011-05-14 11:39:33 +02:00
Wim Taymans
cf4fbc005c query: allow _make_writable on query handlers
Pass a GstQuery ** to the query handlers so that they can make the query
writable before using a setter on it.
Port code to new API.
2011-05-10 18:36:33 +02:00
Wim Taymans
84a1f4ba7f element: use request_new_pad_full as the default
Add GstCaps to request_new_pad so that request_new_pad_full can be removed.
Fix elements.
2011-05-10 16:41:36 +02:00
Wim Taymans
3d949e988b element: don't mess with pad caps in activate
When deactivating a pad, let the pad decide what fields to clear.
2011-05-06 17:39:08 +02:00
Wim Taymans
fb3da828e5 element: rename gst_element_lost_state_full()
Rename gst_element_lost_state_full() to gst_element_lost_state() and
remove the old method name.
2011-05-06 12:19:16 +02:00
Sebastian Dröge
98d1ee4a8f gst: Update everything for the new GstIterator API 2011-05-05 15:36:03 +02:00
Sebastian Dröge
5a6ef6408f element: If activating one pad failed error out early instead of trying to activate the next pads
If one pad fails to activate the complete activation process will fail
anyway and trying to activate the other pads only wastes time.
2011-05-05 12:30:05 +02:00
Sebastian Dröge
65eafd9340 Merge branch 'master' into 0.11
Conflicts:
	docs/gst/gstreamer-sections.txt
	gst/gstelementfactory.c
	gst/gstminiobject.c
2011-05-05 12:27:51 +02:00
Stefan Kost
41754faaaf docs: fixup broken xref 2011-05-03 13:03:20 +03:00
Wim Taymans
d939bea074 element: remove unused variable 2011-04-20 19:03:49 +02:00
Wim Taymans
9ccd6b1134 element: don't touch base_time or clock in state change
Don't touch the base_time or the clock when setting an element to the READY or
NULL state. It is the parent that will manage this for us.
2011-04-20 19:03:16 +02:00
Sebastian Dröge
aad57970de element: Inherit element metadata and pad templates from parent classes
This allows to add pad templates and set metadata in class_init instead of
base_init. base_init is a concept that is not supported by almost all
languages and copying the templates/metadata for subclasses is the more
intuitive way of doing things.

Subclasses can override pad templates of parent classes by adding a new
template with the same now.

Also gst_element_class_add_pad_template() now takes ownership of the
pad template, which was assumed by all code before anyway.

Fixes bug #491501.
2011-04-16 15:59:35 +02:00
Wim Taymans
6be4dbdb5a Merge branch 'master' into 0.11
Conflicts:
	android/base.mk
	android/controller.mk
	android/dataprotocol.mk
	android/elements.mk
	android/gst-inspect.mk
	android/gst-launch.mk
	android/gst-plugin-scanner.mk
	android/gst.mk
	android/indexers.mk
	android/net.mk
	win32/common/libgstbase.def
2011-04-11 10:26:54 +02:00
Tim-Philipp Müller
3fc68cf9e8 element: unref event in default_send_event in case element has no pads
Spotted by  Haakon Sporsheim.
2011-04-09 18:04:55 +01:00
Wim Taymans
8bcaf95662 Merge branch 'master' into 0.11 2011-04-04 11:17:28 +02:00
Sebastian Dröge
38c07bac1d element: When requesting an existing pad print a g_critical() instead of using an assertion
Some applications are requesting the same pad name multiple times
and the behaviour is undefined and different from element to element
but we don't want to break applications that work just fine.

In 0.11 this check should be an assertion again, although elements
have to do manual checking if the pad already exists again because
it can't be done in a threadsafe way here.
2011-04-01 13:58:43 +02:00
Sebastian Dröge
9f3e48b55b element: Use gint64/guint64 string parsing functions
And check that the requested pad names are inside the valid
gint/guint range.
2011-04-01 13:58:43 +02:00
Josep Torra
c40dba242c element: strto[u]l() returns a g[u]long 2011-04-01 13:58:43 +02:00
Wim Taymans
7a62d32a07 Merge branch 'master' into 0.11-fdo
Conflicts:
	docs/plugins/gstreamer-plugins.hierarchy
	gst/gstelement.c
2011-03-30 19:58:52 +02:00
Sebastian Dröge
b8ea24d466 element: Fix sanity checks for request pad templates without % 2011-03-29 16:22:46 +02:00
Sebastian Dröge
cb3f09a719 element: Add some more sanity checks to the pad name checking of request pads in all cases
Especially check if a pad with that name already exists.
2011-03-29 11:57:58 +02:00
Sebastian Dröge
c9238f6f56 element: Check %u too when trying to find a pad template for a request pad 2011-03-29 11:52:06 +02:00
Wim Taymans
238b9a57cc Merge branch 'master' into 0.11
Conflicts:
	configure.ac
	gst/gstelement.c
	gst/gstelement.h
	gst/gstpad.c
	gst/gstutils.c
	libs/gst/base/Makefile.am
	libs/gst/check/Makefile.am
	libs/gst/controller/Makefile.am
	libs/gst/dataprotocol/Makefile.am
	libs/gst/net/Makefile.am
	win32/common/libgstreamer.def
2011-02-22 14:11:59 +01:00
Edward Hervey
b39ccb5ac3 Revert "element: Call ->release_pad() to clean up pad"
This commit changes the request pad behaviour for plugins and applications.

Reopens Bug #402562

The proper fix for that bug is to keep track of created request pads.

This reverts commit a5e44ffffa.
2011-02-21 11:55:50 +01:00
David Schleef
a5e44ffffa element: Call ->release_pad() to clean up pad
Fixes #636011 and #402562.
2011-02-17 19:14:19 -08:00