Commit graph

1093 commits

Author SHA1 Message Date
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
Tim-Philipp Müller
1654b7f1d7 Use GLib's type for GError instead of our own
We introduced our own when GLib didn't want to add a GType
for GError. But now that there is one, we can use GLib's
unconditionally and remove our version.
2012-01-22 15:16:14 +00:00
Stefan Sauer
dd9f0481ea controller: improve control binding handling
Change _set_control_binding to _add_control_binding and take ownership. Add a
_remove_control_binding function.
2012-01-20 14:42:31 +01:00
Stefan Sauer
c227d51fa9 controller: remove convenience api for control sources
This is needed to support multiple kinds of control-bindings.
2012-01-20 11:31:23 +01:00
Wim Taymans
a1d7bd02e4 memory improvements
Make the memory object simply manage the data pointer and the maxsize and move
the offset and size handling to common functionality.
Use the READONLY flag to set a readonly lock.
Remove the data and size fields from the unmap method. We need an explicit
resize operation instead of using the unmap function.
Make internal helper lock and unlock functions.
Update unit test and users of the old API.
2012-01-19 12:51:41 +01:00
Wim Taymans
252327f87a Update for new gthread API 2012-01-19 09:27:04 +01:00
Tim-Philipp Müller
80f2eb6108 net: port to use gio's networking API
Some warts still, but it's a start.
2012-01-18 01:22:43 +00:00
Wim Taymans
c96d5a330c memory: make writability check into a method
Use a method to check for writability instead of a macro so that we can change
the implementation more easily.
2012-01-16 15:57:35 +01:00
Wim Taymans
4eb0c8ae07 tests: improve memory test 2012-01-16 12:24:48 +01:00
Tim-Philipp Müller
c721d53773 Remove GST_TYPE_DATE, our own GDate type
Which we had to add because GLib didn't have it
back in the day. Port everything to plain old
G_TYPE_DATE, which is also a boxed type. Ideally
we'd just use GDateTime for everything, but it
doesn't support not setting some of the fields
unfortuntely (which would be very useful for
tag handling in general, if we could express
2012-01 for example).

https://bugzilla.gnome.org/show_bug.cgi?id=666351
2012-01-12 20:50:53 +00:00
Tim-Philipp Müller
71e89bc514 tests: ignore new memory test binary 2012-01-09 13:19:04 +00:00
Wim Taymans
80f4716a61 memory: check semantics of nested mappings
Count how many mappings are currently active and also with what access pattern.
Update the design doc with restrictions on the access patterns for nested
mappings.
Check if nested mappings obey the access mode restrictions of the design doc.
Add various unit tests to check the desired behaviour.
2012-01-06 13:10:18 +01:00
Wim Taymans
960c580ae2 memory: handle -1 size in unmap
handle -1 in unmap correctly when the offset is modified.
2012-01-06 07:02:36 +01:00
Wim Taymans
e4a58ec71e memory: improve semantics of unmap
Make an unmap call with a different data pointer than the map call update the
offset field. This allows for both offset and size adjustements in the unmap
call.
2012-01-06 06:43:08 +01:00
Wim Taymans
d483ff2db5 memory: add more checks
Add check for mapping and resizing
2012-01-05 18:15:20 +01:00
Wim Taymans
6e0024e76e memory: take offset into account
Take the offset into account whem mapping and unmapping the buffer.
2012-01-05 17:28:28 +01:00
Wim Taymans
b750dc5090 memory: clarify nested mappings, add unit test 2012-01-05 16:48:49 +01:00
Wim Taymans
8ec07bb6f7 tests: add more memory unit tests
Check for unmap with invalid size
2012-01-05 13:22:42 +01:00
Wim Taymans
8658b2fd68 tests: add unit test for GstMemory
Add a GstMemory unit test
Add some more asserts in GstMemory to catch invalid cases.
2012-01-05 13:11:05 +01:00
Sebastian Dröge
da81ada9d0 value: Add tests for the bitmask type 2012-01-05 10:24:14 +01:00
Tim-Philipp Müller
8ff3102116 registry: get rid of gst_default_registry_*() convenience macros
They're not really worth it: hardly save any typing, and aren't
great for bindings or gobject-introspection.
2012-01-02 02:32:49 +00:00
Tim-Philipp Müller
ed80a5cd4b registry: rename gst_registry_get_default() to gst_registry_get()
It's not really a default if there is only one that can't be changed.

