Commit graph

1817 commits

Author SHA1 Message Date
Tim-Philipp Müller 606c53fc94 taglist: add to_string and new_from_string functions
We want to make GstTagList opaque and not have people use
GstStructure API on it.

API: gst_tag_list_to_string()
API: gst_tag_list_new_from_string()
2011-10-30 09:58:16 +00:00
Tim-Philipp Müller 002446820e Merge remote-tracking branch 'origin/master' into 0.11 2011-10-30 09:31:39 +00:00
Tim-Philipp Müller cdade325ae taglist: add gst_tag_list_is_equal()
API: gst_tag_list_is_equal()
2011-10-30 01:44:00 +01:00
Wim Taymans 6da5841d0a tests: fix segment check 2011-10-28 16:23:49 +02:00
Wim Taymans 021f09d622 tests: fix compilation 2011-10-27 17:09:51 +02:00
Wim Taymans 4a189f80a5 tests: fix compilation 2011-10-27 16:51:43 +02:00
Stefan Sauer b6d34084f2 interfaces: clean up the use of iface and class/klass 2011-10-21 14:20:40 +02:00
René Stadler 5800757369 Revert gst_plugin_feature_get_name to const string return
Returning a newly allocated string makes no sense. It's unexpected for a
getter, and also this behaves differently in 0.10, so it would make future
merges harder.

Except for these two places here in core which were updated for the new
semantic, the return value is getting leaked all over the place.
2011-10-19 23:40:10 +02:00
René Stadler 1db50526e7 tests: fix padtemplate leak in selector test
In 0.11, gst_pad_get_pad_template returns a reference.
2011-10-17 21:40:46 +02:00
Edward Hervey b03b4c47af check: Don't leak the feature name 2011-10-17 09:51:15 +02:00
Edward Hervey e60fa7cb48 tests: Fix more leaks 2011-10-11 13:54:45 +02:00
Wim Taymans ea012d3dd7 pad: GST_FLOW_UNEXPECTED -> GST_FLOW_EOS 2011-10-10 11:33:51 +02:00
Thiago Santos 6cfaeb7d4e tests: tee: Remember to initialize variables to NULL
app_thread needs to be initialized to NULL, otherwise tests
will try to use it and crash
2011-10-09 12:03:22 -03:00
Tim-Philipp Müller 26b1496b15 tests: fix compiler warnings in sinks test 2011-10-07 13:55:18 +01:00
Tim-Philipp Müller 434e7042d8 base: make GstDataQueue private API for multiqueue
There's no code that uses it other than multiqueue, so make it private
to multiqueue for now. That way we can also do optimisations that
require API/ABI breaks. If anyone ever wants to use it, we can still
make it public again.
2011-10-07 13:54:37 +01:00
Wim Taymans 4f8bb4085f Merge branch 'master' into 0.11
Conflicts:
	libs/gst/base/gstbaseparse.c
2011-10-03 10:06:17 +02:00
Tim-Philipp Müller 6ce1fe1bb2 tests: add minimal test for GstAtomicQueue
Just new + free.
2011-09-30 14:50:51 +01:00
Wim Taymans 52cb649834 Merge branch 'master' into 0.11 2011-09-26 19:25:22 +02:00
Tim-Philipp Müller 51764c3f44 examples: fix bogus g_object_unref in helloworld example
GMainLoop is not a GObject.

https://bugzilla.gnome.org/show_bug.cgi?id=424143
2011-09-25 16:12:54 +01:00
Edward Hervey 10e7159cf8 Merge branch 'master' into 0.11
Conflicts:
	gst/gstcaps.c
	gst/gstpad.c
	libs/gst/base/gstbasesink.c
	libs/gst/base/gstbasesink.h
	libs/gst/base/gstbasetransform.c
2011-09-23 13:09:25 +02:00
Tim-Philipp Müller 1051eddd4c tests: make sure filesrc returns escaped URIs even if the input was unescaped
https://bugzilla.gnome.org/show_bug.cgi?id=654673
2011-09-13 21:58:21 +01: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 5cf8e68944 Merge branch 'master' into 0.11
Conflicts:
	gst/gstmessage.c
	gst/gstquery.c
	gst/gstregistrychunks.c
	gst/gstsegment.c
	libs/gst/base/gstbasetransform.c
	libs/gst/base/gstbasetransform.h
	libs/gst/base/gsttypefindhelper.c
	plugins/elements/gsttypefindelement.c
