Commit graph

1773 commits

Author SHA1 Message Date
David Schleef f3eac7de22 Work around changes in g_atomic API
See #651514 for details.  It's apparently impossible to write code
that avoids both type punning warnings with old g_atomic headers and
assertions in the new.  Thus, macros and a version check.
2011-06-04 00:36:26 -07:00
Wim Taymans 7b43f02ed3 structure: fix some more 0.11 fixmes
don't allow spaces in structure names and fix unit tests.
2011-06-03 13:25:54 +02:00
Wim Taymans 272b3263aa Merge branch 'master' into 0.11
Conflicts:
	plugins/elements/gstoutputselector.c
2011-06-01 19:47:10 +02:00
Wim Taymans 3f51563319 pad: further improve probes and pad blocking
Keep track of installed number of probes to shortcut emission.
Allow NULL callbacks, this is useful for blocking probes.
Improve probe selection based on the mask, an empty mask for the data or the
scheduling flags equals that all probes match.
Add some more debug info.
Don't check the flushing flag in the probe callback handler, this needs to be
done before calling the handler.
Fix blocking probes.
Fix unit tests
2011-06-01 19:39:20 +02:00
Wim Taymans 8abc457a3b pad: implement pad block with probes 2011-06-01 19:39:16 +02:00
Wim Taymans a5bbf7f369 utils: remove _full variants of probes
Remove the _full variants and add the destroy notify to the regular methods.
2011-06-01 19:39:11 +02:00
Edward Hervey c5ae6eed10 check/abi: Ignore GstXML* on arm when not present 2011-06-01 15:29:20 +02:00
Wim Taymans fce85f75ff pad: Rework pad blocking, another attempt
Make the PadBlock callback take a GstBlockType parameter to handle the different
kind of stages in the pad block. This provides for more backwards compatibility
in the pad block API.
Separate blocking and unblocking into different methods, only blocking can do a
callback, unblock is always immediately. Also removed synchronous blocking, it
can always be implemented with a callback.
2011-05-30 18:29:06 +02:00
Wim Taymans 565f492af2 Revert "pad: rework pad blocking, first part"
This reverts commit 415da89f3c.

Conflicts:

	gst/gstpad.c
2011-05-30 13:40:04 +02:00
Sebastian Dröge 58302cedfa Merge branch 'master' into 0.11 2011-05-30 07:41:13 +02:00
Sebastian Dröge f304196148 caps: Fix subset check for equivalent lists and scalar values
For example "{ 1 }" and "1" are not strictly equal but
both are a subset of each other. Also add a unit test
for this.
2011-05-30 07:38:40 +02:00
Wim Taymans 415da89f3c pad: rework pad blocking, first part
Make pad block call the callback as soon as the pad is not in use. This makes it
possible to make sure that when the callback is called, no activity is happening
on the pad and that no activity will ever happen until the pad is unblocked
again. This makes pad blocking work when there is no dataflow or after EOS and
greatly helps dynamic pipelines.
Move the probe handling right where we wait on the pad block. The two are
related but not the same and the probe can eventually influence the pad
blocking as we'll se later.
Fix up some broken unit tests or tests that fail with the new behaviour.
2011-05-27 17:37:20 +02:00
Wim Taymans 690c81b95d basesrc: remove deprecated clean shutdown method 2011-05-27 17:28:34 +02:00
Sebastian Dröge 30a7fd7b4d Merge branch 'master' into 0.11 2011-05-27 13:58:26 +02:00
Sebastian Dröge d98e9acb0f caps: Optimize gst_caps_is_subset()
..and as a result gst_caps_is_equal() and others.

This now only checks if for every subset structure there is
a superset structure in the superset caps. Previously we were
subtracting one from another, creating completely new caps
and then even simplified them.

The new implemention now is about 1.27 times faster and doesn't
break the -base unit tests are anything anymore.
2011-05-27 13:38:51 +02:00
Sebastian Dröge 0cf2dfd0ba caps: Fix subset check in gst_caps_merge()
Caps A are a subset of caps B even if caps B doesn't
have all fields of caps A.