Should we return a ref like e.g. g_volume_monitor_get() does?
2012-01-02 02:22:51 +00:00
Tim-Philipp Müller
2836cbee94 Merge remote-tracking branch 'origin/master' into 0.11
Conflicts:
	gst/gsttaglist.c
	plugins/elements/gstoutputselector.c
2012-01-02 02:21:40 +00:00
Stefan Sauer
33e381743b controller: rename some tests 2012-01-01 20:57:34 +01:00
Stefan Sauer
62a0d9dc39 controller: support control mapping for enums
Add a mapping for enum types (supporting sparse enums). Add a test.
2012-01-01 20:55:20 +01:00
Stefan Sauer
3a08d90ec7 controller: remove nonsense parts from test object property descriptions 2012-01-01 20:43:51 +01:00
Stefan Sauer
44de1ed5f1 controller: cleanup the tests 2012-01-01 16:08:01 +01:00
David Schleef
3664bfd367 convert Makefile spaces to tabs 2011-12-31 17:38:15 -08:00
Stefan Sauer
dce3dcee35 controller: fix tests
Set a defined value to check for no-change.
2011-12-31 09:57:49 +01:00
Stefan Sauer
fcef8d8046 control-sources: turn into GstObjects
This is a preparation for chaining them.
2011-12-31 09:57:49 +01:00
Tim-Philipp Müller
65975daec9 tests: disable GstIndex unit test 2011-12-30 18:32:59 +00:00
Stefan Sauer
db807d9890 controller: add more tests to core controller suite
Extend the dummy control-source to allow testing the sync code path. Add test
for 1:1 and 2:1 value <-> control-source sync.
2011-12-30 17:53:23 +01:00
Stefan Sauer
b0b6bea3dc controller: add a test for bindings control sources multiple times 2011-12-30 17:53:23 +01:00
Edward Hervey
173d845cca tests: Fix leak in pad check 2011-12-28 15:30:31 +01:00
Tim-Philipp Müller
66eee8ae35 tests: can't access private registry structure members directly any longer 2011-12-27 11:35:28 +00:00
Tim-Philipp Müller
9a3e4ce5cb libs: remove gdp dataprotocol library
Made private and moved to gdp plugin in -base for
the time being, until we figure out what we do with
gdp and 0.11.
2011-12-25 23:41:50 +00:00
Stefan Sauer
15f675ccc1 controller: split and cleanup the tests
The controller object was once copied from buzztards unit tests. Change
TestMonoSource to TestObj as it is not a full fledged element. Split the tests
into a core and library test suite.
2011-12-25 21:24:57 +01:00
Stefan Sauer
39d6b7462f controller: move GValue handling from control-sources to -binding
ControlSources are now gdouble based. A control source is mapped to a
particullar GObject property using a ControlBinding.
2011-12-25 20:48:14 +01:00
Stefan Sauer
a80401b22c controller: move GstControlledProperty into a separate class
Add a GstControlBinding class. This is a preparation for making the
controlsources generate double valued control curves and do the gparamspec
mapping in the control binding. Now the API in GstObject is again mostly
for convenience.
2011-12-25 18:50:45 +01:00
Stefan Sauer
503b739b23 controller: cleanup interpolation modes
Remove deprecated/unimplemented modes. Turn interpolation mode into a gobject
property. Update docs and examples.
2011-12-19 23:36:26 +01:00
Stefan Sauer
2c7a8b924a controlsources: refactor interpolation control source
Move most of the code to a GstTimedValueControlSource. Split out the trigger
'interpolation mode' to a new control source class. Move tests and examples to
new api. Update docs.

