Commit graph

1466 commits

Author SHA1 Message Date
Thiago Santos
4f32a74daf tests: tag: add the empty taglist serialization test
Adds the test to the appropriate and already existing file.
2014-07-21 12:40:47 -03:00
Thiago Santos
85d23d19b7 tests: taglist: add basic test for taglists serialization
Make sure it works with empty taglists
2014-07-21 11:42:05 -03:00
Thiago Santos
b0b8908159 tests: gststructure: serialization of tag event structure
Adds a test that checks that the serialization of a tag event structure
works without problems

https://bugzilla.gnome.org/show_bug.cgi?id=733131
2014-07-21 11:42:05 -03:00
Sebastian Dröge
4f29ce3cb7 pipeline: Add unit test for resetting of the start time
Also check if this properly affects basesink elements to not
report the old start time but the real current position when
setting to PAUSED again.
2014-07-21 09:33:54 +02:00
Tim-Philipp Müller
e10d54b8e2 tests: fix locking in gstpoll unit test
The mutex needs to be locked when g_cond_wait*() is
called.
2014-07-06 12:10:09 +01:00
Tim-Philipp Müller
14ae3cf56c tests: don't use post-GLib 2.32 API in bufferlist test
g_ptr_array_insert() is GLib >= 2.40
2014-07-02 08:41:44 +01:00
Sebastian Dröge
434bb14995 sparsefile: Initialize memory in unit test to make valgrind happy
We were writing unitialized stack memory to the file.
2014-06-29 19:16:05 +02:00
Tim-Philipp Müller
0e0e78e8af devicemonitor: don't fail when started without any filters
Just show all devices then.
2014-06-27 10:47:50 +01:00
Olivier Crête
fc87c5df5e device: Add unit tests 2014-06-26 21:01:38 -04:00
Tim-Philipp Müller
ddd5e30726 tests: add another buffer list test case 2014-06-26 14:16:20 +01:00
Tim-Philipp Müller
9823a5f7b4 tests: port and re-enable buffer list tests
And remove some which don't apply any more.
2014-06-26 14:16:16 +01:00
George Kiagiadakis
4376ba4e3c tests: enhance the gstcaps test_features to also test gst_caps_set_features()
Compliments my previous patch for gst_caps_set_features, which would
previously assert and leak the old GstCapsFeatures if the caps already
had a GstCapsFeatures and you were trying to replace it with a new one.
2014-06-26 11:58:04 +03:00
Tim-Philipp Müller
39b69d27da tests: add unit test for gst_caps_is_any() and _is_empty()
https://bugzilla.gnome.org//show_bug.cgi?id=731704
2014-06-22 12:52:01 +01:00
Tim-Philipp Müller
4043fc3a44 tests: fix compiler warnings in gstvalue tests
Calling GST_VALUE_HOLDS_*(&v) now results in a compiler
warning about value!=NULL always being false, so check
type directly in those cases.
2014-06-21 01:10:22 +01:00
Srimanta Panda
5b3ee70ea9 Fix funnel EOS handling and wrong unittest
When no data is coming from sinkpads and eos events
arrived at one of the sinkpad, funnel forwards the EOS
event to downstream. It forwards the EOS because lastsink pad
is NULL. Also the unit testcase of the funnel is not checking
the correct behavior as it should. The unit test case should
fail if one of the sink pad has already EOS present on it and
we are trying to push one more EOS.

https://bugzilla.gnome.org/show_bug.cgi?id=731716
2014-06-19 10:19:15 -04:00
Sebastian Dröge
9b7da39b68 value: Make sure to cast int range values to guints before storing them
Otherwise negative values will sets all of the 64 bits due to two's
complement's definition of negative values.

Also add a test for negative int ranges.
2014-06-19 09:33:54 +02:00
Tim-Philipp Müller
5c62bce85c tests: remove some cruft from the bufferlist test
Buffers no longer carry caps, and bufferlists don't have
groups where buffers may need to be merged into one any more.
2014-06-17 14:39:00 +01:00
Tim-Philipp Müller
b314ac8291 tests: add test for gst_buffer_list_remove() 2014-06-16 20:30:32 +01:00
Tim-Philipp Müller
9c4e1d3689 tests: add unit test for queuearray expansion from 1
https://bugzilla.gnome.org/show_bug.cgi?id=731349
2014-06-07 09:46:42 +01:00
Thiago Santos
baf1688474 tests: multiqueue: fix leaks 2014-05-30 01:42:17 -03:00
Thiago Santos
1911554cff element: set pads need-parent flag to false when removing
When a pad is added the need-parent flag is set to true, so when
they are removed the flag should be set back to false

