Commit graph

886 commits

Author SHA1 Message Date
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
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
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