Commit graph

754 commits

Author SHA1 Message Date
Wim Taymans
60382cd994 tests: remove segment accumulation checks
Remove the checks because there is no more segment accumulation.
2012-07-27 12:17:28 +02:00
Tim-Philipp Müller
3231ea6204 taglist: gst_tag_list_get_buffer*() => gst_tag_list_get_sample*()
Image tags and other tags are now of GstSample type.
2012-07-26 15:51:10 +01:00
Mark Nauwelaerts
9166014007 tests: gstbuffer: add tests for some mulitple map combinations 2012-07-19 13:51:52 +02:00
Mark Nauwelaerts
8620352efc tests: gstbuffer: extend buffer copy test 2012-07-19 13:13:33 +02:00
Edward Hervey
028b9a8dbb check: Avoid deadlock
Queries will be sent when pipeline goes down to NULL, which would
result in the probe being called ... but can't take the lock.
2012-07-18 12:07:26 +02:00
Stefan Sauer
840f905c2c bin: aggregate durations like in adder
Stop querying the duration once an element return unknown and return unknown
as a final result. This avoid eventually cutting off a stream too early.
Add a tests to docuement the behavior.
2012-07-16 20:54:17 +02:00
Wim Taymans
02eebca16b pad: fix test raciness
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=679506
2012-07-13 09:43:59 +02:00
Tim-Philipp Müller
443075e5a4 tests: fix toc unit tests
Meant to check subsubentry, not subentry.
2012-07-09 20:11:32 +01:00
Tim-Philipp Müller
5b133bbdcf tests: minor toc test clean-up 2012-07-09 20:11:32 +01:00
Tim-Philipp Müller
c427d8caa8 tests: turn toc check macros into proper functions
So we can see the line number of the check that fails.
2012-07-09 20:11:32 +01:00
Edward Hervey
e219ede527 check: Update tests for new STREAM_START message 2012-07-09 20:31:45 +02:00
Edward Hervey
e2326ac506 check: Ensure STREAM_START message is posted
A STREAM_START message is posted if and only if all sinks in the
bin/pipeline received the STREAM_START event
2012-07-09 20:31:45 +02:00
Edward Hervey
d14f523d4a check: Unit test for EOS message
Make sure we get the aggregated message if and only if all sinks
received an EOS event
2012-07-09 20:31:45 +02:00
Wim Taymans
10f3adfd9d clock: make abstract
Make the GstClock type abstract.
Fix a horrible hack in the clock unit test.
2012-07-09 16:28:22 +02:00
Tim-Philipp Müller
1ba0d6f6f6 toc: add gst_toc_dump() function for debugging
API: gst_toc_dump()
2012-07-09 13:12:27 +01:00
Tim-Philipp Müller
c0c79188ca bus, clock: make sure these never have a floating ref
Clear the initial floating ref in the init function for
busses and clocks. These objects can be set on multiple
elements, so there's no clear parent-child relationship
here. Ideally we'd just not make them derive from
GInitiallyUnowned at all, but since we want to keep
using GstObject features for debugging, we'll just do
it like this.

This should also fix some problems with bindings, which
seem to get confused when they get floating refs from
non-constructor functions (or functions annotated to
have a 'transfer full' return type). This works now:

from gi.repository import GObject, Gst

GObject.threads_init()
Gst.init(None)

pipeline=Gst.Pipeline()
bus = pipeline.get_bus()
pipeline.set_state(Gst.State.NULL)
del pipeline;

https://bugzilla.gnome.org/show_bug.cgi?id=679286
https://bugzilla.gnome.org/show_bug.cgi?id=657202
2012-07-09 13:09:45 +01:00
Tim-Philipp Müller
52c0e856f7 tests: add more tests for datetime value serialisation/deserialisation
Esp. of partial datetimes.
2012-07-07 23:13:20 +01:00
Tim-Philipp Müller
93a2b6e9b3 value: use datetime serialise/deserialise functions for datetimes
This re-uses existing code and makes sure we properly serialise
and deserialise datetimes where not all fields are set (thus
fixing some warnings when serialising such datetimes).
2012-07-07 22:46:00 +01:00
Tim-Philipp Müller
8ac900a515 tests: fix toc unit test build by removing toc query stuff there too 2012-07-05 12:27:14 +01:00
Sebastian Dröge
dfd9b60221 toc: Make structures opaque and clean up function names and fields a bit 2012-07-05 12:29:02 +02:00
Wim Taymans
3b16efa1d1 miniobject: add lock functionality to GstMiniObject
Move the locking methods from GstMemory to GstMiniObject.
Add a miniobject flag to enable LOCKABLE objects. LOCKABLE objects can
use the lock/unlock API to control the access to the object.
Add a minobject flag that allows you to lock an object in readonly mode.
Modify the _is_writable() method to check the shared counter for LOCKABLE
objects. This allows us to control writability separately from the refcount for
LOCKABLE objects.
2012-07-05 11:19:16 +02:00
Mark Nauwelaerts
0f69f9e44a tests: gstbuffer: extend buffer copy test
... to check for independence of copied buffer.
2012-07-05 11:19:15 +02:00
Tim-Philipp Müller
3329f3f4e4 uri: there are valid URI protocols with only two letters, like fd://
We added a minimum length of three letters originally so we would
fail to recognise DOS/Windows-style filenames as valid URIs (as we
should). Two should be just fine as well.
2012-07-04 17:39:52 +01:00
Tim-Philipp Müller
0bbeab52cc tests: make checks for from/to_g_date_time() actually work properly 2012-07-04 10:23:06 +01:00
Joshua M. Doe
ba6fad9302 datetime: add conversion to/from GDateTime
Exposes existing constructor.