Fixes #610338
2011-12-19 22:52:30 +01:00
Tim-Philipp Müller
79a543b62c tests: fix up selector test after merge 2011-12-08 00:47:46 +00:00
Tim-Philipp Müller
eaa2d81474 Merge remote-tracking branch 'origin/master' into 0.11
Conflicts:
	gst/gstindexfactory.c
	libs/gst/base/gstbasetransform.c
	plugins/elements/gstfakesink.c
	plugins/elements/gstfakesrc.c
	plugins/elements/gstidentity.c
	plugins/elements/gstinputselector.c
	plugins/elements/gstoutputselector.c

Note: did not merge any of the basetransform changes from 0.10.
2011-12-08 00:39:10 +00:00
Sebastian Dröge
7d3760b4b7 selector: Push newsegment events before any buffers are pushed in the unit test 2011-12-07 11:04:42 +01:00
Stefan Sauer
3663167582 tests: don't include glib/gthread.h directly
The g_thread functions are available after including glib.h as per docs.
2011-12-06 14:46:46 +01:00
Stefan Sauer
c379842aec controller: port the test to new api as well 2011-12-06 14:40:36 +01:00
Wim Taymans
c0e3974aa7 pad: remove GST_FLOW_RESEND
It is unused and undefined.
2011-12-06 14:24:15 +01:00
Wim Taymans
960564831e fix compilation 2011-12-06 13:58:00 +01:00
Wim Taymans
8acc2d9dc7 basesink: last-buffer -> last-sample
Rename the last-buffer property to last-sample and make it return the new
GstSample type so that we can include caps and timing info in one nice bundle.
2011-12-01 16:46:06 +01:00
Wim Taymans
d65773b5fa element: clean up element flags
Clean up the element flags
2011-11-28 16:54:55 +01:00
Wim Taymans
948b1264b7 tests: don't return FALSE from events
Returning FALSE from the event handler shuts down the sender.
2011-11-28 14:07:24 +01:00
Wim Taymans
005dab15f6 test: fix refcount error 2011-11-28 14:07:24 +01:00
Tim-Philipp Müller
33078aaeb7 buffer: add gst_buffer_{set,get}_qdata()
Allows people/us to attach arbitrary metadata to buffers.

https://bugzilla.gnome.org/show_bug.cgi?id=664720

API: gst_buffer_set_qdata()
API: get_buffer_get_qdata()
2011-11-25 17:42:07 +00:00
Wim Taymans
933e8b230c pad: fix blocking probe emission
If we are dealing with a blocking probe, only then check if one the
blocking flags of the hook matches.
Add some more debug.
Make the pad unit test less racy.
2011-11-25 07:11:24 +01:00
Matej Knopp
0b2ecbf6fc Add test for PAD_PROBE_TYPE_BLOCK and PAD_PROBE_TYPE_BLOCKING 2011-11-25 06:07:27 +01:00
René Stadler
f6e992cb06 check: drop caps argument from gst_check_setup_{src,sink}_pad
Calling set_caps at that point is not useful in 0.10 (FIXME comment!), and in
0.11 it is totally pointless: the caps event doesn't stick to a flushing pad.
2011-11-24 21:43:31 +01:00
Edward Hervey
13e7839653 tests: Check for dataflow with incompatible caps
This test currently fails, but is there to ensure we fix this issue
and keep it fixed, since it completely breaks delayed negotiation
use-cases.