This was preventing GstPads to be reused in elements (removed and
later re-added). A unit tests was added to verify that this is
working now.

The use case is tsdemux that has a program-number property and
allows the user to switch programs. In order to do that tsdemux
will remove the pads of the current program and add from the new
ones. The removed pads are kept in the demuxer for later if the
user selects the old program again.
2014-05-29 17:01:20 -03:00
Thiago Santos
9e8bd15c12 flowcombiner: add GstFlowCombiner
Adds a utility struct that is capable of storing and aggregating flow returns
associated with pads.

This way all demuxers will have a standard function to use and have the
same expected results.

Includes tests.

https://bugzilla.gnome.org/show_bug.cgi?id=709224
2014-05-26 15:29:53 -03:00
Thiago Santos
c6f92562b6 pad: store last flow return and provide acessor function
Stores the last result of a gst_pad_push or a pull on the GstPad and provides
a getter and a macro to access this field.

Whenever the pad is inactive it is set to FLUSHING

API: gst_pad_get_last_flow_return

https://bugzilla.gnome.org/show_bug.cgi?id=709224
2014-05-26 15:29:53 -03:00
Nicolas Dufresne
103a40b6ce bufferpool: Add method and virtuals to set flushing state
Currently there is no other way to unlock a buffer pool other then
stopping it. This may have the effect of freeing all the buffers,
which is too heavy for a seek. This patch add a method to enter and
leave flushing state. As a convenience, flush_start/flush_stop
virtual are added so pool implementation can also unblock their own
internal poll atomically with the rest of the pool.  This is fully
backward compatible with doing stop/start to actually flush the pool
(as being done in GstBaseSrc).

https://bugzilla.gnome.org/show_bug.cgi?id=727611
2014-05-26 13:31:21 -04:00
Sebastian Dröge
f2cb36b995 value: Add some positive testcase for string deserialization 2014-05-19 11:05:12 +02:00
Tim-Philipp Müller
fa94322349 sparsefile: keep it private as helper API for downloadbuffer
There's no expectation that any other element or applications
might want to use this helper API any time soon, so keep it
private for the time being. There were open questions regarding
portability and binding-friendliness too.

This also removes the gio dependency of -base again.

https://bugzilla.gnome.org/show_bug.cgi?id=729951
https://bugzilla.gnome.org/show_bug.cgi?id=729949
2014-05-13 20:05:55 +01:00
Thiago Santos
40b5b32803 tests: multiqueue: test to check queue overrun with pts=none
Checks if buffers with pts=none can break the queue time size limit
and allow more buffers than expected
2014-05-08 17:56:26 -03:00
Nicolas Dufresne
194db480e0 bufferpool: Add an helper to validate config
When we call gst_buffer_pool_set_config() the pool may return FALSE and
slightly change the parameters. This helper is useful to do the minial required
validation before accepting the modified configuration.

https://bugzilla.gnome.org/show_bug.cgi?id=727916
2014-05-08 13:11:14 -04:00
Nicolas Dufresne
6079666a71 bufferpool: Add support for reconfiguring a pool
If a pool config is being configured again, check if the configuration have changed.
If not, skip that step. Finally, if the pool is active, try deactivating it.

https://bugzilla.gnome.org/show_bug.cgi?id=728268
2014-05-08 13:08:21 -04:00
Nicolas Dufresne
64aa64cb80 value: Add support for GstAllocationParams comparision
This is useful to compare buffer pool configuaration.

https://bugzilla.gnome.org/show_bug.cgi?id=728268
2014-05-08 13:08:21 -04:00
Nicolas Dufresne
00614e2c2b value: Add support for GObject comparising in structures
This is useful to allow comparing pool configuration where a GstAllocator
is set.

https://bugzilla.gnome.org/show_bug.cgi?id=728268
2014-05-08 13:08:21 -04:00
Tim-Philipp Müller
4a6ab37591 sparsefile: sprinkle G_BEGIN_DECLS / G_END_DECLS
for c++, and remove outdated comment, and add
new unit test to .gitignore.
2014-05-08 16:27:21 +01:00
Wim Taymans
45855e2795 Add new downloadbuffer element
See https://bugzilla.gnome.org/show_bug.cgi?id=680183
2014-05-08 15:53:45 +02:00
Sebastian Dröge
19eca381f5 basesink: Add test for checking that EOS always comes after the state change to PLAYING
https://bugzilla.gnome.org/show_bug.cgi?id=727949
2014-05-01 20:11:04 +02:00
Srimanta Panda
094fdfee7e funnel: Handle end of stream event on sink pad
Handle end of stream events on sink pad. Check all the sink pad
has received eos before forwarding to source pad.

