Commit graph

2402 commits

Author SHA1 Message Date
Stefan Sauer 7801a46e5f benchmarks: update the tracer benchmark and add a shell benchmark 2016-01-16 13:31:51 +01:00
Stefan Sauer 89ee5d948d tracer: add a GFlag for the tracer scope
Port all tracers. Add the GST_USE_UNSTABLE_API flag to the internal CFLAGS so
that we don't have to specify this for gir, docs, mkenum, ...
2016-01-16 13:31:51 +01:00
Stefan Sauer 10b78d872b tracerrecord: add a log record class
We use this class to register tracer log entry metadata and build a log
template. With the log template we can serialize log data very efficiently.
This also simplifies the logging code, since that is now a simple varargs
function that is not exposing the implementation details.

Add docs for the new class and basic tests.

Remove the previous log handler.

Fixes #760267
2016-01-15 21:54:01 +01:00
Stefan Sauer fff9680c93 benchmark: fix copy'n'past of the file-description comment 2016-01-08 23:35:53 +01:00
Stefan Sauer bb40a18413 benchmark: add a benchmark for bgo/760267
Big suprise - GstStructure is faster than GVariant.
2016-01-08 23:13:29 +01:00
Tim-Philipp Müller 4febebb962 info: add buffer list support to GST_PTR_FORMAT 2016-01-08 19:25:24 +00:00
Aleksander Wabik 90318900a1 tests: queue2: add test for fill level arithmetic overflow
https://bugzilla.gnome.org/show_bug.cgi?id=755971
2016-01-06 20:00:46 +00:00
Tim-Philipp Müller 4e437a564d tests: value: test buffer serialisation/deserialisation more thoroughly
Tests data/strings as well, not just that we received
something non-NULL back.
2015-12-31 12:21:12 +00:00
Thiago Santos 1751835838 tests: funnel: remove state change from stress tests
Changing states up and down while buffers are being pushed is not
a valid use case. If a pad is deactivated and reactivated during
a buffer push it is racy with the check of pushed sticky events
and the actual chainfunction call. As it might call the chain
without noticing the peer pad lost its previous sticky events.

https://bugzilla.gnome.org/show_bug.cgi?id=758340
2015-12-04 17:26:02 -03:00
Heinrich Fink 87691d0280 systemclock: Add test for gst_clock_get_resolution
In a series of time measurements, the diff between now and previous
timestamps is either 0 or at least as long as get_resolution returned.

https://bugzilla.gnome.org/show_bug.cgi?id=758012
2015-11-13 09:23:44 +01:00
Miguel París Díaz b09e9592ec pad: test for checking the order of the probe calls
https://bugzilla.gnome.org/show_bug.cgi?id=757197
2015-11-11 14:45:19 +01:00
Philippe Normand 8ae8b2723d queue2: add overrun signal
Notifies that the queue2 is full, same as queue does

https://bugzilla.gnome.org/show_bug.cgi?id=733959
2015-11-06 12:32:10 -03:00
Thiago Santos 533d0ac7f1 pad: tests for accept-caps handling with proxy pads
Adds 3 new tests for testing accept-caps behavior with
proxy-caps pads.

1) A scenario where there is no proxy. The caps should be compared to the
template caps of the pad

2) A scenario where there is a compatible pad. The caps should be compared
to the proxied pad caps (and also with the template)

3) A scenario where there is an incompatible proxy pad. No caps should be
possible at all.

https://bugzilla.gnome.org/show_bug.cgi?id=754112
2015-11-06 11:11:11 -03:00
Florin Apostol 63fa09fc4d uri: tests: added unit test for streams ending in .. without following /
https://bugzilla.gnome.org/show_bug.cgi?id=757065
2015-10-24 20:32:53 +03:00
Vivia Nikolaidou 6ff8fdfc47 segment: Add _full variants of all stream/running_time from/to segment position functions
See formula clarifications in design docs for calculation details.

https://bugzilla.gnome.org/show_bug.cgi?id=756564
2015-10-23 15:50:38 +03:00
Vivia Nikolaidou 45f0f354ac segment: Correct stream_time calc for negative applied rate
Updated gst_segment_position_from_stream_time and gst_segment_to_stream_time to reflect correct calculations for the case when the applied rate is negative.

Pasting from design docs:

===============================
Stream time is calculated using the buffer times and the preceding SEGMENT
event as follows:

    stream_time = (B.timestamp - S.start) * ABS (S.applied_rate) + S.time

For negative rates, B.timestamp will go backwards from S.stop to S.start,
making the stream time go backwards.
===============================

Therefore, the calculation for applied_rate < 0 should be:

    stream_time = (S.stop - B.timestamp) * ABS (S.applied_rate) + S.time

and the reverse:

    B.timestamp = S.stop - (stream_time - S.time) / ABS (S.applied_rate)