Also add a unit test for this.
2011-05-27 13:37:06 +02:00
Wim Taymans f4f4fa5e8f pad: remove old gst_pad_set_blocked methods 2011-05-26 16:17:31 +02:00
Wim Taymans 2c221a5729 feature: use object name
Remove the name property from the plugin feature and port code to use the object
name instead.
2011-05-24 18:17:24 +02:00
Wim Taymans 31a314ac5b pad: add pending event for sticky events
Change the sticky event array so that it contains a pending and an active event.
Events on the sinkpad are copied to the pending array and after the eventfunc
returned TRUE, moved to the active event. This allows us to queue new events
like when we do per-pad offsets without removing the currently active event.
Remove the active argument from the gst_pad_get_sticky_event() method, the
pending events are not something we want to expose.
2011-05-20 11:36:25 +02:00
Wim Taymans 83389aa197 tests: caps are not stored on flushing pads
Caps are now also stored on flushing pads in the inactive state.
2011-05-19 19:07:29 +02:00
Wim Taymans 4a646e0e76 Merge branch 'master' into 0.11
Conflicts:
	gst/gstghostpad.h
2011-05-19 11:30:06 +02:00
Sebastian Dröge a46c9c2a62 event: Make SEGMENT event parsing API more consistent with the others 2011-05-18 16:56:43 +02:00
Wim Taymans b1676b8c30 event: fix event copy
Fix parent refcount on event copy.
Fix unit test.
2011-05-18 15:43:20 +02:00
Stefan Kost e7659aeecd manual: put generated sources to BUILT_SOURCES and clean them on make clean 2011-05-18 14:59:45 +03:00
Wim Taymans 6ad530a8b0 Merge branch 'master' into 0.11 2011-05-18 13:19:31 +02:00
Wim Taymans e39182a085 Merge branch 'master' into 0.11
Conflicts:
	gst/gstminiobject.c
	gst/gstpad.c
	gst/gstpad.h
	gst/gstplugin.h
	libs/gst/base/gstbaseparse.c
2011-05-18 13:14:57 +02:00
Stefan Kost 0df5f9abb9 manual: reinsert missing space to fix previous commit 2011-05-18 14:10:33 +03:00
Stefan Kost 51fc15e99d manual: simplify the snipet extraction rules
Use $< instead of repeating the name of the dependency.
2011-05-18 13:54:42 +03:00
Stefan Kost 12b804f18f manual: don't extract the xml example anymore, its gone
As a followup for commit cda5a353d2 don't try
extracting an example that has been removed.
2011-05-18 12:30:24 +03:00
Wim Taymans 029ac4597e pad: rework sticky events a little
Update the design docs with some clear rules for how sticky events are
handled.
Reimplement the sticky tags, use a small structure to hold the event and its
current state (active or inactive).
Events on sinkpads only become active when the event function returned success
for the event.
When linking, only update events that are different.
Avoid making a copy of the event array, use the object lock to protect the event
array and release it only to call the event function. This will need to check
if something changed, later.
Disable a test in the unit test, it can't work yet.
2011-05-18 11:08:52 +02:00
Wim Taymans 8699bca39f test: reset pad caps properly 2011-05-17 18:23:22 +02:00
Wim Taymans 7b8b93ad64 tests: fix tests
Remove the tests that handle incompatible formats, we don't want that anymore.
2011-05-17 17:53:00 +02:00
Wim Taymans 189980ec56 pad: remove unref, the object is NULL 2011-05-17 16:50:53 +02:00
Sebastian Dröge eee515e5ad tests: Update for caps/pad template related API changes 2011-05-17 13:14:16 +02:00
Sebastian Dröge 50f91c0825 Revert "event: example of how to optimize events"
This reverts commit fa28e2c5e6.

