Commit graph

2091 commits

Author SHA1 Message Date
Tim-Philipp Müller 352a4b5b07 tests: update .gitignore for queuearray test binary 2012-08-05 17:12:35 +01:00
Tim-Philipp Müller 53cfccf764 tests: fix spurious netclientclock test failures
Give clocks a bit more time to synchronise.
2012-08-05 17:11:46 +01:00
Tim-Philipp Müller e8ab1006c7 toc: add GstTocScope and require it in the constructor
This is because we need to be able to signal different TOCs
to downstream elements such as muxers and the application,
and because we need to send both types as events (because
the sink should post the TOC messages for the app in the
end, just like tag messages are now posted by the sinks),
and hence need to make TOC events multi-sticky.

https://bugzilla.gnome.org/show_bug.cgi?id=678742
2012-07-28 09:16:06 +01:00
Sebastian Dröge 826a8d643d tag: Add a scope to taglists
This specifies if a given taglist applies to the complete
medium or only this specific stream. By default a taglist
has a stream scope.

Fixes bug #677619.
2012-07-28 00:34:41 +02:00
Wim Taymans c8840b8270 segment: add offset field
Add an offset field that is used to track at what position the segment was
updated. This is used to set the running time to 0 when we do a flushing
seek that doesn't update the position.

See https://bugzilla.gnome.org/show_bug.cgi?id=680306
2012-07-27 17:09:45 +02:00
Wim Taymans f05b0e222f Update for new seeking variable name
When seeking, the start value and type are now called start and start_type.
2012-07-27 15:24:52 +02:00
Wim Taymans dbb6d68999 tests: improve segment tests 2012-07-27 12:24:03 +02:00
Wim Taymans a2027b5e9b allocator: remove user_data from alloc vmethod
Remove the user_data from the alloc vmethod. Subclasses that implement a new
alloc function can also implement their own vmethod to pass extra arguments. We
can then also require that custom allocators implement an alloc function so that
gst_allocator_alloc() always works.
2012-07-27 12:17:29 +02:00
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
Tim-Philipp Müller 94f6ba9c0b base: make GstQueueArray private to coreelements for now
Keep it private until we have a reason to make it public.
2012-07-14 19:36:02 +01: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 f362f643ac memory: Make GstAllocator a GstObject
Make GstAllocator a GstObject instead of a GstMiniObject, like bufferpool.
Make a new gstallocator.c file. Make a GstAllocator subclass for the default
allocator.
2012-07-09 16:28:22 +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 1c43e3628d examples: fix debug log print formats in memory examples 2012-07-07 15:44:57 +01:00
Wim Taymans 408df31a48 memory: expose the GstAllocation structure
Expose the GstAllocation structure and provide an _init function. This makes it
easier to make 'subclasses' of the allocator that contain more info.
It also allows us to expose the flags on the allocator miniobject.
Make a flag to note that the allocator uses a custom alloc function.
2012-07-06 17:24:32 +02:00
Edward Hervey d3744d05dc check: gstcontroller.h doesn't exist anymore 2012-07-06 12:48:44 +02:00
Edward Hervey 0efc42aac7 check: Use consistencycheck on basesrc 2012-07-06 12:48:44 +02:00
Wim Taymans a39b13ff9f tests: remove unused includes 2012-07-06 09:11:48 +02:00
Wim Taymans 968de7b725 memory: add more examples
Add an example of a custom allocator with a custom API.
2012-07-05 18:07:52 +02:00
Wim Taymans 50cf7f6a08 memory: add gst_memory_init()
Add a method that memory implementations can call to initialize the standard
GstMemory structure.
Move the parent handling in the _free handler.
Rearrange some internal function parameters so that the order is consistent.
Add more memory examples
2012-07-05 17:11:01 +02:00
Wim Taymans b2b934a928 tests: add memory example 2012-07-05 16:17:20 +02: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
Edward Hervey 041787ac82 check: New unit test for GstQueueArray 2012-07-04 17:46:54 +02: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
Tim-Philipp Müller 08c2c446a5 tests: add unit test for element re-use using fakesrc 2012-07-03 19:15:25 +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
Lionel Landwerlin 8b3708ea8c configure: add --disable-tools and --disable-benchmarks options
Add option to avoid build binaries. When building for platforms like
android, you might want to not link any "final" binary, mostly because
it requires special link flags or other parts of code that aren't
in the C library.

