Commit graph

428 commits

Author SHA1 Message Date
Thiago Santos
d407764110 gstvalue: Adds tests for datetime
Adds tests for datetime fields in gstvalue tests

Fixes #594504
2010-07-26 11:57:52 -03:00
Thiago Santos
6425bde6ec gstdatetime: Adds GstDateTime
Adds GstDateTime to represent dates + time + timezone
information.

Tests included.

API: GstDateTime
API: gst_date_time_get_day
API: gst_date_time_get_month
API: gst_date_time_get_year
API: gst_date_time_get_hour
API: gst_date_time_get_microsecond
API: gst_date_time_get_minute
API: gst_date_time_get_second
API: gst_date_time_get_time_zone_offset
API: gst_date_time_new
API: gst_date_time_new_local_time
API: gst_date_time_new_from_unix_epoch
API: gst_date_time_new_now_local_time
API: gst_date_time_new_now_utc
API: gst_date_time_ref
API: gst_date_time_unref

Fixes #594504
2010-07-26 11:57:49 -03:00
Tim-Philipp Müller
8c72758ec2 plugin: add release datetime field to GstPluginDesc and set it if GST_PACKAGE_RELEASE_DATETIME is defined
This is a string describing a date and/or date/time in a simple subset of
the ISO-8601 format, namely either "YYYY-MM-DD" or "YYYY-MM-DDTHH:MMZ" (with
'T' the date/time separator and the 'Z' indicating UTC).

The main purpose of this field is to keep track of plugin and element versions
on an absolute timeline, so it's possible to determine which one is newer when
comparing two date time numbers. This will allow us to express 'replaces'-type
relationships betweeen plugins and element factories in future, even across
different modules and plugin merges or splits (source module version numbers
aren't particularly useful here, since they can only meaningfully be compared
within the same module). It also allows applications and libraries to reliably
check that a plugin is recent enough without making assumptions about modules
or module versions.

We use a string here to keep things simple and clear, esp. on the build system
side of things.

https://bugzilla.gnome.org/show_bug.cgi?id=623040
2010-07-23 17:00:56 +01:00
Shixin Zeng
f6b0200026 tests: make *_get_type() in tests thread safe
Even if it shouldn't be needed here. See #623491.
2010-07-21 21:08:32 +01:00
Tim-Philipp Müller
c082281d28 checks: add unit test for recent taglist merge_strings_with_comma fix
See #624113.
2010-07-11 19:00:54 +01:00
Tim-Philipp Müller
e688f6fb2b 0.10.29.4 pre-release
Also bump libtool versions now (which I meant to do for the first
pre-release but forgot).
2010-07-06 23:52:04 +01:00
Tim-Philipp Müller
a877aefebd checks: rewrite gsttagsetter test to use fewer g_usleep()
Something about that seems to interact badly with some schedulers,
so do things differently.

Fixes #623469.
2010-07-06 11:16:17 +01:00
Alessandro Decina
e688979169 tests: remove ABI checks for GstClockEntry. 2010-07-06 10:46:42 +02:00
Alessandro Decina
819780acf7 clock: use the new gst_clock_id_wait_async_full.
Use the new gst_clock_id_wait_async_full in gst_clock_set_master.
Also add some tests.
2010-07-06 10:46:42 +02:00
Tim-Philipp Müller
9db5a93ed8 check: skip silly test that segfaults when in a CK_FORK=no environment
See #623469.
2010-07-03 16:40:43 +01:00
Tim-Philipp Müller
95a520be76 checks: run tests calling gst_deinit() last so things work with CK_FORK=no
Because gst_init() will fail once gst_deinit() has been called.

See #623469.
2010-07-03 14:11:38 +01:00
Tim-Philipp Müller
9b1bf88d7d checks: don't assume element factory is not loaded yet
It may already be loaded if check is being run with CK_FORK=no.

See #623469.
2010-07-03 14:11:32 +01:00
Edward Hervey
70d1f1f177 gstcaps: Make sure _normalize() is applied on all structures.
We need to use gst_caps_get_size() in the loop counter since some
structures could be added while iterating.