Fixes : https://bugzilla.gnome.org/show_bug.cgi?id=727945
2014-04-17 19:14:34 -04:00
Sebastian Dröge
3e340ea655 collectpads: Fix memory leak in unit test 2014-04-14 21:35:52 +02:00
Tim-Philipp Müller
ed9d0381b2 testclock: replace newly-added GstTestClockIDList structure with a simple GList
Keep it simple. Likely also makes things easier for bindings,
and efficiency clearly has not been a consideration given how
the existing code handled these lists.
2014-04-12 15:33:50 +01:00
Havard Graff
3892cc4c2d testclock: add support for waiting and releasing multiple GstClockIDs
In order to be deterministic, multiple waiting GstClockIDs needs to be
released at the same time, or else one can get into the situation that
the one being released first can add itself back again before the next
one waiting is released.

Test added for new API and old tests rewritten to comply.
2014-04-12 15:33:31 +01:00
Sebastian Dröge
414f21d160 multiqueue: And actually run the other tests again 2014-04-09 16:01:09 +02:00
Sebastian Dröge
914012de70 multiqueue: Add test for checking if pads are waked up when limits are changed 2014-04-09 15:57:31 +02:00
Tim-Philipp Müller
4ab09ee869 tests: make netclientclock test faster and less flaky 2014-03-23 12:55:22 +00:00
Sebastian Dröge
888cf0656d fakesink: Update positions we're checking for after a state is lost 2014-03-18 18:12:16 +01:00
Jan Schmidt
4d7d3a1c02 Fix extended message handling with gst_bus_pop_timed_filtered()
Make sure extended message types don't get accidentally matched
when not asked for in the mask
2014-03-17 06:29:27 +11:00
Tim-Philipp Müller
1b7c5c4d64 tests: add test for extended message types and gst_bus_timed_pop_filtered 2014-03-16 14:38:07 +00:00
Thiago Santos
22258782d8 tests: multiqueue: fix eos count on test for not-linked case
From the test case:

/* This test creates a multiqueue with 2 streams. One receives
 * a constant flow of buffers, the other only gets one buffer, and then
 * new-segment events, and returns not-linked. The multiqueue should not fill.
 */

If one of the queues goes EOS and the other returns NOT_LINKED the stream
can be considerered EOS as a NOT_LINKED means that one of the branches has no
sink downstream that will block the EOS message posting.

https://bugzilla.gnome.org/show_bug.cgi?id=725917
2014-03-15 09:54:49 -03:00
Wim Taymans
7691150c45 bufferpool: only release buffers with writable memory
Check if the memory is writable before releasing the buffer into the
pool again.
Add unit test for this scenario.
2014-02-27 16:40:34 +01:00
Wim Taymans
f22d8f08e0 bufferpool: Use TAG_MEMORY to check memory before releasing
Tag allocated buffers with TAG_MEMORY. When they are released later,
only add them back to the pool if the tag is still there and the memory
has not been changed, otherwise throw the buffer away.
Add unit test to check various scenarios.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=724481
2014-02-27 15:43:13 +01:00
Sebastian Dröge
ab9fdf13a0 structure: Add getters for int64 and uint64 values 2014-02-25 15:41:45 +01:00
Thiago Santos
2c2e55789d basesrc: Do not send eos when seeking after last buffer
If pushing the last buffer triggers a seek from downstream, do not
go into EOS if a new segment was requested.

Contains unit test