The optimization only has minimal impact on the performance and
makes everything more complex.
2011-05-17 11:45:46 +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
Wim Taymans ca0069595f tests: set elements in PAUSED
Set elements in PAUSED before trying to set caps on pads.
2011-05-16 19:09:54 +02:00
Wim Taymans d4f85a0cd9 test: fix ghostpad test
We need to have activated pads before we can pass around caps.
Don't set NULL caps on pads.
2011-05-16 19:05:23 +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 6bff1f968a tests: Update for negotiation related API changes 2011-05-16 15:33:11 +02:00
Wim Taymans bdbc069348 Rework GstSegment handling
Improve GstSegment, rename some fields. The idea is to have the GstSegment
structure represent the timing structure of the buffers as they are generated by
the source or demuxer element.
gst_segment_set_seek() -> gst_segment_do_seek()
Rename the NEWSEGMENT event to SEGMENT.
Make parsing of the SEGMENT event into a GstSegment structure.
Pass a GstSegment structure when making a new SEGMENT event. This allows us to
pass the timing info directly to the next element. No accumulation is needed in
the receiving element, all the info is inside the element.
Remove gst_segment_set_newsegment(): This function as used to accumulate
segments received from upstream, which is now not needed anymore because the
segment event contains the complete timing information.
2011-05-16 11:37:52 +02:00
José Alburquerque cf671d7b0a miniobject: Add weak referencing functionality
API: gst_mini_object_weak_ref()
API: gst_mini_object_weak_unref()

Add weak referencing functionality to GstMiniObject, which
allows to get notifications when an mini object is destroyed
but doesn't increase the real refcount. This is mostly
useful for bindings.

Fixes bug #609473.
2011-05-14 11:39:35 +02:00
Sebastian Dröge a216426bb6 ghostpad: API: Expose gst_proxy_pad_get_internal()
This allows to get the internal pad of ghostpads and
proxypads without using gst_pad_iterate_internal_links()
and is much more convenient.

The internal pad of a ghostpad is the pad of the opposite direction
that is used to link to the ghostpad target.
2011-05-14 11:39:34 +02:00
Sebastian Dröge 6e57ce32e5 caps: Merge structures when intersecting instead of appending them
This prevents adding duplicates over and over again to the resulting
caps if they already describe the new intersection result.

While this changes intersection from O(n*m) to O(n^2*m), it results in
smaller caps, which in the end will decrease further processing times.

For example in an audioconvert ! audioconvert ! audioconvert pipeline,
when forwarding the downstream caps preference in basetransform
(see e26da72de25a91c3eaad9f7c8b2f53ba888a0394) this results in
16 instead of 191 caps structures.
2011-05-14 11:39:34 +02:00
Miguel Angel Cabrera Moya f450817d7f parse: don't unescape inside quotes
Escaped characters inside quoted strings are supposed to be unescaped by
deserialization functions, not by parsing functions.

https://bugzilla.gnome.org/show_bug.cgi?id=648025
2011-05-14 11:39:34 +02:00
Sebastian Dröge 54fd068aba meta: Fix compilation of the unit test after removal of the serialize/deserialize functions 2011-05-13 08:38:30 +02:00
Wim Taymans fa28e2c5e6 event: example of how to optimize events
Use a structure for the QoS event by 'extending' the GstEventImpl structure.
This should avoid allocation of GstStructures and its contents.
2011-05-11 11:06:36 +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 933446ec44 query: Hide GstStructure in queries
Hide the GstStructure from the query API.
Rename some methods to match the more common names in GObject libraries.
Add some more useful query API.
2011-05-10 15:33:53 +02:00
Wim Taymans 7f24a48387 event: _qos_full -> _qos 2011-05-09 18:48:55 +02:00
Wim Taymans c07b57fc05 segment: remove _full version
Rename the _full versions of the functions to the normal function names.
2011-05-09 17:51:07 +02:00
Wim Taymans b5456cc6f4 caps: remove caps from buffers and pads
Remove the GstCaps from buffers and pads. We now use CAPS events to negotiate
formats between element.
2011-05-09 16:21:28 +02:00
Wim Taymans ba6b915651 base: avoid using buffer caps
Comment all code using buffer caps.
Rework capsfilter code a little.
Fix some unit tests
2011-05-08 12:46:17 +02:00
Wim Taymans e444493793 selector: don't unset caps 2011-05-06 17:39:09 +02:00
Sebastian Dröge 8ce0fea199 tests: Update for new GstIterator API 2011-05-05 15:36:04 +02:00
Sebastian Dröge dc63e38219 caps: Merge structures when intersecting instead of appending them
This prevents adding duplicates over and over again to the resulting
caps if they already describe the new intersection result.

