Commit graph

519 commits

Author SHA1 Message Date
Edward Hervey
df6044f7eb Merging origin/master
Conflicts:
	gst/gstbin.c
	gst/gstbus.c
	gst/gstdebugutils.c
	gst/gstpad.c
	libs/gst/base/gstbaseparse.c
	libs/gst/base/gstbasesrc.c
2011-10-21 10:52:46 +02:00
Stefan Sauer
2e6b434730 logging: more logging and prefer human readable details over memory locations 2011-10-18 15:24:21 +02:00
Wim Taymans
40bb69827c Merge branch 'master' into 0.11
Conflicts:
	gst/gstevent.h
2011-10-16 14:20:33 +02:00
Stefan Sauer
735068218e logging: use _OBJECT variants more 2011-10-13 16:49:01 +02:00
Sebastian Dröge
43538e2e75 Merge branch 'master' into 0.11
Conflicts:
	docs/design/draft-buffer2.txt
	docs/design/part-TODO.txt
	docs/design/part-block.txt
	docs/design/part-bufferlist.txt
	docs/design/part-caps.txt
	docs/design/part-element-transform.txt
	docs/design/part-events.txt
	docs/design/part-negotiation.txt
	gst/gstcaps.c
	gst/gstevent.h
	gst/gstghostpad.c
	gst/gstinterface.c
	gst/gstpad.c
	gst/gstpad.h
	gst/gstutils.c
	libs/gst/base/gstbasesink.c
	libs/gst/base/gstbasesrc.c
	libs/gst/base/gstbasetransform.c
	libs/gst/base/gsttypefindhelper.c
	plugins/elements/gstcapsfilter.c
	plugins/elements/gsttee.c
	tests/check/generic/sinks.c
	tools/gst-launch.1.in
2011-09-08 14:28:23 +02:00
Piotr Fusik
14f5518f3d docs, gst: typo fixes
https://bugzilla.gnome.org/show_bug.cgi?id=658449
2011-09-07 18:03:17 +01:00
Wim Taymans
b0a827cc6b message: rename variable
Rename the new_base_time variable to reset_time, which looks better.
2011-06-08 17:25:43 +02:00
Wim Taymans
3cb8b33935 message: move the new_base_time flag to async_done
Move the flag to indicate that a new_base_time should be distributed to the
pipeline, from the async_start to the async_done message. This would allow us to
decide when to reset the pipeline time based on other reasons than the
FLUSH_START event.

The main goal eventually is to make the FLUSH events not reset time at all but
reset the time based on the first buffer or segment that prerolls the pipeline
again.
2011-06-08 13:45:19 +02:00
Edward Hervey
ceb86a586e gst: Remove obvious dead assignments 2011-05-31 18:30:30 +02:00
Sebastian Dröge
3d2127f865 Revert "query: allow _make_writable on query handlers"
This reverts commit cf4fbc005c.

This change did not improve the situation for bindings because
queries are usually created, then directly passed to a function
and not stored elsewhere, and the writability problem with
miniobjects usually happens with buffers or caps instead.
2011-05-17 11:21:41 +02:00
Sebastian Dröge
d0f34fe6b2 Revert "bin: Dereference GstQuery** before passing it to GST_QUERY_TYPE_NAME"
This reverts commit 437c92b403.
2011-05-17 11:21:41 +02:00
Sebastian Dröge
b935a814d9 Merge branch 'master' into 0.11
Conflicts:
	configure.ac
	docs/gst/gstreamer-sections.txt
	gst/gstbin.c
	gst/gstelement.c
	gst/gstelement.h
	gst/gstghostpad.c
	gst/gstminiobject.c
	gst/gstminiobject.h
	libs/gst/base/gstbasesrc.c
	libs/gst/base/gstbasetransform.c
	plugins/elements/gstinputselector.c
	tests/check/gst/gstminiobject.c
2011-05-16 16:53:04 +02:00
Sebastian Dröge
7316a88387 bin: Don't interprete pipelines without sink elements as always being in EOS state
Some tests (e.g. elements/capsfilter) have pipelines with dangling
sinkpads and without a sink element. These pipelines can never post
an EOS message (because this is only valid by a sink) and as such
should never get an EOS message posted by the bin.
2011-05-14 11:39:36 +02:00
Sebastian Dröge
4a836cae9f bin: Only post EOS messages after reaching the PLAYING state
Fixes bug #647756.
2011-05-14 11:39:35 +02:00
Sebastian Dröge
3872b816d2 element: Add GstElement::state_changed vfunc
API: GstElement::state_changed