https://bugzilla.gnome.org/show_bug.cgi?id=724757
2014-02-24 10:37:57 -03:00
Tim-Philipp Müller
a6656b04de tests: fix leak in baseparse test
Or rather make it not show up any more by moving
it from 'definitely lost' into 'possibly lost'.
2014-02-09 00:25:49 +00:00
Tim-Philipp Müller
7644c8a3c5 tests: fix leak in systemclock test 2014-02-08 23:39:03 +00:00
Edward Hervey
7b014d67a7 check: Remove a minor leak in unit test
Makes valgrind happy
2014-02-05 10:11:43 +01:00
Matthieu Bouron
97103c90b0 tests: add caps features unit tests
https://bugzilla.gnome.org/show_bug.cgi?id=723236
2014-02-04 18:47:23 +01:00
Stefan Sauer
c42780db66 bufferpool: more tests and small doc fixes 2014-01-31 08:36:55 +01:00
Stefan Sauer
f9a5a24211 bufferpool: add a new testsuite or the pool
Start with some basic tests.
2014-01-30 12:43:45 +01:00
Thiago Santos
5d62ead83c tests: capsfilter: add test for pending_events pushing
make sure that pending events are pushed when caps are already
set when a buffer is received
2014-01-29 14:59:43 -03:00
Thiago Santos
fdfc6dc983 basesrc: preserve seqnum of eos events sent by the user
Store the eos event seqnum and use it when creating the
new eos event to be pushed downstream. To know if the eos
was caused by the eos events received on send_event, a
'forced_eos' flag is used to use the correct seqnum on
the event pushed downstream.

Useful if the application wants to check if the EOS message
was generated from its own pushed EOS or from another source
(stream really finished).

Also adds a test for this

https://bugzilla.gnome.org/show_bug.cgi?id=722791
2014-01-24 09:31:44 -03:00
Fabian Kirsch
702e5d11c3 parse: Additional tests for parser
https://bugzilla.gnome.org/show_bug.cgi?id=710034
2014-01-20 16:18:40 +01:00
Sebastian Dröge
af84535569 iterator: Add unit tests for filtering, recursive filtering and locking
https://bugzilla.gnome.org/show_bug.cgi?id=711138
2014-01-18 14:48:54 +01:00
Sebastian Dröge
96f454d0ba tee: Add unit test for requesting pad names 2014-01-14 16:47:38 +01:00
Sebastian Dröge
c47f0f2ec5 parse-launch: Add some more failing pipelines
Also convert some comments about valgrind warnings to
FIXME comments. These were leaking since some time already.
2014-01-14 13:46:24 +01:00
Fabian Kirsch
2b33d33185 parse: Refactor grammar, make it more consistent and fix conflicts
https://bugzilla.gnome.org/show_bug.cgi?id=710034
2014-01-14 13:46:22 +01:00
Thiago Santos
4f9d382a0a tests: baseparse: add test for reverse playback on passthrough
Baseparse stores buffers for reverse playback to push on the next
DISCONT, the issue was that it wouldn't ever check for a discont
on passthrough mode as it skips all real parsing. This test
was create to verify this issue and prevent it from happening again

https://bugzilla.gnome.org/show_bug.cgi?id=721941
2014-01-13 08:43:28 -03:00
Thiago Santos
aad8123ff9 tests: baseparse: add basic test for baseparse
Just a small test to check that basic playback works
2014-01-13 08:43:28 -03:00
Wim Taymans
6c95262447 tests: improve check, also check stream-time 2014-01-08 15:47:10 +01:00
Wim Taymans
b5e4e24e75 tests: add unit test for segment _offset_running_time()
Add a unit test to check that positive and negative offsets are applied
correctly in various cases.
2014-01-08 15:31:28 +01:00
Sebastian Dröge
9e125e7bab pad: Add unit test for adding/removing blocking probes while a pad is blocked
And make sure that these new probes are actually called if they should
instead of silently blocking the pad forever.

https://bugzilla.gnome.org/show_bug.cgi?id=721289
2014-01-02 13:34:52 +01:00
Tim-Philipp Müller
430df345c4 tests: add unit test for bitreader, bytereader and bytewriter with no inlining used 2013-12-14 21:20:45 +00:00
Edward Hervey
3ea6b04c10 gstvalue: Fix comparision of double range
Checking twice the lower bound is great (you never know, it might change
between the two calls by someone using emacs butterfly-mode), but it's a bit
more useful to check the higher bound are also identical.

Detected by Coverity
2013-12-10 18:01:52 -05:00
Tim-Philipp Müller
9a62f007fc tests: add unit test for registering the same category twice 2013-12-07 19:04:16 +00:00
Sebastian Rasmussen
e8ecf3c407 Fix some typos in code comments and debug messages
https://bugzilla.gnome.org/show_bug.cgi?id=720029
2013-12-07 17:09:39 +00:00
Tim-Philipp Müller
47679cf2f8 tests: fix GstBus unit test with latest GLib
g_source_remove() works on the default main context, and
we're doing things with a custom context. Fixes warning
with newer GLib versions.
2013-11-18 15:28:32 +00:00
Sebastian Dröge
5286479467 value: Lists with all equal elements are equal to a single value
Otherwise caps containing f={X, X} are not compatible with f=X