https://bugzilla.gnome.org/show_bug.cgi?id=756810
2015-10-20 10:43:07 +03:00
Sebastian Dröge f7f8312812 segment: Convert function to macro in unit test to get proper line numbers on failures
https://bugzilla.gnome.org/show_bug.cgi?id=748316
2015-10-14 16:59:04 +03:00
Stefan Sauer 5b3cbbc494 tests: fix the tag test
The previous change (see bgo #756069) was causing us to free the same pointer
multiple times. If we actually get a sample back, the test fails, no need to
free anything in that case.
2015-10-05 21:29:49 +02:00
Vineeth TM 456ef2aa1d tests/gst-launch: Fix sample memory leak
When sample is got using gst_tag_list_get_sample_index, it should
be free'd.

https://bugzilla.gnome.org/show_bug.cgi?id=756069
2015-10-05 12:08:30 +01:00
Vineeth TM 215cfcf993 gstreamer: Fix memory leaks when context parse fails
When g_option_context_parse fails, context and error variables are not getting free'd
which results in memory leaks. Free'ing the same.

And replacing g_error_free with g_clear_error, which checks if the error being passed
is not NULL and sets the variable to NULL on free'ing.

https://bugzilla.gnome.org/show_bug.cgi?id=753851
2015-10-02 17:31:11 +03:00
Stefan Sauer 8487133114 controlpoint: change the padding to be of arch-independent size
The default padding I introduced in d4f81fb4e6 is
actually only 4 pointers and on 32bit platforms already smaller than the union.
Replace it with a fixed 64byte padding. Don't add the normal padding for now.

Fixes #755822
2015-09-30 17:31:58 +02:00
Stefan Sauer 3037172f48 tests: fix the manual tests by setting the right env-vars 2015-09-28 16:46:14 +02:00
Stefan Sauer d4f81fb4e6 controller: add the missing abi padding
While this technically is an abi break, we decided to do this:
1) the struct is documented to be internal
2) the struct is alloced and freed inside the library
3) there are no public methods that receive or return instances
4) the only code known to use this struct are classes containd here
2015-09-28 16:23:41 +02:00
Matthew Waters d5ded15889 bin: implement context propagation when adding elements
When adding an element to a bin we need to propagate the GstContext's
to/from the element.

This moves the GstContext list from GstBin to GstElement and adds
convenience functions to get the currently set list of GstContext's.

This does not deal with the collection of GstContext's propagated
using GST_CONTEXT_QUERY.  Element subclasses are advised to call
gst_element_set_context if they need to propagate GstContext's
received from the context query.

https://bugzilla.gnome.org/show_bug.cgi?id=705579
2015-09-28 18:21:59 +10:00
Stefan Sauer 6e7915d5cd tests/examples: add a demo for the interpolation control source modes
This is in preparation for new modes to be added. In particullar it demonstrates
how the cubic splines overshoot the range.
2015-09-27 11:45:29 +02:00
Vivia Nikolaidou 44ba1565d9 segment: Replaced gst_segment_to_position with gst_segment_position_from_running_time
gst_segment_to_position might cause confusion, especially with the addition of
gst_segment_position_from_stream_time . Deprecated gst_segment_to_position
now, and replaced it with gst_segment_position_from_running_time.

Also added unit tests.
2015-09-26 00:00:08 +02:00
Vivia Nikolaidou 572c7c6b9a segment: Added unit tests for gst_segment_position_from_stream_time 2015-09-26 00:00:03 +02:00
Sebastian Dröge 697093c7d4 uri: Add test for correct absolute URI handling in gst_uri_from_string_with_base()
If the second parameter is an absolute URI, the base should have no effect and
the second parameter should be returned again.

https://bugzilla.gnome.org/show_bug.cgi?id=755134
2015-09-25 23:54:27 +02:00
Stian Selnes 2c60b7eb1f funnel: Fix racy state change
Iterator may need to be resynced, for instance if pads are released
during state change.

got_eos should be protected by the object lock of the element, not of
the pad, as is the case throughout the rest of the funnel code.

https://bugzilla.gnome.org/show_bug.cgi?id=755343
2015-09-24 12:14:57 +02:00
Havard Graff 64a152439c harness: don't crash when adding a sink-harness without h->sinkpad
https://bugzilla.gnome.org/show_bug.cgi?id=755511
2015-09-24 11:07:24 +01:00
Vineeth TM fcdfcbd618 downloadbuffer, benchmarks: fix error leaks in failure code paths
https://bugzilla.gnome.org/show_bug.cgi?id=755019
2015-09-15 18:21:58 +01:00
Stian Selnes ff9a78196c harness: Fix race for gst_harness_element_ref
In order for gst_harness_new_full to be MT-safe the increase and
decrease of HARNESS_REF must be MT-safe. This allows for creating
multiple harnesses from different threads wrapping the same element.

https://bugzilla.gnome.org/show_bug.cgi?id=754661
2015-09-07 11:31:33 +01:00
Thiago Santos 8a1f05865f tests: event: fix build failure
gst/gstevent.c:250:5: error: ‘for’ loop initial declarations are only
allowed in C99 or C11 mode
2015-08-26 09:29:05 -03:00
Vivia Nikolaidou ee1bbe2f15 bin: Make sure we don't add/remove a bin to/from itself
Doing so would deadlock from trying to acquire the object lock twice