This is always called when the state of an element has changed and
before the corresponding state-changed message is posted on the bus.
2011-05-14 11:39:35 +02:00
Sebastian Dröge
f3f1f7d69a bin: If activating one pad failed error out early instead of trying to activate the next pads
If one pad fails to activate the complete activation process will fail
anyway and trying to activate the other pads only wastes time.
2011-05-14 11:39:33 +02:00
Sebastian Dröge
437c92b403 bin: Dereference GstQuery** before passing it to GST_QUERY_TYPE_NAME 2011-05-11 16:47:33 +02:00
Wim Taymans
cf4fbc005c query: allow _make_writable on query handlers
Pass a GstQuery ** to the query handlers so that they can make the query
writable before using a setter on it.
Port code to new API.
2011-05-10 18:36:33 +02:00
Wim Taymans
dcc5570f7f bin: let the pad clean up in activate 2011-05-06 17:39:08 +02:00
Sebastian Dröge
98d1ee4a8f gst: Update everything for the new GstIterator API 2011-05-05 15:36:03 +02:00
Johan Dahlin
0e2cf0caa1 iterator: free struct in gst_iterator_free
https://bugzilla.gnome.org/show_bug.cgi?id=638987
2011-05-05 15:33:28 +02:00
Sebastian Dröge
e22f5d8a68 bin: Only post EOS messages after reaching the PLAYING state
Fixes bug #647756.
2011-05-05 12:30:05 +02:00
Sebastian Dröge
5c84883f2e bin: If activating one pad failed error out early instead of trying to activate the next pads
If one pad fails to activate the complete activation process will fail
anyway and trying to activate the other pads only wastes time.
2011-05-05 12:30:05 +02:00
Tim-Philipp Müller
06ca275916 Revert lockfree GstBus for the release
Drop in old GstBus code for the release to play it safe, since
regressions that are apparently hard to track down and reproduce
have been reported (on windows/OSX mostly) against the lockfree
version, and more time is needed to fix them.

This reverts commit 03391a8970.
This reverts commit 43cdbc17e6.
This reverts commit 80eb160e0f.
This reverts commit c41b0ade28.
This reverts commit 874d60e589.
This reverts commit 79370d4b17.
This reverts commit 2cb3e52351.
This reverts commit bd1c400114.
This reverts commit 4bf8f1524f.
This reverts commit 14d7db1b52.

https://bugzilla.gnome.org/show_bug.cgi?id=647493
2011-04-26 16:14:00 +01:00
Sebastian Dröge
7c8617ea82 bin: Enable DURATION query caching
Elements must now post a DURATION message on the bus if they
change the duration in PAUSED or PLAYING.
2011-04-18 10:36:41 +02:00
Sebastian Dröge
a9e69dc3be gst: Don't use base_init and use G_DEFINE_TYPE instead of GST_BOILERPLATE 2011-04-16 15:59:40 +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
Sebastian Dröge
c41b0ade28 bus: Use a construct-only property to distinguish between child buses and normal buses
This allows to only create the socketpair when it is really required instead
of always creating it and immediately destroying it again for child buses.

https://bugzilla.gnome.org/show_bug.cgi?id=647005
2011-04-08 09:15:56 +02:00
Sebastian Dröge
08b98cc7e9 Merge branch 'master' into 0.11 2011-04-06 14:20:59 +02:00
Sebastian Dröge
874d60e589 bus: Add private API to set a GstBus in child mode
This is used by GstBin to create a child bus without
a socketpair because child buses will always work
synchronous. Otherwise too many sockets could be
created and the limit of file descriptors for the
process could be reached.

Fixes bug #646624.
2011-04-06 14:18:35 +02:00
Wim Taymans
a12ede3fb1 Merge branch 'master' into 0.11-fdo
Conflicts:
	gst/gst.c
	libs/gst/base/gstcollectpads.c
2011-03-28 20:11:20 +02:00
Arun Raghavan
bae67f116c basesrc: Return FALSE if we don't handle an event
basesrc's default event handler returns TRUE regardless of whether the
event is handled or not. This fixes the handler to conform with the
expected behaviour (which is to only return TRUE when the event has
actually benn handled). gst_bin_do_latency_func() depended on this
(incorrect) behaviour, and is now modified as well.