2011-08-26 14:37:54 +02:00
Josep Torra 97379e8f49 stepping: use the proper argument order
Fixes warning #188: enumerated type mixed with another type reported by ICC.
2011-08-26 14:11:15 +02:00
Wim Taymans d8d7c62789 basesink: remove preroll-queue-len property
Remove the preroll-queue-len property and move its variables to a private
section so that we can remove them later.
2011-08-25 12:38:58 +02:00
Wim Taymans 405a5d2a92 value: remove our FOURCC GType
Remove our custom fourcc GValue.
2011-08-22 12:19:19 +02:00
Tim-Philipp Müller 6248fefaa5 tests: update for query API changes 2011-07-28 11:24:19 +01:00
Wim Taymans 92aa4fede9 Merge branch 'master' into 0.11
Conflicts:
	libs/gst/base/gstbaseparse.c
	libs/gst/base/gstbasesink.c
2011-07-21 16:49:13 +02:00
Tim-Philipp Müller 5164d5b5bf tests: make sure non-ASCII chars in filenames are escaped when creating URIs from them
https://bugzilla.gnome.org/show_bug.cgi?id=654673
2011-07-16 12:24:01 +01:00
Wim Taymans a19baf77e7 buffer: improve size handling
Also handle the case where multiple empty memory blocks are in the buffer.
Add unit test for this.
2011-07-12 13:40:35 +02:00
Wim Taymans a5ee20db3f buffer: fix _resize some more
Add more debug.
Alow resize to 0 bytes.
Do clipping correctly.
Add more unit tests. Also add a failing test: when we resize to 0 and then
try to resize back to the original size it fails because the memory was
removed.
2011-07-12 12:00:58 +02:00
Wim Taymans 8461249f22 buffer: fix negative offsets some more
Allow for negative offsets when doing memory copy and share.
Add fast path in the _get_sizes() function.
Fix resize for negative offset and expanding the buffer.
Add some unit tests.
2011-07-11 18:00:52 +02:00
Wim Taymans 9a064bef5a test: disable failing unit tests
Disable unit tests that are failing until someone ports this to 0.11
2011-07-05 16:32:45 +02:00
Wim Taymans 1b286af5d6 queue: fix unit test
Set the right position member in the segment event.
Add some debug to queue.
2011-07-05 16:20:03 +02:00
Tim-Philipp Müller 3dbcb73b11 Remove GstImplementsInterface
It was a bit too clever, and didn't really work as an API,
confusing people to no end. Better implement specific methods
whether an interface is usable/available/ready on the interface
itself, or even add GError arguments, rather than try to have
per-instance interfaces.
2011-06-26 22:59:26 +01:00
Wim Taymans 54fd50bfe1 buffer: add index to _take_memory()
Add an index to gst_buffer_take_memory() so that we can also insert memory at a
certain offset. This is mostly interesting to prepend a header memory block to
the buffer.
2011-06-13 16:31:53 +02:00
Wim Taymans bbfec45ecc event: add reset_time boolean to flush_stop event
Add a boolean to the flush_stop event to make it possible to implement flushes
that don't reset_time.
Make basesink post async_done with the reset_time property from the flush stop
event.
Fix some unit tests
2011-06-10 11:55:08 +02:00
Wim Taymans b84fff07ea memory: Require implementation to implement _share
Require the memory implementations to implement a share operation. This allows
us to remove the fallback share implementation which uses a different allocator
implementation and complicates things too much.
Update design doc a bit.
2011-06-08 12:04:49 +02:00
Edward Hervey 8f048db3f3 check/tee: Pads need to be activated before caps are set
Also add debugging to figure out what's going on
2011-06-07 10:53:49 +02:00
Edward Hervey ef2d593e40 check/ghostpad: Activate pads before checking for caps forwarding/setting
This is now done via in-band events, so the pads need to be active
2011-06-06 10:27:57 +02:00
Tim-Philipp Müller 5a8273e527 Merge branch 'master' into 0.11 2011-06-05 15:48:51 +01:00
Tim-Philipp Müller a4092cd5c4 Remove everything libxml2- and loadsave-related 2011-06-04 15:22:06 +01:00
Tim-Philipp Müller 9e20c4eadc tools, tests: fix some unused-but-set-variable compiler warnings 2011-06-04 14:13:07 +01:00
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