https://bugzilla.gnome.org/show_bug.cgi?id=709253
2013-11-13 19:57:23 +01:00
Alessandro Decina
f52b5ddcd2 tests: collectpads: add flushing seek tests
https://bugzilla.gnome.org/show_bug.cgi?id=708416
2013-11-11 16:50:42 +01:00
Alessandro Decina
d063623851 tests: collectpads: tweak stub _collect to push all buffers
https://bugzilla.gnome.org/show_bug.cgi?id=708416
2013-11-11 16:50:42 +01:00
Alessandro Decina
01b4565a9a tests: collectpads: update my email address
https://bugzilla.gnome.org/show_bug.cgi?id=708416
2013-11-11 16:50:42 +01:00
Wim Taymans
02b64ee03b systemclock: Add gst_system_clock_set_default
Used for setting the default system clock that is obtained through
gst_system_clock_obtain(), which is sometimes needed for unit
testing.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=711269
2013-11-11 12:25:14 +01:00
Olivier Crête
789eda5a37 parse: Make the FATAL_ERRORS flag also work without a GError
Also add a unit tests
2013-11-01 17:02:25 +00:00
Sebastian Rasmussen
1479aba1cf tests/filesrc: Set location in wrong state
Also remove incorrect comment about code possibly not being reachable
that is now exercised by the filesrc unit test.

https://bugzilla.gnome.org/show_bug.cgi?id=709831
2013-10-13 12:18:57 -04:00
Jan Schmidt
75b7387f8b parse: Fix transfer annotations for parse_launch functions.
gst_parse_launchv, gst_parse_launchv_full and gst_parse_launch_full
all return floating refs, the same as gst_parse_launch, which just
calls gst_parse_launch_full internally anyway.

Add a unit test assertion to check it's true.

Spotted by nemequ on IRC.
2013-10-12 16:20:50 +11:00
Sebastian Dröge
4429ea53c4 caps: Skip test_subset_duplication until the bug is fixed
https://bugzilla.gnome.org/show_bug.cgi?id=709253
2013-10-10 13:19:09 +02:00
Sebastian Dröge
eb0d978e1e caps: Add a testcase for subset checks on lists with duplicated items
https://bugzilla.gnome.org/show_bug.cgi?id=709253
2013-10-10 12:42:52 +02:00
Tim-Philipp Müller
10981f781c tests: use tcase_skip_broken_test() to skip broken multiqueue test
So that we get a warning in the output that reminds us that
something needs to be fixed.
2013-10-02 12:30:54 +01:00
Edward Hervey
3537ad8ae1 check: Disable multiqueue test_output_order check
The check itself is racy.

 (CK_FORK=no GST_CHECK=test_output_order make elements/multiqueue.forever).

The problem is indeed the test and not the actual element behaviour.

The objects to push are being pulled out of the single internal queues in the
right order and at the right time...

But between:
* the moment the global multiqueue lock is released (which was used to detect
if we should pop and push downstream the next buffer)
* and the moment it is received by the source pad (which does the check)

=> another single queue (like the unlinked pad) might pop and push a buffer
downstream

What should we do ? Putting a bigger margin of error (say 5 buffers) doesn't
help, it'll eventually fail.

I can't see how we can detect this reliably.

https://bugzilla.gnome.org/show_bug.cgi?id=708661
2013-10-02 11:26:09 +02:00
Thiago Santos
007c0e5fe1 value: fix caps serialization when there are caps inside caps
Wrap caps strings so that it can handle serialization and deserialization
of caps inside caps. Otherwise the values from the internal caps are parsed
as if they were from the upper one

https://bugzilla.gnome.org/show_bug.cgi?id=708772
2013-09-30 16:20:48 -03:00
Sebastian Dröge
8f0c9c7055 context: Add test for the context caching in GstBin
https://bugzilla.gnome.org/show_bug.cgi?id=708668
2013-09-24 13:11:47 +02:00
Wim Taymans
cba26c9ed9 tests: handle unscheduled entries correctly
Make the testclock return GST_CLOCK_UNSCHEDULED when an unscheduled entry is
used for gst_clock_wait() or gst_clock_wait_async().

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=708605
2013-09-23 11:47:14 +02:00
Sebastian Dröge
921ab73340 context: Fix unit test for GstContext changes 2013-09-18 21:42:42 +02:00
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
f90f3cde5f buffer: Fix gst_buffer_memcmp() where the buffer is smaller than size
Also add unit tests for gst_buffer_memcmp