(Remaining 1-liner change in gstbasesrc.c is to keep gst-indent happy)
2011-03-28 21:48:23 +05:30
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
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
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
Edward Hervey
c044024e2c gstbin: Make element names clearer in debug statements
Replaces confusing messages like:
 "Name name is not unique in bin bin, not adding"
by
 "Name 'name' is not unique in bin 'bin', not adding"
2010-12-05 14:15:02 +01:00
Wim Taymans
839114b05d bin: fix documentation for iterate_sources 2010-10-11 15:53:11 +02:00
Sebastian Dröge
87d02b7b32 bin: Initialize variable 2010-10-11 14:20:15 +02:00
Wim Taymans
27c6aba33c bin: Improve tracking of source elements
Track elements tagged with the IS_SOURCE flag in a similar way we track the sink
elements. This allows us to efficiently dispatch downstream events to the right
elements.
2010-10-11 11:16:27 +02:00
Wim Taymans
e6a291bfab bin: fix doc string, we post element messages 2010-09-16 19:19:21 +02:00
Wim Taymans
a9a82da134 bin: add message-forward option
Add an option to forward all the internal messages that would otherwise be
filtered such as EOS, SEGMENT and ASYNC messages.
This allows the application to, for example, detect that a partial pipeline is
prerolled or reached eos.
The original messages are wrapped inside an element message because the parent
bins are not supposed to see those internal messages escape.
2010-09-16 19:17:53 +02:00
Wim Taymans
57cc780c45 bin: relax the source element check
When there is a sink inside a bin, the SINK flag is set on the bin. When we are
trying to iterate the source elements, also include the bins with the SINK flag
because they could also contain source elements, in which case they are also a
source.

This solves the case where sending an EOS to a pipeline didn't get dispatched to
all source elements.

See #625597
2010-08-20 18:04:52 +02: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
Wim Taymans
88c6896fb9 gstbin: unlock _get_state() on error
When an error message is received on the bus, mark the bin as being in the error
state and unlock all current _get_state() calls with an error.

Fixes #505770
2010-05-25 19:17:44 +02:00
Tim-Philipp Müller
c008823e6e bin: fix bogus variable type
The result of gst_iterator_find_custom() is not a GstIterator *.
2010-04-15 11:40:05 +01:00
Wim Taymans
67ab660b19 bin: fix refcount when removing elements during state change
When an element is removed from a bin because it caused a state change error,
don't unref the child twice.
Add some more debug info.
Add a unit test for this error.

Fixes #615756
2010-04-14 18:32:26 +02:00
Sebastian Dröge
fd68dbc08f gst: Use GSlice instead of normal g_malloc in more places 2010-03-28 19:48:45 +02:00
Wim Taymans
5fdee7e064 bin: improve docs a little
Mention that a DURATION message does not mean that one can safely query the
duration on a bin, that only works when the bin is prerolled.
2010-03-25 18:12:06 +01:00
Stefan Kost
da287f556d parse-launch: make delayed set recursive
Right now deleyed set would only try for first set of children. We need to keep
trying to support arbitrary deep hierarchies (like in playbin2 with auto*sinks).
Also GstBin would need to actualy emit the child-added/removed signal as it
implements the iface. Fixes #613215.
2010-03-22 10:01:38 +02:00
Stefan Kost
bd182e3ea0 bin: make a interface vmethod implementation static
This should not cause any troubles - the methods wasn't in any header.
2010-01-24 23:04:27 +02:00
Wim Taymans
fc7dd46b20 avoid some more type checks 2009-12-24 14:40:54 +01:00
Wim Taymans
f44d8c31de bin: never skip a state change to PLAYING
Never skip the state change to playing, even if the element is already in the
right state. We need this because we also distribute the base_time while doing
the state change and skipping this step would leave some elements without a new
base_time.