Fixes #623301
2010-07-01 18:17:40 +02:00
Sebastian Dröge
ea82d2d72a tests: Remove GstXML tests 2010-06-25 18:25:40 +02:00
Edward Hervey
3df54c45bf Revert "gstpad: Return pad template in get_caps if pad is not negotiable"
This reverts commit 7460321a60.

crack
2010-06-15 11:54:19 +02:00
Edward Hervey
7460321a60 gstpad: Return pad template in get_caps if pad is not negotiable
https://bugzilla.gnome.org/show_bug.cgi?id=618644
2010-06-14 17:08:14 +02:00
Sebastian Dröge
121a0f6f7b caps: Don't use invalid fraction range in the unit test 2010-06-14 15:45:11 +02:00
Sebastian Dröge
4a3dde96e7 value: Add test for deserializing fourccs 2010-06-12 08:07:46 +02:00
Martin Bisson
ab0763f0e8 value: Fixed serialization for short fourccs.
"Y16 " and "Y8  " were not displayed properly because the space
character is not alnum.  A unit test is also included.

Fixes bug #621282.
2010-06-12 08:07:34 +02:00
Wim Taymans
88c6896fb9 gstbin: unlock _get_state() on error
When an error message is received on the bus, mark the bin as being in the error
state and unlock all current _get_state() calls with an error.

Fixes #505770
2010-05-25 19:17:44 +02:00
Tim-Philipp Müller
4c37bae463 checks: add multi-thread test for tagsetter
See #619533.
2010-05-24 19:08:42 +01:00
Stefan Kost
4ac58c3816 tests: rename testsuite
Previous name was only applicable to a few of the tests.
2010-05-22 22:46:40 +03:00
Wim Taymans
67ab660b19 bin: fix refcount when removing elements during state change
When an element is removed from a bin because it caused a state change error,
don't unref the child twice.
Add some more debug info.
Add a unit test for this error.

Fixes #615756
2010-04-14 18:32:26 +02:00
Edward Hervey
62352d6f1c tests: gstsystemclock: don't leak the system clock 2010-04-07 09:31:39 +02:00
Tim-Philipp Müller
0aa584917a structure: add mapping for (uint) to allow deserialisation of unsigned integers
Unsigned ints are used in taglists, would be nice to be able to
deserialise them, esp. in connection with the taginject API.
2010-03-23 19:23:22 +00:00
Robert Swain
1a3257132d message: add QoS message to inform apps of lost data
This has been implemented as per part-qos.txt and partially addresses
bug #322947
2010-03-17 19:16:42 +01:00
Benjamin Otte
253ebab319 win32: Fix build failures of tests 2010-03-11 21:02:45 +01:00
Benjamin Otte
7e7f51f617 Fixes for -Wmissing-declarations -Wmissing-prototypes
Also adds those flags to the configure warning flags

https://bugzilla.gnome.org/show_bug.cgi?id=611692
2010-03-11 10:59:57 +01:00
Benjamin Otte
a9d1a493a7 Fixes for -Wwrite-strings
This changes some APIs in compatible ways:
- Some functions now take "const char *" arguments, not "char *"
- Some structs now have "conts char *" members, not "char *"
The changes may cause warnings when compiling with the right warning
flags. You've been warned.

Also adds -Wwrite-strings as a warning flag in configure.ac.

https://bugzilla.gnome.org/show_bug.cgi?id=611692
2010-03-10 20:50:10 +01:00
Benjamin Otte
e8f65e8bff Make code safe for -Wredundant-decls
Adds that warning to configure.ac

Includes a tiny change of the GST_BOILERPLATE_FULL() macro:
The get_type() function is no longer declared before being defined.

https://bugzilla.gnome.org/show_bug.cgi?id=611692
2010-03-10 20:45:33 +01:00
Tim-Philipp Müller
712189398c checks: fix spurious ghost pad check failure 2010-01-27 00:24:49 +00:00
Wim Taymans
381d35fd1e pad: Fix problem with destroy callback not being called
When we unblock a pad with the same user_data, the destroy callback is not
called. This leads to refcounting leaks that cannot be avoided. Instead always
call the destroy notify whenever we install a new pad block.
In particular, this fixes a nasty pad leak in decodebin2.

