Commit graph

1048 commits

Author SHA1 Message Date
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
Tim-Philipp Müller
4e7944b0b9 taglist: rename _new() to _new_empty() and new_full*() to new*() 2011-10-30 22:24:25 +00:00
Tim-Philipp Müller
19b4c9c793 pluginfeature: deprecate gst_plugin_feature_type_name_filter()
It's only used internally anyway and the helper struct
has namespace issues.

API: deprecated gst_plugin_feature_type_name_filter()
API: deprecated GstTypeNameData
2011-10-30 21:47:26 +00:00
Tim-Philipp Müller
3a4f580bb2 Merge remote-tracking branch 'origin/master' into 0.11 2011-10-30 10:00:28 +00:00
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
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
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
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
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