This behaviour started breaking since
dd65aae9a1
2011-11-24 09:34:47 +01:00
Edward Hervey
1cc836b2f0 tests: Add comments to gstpad tests 2011-11-24 09:31:02 +01:00
Edward Hervey
bfa78eb7a1 tests: Remove "#if 0" block for behaviour that now works 2011-11-24 09:30:14 +01:00
Edward Hervey
77596b0e05 tests: Remove commented block
This behaviour is actually tested in test_push_unlinked
2011-11-24 09:28:32 +01:00
Wim Taymans
3a595d5849 tests: improve pad tests 2011-11-21 17:46:45 +01:00
Wim Taymans
2f1ed65339 pad: Merge pad mode activation functions
Add the pad mode to the activate function so that we can reuse the same function
for all activation modes. This makes the core logic smaller and allows for some
elements to make their activation code easier. It would allow us to add more
scheduling modes later without having to add more activate functions.
2011-11-21 13:29:05 +01:00
Wim Taymans
612b1fbb14 pad: add parent to other functions
Add parent to chain, chain_list, getrange and event functions.
2011-11-17 12:40:45 +01:00
Stefan Sauer
009d799087 collectpads: move fields out of reserved and restore padding
Do the 0.11 ABI changes. Add extra fields for destroy_notify and drop the qdata
hack. Rename _add_pad_full to _add_pad and remove the old _add_pad.
2011-11-17 08:39:01 +01:00
Wim Taymans
09a8294d36 pad: add parent to the query function 2011-11-16 17:22:56 +01:00
Wim Taymans
c55962c2d3 _peer_get_caps() -> peer_query_caps() 2011-11-15 17:11:46 +01:00
Wim Taymans
d805f0f034 pad: _get_caps() -> _query_caps() 2011-11-15 16:46:37 +01:00
Wim Taymans
b5c3e254b1 pad: remove getcaps and use caps query
Remove the getcaps function on the pad and use the CAPS query for
the same effect.
Add PROXY_CAPS to the pad flags. This instructs the default caps event and query
handlers to pass on the CAPS related queries and events. This simplifies a lot
of elements that passtrough caps negotiation.
Make two utility functions to proxy caps queries and aggregate the result. Needs
to use the pad forward function instead later.
Make the _query_peer_ utility functions use the gst_pad_peer_query() function to
make sure the probes are emited properly.
2011-11-15 11:20:48 +01:00
Stefan Sauer
faf31366ab controller: remove functions to add/remove controlled properties
Make that implizit with attaching/detaching controlsources. This is a lot easier
and has less invalid state (controlled property without control source).
2011-11-14 10:02:55 +01:00
Tim-Philipp Müller
d3560cc9a6 tests: update unit tests for URI handler API changes 2011-11-13 18:05:24 +00:00
Stefan Sauer
a1599f5f7e controller: merge controller into gstobject
This make the controller even more lightweight (no extra object, no extra lock,
less indirections). For object that don't use the controller the only 'overhead'
is a 3 unused fields in the gst_object structure.
2011-11-10 22:47:07 +02:00
Wim Taymans
4b216bf73a adapter: remove flush from _unmap 2011-11-10 18:18:24 +01:00
Wim Taymans
62f614d0cb tests: only override when != NULL
Only override the methods in the unit tests when != NULL otherwise we might
override the default implementation.
2011-11-10 13:37:12 +01:00
Wim Taymans
37318a8cd2 pad: remove GstPadFixateCapsFunction
The fixate caps function was not used externally and we have vmethods in the
base classes where it is needed.
Update some docs.
simplify some fixate functions in the base classes. Also pass the untruncated
caps to the vmethod.
2011-11-10 10:58:42 +01:00
René Stadler
464f55bc5b tests: pad: add tests for sticky caps handling
test_sticky_caps_flushing is currently failing.
2011-11-09 12:38:34 +01:00
Wim Taymans
a22c2716cd Merge branch 'master' into 0.11 2011-11-09 12:03:28 +01:00
Stefan Sauer
631d3e6f06 tests: add a subset test for structure 2011-11-09 11:24:26 +01:00
Wim Taymans
fb1f6bec68 pad: fix unit test 2011-11-08 13:30:18 +01:00
Wim Taymans
47eb1fe52b test: port to 0.11 2011-11-08 13:02:04 +01:00
Wim Taymans
9c0d8ca718 Merge branch 'master' into 0.11
Conflicts:
	gst/gstelement.h
	gst/gstghostpad.c
	gst/gstminiobject.c
