Commit graph

1086 commits

Author SHA1 Message Date
Wim Taymans edd2ffe4d4 memory: Add 0 padding
Change gst_allocator_alloc() so that we can also spicify flags and padding.
Add 2 new flags to mark the memory 0 prefixed/padded. This allows us to
remove some resizes in the base classes.
When allocating memory, memset prefix and padding with 0 when the flags tell
us to.
On resize, clear the zero padding flags if we can't guarantee the memory is
still 0 filled.
Update tests.
2012-03-14 21:32:22 +01:00
Wim Taymans 67931bfded caps: make _normalize take ownership of input
Make gst_caps_normalize() take ownership of the input so that it can more
intelligently decide when to copy or not.
2012-03-12 12:21:34 +01:00
Wim Taymans 8a76c3269a caps: _do_simplify() -> _simplify()
Rename _do_simplify() to _simplify(). The name was introduced as a replacement
method for a deprecated method but we can now rename it again.
Fix some docs.
2012-03-12 11:38:37 +01:00
Wim Taymans 9cdbffea94 caps: improve _do_simplify
Make gst_caps_do_simplify() take ownership of the input caps and produce a
simplified output caps. This removes the requirement of having writable input
caps and the method can make the caps writable only when needed.
2012-03-12 10:42:23 +01:00
Wim Taymans 6886be59f5 tests: fix unit test
with the new caps API, there is more sharing and less copying going on so the
unit test refcounts are different.
2012-03-12 10:41:28 +01:00
Wim Taymans 43abf99a8a caps: avoid using in-place oprations
Rework some caps operations so they don't rely on writable caps but instead take
ownership of the input caps and do _make_writable() only when needed.
Remove some const from caps functions, it does not make much sense for
refcounted objects and does not allow us to return a refcount to the const input
caps.
Rework the base classes fixate vmethods to not operate on the caps in-place.
All this saves us around 30% of caps and structure copy and new operations.
2012-03-11 18:57:44 +01:00
Wim Taymans 842afb9732 test: add test to check sticky events order
Sticky events pushed on an unlinked pad should be stored on the pad. When the
pad is then linked and an event is pushed, the event should be merged with the
already existing sticky events and then the sticky events should be pushed in
the order that they were originally pushed.
2012-03-09 11:49:08 +01:00
Wim Taymans 2d63298cac test: fix typo in comment 2012-03-09 11:48:40 +01:00
Tim-Philipp Müller c0172d6724 tests: port pipeline/seek test to 0.11
Doesn't fail in 0.11 of course, at least not on my machine.
2012-03-08 20:08:20 +00:00
Tim-Philipp Müller e09fe53a22 Merge remote-tracking branch 'origin/master' into 0.11
Conflicts:
	common
	gst/gstpad.h
	gst/gsttask.c
	libs/gst/base/gstcollectpads2.h
2012-03-08 19:55:30 +00:00
Tim-Philipp Müller 799d69b038 tests: add minimal basesrc ! sink seeking unit test
Should reproduce 'GStreamer-WARNING **: wrong STREAM_LOCK count 0'
warnings (with make pipelines/seek.torture or pipelines/seek.forever
anyway, since it appears to be racy).

https://bugzilla.gnome.org/show_bug.cgi?id=670846
2012-03-08 16:19:55 +00:00
Wim Taymans 7b8263de93 pad: return ANY for a pad without template
Because gst_pad_get_pad_template_caps() returns ANY when there is no template,
the query caps function should also return ANY when there is no template (and no
pad current caps) instead of EMPTY.
2012-03-08 10:34:42 +01:00
Wim Taymans 68a6f2faaf tests: improve metadata test 2012-03-02 13:02:37 +01:00
Wim Taymans 92b61a6a18 tests: fix old caps in tests now that core warns 2012-03-01 17:41:56 +01:00
Sebastian Dröge 99a8cd1048 Merge branch 'master' into 0.11
Conflicts:
	libs/gst/base/gstcollectpads2.c
	libs/gst/check/gstconsistencychecker.c
