Commit graph

2415 commits

Author SHA1 Message Date
Tim-Philipp Müller fe455d1330 tests: queue: check that the initial events are sent on immediately
Add a check that makes sure stream-start, caps, and segment events
are passed on by queue without delay, i.e. even if no buffer is
sent.
2015-04-05 16:11:03 +01:00
Tim-Philipp Müller 5deb4f658e pad: allow probes to remove the data item whilst returning PROBE_OK
Use case: we want to block the source pad of a leaky queue and
drop the buffer that causes the block. If we return PROBE_DROP
then the buffer gets dropped, but we get called again. If we
return PROBE_OK we can't easily drop the buffer. If we just
replace the item into the GstPadProbeInfo structure with NULL,
GStreamer will push a NULL buffer to the next element when we
unblock the pad probe. This patch ensures it doesn't do that.

https://bugzilla.gnome.org/show_bug.cgi?id=734342
2015-04-03 00:07:26 +01:00
Prashant Gotarne b1c59a17cc test: filesink: add tests for buffers with multiple memory blocks
Update test_seeking testcase to verify the render and render_list
virtual method handle buffers and buffer list containing multiple
memory blocks correctly.

https://bugzilla.gnome.org/show_bug.cgi?id=747223
2015-04-02 09:54:08 +01:00
Prashant Gotarne 714d8e58e3 tests: filesink: add check for render_list virtual method
GstFileSink implements the render_list virtual method to render
a list of buffers. Update the test_seeking test case to also
check the render_list method implementation.

https://bugzilla.gnome.org/show_bug.cgi?id=747100
2015-04-01 12:31:15 +01:00
Luis de Bethencourt ae0b2ec46b tests: check location isn't truncated
Test covering the recent commit where location='".abc' won't get truncated
to '.ab' anymore

https://bugzilla.gnome.org/show_bug.cgi?id=688625
2015-03-27 17:19:02 +00:00
Luis de Bethencourt 555e0211c8 gstvalue: only unwrap string delimited with "
Don't unwrap strings that start but don't finish with a double quote. If a
string is delimited by two quotes we unescape them and any special characters
in the middle (like \" or \\). If the first character or the last character
aren't a quote we assume it's part of an unescaped string.

Moved some deserialize_string unit tests because we don't try to unwrap strings
missing that second quote anymore.

https://bugzilla.gnome.org/show_bug.cgi?id=688625
2015-03-27 17:18:23 +00:00
Thiago Santos a041d8862d baseparse: only post 'no valid frames' error if buffers were received
Otherwise baseparse will consider empty streams to be an error while
an empty stream is a valid scenario. With this patch, errors would
only be emitted if the parser received data but wasn't able to
produce any output from it.

This change is only for push-mode operation as in pull mode an
empty file can be considered an error for the one driving the
pipeline

Includes a unit test for it

https://bugzilla.gnome.org/show_bug.cgi?id=733171
2015-03-26 12:25:57 -03:00
Jose Antonio Santos Cadenas 3e8e0a7065 tee: Add allow-not-linked property
This property avoids not linked error when all the pads are unlinked
or when there are no source pads. This is useful in dynamic pipelines
where it can happen that for a short time there are no pads at all or
all downstream pads are not linked yet.

https://bugzilla.gnome.org/show_bug.cgi?id=746436
2015-03-26 10:46:26 +01:00
Thiago Santos 150e8a5c97 tests: input-selector: new tests for EOS handling
3 new tests:

1) Tests that a stream that is empty (just an EOS event)
   on inactive pad doesn't get through and tamper
   with the active pad that still has data

2) Tests that a stream that is shorter than the active one
   (pushes EOS earlier) doesn't has its EOS pushed

3) Tests that switching to an inactive stream that has received
   EOS will make input-selector push EOS

https://bugzilla.gnome.org/show_bug.cgi?id=746518
2015-03-24 09:13:57 -03:00
Thiago Santos 92d2351b2e tests: selector: remove weird semicolons at the end of test functions
Even though it works, it is not needed and seems more natural
to not have semicolons at the end of function declarations

https://bugzilla.gnome.org/show_bug.cgi?id=746518
2015-03-24 08:22:26 -03:00
Wim Taymans bc282da83c segment: remove the bounds check from _to_running_time_full()
Do not do any checks for the start/stop in the new
gst_segment_to_running_time_full() method, we can let this be done by
the more capable gst_segment_clip() method. This allows us to remove the
enum of results and only return the sign of the calculated running-time.
We need to put the old clipping checks in the old
gst_segment_to_running_time() still because they work slightly
differently than the _clip methods.