2011-11-08 12:54:15 +01:00
René Stadler
ab8d5874b0 tests: pad: add test to verify flushing behaviour
Seems like a trivial case, but this was actually broken in 0.11 recently.
2011-11-08 12:22:21 +01:00
Wim Taymans
ba3028aeeb pad: Add GstPadProbeInfo
Make a new GstPadProbeInfo structure and pass this in the probe callback. This
allows us to add more things later and also allow the callback to replace or
modify the passed object.
2011-11-08 11:04:19 +01:00
Wim Taymans
24e596a1fb pad: rework pad probes
Make a separate cookie to detect chancges in the list of probes and keeping
track of what hooks have been invoked yet.
Remove the requirement to have probes on srcpads in push mode and sinkpads in
pull mode.
Add some more debug.
Keep track of what callbacks got executed. If no callback is called and we are a
blocking pad, let the item pass. This allows you to block pads on selected
items only.
Explicitly have an UPSTREAM and DOWNSTREAM PadProbeType. This allows you to only
block the pad on upstream or downstream items.
Add convenience macros to only block on downstream/upstream items.
2011-11-07 17:15:17 +01:00
Stefan Sauer
dfd7ea1628 controller: fix tests after move and API changes 2011-11-04 20:11:51 +01:00
Wim Taymans
a8cc106ba8 tests: fix tests
Since blocks are not on both directions, we need to check in the block callback
if we are not blocking on an upstream event and let it pass.
2011-11-04 18:47:10 +01:00
Wim Taymans
d169fa8728 fix request pad
Make all request pads take _%u in the template.
Fix up unit tests.
2011-11-03 17:49:45 +01:00
Wim Taymans
a1d82bec39 Merge branch 'master' into 0.11
Conflicts:
	gst/gstghostpad.c
2011-11-03 11:30:52 +01:00
Nicolas Dufresne
391568efde ghostpad: Don't cache internal proxy pad target
The internal proxy pad target is simply a cache of the internal proxy pad
peer. This patch uses the well implement GstPad peer handling to obtain the
target. This fixes issues with target not being set in both direction when
two ghostpads are linked together (empty bin).

https://bugzilla.gnome.org/show_bug.cgi?id=658517
2011-11-03 09:27:00 +01:00
Wim Taymans
6c627481b3 utils: remove _found_tags_ API
remove gst_element_found_tags() and gst_element_found_tags_for_pad(), they are
nothing more than a wrapper around gst_pad_push_event()
2011-11-02 12:06:47 +01:00
Wim Taymans
d9dc9f9d52 task: api cleanup
gst_task_create() -> gst_task_new()
2011-11-02 08:59:44 +01:00
Wim Taymans
e4725d9df2 structure: cleanup API
gst_structure_empty_new() -> gst_structure_new_empty()
  gst_structure_id_empty_new() -> gst_structure_new_id_empty()
  gst_structure_id_new() -> gst_structure_new_id()
2011-11-02 08:59:44 +01:00
Wim Taymans
88e12228cf bufferlist: clean up API
gst_buffer_list_len() -> gst_buffer_list_length()
gst_buffer_list_sized_new() -> gst_buffer_list_new_sized()
2011-11-02 08:59:43 +01:00
Tim-Philipp Müller
bffc9207b5 pad: rename GstProbeType and GstProbeReturn to GstPadProbe{Type,Return}
Better now than later in the cycle. These might come in handy:

sed -i -e 's/GstProbeReturn/GstPadProbeReturn/g'   `git grep GstProbeReturn  | sed -e 's/:.*//' | sort -u`
sed -i -e 's/GST_PROBE_/GST_PAD_PROBE_/g'          `git grep GST_PROBE_      | sed -e 's/:.*//' | sort -u`
sed -i -e 's/GstProbeType/GstPadProbeType/g'       `git grep GstProbeType    | sed -e 's/:.*//' | sort -u`
2011-11-01 00:15:17 +00:00
Tim-Philipp Müller
cfff518cee Merge remote-tracking branch 'origin/master' into 0.11
Conflicts:
	gst/gstpluginfeature.c
2011-10-31 14:03:15 +00:00