While this changes intersection from O(n*m) to O(n^2*m), it results in
smaller caps, which in the end will decrease further processing times.

For example in an audioconvert ! audioconvert ! audioconvert pipeline,
when forwarding the downstream caps preference in basetransform
(see e26da72de25a91c3eaad9f7c8b2f53ba888a0394) this results in
16 instead of 191 caps structures.
2011-05-05 15:22:14 +02:00
Wim Taymans c4751ec8c1 Revert "context: use context on buffers instead of caps"
This reverts commit 9ef1346b1f.

Way to much for one commit and I'm not sure we want to get rid of the pad caps
just like that. It's nice to have the buffer and its type in onw nice bundle
without having to drag the complete context with it.
2011-05-05 13:17:08 +02:00
Miguel Angel Cabrera Moya 419f48d0d1 parse: don't unescape inside quotes
Escaped characters inside quoted strings are supposed to be unescaped by
deserialization functions, not by parsing functions.

https://bugzilla.gnome.org/show_bug.cgi?id=648025
2011-05-05 12:30:05 +02:00
Sebastian Dröge 65eafd9340 Merge branch 'master' into 0.11
Conflicts:
	docs/gst/gstreamer-sections.txt
	gst/gstelementfactory.c
	gst/gstminiobject.c
2011-05-05 12:27:51 +02:00
Wim Taymans 9ef1346b1f context: use context on buffers instead of caps
Put the srcpad context on buffers instead of caps. This allows us to associate
all the relevant info contained in events with a buffer.
2011-05-04 18:59:47 +02:00
Tim-Philipp Müller d72f559d29 tests: fix compiler warning in new miniobject test
gst/gstminiobject.c: In function ‘test_dup_null_mini_object’:
gst/gstminiobject.c:459:7: warning: assignment from incompatible pointer type
2011-05-04 15:30:41 +01:00
Thiago Santos a750aac2dd miniobject: Fix dup_mini_object function to handle NULL gvalues
g_value_dup_object handles gvalues that contain NULL pointers,
gst_value_dup_mini_object should do the same.

https://bugzilla.gnome.org/show_bug.cgi?id=649195
2011-05-03 08:15:51 -03:00
Philippe Normand 4e36f93924 core: store presets, registry and plugins in XDG directories.
Presets and plugins moved to $XDG_DATA_HOME/gstreamer-0.11/
root directory. Registry moved to $XDG_CACHE_HOME/gstreamer-0.11/.

Fixes bug #518597.
2011-05-03 09:43:22 +02:00
Wim Taymans 6ab7e6c15d Remove pad_alloc, this can now be done better
Remove pad_alloc and all references. This can now be done more efficiently and
more flexible with the ALLOCATION query and the bufferpool objects. There is no
reverse negotiation yet but that will be done with an event later.
2011-04-29 13:26:19 +02:00
Wim Taymans 070cdaab7c Merge branch 'master' into 0.11 2011-04-25 10:30:41 +02:00
Tim-Philipp Müller 0783046100 tests: clean up properly in the bin test_link_structure_change unit test
Don't forget to set the pipeline back to NULL state, which makes
valgrind happy again.
2011-04-24 11:48:21 +01:00
Tim-Philipp Müller e029aeef9e tests: add simple pipeline-in-pipeline unit test
https://bugzilla.gnome.org/show_bug.cgi?id=648297
2011-04-21 12:33:10 +01:00
Sebastian Dröge 355dbdfa7e tests: Use G_DEFINE_TYPE instead of GST_BOILERPLATE 2011-04-19 11:45:37 +02:00
Sebastian Dröge a70df76c53 element: Add test for inheriting metadata/pad templates 2011-04-16 15:59:40 +02:00
Sebastian Dröge f51a23a83c Merge branch 'master' into 0.11 2011-04-16 08:59:58 +02:00
Sebastian Dröge b44d555865 multiqueue: Don't leak pads in the named pads unit test 2011-04-14 09:07:25 +02:00
David Schleef 0b6430f6e8 parser: Allow element names to begin with digits 2011-04-13 12:24:12 -07:00
David Schleef e9afe72710 tests: Add test for greatest common divisor 2011-04-13 10:31:03 -07:00
Tim-Philipp Müller 0e94961069 tests: fix unusued-but-assigned-variable warnings with gcc 4.6 2011-04-11 15:08:30 +01:00
Tim-Philipp Müller 8ba64e4e5d tests: disable test_many_bins unit test for now
It fails on the OSX bot (both with git and the last release), and
it doesn't really test anything useful, so may just as well disable
it for now.
2011-04-11 13:04:32 +01:00
Tim-Philipp Müller 6ca7284a54 tests: allow more time for the test_many_bins pipeline to preroll
Hopefully makes this test work on the OSX build bot and other
not-so-powerful machines.