https://bugzilla.gnome.org/show_bug.cgi?id=706162
2013-08-20 14:41:27 -04:00
Sebastian Dröge
0b3bd4b954 tests: Remove other interface structs from the ABI tests too 2013-07-24 10:31:02 +02:00
Thiago Santos
6da1778dad tests: Remove GstTagSetter from ABI checks
Interfaces can have new members added without breaking ABI, so
remove it from the check.

https://bugzilla.gnome.org/show_bug.cgi?id=623799
2013-07-24 10:31:02 +02:00
Olivier Crête
915f418cc4 adapter: Take account of the skip in gst_adapter_take_buffer_fast()
Include regression test
2013-07-16 15:38:11 -04:00
Olivier Crête
5920491597 adapter: Add function to return buffer composed of multiple memories
API: gst_adapter_take_fast()
2013-07-16 14:07:48 -04: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
4fc1ba1e60 buffer: Add unit test for map_range()
https://bugzilla.gnome.org/show_bug.cgi?id=702617
2013-06-19 10:45:45 +02:00
Wim Taymans
10099e1e70 check: fix position unit test 2013-05-30 07:03:40 +02:00
Sebastian Dröge
2253f8fa6f pad: Fix memory leak in the unit test 2013-05-29 11:36:38 +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
Sebastian Dröge
f38496067d basetransform: Properly port unit test to actually use caps and check results 2013-05-09 13:31:38 +02:00
Tim-Philipp Müller
913b1e6f20 tests: add some basic checks for gst_buffer_fill() 2013-05-08 10:26:15 +01:00
Tim-Philipp Müller
e1c6a56596 typefind: fix caps leak when used in connection with uridecodebin and playbin
Don't leak forced sink caps.
2013-04-27 00:05:45 +01:00
Alessandro Decina
ef0e9b6840 tests: add check for FLUSH pad probes 2013-04-25 07:26:29 +02:00
Tim-Philipp Müller
c7a8318452 tests: ignore new test binary 2013-04-18 10:14:09 +01:00
Sebastian Dröge
03c3738b67 context: Add gst_context_writable_structure() and let get_structure() return const again 2013-04-18 10:18:22 +02:00
Tim-Philipp Müller
e8a9f7acdf printf: fix handling of old printf extension specifiers for ABI compatibility
Fixes abort when the old specifiers are used. Fix up the conversion
specifier, it would get overwritten with 'c' below to the extension
format char, which then later is unhandled, leading to the abort.
Also fix up and enable unit test for this.

https://bugzilla.gnome.org/process_bug.cgi
2013-04-18 00:46:58 +01:00
Tim-Philipp Müller
c398c842f5 tests: add unit test for old printf extension specifiers
To make sure we maintain binary compatibility with the old
specifiers.

https://bugzilla.gnome.org/show_bug.cgi?id=698242
2013-04-18 00:28:00 +01:00
Sebastian Dröge
f5f0dd50c8 context: Add unit test for GstContext 2013-04-17 12:44:29 +02:00
Tim-Philipp Müller
637e8b5e1c tests: skip all GstPoll tests on Windows
As they don't work there, and it's non-trivial to fix.

https://bugzilla.gnome.org/show_bug.cgi?id=697609
2013-04-13 12:20:06 +01:00
Руслан Ижбулатов
ff62f3f1e0 libsabi: Special struct size values for W32
These account for both possible type size mismatch AND -mms-bitfields
packing. Sizes are taken from an i686-w64-mingw32-built GStreamer,
gcc 4.8.0, mingw-w64 svn-r5685.

Fixes #697551
2013-04-09 20:10:46 +02:00
Руслан Ижбулатов
54aaba5f21 tests: fix GstPad test on windows and in CK_FORK=no mode
Need to clear buffer lists at the end of each test.