https://bugzilla.gnome.org/show_bug.cgi?id=754036
2015-08-25 10:19:44 +03:00
Nicolas Dufresne 900110c6dc basesrc-test: Fix race testing segment update
As this test is using a short sleep (GST_USECOND, which is 10ms
in microsecond), sometimes that EOS event is received before the
loop in basesrc have run _do_seek() and pushed the update segment.
To solve this issue, we wait for the initial segment (and flush it)
then we wait for the second segment before sending EOS.

https://bugzilla.gnome.org/show_bug.cgi?id=753365
2015-08-20 07:49:02 -07:00
Edward Hervey 7f0e0ff3ca gstpad: Add a new GST_PROBE_HANDLED return value for probes
In some cases, probes might want to handle the buffer/event/query
themselves and stop the data from travelling further downstream.

While this was somewhat possible with buffer/events and using
GST_PROBE_DROP, it was not applicable to queries, and would result
in the query failing.

With this new GST_PROBE_HANDLED value, the buffer/event/query will
be considered as successfully handled, will not be pushed further
and the appropriate return value (TRUE or GST_FLOW_OK) will be returned

This also allows probes to return a non-default GstFlowReturn when dealing
with buffer push. This can be done by setting the
GST_PAD_PROBE_INFO_FLOW_RETURN() field accordingly

https://bugzilla.gnome.org/show_bug.cgi?id=748643
2015-08-15 17:00:12 +02:00
Thiago Santos a1b9bb8eac tests: pad: tests for accept-caps default handling
Check if all the default 4 accept-caps possibilities are working:
subset or intersect check and query-caps or template caps comparisons.

https://bugzilla.gnome.org/show_bug.cgi?id=753623
2015-08-14 08:56:53 -03:00
Edward Hervey f2a26f2bd7 check: Rename states unit test
Makes it easier to differentiate from other modules states unit test
2015-08-14 11:10:37 +02:00
Tim-Philipp Müller 9b0287cfa4 tests: ignore new harness test binary 2015-08-11 11:09:24 +01:00
Vivia Nikolaidou 88f6334af6 datetime: accept just a time as ISO 8601 string and use today's date then
If no date and only a time is given in gst_date_time_new_from_iso8601_string(),
assume that it is "today" and try to parse the time-only string. "Today" is
assumed to be in the timezone provided by the user (if any), otherwise Z -
just like the behavior of the existing code.

https://bugzilla.gnome.org/show_bug.cgi?id=753455
2015-08-11 09:50:50 +01:00
Havard Graff 28100e0b6a harness: add _set_forwarding function
To be able to disable the slightly "magic" forwarding of the
necessary events between the harnesses.

Also introduce a new test-suite for GstHarness, that documents the
feature, and should hopefully expand into documenting most of the
features the harness possesses.

https://bugzilla.gnome.org/show_bug.cgi?id=752746
2015-08-09 16:02:37 +01:00
Tim-Philipp Müller 27fff1e0d6 tests: baseparse: fix buffer leak in unit test
Fixes make check-valgrind
2015-07-30 12:17:44 +01:00
Hyunjun Ko 9338f93494 adapter: unit test for new get_(buffer_)list 2015-07-08 18:58:52 +03:00
Hyunjun Ko eaf4153668 meta: transform_func: return FALSE if not supported or failed
https://bugzilla.gnome.org/show_bug.cgi?id=751778
2015-07-07 13:40:17 +03:00
Havard Graff ee63702d61 identity: refactor and add tests using GstHarness
Writing a test for unscheduling the gst_clock_id_wait inside the
identity element, found an invalid read, caused by removing the clock-id
when calling _unschedule instead of letting the code calling _wait remove
the clock-id after being unscheduled.

https://bugzilla.gnome.org/show_bug.cgi?id=752055
2015-07-07 13:05:34 +03:00
Vineeth T M 9d57165c33 baseparse: add reverse playback test in pull mode
add test for reverse playback in pull mode and compare
the buffers being received in sink chain to make sure
the playback is allright

https://bugzilla.gnome.org/show_bug.cgi?id=750783
2015-07-06 09:56:27 -04:00
Olivier Crête f126094dce pad: Enforce NEED_PARENT flag also for chain
The check for the presence of the parent in the presence of
the NEED_PARENT flag was missing for the chain function. Also keep
a ref on the parent in case the pad is removed mid-chain.
2015-07-03 12:56:01 -04:00
Vineeth TM 1730038953 tests: caps: fix test_intersect_flagset failure
test_intersect_flagset fails because when caps is being
created, flags and mask are being cast to uint64 while
they should be uint. This results in invalid memory access
or a segfault.

https://bugzilla.gnome.org/show_bug.cgi?id=751628
2015-06-29 13:47:31 +01:00
Thiago Santos 4dd8ad5561 tests: gstutils: fix wrong description of test element
It is a fakesink with request pads, not a source
2015-06-24 12:05:47 -03:00
Hyunjun Ko 7ecef53dbb bufferlist: add new api gst_buffer_list_copy_deep
https://bugzilla.gnome.org/show_bug.cgi?id=751420
2015-06-24 10:52:56 +02:00