See https://bugzilla.gnome.org/show_bug.cgi?id=740575
2015-03-20 09:00:47 +01:00
Wim Taymans edf484ab6b segment: add option to disable clipping
Add a clip argument to gst_segment_to_running_time_full() to disable
the checks against the segment boundaries. This makes it possible to
generate an extrapolated running-time for timestamps outside of the
segment.

See https://bugzilla.gnome.org/show_bug.cgi?id=740575
2015-03-19 17:36:36 +01:00
Mathieu Duponchelle 5d96658874 tools: remove outdated completion script
+ Remove the associated test

https://bugzilla.gnome.org/show_bug.cgi?id=744877#c21
2015-03-18 14:16:48 +01:00
Wim Taymans 8c8b3818e4 segment: add helper to get negative running-time
Add a helper method to get a running-time with a little more features
such as detecting if the value was before or after the segment and
negative running-time.

API: gst_segment_to_running_time_full()

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=740575
2015-03-18 11:35:42 +01:00
Wim Taymans 6e67ad7675 segment: fix offset handling with non 0 start
The position in the segment is relative to the start but the offset
isn't, so subtract the start from the position when setting the offset.
Add unit test for this as well.
2015-03-18 11:35:42 +01:00
Tim-Philipp Müller b1b718c6d0 tests: add unit test for gst_adapter_take_buffer_list() 2015-03-14 17:23:03 +00:00
Tim-Philipp Müller f7eeed3447 Add new streamiddemux binaries to .gitignore 2015-03-14 16:05:57 +00:00
Nicolas Dufresne c740bad1a0 bufferpool: Don't stop the pool in set_config()
Don't stop the pool in set_config(). Instead, let the controlling
element manage it. Most of the time, when an active pool is being
configured is because the caps didn't change.

https://bugzilla.gnome.org/show_bug.cgi?id=745377
2015-03-14 12:00:53 +00:00
Thiago Santos 96eaeadc0f gstbuffer: add gst_buffer_copy_deep
A variant of gst_buffer_copy that forces the underlying memory
to be copied.

This is added to avoid adding an extra reference to a GstMemory
that might belong to a bufferpool that is trying to be drained.
The use case is when the buffer copying is done to release the
old buffer and all its resources.

https://bugzilla.gnome.org/show_bug.cgi?id=745287
2015-03-13 18:37:04 +00:00
HoonHee Lee fadabe8b78 streamiddemux: Add streamiddemux element
Demultiplex a stream to multiple source pads based on the stream ids from the
stream-start events. This basically reverses the behaviour of funnel.

https://bugzilla.gnome.org/show_bug.cgi?id=707605
2015-03-12 14:42:18 +00:00
Tim-Philipp Müller 0c3f1850be tests: add some basic unit tests for our printf stuff
To test new %I32 support.

https://bugzilla.gnome.org/show_bug.cgi?id=744281
2015-03-12 13:29:05 +00:00
hoonhee.lee 8ce1f4d470 funnel: handle GAP event to forwards sticky events into downstream
If no data is coming and funnel receive GAP event, need to forwards sticky events
into downstream if it needs.

https://bugzilla.gnome.org/show_bug.cgi?id=738202
2015-03-10 16:15:35 -04:00
Tim-Philipp Müller bd7d1c8b61 Fix double semicolons 2015-03-10 09:24:28 +00:00
Edward Hervey 075def0f97 gstvalue: Make sure GST_FOURCC_ARGS produces printable characters
Some systems will crash if we use non-printable characters in print/debug
statements.

Make sure that GST_FOURCC_ARGS never does that

https://bugzilla.gnome.org/show_bug.cgi?id=745144
2015-02-26 07:49:05 +01:00
Olivier Crête f9baff11c8 Revert "element: set pads need-parent flag to false when removing"
This reverts commit 1911554cff.

This breaks the functionality of GST_PAD_FLAG_NEED_PARENT, the reason for this
flag is that if a pad is removed from a running element, you don't want
functions (such as chain or event) to be called on the pad without a parent set.
This can happen if you remove a request or sometimes pad from a running element.