Fixes #600313
2009-12-11 16:26:00 +01:00
Sebastian Dröge
df741e7e2f bin: Ignore state change failures from children that were removed from the bin already
Fixes bug #584441.
2009-12-04 16:28:27 +01: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
3c6db4ed95 gst: remove more unnecessary cast when using g_signal_*() 2009-10-06 20:04:10 +01:00
Aurelien Grimaud
fe87509682 bin: Only unref EOS message after it is not used anymore
Fixes bug #594107.
2009-09-04 09:52:39 +02:00
Wim Taymans
f64243e037 states: post structure change on sinkpads
Post the structure change messages on the sinkpads of the elements. This allows
us to catch unlinked pads earlier without ending up with inconsistent element
degrees.
2009-09-02 18:54:06 +02:00
Wim Taymans
1ab11faf48 bin: avoid false 'loop detected' warnings
When we detect a pad unlink in progress, we will not be updating the degree of
the parent element. This can cause false loop detected warnings because the
degree counter is invalid. Handle this case by marking the iterator as 'dirty'
when we detect a pad unlink and avoid emiting the warning in this case. We have
to continue our state change as good as we can, we will eventually resync when
the pad unlink completed.
2009-09-02 18:13:22 +02:00
Jan Schmidt
64fb67f700 gstbin: Don't propagate a NULL cached index to added elements
When an element is added to the bin, only set the index if we have a
cached index, rather than setting a NULL index on elements that might
have a default index object of their own.
2009-09-01 12:08:17 +01:00
Wim Taymans
d4012be469 bin: cache index
Cache the last index that was set with _set_index() and return this in the
_get_index() call.
Set the cached index on newly added elements.

Fixes #566881
2009-08-28 18:41:42 +02:00
Antoine Tremblay
c87d551705 gstbin: Don't try to change children's state if they're already in the state we want
Fixes bug #368536.
2009-08-18 11:36:36 +02:00
Stefan Kost
b01fb4d230 bin: fix compiler warning about unused var when disabling debug logging 2009-08-06 15:13:36 +03:00
Josep Torra
d280a3977e gstbin: swap the lines of my previous commit
Fixes a bug introduced in my previous commit that released the
clock provider and after used it to create the clock lost message.
2009-06-16 18:36:41 +02:00
Josep Torra
6103d45dc0 gstbin: remove clock references when clock lost happens
Remove reference to clock and clock provider stored in the bin
when the clockprovider element is removed from the bin.
2009-06-16 17:51:12 +02:00
Wim Taymans
d881bf69d1 bin: make sure we set the next state correctly
When the continue function is scheduled, make sure we set the next state instead
of the pending state.
Add some more debug info.

fixes #585569
2009-06-15 18:44:45 +02:00
Wim Taymans
465b40a2b8 bin: set the base_time and start_time better
Simply set the start_time and base_time on the element instead of calling the
setters.
2009-05-29 11:55:38 +02:00
Wim Taymans
2f23444d35 bin: make the bin set the start_time on elements
Set the start_time of the bin on the elements when they are added to the
pipeline and when a state change happens.
2009-05-29 11:55:38 +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
Tim-Philipp Müller
06d79151c1 bin: fix debug message
Make the debug message show what's actually happening (the message
replaced here is not necessarily of the same type as the one that
replaces it).
2009-05-11 23:41:52 +01:00
Wim Taymans
81cadeecd2 GstBin: set PENDING_STATE correctly
Set the pending state correctly when we are going to perform an async
state_continue on the bin.
Fixes #580121
2009-04-24 19:36:22 +02:00
Wim Taymans
1b4b1a5b1f bin: always mark pending_async_done
When we get an ASYNC_DONE message when a state change was busy, set the
pending_async_done flag so that after the state change completes, the bin can
check if all async elements are finished. Don't only do this for the bin itself
but for all elements.