2012-03-01 14:43:01 +01:00
Wim Taymans e80296cf46 meta: split registration of API and implementation
Split out the registration of the metadata API and its implementation. Make a
GType for each metadata API. This allows us to store extra information with the
API type such as the tags.
Change the buffer API so that we can get the metadata using the API GType.
Change the query API so that we use the metadata API GType in the allocation
query instead of a string.
Update netaddress and unit tests
2012-02-29 17:37:09 +01:00
Wim Taymans f0105dd81f meta: add return vale to transform
Add a boolean return value so that we can see when a transform fails.
2012-02-28 16:17:47 +01:00
Wim Taymans 549347f81c tests: fix unit test 2012-02-28 12:51:27 +01:00
Wim Taymans 825bc829b1 tests: increase bus test timeout 2012-02-27 11:46:08 +01:00
Tim-Philipp Müller 64effe78e7 tests: make datetime test more reliably when comparing two almost identical nows
Account for rounding errors in some places, and that two nows are
not always entirely identical, so allow some leeway when comparing
microseconds and seconds. Ran into this too often, esp. when the
system is under load.
2012-02-27 09:37:22 +00:00
Wim Taymans eb84682e92 clock: make more stuff private
Expose methods to get and set the timeout because subclasses uses this.
2012-02-27 09:11:36 +01:00
Wim Taymans 6b22a63f1b meta: flesh out the metadata transform
Flesh out the transform method. Add a type and extra info to the transform
function so that implementation can transform the metadata.
Remove the copy function and replace with the more generic transform.
2012-02-24 10:28:56 +01:00
David Schleef 0f0f355bfa Fix gap in Makefile 2012-02-23 08:49:19 -08:00
Wim Taymans 7b0e4f27fb memory: make _new_wrapped take user_data and notify
Make it possible to configure a GDestroyNotify and user_data for
gst_memory_new_wrapped() this allows for more flexible wrapping of foreign
memory blocks.
2012-02-22 02:10:21 +01:00
Wim Taymans 4fcef8ce42 tests: fix queue unit test after queue changes 2012-02-21 16:39:05 +01:00
Matej Knopp 1d7626f293 Unit test for queue src caps notification 2012-02-21 11:04:55 +01:00
Wim Taymans f2e05faaaf tests: fix useless segment test 2012-02-20 14:42:11 +01:00
Wim Taymans c6a1bed1ad memory: more work on refcount and writability
Rename _is_writable() with _is_exclusive because the writability does not depend
on the amount of references to the memory object anymore.
Add accessor macros for the memory flags.
Rename the GstBuffer _peek_memory() method to _get_memory() and return a
reference to the memory now that we can do this without affecting writability
of the memory object. Make it possible to also make this function merge the
buffer memory.
Add methods to replace memory in a buffer. Make some convience macros for the
buffer memory functions.
Fix unit tests.
2012-02-13 18:04:03 +01:00
Tim-Philipp Müller 4d937fafbb event: rename gst_event_{set,parse}_stream_config_codec_data() to _setup_data()
More generic.
2012-02-12 20:51:39 +00:00
Wim Taymans 7ab1d62c24 GST_FLOW_WRONG_STATE -> GST_FLOW_FLUSHING 2012-02-08 16:18:04 +01:00
Wim Taymans e74daf61d1 buffer: add new test 2012-02-02 13:17:38 +01:00
Tim-Philipp Müller 83002ac63e typefind: pass extensions as comma-separated list in a simple string
Fix annoying gst_type_find_register() function signature. A simple
string with comma-separated extensions works just as well and saves
lines of code, casts, relocations and ultimately kittens.
2012-02-02 01:32:07 +00:00
Stefan Sauer 5e4c13fc97 controller: constructures for control sources return GstControlSource
Don't return the specific types. In most cases there is no specific api there
anyway.
2012-01-31 12:29:52 +01:00
Stefan Sauer 4deaf9b8be controller: rename control-bindings
gst_control_binding_xxx -> gst_xxx_control_binding for consistency.
2012-01-30 21:18:57 +01:00
Tim-Philipp Müller 068d9ecf5a event: add constructor and parse function for new GAP event
(Whatever you do, don't mention the filler event.)
2012-01-28 18:09:01 +00:00
Tim-Philipp Müller d50ecdd9d5 tests: fix simple-launch-lines compilation
Don't use removed API.
2012-01-27 17:50:50 +00:00
Tim-Philipp Müller 75e17f0002 event: add construct and parse API for the new STREAM CONFIG event
codec data and stream headers don't belong into caps, since they
are not negotiated. We signal them using the STREAM CONFIG event
instead.
2012-01-27 17:42:07 +00:00
Wim Taymans 21455d35b1 tests: fix some more leaks 2012-01-27 12:52:01 +01:00
Sebastian Dröge c5b7e7903e utils: Fix unit test 2012-01-27 12:14:50 +01:00
Wim Taymans 9676e141ce tests: fix leaks 2012-01-27 12:10:09 +01:00
Tim-Philipp Müller ca697b61f3 docs: remove collectpads from docs, fix build 2012-01-26 10:48:51 +00:00
Sebastian Dröge b9e199798e collectpads2: Unit test is valgrind clean now 2012-01-26 11:42:29 +01:00
Sebastian Dröge ded86f716d collectpads2: Fix unit test to actually work again 2012-01-26 11:40:53 +01:00
Sebastian Dröge 0ff349fb38 collectpads2: Port collectpads unit test to collectpads2
Currently fails but really shouldn't.
2012-01-26 11:39:22 +01:00
Wim Taymans 203dd6fbe1 memory: make guint8 * for easy usage 2012-01-25 11:54:23 +01:00
Wim Taymans a521252845 Add new GstMapInfo
Use a structure to hold info about the mapping. The application then keeps track
of this state and we can use it to unmap the memory again later.
2012-01-25 11:54:23 +01:00
Stefan Sauer 660d9c071a controller: cleanup the control-binding construction
This is now bindings firendly as _new is just a classic c convenience and all
the work is done in a constructor. As a side effect _new never fails.
Fix the tests.
2012-01-24 21:57:44 +01:00
Vincent Penquerc'h 982ff80c38 tests: add basic tests for new stepped ranges
https://bugzilla.gnome.org/show_bug.cgi?id=665294
2012-01-24 12:11:44 +00:00
Stefan Sauer b23977cb93 controller: allow different controlbindings
Make controlbinding an abstract baseclass. Move implementation to control-
binding-direct and add a control-binding-argb. Add an example.
2012-01-23 11:03:43 +01:00
Tim-Philipp Müller 2c8c44976f Replace deprecated GStaticMutex with GMutex
https://bugzilla.gnome.org/show_bug.cgi?id=662207
2012-01-22 22:44:59 +00:00