I don't see the code that caused this in tsdemux, but if it needs to unset
the flag on remove, it should do it itself and then make sure that the parent
exists in any pad function.
2015-02-20 16:22:23 -05:00
Sebastian Dröge c102d02bd0 queue: Add unit test for buffer list and time level handling 2015-02-18 11:03:08 +02:00
Tim-Philipp Müller 4a757e651a tests: bus: add unit test for async message delivery 2015-02-17 09:52:14 +00:00
Jan Schmidt bbae71133d tests: Fix clock regression test
Fix up the values the test is checking for now that
the clock regression returns parameters starting from
the end of the regression range.
2015-02-07 05:16:23 +11:00
Sebastian Dröge 40a0275298 uri: Fix indention 2015-01-22 23:10:06 +02:00
David Waring d20fa132c1 uri: Fix new URI parsing tests based on GNet's
https://bugzilla.gnome.org/show_bug.cgi?id=743195
2015-01-22 22:08:12 +01:00
Sebastian Dröge 0637703fe7 uri: Add parsing unit test based on GNet's
Plus some new URIs to parse.

https://git.gnome.org/browse/archive/gnet/plain/tests/check/gnet/gneturi.c

https://bugzilla.gnome.org/show_bug.cgi?id=743195
2015-01-22 22:07:46 +01:00
Jan Schmidt 81d613694c clock: Improve slaving regression.
Add domain checks for the input values, and a variable precision
calculation that loops if necessary to ensure we never overflow
accumulators and then silently produce garbage results.

Make the (non-public) linear regression function available for
unit testing by putting it in a separate source file the test
can include. Add a unit test that the new regression function
produces sensible results for several inputs taken from real-world
captures.
2015-01-21 22:27:18 +11:00
Jan Schmidt f9f45834e7 netclock: Add simple network clock server and client examples 2015-01-21 22:27:18 +11:00
Sebastian Dröge 1f6d5d3ff5 structure/caps: Add gst_{structure,caps}_filter_and_map_in_place()
https://bugzilla.gnome.org/show_bug.cgi?id=739765
2014-12-16 18:22:46 +01:00
Sebastian Dröge 6925fa1b7c structure: Add simple unit test for foreach() and map_in_place() 2014-12-16 18:22:46 +01:00
Sebastian Dröge bc11a1b79d caps: Add gst_caps_foreach() and gst_caps_map_in_place()
https://bugzilla.gnome.org/show_bug.cgi?id=739765
2014-12-16 18:22:46 +01:00
Nicolas Dufresne a8d6653037 bufferpool: Don't check size in config validation
Pools are allowed to change the size in order to adapt padding. So
don't check the size. Normally pool will change the size without
failing set_config(), but it they endup changing the size before
the validate method may fail on a false positive.

https://bugzilla.gnome.org/show_bug.cgi?id=741420
2014-12-16 10:20:37 -05:00
Wim Taymans 5cf630697c structure: don't overread input when searching for "
When searching for the string terminator don't read past the ending
0-byte when escaping characters.
Add unit test for various escaping cases.
2014-11-20 13:37:08 +01:00
Haakon Sporsheim 6c079367f1 task: Fix pause/stop race condition
If a task thread is calling pause on it self and the
controlling/"main" thread stops the task, it could end in a race
where gst_task_func loops and then checks for paused after the
controlling thread just changed the task state to stopped.
Hence the task would actually call func again even though it was
both paused and stopped.

https://bugzilla.gnome.org/show_bug.cgi?id=740001
2014-11-12 12:00:48 +01:00
Sebastian Dröge d600fc48f8 gstobject: Don't check booleans for equality in the unit test
Every value other than 0/FALSE is TRUE, == TRUE will only check for 1.
2014-11-10 10:03:57 +01:00
Jan Alexander Steffens (heftig) 5a930aa642 gstobject: Add gst_object_has_parent()
Adds gst_object_has_parent, which works like gst_object_has_ancestor
but does not ascend further.

API: gst_object_has_parent()
2014-11-10 10:03:57 +01:00
Sebastian Dröge 9606e04895 capsfilter: Add an optional delayed caps change mode
In this mode we accept previously set filter caps until
upstream renegotiates to something that is compatible
to the current filter caps.

This allows dynamic caps changes in the pipeline even
if there is a queue between any conversion element
and the capsfilter. Without this we would get not-negotiated
errors if timing is bad.

https://bugzilla.gnome.org/show_bug.cgi?id=739002
2014-11-03 08:09:21 +01:00
Tim-Philipp Müller 5b17a69079 tests: refactor tools check a little
Use an array of constant strings so if arguments get
removed from it they are not considered leaked, and
valgrind is happy. Still some stuff leaking in GLib
though.
2014-10-31 16:10:01 +00:00
Tim-Philipp Müller 34abd91e90 tests: fix out-of-bounds memory access in bytereader unit test
Caught by -fsanitize=address / libasan.