https://bugzilla.gnome.org/show_bug.cgi?id=677621
2012-06-26 23:12:56 +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
Sebastian Dröge 3a501deb3e funnel: Fix unit test 2012-06-04 13:01:41 +02:00
Sebastian Dröge 09efcf22c8 valve: Fix unit test 2012-06-04 13:01:41 +02:00
Mike Ruprecht cc548f5eb6 tests: Add funnel test to cover EOS event handling
Ported from f3b2dd6f in the 0.10 branch
2012-05-31 14:55:11 -04:00
Mike Ruprecht 5e76a19566 tests: Fix invalid read when releasing request pads in funnel tests 2012-05-31 13:09:00 -04: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
Sreerenj Balachandran 564eee8cd6 tests: rename playbin2 to playbin and adding some debug info 2012-05-23 10:14:32 +02: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
Tim-Philipp Müller 37e516ccf7 tools, tests: don't access the GstPluginFeature structure directly 2012-05-19 17:23:43 +01:00
Tim-Philipp Müller a9d19a6913 elementfactory: make object struct opaque for now
Make GstElementFactory opaque until we have time to
clean it up a little. It's not something anyone
would need to derive from.
2012-05-19 16:17:12 +01:00
Raimo Järvi 63234a9dab gst: Fix compiler warnings on mingw-w64
https://bugzilla.gnome.org/show_bug.cgi?id=675525
2012-05-09 09:35:35 +02:00
Tim-Philipp Müller d35487e50c uri: require URI protocol bit to be at least 3 characters to be valid
We want to return FALSE when run on a windows-style file path.

https://bugzilla.gnome.org/show_bug.cgi?id=674296
2012-05-01 19:50:36 +01:00
Wim Taymans 1b87a07d8e adapter: remove _try_to_merge_up()
It causes the timestamp to go wrong, should not cause much of a performance
increase and in the cases where it is faster, it is broken in 0.10 as well.
We should try to review this when rewriting the adapter for 0.11 memory
features.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=674791
2012-05-01 10:50:32 +02:00
Tim-Philipp Müller b8304137d3 tests: use public accessors to get plugin description details 2012-04-29 15:53:05 +01:00
Stefan Sauer 772c58e255 controller: expand the api to offer functions for plain and GValue arrays
Rename the _get_value_array() functions to _get_g_value_array() and reintroduce
the former to operate on plain unboxed c datatypes (like in 0.10). The _g_value
variants are for bindings while the _value ones are more suited to processing
in elements.
2012-04-25 20:19:23 +02:00
Mark Nauwelaerts 678e9704fc tests: plug some leaks 2012-04-24 16:01:52 +02:00
Wim Taymans 6fae137027 meta: add LOCKED flag
Add a new LOCKED flag to the metadata. Refuse removing LOCKED metadata from
a buffer.
Mark the metadata from the bufferpool LOCKED.
Add unit test for LOCKED flag
2012-04-17 15:55:10 +02:00
Mark Nauwelaerts e076e36840 collectpads2: rename to collectpads 2012-04-17 15:07:54 +02:00
Wim Taymans fc8b28455f tests: add another adapter test
Test performance of merging
2012-04-14 10:24:38 +02:00
Wim Taymans 086f8855be queue2: set buffer to NULL before pull 2012-04-11 12:58:19 +02:00
Wim Taymans 74eb3cef2d tests: port queue2 tests to 0.11 2012-04-11 12:54:36 +02:00
Wim Taymans bfc87ac576 Merge remote-tracking branch 'origin/0.10'
Conflicts:
	gst/gsttoc.c
	plugins/elements/gstqueue2.c
2012-04-11 12:50:50 +02:00
Wim Taymans dc3d3674b1 queue2: add test for ringbuffer deadlock 2012-04-11 12:45:43 +02:00
Alexander Saprykin 932e063ec2 tocsetter: fix memory leaks in unit test 2012-04-11 10:02:21 +02:00
Alexander Saprykin 43c5930d17 toc: fix memory leaks in unit test 2012-04-11 10:02:06 +02:00
Alexander Saprykin 54d9497e4d tocsetter: fix memory leaks in unit test 2012-04-11 09:58:06 +02:00
Alexander Saprykin 4cc1fbf18e toc: fix memory leaks in unit test 2012-04-11 09:58:06 +02:00
Tim-Philipp Müller 0cfc3cf8a2 task: remove gst_task_set_priority()
It doesn't actually do anything.
2012-04-08 21:17:46 +01:00
Tim-Philipp Müller c31acbe4f9 tests: add new toc test binaries to .gitignore 2012-04-07 16:05:33 +01:00
Stefan Sauer 1fb774577e controller: add a finalizer for the test controlbindings
No idea why valgrind still inists that there are leaks.
2012-04-05 21:17:57 +02:00
Sebastian Dröge b0d89da6b6 gst: Change versioning
Remove GST_MAJORMINOR and replace it by GST_API_VERSION
Also set GST_VERSION_{MAJOR,MINOR,MICRO,NANO} explicitely
now.

All versions are at 1.0.0 now for the release soon but
API/ABI can still change until the 1.0.0 release.

Next release versions until 1.0.0 will be 0.10.9X and
these will be release candidates. GST_VERSION_* will
nonetheless stay at 1.0.0.0.
2012-04-04 14:28:55 +02:00
Tim-Philipp Müller f8a7bd21df tests: add new unit test binaries to .gitignore 2012-04-02 23:29:24 +01:00