Commit graph

515 commits

Author SHA1 Message Date
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
Stefan Kost
55577a48ea registry: don't recreate features on first use. Fixes #584389
The first time one calls gst_element_factory_make(), gst recreates the plugin
feature and the element factory. As a side effect we ref the class to fill
in detail we already have filled from the registry cache. This patch changes
the behaviour to just update the existing entries. The factory is now attached
to the type and set in gst_element_base_class_init().
2009-06-07 23:48:59 +03:00
Wim Taymans
ae62089f58 element: reset start_time in lost state 2009-05-29 16:14:36 +02:00
Wim Taymans
6beb496878 docs: update element an pipeline docs 2009-05-29 13:03:15 +02:00
Wim Taymans
83b2c63a30 element: add start_time field an methods
Add a start_time field and some methods. The start_time will contain the
running_time of when the element last went to paused. This time can be user to
report the position in PAUSED but also to do more correct clipping and
stepping later.
2009-05-29 11:55:38 +02:00
Wim Taymans
91f901975a element: fix typo in comments 2009-05-25 18:45:19 +02:00
Jan Schmidt
c05e2382cb docs: Fix up some documentation warnings.
Since: tags should always be the last thing in a doc block, apparently.
Add some Returns: descriptions to some recent functions.
2009-05-22 09:33:02 +01:00
Wim Taymans
f7c5767559 docs: update docs for stream_time->running_time
Change some instances where we wrongly refer to stream time where it should have
been running time.
2009-05-21 17:32:00 +02:00
Hannes Bistry
b47f425069 loadsave: fix requestpad handling and serialisation order.
Support request pads when loading. Reverse pad serialisation order to
preserve it when recreating the pipeline.
2009-05-20 10:58:59 +03:00
Wim Taymans
ae08561ae6 element: add gst_element_lost_state_full()
Add a gst_element_lost_state_full() with an extra argument to control
distribution of a new base_time. We will need this for flushing step
operations.

API: GstElement::gst_element_lost_state_full()
2009-05-14 11:36:28 +02:00
Wim Taymans
8c26c22f2c element: fix posting of async-start messages
When an element lost its state but was busy doing a state change, still post the
async-start message with the base_time reset flag or else we might end up with
an old base_time.

this can happen when a sink is goin async to paused and then a flushing seek is
performed. This would cause the base_time to remain unmodified because the
async-start message was not sent.
2009-05-12 10:20:53 +02:00
Sebastian Dröge
e7ccf786c3 gst: Use G_DEFINE_TYPE and friends or at least g_once_init_* in the _get_type() functions 2009-04-04 10:20:36 +02:00
Edward Hervey
00cbbc87c7 Remove unused variables detected by LLVM's Clang static analyzer. 2009-04-03 12:56:48 +02:00
Wim Taymans
ffc752c458 element: Fix a little debug message 2009-03-27 16:15:10 +01:00
Stefan Kost
a5e3baf44d docs: more info about when state changes can be async and when not. 2009-03-19 10:39:33 +02:00
Edward Hervey
334ad4c328 gst/: Assign debug statements to relevant categories instead of the 'default' category so they don't get lost in debu...
Original commit message from CVS:
* gst/gstelement.c: (gst_element_message_full),
(gst_element_pads_activate):
* gst/gstobject.c: (gst_object_dispatch_properties_changed):
* gst/gstutils.c: (gst_pad_proxy_getcaps), (gst_pad_proxy_setcaps),
(gst_pad_add_data_probe_full), (gst_pad_add_event_probe_full),
(gst_pad_add_buffer_probe_full), (gst_pad_remove_data_probe),
(gst_pad_remove_event_probe), (gst_pad_remove_buffer_probe):
Assign debug statements to relevant categories instead of the 'default'
category so they don't get lost in debugging.
2009-01-03 18:10:08 +00:00
Antoine Tremblay
607fd58a5e gst/gstelement.c: Avoid leaking the parent ref when we fail changing the state of the element using gst_element_sync_...
Original commit message from CVS:
Based on patch by: Antoine Tremblay <hexa00 at gmail dot com>
* gst/gstelement.c: (gst_element_sync_state_with_parent):
Avoid leaking the parent ref when we fail changing the state of the
element using gst_element_sync_state_with_parent(). Fixes #551978.
2008-09-14 22:01:30 +00:00
Sebastian Dröge
4bfb1fe70c Remove GST_DISABLE_(ENUMTYPES|INDEX|URI) everywhere.
Original commit message from CVS:
* configure.ac:
* docs/gst/gstreamer-sections.txt:
* docs/gst/gstreamer.types:
* docs/gst/gstreamer.types.in:
* gst/Makefile.am:
* gst/gst.c:
* gst/gstbin.c: (gst_bin_class_init), (gst_bin_set_index_func):
* gst/gstconfig.h.in:
* gst/gstelement.c: (gst_element_get_index):
* gst/gstregistrybinary.c: (gst_registry_binary_save_feature),
(gst_registry_binary_load_feature),
(gst_registry_binary_read_cache):
* gst/gstregistryxml.c: (load_feature),
(gst_registry_xml_read_cache), (gst_registry_xml_save_feature):
* plugins/Makefile.am:
* tools/gst-indent:
* tools/gst-inspect.c: (print_index_info), (print_element_list),
(print_plugin_features), (print_element_features):
* tools/gst-xmlinspect.c: (print_event_masks),
(print_element_info):
* win32/common/gstconfig.h:
Remove GST_DISABLE_(ENUMTYPES|INDEX|URI) everywhere.
Disabling the indexers and URI handler code will only reduce the
required amount of memory by a very small amount but on the other hand
requires much more maintaince work. Apart from that many places of
code are broken when disabling them.
Disabling the enum types doesn't reduce the required amount of memory
by more than a few bytes and makes it hard to fix bugs like #539772,
i.e. use the enums as GObject properties.
2008-07-31 15:20:32 +00:00
Sebastian Dröge
3edb63d2ed gst/gstelement.*: Deprecated gst_element_get_pad() as it can't be used sanely. It's not clear of the reference to the...
Original commit message from CVS:
* gst/gstelement.c:
* gst/gstelement.h:
Deprecated gst_element_get_pad() as it can't be used sanely. It's not
clear of the reference to the resulting pad must be released later
or not, resulting in possible leaks. Fixes bug #533865.
2008-05-29 07:19:47 +00:00