API: gst_date_time_to_g_date_time()
API: gst_date_time_new_from_g_date_time()

https://bugzilla.gnome.org/show_bug.cgi?id=679080
2012-07-04 10:22:41 +01:00
Raimo Järvi
40e68e7760 tests: fix build of datetime unit test in Windows
Also include config.h for all the #ifdef HAVE_XYZ.

https://bugzilla.gnome.org/show_bug.cgi?id=676935
2012-07-02 11:44:31 +01:00
Tim-Philipp Müller
2506dc5fe2 tests: test datetime deserialisation a bit more 2012-06-27 23:01:13 +01:00
Tim-Philipp Müller
d6e6391518 tests: fix bus leak in GstBin test_state_change_skip test
Still not valgrind clean though.
2012-06-27 20:52:52 +01:00
Tim-Philipp Müller
f95996d97f tests: add some datetime serialisation/deserialisation tests
https://bugzilla.gnome.org/show_bug.cgi?id=678031
2012-06-27 13:51:42 +01:00
Tim-Philipp Müller
2c532aa821 toc: put toc directly into event/message/query structure
Now that TOCs are refcounted and have a GType, we can just
stuff a ref of the TOC directly into the various toc
event/message/query structures and get rid of lots of
cracktastic GstStructure <-> GstToc serialisation and
deserialisation code. We lose some TOC sanity checking
in the process, but that should really be done when
it's being created anyway.
2012-06-26 20:43:50 +01:00
Tim-Philipp Müller
03ac16c1d8 tocsetter: clean up and update API for refcounted TOCs
Let's keep it simple for now:

gst_toc_setter_reset_toc() -> gst_toc_setter_reset()
gst_toc_setter_get_toc_copy() -> removed
gst_toc_setter_get_toc() -> returns a ref now
gst_toc_setter_get_toc_entry_copy() -> removed,
    use TOC functions instead
gst_toc_setter_get_toc_entry() -> removed,
    use TOC functions instead
gst_toc_setter_add_toc_entry() -> removed,
    to avoid problems with (refcount-dependent)
    writability of TOC; use TOC functions instead
2012-06-25 20:18:32 +01:00
Tim-Philipp Müller
8590be2861 tocsetter, gst-launch, tests: update for GstToc API changes 2012-06-24 20:15:19 +01:00
Tim-Philipp Müller
bc28ebf08d sample: add compare function for GstSample
Should make gst_tag_list_is_equal() work properly with image tags.

https://bugzilla.gnome.org/show_bug.cgi?id=672637
2012-06-23 16:59:10 +01:00
Tim-Philipp Müller
e4b6bcb7b9 tests: add unit test for gst_element_make_from_uri()
https://bugzilla.gnome.org/show_bug.cgi?id=645467
2012-06-23 14:43:26 +01:00
Wim Taymans
7da1d23a9b info: add destroy notify to gst_debug_add_log_function() 2012-06-20 13:28:08 +02:00
Wim Taymans
6efb5c9b6b bus: add GDestroyNotify to set_sync_handler() 2012-06-20 12:29:35 +02:00
Wim Taymans
76e8b2ecda task: add GDestroyNotify to _new
Add a GDestroyNotify to the user_data we pass to gst_task_new()
Change gst_pad_start_task() to also take the notify
2012-06-20 10:31:49 +02:00
Wim Taymans
d7d5306009 clock: remove _full version
Rename gst_clock_id_wait_async_full() to gst_clock_id_wait_async()
and remove the old gst_clock_id_wait_async() version.
2012-06-20 09:58:14 +02:00
Wim Taymans
a1c5b00e72 memory: make GstMemory a miniobject 2012-06-14 16:34:28 +02:00
Tim-Philipp Müller
b45a44ef27 tests: add some basic unit tests for partial date time fields 2012-06-13 00:21:32 +01:00
Stefan Sauer
19e5fc54b7 childproxy: use GstChildProxy instead of GObject on the public api
Fix usage and also cleanup gst_object api use on gobjects.
2012-06-11 18:25:18 +02:00
Edward Hervey
502ee3d092 check: Add a test for GST_READ_* macros 2012-06-08 14:58:00 +02:00
Wim Taymans
11edb59462 tests: fix unit test after event change
Someone forgot to run make check before pushing...
2012-06-06 15:45:11 +02:00
Wim Taymans
c10d39a804 event: add name to sticky_multi events
The name of the event is used to store multiple sticky events of a certain type
on a pad.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=676859
2012-06-06 12:52:09 +02:00
Tim-Philipp Müller
1f008928ae tests: add unit test for tag list writability 2012-06-05 15:05:07 +01:00
Tim-Philipp Müller
1f8e6b4fa5 gst_tag_list_free -> gst_tag_list_unref 2012-06-05 15:05:07 +01:00
Wim Taymans
c4ae921ba6 tests: fix unit test
Before we can change the caps on a sinkpad with fixed caps we need to unfix the
pad caps.
2012-06-05 09:21:10 +02:00
Tim-Philipp Müller
a88dcc2ab6 taglist: make GstTagList a GstMiniObject
Which adds refcounting support, and other things.
2012-05-28 00:05:16 +01:00
Wim Taymans
e5f64e7a3c bin: port unit test to 0.11 2012-05-22 09:36:52 +02:00
Wim Taymans
146ab8a702 bin: try harder to avoid state changes in wrong direction
When the bin does an upward state change, try to avoid doing a downward state
change on the child and vice versa.
Add some more unit tests for this fix.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=621833
2012-05-21 11:58:28 +02:00