https://bugzilla.gnome.org/show_bug.cgi?id=697610
2013-04-09 09:56:57 +01:00
Sebastian Dröge
1de3b0f9e8 caps: Add test for operations on caps with ANY features 2013-04-06 21:21:39 +02:00
Tim-Philipp Müller
24cac0afa3 docs: more since markers and other docs fixes 2013-04-02 23:51:06 +01:00
Sebastian Dröge
65c650d7d4 capsfeatures: Add GST_CAPS_FEATURES_ANY
This is equal to any other caps features but results in unfixed caps. It
would be used by elements that only look at the buffer metadata or are
currently working in passthrough mode, and as such don't care about any
specific features.
2013-04-02 22:17:22 +02:00
Sebastian Dröge
7477b25df5 caps: Add new data type for handling caps features to the caps
These are meant to specify features in caps that are required
for a specific structure, for example a specific memory type
or meta.

Semantically they could be though of as an extension of the media
type name of the structures and are handled exactly like that.
2013-03-31 18:15:52 +02:00
Tim-Philipp Müller
0e5c1dcf64 event: add stream flags to stream-start event
API: gst_event_set_stream_flags()
API: gst_event_parse_stream_flags()
API: GST_STREAM_FLAG_NONE
API: GST_STREAM_FLAG_SPARSE

https://bugzilla.gnome.org/show_bug.cgi?id=600648
2013-03-31 11:47:40 +01:00
Sebastian Dröge
7b00fd3701 caps: Add unit test for GST_CAPS_{ANY,NONE} and GST_STATIC_CAPS_{ANY,NONE}
https://bugzilla.gnome.org/show_bug.cgi?id=696435
2013-03-25 09:22:50 +01:00
Jonas Holmberg
afbba8974a tests: fix spurious failure in test_collect collectpads test
pop() in collected callback.

There were three threads in the test cases that hanged: the test thread and two
threads that push buffers. Each thread push one buffer on one pad. There are
two pads in the collectpads so the second buffer will trigger the
collect-callback.

This is what happens when the hang occurs:

The first thread pushes a buffer and initializes a cookie to the value of a
counter in the collectpads object and waits on a cond for the counter to change
and for someone to consume the buffer (i.e. _pop() it).

The second thread pushes a buffer and calls the collected callback, which
signals the cond that the test thread is waiting for.

The test thread pops both buffers (without holding any lock). Each call to
_pop() increases the counter broadcasts the condition that the first thread is
now waiting for. It then joins both threads (hangs).

The first thread wakes up and returns, since its buffer has been consumed.

The second thread starts executing again. When the callback, called by the
second thread, has returned it initializes a cookie to the value of a counter,
which has already prematurely been increased by the test thread when it popped
the buffers, and wait's on a cond for the counter to change and for someone to
consume the buffer (i.e. _pop() it). Since the buffer has already been poped
and the counter has already been increased it will be stuck forever.

https://bugzilla.gnome.org/show_bug.cgi?id=685555
2013-03-18 10:45:13 +00:00
Stefan Sauer
c342d54571 controller: code cleanups
Use a property for accessing the control-source on the binding. Drop base_init
on the test object.
2013-03-08 13:16:40 +01:00
Stefan Sauer
9db3c83d2e controller: remove a bogus test
We previously forgot to initilize the amplitde property to the default and thus it was 0.0. Therefore a default lfo controlsource returned a series of 0.0 and the test was asserting on that.
2013-03-07 11:37:21 +01:00
Tim-Philipp Müller
0cbe23995f utils: avoid unexpected side-effects of GST_WRITE_* macros
Make sure the data argument is only evaluated once.
2013-02-19 18:00:48 +00:00
Tim-Philipp Müller
22b7c0bf58 check: add some more fail_unless_*() macros for convenience
API: fail_unless_equals_int_hex
API: assert_equals_int_hex
API: fail_unless_equals_int64_hex
API: assert_equals_int64_hex
API: fail_unless_equals_uint64_hex
API: assert_equals_uint64_hex
API: fail_unless_equals_pointer
API: assert_equals_pointer
2013-02-19 17:40:20 +00:00
Stefan Sauer
03e81ca8a2 collectpads: add two more tests using collectpads within an element
Add a static plugin with a rudimentary element using collectpads and do some
pipeline based tests.
2013-02-18 20:49:07 +01:00
Tim-Philipp Müller
5fc34add25 message: accept NULL error argument in gst_message_parse_{error,warning,info}
And simplify code a bit while at it.

https://bugzilla.gnome.org/show_bug.cgi?id=693704
2013-02-13 16:52:13 +00:00
Sebastian Dröge
fb3b53328f value: Remove set-style bitmask intersection/union/subtraction functions
Set operations on the bitmasks don't make much sense and result
in invalid caps when used as a channel-mask. They are now handled
exactly like integers.

This functionality was not used anywhere except for tests.