https://bugzilla.gnome.org/show_bug.cgi?id=739431
2014-10-30 23:16:54 +00:00
Tim-Philipp Müller 82abf56e8e tests: fdsrc: don't ignore return value of write()
Causes compiler warnings on some systems.
2014-10-28 09:28:28 +00:00
Tim-Philipp Müller caed34f45f tests: fix fdsrc test corner case
Make pipe socket non-blocking, so we don't
end up being blocked in a write on the pipe
while the src is eos and not reading data
any more, and thus we never unblock and never
notice that we're done. This would happen
quite reliably on the rpi.
2014-10-28 00:10:26 +00:00
Linus Svensson bf8e36a768 tests: Add a test for removing a bus watch
https://bugzilla.gnome.org/show_bug.cgi?id=735195
2014-10-14 10:31:27 +02:00
Linus Svensson c8b512d2f0 bus: Add a function to remove a bus watch
If a bus watch is added to the non default main context it's not
possible to remove it using g_source_remove().

Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=735195
2014-10-14 10:31:18 +02:00
Matej Knopp c497f629bc tests: baseparse: set_sink_caps vfunc should't take ownership of the caps
https://bugzilla.gnome.org/show_bug.cgi?id=737762
2014-10-03 12:35:40 +01:00
David Waring 54c5f1855c GstUri: Add GstUri miniobject to handle URIs in an RFC 3986 compliant fashion
https://bugzilla.gnome.org/show_bug.cgi?id=725221
2014-09-29 12:19:05 +03:00
Stefan Sauer d5518edf12 fixme: bump leftover 0.11 fixme comments 2014-09-25 21:27:03 +02:00
Tim-Philipp Müller 26be9f0581 tests: fix caps leak in baseparse unit test 2014-09-25 16:21:51 +01:00
Jonas Holmberg 4a304a7774 flowcombiner: add a gst_flow_combiner_clear() method
https://bugzilla.gnome.org/show_bug.cgi?id=737359

API: gst_flow_combiner_clear()
2014-09-25 15:40:42 +01:00
Wim Taymans 7e33f52961 tests: add flush-stop on inactive pad test
Check that pushing flush-stop on an inactive pad does not clear the
flushing flag.
2014-09-02 12:04:15 +02:00
Linus Svensson ae74a1a83a tests: add test that triggers deadlock in state change of queue
When receiving FLASH_STOP in a state transition to READY, a queue
element can end up with an active task that will never end.

https://bugzilla.gnome.org/show_bug.cgi?id=734688
2014-08-23 12:03:38 +01:00
Tim-Philipp Müller 86d7a597f0 bytereader: add gst_byte_reader_peek_sub_reader() and _get_sub_reader()
Adds API to get or peek a sub-reader of a certain size from
a given byte reader. This is useful when parsing nested chunks,
one can easily get a byte reader for a sub-chunk and make
sure one never reads beyond the sub-chunk boundary.

API: gst_byte_reader_peek_sub_reader()
API: gst_byte_reader_get_sub_reader()
2014-08-15 10:03:26 +01:00
Sebastian Dröge 96f0544cbd concat: Add unit tests for concat element 2014-08-12 15:39:09 +03:00
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
Tim-Philipp Müller afffd9497f examples: controller: fix typo in comments 2014-08-07 14:54:37 +01: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 f8323b17fb bytereader: add gst_byte_reader_masked_scan_uint32_peek
Adds gst_byte_reader_masked_scan_uint32_peek just like
GstAdapter has a _peek and non _peek version

Upgraded tests to check that the returned value is correct in the
_peek version

API: gst_byte_reader_masked_scan_uint32_peek

https://bugzilla.gnome.org/show_bug.cgi?id=728356
2014-07-24 17:00:09 -03: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
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 4620048e01 benchmarks: capsnego: add --loops command line option
And default to 50 loops.
2014-06-21 01:10:22 +01:00
Tim-Philipp Müller 4e12c4528f benchmark: capsnego: use GOptionContext for option parsing 2014-06-21 01:10:22 +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 a1169f6c20 poolstress: print speedup 2014-01-30 12:54:44 +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
Stefan Sauer 5ad01ab77d poolstress: code cleanups
Add a few comments. Tell in the results, which number are from which test.
2014-01-29 20:37:34 +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
Reynaldo H. Verdejo Pinochet 94a3394edf core: Fix max DEBUG_LEVEL incongruence on 5 vs 9
In the docs and the autocompletion logic the maximum
value jumped incongruently between 5 and 9.
2013-10-10 13:06:14 -07: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