https://bugzilla.gnome.org/show_bug.cgi?id=646624
2011-04-11 12:04:34 +01: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
Edward Hervey ba515c186b check: Ignore new gstmeta binary 2011-04-09 04:07:04 +02:00
Sebastian Dröge b17537d14d utils: Fix uninitialized variable compiler warnings 2011-04-08 09:20:28 +02:00
Tim-Philipp Müller 5c75330fea tests: add some basic unit tests for queue2 2011-04-07 20:50:04 +01:00
Sebastian Dröge 08b98cc7e9 Merge branch 'master' into 0.11 2011-04-06 14:20:59 +02:00
Tim-Philipp Müller 6a5f8a1b2d checks: make tests_many_bins in bin unit test a bit faster
Not doing expensive checks when linking elements makes things
much faster.
2011-04-06 11:41:14 +01:00
Tim-Philipp Müller da5d6712a2 checks: add some queues to test_many_bins unit test
To limit the number of calls in a row per thread.
2011-04-06 11:30:18 +01:00
Sebastian Dröge ec0de993c6 value: GstDate/GDate has a abbreviation now 2011-04-06 11:45:27 +02:00
Tim-Philipp Müller d7ff4ee6cb checks: add GstBin unit test that creates a lot of bins
Currently fails (in normal circumstances) because we create a
socket pair for each bin's bus and exhaust the number of available
file descriptors.

https://bugzilla.gnome.org/show_bug.cgi?id=646624
2011-04-05 16:30:59 +02:00
Wim Taymans 8bcaf95662 Merge branch 'master' into 0.11 2011-04-04 11:17:28 +02:00
Tim-Philipp Müller 439bbf1fde checks: ignore new funnel unit test binary 2011-04-03 16:18:14 +01:00
Wim Taymans fdd6433757 Merge branch 'master' into 0.11
Conflicts:
	tests/check/gst/struct_x86_64.h
2011-03-31 17:55:22 +02:00
Wim Taymans 468ec5bc40 bufferlist: simplify bufferlists
We now have multiple memory blocks as part of the buffers and we can therefore
reduce the bufferlist to a simple array of buffers.
2011-03-31 17:51:02 +02:00
Sebastian Dröge f42f2240d0 gstabi: Add some new structures for x86-64 2011-03-31 10:53:03 +02:00
Sebastian Dröge 2714587a96 libsabi: Add lots of new structures for x86-64 2011-03-31 10:46:40 +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
Wim Taymans ebb14d95b2 buffer: more API tweaks
_trim -> _resize
_create_sub -> copy_region
2011-03-30 16:47:55 +02:00
Sebastian Dröge 8db570f48c multiqueue: Make assignment of queue IDs and pad names threadsafe
Also add a test for naming pads by the caller and return NULL
when requesting an already existing pad.
2011-03-30 10:52:36 +02:00
Sebastian Dröge 565efa30ea funnel: Integrate into the build system and rename the types 2011-03-29 11:20:05 +02:00
Sebastian Dröge e5a857e78a funnel: Import funnel element from farsight2 2011-03-29 11:20:05 +02:00
Wim Taymans 6da19ffeb2 buffer: more buffer updates 2011-03-29 11:07:36 +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
Wim Taymans beac9c4a95 buffer: fix remaining unit tests 2011-03-28 20:08:46 +02:00
Wim Taymans f35847a094 buffer: fix unit test 2011-03-28 20:08:46 +02:00