https://bugzilla.gnome.org/show_bug.cgi?id=691370
2013-02-13 17:07:47 +01:00
Sebastian Dröge
171c79c9a7 structure: Make sure that subsets have all fields of the superset
"video/x-h264,parsed=(boolean)true" is not a superset of
"video/x-h264,stream-format=(string)byte-stream,alignment=(string)nal"
for example.

https://bugzilla.gnome.org/show_bug.cgi?id=693365
2013-02-13 10:46:37 +01:00
Wim Taymans
51ebcaef74 tests: add basesink test 2013-02-05 17:22:37 +01: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
Tim-Philipp Müller
8ea19a48ce tests: check return value of gst_queue_array_drop_element() too
Was added when the API was made public in git master.

https://bugzilla.gnome.org/show_bug.cgi?id=692691
2013-01-30 11:34:15 +00:00
Tim-Philipp Müller
bc397c780c tests: one more test for gst_queue_array_drop_element()
https://bugzilla.gnome.org/show_bug.cgi?id=692691

Conflicts:
	tests/check/libs/queuearray.c
2013-01-30 11:32:21 +00:00
B.Prathibha
9fddb6c3cd tests: use g_timeout_add_seconds in pipeline stress test
https://bugzilla.gnome.org/show_bug.cgi?id=692612
2013-01-27 14:52:39 +00:00
Tim-Philipp Müller
c0926dc7cc pad: add gst_pad_get_stream_id() utility function
API: gst_pad_get_stream_id()
2013-01-19 12:51:56 +00:00
Daniel Díaz
a26a98209b tests: fix ABI check struct sizes for ARM
and re-enable ABI check for ARM.

https://bugzilla.gnome.org/show_bug.cgi?id=691828
2013-01-17 09:27:48 +00:00
Tim-Philipp Müller
47c2fc4aba tests: disable ABI checks for architectures where the struct sizes are not up-to-date
https://bugzilla.gnome.org/show_bug.cgi?id=691828
2013-01-16 11:29:47 +00:00
Tim-Philipp Müller
64eee27ebc Use GST_*_1_0 environment variables everywhere
The _1_0 suffixed environment variables override the
non-suffixed ones, so if we're in an environment that
sets the _1_0 suffixed ones, such as jhbuild, we need
to set those to make sure ours actually always get
used.
2013-01-15 13:47:32 +00:00
Tim-Philipp Müller
e9497b7bf0 tests: fix leak in ghostpad unit test
The created pad is never used and overwritten with
another newly-created pad a few lines below.
2013-01-05 16:31:06 +00:00
Tim-Philipp Müller
2d85c0f18c tests: fix clock unit test build failure after header changes
https://bugzilla.gnome.org/show_bug.cgi?id=688785
2012-11-23 13:32:07 +00:00
Wim Taymans
aa777bb315 tests: don't use deprecated thread API 2012-11-20 16:34:28 +01:00
Tim-Philipp Müller
abc805ca95 tests: gst_adapter_prev_timestamp -> gst_adapter_prev_pts
https://bugzilla.gnome.org/show_bug.cgi?id=675598
2012-11-13 23:11:34 +00:00
Tim-Philipp Müller
c6cc50e6de testclock: minor cleanups, add since markers for gtk-doc
https://bugzilla.gnome.org/show_bug.cgi?id=683012
2012-11-13 22:43:04 +00:00
Sebastian Rasmussen
4eeb471e11 check: allow GstTestClock to handle clock notifications
API: gst_test_clock_peek_id_count()
API: gst_test_clock_has_id()
API: gst_test_clock_peek_next_pending_id()
API: gst_test_clock_wait_for_next_pending_id()
API: gst_test_clock_wait_for_pending_id_count()
API: gst_test_clock_process_next_clock_id()
API: gst_test_clock_get_next_entry_time()

https://bugzilla.gnome.org/show_bug.cgi?id=683012
2012-11-13 21:47:01 +00:00
Sebastian Rasmussen
e58da2a22d check: add GstTestClock as a deterministic clock for testing
API: GstTestClock
API: gst_test_clock_new()
API: gst_test_clock_new_with_start_time()
API: gst_test_clock_set_time()
API: gst_test_clock_advance_time()

https://bugzilla.gnome.org/show_bug.cgi?id=683012
2012-11-13 21:19:57 +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
Jan Schmidt
9a37de9408 check: Add a simple test for the CollectPads buffer collect callback 2012-10-30 10:03:43 +11:00