Thiago Santos
f7ec33009a
tests: caps: add check for caps with features intersection
...
Checks that a caps without features doesn't intersect with
one that has features
2014-08-09 11:03:01 -03:00
Sebastian Rasmussen
4cf6a6e086
tests: Add missing unrefs of objects after use
...
Unreffing the objects returned by gst_bin_get_by_name() and
gst_pipeline_get_use() were missing in several tests, so add these.
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=734345
2014-08-06 13:47:11 +02:00
Sebastian Dröge
fd14754921
utils: Fix unititialized variable compiler warning
2014-08-06 12:55:57 +02:00
Sebastian Rasmussen
2e4ce5caf6
tests: Add test verifying gst_element_link_pads_full()
...
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=733119
2014-08-06 09:58:37 +02:00
Thiago Santos
0d5ddc96f2
Revert "tests: taglist: add basic test for taglists serialization"
...
This reverts commit 85d23d19b7
.
There was already a gsttag.c tests file, this test has been merged
in it in the previous commit
2014-07-21 12:44:40 -03:00
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
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
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
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
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
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
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
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
Tim-Philipp Müller
7644c8a3c5
tests: fix leak in systemclock test
2014-02-08 23:39:03 +00: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
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
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
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
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
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