Commit graph

533 commits

Author SHA1 Message Date
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
Stefan Kost
41754faaaf docs: fixup broken xref 2011-05-03 13:03:20 +03: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
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
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
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
Tim-Philipp Müller
1a6f61a1c9 docs: mention that it's necessary to set the state of elements added to an already-running pipeline
https://bugzilla.gnome.org/show_bug.cgi?id=641631
2011-02-10 00:04:09 +00:00
Bastien Nocera
e6de18ea99 GstElement: Fix warning with GCC 4.6
gstelement.c: In function ‘gst_element_get_request_pad’:
gstelement.c:1052:18: error: variable ‘tmp’ set but not used [-Werror=unused-but-set-variable]

https://bugzilla.gnome.org/show_bug.cgi?id=640850
2011-01-28 19:59:56 +00:00
Edward Hervey
04ebbc9f5a GstElement: Add a more flexible way to get request pads.
The new request_new_pad_full vmethod provides an additional caps field,
which allows elements to take better decision process.

Also, add a gst_element_request_pad() function to allow developers to be
able to specify which pad template they want a pad of.

Convert gstutils to use that new method instead of the old one when more
efficient.

This is useful for being able to request pads in a more flexible way,
especially when the element can provide pads whose caps depend on
runtime configuration and therefore can't provide pre-registered
pad templates.

API: GstElement::request_new_pad_full
API: gst_element_request_pad

https://bugzilla.gnome.org/show_bug.cgi?id=637300
2011-01-05 19:46:47 +01:00
Edward Hervey
3efb73c121 gst: documentation fixups and annotation
Reported by enabling the --warn-all option of g-ir-scanner
2010-12-17 19:14:41 +01:00
Tim-Philipp Müller
3256c708be docs: gst: more gobject introspection annotations
Many of these are superfluous, added for clarity.
2010-12-07 18:37:04 +00:00
Stefan Kost
898583b2a0 docs: query doc improvements
More xrefs. Mentioned that some queries need a running pipeline.
2010-12-03 09:50:32 +02:00
Stefan Kost
8ef7e46d24 docs: fix warnings pointed out by gtk-doc 2010-09-13 11:18:25 +03:00
Stefan Kost
65356fbb7a element-details: allow for arbitrary element details
Add a GstStructure to GstElementClass and GstElementFactory. Add setters/getter.
Handle it in the registry code. Print items in gst-inspect.
Fixes #396774.

API: gst_element_class_set_meta_data(), gst_element_factory_get_meta_data_detail()
2010-09-06 12:31:04 +03:00
Tim-Philipp Müller
71f3a6f0f7 Don't include <libxml/parser.h> from public headers if GST_DISABLE_DEPRECATED is defined
Since everything GstXML related has been deprecated, we can now skip the
libxml includes from the public headers when GST_DISABLE_DEPRECATED is
defined.

See #463435.
2010-06-26 10:35:38 +01:00
Sebastian Dröge
5f4a965f67 gstxml: Deprecate GstXml and related functions
Pipeline serialisation to and from XML is horribly broken for all
but the most simple use cases, and will likely never be fixed.
Make sure everyone playing around with these tools is aware of
this, to avoid frustration. See countless bug reports in bugzilla.

Fixes bug #622685.
2010-06-25 18:25:40 +02:00
Edward Hervey
4a11063768 Revert "GstPad: Add GST_PAD_NEGOTIABLE GstPadFlag"
This reverts commit dc38e75d88.

boom
2010-06-15 11:54:19 +02:00
Edward Hervey
27a58ed70d Revert "element: only clear negotiable when going to NULL"
This reverts commit 8f5ec1f737.

bleeeeh
2010-06-15 11:54:19 +02:00
Wim Taymans
8f5ec1f737 element: only clear negotiable when going to NULL
Don't clear the negotiable flag when going to READY because then it will never
be set to TRUE again.
2010-06-14 18:07:23 +02:00
Edward Hervey
dc38e75d88 GstPad: Add GST_PAD_NEGOTIABLE GstPadFlag
A pad is 'negotiable' when its container element is in a state greater
than GST_STATE_READY

API:gst_pad_is_negotiable
API:gst_pad_set_negotiable
API:GST_PAD_NEGOTIABLE

https://bugzilla.gnome.org/show_bug.cgi?id=618644
2010-06-14 17:08:14 +02:00
Sebastian Dröge
6fd7c5bda0 element: Store result of strtol in an unused variable to really fix a compiler warning... 2010-06-14 08:11:35 +02:00
Sebastian Dröge
fe378a9067 element: Cast return value to void to prevent compiler warning 2010-06-13 20:52:36 +02:00
Sebastian Dröge
e6e29192bc Remove some dead assignments 2010-06-13 17:08:48 +02:00
Tim-Philipp Müller
ae56d71363 element: make 'adding flushing pad' warning more useful
This is a pretty common issue with ghost pads, let's make
the warning more helpful and tell people what they need
to do to fix it.
2010-04-30 13:09:34 +01:00
Sebastian Dröge
fd68dbc08f gst: Use GSlice instead of normal g_malloc in more places 2010-03-28 19:48:45 +02:00
Benjamin Otte
3b4aa3f76a Deprecated gst_element_class_set_details()
Use gst_element_class_set_details_simple() instead. If you want to
convert automatically, here's a script:

for file in `git grep -l GstElementDetails`; do
  sed -i -n -r '
    1h
    1!H
    $ {
      g
      s/((\/\*[^\n]*\*\/)?\n)*[^\n]*GstElementDetails .* =\s*GST_ELEMENT_DETAILS\s*\((\"[^\"]*\",\s*\"[^\"]*\",\s*\"[^\"]*\",\s*(\"[^\"]*\"\s*)*)\);\n*(.*)gst_element_class_set_details \(([^,]*),\s*[^)]*\)/\n\n\5gst_element_class_set_details_simple (\6, \3)/
      s/((\/\*[^\n]*\*\/)?\n)*[^\n]*GstElementDetails .* =\s*\{\s*(\"[^\"]*\",\s*\"[^\"]*\",\s*\"[^\"]*\",\s*(\"[^\"]*\"\s*)*)\};\n*(.*)gst_element_class_set_details \(([^,]*),\s*[^)]*\)/\n\n\5gst_element_class_set_details_simple (\6, \3)/
      p
    }' $file
  ~/gst/gstreamer/tools/gst-indent $file
done
2010-03-24 12:20:05 +01:00
Edward Hervey
d60a3b8a59 gstreamer: remove unneeded casts
G_PARAM_SPEC_VALUE_TYPE does an expensive type check, whereas the
value_type field is a public field, so we can just use it directly.
2010-03-11 11:46:28 +01:00
Benjamin Otte
7e7f51f617 Fixes for -Wmissing-declarations -Wmissing-prototypes
Also adds those flags to the configure warning flags

https://bugzilla.gnome.org/show_bug.cgi?id=611692
2010-03-11 10:59:57 +01:00
Benjamin Otte
5c01dcb1f7 remove unused gst_element_default_error()
https://bugzilla.gnome.org/show_bug.cgi?id=611692
2010-03-10 15:24:11 +01:00
Wim Taymans
14113e8661 element: fix typo in comments 2010-03-08 17:36:02 +01:00
Johan Bilien
1d7afbd0f2 introspection: add annotation for gst_element_get_state
state and pending are "out" arguments.

Fixes #605189.
2010-02-18 01:28:57 +00:00
Wim Taymans
fc7dd46b20 avoid some more type checks 2009-12-24 14:40:54 +01:00
Stefan Kost
790e5d10c8 docs: add more docs around GstState and GstStateChange
Take reviewed docs from docs/design/part-state to have that more prominent
inside the api docs. Add a few sentences to link things better together.
2009-12-14 15:11:42 +02:00
Wim Taymans
8bc67e5434 element: use NULL instead of 0 for pointers 2009-12-09 13:27:22 +01:00
Stefan Kost
211b2e4338 element: access padtemplate list directly to avoid call and type check. 2009-11-04 22:42:52 +02:00
Tim-Philipp Müller
daecaf0e8a Remove GST_DEBUG_FUNCPTR where they're pointless
There's not much point in using GST_DEBUG_FUNCPTR with GObject
virtual functions such as get_property, set_propery, finalize and
dispose, since they'll never be used by anyone anyway. Saves a
few bytes and possibly a tenth of a polar bear.
2009-10-28 00:44:24 +00:00
Tim-Philipp Müller
0d50805678 element: don't take object lock for g_critical() and flesh out warning message some more 2009-09-01 10:05:21 +01:00
Stefan Kost
86edbb954c debug: more detail in wrong-state-on-dispose error.
Also tell in which state the element actualy is and if it is eventualy
state-locked.
2009-09-01 00:06:27 +03:00
Wim Taymans
a3f9908266 element: better type checks
Add GST_CLOCK typecheck for _set_clock().
Allow setting NULL indexes on element (clear the current index)
Some whitespace fixes.
2009-08-28 18:36:45 +02:00
Stefan Kost
fdcde50cb0 request-pad: tell about ref counts in release_request_pad docs.
It is not too obvious that getting and releasing request pads is not entierly
symetrical regarding to the pad refcount. Add a note about that to the docs.
This might deserve a FIXME-0.11 too.
2009-06-26 12:50:53 +03:00
Josep Torra
bf2c345667 gstelement: moved the clock unref to the right place 2009-06-17 16:45:17 +02:00
Josep Torra
5d0b8a7489 gstelement: unref the clock when the element changes to null state 2009-06-17 16:17:27 +02:00
Tim-Philipp Müller
470e561216 gstxml: fix (de)serialisation of properties of type GstStructure
souphttpsrc has a property of type GstStructure, which causes an
assertion when serialising it to xml. Fixes #585137.
2009-06-16 08:55:17 +01:00
Wim Taymans
309d78770c debug: add some more debug to element and pads 2009-06-15 18:42:59 +02:00