Also update the unit test to have more accurate comments and test the required
behaviour.
2009-12-23 21:20:14 +01:00
Jan Schmidt
7a8fa2b6a0 check: Add a debug status to the systemclock test
Next time it fails on a buildbot we can see which clock id
return it is getting.
2009-11-16 18:29:01 +00:00
Ole André Vadla Ravnås
73f2d464b7 miniobject: avoid race when recycling buffers
Avoid a race where a miniobject is recycled and quickly freed, which causes the
g_type_free_instance() to be called on the same object twice.

Ref the object before calling the finalize method and check if we still need to
free it afterward.

Also add a unit test for this case.

Fixes #601587
2009-11-13 11:45:48 +01:00
Michael Smith
d833b39a85 Remove executable bits on xml unit test. 2009-10-20 12:21:41 -07:00
Sebastian Dröge
4917bb4fc2 gstobject: Add simple unit test for gst_object_has_ancestor() 2009-10-14 08:34:03 +02:00
Jan Schmidt
ffb8518d01 check: Disable the test_fail_abstract_new() test entirely on OS/X
Fixes a compiler warning from the function being compiled but not
used.
2009-10-12 21:51:55 +01:00
Jan Schmidt
2d4795cd17 checks: Disable a fairly silly gstobject test on OS/X
This test used to SIGBUS on OS/X but now SIGSEGV's instead on
Snow Leopard. It's not worth the effort to figure out which platform
should produce which error for what is fundamentally a pretty silly
test, so just disable it on OS/X
2009-10-12 14:24:53 +01:00
Jan Schmidt
077ca39def checks: Fix string leaks in the new childproxy test 2009-10-08 02:20:51 +01:00
Stefan Kost
558f4aca59 tests: add ghostpad test for setting target again after pad is linked 2009-10-07 22:41:30 +03:00
Stefan Kost
593fc8894b tests: remove empty lines from wrong indent run 2009-10-07 22:41:29 +03:00
Jan Schmidt
a39ca4a9c7 check: Attempt to fix type-punning warning in the gstiterator test 2009-10-07 16:36:31 +01:00
Stefan Kost
09c7d34921 childproxy: initialize gvalue in _valist function. Fixes #595602
Reflow the code to move error handling to the end of the functions. Initialize
gvalue like we do in the setter. Add a unit-test module with two simple tests
the catche this bug.
2009-10-07 10:59:54 +03:00
Jan Schmidt
8105265087 Re-enable and fix disabled bit of the registry test 2009-10-06 19:51:44 +01:00
Jan Schmidt
51675e0c2a registry: Add registry helper phase 1
Phase 1 of adding the registry scan helper
2009-10-06 19:51:42 +01:00
Sebastian Dröge
7464062ff2 utils: Fix GMP scaling unit test
GMP only uses "unsigned long int", which is 32 bit
on 32 bit architectures and can't hold a guint64.
This resulted in false unit test failures on 32 bit architectures.

Fixes bug #595133.
2009-09-15 11:31:15 +02:00
Jan Schmidt
057afdd5cd check: Fix version check tests
Accomodate the slightly changed semantics in the plugin version check
where a CVS version just before a release is acceptable.
2009-09-11 20:43:51 +01:00
Sebastian Dröge
3a5cceeb6b iterator: Add unit test for the single iterator 2009-09-01 10:21:31 +02:00
Sebastian Dröge
2919e5add8 gstutils: Add special random unit test for 64 scaling functions
This tests 100000 random multiplications/divisions of all scaling
function variants and compares the result with the result that is
generated by GMP on the same input.

For this check for GSL and GMP during configure but only use
it for this single unit test.

Testing functions were provided by Kipp Cannon <kcannon@ligo.caltech.edu>
2009-08-14 11:12:50 +02:00
Sebastian Dröge
535952c9fa gstutils: Add (very) minimal unit test for the new rounding scaling functions 2009-08-13 16:32:28 +02:00