Commit graph

687 commits

Author SHA1 Message Date
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
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
Wim Taymans 920ef127ce element: rework GstElementDetails
Clean up the GstElement structure
Replace GstElementDetails with metadata
2010-12-07 15:33:04 +01:00
Wim Taymans 993eda5004 remove deprecated symbols and methods 2010-12-06 19:18:31 +01: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
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
Sebastian Dröge 2faa733276 Revert previous changes to the behaviour of GstPadTemplates, etc and the possiblity to call them in class_init as it ...
Original commit message from CVS:
* gst/gstbin.c: (gst_bin_get_type), (gst_bin_base_init),
(gst_bin_class_init):
* gst/gstelement.c: (gst_element_base_class_init),
(gst_element_class_add_pad_template):
* gst/gstpadtemplate.c: (gst_pad_template_init):
* gst/gstpipeline.c: (gst_pipeline_get_type),
(gst_pipeline_base_init), (gst_pipeline_class_init):
* libs/gst/base/gstbasesink.c:
* libs/gst/base/gstbasesrc.c: (gst_base_src_get_type),
(gst_base_src_base_init), (gst_base_src_class_init):
* plugins/elements/gstcapsfilter.c: (gst_capsfilter_base_init),
(gst_capsfilter_class_init):
* plugins/elements/gstfakesink.c: (gst_fake_sink_base_init),
(gst_fake_sink_class_init):
* plugins/elements/gstfakesrc.c: (gst_fake_src_base_init),
(gst_fake_src_class_init):
* plugins/elements/gstfdsink.c: (gst_fd_sink_base_init),
(gst_fd_sink_class_init):
* plugins/elements/gstfdsrc.c: (gst_fd_src_base_init),
(gst_fd_src_class_init):
* plugins/elements/gstfilesink.c: (gst_file_sink_base_init),
(gst_file_sink_class_init):
* plugins/elements/gstfilesrc.c: (gst_file_src_base_init),
(gst_file_src_class_init):
* plugins/elements/gstidentity.c: (gst_identity_base_init),
(gst_identity_class_init):
* plugins/elements/gstmultiqueue.c: (gst_multi_queue_base_init),
(gst_multi_queue_class_init):
* plugins/elements/gstqueue.c: (gst_queue_base_init),
(gst_queue_class_init):
* plugins/elements/gsttee.c: (gst_tee_base_init),
(gst_tee_class_init):
* plugins/elements/gsttypefindelement.c:
(gst_type_find_element_base_init),
(gst_type_find_element_class_init):
* tests/check/gst/gstelement.c: (gst_element_suite):
Revert previous changes to the behaviour of GstPadTemplates, etc
and the possiblity to call them in class_init as it breaks too
many elements. Reopens bug #491501.
Should be applied again for 0.11, thus added a few FIXME 0.11 at
several places.
2008-02-05 14:15:15 +00:00
Sebastian Dröge 86e45df860 gst/: Make it possible (and recommended) to set element details and add pad templates in the class_init functions by ...
Original commit message from CVS:
* gst/gstelement.c: (gst_element_base_class_init),
(gst_element_class_add_pad_template):
* gst/gstpadtemplate.c:
Make it possible (and recommended) to set element details and add
pad templates in the class_init functions by copying the details/pad
templates in GstElement's base_init.
Also make it possible to replace existing pad templates by adding
a new one with the same name. This was done in a hackish fashion
in same elements before already.
Don't reference pad templates that are added a second time. A
new pad template has a refcount of one and is not floating anymore
and to be owned by the element's class. Make this more explicit by
mentioning it in the docs of gst_element_class_add_pad_template().
These changes are backwards compatible. Fixes bug #491501.
* tests/check/gst/gstelement.c:
Add unit test for setting element details, adding pad templates and
replacing them in a subclass.
2008-02-03 10:48:01 +00:00
Wim Taymans d5432c2bff gst/gstelement.c: Only change the state cookie if a different state was set on the element. See #492729.
Original commit message from CVS:
* gst/gstelement.c: (gst_element_set_state_func):
Only change the state cookie if a different state was set on the
element. See #492729.
2007-11-06 12:28:17 +00:00
Stefan Kost 5115aee102 gst/gstelement.c: Use meaningful categories for the logs to clean the default one.
Original commit message from CVS:
* gst/gstelement.c:
Use meaningful categories for the logs to clean the default one.
2007-10-03 15:27:24 +00:00
Wim Taymans d59d330076 gst/gstbin.c: A latency query fails when one of the sinks fail.
Original commit message from CVS:
* gst/gstbin.c: (bin_query_latency_fold), (gst_bin_query):
A latency query fails when one of the sinks fail.
* gst/gstelement.c: (gst_element_set_base_time):
Improve debugging.
2007-09-17 20:55:23 +00:00
Stefan Kost 756049dc07 gst/gstelement.c: Give some log-messages a category.
Original commit message from CVS:
* gst/gstelement.c:
Give some log-messages a category.
2007-09-05 13:24:31 +00:00
Wim Taymans 56b5aa1ccb docs/design/part-TODO.txt: Add some more TODO items
Original commit message from CVS:
* docs/design/part-TODO.txt:
Add some more TODO items
* gst/gstbin.c: (find_message), (gst_bin_change_state_func):
Improve debugging.
* gst/gstcaps.c: (gst_caps_intersect):
Optimize trivial intersection case between identical caps pointers.
* gst/gstelement.c: (gst_element_continue_state),
(gst_element_set_state_func):
* gst/gstpad.c:
Fix spelling and grammar mistakes.
2007-08-07 09:56:08 +00:00
Tim-Philipp Müller c8293b1a45 gst/gstelement.*: Make strings passed to gst_element_class_set_details_simple() constant, as they should be (#462752).
Original commit message from CVS:
* gst/gstelement.c: (gst_element_class_set_details_simple):
* gst/gstelement.h:
Make strings passed to gst_element_class_set_details_simple()
constant, as they should be (#462752).
2007-08-02 11:51:17 +00:00
Jan Schmidt 71766af8c2 Beef up and include the docs for gst_type_register_static_full and gst_element_class_set_details_simple and add the A...
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstelement.c:
* gst/gstutils.c: (gst_type_register_static_full):
Beef up and include the docs for gst_type_register_static_full and
gst_element_class_set_details_simple and add the API keyword
in the ChangeLog.
2007-06-21 16:39:01 +00:00
Stefan Kost 9eeb1c8e2b Saving relocations for GTypeInfo and GstElementDetails. Fixes #437457.
Original commit message from CVS:
* gst/gstelement.c: (gst_element_class_set_details_simple):
* gst/gstelement.h:
* gst/gstutils.c: (gst_type_register_static_full):
* gst/gstutils.h:
* plugins/elements/gstcapsfilter.c: (gst_capsfilter_base_init):
* plugins/elements/gstfakesink.c: (gst_fake_sink_base_init):
* plugins/elements/gstfakesrc.c: (gst_fake_src_base_init):
* plugins/elements/gstfdsink.c: (gst_fd_sink_base_init):
* plugins/elements/gstfdsrc.c: (gst_fd_src_base_init):
* plugins/elements/gstfilesink.c: (gst_file_sink_base_init):
* plugins/elements/gstfilesrc.c: (gst_file_src_base_init):
* plugins/elements/gstidentity.c: (gst_identity_base_init):
* plugins/elements/gstmultiqueue.c: (gst_multi_queue_base_init):
* plugins/elements/gstqueue.c: (gst_queue_base_init),
(apply_buffer), (gst_queue_chain):
* plugins/elements/gsttee.c: (gst_tee_base_init):
* plugins/elements/gsttypefindelement.c:
(gst_type_find_element_base_init),
(gst_type_find_element_class_init):
Saving relocations for GTypeInfo and GstElementDetails. Fixes #437457.
2007-06-21 14:29:05 +00:00
Wim Taymans 0b3153873b gst/gstbin.*: Immediatly commit the toplevel bin state when receiving an async-done message. This enables us to avoid...
Original commit message from CVS:
* gst/gstbin.c: (gst_bin_init), (gst_bin_add_func),
(gst_bin_remove_func), (gst_bin_get_state_func),
(gst_bin_element_set_state), (gst_bin_continue_func),
(bin_push_state_continue), (bin_handle_async_start),
(bin_handle_async_done), (gst_bin_handle_message_func):
* gst/gstbin.h:
Immediatly commit the toplevel bin state when receiving an async-done
message. This enables us to avoid spawning a thread to commit the state
in some common cases and it also avoids some races.
Avoid spawning a state thread when adding/removing async elements to a
toplevel bin. Instead we immediatly update the bin state.
Get rid of iterating all the children when getting the state in the bin
because it is now always up-to-date.
Fix bug where locked elements would always return _SUCCESS even it they
returned NO_PREROLL before being locked.
Fix the order of the state_change, async-start/done messages that was
sometimes incorrect.
Mark the state_dirty field as deprecated, we don't need it anymore as we
are always up-to-date.
* gst/gstelement.c: (gst_element_get_state_func),
(gst_element_continue_state):
Small debug inprovements.
Return the previous element state return when nothing is pending instead
of blindly returning SUCCESS.
* tests/check/generic/sinks.c: (GST_START_TEST), (pad_blocked_cb),
(gst_sinks_suite):
Add a whole bunch of new testcases.
2007-06-18 15:12:28 +00:00
Stefan Kost e87a530b73 gst/gstelement.c (gst_element_requires_clock, gst_element_provides_clock, gst_element_request_pad, gst_element_class_...
Original commit message from CVS:
* gst/gstelement.c (gst_element_requires_clock,
gst_element_provides_clock, gst_element_request_pad,
gst_element_class_set_details, gst_element_class_set_details_simple,
gst_element_default_send_event, gst_element_abort_state,
gst_element_continue_state, gst_element_set_state,
gst_element_set_state_func, iterator_activate_fold_with_resync):
* gst/gstpad.c (gst_pad_activate_pull, gst_pad_set_getcaps_function,
gst_pad_fixate_caps, gst_pad_configure_sink, gst_pad_configure_src,
gst_pad_query, gst_pad_save_thyself, handle_pad_block, gst_pad_push,
gst_pad_get_range, gst_pad_pull_range):
* gst/gstpad.h (GST_PAD_LINK_SUCCESSFUL, GST_FLOW_CUSTOM_SUCCESS,
GST_FLOW_NOT_SUPPORTED, GST_FLOW_IS_FATAL, GstPadActivateFunction,
GstPadActivateModeFunction, GstPadChainFunction,
GstPadGetCapsFunction, GstPadAcceptCapsFunction,
GstPadFixateCapsFunction, GstPadTemplate):
* gst/gstpipeline.c (gst_pipeline_change_state,
gst_pipeline_set_new_stream_time, gst_pipeline_use_clock,
gst_pipeline_set_clock, gst_pipeline_auto_clock,
gst_pipeline_get_delay):
Whitespace and docs fixes.
2007-05-22 06:37:37 +00:00
Jan Schmidt b9b5877a51 gst/gstelement.c: Don't output the same debug statement twice.
Original commit message from CVS:
* gst/gstelement.c: (gst_element_get_state_func):
Don't output the same debug statement twice.
* libs/gst/base/gstadapter.c: (gst_adapter_try_to_merge_up),
(gst_adapter_peek), (gst_adapter_take_buffer):
Optimise the case where we have buffers at the head of the queue that
can be joined quickly (because they're contiguous sub-buffers) by
merging them together rather than copying data out into new memory.
* gst/parse/grammar.y:
* tests/check/pipelines/parse-launch.c:
Fix a leak in an error path for parse_launch, and add a check
for it to the testsuite.
2007-04-13 11:53:00 +00:00
Wim Taymans bcc9fc59a9 gst/gstelement.c: Make padtemplates also work when they don't contain %s or %d.
Original commit message from CVS:
* gst/gstelement.c: (gst_element_get_request_pad):
Make padtemplates also work when they don't contain %s or %d.
2007-04-05 10:08:21 +00:00
Tim-Philipp Müller 799bc90b1f gst/gstelement.c: Make gst_element_get_request_pad() create request pads only for request pad templates and not for, ...
Original commit message from CVS:
* gst/gstelement.c: (gst_element_get_request_pad),
(gst_element_class_get_request_pad_template):
Make gst_element_get_request_pad() create request pads only for
request pad templates and not for, say, sometimes pad templates.
2007-03-28 18:25:16 +00:00
Olivier Crete 2b3ea5e9d8 gst/gstelement.c: Look at the pending state too when syncing the element state to the parent. Fixes #420133.
Original commit message from CVS:
Patch by: Olivier Crete <tester at tester dot ca>
* gst/gstelement.c: (gst_element_sync_state_with_parent):
Look at the pending state too when syncing the element state to the
parent. Fixes #420133.
2007-03-20 09:46:11 +00:00
Evan Nemerson e447f17955 gst/gstelement.c: Fix pad-added and pad-removed signal signatures so that the pad type is stated as GST_TYPE_PAD inst...
Original commit message from CVS:
Patch by: Evan Nemerson <evan at coeus dash group dot com>
* gst/gstelement.c: (gst_element_class_init):
Fix pad-added and pad-removed signal signatures so that the pad type is
stated as GST_TYPE_PAD instead of G_TYPE_OBJECT. Fixes #419851.
2007-03-19 12:07:32 +00:00
Wim Taymans d14c4c4a67 docs/gst/gstreamer-sections.txt: Add new element field and method.
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
Add new element field and method.
* gst/gstbin.c: (gst_bin_class_init), (gst_bin_init),
(bin_remove_messages), (gst_bin_add_func), (gst_bin_remove_func),
(gst_bin_recalc_state), (gst_bin_get_state_func),
(gst_bin_element_set_state), (gst_bin_change_state_func),
(gst_bin_continue_func), (bin_bus_handler),
(bin_push_state_continue), (bin_handle_async_start),
(bin_handle_async_done), (gst_bin_handle_message_func):
Make async state changes a bit smarter by using new ASYNC_START and
ASYNC_DONE messages. This reduces the number of times we run the state
recalculation thread.
Don't change state of element with a pending ASYNC_START message.
Deprecate STATE_DIRTY messages.
* gst/gstelement.c: (gst_element_init), (gst_element_send_event),
(gst_element_get_state_func), (gst_element_continue_state),
(gst_element_lost_state), (gst_element_set_state_func),
(gst_element_change_state):
* gst/gstelement.h:
Keep the state that was last set by the app in a new element field.
Don't allow state changes when handling an element event.
Post ASYNC_START and ASYNC_DONE messages.
Change lost_state so that we go to PAUSED and wait for the parent to set
us to PLAYING again (so latency calculation can be performed)
Export gst_element_change_state() method so that subclasses can use it.
API: gst_element_change_state()
API: GST_STATE_TARGET
* gst/gstpipeline.c: (gst_pipeline_class_init),
(reset_stream_time), (gst_pipeline_change_state),
(gst_pipeline_handle_message), (gst_pipeline_set_new_stream_time):
Using the new ASYNC_START message we can reset the base_time when
needed. This can then be used to implement base_time redistribution in
flushing seeks so that we can remove the explicit seek handling.
Perform latency query and configuration when going to PLAYING.
* libs/gst/base/gstbasesink.c: (gst_base_sink_commit_state),
(gst_base_sink_query), (gst_base_sink_change_state):
Post new ASYNC_START/ASYNC_DONE messages.
* tests/check/generic/sinks.c: (GST_START_TEST):
Fix test because the bin will not set the async element to PLAYING right
away.
* tests/check/gst/gstbin.c: (pop_async_done), (GST_START_TEST):
Make the message check a little stronger.
Handle ASYNC messages.
* tests/check/pipelines/cleanup.c: (GST_START_TEST):
* tests/check/pipelines/simple-launch-lines.c: (GST_START_TEST):
Expect ASYNC_DONE messages.
2007-03-19 10:47:56 +00:00
Jan Schmidt ab99622d95 gst/gstelement.c: There's no need to warn if VOID_PENDING is not NONE here, as long as the state is NULL it's ok, and...
Original commit message from CVS:
* gst/gstelement.c: (gst_element_dispose):
There's no need to warn if VOID_PENDING is not NONE here, as
long as the state is NULL it's ok, and that's checked immediately
above.
2007-03-09 12:34:46 +00:00
Wim Taymans acf6165c5e gst/gstelement.*: Improve docs a little. Added Since: for new macro.
Original commit message from CVS:
* gst/gstelement.c: (gst_element_message_full),
(gst_element_get_state_func):
* gst/gstelement.h:
Improve docs a little. Added Since: for new macro.
* gst/gstobject.c: (gst_object_sink):
* gst/gstpipeline.c: (gst_pipeline_change_state),
(gst_pipeline_set_new_stream_time):
* gst/gstpipeline.h:
Improve debugging and docs.
* gst/gstutils.c: (gst_element_state_change_return_get_name):
Improve debugging.
2007-02-28 16:43:43 +00:00
Wim Taymans 31be175723 gst/gstelement.c: Handle INFO messages from the GST_ELEMENT_INFO macro as well.
Original commit message from CVS:
* gst/gstelement.c: (gst_element_message_full),
(gst_element_set_locked_state), (gst_element_get_state_func),
(gst_element_change_state):
Handle INFO messages from the GST_ELEMENT_INFO macro as well.
Documentation updates.
Small code cleanups.
* gst/gstmessage.c: (gst_message_new_info),
(gst_message_parse_info):
* gst/gstmessage.h:
API: gst_message_new_info()
API: gst_message_parse_info()
Add INFO message create and parse code.
2007-02-28 16:40:02 +00:00
Wim Taymans 1affbe8e9f gst/: Set pads to FLUSHING when they are created. Check, warn and fix when a demuxer adds an inactive pad to itself w...
Original commit message from CVS:
* gst/gstelement.c: (gst_element_add_pad):
* gst/gstghostpad.c: (gst_ghost_pad_new_full):
* gst/gstpad.c: (gst_pad_init):
Set pads to FLUSHING when they are created. Check, warn and fix when a
demuxer adds an inactive pad to itself when running. Fixes #339326.
2006-12-15 16:01:58 +00:00
Wim Taymans 0ad3d72cf5 gst/gstelement.c: Expose default element send_event and query handling as vmethods that subclasses can chain up to.
Original commit message from CVS:
* gst/gstelement.c: (gst_element_class_init),
(gst_element_default_send_event), (gst_element_send_event),
(gst_element_default_query), (gst_element_query):
Expose default element send_event and query handling as vmethods that
subclasses can chain up to.
2006-12-15 15:49:29 +00:00
Wim Taymans 06651f5547 gst/gstelement.c: Small documentation fixes.
Original commit message from CVS:
* gst/gstelement.c: (gst_element_set_state_func):
Small documentation fixes.
2006-12-15 15:39:28 +00:00
Stefan Kost 894b7f9f4a docs/gst/gstreamer-sections.txt: add new API and fix the build
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
add new API and fix the build
* gst/gstbin.c: (gst_bin_recalc_state):
* gst/gstelement.c: (gst_element_message_full),
(gst_element_get_state_func), (gst_element_set_state_func):
use new API and improve logging
* gst/gstutils.c: (gst_element_state_change_return_get_name):
* gst/gstutils.h:
API: add function to get StateChangereturn names to improve logs
2006-11-06 15:14:46 +00:00
Josep Torre Valles fcb5023fa4 gst/gst.c: Fix empty declaration and type mismatch.
Original commit message from CVS:
2006-10-06  Zaheer Abbas Merali  <zaheerabbas at merali dot org>

Patch by: Josep Torre Valles <josep@fluendo.com>

* gst/gst.c: (gst_init_get_option_group):
Fix empty declaration and type mismatch.
* gst/gstbin.c: (gst_bin_change_state_func):
Fix type mismatch.
* gst/gstelement.c: (gst_element_continue_state),
(gst_element_set_state_func), (gst_element_change_state),
(gst_element_change_state_func):
Fix type mismatches.
* gst/gstinfo.c: (gst_debug_compare_log_function_by_func),
(gst_debug_remove_log_function), (_gst_debug_nameof_funcptr):
Cast as appropriate.
* gst/gstobject.c: (gst_class_signal_connect):
Cast as appropriate.  The function pointer parameter really
has the wrong type but would break API if we change it.
* gst/gstquery.c:
Fix redefinition of _FILE_OFFSET_BITS caused on Solaris wrt
order of including string.h.
* gst/gstutils.c: (gst_element_state_get_name):
Remove unreachable line.
* gst/gstxml.c: (gst_xml_parse_doc):
Fix type mismatch.
All these caught by Forte.
2006-10-06 14:46:04 +00:00
Wim Taymans 53bf2d570c gst/gstelement.c: Use _DEBUG_OBJECT some more.
Original commit message from CVS:
* gst/gstelement.c: (gst_element_post_message),
(gst_element_dispose):
Use _DEBUG_OBJECT some more.
* libs/gst/base/gstbasesrc.c: (gst_base_src_loop):
Avoid typechecks.
* tools/gst-launch.c: (main):
If the toplevel element is not a GstPipeline, it must be put in a
pipeline so that a bus and clock is selected.
2006-09-18 13:44:12 +00:00
Wim Taymans 84fc21c3c1 gst/gstbin.c: Update documentation.
Original commit message from CVS:
* gst/gstbin.c:
Update documentation.
* gst/gstelement.c: (gst_element_class_init),
(gst_element_release_request_pad), (gst_element_set_clock),
(gst_element_get_index), (gst_element_add_pad),
(gst_element_remove_pad), (gst_element_get_random_pad),
(gst_element_send_event), (gst_element_get_query_types),
(gst_element_query), (gst_element_post_message),
(gst_element_message_full), (gst_element_continue_state),
(gst_element_lost_state), (gst_element_save_thyself),
(gst_element_restore_thyself):
Documentation updates.
Rename last bit of the new-pad -> pad-added signal rename.
Fix the case where an element query would only work if the source
pad was linked.
Avoid some useless type checking in message handling.
* gst/gstevent.c:
* gst/gstevent.h:
* gst/gstutils.c:
Documentation updates.
2006-09-15 08:32:57 +00:00
Wim Taymans 3f7a406618 gst/gstelement.c: Clear the pad caps when the element shut down all of the pads and is not streaming data that could ...
Original commit message from CVS:
* gst/gstelement.c: (activate_pads), (clear_caps),
(iterator_activate_fold_with_resync), (gst_element_pads_activate):
Clear the pad caps when the element shut down all of the pads and
is not streaming data that could modify the caps.
Fixes #352958.
2006-08-29 09:56:57 +00:00
Torsten Schoenfeld 7fc02489e3 Check for NULL before _reffing the bus. Fixes #353122.
Original commit message from CVS:
Patch by: Torsten Schoenfeld <kaffeetisch at gmx dot de>
* gst/gstelement.c: (gst_element_get_bus):
* tests/check/gst/gstelement.c: (GST_START_TEST):
Check for NULL before _reffing the bus. Fixes #353122.
2006-08-28 08:35:31 +00:00
Tim-Philipp Müller 2d28c5226b gst/gstelement.c: Don't crash printing the warning if the pad has no parent.
Original commit message from CVS:
* gst/gstelement.c: (gst_element_remove_pad):
Don't crash printing the warning if the pad has no parent.
2006-08-04 15:15:24 +00:00
Wim Taymans 8b23eed267 gst/gstelement.c: Better pad activation code: Reset the collect value too on resync.
Original commit message from CVS:
* gst/gstelement.c: (activate_pads),
(iterator_activate_fold_with_resync), (gst_element_pads_activate):
Better pad activation code: Reset the collect value too on resync.
Add some comments.
2006-07-09 16:56:48 +00:00
Wim Taymans a888719a87 gst/gstelement.c: Small cleanup in pad activation code.
Original commit message from CVS:
* gst/gstelement.c: (gst_element_pads_activate):
Small cleanup in pad activation code.
2006-07-03 16:46:07 +00:00
Edward Hervey 1f5a5c6bbe gst/gstelement.c: We need to deactivate src pads first and then sink pads.
Original commit message from CVS:
* gst/gstelement.c: (gst_element_pads_activate):
We need to deactivate src pads first and then sink pads.
The reason is the src pads might be blocking while holding the streaming
lock, so we need to deactivate them first so that deactivating the sink
pads doesn't block (since it will require the streaming lock).
2006-06-22 17:09:13 +00:00
Wim Taymans 2a51528a41 gst/gstelement.c: Clarify the use of _release_request_pad() and _get_request_pad() a bit better.
Original commit message from CVS:
* gst/gstelement.c:
Clarify the use of _release_request_pad() and
_get_request_pad() a bit better.
* libs/gst/base/gstadapter.c: (gst_adapter_peek),
(gst_adapter_take_buffer):
Fix some doc and comment typos.
2006-05-30 15:53:40 +00:00
Thomas Vander Stichele 38d144fcb3 whitespace, comment, doc fixup
Original commit message from CVS:
whitespace, comment, doc fixup
2006-05-08 15:53:12 +00:00
Stefan Kost 57cc3ab3aa gst/gstelement.c: use full enum names and preprend a '%' in docs strings to make recent gtk-doc turn that into a link
Original commit message from CVS:
* gst/gstelement.c:
use full enum names and preprend a '%' in docs strings to make recent
gtk-doc turn that into a link
2006-05-06 21:45:27 +00:00
Stefan Kost 77a5695718 Fix #337365 (g_type_class_ref <-> g_type_class_peek_parent)
Original commit message from CVS:
* gst/gstbuffer.c: (gst_subbuffer_class_init):
* gst/gstclock.c: (gst_clock_class_init):
* gst/gstelement.c: (gst_element_class_init):
* gst/gstindex.c: (gst_index_class_init):
* gst/gstindexfactory.c: (gst_index_factory_class_init):
* gst/gstobject.c: (gst_object_class_init),
(gst_signal_object_class_init):
* gst/gstpad.c: (gst_pad_class_init):
* gst/gstpadtemplate.c: (gst_pad_template_class_init):
* gst/gstpluginfeature.c: (gst_plugin_feature_class_init):
* gst/gstregistry.c: (gst_registry_class_init):
* gst/gstsystemclock.c: (gst_system_clock_class_init):
* gst/gsttask.c: (gst_task_class_init):
* gst/gstxml.c: (gst_xml_class_init):
* libs/gst/base/gstbasesink.c: (gst_base_sink_class_init):
* libs/gst/base/gstbasesrc.c: (gst_base_src_class_init),
(gst_base_src_loop):
* libs/gst/controller/gstcontroller.c:
(_gst_controller_class_init):
* plugins/elements/gstfdsrc.c: (gst_fd_src_class_init):
* plugins/indexers/gstfileindex.c: (gst_file_index_class_init):
* plugins/indexers/gstmemindex.c: (gst_mem_index_class_init):
* tests/old/examples/plugins/example.c: (gst_example_class_init):
* tests/old/testsuite/threads/signals.c: (gst_test_class_init):
Fix #337365 (g_type_class_ref <-> g_type_class_peek_parent)
2006-04-08 20:57:31 +00:00
Michael Smith 96d945bc58 gst/gstpipeline.c: When we create a pipeline bus, initially create it in flushing mode.
Original commit message from CVS:
* gst/gstpipeline.c: (gst_pipeline_init):
When we create a pipeline bus, initially create it in flushing mode.
Fixes leaks in at least one test, and makes a new pipeline work the
same as one that has gone to READY and then back to NULL.

* gst/gstelement.c:
Typo fix in docs.
2006-04-05 15:46:00 +00:00
Stefan Kost a7004ec5a2 gst/gstelement.c: Little clarification in the docs
Original commit message from CVS:
* gst/gstelement.c:
Little clarification in the docs
2006-03-24 10:44:17 +00:00
Wim Taymans 0e984d3026 gst/gstelement.c: Cleanup the error case.
Original commit message from CVS:
* gst/gstelement.c: (gst_element_set_locked_state),
(gst_element_dispose):
Cleanup the error case.
* gst/gstobject.c: (gst_object_dispose):
print a critical when some object was disposed with
a parent, also revive the object since it might
crash the parent.
2006-03-22 13:10:16 +00:00
Edward Hervey ac377b0cdc Series of fixes for dereferenced pointers that gcc 4.1 complains about.
Original commit message from CVS:
reviewed by: <delete if not using a buddy>
* gst/gstbin.c: (gst_bin_dispose), (gst_bin_provide_clock_func),
(gst_bin_handle_message_func):
* gst/gstclock.c: (gst_clock_dispose), (gst_clock_set_master):
* gst/gstelement.c: (gst_element_set_clock), (gst_element_dispose),
(gst_element_set_bus_func):
* gst/gstghostpad.c: (gst_proxy_pad_dispose):
* gst/gstminiobject.c: (gst_value_set_mini_object),
(gst_value_take_mini_object):
* gst/gstpad.c: (gst_pad_set_pad_template):
* gst/gstpipeline.c: (gst_pipeline_dispose),
(gst_pipeline_use_clock), (gst_pipeline_auto_clock):
* libs/gst/base/gstcollectpads.c: (gst_collect_pads_pop),
(gst_collect_pads_chain):
* libs/gst/net/gstnettimeprovider.c:
(gst_net_time_provider_set_property):
Series of fixes for dereferenced pointers that gcc 4.1 complains about.
It's in fact all issues with gst_*object_replace().
2006-03-21 14:14:49 +00:00
Wim Taymans 429ebfff2c Documentation updates.
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstbin.c: (bin_bus_handler), (gst_bin_handle_message_func):
* gst/gstbin.h:
* gst/gstbus.c: (gst_bus_class_init):
* gst/gstbus.h:
* gst/gstclock.c:
* gst/gstelement.c: (gst_element_set_locked_state):
* gst/gstsegment.c:
Documentation updates.
* gst/gstpipeline.c: (gst_pipeline_get_type),
(gst_pipeline_class_init), (gst_pipeline_init),
(gst_pipeline_dispose), (gst_pipeline_set_property),
(gst_pipeline_get_property), (do_pipeline_seek),
(gst_pipeline_send_event), (gst_pipeline_change_state),
(gst_pipeline_provide_clock_func), (gst_pipeline_set_delay),
(gst_pipeline_get_delay):
* gst/gstpipeline.h:
Added methods for setting the delay.
API: gst_pipeline_set_delay
API: gst_pipeline_get_delay
Add pipeline debug category
Various cleanups.
Updated docs.
Don't reset stream time when seek failed.
2006-03-13 11:04:38 +00:00
Wim Taymans a19398105c gst/gstbin.c: Help the compiler a bit with type registration.
Original commit message from CVS:
* gst/gstbin.c: (gst_bin_get_type), (gst_bin_handle_message_func):
Help the compiler a bit with type registration.
Use existing forward cod path instead of duplicating it when
handling a message.

* gst/gstbus.c: (gst_bus_get_type):
* gst/gstcaps.c: (gst_caps_get_type), (gst_static_caps_get_type):
* gst/gstchildproxy.c: (gst_child_proxy_get_type):
* gst/gstclock.c: (gst_clock_get_type):
* gst/gstelement.c: (gst_element_get_type),
* gst/gstelementfactory.c: (gst_element_factory_get_type):
* gst/gstindexfactory.c: (gst_index_factory_get_type):
* gst/gstminiobject.c: (gst_mini_object_get_type):
* gst/gstpad.c: (gst_pad_get_type):
* gst/gstsegment.c: (gst_segment_get_type):
* gst/gststructure.c: (gst_structure_get_type):
* gst/gstsystemclock.c: (gst_system_clock_get_type):
* gst/gsttask.c: (gst_task_get_type), (gst_task_join):
* gst/gstvalue.c:
Help compiler with type registration.

* plugins/elements/gstqueue.c: (gst_queue_handle_sink_event):
Small doc update.
2006-02-28 10:52:02 +00:00
Wim Taymans b37766658e docs/design/part-TODO.txt: Updated TODO list, basesrc supports seeking to non-bytes formats.
Original commit message from CVS:
* docs/design/part-TODO.txt:
Updated TODO list, basesrc supports seeking to non-bytes
formats.

* docs/design/part-element-sink.txt:
Update docs.

* gst/gstbin.c: (bin_replace_message),
(gst_bin_handle_message_func):
* gst/gstbus.c: (gst_bus_post), (gst_bus_pop):
* gst/gstevent.c: (gst_event_finalize):
* gst/gstpad.c: (gst_pad_event_default_dispatch),
(gst_pad_send_event):
Use shiny new _TYPE_NAME macros.

* libs/gst/base/gstbasesrc.c: (gst_base_src_get_range):
Move debug statement up.

* gst/gstelement.c: (gst_element_set_locked_state):
Add some debugging.
2006-02-13 11:52:43 +00:00
Thomas Vander Stichele 3f51c6bf65 doc sub80 fixes
Original commit message from CVS:
doc sub80 fixes
2006-02-06 15:25:26 +00:00
Wim Taymans e2e2bda0d3 gst/gstelement.c: Fixed #326576, been running this for quite some time with no regressions at all.
Original commit message from CVS:
* gst/gstelement.c: (gst_element_continue_state),
(gst_element_set_state_func), (gst_element_change_state):
Fixed #326576, been running this for quite some time with
no regressions at all.
2006-02-02 13:58:12 +00:00
Thomas Vander Stichele 93d14f9c64 gst/gstelement.c: also show file/line/func if no additional debug was given
Original commit message from CVS:

* gst/gstelement.c: (gst_element_message_full):
also show file/line/func if no additional debug was given
2006-01-31 10:16:49 +00:00
Stefan Kost a53172d79d doc fixes, to link to function, just write gst_cool_function(), don't prefix with '#'
Original commit message from CVS:
* gst/gstcaps.c:
* gst/gstelement.c: (gst_element_send_event):
* gst/gstevent.c:
* gst/gstinfo.c:
* gst/gstiterator.c:
* gst/gstiterator.h:
* gst/gstpad.c: (gst_pad_send_event):
* gst/gststructure.c:
* gst/gsturi.c:
* gst/gstutils.c:
* gst/gstvalue.c:
* libs/gst/base/gstadapter.c:
doc fixes, to link to function, just write gst_cool_function(), don't
prefix with '#'
2006-01-27 22:34:51 +00:00
Stefan Kost b352cee4f7 added code for downstream events, reviewed docs in gstevent.c
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstbin.c: (bin_element_is_src), (src_iterator_filter),
(gst_bin_iterate_sources), (gst_bin_send_event):
* gst/gstbin.h:
* gst/gstelement.c: (gst_element_send_event):
* gst/gstevent.c:
* gst/gstpad.c: (gst_pad_send_event):
added code for downstream events, reviewed docs in gstevent.c
2006-01-26 06:57:14 +00:00
Edward Hervey b5c4ad28c1 gst/gstelement.c: When activating, do src pads first, then sink pads.
Original commit message from CVS:
* gst/gstelement.c: (gst_element_pads_activate):
When activating, do src pads first, then sink pads.
When de-activating, do sink pads first, then src pads.
2006-01-19 18:06:18 +00:00
Thomas Vander Stichele 288f61d21f expand tabs
Original commit message from CVS:
expand tabs
2005-12-06 19:29:15 +00:00
Thomas Vander Stichele b3ac5a0f4e fix docs
Original commit message from CVS:
fix docs
2005-11-28 14:01:52 +00:00
Stefan Kost 7b347681d5 gst/gstelement.c: don't loop forever
Original commit message from CVS:
* gst/gstelement.c: (gst_element_dispose):
don't loop forever
* gst/gstiterator.c:
* gst/gststructure.c:
doc fixes
* libs/gst/controller/gstcontroller.c:
(gst_controlled_property_set_interpolation_mode):
* libs/gst/controller/gstcontroller.h:
* libs/gst/controller/gstinterpolation.c:
(interpolate_none_get_enum_value_array):
support controlling enums
2005-11-27 22:43:08 +00:00
Wim Taymans a9f7f7b7b6 Doc fixes.
Original commit message from CVS:
Doc fixes.
2005-11-24 09:44:07 +00:00
Wim Taymans cf925ebb6f gst/base/gstbasesink.*: No need to store the clock, the parent element class already has it.
Original commit message from CVS:
* gst/base/gstbasesink.c: (gst_base_sink_class_init),
(gst_base_sink_wait), (gst_base_sink_do_sync),
(gst_base_sink_handle_event):
* gst/base/gstbasesink.h:
No need to store the clock, the parent element class already
has it.

* gst/gstbin.c: (gst_bin_set_clock_func), (gst_bin_add_func):
Updates for clock_set returning a gboolean

* gst/gstclock.c: (gst_clock_entry_new), (gst_clock_id_wait),
(gst_clock_id_wait_async), (gst_clock_class_init),
(gst_clock_init), (gst_clock_finalize),
(gst_clock_get_internal_time), (gst_clock_get_time),
(gst_clock_slave_callback), (gst_clock_set_master),
(gst_clock_get_master), (do_linear_regression),
(gst_clock_add_observation), (gst_clock_set_property),
(gst_clock_get_property):
* gst/gstclock.h:
Implement master/slave. When setting a clock as a slave, a
periodic timeout is scheduled to sample master and slave times.
Then the slave clock is recalibrated to match offset and rate
of the master clock.
Update logging a bit.
Add flag so that a clock can state that is cannot be slaved to
another clock.

* gst/gstelement.c: (gst_element_set_clock):
* gst/gstelement.h:
The set_clock returns a gboolean for when an element cannot
deal with the selected clock in the pipeline.

* gst/gstpipeline.c: (gst_pipeline_change_state),
(gst_pipeline_set_clock):
* gst/gstpipeline.h:
Handle the case where the selected clock cannot be set on
the pipeline.

* gst/net/gstnetclientclock.c: (gst_net_client_clock_class_init),
(gst_net_client_clock_init), (gst_net_client_clock_finalize),
(gst_net_client_clock_set_property),
(gst_net_client_clock_get_property),
(gst_net_client_clock_observe_times):
* gst/net/gstnetclientclock.h:
Use regression code in GstClock parent, remove duplicated
functionality.
2005-11-22 18:28:44 +00:00
Andy Wingo 44c548b205 *.*: Ran scripts/update-macros. Oh yes. gst/gstobject.h (GST_OBJECT_GET_LOCK, GST_OBJECT_LOCK)
Original commit message from CVS:
2005-11-21  Andy Wingo  <wingo@pobox.com>

* *.h:
* *.c: Ran scripts/update-macros. Oh yes.

* gst/gstobject.h (GST_OBJECT_GET_LOCK, GST_OBJECT_LOCK)
(GST_OBJECT_TRYLOCK, GST_OBJECT_UNLOCK): Renamed from
GST_GET_LOCK, etc.

* scripts/update-macros: New script. Run it on your files to
change GST_LOCK to GST_OBJECT_LOCK, and the same for UNLOCK as
well.
2005-11-21 16:34:26 +00:00
Wim Taymans 10a32af38d Doc fixes.
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstbuffer.h:
* gst/gstelement.c:
* gst/gstformat.c:
* gst/gstformat.h:
* gst/gstindex.h:
* gst/gstquery.c:
* gst/gstquery.h:
* gst/gstvalue.c:
Doc fixes.
2005-11-20 14:50:43 +00:00
Andy Wingo 5748aa1156 gst/gstutils.h: gst/gstutils.c (g_static_rec_cond_wait)
Original commit message from CVS:
2005-11-19  Andy Wingo  <wingo@pobox.com>

* gst/gstutils.h:
* gst/gstutils.c (g_static_rec_cond_wait)
(g_static_rec_cond_timed_wait): Removed, no longer needed.

* gst/gstbin.c: Remove terrible continue_state prototype.

* gst/gstelement.h (gst_element_continue_state): Make public.

* gst/gstelement.h:
* gst/gstelement.c (gst_element_commit_state): Removed, replaced
by continue_state. Fixes #319389.
2005-11-19 17:50:52 +00:00
Andy Wingo 2124c0fded gst/gstelement.c (gst_element_set_base_time): Add debugging.
Original commit message from CVS:
2005-11-15  Andy Wingo  <wingo@pobox.com>

* gst/gstelement.c (gst_element_set_base_time): Add debugging.

* gst/gstpipeline.c (gst_pipeline_set_new_stream_time): Document
using GST_CLOCK_TIME_NONE to disable base time management.
(do_pipeline_seek, gst_pipeline_change_state): Don't reset stream
time if it was NONE before.
(gst_pipeline_change_state): Only munge the base time if
stream_time != GST_CLOCK_TIME_NONE.

* check/gst/gstpipeline.c (test_base_time): Punt around the
problem of the probe not being called, because that's not the
issue I'm looking at. Add a check that setting stream_time to NONE
disables base time management.
2005-11-15 17:57:51 +00:00
Wim Taymans a56bdf2768 Fix docs, move some STATE macros to private.
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstelement.c:
* gst/gstelement.h:
Fix docs, move some STATE macros to private.
2005-11-10 11:17:26 +00:00
Wim Taymans 82a38aff77 check/states/sinks.c: Uncomment fixed check.
Original commit message from CVS:
* check/states/sinks.c: (GST_START_TEST):
Uncomment fixed check.

* docs/design/part-TODO.txt:
Updated TODO.

* gst/base/gstbasesink.c: (gst_base_sink_commit_state),
(gst_base_sink_handle_object), (gst_base_sink_do_sync),
(gst_base_sink_get_position):
If we are going to PLAYING, post the right pending state
when we post the intermediate paused message.

* gst/gstelement.c: (gst_element_continue_state),
(gst_element_set_state_func), (gst_element_change_state):
Don't post state changes that were between the same state
and were not ASYNC.
2005-11-03 20:14:24 +00:00
Stefan Kost 87df15ff58 doc fixes
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstelement.c:
* gst/gstminiobject.c:
doc fixes
2005-11-03 19:38:48 +00:00
Wim Taymans 43fe0b06e9 check/states/sinks.c: Added some more checks. Specifically the case where NO_PREROLL elements are in the pipeline.
Original commit message from CVS:
* check/states/sinks.c: (GST_START_TEST), (gst_object_suite):
Added some more checks. Specifically the case where NO_PREROLL
elements are in the pipeline.

* gst/base/gstbasesink.c: (gst_base_sink_commit_state),
(gst_base_sink_handle_object), (gst_base_sink_do_sync),
(gst_base_sink_get_position):
Post READY->PAUSED state change messages too.
Fix bug where VOID was posted as pending state...

* gst/gstbin.c: (gst_bin_recalc_state):
use _element_continue_state() to continue the state change.

* gst/gstelement.c: (gst_element_continue_state),
(gst_element_commit_state), (gst_element_set_state_func),
(gst_element_change_state), (gst_element_change_state_func):
Lots of state change cleanups, assign the STATE_RETURN in
a new continue_state() function that also propagates the
last return value from a state change to the app.
Update some debug statements with proper category.
2005-11-03 17:12:00 +00:00
Wim Taymans 563477a64e gst/gstbin.c: Fix typo in docs.
Original commit message from CVS:
* gst/gstbin.c:
Fix typo in docs.

* gst/gstelement.c: (gst_element_commit_state):
Remove unused value.

* gst/gstiterator.c:
Mention that the returned element is reffed in the docs.
2005-11-02 18:44:20 +00:00
Stefan Kost 349aa7e2e6 fixing examples fixing docs typos changing log priority in error situations
Original commit message from CVS:
* examples/controller/audio-example.c: (main):
* examples/queue/queue.c: (event_loop):
* gst/base/gstbasetransform.h:
* gst/gstelement.c: (gst_element_send_event):
* gst/gstevent.h:
* gst/gstpad.c: (gst_pad_send_event):
fixing examples
fixing docs typos
changing log priority in error situations
2005-10-26 18:57:43 +00:00
Wim Taymans 2803a5587e docs/design/part-TODO.txt: Update TODO.
Original commit message from CVS:
* docs/design/part-TODO.txt:
Update TODO.

* gst/gstbin.c: (message_check), (bin_replace_message),
(bin_remove_messages), (is_eos), (gst_bin_add_func),
(update_degree), (gst_bin_sort_iterator_next), (bin_bus_handler),
(bin_query_duration_init), (bin_query_duration_fold),
(bin_query_duration_done), (bin_query_generic_fold),
(gst_bin_query):
Handle SEGMENT_START/DONE messages correctly.
More evolved query algorithm that handles duration queries
correctly.

* gst/gstelement.c: (gst_element_send_event), (gst_element_query),
(gst_element_get_state_func), (gst_element_abort_state),
(gst_element_commit_state), (gst_element_lost_state):
Some more debugging.

* gst/gstmessage.h:
Added doc.
2005-10-25 15:39:36 +00:00
Wim Taymans b8d492863b Yay! 1% more docs coverage.
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstelement.c: (gst_element_get_state_func),
(gst_element_abort_state), (gst_element_commit_state),
(gst_element_lost_state):
* gst/gstevent.h:
* gst/gstquery.c: (gst_query_set_position),
(gst_query_parse_position), (gst_query_set_duration),
(gst_query_parse_duration), (gst_query_new_convert):
* gst/gstutils.c:
Yay! 1% more docs coverage.
2005-10-20 20:25:55 +00:00
Wim Taymans 1cef8c5b5a check/: Small state change torture test.
Original commit message from CVS:
* check/Makefile.am:
* check/pipelines/stress.c: (GST_START_TEST),
(simple_launch_lines_suite), (main):
Small state change torture test.

* docs/design/part-states.txt:
* gst/base/gstbasesink.c: (gst_base_sink_commit_state),
(gst_base_sink_handle_object), (gst_base_sink_event), (do_playing),
(gst_base_sink_change_state):
Never take state lock from streaming thread, clean up ugly
hacks. Unfortunatly core does not yet support nice ways to
async commit state.

* gst/gstbin.c: (gst_bin_remove_func), (gst_bin_recalc_state),
(bin_bus_handler):
Start state recalc if a STATE_DIRTY message is posted, but only
on the toplevel bin.

* gst/gstelement.c: (gst_element_sync_state_with_parent),
(gst_element_get_state_func), (gst_element_abort_state),
(gst_element_commit_state), (gst_element_lost_state),
(gst_element_set_state_func), (gst_element_change_state):
* gst/gstelement.h:
State variables are now protected with the LOCK, the state
lock is only used to serialize _set_state().
2005-10-18 17:06:29 +00:00
Wim Taymans 0176d5a0cf Seriously, this is better than a previous commit as we only need to notify the fact that an element changed state in ...
Original commit message from CVS:
* check/gst/gstbin.c: (GST_START_TEST):
* check/gst/gstmessage.c: (GST_START_TEST):
* check/gst/gstpipeline.c: (GST_START_TEST), (message_received):
* gst/gstbin.c: (gst_bin_class_init), (gst_bin_recalc_func),
(bin_bus_handler):
* gst/gstelement.c: (gst_element_abort_state),
(gst_element_commit_state), (gst_element_lost_state):
* gst/gstmessage.c: (gst_message_new_state_changed),
(gst_message_new_state_dirty), (gst_message_new_segment_start),
(gst_message_new_segment_done), (gst_message_new_duration),
(gst_message_parse_state_changed),
(gst_message_parse_segment_start),
(gst_message_parse_segment_done), (gst_message_parse_duration):
* gst/gstmessage.h:
* tools/gst-launch.c: (event_loop):
Seriously, this is better than a previous commit as we only need
to notify the fact that an element changed state in a streaming
thread, marking the state of the parents dirty, hence the
STATE_DIRTY message instead of abusing a boolean in a STATE_CHANGE
message.
2005-10-18 16:25:38 +00:00
Wim Taymans 2c61a2f4d5 gst/: Cleanups, prepare for state change fixes.
Original commit message from CVS:
* gst/gstbin.c: (gst_bin_class_init), (gst_bin_get_state_func),
(gst_bin_recalc_func):
* gst/gstelement.c: (gst_element_set_clock),
(gst_element_abort_state), (gst_element_lost_state):
Cleanups, prepare for state change fixes.
2005-10-18 15:15:11 +00:00
Wim Taymans 74c74e189e gst/: Pending ABI changes.
Original commit message from CVS:
* gst/gstbin.h:
* gst/gstelement.c: (gst_element_class_init),
(gst_element_set_state), (gst_element_set_state_func):
* gst/gstelement.h:
Pending ABI changes.
GThreadPool in GstBinClass to monitor async state changes.
state_cookie in GstElement to detect concurrent gst/set state.
set_state is now virtual too in case a very complicated element
has to be constructed.
2005-10-18 14:29:21 +00:00
Wim Taymans 20aff65b34 Make messages future proof. state-change gets a flag if it was a message comming from the streaming thread.
Original commit message from CVS:
* check/gst/gstbin.c: (GST_START_TEST):
* check/gst/gstmessage.c: (GST_START_TEST):
* check/gst/gstpipeline.c: (GST_START_TEST), (message_received):
* gst/gstbin.c: (bin_bus_handler):
* gst/gstelement.c: (gst_element_commit_state),
(gst_element_lost_state):
* gst/gstmessage.c: (gst_message_new_state_changed),
(gst_message_new_segment_start), (gst_message_new_segment_done),
(gst_message_new_duration), (gst_message_parse_state_changed),
(gst_message_parse_segment_start),
(gst_message_parse_segment_done), (gst_message_parse_duration):
* gst/gstmessage.h:
* tools/gst-launch.c: (event_loop):
Make messages future proof.
state-change gets a flag if it was a message comming from the
streaming thread.
segment-start/stop can also be specified in other formats.
A message to notify an app that a pipeline changed playback
duration.
Also fix a GstMessage leak in -launch
2005-10-18 13:19:16 +00:00
Andy Wingo 265df9f026 gst/gstelement.c (gst_element_dispose): More helpful message.
Original commit message from CVS:
2005-10-18  Andy Wingo  <wingo@pobox.com>

* gst/gstelement.c (gst_element_dispose): More helpful message.
2005-10-18 10:32:48 +00:00
Andy Wingo 839de99850 gst/base/gstcollectpads.c (gst_collectpads_chain): Slight cleanup.
Original commit message from CVS:
2005-10-17  Andy Wingo  <wingo@pobox.com>

* gst/base/gstcollectpads.c (gst_collectpads_chain): Slight
cleanup.

* gst/Makefile.am (gstenumtypes.c): Threadsafe now.

* gst/gstevent.c (gst_event_new, gst_event_finalize): LOG.

* gst/gstelement.c (gst_element_get_state_func): s/INFO/DEBUG/.
(gst_element_get_state_func): Better debug message.
(gst_element_commit_state): s/INFO/DEBUG/.
(gst_element_lost_state, gst_element_change_state):

* gst/gstmessage.c (gst_message_init): s/INFO/LOG/.
(gst_message_new_custom): s/INFO/LOG/.
2005-10-17 18:09:32 +00:00
Thomas Vander Stichele d81f2a6d5b gst/gstcaps.c: fix signedness issues in a (hopefully) correct way
Original commit message from CVS:

* gst/gstcaps.c: (gst_caps_intersect):
fix signedness issues in a (hopefully) correct way
* gst/gstelement.c: (gst_element_pads_activate):
some debugging
* gst/gstobject.c: (gst_object_set_parent):
some debugging
2005-10-17 14:37:06 +00:00
Thomas Vander Stichele 2ca1c89aac gst/gst.*: remove _gst_registry_auto_load, not used anymore
Original commit message from CVS:

* gst/gst.c:
* gst/gst.h:
remove _gst_registry_auto_load, not used anymore
* gst/gstbin.c: (gst_bin_get_type):
* gst/gstbin.h:
* gst/gstelement.c: (gst_element_get_type):
* gst/gstelement.h:
* gst/gstobject.c: (gst_object_get_type):
* gst/gstobject.h:
* gst/gstpad.c: (gst_pad_get_type):
* gst/gstpad.h:
make _get_type functions similar, fixes data export from library
2005-10-15 16:33:09 +00:00
Thomas Vander Stichele bef56ce78d various style fixes
Original commit message from CVS:
various style fixes
2005-10-15 16:01:57 +00:00
Thomas Vander Stichele 2dd1598c56 whitespace fixes
Original commit message from CVS:
whitespace fixes
2005-10-15 15:30:24 +00:00
Thomas Vander Stichele 4a74148bd4 signedness/type fixes
Original commit message from CVS:
signedness/type fixes
2005-10-15 00:22:02 +00:00
Wim Taymans f6e003890d gst/: Protect flags with proper lock. unref provided cached clock in dispose.
Original commit message from CVS:
* gst/gstbin.c: (gst_bin_add_func), (gst_bin_remove_func),
(reset_degree), (gst_bin_dispose), (bin_bus_handler):
* gst/gstelement.c: (gst_element_commit_state),
(gst_element_set_state):
Protect flags with proper lock.
unref provided cached clock in dispose.
2005-10-12 19:38:44 +00:00
Stefan Kost a98aef82db renamed GST_FLAGS macros to GST_OBJECT_FLAGS moved bitshift from macro to enum definition
Original commit message from CVS:
* check/gst/gstbin.c: (GST_START_TEST):
* docs/gst/gstreamer-sections.txt:
* gst/base/gstbasesink.c: (gst_base_sink_init):
* gst/base/gstbasesrc.c: (gst_base_src_init),
(gst_base_src_get_range), (gst_base_src_check_get_range),
(gst_base_src_start), (gst_base_src_stop):
* gst/base/gstbasesrc.h:
* gst/elements/gstfakesrc.c: (gst_fake_src_set_property):
* gst/gstbin.c: (gst_bin_add_func), (gst_bin_remove_func),
(bin_element_is_sink), (reset_degree), (gst_bin_element_set_state),
(bin_bus_handler):
* gst/gstbin.h:
* gst/gstbuffer.h:
* gst/gstbus.c: (gst_bus_post), (gst_bus_set_flushing):
* gst/gstbus.h:
* gst/gstelement.c: (gst_element_is_locked_state),
(gst_element_set_locked_state), (gst_element_commit_state),
(gst_element_set_state):
* gst/gstelement.h:
* gst/gstindex.c: (gst_index_init):
* gst/gstindex.h:
* gst/gstminiobject.h:
* gst/gstobject.c: (gst_object_init), (gst_object_sink),
(gst_object_set_parent):
* gst/gstobject.h:
* gst/gstpad.c: (gst_pad_set_blocked_async), (gst_pad_is_blocked),
(gst_pad_get_caps_unlocked), (gst_pad_set_caps):
* gst/gstpad.h:
* gst/gstpadtemplate.h:
* gst/gstpipeline.c: (gst_pipeline_provide_clock_func),
(gst_pipeline_use_clock), (gst_pipeline_auto_clock):
* gst/gstpipeline.h:
* gst/indexers/gstfileindex.c: (gst_file_index_load),
(gst_file_index_commit):
* testsuite/bytestream/filepadsink.c: (gst_fp_sink_init):
* testsuite/pad/link.c: (gst_test_src_init),
(gst_test_filter_init), (gst_test_sink_init):
* testsuite/states/locked.c: (main):
renamed GST_FLAGS macros to GST_OBJECT_FLAGS
moved bitshift from macro to enum definition
2005-10-12 14:28:39 +00:00
Wim Taymans 6d0be74351 Use GstClockTime in _get_state() instead of GTimeVal.
Original commit message from CVS:
* check/gst/gstbin.c: (GST_START_TEST):
* check/gst/gstelement.c: (GST_START_TEST):
* check/gst/gstevent.c: (GST_START_TEST), (test_event):
* check/gst/gstghostpad.c: (GST_START_TEST):
* check/gst/gstpipeline.c: (GST_START_TEST):
* check/pipelines/simple_launch_lines.c: (run_pipeline):
* check/states/sinks.c: (GST_START_TEST):
* gst/elements/gsttypefindelement.c: (stop_typefinding):
* gst/gstbin.c: (gst_bin_provide_clock_func), (gst_bin_add_func),
(gst_bin_remove_func), (gst_bin_get_state_func),
(gst_bin_recalc_state), (gst_bin_change_state_func),
(bin_bus_handler):
* gst/gstelement.c: (gst_element_get_state_func),
(gst_element_get_state), (gst_element_abort_state),
(gst_element_commit_state), (gst_element_set_state),
(gst_element_change_state), (gst_element_change_state_func):
* gst/gstelement.h:
* gst/gstpipeline.c: (gst_pipeline_class_init), (do_pipeline_seek),
(gst_pipeline_provide_clock_func):
* gst/gstutils.c: (gst_element_link_pads_filtered):
* tools/gst-launch.c: (main):
* tools/gst-typefind.c: (main):
Use GstClockTime in _get_state() instead of GTimeVal.
Remove old code in gstutils.c
2005-10-12 12:18:48 +00:00
Wim Taymans 2153c45964 check/: Check fixes, use API as stated in design docs, remove hacks.
Original commit message from CVS:
* check/Makefile.am:
* check/generic/states.c: (GST_START_TEST):
* check/gst/gstbin.c: (GST_START_TEST):
* check/gst/gstpipeline.c: (GST_START_TEST), (gst_pipeline_suite):
* check/states/sinks.c: (GST_START_TEST):
* check/states/sinks2.c: (GST_START_TEST), (gst_object_suite),
(main):
Check fixes, use API as stated in design docs, remove hacks.

* gst/base/gstbasesink.c: (gst_base_sink_handle_object),
(gst_base_sink_change_state):
Catch stopping our task while we're shutting down.

* gst/gstbin.c: (gst_bin_init), (gst_bin_add_func),
(gst_bin_remove_func), (gst_bin_get_state_func),
(gst_bin_recalc_state), (gst_bin_change_state_func),
(bin_bus_handler):
* gst/gstbin.h:
* gst/gstelement.c: (gst_element_init),
(gst_element_get_state_func), (gst_element_abort_state),
(gst_element_commit_state), (gst_element_lost_state),
(gst_element_set_state), (gst_element_change_state),
(gst_element_change_state_func):
* gst/gstelement.h:
New state change algorithm (see #318116)

* gst/gstpipeline.c: (gst_pipeline_class_init),
(gst_pipeline_init), (gst_pipeline_set_property),
(gst_pipeline_get_property), (do_pipeline_seek),
(gst_pipeline_change_state), (gst_pipeline_provide_clock_func):
* gst/gstpipeline.h:
Remove crude state change hacks.

* gst/gstutils.h:
Remove crude hacks.

* tools/gst-launch.c: (main):
Fixes for state change. Needs some more work to fully use the
new stuff.
2005-10-10 16:38:26 +00:00
Wim Taymans 63f02ce9ad gst/gstelement.c: Use src/sink pads lists for the respective iterators instead of filtering.
Original commit message from CVS:
* gst/gstelement.c: (gst_element_iterate_pad_list),
(gst_element_iterate_pads), (gst_element_iterate_src_pads),
(gst_element_iterate_sink_pads):
Use src/sink pads lists for the respective iterators instead
of filtering.
2005-10-10 15:55:37 +00:00
Wim Taymans 9e17ca91dd gst/gstelement.c: And free the GStaticRecMutex too
Original commit message from CVS:
* gst/gstelement.c: (gst_element_finalize):
And free the GStaticRecMutex too
2005-10-10 15:17:35 +00:00
Andy Wingo cfd14e0fd3 gst/gstelement.c (gst_element_init, gst_element_finalize): Allocate and free the mutex properly.
Original commit message from CVS:
2005-10-10  Andy Wingo  <wingo@pobox.com>

* gst/gstelement.c (gst_element_init, gst_element_finalize):
Allocate and free the mutex properly.

* gst/gstelement.h (GST_STATE_UNLOCK_FULL, GST_STATE_LOCK_FULL):
New macros.
(GstElement): The state_lock is now recursive. Rebuild your
plugins, suckers. Old macros adapted.
2005-10-10 14:33:13 +00:00
Andy Wingo addf0c460b gst/gstelement.c (gst_element_change_state_func): Renamed from gst_element_change_state, variable name changes.
Original commit message from CVS:
2005-10-10  Andy Wingo  <wingo@pobox.com>

* gst/gstelement.c (gst_element_change_state_func): Renamed from
gst_element_change_state, variable name changes.
(gst_element_change_state): Split out of gst_element_set_state in
preparation for the state change merge. Doesn't pay attention to
the 'transition' argument.
(gst_element_set_state): Updates, hopefully purely cosmetic.
(gst_element_sync_state_with_parent): MT-safety. Ported from the
state change patch.
(gst_element_get_state_func): Renamed from get_state, cosmetic
changes.
2005-10-10 14:03:25 +00:00
Wim Taymans e823f47cdd gst/: Small docs and debug updates.
Original commit message from CVS:
* gst/gstbin.c: (is_eos), (update_degree), (gst_bin_query):
* gst/gstelement.c: (gst_element_post_message):
* gst/gstpipeline.c: (gst_pipeline_change_state):
Small docs and debug updates.
2005-10-08 18:21:20 +00:00
Wim Taymans ae25867a05 gst/gstbin.c: Fix typos, add comments.
Original commit message from CVS:
* gst/gstbin.c: (is_eos), (update_degree), (gst_bin_change_state),
(gst_bin_dispose), (bin_bus_handler):
Fix typos, add comments.
Clear EOS list when going to PAUSED from any direction and do it
in a threadsafe way.
Get base time in a threadsafe way too.
Fix confusing debug in the change_state function.
Various other mall cleanups.

* gst/gstelement.c: (gst_element_post_message):
Fix very verbose bus posting code.

* gst/gstpipeline.c: (gst_pipeline_class_init),
(gst_pipeline_set_property), (gst_pipeline_get_property),
(gst_pipeline_change_state):
Small ARG_ -> PROP_ cleanup
2005-10-08 18:01:04 +00:00
Wim Taymans ce081d6341 Added extra field to STATE_CHANGE message with the pending state, which will be different from the new state soon.
Original commit message from CVS:
* check/gst/gstbin.c: (GST_START_TEST):
* check/gst/gstmessage.c: (GST_START_TEST):
* check/gst/gstpipeline.c: (GST_START_TEST), (message_received):
* gst/gstelement.c: (gst_element_commit_state),
(gst_element_lost_state):
* gst/gstmessage.c: (gst_message_new_state_changed),
(gst_message_parse_state_changed):
* gst/gstmessage.h:
* tools/gst-launch.c: (event_loop):
Added extra field to STATE_CHANGE message with the pending
state, which will be different from the new state soon.
2005-10-08 08:58:45 +00:00
Andy Wingo 7fe57d86a0 gst/gstelement.c (gst_element_post_message): Doc update.
Original commit message from CVS:
2005-10-07  Andy Wingo  <wingo@pobox.com>

* gst/gstelement.c (gst_element_post_message): Doc update.
2005-10-07 16:28:56 +00:00
Johan Dahlin 25a0f8c57f Add a GType to GstIterator, update callsites and tests.
Original commit message from CVS:
* check/gst/gstiterator.c: (GST_START_TEST):
* gst/gstbin.c: (gst_bin_iterate_elements),
(gst_bin_iterate_recurse), (gst_bin_iterate_sorted):
* gst/gstelement.c: (gst_element_iterate_pads):
* gst/gstformat.c: (gst_format_iterate_definitions):
* gst/gstiterator.c: (gst_iterator_init), (gst_iterator_new),
(gst_iterator_new_list), (gst_iterator_filter):
* gst/gstiterator.h:
* gst/gstquery.c: (gst_query_type_iterate_definitions):
Add a GType to GstIterator, update callsites and tests.
2005-10-07 00:14:45 +00:00
Thomas Vander Stichele 93c6b88036 gst/: widen the debug category in output to fit the biggest one we have add a bus category and use it play with the c...
Original commit message from CVS:

* gst/gst_private.h:
* gst/gstbus.c:
* gst/gstelement.c:
* gst/gstinfo.c:
* gst/gstpluginfeature.c:
widen the debug category in output to fit the biggest one we have
add a bus category and use it
play with the colors
fix up some categories
2005-10-06 09:49:42 +00:00
Thomas Vander Stichele 6eb5fb3112 doc updates
Original commit message from CVS:
doc updates
2005-10-05 22:35:14 +00:00
Wim Taymans 93823de17e gst/gstelement.c: Small tweak, element in ASYNC remains ASYNC.
Original commit message from CVS:
* gst/gstelement.c: (gst_element_set_state),
(gst_element_change_state):
Small tweak, element in ASYNC remains ASYNC.
2005-09-30 08:29:02 +00:00
Thomas Vander Stichele 18682cacc1 check/: fix tests for the new warning
Original commit message from CVS:

* check/gst/gstbin.c:
* check/states/sinks.c:
fix tests for the new warning
* check/gst/gstpipeline.c:
add a test for pipeline and bus interaction
* gst/gstelement.c:
elements should be NULL if they get disposed; add a warning if not
2005-09-29 18:37:48 +00:00
Wim Taymans 92836e5172 check/gst/gstbin.c: Add bus to bin.
Original commit message from CVS:
* check/gst/gstbin.c: (GST_START_TEST):
Add bus to bin.

* gst/gstbin.c: (gst_bin_class_init), (gst_bin_init),
(add_to_queue), (clear_queue), (reset_degree), (update_degree),
(find_element), (gst_bin_sort_iterator_next),
(gst_bin_sort_iterator_resync), (gst_bin_sort_iterator_free),
(gst_bin_iterate_sorted), (gst_bin_element_set_state),
(gst_bin_change_state), (gst_bin_dispose):
A bin does not have a bus, it gets the bus from the parent.

* gst/gstelement.c: (gst_element_requires_clock),
(gst_element_provides_clock), (gst_element_is_indexable),
(gst_element_is_locked_state), (gst_element_change_state),
(gst_element_set_bus_func):
Small cleanups.

* gst/gstpipeline.c: (gst_pipeline_class_init),
(gst_pipeline_init), (gst_pipeline_provide_clock_func):
The pipeline provides a bus.
2005-09-29 09:39:36 +00:00
Wim Taymans de789ca484 gst/gstbin.c: Small doc fixes. get_clock -> provide_clock.
Original commit message from CVS:
* gst/gstbin.c: (gst_bin_class_init), (gst_bin_provide_clock_func),
(add_to_queue), (clear_queue), (reset_degree), (update_degree),
(find_element), (gst_bin_sort_iterator_next),
(gst_bin_sort_iterator_resync), (gst_bin_sort_iterator_free),
(gst_bin_iterate_sorted), (gst_bin_element_set_state),
(gst_bin_change_state), (gst_bin_dispose):
Small doc fixes. get_clock -> provide_clock.

* gst/gstelement.c: (gst_element_class_init),
(gst_element_provides_clock), (gst_element_provide_clock),
(gst_element_get_clock), (gst_element_commit_state),
(gst_element_lost_state):
* gst/gstelement.h:
Make get/set_clock() symetric. Add provide_clock vmethod since
that is actually what this function does.

* gst/gstpipeline.c: (gst_pipeline_class_init),
(gst_pipeline_change_state), (gst_pipeline_provide_clock_func),
(gst_pipeline_get_clock):
get_clock -> provide_clock.
2005-09-28 13:41:27 +00:00
Thomas Vander Stichele daadaad81b gst/: remove now useless and leaky resurrection code in dispose
Original commit message from CVS:

* gst/gstbin.c: (gst_bin_dispose):
* gst/gstelement.c: (gst_element_dispose):
remove now useless and leaky resurrection code in dispose
* gst/base/gstbasesrc.c: (gst_base_src_init):
* gst/gstelementfactory.c: (gst_element_factory_create):
* gst/gstobject.c: (gst_object_set_parent):
add some debugging
2005-09-27 18:33:48 +00:00
Wim Taymans 84770e8437 Various documentation updates.
Original commit message from CVS:
* docs/design/part-events.txt:
* docs/design/part-gstbus.txt:
* docs/design/part-gstpipeline.txt:
* docs/design/part-messages.txt:
* docs/design/part-overview.txt:
* docs/design/part-segments.txt:
* gst/gstbin.c:
* gst/gstbuffer.c:
* gst/gstclock.c:
* gst/gstelement.c:
* gst/gstevent.c:
* gst/gstfilter.c:
* gst/gstiterator.c:
Various documentation updates.
2005-09-24 14:14:03 +00:00
Tim-Philipp Müller 705936d1bf check/gst/gstbin.c: Added test to check state change order in bins (can still be made to fail here under heavy disk l...
Original commit message from CVS:
* check/gst/gstbin.c: (test_children_state_change_order_flagged_sink),
(test_children_state_change_order_semi_sink), (gst_bin_suite):
Added test to check state change order in bins (can still be made
to fail here under heavy disk load; bails out with 'Push on pad
fakesink:sink0, but it was not activated in push mode').
* gst/gstbin.c: (gst_bin_class_init), (gst_bin_change_state):
Fix state change order when there is only a semi sink (#316856)
* gst/gstbus.c: (gst_bus_class_init):
Use _class_peek_parent(), not _class_ref(); fix docs to say
'default main context' instead of 'mainloop' where that is
what's meant.
* gst/gstelement.c: (gst_element_commit_state),
(gst_element_set_state):
Fix typos in debug messages
2005-09-23 17:17:42 +00:00
Stefan Kost 5afb6e6809 inlined 3 more biiiig doc files and added some missing docs on the fly
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* docs/gst/tmpl/.cvsignore:
* docs/gst/tmpl/gstelement.sgml:
* docs/gst/tmpl/gstinfo.sgml:
* docs/gst/tmpl/gstobject.sgml:
* gst/gstelement.c:
* gst/gstelement.h:
* gst/gstinfo.c:
* gst/gstinfo.h:
* gst/gstobject.c: (gst_object_class_init):
* gst/gstobject.h:
inlined 3 more biiiig doc files and added some missing docs on the fly
2005-09-23 14:31:21 +00:00
Wim Taymans 43c8433a07 gst/base/gstbasesink.c: Prepare for more accurate position reporting and query handling.
Original commit message from CVS:
* gst/base/gstbasesink.c: (gst_base_sink_class_init),
(gst_base_sink_send_event), (gst_base_sink_peer_query),
(gst_base_sink_query):
Prepare for more accurate position reporting and query
handling.

* gst/gstelement.c: (gst_element_send_event),
(gst_element_set_state):
Add some comment.
2005-09-22 18:07:22 +00:00
Wim Taymans 4793bc208d gst/gstbin.c: Some more debug info.
Original commit message from CVS:
* gst/gstbin.c: (gst_bin_add_func):
Some more debug info.

* gst/gstelement.c: (gst_element_send_event):
Simplify send_event

* gst/gstelement.h:
Don't know how flags got broken.

* gst/gstquery.h:
Added new query.
2005-09-22 16:51:27 +00:00
Thomas Vander Stichele 361d0f2922 docs/: add a quote
Original commit message from CVS:

* docs/gst/tmpl/gstelement.sgml:
* docs/manual/appendix-quotes.xml:
add a quote
* gst/gstelement.c: (gst_element_set_state):
add some debug
2005-09-12 16:10:18 +00:00
Andy Wingo e040bb2dbe gst/gstelement.h (GstState): Renamed from GstElementState, changed to be a normal enum instead of flags.
Original commit message from CVS:
2005-09-02  Andy Wingo  <wingo@pobox.com>

* gst/gstelement.h (GstState): Renamed from GstElementState,
changed to be a normal enum instead of flags.
(GstStateChangeReturn): Renamed from GstElementStateReturn, names
munged to be GST_STATE_CHANGE_*.
(GST_STATE_CHANGE): Renamed from GST_STATE_TRANSITION, updated to
work with the new state representation.
(GstStateChange): New enumeration of possible state transitions.
Replaces GST_STATE_FOO_TO_BAR with GST_STATE_CHANGE_FOO_TO_BAR.
(GstElementClass::change_state): Pass the GstStateChange along as
an argument. Helps language bindings, so they don't have to use
tricky lock-needing macros like GST_STATE_CHANGE ().

* scripts/update-states (file): New script. Run it on a file to
update it for state naming and API changes. Updates files in
place.

* All files updated for the new API.
2005-09-02 15:42:00 +00:00
Jan Schmidt e4b8f77538 Add metadata reading example that loops over a list of filenames, dumping any tags found.
Original commit message from CVS:
* configure.ac:
* examples/Makefile.am:
* examples/metadata/Makefile.am:
* examples/metadata/read-metadata.c: (message_loop),
(have_pad_handler), (make_pipeline), (print_tag), (main):
Add metadata reading example that loops over a list of filenames,
dumping any tags found.

* gst/gstbus.c: (gst_bus_dispose):
* gst/gstelement.c: (gst_element_dispose):
Release a few potentially-held references in dispose.
2005-08-26 13:28:01 +00:00
Stefan Kost a28d63431a gst/gstbin.h: removed ';' from the end of macro defs
Original commit message from CVS:
* gst/gstbin.h:
removed ';' from the end of macro defs
* docs/gst/gstreamer-docs.sgml:
* docs/gst/gstreamer-sections.txt:
* docs/gst/tmpl/.cvsignore:
* gst/gstbus.h:
* gst/gstelement.c: (gst_element_class_init),
(gst_element_set_state), (activate_pads),
(gst_element_save_thyself):
* gst/gstevent.c: (gst_event_new_newsegment):
* gst/gstevent.h:
* gst/gstiterator.c:
* gst/gstiterator.h:
* gst/gstpad.c:
* gst/gstprobe.h:
* gst/gstutils.c: (gst_pad_query_convert):
* gst/gstutils.h:
fixed parameter name mismatches between source, header and docs
added some more docs, resolved the last batch of unused elements in
docs (now someone needs to doc them)
2005-08-25 23:17:18 +00:00
Stefan Kost a7d4464ac1 Fixed long standing mem-leak
Original commit message from CVS:
* gst/gstelement.c: (gst_element_class_init),
(gst_element_set_state), (activate_pads),
(gst_element_save_thyself):
* tools/gst-compprep.c: (main):
* tools/gst-inspect.c: (print_element_properties_info):
* tools/gst-xmlinspect.c: (print_element_properties):
Fixed long standing mem-leak
2005-08-24 13:04:31 +00:00
Stefan Kost eef38df668 added about 100 symbols from gstreamer-unused.txt to the right sections fixed more broken comments added GstBus to docs
Original commit message from CVS:
* docs/gst/gstreamer-docs.sgml:
* docs/gst/gstreamer-sections.txt:
* docs/gst/gstreamer.types:
* docs/gst/tmpl/.cvsignore:
* gst/gstbin.h:
* gst/gstbus.c:
* gst/gstelement.c:
* gst/gstevent.h:
added about 100 symbols from gstreamer-unused.txt to the right sections
fixed more broken comments
added GstBus to docs
2005-08-23 14:25:55 +00:00
Wim Taymans d31c5ea1f6 gst/gstcaps.c: Make _static_caps_get() refcounting sane.
Original commit message from CVS:
* gst/gstcaps.c: (gst_static_caps_get), (gst_caps_to_string):
Make _static_caps_get() refcounting sane.

* gst/gstelement.c: (gst_element_set_state):
Add g_return_val_if_fail() to protect against segfaults.
2005-08-22 14:35:42 +00:00
Andy Wingo aa0fb69d49 Make sure that when a pipeline goes to PLAYING, that data has actually hit the sink.
Original commit message from CVS:
2005-08-18  Andy Wingo  <wingo@pobox.com>

Make sure that when a pipeline goes to PLAYING, that data has
actually hit the sink.

* check/states/sinks.c (test_sink): A sink that doesn't get any
data shouldn't return SUCCESS for going to either PLAYING or
PAUSED. Test also the return values on the way back down.

* gst/gstelement.c (gst_element_set_state): When changing the
state of an element currently changing state asynchronously, go to
lost-state after commiting the pending state. Makes future calls
to get_state continue to return ASYNC.

* gst/base/gstbasesink.c (gst_base_sink_change_state): Return
ASYNC when going to PLAYING if we still don't have preroll, as can
happen with live sources.
2005-08-18 16:20:24 +00:00
Wim Taymans 01ace6b592 check/gst/gstvalue.c: Added subtract checks.
Original commit message from CVS:
* check/gst/gstvalue.c: (GST_START_TEST), (gst_value_suite):
Added subtract checks.

* docs/design/part-events.txt:
Some more docs about newsegment

* gst/gstbin.c: (gst_bin_change_state), (bin_bus_handler):
Fix FIXME

* gst/gstcaps.c: (gst_caps_to_string):
Add comments, cleanups.

* gst/gstelement.c: (gst_element_save_thyself):
cleanups

* gst/gstvalue.c: (gst_value_collect_int_range),
(gst_string_unwrap), (gst_value_union_int_int_range),
(gst_value_union_int_range_int_range),
(gst_value_intersect_int_int_range),
(gst_value_intersect_int_range_int_range),
(gst_value_intersect_double_double_range),
(gst_value_intersect_double_range_double_range),
(gst_value_intersect_list), (gst_value_subtract_int_int_range),
(gst_value_subtract_int_range_int),
(gst_value_subtract_double_range_double),
(gst_value_subtract_double_range_double_range),
(gst_value_subtract_from_list), (gst_value_subtract_list),
(gst_value_can_compare), (gst_value_compare_fraction):
Cleanups, add comments, remove unneeded asserts.
2005-08-16 09:42:50 +00:00
Stefan Kost cdc8ba9725 docs/gst/gstreamer-sections.txt: made some defines private
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
made some defines private
* docs/gst/tmpl/gstconfig.sgml:
* docs/gst/tmpl/gstqueue.sgml:
* docs/gst/tmpl/gsttaglist.sgml:
* docs/gst/tmpl/gsttypes.sgml:
* docs/gst/tmpl/gstutils.sgml:
* docs/pwg/appendix-porting.xml:
* gst/base/gstbasesink.h:
* gst/base/gstbasesrc.c:
* gst/base/gstbasesrc.h:
* gst/elements/gstfakesink.c: (gst_fake_sink_class_init):
* gst/elements/gstfakesrc.c: (gst_fake_src_class_init):
* gst/gstelement.c: (gst_element_class_init):
* gst/gstpad.c: (gst_pad_class_init):
* gst/gstqueue.c: (gst_queue_class_init):
* gst/gstxml.c: (gst_xml_class_init):
documented all undocumented signal inline
* libs/gst/controller/gst-controller.h:
added padding
2005-08-15 16:57:34 +00:00
Ronald S. Bultje c27821d70c gst/gstelement.c: On paused->ready, set pad->caps to NULL, as is the documented behaviour in this state change. Fixes...
Original commit message from CVS:
* gst/gstelement.c: (activate_pads):
On paused->ready, set pad->caps to NULL, as is the documented
behaviour in this state change. Fixes playback of series of
media files when visualization is enabled in Totem.
2005-08-08 12:14:20 +00:00
Wim Taymans 7c7a4b68a1 check/gst/gstghostpad.c: Added some more tests for wrong hierarchy
Original commit message from CVS:
* check/gst/gstghostpad.c: (GST_START_TEST), (gst_ghost_pad_suite):
Added some more tests for wrong hierarchy

* docs/design/part-overview.txt:
Some updates.

* gst/gstbin.c: (gst_bin_remove_func), (gst_bin_dispose):
Cleanups.

* gst/gstelement.c: (gst_element_remove_pad), (gst_element_seek),
(gst_element_dispose):
Some more cleanups.

* gst/gstpad.c: (gst_pad_link_check_compatible_unlocked),
(gst_pad_link_check_hierarchy), (gst_pad_link_prepare),
(gst_pad_get_caps_unlocked), (gst_pad_accept_caps),
(gst_pad_set_caps), (gst_pad_send_event):
Check for correct hierarchy when linking pads. Moving to
strict requirement for ghostpads when linking elements in
different bins.

* gst/gstpad.h:
Clean ups. Added WRONG_HIERARCHY return value.
2005-07-28 11:24:33 +00:00
Wim Taymans 66d7070ef1 Some docs updates
Original commit message from CVS:
* CHANGES-0.9:
* docs/design/part-TODO.txt:
* docs/design/part-events.txt:
Some docs updates

* gst/base/gstbasesink.c: (gst_base_sink_handle_object),
(gst_base_sink_event), (gst_base_sink_do_sync),
(gst_base_sink_activate_push), (gst_base_sink_activate_pull):
* gst/base/gstbasesrc.c: (gst_base_src_send_discont),
(gst_base_src_do_seek), (gst_base_src_event_handler),
(gst_base_src_loop):
* gst/base/gstbasetransform.c: (gst_base_transform_transform_caps),
(gst_base_transform_configure_caps), (gst_base_transform_setcaps),
(gst_base_transform_get_size), (gst_base_transform_buffer_alloc),
(gst_base_transform_event), (gst_base_transform_handle_buffer),
(gst_base_transform_set_passthrough),
(gst_base_transform_is_passthrough):
* gst/elements/gstfakesink.c: (gst_fake_sink_event):
* gst/elements/gstfilesink.c: (gst_file_sink_event):
Event updates.

* gst/gstbuffer.h:
Use faster casts.

* gst/gstelement.c: (gst_element_seek):
* gst/gstelement.h:
Update gst_element_seek.

* gst/gstevent.c: (gst_event_finalize), (_gst_event_copy),
(gst_event_new), (gst_event_new_custom), (gst_event_get_structure),
(gst_event_new_flush_start), (gst_event_new_flush_stop),
(gst_event_new_eos), (gst_event_new_newsegment),
(gst_event_parse_newsegment), (gst_event_new_tag),
(gst_event_parse_tag), (gst_event_new_filler), (gst_event_new_qos),
(gst_event_parse_qos), (gst_event_new_seek),
(gst_event_parse_seek), (gst_event_new_navigation):
* gst/gstevent.h:
Make GstEvent use GstStructure. Add parsing code, make sure the
API is sufficiently generic.
Mark possible directions of events and serialization.

* gst/gstmessage.c: (gst_message_init), (gst_message_finalize),
(_gst_message_copy), (gst_message_new_segment_start),
(gst_message_new_segment_done), (gst_message_new_custom),
(gst_message_parse_segment_start),
(gst_message_parse_segment_done):
Small cleanups.

* gst/gstpad.c: (gst_pad_get_caps_unlocked), (gst_pad_accept_caps),
(gst_pad_set_caps), (gst_pad_send_event):
Update for new events.
Catch events sent in wrong directions.

* gst/gstqueue.c: (gst_queue_link_src),
(gst_queue_handle_sink_event), (gst_queue_chain), (gst_queue_loop),
(gst_queue_handle_src_query):
Event updates.

* gst/gsttag.c:
* gst/gsttag.h:
Remove event code from this file.

* libs/gst/dataprotocol/dataprotocol.c: (gst_dp_packet_from_event),
(gst_dp_event_from_packet):
Event updates.
2005-07-27 18:33:03 +00:00
Ronald S. Bultje 3f62c7db23 GstElement::new-pad -> pad-added, GstElement::state-change -> state-changed, GstValueFixedList -> GstValueArray, add ...
Original commit message from CVS:
* docs/manual/advanced-autoplugging.xml:
* docs/manual/basics-helloworld.xml:
* docs/manual/basics-pads.xml:
* docs/random/ds/0.9-suggested-changes:
* gst/gstelement.c: (gst_element_class_init), (gst_element_seek):
* gst/gstelement.h:
* gst/gstevent.h:
* gst/gstformat.h:
* gst/gstquery.h:
* gst/gststructure.c: (gst_structure_value_get_generic_type),
(gst_structure_parse_array), (gst_structure_parse_value):
* gst/gstvalue.c: (gst_type_is_fixed),
(gst_value_list_prepend_value), (gst_value_list_append_value),
(gst_value_list_get_size), (gst_value_list_get_value),
(gst_value_transform_array_string), (gst_value_serialize_array),
(gst_value_deserialize_array), (gst_value_intersect_array),
(gst_value_is_fixed), (_gst_value_initialize):
* gst/gstvalue.h:
GstElement::new-pad -> pad-added, GstElement::state-change ->
state-changed, GstValueFixedList -> GstValueArray, add format and
flags as their own arguments in gst_element_seek() (should improve
"bindeability"), remove function generators since they don't work
under a whole bunch of compilers (they were deprecated already
anyway).
2005-07-20 17:16:44 +00:00
Wim Taymans e1aeec6d77 Removed plugable schedulers.
Original commit message from CVS:
Removed plugable schedulers.
Removed Scheduler/Manager from elements.
Removed gsttypes.h, rearranged includes.
Removed dependency pad<->element, element<>pipeline, and
various others,  fix includes.
implement gst_pad_get_parent() with gst_object_get_parent()
Make GstTask sefcontained.
Fix _get_state() on GstBin, it did not return ASYNC with a 0
timeout.
Fix endless loop in iterator_fold_with_resync.
2005-07-18 12:49:53 +00:00
Wim Taymans d5be929bf8 gst/base/gstbasesink.*: Store and use discont values when syncing buffers as described in design docs.
Original commit message from CVS:
* gst/base/gstbasesink.c: (gst_base_sink_handle_object),
(gst_base_sink_event), (gst_base_sink_get_times),
(gst_base_sink_do_sync), (gst_base_sink_change_state):
* gst/base/gstbasesink.h:
Store and use discont values when syncing buffers as described
in design docs.

* gst/base/gstbasesrc.c: (gst_base_src_send_discont),
(gst_base_src_do_seek), (gst_base_src_loop), (gst_base_src_start),
(gst_base_src_activate_push):
Push discont event when starting.

* gst/elements/gstidentity.c: (gst_identity_transform):
Small cleanups.

* gst/gstbin.c: (gst_bin_change_state):
Small cleanups in base_time  distribution.

* gst/gstelement.c: (gst_element_set_base_time),
(gst_element_get_base_time), (gst_element_change_state):
* gst/gstelement.h:
Added methods for the base_time of the element.
Some MT fixes.

* gst/gstpipeline.c: (gst_pipeline_send_event),
(gst_pipeline_change_state), (gst_pipeline_set_new_stream_time),
(gst_pipeline_get_last_stream_time):
* gst/gstpipeline.h:
MT fixes.
Handle seeking as described in design doc, remove stream_time
hack.
Cleanups clock and stream_time selection code. Added accessors
for the stream_time.
2005-07-16 14:41:25 +00:00
Thomas Vander Stichele 232b0ba690 fix refcounting of warning and error messages
Original commit message from CVS:
fix refcounting of warning and error messages
2005-07-12 16:28:36 +00:00
Thomas Vander Stichele 3127459e22 gst/gstelement.c: add debug
Original commit message from CVS:

* gst/gstelement.c: (gst_element_get_bus):
add debug
* tools/gst-launch.c: (check_intr), (event_loop):
fix bus leaks
2005-07-10 00:07:51 +00:00
Thomas Vander Stichele fe31300609 check/gst/gstbin.c: add more things to check
Original commit message from CVS:

* check/gst/gstbin.c: (pop_messages), (GST_START_TEST),
(gst_bin_suite):
add more things to check
* gst/gstbin.c: (gst_bin_change_state), (bin_bus_handler):
* gst/gstelement.c:
more debug
2005-07-09 22:54:28 +00:00
Thomas Vander Stichele 48464956ca check/gst/gstbin.c: add test for state change message on a bin
Original commit message from CVS:

* check/gst/gstbin.c: (START_TEST), (gst_bin_suite):
add test for state change message on a bin
* check/gst/gstelement.c: (START_TEST), (gst_element_suite):
add another test
* gst/gstbin.c: (gst_bin_init):
* gst/gstbus.c: (gst_bus_init), (gst_bus_post):
* gst/gstelement.c: (gst_element_post_message),
(gst_element_set_state):
* gst/gstelementfactory.c: (gst_element_factory_create):
* gst/gstmessage.c: (gst_message_new):
* gst/gstscheduler.c:
various debugging additions and cleanups
2005-07-09 15:18:53 +00:00
Thomas Vander Stichele 240c8e10cf adding tests for elements
Original commit message from CVS:
adding tests for elements
2005-07-08 16:41:45 +00:00
Thomas Vander Stichele bd728f0b2c doc fixes
Original commit message from CVS:
doc fixes
2005-06-29 12:23:35 +00:00
Wim Taymans bd72354e9a gst/gstbus.c: Add debugging messages.
Original commit message from CVS:
* gst/gstbus.c: (gst_bus_post), (gst_bus_have_pending),
(gst_bus_set_flushing), (gst_bus_pop), (gst_bus_peek),
(gst_bus_source_dispatch):
Add debugging messages.
Make internal methods static.
Handle the case where the bus is flushed in the handler.

* gst/gstelement.c: (gst_element_get_bus):
Fix refcount in _get_bus();

* gst/gstpipeline.c: (gst_pipeline_change_state),
(gst_pipeline_get_clock_func):
Clock refcounting fixes.
Handle the case where preroll timed out more gracefully.

* gst/gstsystemclock.c: (gst_system_clock_dispose):
Clean up the internal thread in dispose. This is needed
for subclasses that actually get disposed.

* gst/schedulers/threadscheduler.c:
(gst_thread_scheduler_class_init), (gst_thread_scheduler_func),
(gst_thread_scheduler_dispose):
Free thread pool in dispose.
2005-06-28 19:45:26 +00:00