This fixes some bins in bins that simulate async state changes by posting ASYNC
messages (such as sdpparse in uridecodebin/playbin2).
2009-04-09 11:51:43 +02:00
Stefan Kost
7d0b4f10c6 docs: xref more 2009-04-08 18:13:42 +03: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
f68573dc42 gstbin: Remove unused variable.
The return value of gst_element_change_state isn't used after that call.
2009-04-03 12:57:24 +02:00
Stefan Kost
b3e56e19f5 bin: forward segment-start like segment-done if parent is also a bin, fixes #575598.
Bin collects segment-start messages and segent-done messages. it posts a
segment-done message to its parent, once it has received a segment-done for
each segment-start. Imho it should also send a segment-start if it receives the
first segment start and if parent is !=NULL. This is needed for bins in bins,
so that also higher order bins can group segment-starts and segment-dones.
Right now higher order bins will post a segment-done for each segment-done
received.
2009-03-17 12:05:33 +02:00
Wim Taymans
23bdf5c9fe gst/gstbin.c: Use an iterator to set the clock and the index so that we can release the object lock appropriately. Fi...
Original commit message from CVS:
* gst/gstbin.c: (gst_bin_set_index_func), (gst_bin_set_clock_func),
(gst_bin_change_state_func):
Use an iterator to set the clock and the index so that we can release
the object lock appropriately. Fixes #566393.
2009-01-05 10:14:28 +00:00
Wim Taymans
9184d9ee3c gst/gstbin.*: Add do-latency signal with the old default fallback implementation. This allows for custom latency calc...
Original commit message from CVS:
* gst/gstbin.c: (_gst_boolean_accumulator), (gst_bin_class_init),
(gst_bin_recalculate_latency), (gst_bin_do_latency_func),
(gst_bin_change_state_func):
* gst/gstbin.h:
Add do-latency signal with the old default fallback implementation. This
allows for custom latency calculations for when the default is not
sufficient.
API: GstBin::do-latency signal.
2008-11-19 12:06:41 +00:00
Wim Taymans
c311f2153a Add method to recalculate and redistribute the latency on a bin.
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstbin.c: (gst_bin_recalculate_latency),
(gst_bin_change_state_func):
* gst/gstbin.h:
Add method to recalculate and redistribute the latency on a bin.
API: gst_bin_recalculate_latency().
2008-11-18 09:58:33 +00:00
Wim Taymans
16e6c3ef96 gst/gstbin.c: Get the seqnum before we dispose the message.
Original commit message from CVS:
* gst/gstbin.c: (gst_bin_handle_message_func):
Get the seqnum before we dispose the message.
2008-11-04 18:10:04 +00:00
Wim Taymans
0a71170006 Copy seqnums from events to messages so that they can all be related back to eachother.
Original commit message from CVS:
* gst/gstbin.c: (bin_handle_async_start),
(gst_bin_handle_message_func), (gst_bin_query):
* libs/gst/base/gstbasesink.c: (gst_base_sink_render_object),
(gst_base_sink_event), (gst_base_sink_change_state):
* libs/gst/base/gstbasesrc.c: (gst_base_src_perform_seek),
(gst_base_src_loop), (gst_base_src_change_state):
Copy seqnums from events to messages so that they can all be related
back to eachother.
2008-11-04 15:56:55 +00:00
Wim Taymans
bc8e367885 gst/gstbin.c: The message src can be NULL, don't try to print the object names in that case.
Original commit message from CVS:
* gst/gstbin.c: (gst_bin_remove_func), (update_degree),
(gst_bin_handle_message_func):
The message src can be NULL, don't try to print the object names in that
case.
* libs/gst/base/gstbasesink.c: (gst_base_sink_pad_activate):
Add some more debug info.
* tests/check/pipelines/simple-launch-lines.c: (run_pipeline),
(GST_START_TEST):
Add some debug.
Fix the test, pull based sinks go ASYNC to PAUSED, just like other
scheduling modes.
2008-10-10 10:38:12 +00:00
Olivier Crete
ee0eaf824b gst/gstbin.c: Keep track of pads that are being linked/unlinked and resync the state changes.
Original commit message from CVS:
Base on Patch by: Olivier Crete <tester at tester dot ca>
* gst/gstbin.c: (gst_bin_init), (gst_bin_add_func),
(gst_bin_remove_func), (update_degree),
(gst_bin_sort_iterator_new), (gst_bin_handle_message_func):
Keep track of pads that are being linked/unlinked and resync the state
changes.
* gst/gstpad.c: (gst_pad_get_direction),
(gst_pad_set_chain_function), (gst_pad_set_getrange_function),
(gst_pad_set_checkgetrange_function), (gst_pad_unlink),
(gst_pad_link_prepare), (gst_pad_link),
(gst_pad_event_default_dispatch), (gst_pad_chain), (gst_pad_push),
(gst_pad_check_pull_range), (gst_pad_get_range),
(gst_pad_pull_range):
Some code cleanups, use macros to check pad direction.
Don't need to take the lock on the pad direction.
Post structure change when pads are linked/unlinked.
Change some checks into _return_if_fail().
* tests/check/gst/gstbin.c:
(test_link_structure_change_state_changed_sync_cb),
(GST_START_TEST), (gst_bin_suite):
Add testcase for pad link/unlinke resync during a state change.
Fixes #510354.
2008-10-06 16:15:02 +00:00
Wim Taymans
f716d86e48 gst/gstbin.c: Take the (recursive) state lock between getting the locked state of an element and changing the element...
Original commit message from CVS:
* gst/gstbin.c: (gst_bin_element_set_state):
Take the (recursive) state lock between getting the locked state of an
element and changing the element state. This allows the application to
lock an element's state and then change its state without races.
2008-08-25 11:00:13 +00:00
Wim Taymans
a6b1feccd0 gst/gstbin.c: When an element is in the locked state we still want to update the base_time of the element.
Original commit message from CVS:
* gst/gstbin.c: (gst_bin_element_set_state):
When an element is in the locked state we still want to update the
base_time of the element.
2008-08-25 10:52:47 +00:00
Wim Taymans
5665680537 gst/gstbin.c: Fix race for bins that simulate ASYNC state changes by inserting
Original commit message from CVS:
* gst/gstbin.c: (gst_bin_add_func), (gst_bin_remove_func),
(gst_bin_change_state_func), (bin_handle_async_done),
(gst_bin_handle_message_func):
Fix race for bins that simulate ASYNC state changes by inserting
ASYNC_START and ASYNC_DONE messages in their bus. We need to check for
pending ASYNC messages even when the bin does not have ASYNC children.
We note detect this behaviour because we will receive an ASYNC message
that is originating from the bin itself.
Fixes races with decodebin2 state changes.
* tests/check/gst/gstbin.c: (GST_START_TEST):
Add some more debug.
2008-08-04 15:49:13 +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
Wim Taymans
5335a8b34b gst/gstbin.c: Only care about latency min and max when the sink is actually a live sink.
Original commit message from CVS:
* gst/gstbin.c: (bin_query_latency_fold):
Only care about latency min and max when the sink is actually a live
sink.
2008-06-25 11:50:06 +00:00
Antoine Tremblay
d102d88729 gst/gstbin.c: Use the GLib stuff to create a private structure.
Original commit message from CVS:
* gst/gstbin.c: (gst_bin_class_init), (gst_bin_init),
(gst_bin_dispose):
Use the GLib stuff to create a private structure.
Add some locking around some dispose methods to make them a little
safer, see #529723. Patch by: Antoine Tremblay <hexa00 at gmail dot com>
2008-04-25 17:54:28 +00:00
Stefan Kost
012d5584ff docs/gst/gstreamer-sections.txt: Move GParamSepc macros to standart section.
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
Move GParamSepc macros to standart section.
* gst/gstbin.c:
Dn't document _get_type - its in private section in docs anyway and
this doc-blob was incomplete.
* gst/gstclock.h:
Fix wrong symbol names in docs.
* gst/gstmacros.h:
Add once doc sentence.
* tests/check/gst/.cvsignore:
Ignore more.
2008-04-23 06:57:30 +00:00
Sebastian Dröge
b0346dff44 Define G_PARAM_STATIC_STRINGS if it's undefined (GLib < 2.13.0) and use it everywhere for GParamSpecs that use static...
Original commit message from CVS:
* docs/pwg/advanced-dparams.xml:
* docs/pwg/building-props.xml:
* docs/pwg/other-source.xml:
* gst/glib-compat.h:
* gst/gstbin.c: (gst_bin_class_init):
* gst/gstclock.c: (gst_clock_class_init):
* gst/gstindex.c: (gst_index_class_init):
* gst/gstobject.c: (gst_object_class_init):
* gst/gstpad.c: (gst_pad_class_init):
* gst/gstpipeline.c: (gst_pipeline_class_init):
* libs/gst/base/gstbasesink.c: (gst_base_sink_class_init):
* libs/gst/base/gstbasesrc.c: (gst_base_src_class_init):
* libs/gst/base/gstbasetransform.c:
(gst_base_transform_class_init):
* libs/gst/base/gstdataqueue.c: (gst_data_queue_class_init):
* libs/gst/check/gstcheck.c: (_gst_check_fault_handler_restore),
(_gst_check_fault_handler_sighandler),
(_gst_check_fault_handler_setup), (gst_check_init):
* libs/gst/controller/gstcontroller.c:
(_gst_controller_class_init):
* libs/gst/controller/gstlfocontrolsource.c:
(gst_lfo_control_source_class_init):
* libs/gst/net/gstnetclientclock.c:
(gst_net_client_clock_class_init):
* libs/gst/net/gstnettimeprovider.c:
(gst_net_time_provider_class_init):
* plugins/elements/gstcapsfilter.c: (gst_capsfilter_class_init):
* plugins/elements/gstfakesink.c: (gst_fake_sink_class_init):
* plugins/elements/gstfakesrc.c: (gst_fake_src_class_init):
* plugins/elements/gstfdsink.c: (gst_fd_sink_class_init):
* plugins/elements/gstfdsrc.c: (gst_fd_src_class_init):
* plugins/elements/gstfilesink.c: (gst_file_sink_class_init):
* plugins/elements/gstfilesrc.c: (gst_file_src_class_init):
* plugins/elements/gstidentity.c: (gst_identity_class_init):
* plugins/elements/gstmultiqueue.c: (gst_multi_queue_class_init):
* plugins/elements/gstqueue.c: (gst_queue_class_init):
* plugins/elements/gsttee.c: (gst_tee_class_init):
* plugins/elements/gsttypefindelement.c:
(gst_type_find_element_class_init):
* plugins/indexers/gstfileindex.c: (gst_file_index_class_init):
Define G_PARAM_STATIC_STRINGS if it's undefined (GLib < 2.13.0) and
use it everywhere for GParamSpecs that use static strings (i.e. all).
This gives us less memory usage, fewer allocations and thus less
memory defragmentation. Fixes bug #523806.
2008-03-22 14:56:17 +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
9db28f8537 Don't use base_init where not absolutely necessary. For example it's not necessary anymore for adding pad templates o...
Original commit message from CVS:
* gst/gstbin.c: (gst_bin_get_type), (gst_bin_class_init):
* gst/gstpipeline.c: (gst_pipeline_get_type),
(gst_pipeline_class_init):
* libs/gst/base/gstbasesink.c: (gst_base_sink_get_type),
(gst_base_sink_class_init):
* libs/gst/base/gstbasesrc.c: (gst_base_src_get_type),
(gst_base_src_class_init):
* libs/gst/base/gstbasetransform.c: (gst_base_transform_get_type),
(gst_base_transform_class_init):
* libs/gst/base/gstcollectpads.c: (gst_collect_pads_base_init),
(gst_collect_pads_class_init):
* libs/gst/base/gstdataqueue.c: (gst_data_queue_get_type):
* libs/gst/net/gstnettimeprovider.c:
(gst_net_time_provider_base_init),
(gst_net_time_provider_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):
Don't use base_init where not absolutely necessary. For example it's
not necessary anymore for adding pad templates or setting element
details.
Leave empty base_init functions in several places as GST_BOILERPLATE
still defines and uses them.
2008-02-03 12:04:37 +00:00
Stefan Kost
99897dbf24 docs/random/ensonic/profiling.txt: More ideas.
Original commit message from CVS:
* docs/random/ensonic/profiling.txt:
More ideas.
* gst/gstbin.c:
Fix typo and give better log output.
* gst/gstdebugutils.c:
* gst/gstdebugutils.h:
More ideas, make graphs a bit smaller and fix param name in macro.
2007-11-22 15:59:01 +00:00
Wim Taymans
f806905e67 gst/gstbin.c: Change email, cleanups add some more debug and comments.
Original commit message from CVS:
* gst/gstbin.c: (gst_bin_class_init), (gst_bin_init),
(gst_bin_add_func), (gst_bin_remove_func),
(gst_bin_change_state_func), (gst_bin_continue_func):
Change email, cleanups add some more debug and comments.
Also set bus and clock on new elements when the pipeline was in error.
2007-11-19 08:50:04 +00:00
Stefan Kost
f3d71f7ef5 gst/: Fix build with --disable-gst-debug. Fixes #497859.
Original commit message from CVS:
* gst/gstbin.c:
* gst/gstdebugutils.c:
Fix build with --disable-gst-debug. Fixes #497859.
Spotted by Sameer Naik.
2007-11-18 19:30:10 +00:00
Wim Taymans
00e832a463 gst/gstbin.c: Correctly set the next state if all of our async children commited their state. This makes sure we can ...
Original commit message from CVS:
* gst/gstbin.c: (bin_handle_async_done):
Correctly set the next state if all of our async children commited their
state. This makes sure we can actually cancel the state change in
progress. Fixes a regression in Rhythmbox when seeking.
2007-10-14 15:54:02 +00:00
Tim-Philipp Müller
65637313b0 gst/gstbin.c: Don't shadow local variable.
Original commit message from CVS:
* gst/gstbin.c:
Don't shadow local variable.
* gst/gstinfo.c:
Don't shadow global function name.
2007-10-13 17:43:27 +00:00