Commit graph

189 commits

Author SHA1 Message Date
Sebastian Dröge
26e27417d7 tests/capsfilter: Fix memory leak and compare caps directly instead of strcmp() 2013-09-09 14:21:56 +02:00
Sebastian Rasmussen
7854e392dd tests/capsfilter: Test caps-related queries and property 2013-09-09 14:18:39 +02:00
Alessandro Decina
924acf5e92 filesink: flush (discard data) on FLUSH_STOP
Reset the write position to 0 and truncate the file on FLUSH_STOP.
2013-08-27 08:00:09 +02:00
Alessandro Decina
b19d0518cb tests: filesink: small refactoring 2013-08-27 07:58:29 +02:00
Olivier Crête
bbb26f8756 funnel: Re-push all sticky events when buffers come from a different pad
Don't special case segment/caps, just push all sticky events when they are
received on the currently active pad or when the active pad changes.
2013-07-01 20:45:42 -04:00
Olivier Crête
2ba75ddfef tests: Remove funnel pad_alloc test 2013-07-01 20:18:58 -04:00
Jonas Holmberg
0ea8748c6b check: Added gst_check_setup_events_with_stream_id()
Added a new function gst_check_setup_events_with_stream_id(), since
gst_check_setup_events() does not work with multiple pads.

https://bugzilla.gnome.org/show_bug.cgi?id=703377
2013-07-01 15:54:11 +02:00
Sebastian Dröge
114f9584d4 tests: Fix event order warnings and dataflow before stream-start/segment event 2013-05-09 13:32:07 +02:00
Alexander Schrab
745821d5f1 tests: unit test to trigger the queue/flushing race condition bug for allocation queries
https://bugzilla.gnome.org/show_bug.cgi?id=692691
2013-01-30 12:07:52 +00:00
Alessandro Decina
c257b19ead queue: don't fail in _sink_event for sticky events
Implement the same behaviour as gst_pad_push_event when pushing sticky events
fails, that is don't fail immediately but fail when data flow resumes and upstream
can aggregate properly.

This fixes segment seeks with decodebin and unlinked audio or video branches.
Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=687899
2012-11-09 18:42:16 +01:00
Tim-Philipp Müller
666c8c11c6 Fix FSF address
https://bugzilla.gnome.org/show_bug.cgi?id=687520
2012-11-03 20:44:48 +00:00
Tim-Philipp Müller
b25c3363e0 Revert "tests: fix buffer leak in queue2 unit test"
This reverts commit 232fd2953e.

This was already fixed.
2012-09-12 13:00:15 +01:00
Tim-Philipp Müller
232fd2953e tests: fix buffer leak in queue2 unit test 2012-09-12 12:33:51 +01:00
Mark Nauwelaerts
bb4860d961 check: port to the new GLib thread API 2012-09-12 13:01:18 +02:00
Mark Nauwelaerts
47e7c91ab5 tests: port to new GLib thread API 2012-09-12 13:01:18 +02:00
Sebastian Dröge
0d22988e5c event: Update for stream-start event API changes 2012-08-06 14:00:56 +02:00
Tim-Philipp Müller
08c2c446a5 tests: add unit test for element re-use using fakesrc 2012-07-03 19:15:25 +01:00
Sebastian Dröge
3a501deb3e funnel: Fix unit test 2012-06-04 13:01:41 +02:00
Sebastian Dröge
09efcf22c8 valve: Fix unit test 2012-06-04 13:01:41 +02:00
Mike Ruprecht
cc548f5eb6 tests: Add funnel test to cover EOS event handling
Ported from f3b2dd6f in the 0.10 branch
2012-05-31 14:55:11 -04:00
Mike Ruprecht
5e76a19566 tests: Fix invalid read when releasing request pads in funnel tests 2012-05-31 13:09:00 -04:00
Raimo Järvi
63234a9dab gst: Fix compiler warnings on mingw-w64
https://bugzilla.gnome.org/show_bug.cgi?id=675525
2012-05-09 09:35:35 +02:00
Mark Nauwelaerts
678e9704fc tests: plug some leaks 2012-04-24 16:01:52 +02:00
Wim Taymans
086f8855be queue2: set buffer to NULL before pull 2012-04-11 12:58:19 +02:00
Wim Taymans
74eb3cef2d tests: port queue2 tests to 0.11 2012-04-11 12:54:36 +02:00
Wim Taymans
bfc87ac576 Merge remote-tracking branch 'origin/0.10'
Conflicts:
	gst/gsttoc.c
	plugins/elements/gstqueue2.c
2012-04-11 12:50:50 +02:00
Wim Taymans
dc3d3674b1 queue2: add test for ringbuffer deadlock 2012-04-11 12:45:43 +02:00
Wim Taymans
db1318ab4a pad: change the semantics of get/pull_range a little
Make it so that one can specify a buffer for get/pull_range where the downstream
element should write into. When passing NULL, upstream should allocate a buffer,
like in 0.10.
We also need to change the probes a little because before the pull probe, there
could already be a buffer passed. This then allows us to use the same PROBE
macro for before and after pulling.
While we're at the probes, make the query probe more powerful by handling the
GST_PAD_PROBE_DROP return value. Returning _DROP from a query probe will now
return TRUE upstream and will not forward the probe to the peer or handler.
Also handle _DROP for get/pull_range properly by not dispatching to the
peer/handler or by generating EOS when the probe returns DROP and no buffer.
Make filesrc handle the non-NULL buffer passed in the get_range function and
skip the allocation in that case, writing directly into the downstream provided
buffer.
Update tests because now we need to make sure to not pass a random value in the
buffer pointer to get/pull_range
2012-03-16 21:37:10 +01:00
Wim Taymans
92b61a6a18 tests: fix old caps in tests now that core warns 2012-03-01 17:41:56 +01:00
Wim Taymans
4fcef8ce42 tests: fix queue unit test after queue changes 2012-02-21 16:39:05 +01:00
Wim Taymans
7ab1d62c24 GST_FLOW_WRONG_STATE -> GST_FLOW_FLUSHING 2012-02-08 16:18:04 +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
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
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
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
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
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
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
Tim-Philipp Müller
d3560cc9a6 tests: update unit tests for URI handler API changes 2011-11-13 18:05:24 +00: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
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
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
Wim Taymans
021f09d622 tests: fix compilation 2011-10-27 17:09:51 +02:00