Commit graph

771 commits

Author SHA1 Message Date
Wim Taymans
f0e3902a37 Merge branch 'master' into 0.11 2011-03-10 10:25:07 +01:00
Stefan Kost
7f49a9189a test: add tests for new element_factory api. 2011-03-09 15:28:06 +02:00
Stefan Kost
e66ae6681a tests: add a unit test for gst_caps_new_simple
Add a test for the crash in bug #642271.
2011-03-08 23:01:15 +02:00
Wim Taymans
fa0d993372 meta: implement transform function
Replace subbuffer and copy vmethods by a more generic transform function that
can then be parametrised by transform specific data. This should allow us to
implement make-writable and more future transform functions.
2011-03-08 17:11:23 +00:00
Wim Taymans
fd0fd97200 Merge branch 'master' into 0.11 2011-03-08 17:06:30 +00:00
Stefan Kost
7c98ae2b98 tests: add test to create a factory 2011-03-08 12:29:28 +02:00
Stefan Kost
b6e2c69134 tests: start a new test suite for element factories
Move one test from gstelement suite.
2011-03-08 12:29:28 +02:00
Wim Taymans
230c3455ac Merge branch 'master' into 0.11
Conflicts:
	gst/gstregistry.h
2011-03-02 11:08:34 +01:00
Wim Taymans
f5d1dcbd9a tests: add memory unit test 2011-02-28 09:39:44 +01:00
Wim Taymans
58060d7528 meta: separate add and get methods
Make separate api for getting and adding metadata. This allows us to pass extra
parameters to the init functions when creating metadata, which is needed for
specific API implementations.
Add beginnings of memory metadata.
2011-02-27 19:40:45 +01:00
Wim Taymans
6f4a733063 metadata: Rename to GstMeta
Rename to the shorter GstMeta
Add docs
Add api to get metadata by API
2011-02-25 13:15:25 +01:00
Wim Taymans
45645a11a1 buffermeta: fix compilation 2011-02-25 10:34:52 +01:00
Wim Taymans
023cada1f4 meta: improve test a little 2011-02-25 10:34:52 +01:00
Wim Taymans
8468dadc77 buffermeta: add beginnings of buffer metadata
Add first implementation of arbitrary buffer metadata. We use a simple linked
linked of slice allocated metadata chunks. Future implementations could use
something more performant.
Add get, remove, iterate methods to handle the metadata.
2011-02-25 10:34:47 +01:00
Stefan Kost
b3f0d98964 tests: refix the tests (missing #endif) 2011-02-24 16:20:01 +02:00
Stefan Kost
98a50e3b82 tests: add abi check data for ARM 2011-02-24 15:03:03 +02:00
Wim Taymans
6c18c9508d miniobject: more boxed type fixing
More miniobject fixing, leaks horribly somewhere..
2011-02-23 10:35:09 +01:00
Wim Taymans
0894ed2053 Merge branch 'master' into 0.11 2011-02-22 15:08:51 +01:00
Wim Taymans
238b9a57cc Merge branch 'master' into 0.11
Conflicts:
	configure.ac
	gst/gstelement.c
	gst/gstelement.h
	gst/gstpad.c
	gst/gstutils.c
	libs/gst/base/Makefile.am
	libs/gst/check/Makefile.am
	libs/gst/controller/Makefile.am
	libs/gst/dataprotocol/Makefile.am
	libs/gst/net/Makefile.am
	win32/common/libgstreamer.def
2011-02-22 14:11:59 +01:00
Tim-Philipp Müller
3a744ca442 value: add (de)serialisation function for uchar
.. since we sadly have a plugin in -good that has a uchar property
(cmmlenc)

https://bugzilla.gnome.org/show_bug.cgi?id=642522
2011-02-17 10:55:28 +00:00
Wim Taymans
8d27621e40 check: fix a leak in the bus unit test 2011-02-16 17:56:38 +01:00
Wim Taymans
5db2e45d5c check: add progress message unit test 2011-02-15 18:55:22 +01:00
Wim Taymans
56826a5ee6 event: add QoS event type
Add a parameter to the QoS event to specify the QoS event type.
Update docs and add unit test.

See #638891
2011-02-10 15:21:45 +01:00
Tim-Philipp Müller
b93b05653e bus: honour any per-thread default main context set via g_main_thread_push_thread_default()
Makes gst_bus_add_watch(), gst_bus_add_watch_full(), gst_bus_add_signal_watch(),
and gst_bus_add_signal_watch_full() convenience functions automatically pick up
any non-default main contexts set for the current thread via
g_main_thread_push_thread_default().
2011-01-31 15:58:18 +00:00
Zhang Wanming
74ed5af81a tests: fix typo
Signed-off-by: Zhang Wanming <Wanming.Zhang@tieto.com>
2010-12-31 12:20:53 +01:00
Wim Taymans
b2ab72b916 pad: remove get_caps_reffed variants
Make the _get_caps functions behave like the _get_caps_reffed variants and
remove the _reffed variants. This means that _get_caps doesn't return a writable
caps anymore and an explicit _make_writable() is needed before modifying the
caps.
2010-12-07 18:14:38 +01:00
Wim Taymans
920ef127ce element: rework GstElementDetails
Clean up the GstElement structure
Replace GstElementDetails with metadata
2010-12-07 15:33:04 +01:00
Wim Taymans
a0ed044de8 plugin: remove deprecated methods
Remove more deprecated methods and fix unit test.
2010-12-07 15:31:27 +01:00
Wim Taymans
7f684e1525 check: fix object unit test 2010-12-07 15:20:12 +01:00
Thiago Santos
2f94ad3d6c gstdatetime: Fix handling of timezones
Fix returning of timezones on systems with gdatetime
to use floats on the math expression to avoid
truncating the fractional part.

Also adds a test for covering this case.
2010-12-02 16:28:43 -03:00
Thiago Santos
1b27e1e792 datetime: Add _from_unix_epoch variants
Adds 2 variants for the gst_date_time_from_unix_epoch function,
one for UTC and another for local time.

API: gst_date_time_new_from_unix_epoch_utc
API: gst_date_time_new_from_unix_epoch_local_time

Fixes #653031

https://bugzilla.gnome.org/show_bug.cgi?id=635031
2010-11-17 09:58:32 -03:00
Thiago Santos
e9312870e5 datetime: Use seconds as double
Use seconds as double to make API similar to glib's
gdatetime. Also move timezone parameter to the
first position, just like glib's.

https://bugzilla.gnome.org/show_bug.cgi?id=628408
2010-10-13 11:48:57 -03:00
Thiago Santos
dd53349ad2 gstdatetime: Fix string serialization
Correctly serialize tzoffset as a gstvalue
2010-09-27 20:41:52 -03:00
Stefan Kost
2713e903fb tests: rebuild one test using cpp
This aims to catch cpp issues in core. Add c++ boilerplate to configure.
2010-09-22 10:22:40 +03:00
Wim Taymans
0447e72c97 bufferlist: add function to add a list of buffers
Add a function to add a list of buffers to the bufferlist.
2010-09-17 17:35:45 +02:00
Edward Hervey
b792329dde check: Avoid error: array subscript is above array bounds
Could have come up with something better for my 2000th commit
to GStreamer...
2010-09-06 18:37:29 +02:00
Philippe Normand
9ef1c47079 gstquery: new buffering_ranges API
Added a new query type to retrieve informations about the areas of the
media currently buffered. See bug 623121.

API: gst_query_add_buffering_range
API: gst_query_get_n_buffering_ranges
API: gst_query_parse_nth_buffering_range
2010-09-03 19:55:25 +02:00
Sebastian Dröge
0107c7e793 gstvalue: Fix memory leaks in the int64range tests 2010-09-01 11:07:38 +02:00
Philippe Normand
b2e6379be8 gstvalue: Add new GstInt64Range type
new GstInt64Range to store gint64 ranges.

API: GST_TYPE_INT64_RANGE
API: gst_value_set_int64_range
API: gst_value_get_int64_range_min
API: gst_value_get_int64_range_max

Fixes bug #627826.
2010-09-01 11:07:37 +02:00
Jan Schmidt
519e08c37f tests: Remove checks for deprecated flow check macros
GST_FLOW_IS_FATAL() and GST_FLOW_IS_SUCCESS() are deprecated,
so aren't available for the testsuite any more.
2010-08-28 17:51:14 +10:00
Jan Schmidt
8a20878535 tests: Add a couple of extra caps strings to test 2010-08-28 17:05:29 +10:00
Sebastian Dröge
41c04c7471 datetime: Fix memory leak in the unit test by unreffing GstDateTime instance after usage 2010-08-19 11:11:28 +02:00
Tim-Philipp Müller
e50267593e tests: add basic unit test for gst_pad_proxy_getcaps()
https://bugzilla.gnome.org/show_bug.cgi?id=624203
2010-08-05 01:14:18 +01:00
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
Sebastian Dröge
276a55fd24 gstsegment: Actually start==stop==segment_start is inside the segment
Still the old code was wrong as it claimed that start==stop<segment_start
would be inside the segment and returned insane clipping differences.
2009-08-11 13:21:35 +02:00
Sebastian Dröge
868538945b gstsegment: Fix unit test and add an additional test
The previous test assumed that start=stop=segment_start will
be inside the segment but this is wrong.
2009-08-11 13:03:03 +02:00
Sebastian Dröge
46b2a5a34e gstbus: Unref pipeline after usage in test_custom_main_context unit test
This makes the core unit tests valgrind clean again.
2009-08-11 05:48:22 +02:00
Tim-Philipp Müller
60a962dcb8 checks: don't forget to include config.h in the GstObject unit test 2009-08-10 14:30:34 +01:00
Tim-Philipp Müller
657c68fc99 checks: try to fix GstObject unit test on OSX
Seems like we get SIGBUS instead of SIGSEGV here when GLib crashes
where it shouldn't crash (and we even have a unit test for that!).
2009-08-10 13:05:57 +01:00
Tim-Philipp Müller
a6c84b2ae6 checks: set pipeline back to NULL state in GstBus unit test
Fixes timeout in gst_task_cleanup_all().
2009-08-10 11:55:52 +01:00
Wim Taymans
96e342b686 tests: don't set caps on unwritable buffers
Take the ref after setting the caps on a buffer because else the buffer is
techinically not writable.
2009-08-06 10:53:01 +02:00
Wim Taymans
ffca244c26 tests: make sure the tasks are joined
Call _clean_all() on the task to make sure everything is joined and stopped.

See #589127
2009-07-20 18:03:21 +02:00
Tim-Philipp Müller
9459a93cb4 tags: only emit a g_warning() for empty tag strings for git versions
For now, don't show a g_warning() for empty tag strings and NULL
tags with non-git versions; we should wait for the fixes in our
plugin modules to make it into a release before we enable this
unconditionally.
2009-07-16 13:59:07 +01:00
Jan Schmidt
7bf3554228 structure: Change NULL and empty string handling
Don't forbid the empty string "" in generic structures, only in taglists.
Properly allow the NULL string by adding special cases for serialising
and deserialising it. prop1=(string)NULL is the NULL string,
prop1=(string)"NULL" is the actual string with the value "NULL"
2009-07-13 18:28:37 +01:00
Tim-Philipp Müller
2b4d127ca0 tests: fix crash and leak in bufferlists unit test
Don't access already-freed iterator, makes check-valgrind work and fixes
crash on PPC; unref buffer we're going to steal to make valgrind happy.
2009-06-21 14:43:08 +01:00
Wim Taymans
6438f6f9b9 bufferlist: Various cleanups
Add new method to iterate a bufferlist without having to allocate an iterator.
Add convenience method for getting an item from the list based on the group and
index.
Remove redundant _do_data callback and method.
Update unit-tests and add some more for the new methods.
2009-06-19 15:31:53 +02:00
Tim-Philipp Müller
dccea0406b taglist: add functions to create a new taglist with tags in one go
Add functions to create a new tag list and set tags in one go, which
is nice for use in combination with functions that take ownership of
the taglist, such as gst_event_new_tag() or gst_element_found_tags().

API: add gst_tag_list_new_full()
API: add gst_tag_list_new_full_valist()
2009-06-14 16:17:50 +01:00
Tim-Philipp Müller
cdd47a37e9 structure: add gst_structure_*_get*() vararg functions
Add a bunch of vararg getter convenience functions to complement
the vararg setter functions, and a basic unit test. Fixes #534208.

API: gst_structure_get()
API: gst_structure_id_get()
API: gst_structure_get_valist()
API: gst_structure_id_get_valist()
2009-06-10 09:39:12 +01:00
Tim-Philipp Müller
998b2392d3 Remove double semicolons at end of line 2009-06-08 17:13:17 +01:00
Wim Taymans
0e74bfe248 segment: add gst_segment_set_running_time
Added new method for closing the segment to a specific running time.

API: GstSegment::gst_segment_set_running_time()
2009-06-04 12:53:20 +02:00
Wim Taymans
92984a116b segment: add method for converting to position
Add gst_segment_to_position() that converts a running_time to a position in the
segment. A faulty variant of this function is currently used in inputselector
but we'll need it for frame stepping too.

API: GstSegment::gst_segment_to_position()
2009-06-03 19:06:30 +02:00
Stefan Kost
47d9904eba structure: fix serialisation of nested structures.
Use string_warp/unwrap to escape delimiters, otherwise deserialisation fails.
Also move GST_ASCII_IS_STRING to private header to avoid keeping it in sync.
Also use '\0' when terminating a string for better readability.
2009-06-02 18:39:17 +03:00
Tim-Philipp Müller
30c890c7a2 taglists: warn if someone tries to add empty or NULL string tags to a taglist
Also warn if an element or application tries to add a field with an
empty string to a structure (NULL strings are still needed and
allowed though) and do all those checks in the right function.

Fixes #559643.
2009-05-31 15:38:01 +01:00
Wim Taymans
087c8957d2 pipeline: deprecate old methods, fix test
Deprecate the old _set_stream_time and _get_last_stream_time methods because
they are now equivalent to the better named _set/_get_start_time.
2009-05-29 12:21:36 +02:00
Jonas Holmberg
22a48fb08c bufferlist: hook up the pad functions
Reuse buffer code for bufferlists. Not sure if this measurably impacts performance
for the simple buffer case, if it does after doing some benchmarks, we can
decouple it later.

Fixes #572285
2009-05-12 15:18:53 +02:00
Jonas Holmberg
d99cf4db1b bufferlist: add docs/build/debug/unittest
See #572285
2009-05-12 15:18:52 +02:00
Wim Taymans
4b604f7da6 Pad: post STREAM_STATUS_TYPE_CREATE
Post a stream-status message indicating that a new task was created so that the
application has a chance to change the properties of the task.

Fix unit test to take into account the new ref of the message.
2009-05-12 00:27:10 +02:00
Wim Taymans
2aaf72d259 tests: add a unit-test for the stream-status
Add a unit test for the STREAM_STATUS messages.
2009-05-12 00:07:06 +02:00
Wim Taymans
2efaf65c4c tests: fix unit-tests for new stream-status
Fix the unit-tests so that they don't fail on the new stream-status messages
that are emited now.
2009-05-12 00:00:54 +02:00
Tim-Philipp Müller
116c8be6bf API: add FIXME and DUMPMEM log levels and convenience macros
Two new log levels to dump FIXMEs into the log and to log data
in form of a hex dump (#578114).

API: GST_CAT_FIXME_OBJECT
API: GST_CAT_MEMDUMP_OBJECT
API: GST_CAT_FIXME
API: GST_CAT_MEMDUMP
API: GST_FIXME_OBJECT
API: GST_MEMDUMP_OBJECT
API: GST_FIXME
API: GST_MEMDUMP
2009-04-08 21:32:05 +01:00
Stefan Kost
c9917a1a84 tests: remove the hacks to workaround the pad-leak 2009-04-08 17:49:18 +03:00
Wim Taymans
df30f60048 clock: fix 2 wakeup races.
when an entry being waited on in the async thread is unscheduled, clear the
wakeup queue so we can continue waiting on other entries.
When an entry being waited on in the async thread is unlocked because an earlier
entry was added to the list, set the entry to OK again. This makes sure that
only the entries being waited on have the BUSY flag set and wake up the timer
poll when they are unscheduled.
2009-03-26 15:59:17 +01:00
Tim-Philipp Müller
c4e10b9535 API: add gst_tag_list_get_buffer{_index}
Convenience API, mostly for image tags, so people don't have to
figure out the whole GValue/GstValue thing just for this.
2009-03-26 14:21:10 +00:00
Jan Schmidt
4ef524f5ec systemclock: Clean up the tests a bit.
Add some cleanups to the system clock tests, to free all the memory and
unschedule/unref all clock IDs we allocate.

Use a mutex in one test to avoid potential threading problems on multicore
machines.
2009-03-26 12:18:09 +00:00
Jan Schmidt
b35f424858 systemclock: Add a test for sync/async clockid interactions
This test randomly hangs if there are problems with the reliability of
unscheduling sync and async clockID's on the system clock.
2009-03-26 12:18:09 +00:00
Wim Taymans
da0060d3aa pad: call new callbacks set in the block callback
Keep track of when a new callback is installed in the callback and call the new
callback in that case.
Add unit test for checking pad blocking.
Fixes #573823.
2009-03-09 11:48:36 +01:00
Sebastian Dröge
3c6448c64e API: Add gst_util_array_binary_search() for binary searchs on a sorted array
This will be mostly useful in all elements that have some kind of internal
seek/index table. Currently almost all of them (or even all of them)
are using a linear search although the used array is already sorted,
wasting some CPU time without good reason.

Fixes bug #573623.
2009-03-02 16:17:45 +01:00
Alessandro Decina
d3940f520b GstPad: Add gst_pad_set_blocked_async_full
This allows connecting a GDestroyNotify for when the callback is removed/replaced.
Partially fixes #514717
2009-02-22 20:01:05 +01:00
Wim Taymans
4b986a4a94 Add message to request a state change
Add a GST_MESSAGE_REQUEST_STATE that can be posted by element when they would
like to have the application change the state of the pipeline. the primary use
case is to pause the pipeline when an audio mixer is mixing a higher priority
stream but it can also be used for other purposes.

Add some docs and a unit test.

Implement the REQUEST_STATE message in gst-launch.

API: gst_message_new_request_state()
API: gst_message_parse_request_state()
API: GST_MESSAGE_REQUEST_STATE
2009-02-18 15:31:55 +01:00
Wim Taymans
26f368f7e7 Clear target when the target pad disappears
When the target pad disappears (because it was explicitly unlinked or the
element was removed/unreffed) make sure we receive a notify with the unlink
function on the proxy pad and clear the target. We use a simple flag to not do
this and cause deadlocks when the target was changed explicitly using the
ghostpad functions.

Update the unit test because we now unref the target sooner (and correctly).
2009-02-16 12:58:34 +01:00
Stefan Kost
697055b3e4 tests: GstClockTime is always >= 0 2009-02-05 13:57:05 +02:00
Wim Taymans
ae76b3d606 do not call the unlink function on the target pad when the ghostpad
is unlinked.
Add some unit tests for this behaviour.
Fixes #566936.
2009-01-21 12:21:49 +01:00
Tim-Philipp Müller
0ee5e36cfb gst/gstbus.c: Fix order of members in GstBusSource structure - the first member must be the parent structure ie. GSou...
Original commit message from CVS:
* gst/gstbus.c: (gst_bus_set_main_context), (gst_bus_create_watch):
Fix order of members in GstBusSource structure - the first member
must be the parent structure ie. GSource. Should make bus sources
attached to non-default main contexts work in all cases now (ie.
primarily in cases where the callback has a non-NULL user data
argument). Fixes #562170.
* tests/check/gst/gstbus.c: (test_custom_main_context):
Add unit test for the above, based on code by
Justin Karneges <justin at affinix com>.
2009-01-17 21:04:41 +00:00
Tim-Philipp Müller
428ead89b8 gst/gstbus.c: Make GstBusSource work with non-default main contexts (#562170).
Original commit message from CVS:
* gst/gstbus.c: (gst_bus_dispose), (gst_bus_get_property),
(gst_bus_wakeup_main_context), (gst_bus_set_main_context),
(gst_bus_post), (gst_bus_source_prepare), (gst_bus_source_finalize),
(gst_bus_create_watch):
Make GstBusSource work with non-default main contexts (#562170).
* tests/check/gst/gstbus.c: (message_func_eos), (message_func_app),
(test_watch), (test_watch_with_custom_context), (gst_bus_suite):
Add test case for GstBusSource with a non-default main context.
* tests/check/libs/.cvsignore:
Ignore more.
2008-12-27 17:41:11 +00:00
Alessandro Decina
1b13418a0a Don't forward gst_pad_set_caps() on a source ghostpad to its target.
Original commit message from CVS:
* gst/gstghostpad.c:
* tests/check/gst/gstghostpad.c:
Don't forward gst_pad_set_caps() on a source ghostpad to its target.
That would cause the ghostpad to emit notify::caps two times (fist
from gst_pad_set_caps() and after from on_src_target_notify()).
2008-12-19 15:11:06 +00:00
Wim Taymans
f1be570630 tests/check/gst/gstghostpad.c: Add some more unit-tests for the ghostpad notify signal, one of which currently fails.
Original commit message from CVS:
* tests/check/gst/gstghostpad.c: (ghost_notify_caps),
(GST_START_TEST):
Add some more unit-tests for the ghostpad notify signal, one of which
currently fails.
2008-12-19 11:24:36 +00:00
Alessandro Decina
c0a2c5839e In a source ghostpad, when caps are changed in the target pad, the change needs to be reflected in the ghostpad.
Original commit message from CVS:
* gst/gstghostpad.c:
* tests/check/gst/gstghostpad.c:
In a source ghostpad, when caps are changed in the target pad, the
change needs to be reflected in the ghostpad.
Fixes #564863.
2008-12-17 16:16:45 +00:00
Stefan Kost
f28a2a6cfc More complete unit tests. Fix handling of empty taglists (they were not merged before).
Original commit message from CVS:
* gst/gsttaglist.c:
* tests/check/gst/gsttag.c:
More complete unit tests. Fix handling of empty taglists (they were
not merged before).
2008-12-16 09:23:21 +00:00
Wim Taymans
d2e5ffde24 gst/gstsegment.c: Set the last_stop to a more meaningful position when configuring the segment. ie. the start/stop of...
Original commit message from CVS:
* gst/gstsegment.c: (gst_segment_set_newsegment_full):
Set the last_stop to a more meaningful position when configuring the
segment. ie. the start/stop of the segment or clipped against the
updated segment boundaries.
* tests/check/gst/gstsegment.c: (GST_START_TEST):
Add some unit tests for the last_stop.
2008-10-23 09:49:07 +00:00
Wim Taymans
97ec47cabb docs/design/part-TODO.txt: Remove item from the todo list because it was fixed with the latency state change rewrites.
Original commit message from CVS:
* docs/design/part-TODO.txt:
Remove item from the todo list because it was fixed with the latency
state change rewrites.
* docs/design/part-seeking.txt:
* docs/design/part-segments.txt:
Update some docs.
* gst/gstevent.c: (gst_event_new_new_segment_full),
(gst_event_parse_new_segment_full), (gst_event_new_buffer_size),
(gst_event_parse_buffer_size), (gst_event_new_qos),
(gst_event_parse_qos), (gst_event_new_seek),
(gst_event_parse_seek), (gst_event_new_latency),
(gst_event_parse_latency):
Use quarks to construct and parse events.
* gst/gstquark.c: (_priv_gst_quarks_initialize):
* gst/gstquark.h:
Add some more quarks to the table.
Emit a warning when the quark tables are not in sync.
* tests/check/gst/gstbus.c: (GST_START_TEST):
Add an assert.
2008-10-13 17:19:25 +00:00
Edward Hervey
3159228799 tests/check/gst/gstutils.c: We now see 3 events go through our pad, since basesink now sends upstream latency events.
Original commit message from CVS:
* tests/check/gst/gstutils.c: (probe_do_nothing), (data_probe),
(buffer_probe), (event_probe), (GST_START_TEST):
We now see 3 events go through our pad, since basesink now sends
upstream latency events.
2008-10-10 09:11:10 +00:00
Jan Schmidt
c64e9b0c7a tests/check/: Add Sparc ABI checks
Original commit message from CVS:
* tests/check/Makefile.am:
* tests/check/gst/gstabi.c:
* tests/check/gst/struct_sparc.h:
* tests/check/libs/libsabi.c:
* tests/check/libs/struct_sparc.h:
Add Sparc ABI checks
* tests/check/gst/gstvalue.c: (GST_START_TEST):
Cast signed integer to unsigned to avoid a compiler warning.
2008-10-07 15:12:21 +00:00
Olivier Crete
ee0eaf824b gst/gstbin.c: Keep track of pads that are being linked/unlinked and resync the state changes.
Original commit message from CVS:
Base on Patch by: Olivier Crete <tester at tester dot ca>
* gst/gstbin.c: (gst_bin_init), (gst_bin_add_func),
(gst_bin_remove_func), (update_degree),
(gst_bin_sort_iterator_new), (gst_bin_handle_message_func):
Keep track of pads that are being linked/unlinked and resync the state
changes.
* gst/gstpad.c: (gst_pad_get_direction),
(gst_pad_set_chain_function), (gst_pad_set_getrange_function),
(gst_pad_set_checkgetrange_function), (gst_pad_unlink),
(gst_pad_link_prepare), (gst_pad_link),
(gst_pad_event_default_dispatch), (gst_pad_chain), (gst_pad_push),
(gst_pad_check_pull_range), (gst_pad_get_range),
(gst_pad_pull_range):
Some code cleanups, use macros to check pad direction.
Don't need to take the lock on the pad direction.
Post structure change when pads are linked/unlinked.
Change some checks into _return_if_fail().
* tests/check/gst/gstbin.c:
(test_link_structure_change_state_changed_sync_cb),
(GST_START_TEST), (gst_bin_suite):
Add testcase for pad link/unlinke resync during a state change.
Fixes #510354.
2008-10-06 16:15:02 +00:00
Edward Hervey
dd80b2030c Fix all leaks due to the bug in gst_pad_template_new() by which it does not steal the refcount of the given caps as s...
Original commit message from CVS:
* gst/gstutils.c: (gst_element_get_compatible_pad):
* tests/check/gst/gstghostpad.c: (GST_START_TEST):
* tests/check/gst/gstpad.c: (name_is_valid), (GST_START_TEST):
Fix all leaks due to the bug in gst_pad_template_new() by which it does
not steal the refcount of the given caps as stated.
REVERT THIS COMMIT ONCE FIXED !
REVERT THIS COMMIT ONCE FIXED !
REVERT THIS COMMIT ONCE FIXED !
REVERT THIS COMMIT ONCE FIXED !
REVERT THIS COMMIT ONCE FIXED !
REVERT THIS COMMIT ONCE FIXED !
2008-08-30 11:55:59 +00:00
Wim Taymans
b08cd83cbb gst/gstcaps.c: Fix subset test.
Original commit message from CVS:
* gst/gstcaps.c: (gst_caps_structure_is_subset_field):
Fix subset test.
* tests/check/gst/gstcaps.c: (GST_START_TEST):
Improve unit test subset tests and add a testcase for the subset failure
cases.
* tests/check/gst/gstvalue.c: (GST_START_TEST), (gst_value_suite):
Improve subtraction unit test.
2008-08-07 12:28:28 +00:00
Olivier Crete
70a4cad10c gst/gststructure.c: Avoid overflows in fixation code when dealing with MAXINT values, which v4l2src seems to do.
Original commit message from CVS:
Patch by: Olivier Crete <tester at tester dot ca>
* gst/gststructure.c:
(gst_structure_fixate_field_nearest_fraction):
Avoid overflows in fixation code when dealing with MAXINT values, which
v4l2src seems to do.
Fixes #546328.
* tests/check/gst/gststructure.c: (GST_START_TEST):
Make a unit test to check the fix.
2008-08-05 15:03:27 +00:00
Stefan Kost
864a45ee13 tests/check/gst/gstpreset.c: Only run preset tests when $HOME is writable. Preliminary fix for #545433.
Original commit message from CVS:
* tests/check/gst/gstpreset.c:
Only run preset tests when $HOME is writable. Preliminary fix for
#545433.
2008-08-05 05:44:02 +00:00
Wim Taymans
5665680537 gst/gstbin.c: Fix race for bins that simulate ASYNC state changes by inserting
Original commit message from CVS:
* gst/gstbin.c: (gst_bin_add_func), (gst_bin_remove_func),
(gst_bin_change_state_func), (bin_handle_async_done),
(gst_bin_handle_message_func):
Fix race for bins that simulate ASYNC state changes by inserting
ASYNC_START and ASYNC_DONE messages in their bus. We need to check for
pending ASYNC messages even when the bin does not have ASYNC children.
We note detect this behaviour because we will receive an ASYNC message
that is originating from the bin itself.
Fixes races with decodebin2 state changes.
* tests/check/gst/gstbin.c: (GST_START_TEST):
Add some more debug.
2008-08-04 15:49:13 +00:00
Sebastian Dröge
7c0bd009ce tests/check/gst/gstghostpad.c: Fix some memory leaks and uses of object instances that we don't actually own.
Original commit message from CVS:
* tests/check/gst/gstghostpad.c: (GST_START_TEST):
Fix some memory leaks and uses of object instances that we don't
actually own.
2008-06-24 07:49:36 +00:00
Thomas Vander Stichele
fdca1e654d tests/check/: Use HAVE_VALGRIND_H some more.
Original commit message from CVS:
* tests/check/gst/gstbuffer.c:
* tests/check/pipelines/parse-launch.c:
Use HAVE_VALGRIND_H some more.
2008-06-20 21:08:47 +00:00
Stefan Kost
e5c981bb7b Ignore more.
Original commit message from CVS:
* docs/plugins/tmpl/.cvsignore:
* tests/check/gst/.cvsignore:
Ignore more.
2008-06-20 08:21:48 +00:00
Stefan Kost
9b3b823aa5 tests/check/gst/gstpipeline.c: Revert test change and add comment why it should not work.
Original commit message from CVS:
* tests/check/gst/gstpipeline.c:
Revert test change and add comment why it should not work.
2008-05-27 19:47:49 +00:00
Stefan Kost
6bb62a810a tests/check/gst/gstpipeline.c: Extending the test a little to verify that we also get the NULL state- change message.
Original commit message from CVS:
* tests/check/gst/gstpipeline.c:
Extending the test a little to verify that we also get the NULL state-
change message.
2008-05-27 18:31:39 +00:00
Stefan Kost
bedb591973 configure.ac: Add DATADIR for storing presets.
Original commit message from CVS:
Patch by: Stefan Kost  <ensonic@users.sf.net>
* configure.ac:
Add DATADIR for storing presets.
* docs/gst/gstreamer-docs.sgml:
* docs/gst/gstreamer-sections.txt:
* docs/gst/gstreamer.types.in:
Add GstPreset to docs.
* gst/Makefile.am:
* gst/gst.h:
* gst/gstpreset.c: (preset_get_paths), (preset_skip_property),
(preset_open_and_parse_header), (preset_parse_version),
(preset_merge), (preset_get_keyfile),
(gst_preset_default_get_preset_names),
(gst_preset_default_get_property_names),
(gst_preset_default_load_preset),
(gst_preset_default_save_presets_file),
(gst_preset_default_save_preset),
(gst_preset_default_rename_preset),
(gst_preset_default_delete_preset), (gst_preset_default_set_meta),
(gst_preset_default_get_meta), (gst_preset_default_randomize),
(gst_preset_default_reset), (gst_preset_get_preset_names),
(gst_preset_get_property_names), (gst_preset_load_preset),
(gst_preset_save_preset), (gst_preset_rename_preset),
(gst_preset_delete_preset), (gst_preset_set_meta),
(gst_preset_get_meta), (gst_preset_class_init),
(gst_preset_base_init), (gst_preset_get_type):
* gst/gstpreset.h:
Add GstPreset to core. Fixes #396779
* tests/check/Makefile.am:
* tests/check/gst/gstpreset.c: (gst_preset_test_get_property),
(gst_preset_test_set_property), (gst_preset_test_class_init),
(gst_preset_test_base_init), (gst_preset_test_get_type),
(gst_preset_test_plugin_init), (GST_START_TEST),
(remove_preset_file), (test_setup), (test_teardown),
(gst_preset_suite):
Add GstPreset unit tests.
2008-05-27 15:11:35 +00:00
Wim Taymans
cc8334905c Don't use gst_element_get_pad().
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_load_and_link):
* gst/gstutils.c: (gst_element_link_pads),
(gst_element_unlink_pads):
* libs/gst/check/gstcheck.c: (gst_check_setup_src_pad),
(gst_check_teardown_src_pad), (gst_check_setup_sink_pad),
(gst_check_teardown_sink_pad),
(gst_check_element_push_buffer_list):
* tests/check/elements/fakesink.c: (GST_START_TEST):
* tests/check/elements/filesink.c:
* tests/check/elements/filesrc.c: (GST_START_TEST):
* tests/check/elements/multiqueue.c: (setup_multiqueue),
(mq_sinkpad_to_srcpad):
* tests/check/elements/tee.c: (GST_START_TEST):
* tests/check/generic/sinks.c: (GST_START_TEST):
* tests/check/gst/gstbin.c: (GST_START_TEST):
* tests/check/gst/gstevent.c: (GST_START_TEST):
* tests/check/gst/gstghostpad.c: (GST_START_TEST):
* tests/check/gst/gstpipeline.c: (GST_START_TEST):
* tests/check/gst/gstquery.c: (GST_START_TEST):
* tests/check/gst/gstutils.c: (GST_START_TEST):
* tests/check/libs/basesrc.c: (GST_START_TEST):
* tests/check/pipelines/parse-launch.c: (run_delayed_test),
(gst_parse_test_element_change_state):
Don't use gst_element_get_pad().
2008-05-21 15:57:52 +00:00
Tim-Philipp Müller
b1ea5f952f tests/check/gst/gstcaps.c: Add David's and Benjamin's tests for array subtraction to the unit test suite, which sugge...
Original commit message from CVS:
* tests/check/gst/gstcaps.c: (test_intersect2), (gst_caps_suite):
Add David's and Benjamin's tests for array subtraction to the
unit test suite, which suggests that #147931 is fixed these days.
2008-05-18 11:52:39 +00:00
Stefan Kost
7e6dd77041 tests/check/gst/gstinfo.c: Add a test for removing the default log handler. Seems to fail under windows.
Original commit message from CVS:
* tests/check/gst/gstinfo.c:
Add a test for removing the default log handler. Seems to fail under
windows.
2008-05-14 18:09:01 +00:00
Wim Taymans
363148faf4 gst/parse/grammar.y: Remove unneeded value unset.
Original commit message from CVS:
* gst/parse/grammar.y:
Remove unneeded value unset.
* tests/check/gst/gstvalue.c: (GST_START_TEST), (gst_value_suite):
Add unit test for de/serialization of caps.
2008-05-14 10:22:17 +00:00
Tim-Philipp Müller
077450a434 No, let's not use g_slice_{dup|copy} here, since they only exist since GLib 2.14 and we still depend only on >= 2.12....
Original commit message from CVS:
* gst/gstsegment.c:
* tests/check/gst/gstsegment.c:
No, let's not use g_slice_{dup|copy} here, since they only exist
since GLib 2.14 and we still depend only on >= 2.12. Also add
unit test for gst_segment_copy().
2008-05-09 20:48:24 +00:00
Sebastian Dröge
a87948275c tests/check/gst/gstvalue.c: Add unit test for deserializing uint64s and check some really large numbers in the int64 ...
Original commit message from CVS:
* tests/check/gst/gstvalue.c: (GST_START_TEST), (gst_value_suite):
Add unit test for deserializing uint64s and check some really large
numbers in the int64 test.
2008-05-05 15:50:36 +00:00
Wim Taymans
cf45b88349 Add method to conveniently check the name of a custom event with gst_event_has_name().
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstevent.c: (gst_event_has_name):
* gst/gstevent.h:
* tests/check/gst/gstevent.c: (GST_START_TEST):
Add method to conveniently check the name of a custom event with
gst_event_has_name().
Reformat the event docs so that related methods are put together instead
of the default alphabetical sort.
Update unit test with new method.
API: GstEvent::gst_event_has_name()
2008-04-29 11:23:51 +00:00
Tim-Philipp Müller
e46f846c1f Ref some more classes in gst_init() to work around thread-safety issues in pre-2.16 GLibs, and add basic unit test.
Original commit message from CVS:
* gst/gst.c: (init_post), (gst_deinit):
* tests/check/gst/gstpipeline.c: (GST_START_TEST), (pipeline_thread),
(test_concurrent_create), (gst_pipeline_suite):
Ref some more classes in gst_init() to work around thread-safety
issues in pre-2.16 GLibs, and add basic unit test.
2008-04-25 10:01:46 +00:00
Stefan Kost
012d5584ff docs/gst/gstreamer-sections.txt: Move GParamSepc macros to standart section.
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
Move GParamSepc macros to standart section.
* gst/gstbin.c:
Dn't document _get_type - its in private section in docs anyway and
this doc-blob was incomplete.
* gst/gstclock.h:
Fix wrong symbol names in docs.
* gst/gstmacros.h:
Add once doc sentence.
* tests/check/gst/.cvsignore:
Ignore more.
2008-04-23 06:57:30 +00:00
Rene Stadler
9530644a17 gst/gsttagsetter.c: Merging an empty list with another list in KEEP_ALL mode should yield an empty list as result and...
Original commit message from CVS:
Patch by: Rene Stadler <mail at renestadler de>
* gst/gsttagsetter.c: (gst_tag_setter_merge_tags):
Merging an empty list with another list in KEEP_ALL mode should
yield an empty list as result and not the second list (#512578).
* tests/check/gst/gsttagsetter.c:
Add unit test for tag merge modes and the aforementioned bug.
2008-04-13 19:58:43 +00:00
José Alburquerque
f273ee8c4b Add gst_pad_add_*_probe_full() functions with a notify callback that lets the caller free the data it passes to the p...
Original commit message from CVS:
Based on patch by: José Alburquerque <jaalburqu at svn dot gnome dot org>
* gst/gstutils.c: (gst_pad_add_data_probe),
(gst_pad_add_data_probe_full), (gst_pad_add_event_probe),
(gst_pad_add_event_probe_full), (gst_pad_add_buffer_probe),
(gst_pad_add_buffer_probe_full):
* gst/gstutils.h:
* docs/gst/gstreamer-sections.txt:
* win32/common/libgstreamer.def:
Add gst_pad_add_*_probe_full() functions with a notify callback that
lets the caller free the data it passes to the probe functions. This
is useful for bindings such as gst-python or gstreamermm (#526814).
API: gst_pad_add_data_probe_full
API: gst_pad_add_buffer_probe_full
API: gst_pad_add_event_probe_full
* tests/check/gst/gstutils.c:
Add minimal unit test to make sure freeing the data actually works
as expected.
* tests/benchmarks/.cvsignore:
Random cvsignore addendum.
2008-04-10 20:46:51 +00:00
Tim-Philipp Müller
ede8ee12bb gst/gstindex.*: Don't free key strings which we don't own. Fixes crash in gst_index_entry_free() (#522741).
Original commit message from CVS:
* gst/gstindex.c: (gst_index_entry_free):
* gst/gstindex.h:
Don't free key strings which we don't own. Fixes crash in
gst_index_entry_free() (#522741).
* tests/check/Makefile.am:
* tests/check/gst/.cvsignore:
* tests/check/gst/gstindex.c: (test_index_entries),
(gst_index_suite), (gst_index):
Add unit test for the above.
2008-03-17 10:21:59 +00:00
Ole André Vadla Ravnås
8a6042989a Remove GstPollMode from the API, it does not make sense to let the application control this.
Original commit message from CVS:
Patch by: Ole André Vadla Ravnås
<ole dot andre dot ravnas at tandberg dot com>
* docs/gst/gstreamer-sections.txt:
* gst/gstpoll.c: (find_index), (gst_poll_free_winsock_event),
(gst_poll_update_winsock_event_mask), (gst_poll_new),
(gst_poll_free), (gst_poll_fd_init), (gst_poll_add_fd_unlocked),
(gst_poll_remove_fd), (gst_poll_fd_ctl_write),
(gst_poll_fd_ctl_read_unlocked), (gst_poll_fd_has_closed),
(gst_poll_fd_has_error), (gst_poll_fd_can_read_unlocked),
(gst_poll_fd_can_write), (gst_poll_wait),
(gst_poll_set_controllable), (gst_poll_restart),
(gst_poll_set_flushing):
* gst/gstpoll.h:
* libs/gst/net/gstnetclientclock.c: (gst_net_client_clock_new):
* libs/gst/net/gstnettimeprovider.c: (gst_net_time_provider_start),
(gst_net_time_provider_new):
* plugins/elements/gstfdsink.c: (gst_fd_sink_start):
* plugins/elements/gstfdsrc.c: (gst_fd_src_start):
* tests/benchmarks/gstpollstress.c: (main):
* tests/check/gst/gstpoll.c: (GST_START_TEST), (gst_poll_suite):
Remove GstPollMode from the API, it does not make sense to let the
application control this.
Add support for Win32.
Fix the testsuite. Fixes #520671.
2008-03-07 15:39:45 +00:00
Andy Wingo
391d9dfc9e tests/check/gst/gststructure.c (GST_START_TEST): Add a check for the new warning.
Original commit message from CVS:

2008-03-03  Andy Wingo  <wingo@pobox.com>

* tests/check/gst/gststructure.c (GST_START_TEST): Add a check for
the new warning.

* gst/gststructure.c (gst_structure_from_string): Warn if
structure_from_string didn't consume the whole string, but the
caller did not provide an end pointer.
2008-03-03 10:07:21 +00:00
Tim-Philipp Müller
97bf2d2d78 gst/gstinterface.c: Don't crash if the element supports the interface queried, but does not implement GstImplementsIn...
Original commit message from CVS:
* gst/gstinterface.c: (gst_element_implements_interface):
Don't crash if the element supports the interface queried, but does
not implement GstImplementsInterface. Fixes #519584.
* tests/check/Makefile.am:
* tests/check/gst/.cvsignore:
* tests/check/gst/gstinterface.c:
Add unit test for the above.
2008-02-29 18:38:54 +00:00
Sebastian Dröge
58cc2ede0a And correct even more valid sparse warnings.
Original commit message from CVS:
* gst/gstelementfactory.h:
* tests/check/elements/fakesink.c:
* tests/check/elements/fakesrc.c: (setup_fakesrc):
* tests/check/elements/fdsrc.c: (setup_fdsrc):
* tests/check/elements/filesink.c: (setup_filesink):
* tests/check/elements/filesrc.c: (setup_filesrc):
* tests/check/elements/identity.c: (setup_identity):
* tests/check/elements/tee.c:
* tests/check/generic/sinks.c:
* tests/check/generic/states.c: (setup), (teardown):
* tests/check/gst/gst.c:
* tests/check/gst/gstabi.c:
* tests/check/gst/gstbin.c:
* tests/check/gst/gstbus.c: (pull_messages):
* tests/check/gst/gstcaps.c:
* tests/check/gst/gstelement.c:
* tests/check/gst/gstevent.c:
* tests/check/gst/gstghostpad.c:
* tests/check/gst/gstiterator.c:
* tests/check/gst/gstmessage.c:
* tests/check/gst/gstminiobject.c: (my_foo_init):
* tests/check/gst/gstobject.c: (thread_name_object),
(gst_object_suite):
* tests/check/gst/gstpad.c:
* tests/check/gst/gstplugin.c:
* tests/check/gst/gstpoll.c:
* tests/check/gst/gstquery.c:
* tests/check/gst/gstsegment.c:
* tests/check/gst/gststructure.c:
* tests/check/gst/gstsystemclock.c:
* tests/check/gst/gsttask.c:
* tests/check/gst/gstutils.c:
* tests/check/gst/gstvalue.c:
* tests/check/gst/struct_hppa.h:
* tests/check/gst/struct_i386.h:
* tests/check/gst/struct_ppc32.h:
* tests/check/gst/struct_ppc64.h:
* tests/check/gst/struct_x86_64.h:
* tests/check/libs/adapter.c: (create_and_fill_adapter):
* tests/check/libs/basesrc.c:
* tests/check/libs/controller.c: (GST_START_TEST):
* tests/check/libs/gdp.c:
* tests/check/libs/gstnetclientclock.c:
* tests/check/libs/gstnettimeprovider.c:
* tests/check/libs/libsabi.c:
* tests/check/libs/struct_hppa.h:
* tests/check/libs/struct_i386.h:
* tests/check/libs/struct_ppc32.h:
* tests/check/libs/struct_ppc64.h:
* tests/check/libs/struct_x86_64.h:
* tests/check/pipelines/cleanup.c:
* tests/check/pipelines/simple-launch-lines.c:
* tests/check/pipelines/stress.c:
And correct even more valid sparse warnings.
* win32/common/libgstreamer.def:
Add gst_poll_fd_init to the list of symbols.
2008-02-29 13:59:24 +00:00
Sebastian Dröge
b997b0545a Correct all relevant warnings found by the sparse semantic code analyzer. This include marking several symbols static...
Original commit message from CVS:
* gst/gstconfig.h.in:
* libs/gst/base/gstcollectpads.c: (gst_collect_pads_read_buffer):
* libs/gst/check/gstcheck.c: (gst_check_log_message_func),
(gst_check_log_critical_func), (gst_check_drop_buffers),
(gst_check_element_push_buffer_list):
* libs/gst/controller/gstcontroller.c: (gst_controller_get),
(gst_controller_get_type):
* libs/gst/controller/gsthelper.c: (gst_object_control_properties),
(gst_object_get_controller), (gst_object_get_control_source):
* libs/gst/controller/gstinterpolationcontrolsource.c:
(gst_interpolation_control_source_new):
* libs/gst/controller/gstlfocontrolsource.c:
(gst_lfo_control_source_new):
* libs/gst/dataprotocol/dataprotocol.c:
(gst_dp_event_from_packet_0_2):
* plugins/elements/gstfdsrc.c:
* plugins/elements/gstmultiqueue.c:
* plugins/elements/gsttee.c:
* plugins/elements/gsttypefindelement.c:
* plugins/indexers/gstfileindex.c: (_file_index_id_save_xml),
(gst_file_index_add_association):
* plugins/indexers/gstmemindex.c:
* tests/benchmarks/gstpollstress.c: (mess_some_more):
* tests/check/elements/queue.c: (setup_queue):
* tests/check/gst/gstpipeline.c:
* tests/check/libs/collectpads.c: (setup), (teardown),
(gst_collect_pads_suite):
* tests/examples/adapter/adapter_test.c:
* tests/examples/metadata/read-metadata.c: (make_pipeline):
* tests/examples/xml/createxml.c:
* tests/examples/xml/runxml.c:
* tools/gst-inspect.c:
* tools/gst-run.c:
Correct all relevant warnings found by the sparse semantic code
analyzer. This include marking several symbols static, using
NULL instead of 0 for pointers, not using variable sized arrays
on the stack, moving variable declarations to the beginning of
a block and using "foo (void)" instead of "foo ()" for declarations.
2008-02-29 12:41:33 +00:00
Sebastian Dröge
c483eb5489 plugins/elements/: Don't reset GstPollFDs, this is not necessary at all.
Original commit message from CVS:
* plugins/elements/gstfdsink.c: (gst_fd_sink_update_fd):
* plugins/elements/gstfdsrc.c: (gst_fd_src_update_fd):
Don't reset GstPollFDs, this is not necessary at all.
* tests/check/gst/gstpoll.c: (test_poll_wait), (GST_START_TEST),
(delayed_restart), (delayed_control):
Use GST_POLL_FD_INIT.
2008-02-29 12:05:55 +00:00
Sebastian Dröge
4c31dc7cc4 Initialize some uninitialized variables as spotted by valgrind.
Original commit message from CVS:
* plugins/elements/gstfdsink.c: (gst_fd_sink_start),
(gst_fd_sink_update_fd):
* plugins/elements/gstfdsrc.c: (gst_fd_src_update_fd):
* tests/check/gst/gstpoll.c: (test_poll_wait), (GST_START_TEST),
(delayed_restart), (delayed_control):
Initialize some uninitialized variables as spotted by valgrind.
2008-02-28 19:58:26 +00:00
Wim Taymans
d37ee60f47 configure.ac: Add checks for poll, ppoll and pselect.
Original commit message from CVS:
* configure.ac:
Add checks for poll, ppoll and pselect.
* docs/gst/gstreamer-docs.sgml:
* docs/gst/gstreamer-sections.txt:
Add docs for GstPoll.
* gst/Makefile.am:
* gst/gst.h:
* gst/gstpoll.c: (find_index), (selectable_fds),
(pollable_timeout), (choose_mode), (pollfd_to_fd_set),
(fd_set_to_pollfd), (gst_poll_new), (gst_poll_free),
(gst_poll_set_mode), (gst_poll_get_mode),
(gst_poll_add_fd_unlocked), (gst_poll_add_fd),
(gst_poll_remove_fd), (gst_poll_fd_ctl_write),
(gst_poll_fd_ctl_read_unlocked), (gst_poll_fd_ctl_read),
(gst_poll_fd_has_closed), (gst_poll_fd_has_error),
(gst_poll_fd_can_read_unlocked), (gst_poll_fd_can_read),
(gst_poll_fd_can_write), (gst_poll_wait),
(gst_poll_set_controllable), (gst_poll_restart),
(gst_poll_set_flushing):
* gst/gstpoll.h:
Add generic poll abstraction. We ideally don't want to have this in core
here but in glib intead...
This code will be used in various network elements and ultimately for
the nanosecond precision monotonic clock (that's why it's here in core).
It'll allow us to implement cancelable socket operations for windows too.
* tests/check/Makefile.am:
* tests/check/gst/gstpoll.c: (test_poll_wait), (GST_START_TEST),
(delayed_stop), (delayed_restart), (delayed_flush),
(delayed_control), (gst_poll_suite):
Add GstPoll unit test.
2008-02-27 18:00:04 +00:00
Stefan Kost
3060854ebb tests/check/gst/gstevent.c: Add qos to the event test. Rename tcase/tsuite; is not only about custom events.
Original commit message from CVS:
* tests/check/gst/gstevent.c:
Add qos to the event test. Rename tcase/tsuite; is not only about
custom events.
2008-02-21 10:30:50 +00:00
Sebastian Dröge
2faa733276 Revert previous changes to the behaviour of GstPadTemplates, etc and the possiblity to call them in class_init as it ...
Original commit message from CVS:
* gst/gstbin.c: (gst_bin_get_type), (gst_bin_base_init),
(gst_bin_class_init):
* gst/gstelement.c: (gst_element_base_class_init),
(gst_element_class_add_pad_template):
* gst/gstpadtemplate.c: (gst_pad_template_init):
* gst/gstpipeline.c: (gst_pipeline_get_type),
(gst_pipeline_base_init), (gst_pipeline_class_init):
* libs/gst/base/gstbasesink.c:
* libs/gst/base/gstbasesrc.c: (gst_base_src_get_type),
(gst_base_src_base_init), (gst_base_src_class_init):
* plugins/elements/gstcapsfilter.c: (gst_capsfilter_base_init),
(gst_capsfilter_class_init):
* plugins/elements/gstfakesink.c: (gst_fake_sink_base_init),
(gst_fake_sink_class_init):
* plugins/elements/gstfakesrc.c: (gst_fake_src_base_init),
(gst_fake_src_class_init):
* plugins/elements/gstfdsink.c: (gst_fd_sink_base_init),
(gst_fd_sink_class_init):
* plugins/elements/gstfdsrc.c: (gst_fd_src_base_init),
(gst_fd_src_class_init):
* plugins/elements/gstfilesink.c: (gst_file_sink_base_init),
(gst_file_sink_class_init):
* plugins/elements/gstfilesrc.c: (gst_file_src_base_init),
(gst_file_src_class_init):
* plugins/elements/gstidentity.c: (gst_identity_base_init),
(gst_identity_class_init):
* plugins/elements/gstmultiqueue.c: (gst_multi_queue_base_init),
(gst_multi_queue_class_init):
* plugins/elements/gstqueue.c: (gst_queue_base_init),
(gst_queue_class_init):
* plugins/elements/gsttee.c: (gst_tee_base_init),
(gst_tee_class_init):
* plugins/elements/gsttypefindelement.c:
(gst_type_find_element_base_init),
(gst_type_find_element_class_init):
* tests/check/gst/gstelement.c: (gst_element_suite):
Revert previous changes to the behaviour of GstPadTemplates, etc
and the possiblity to call them in class_init as it breaks too
many elements. Reopens bug #491501.
Should be applied again for 0.11, thus added a few FIXME 0.11 at
several places.
2008-02-05 14:15:15 +00:00
Thijs Vermeir
bb3dfba3f5 Be sure that we have a new copy of the caps and not reffed caps from a template
Original commit message from CVS:
* gst/gstpad.c:
* tests/check/gst/gstpad.c:
Be sure that we have a new copy of the caps and not
reffed caps from a template
2008-02-04 14:14:42 +00:00
Sebastian Dröge
86e45df860 gst/: Make it possible (and recommended) to set element details and add pad templates in the class_init functions by ...
Original commit message from CVS:
* gst/gstelement.c: (gst_element_base_class_init),
(gst_element_class_add_pad_template):
* gst/gstpadtemplate.c:
Make it possible (and recommended) to set element details and add
pad templates in the class_init functions by copying the details/pad
templates in GstElement's base_init.
Also make it possible to replace existing pad templates by adding
a new one with the same name. This was done in a hackish fashion
in same elements before already.
Don't reference pad templates that are added a second time. A
new pad template has a refcount of one and is not floating anymore
and to be owned by the element's class. Make this more explicit by
mentioning it in the docs of gst_element_class_add_pad_template().
These changes are backwards compatible. Fixes bug #491501.
* tests/check/gst/gstelement.c:
Add unit test for setting element details, adding pad templates and
replacing them in a subclass.
2008-02-03 10:48:01 +00:00
Tim-Philipp Müller
22cf61b56e gst/gstplugin.c: Fix old-style static plugins via GST_PLUGIN_DEFINE_STATIC again, which I broke two commits ago when ...
Original commit message from CVS:
* gst/gstplugin.c: (_gst_plugin_initialize):
Fix old-style static plugins via GST_PLUGIN_DEFINE_STATIC
again, which I broke two commits ago when changing the API
of gst_plugin_register_static(): the g_list_foreach() in
_gst_plugin_register_static still assumed the old function
signature and would therefore fail (re-fixes #510187).
* gst/gstplugin.c: (_num_static_plugins), (_static_plugins),
(_gst_plugin_register_static), (gst_plugin_register_static):
Revert the (technically correct) change to call g_thread_init() from
the pre-main() constructor. This will break programs which call
g_thread_init() without an if (!g_thread_supported()) guard in their
main function. We could just blame it on GLib or the application, but
it's probably best to just avoid this altogether and simply not use
any GLib functions here and use plain old malloc() with a simple
array to store the plugins to register later when gst_init() is
finally called (re-fixes #510187).
* tests/check/gst/gstplugin.c: (GST_GNUC_CONSTRUCTOR_DEFINED),
(GST_GNUC_CONSTRUCTOR_DEFINED), (plugin_init_counter),
(plugin1_init), (plugin2_init), (plugin3_init), (GST_START_TEST),
(GST_START_TEST), (gst_plugin_suite):
Dumb unit test to make sure the old GST_PLUGIN_DEFINE_STATIC still
works.
2008-01-20 15:04:33 +00:00
Tim-Philipp Müller
33cd142292 gst/: Change API of gst_plugin_register_static() to not take a GstPluginDesc, but rather just take all the arguments ...
Original commit message from CVS:
* gst/gst.c: (init_post):
* gst/gstplugin.c: (_gst_plugin_register_static),
(gst_plugin_register_static), (_gst_plugin_initialize):
* gst/gstplugin.h: (GstPluginFilter):
Change API of gst_plugin_register_static() to not take
a GstPluginDesc, but rather just take all the arguments
in a GstPluginDesc directly. This is more intuitive and
avoids certain mistakes when porting code from
GST_PLUGIN_DEFINE_STATIC to gst_plugin_register_static().
Fixes #510187.
* tests/check/gst/gstplugin.c:
Fix up for changed API.
2008-01-17 22:17:15 +00:00
Jan Schmidt
f2c36159ef gst/gst.c: _gst_trace_on is already provided by gsttrace.h, no need to declare it ourselves.
Original commit message from CVS:
* gst/gst.c:
_gst_trace_on is already provided by gsttrace.h, no need to declare
it ourselves.
* docs/libs/gstreamer-libs-sections.txt:
Add 'buffers', 'check_cond' and 'check_mutex' from libgstcheck
and remove strange tcase_add_test which is outputting a warning.
* libs/gst/check/gstcheck.c:
* libs/gst/check/gstcheck.h:
Properly declare 'buffers', 'check_cond', 'check_mutex' extern
and define them in gstcheck.c instead of having every .c file whcih
includes gstcheck.h be defining its own copy and relying on symbol
interposing to marry them all, which doesn't work on Solaris.
* tests/check/elements/identity.c: (GST_START_TEST):
Don't define 'buffers' locally, it comes from libgstcheck.
* tests/check/generic/sinks.c: (send_buffer):
Fix type of variable (GstFlowReturn, not GstStateChangeReturn)
* tests/check/gst/gststructure.c: (GST_START_TEST):
* tests/check/gst/gstsystemclock.c: (GST_START_TEST):
* tests/check/gst/gstutils.c: (GST_START_TEST):
* tests/check/gst/gstvalue.c: (GST_START_TEST):
Add a bunch of casts to make various constants fit the types
they're being assigned to.
2008-01-12 20:22:30 +00:00
Tim-Philipp Müller
4a3f163052 API: add gst_plugin_register_static() and deprecate
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gst.c: (init_post):
* gst/gstplugin.c: (_gst_plugin_register_static),
(gst_plugin_register_static), (_gst_plugin_initialize),
(gst_plugin_register_func):
* gst/gstplugin.h: (GST_PLUGIN_DEFINE_STATIC):
API: add gst_plugin_register_static() and deprecate
GST_PLUGIN_DEFINE_STATIC, since it's not portable
(#498924).
Also, in _gst_plugin_register_static(), make sure to call
g_thread_init() before calling GLib functions such as
g_list_append() if we're not initialised yet, since that
may lead to random crashes with older GSlice/GLib versions.
* tests/check/gst/gstplugin.c:
Adapt unit test to above changes.
2008-01-09 18:23:39 +00:00
Alexis Ballier
91a59d5af5 tests/check/: Decide which header to include based on the userland ABI target and not the kernel/cpu. Fix up structur...
Original commit message from CVS:
Patch by: Alexis Ballier <aballier at gentoo org>
* tests/check/gst/gstabi.c:
* tests/check/gst/struct_ppc64.h:
* tests/check/libs/libsabi.c:
* tests/check/libs/struct_ppc64.h:
Decide which header to include based on the userland ABI target
and not the kernel/cpu. Fix up structure sizes of ppc64 header
for 64-bit userland (#503590).  Might need something similar for
x86 too.
2008-01-07 09:47:49 +00:00
Wim Taymans
96d28a501f gst/gstpad.c: Really unlink the peer pad instead of setting the peer pointer to NULL when we dispose the pad.
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_dispose):
Really unlink the peer pad instead of setting the peer pointer to NULL
when we dispose the pad.
This correctly calls the unlink functions and makes sure that the peer
does not have a handle to invalid memory. See #504671.
* tests/check/gst/gstpad.c: (GST_START_TEST), (gst_pad_suite):
Add testsuite for above case.
2007-12-21 13:54:07 +00:00
Wim Taymans
a332964e6c docs/design/part-synchronisation.txt: Small updates.
Original commit message from CVS:
* docs/design/part-synchronisation.txt:
Small updates.
* gst/gstsegment.c: (gst_segment_set_seek),
(gst_segment_set_newsegment_full), (gst_segment_to_stream_time),
(gst_segment_to_running_time):
The seek format can be different from the segment format when the start
and stop values are not to be updated, when we only do a rate change for
example.
* tests/check/gst/gstsegment.c: (GST_START_TEST),
(gst_segment_suite):
Add a testcase for the rate-only seeks, checking that the format is
correctly ignored when start and stop are not updated.
2007-12-19 12:48:18 +00:00
Stefan Kost
42e6f9e77c tests/check/gst/gstbin.c: Adjust the test to the refcount change two days ago.
Original commit message from CVS:
* tests/check/gst/gstbin.c:
Adjust the test to the refcount change two days ago.
2007-12-15 14:42:25 +00:00
Tim-Philipp Müller
cf86e1a0a0 gst/gststructure.c: Don't crash in _from_string() if the structure name is not valid (fixes #501560). Allow structur...
Original commit message from CVS:
* gst/gststructure.c: (gst_structure_validate_name),
(gst_structure_new_valist), (gst_structure_parse_value),
(gst_structure_from_string):
Don't crash in _from_string() if the structure name is not valid
(fixes #501560).  Allow structure names to start with a number
again (this apparently broke the ubuntu codec installer).
* tests/check/gst/gststructure.c: (GST_START_TEST), (GST_START_TEST),
(GST_START_TEST):
Add unit test for the crash; update unit tests for new behaviour.
2007-12-08 12:54:53 +00:00
Wim Taymans
0e0caaf16a Start merging in the easy bits of #361155, the monotonic clock patch.
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstclock.h:
* tests/check/gst/gstsystemclock.c: (GST_START_TEST),
(gst_systemclock_suite):
Start merging in the easy bits of #361155, the monotonic clock patch.
This one adds a few handy macros with docs and a testsuite.
2007-11-28 10:58:39 +00:00
Stefan Kost
d8e77f9bf8 gst/gstevent.c: Little documentation improvment.
Original commit message from CVS:
* gst/gstevent.c:
Little documentation improvment.
* gst/gstpreset.c:
More TODO cleanups. Remove c++ comments.
* libs/gst/controller/gstcontroller.c:
Add TODO and use quark from static string.
* tests/check/gst/gstmessage.c:
* tests/check/gst/gststructure.c:
Use quark from static string.
2007-11-17 17:50:21 +00:00
Wim Taymans
c28238d8fe gst/gstsegment.c: Also accumulate time correctly when doing reverse playback. Fixes #488201,
Original commit message from CVS:
* gst/gstsegment.c: (gst_segment_set_newsegment_full),
(gst_segment_to_stream_time), (gst_segment_to_running_time):
Also accumulate time correctly when doing reverse playback. Fixes
#488201,
When converting to running and stream time, use default values for
start/stop/time/accum when comparing different formats. Fixes #494245.
* libs/gst/base/gstbasesink.c: (gst_base_sink_get_sync_times):
Do running/stream time in TIME format.
* tests/check/gst/gstsegment.c: (GST_START_TEST),
(gst_segment_suite):
2 new unit tests for segment accumulation.
2007-11-09 11:56:41 +00:00
Jan Schmidt
b1ad4a6772 tests/check/gst/gstobject.c: Disable silly racy test that always fails on this combination of CPU and kernel.
Original commit message from CVS:
* tests/check/gst/gstobject.c:
Disable silly racy test that always fails on this combination of CPU
and kernel.
2007-11-06 00:59:54 +00:00
Jan Schmidt
d7cbd5de33 Use a custom export symbol regex for libgstcheck, as it needs to export symbols that don't match the standard GStream...
Original commit message from CVS:
* configure.ac:
* libs/gst/check/Makefile.am:
Use a custom export symbol regex for libgstcheck, as it needs
to export symbols that don't match the standard GStreamer gst_*
pattern, and  --export-dynamic is not portable (only works on
GNU ld)
* libs/gst/check/gstcheck.c: (gst_check_setup_src_pad),
(gst_check_setup_sink_pad):
Make sure to pass a message parameter to the fail_* macros.
* tests/check/gst/gstinfo.c: (GST_START_TEST):
Fix some compiler warnings.
2007-10-25 14:50:48 +00:00
Tim-Philipp Müller
bff7cbd845 tests/check/gst/gststructure.c: Disable test that checks that white spaces are not allowed in structure names or fiel...
Original commit message from CVS:
* tests/check/gst/gststructure.c: (test_to_string):
Disable test that checks that white spaces are not allowed
in structure names or field names, since we need to
support that for now for backwards compatibility reasons.
2007-10-25 14:41:01 +00:00
Edgard Lima
0e3a0fdf35 Added GstStructure to gst_value_table and its related functions.
Original commit message from CVS:

* gst/gstcaps.c: (gst_caps_to_string),
(gst_caps_from_string_inplace):
* gst/gststructure.c: (gst_structure_get_abbrs),
(gst_structure_to_string), (gst_structure_from_string):
* gst/gstvalue.c: (gst_value_set_structure),
(gst_value_get_structure), (gst_value_serialize_structure),
(gst_value_deserialize_structure), (_gst_value_initialize):
* gst/gstvalue.h:
* tests/check/gst/gststructure.c: (GST_START_TEST),
(gst_structure_suite):
* tests/check/gst/gstvalue.c: (GST_START_TEST):
Added GstStructure to gst_value_table and its related functions.
Changed gst_structure_to_string to print ';' in the end.
Changed gst_caps_to_string to not print ';' beteween its
fields (structures) anymore and remove the lastes ';' from latest
structure. Now it is possible to have nested structures.
In addition, backward compatibilty is assured by accepting '\0' as
end delimiter. Fixes: #487969.
API: add gst_value_set_structure()
API: add gst_value_get_structure()
2007-10-22 08:53:26 +00:00
Tim-Philipp Müller
13c6e89d6c API: add gst_bus_pop_filtered
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstbus.c:
* gst/gstbus.h:
API: add gst_bus_pop_filtered
API: add gst_bus_timed_pop_filtered
Two new functions for waiting for specific message types on the
bus for a specified amount of time without iterating any main
loops or main contexts.
* tests/check/gst/gstbus.c:
Some tests for the new functions.
2007-10-16 20:30:13 +00:00
Stefan Kost
2b4644f737 Revert serialisation change and constrain structure-names after consensus on irc. Update api documentation to reflect...
Original commit message from CVS:
* gst/gststructure.c:
* tests/check/gst/gststructure.c:
Revert serialisation change and constrain structure-names after
consensus on irc. Update api documentation to reflect the change.
2007-10-16 13:58:43 +00:00
Stefan Kost
38cdd26ec8 gst/gststructure.c: Improve serialization and fix tests.
Original commit message from CVS:
* gst/gststructure.c:
Improve serialization and fix tests.
* tests/check/gst/gststructure.c:
Add another test that covers why I actually did the previous structure
change.
2007-10-16 06:32:07 +00:00
Tim-Philipp Müller
653cd3d701 tests/check/gst/gststructure.c: Add unit test for escaping of structure name when serialising and deserialising to/fr...
Original commit message from CVS:
* tests/check/gst/gststructure.c:
Add unit test for escaping of structure name when serialising
and deserialising to/from strings.
2007-10-15 11:58:16 +00:00
Tim-Philipp Müller
362d7872dd tests/check/gst/gsturi.c: Also check for the other file URI variant on win32.
Original commit message from CVS:
* tests/check/gst/gsturi.c:
Also check for the other file URI variant on win32.
2007-09-12 16:35:48 +00:00
Tim-Philipp Müller
3f967a8b04 gst/gsturi.c: If there's no hostname, we want to return 'c:/foo/bar.txt' and not '/c:/foo/bar.txt' on Windows. Fixes ...
Original commit message from CVS:
* gst/gsturi.c: (gst_uri_get_location):
If there's no hostname, we want to return 'c:/foo/bar.txt'
and not '/c:/foo/bar.txt' on Windows. Fixes #469402.
* tests/check/gst/gsturi.c:
Unit test for the above and a few more things.
2007-09-12 12:36:51 +00:00
Stefan Kost
33f966fede tests/check/gst/gstsystemclock.c: Cleanup the test a little (use gst-logging and not g_message). Improve test to chec...
Original commit message from CVS:
* tests/check/gst/gstsystemclock.c:
Cleanup the test a little (use gst-logging and not g_message). Improve
test to check if a wait reached the target.
2007-09-11 13:43:53 +00:00
Wim Taymans
a0274c10a7 gst/gststructure.c: Fix fraction list fixation code. Take the fraction with the smallest difference with the target i...
Original commit message from CVS:
* gst/gststructure.c:
(gst_structure_fixate_field_nearest_fraction):
Fix fraction list fixation code. Take the fraction with the smallest
difference with the target instead of the first one in the list.
* tests/check/gst/gststructure.c: (GST_START_TEST),
(gst_structure_suite):
Added test to verify correct fraction list fixation behaviour.
2007-09-05 01:00:50 +00:00
Jan Schmidt
e2b34e1551 tests/check/gst/gstbin.c: Fix leaks in the new unit test.
Original commit message from CVS:
* tests/check/gst/gstbin.c: (GST_START_TEST):
Fix leaks in the new unit test.
2007-08-24 14:55:46 +00:00
Wim Taymans
ebf770154f gst/gstbin.c: Improve debugging.
Original commit message from CVS:
* gst/gstbin.c: (is_eos), (gst_bin_add_func),
(bin_handle_async_start), (gst_bin_handle_message_func):
Improve debugging.
When adding elements, insert messages into the bus of the newly added
element and make sure the element is the source of the message. This
allows the parent bin to intercept the message and do the
right thing. It also avoids us posting ASYNC_START and CLOCK_PROVIDE
messages to the app (which is not allowed).
Update some docs.
* tests/check/gst/gstghostpad.c: (GST_START_TEST):
Fix testsuite so that is does not work around messages that should not
have been posted in the first place.
2007-08-16 11:04:40 +00:00
Wim Taymans
5059e9f8bd gst/gstbin.c: Fix annoying bug in the sorted iterator where a sink that is not really a sink (when it has downstream ...
Original commit message from CVS:
* gst/gstbin.c: (add_to_queue), (remove_from_queue), (clear_queue),
(update_degree), (gst_bin_sort_iterator_next):
Fix annoying bug in the sorted iterator where a sink that is not really
a sink (when it has downstream links) screwed up the iterator.
* tests/check/gst/gstbin.c: (GST_START_TEST), (gst_bin_suite):
Unit test to verify the fix.
2007-08-16 10:27:16 +00:00
Tim-Philipp Müller
cf8abdf3a3 gst/gststructure.c: When deserialising foo=bar without a type cast, check if it's a boolean before falling back to a ...
Original commit message from CVS:
* gst/gststructure.c: (gst_structure_parse_value):
When deserialising foo=bar without a type cast, check if it's a
boolean before falling back to a string type, otherwise things like
audiotestsrc ! audio/x-raw-int,signed=true ! fakesink won't work,
because the filtercaps end up having a signed=(string)true field,
which causes problems later when intersection caps.
* tests/check/gst/gststructure.c: (GST_START_TEST):
Add a unit test for this.
2007-07-08 14:11:53 +00:00
Tim-Philipp Müller
505f3889ca API: add GstParamSpecFraction, so elements can have fraction properties without lots of painful string parsing (#4446...
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/Makefile.am:
* gst/gst.c:
* gst/gst.h:
* gst/gstparamspecs.c: (_gst_param_fraction_init),
(_gst_param_fraction_set_default), (_gst_param_fraction_validate),
(_gst_param_fraction_values_cmp),
(gst_param_spec_fraction_get_type), (gst_param_spec_fraction):
* gst/gstparamspecs.h:
* gst/gstvalue.c:
* tests/check/Makefile.am:
* tests/check/gst/.cvsignore:
* tests/check/gst/gstparamspecs.c: (gst_dummy_obj_base_init),
(gst_dummy_obj_class_init), (gst_dummy_obj_init),
(gst_dummy_obj_set_property), (gst_dummy_obj_get_property),
(GST_START_TEST), (gst_param_spec_suite):
API: add GstParamSpecFraction, so elements can have fraction
properties without lots of painful string parsing (#444648).
2007-06-06 11:18:12 +00:00
Wim Taymans
74fb9f0fe2 tests/check/gst/gstbin.c: Allow refcount of 3 and 4 because some state thread might still be busy with it.
Original commit message from CVS:
* tests/check/gst/gstbin.c: (GST_START_TEST):
Allow refcount of 3 and 4 because some state thread might still be busy
with it.
2007-05-24 11:50:47 +00:00
Wim Taymans
20c719ae81 tests/check/gst/gstsystemclock.c: Improve test_async_order to also work when both timers are already expired when we ...
Original commit message from CVS:
* tests/check/gst/gstsystemclock.c: (store_callback),
(GST_START_TEST):
Improve test_async_order to also work when both timers are already
expired when we get scheduled to check it.
2007-05-23 13:56:25 +00:00
Jan Schmidt
8482f46afe tests/check/gst/gstbuffer.c: Disable part of the gst_buffer_try_new_and_alloc test, because it can happily succeed on...
Original commit message from CVS:
* tests/check/gst/gstbuffer.c: (GST_START_TEST):
Disable part of the gst_buffer_try_new_and_alloc test, because
it can happily succeed on 64-bit systems where there's more address
space available.
2007-05-21 14:50:51 +00:00
Sebastian Dröge
375534ed10 tests/check/gst/gstpad.c: Add unit test for the improved caps checking from bug #421543.
Original commit message from CVS:
* tests/check/gst/gstpad.c: (GST_START_TEST), (gst_pad_suite):
Add unit test for the improved caps checking from bug #421543.
2007-05-21 12:05:56 +00:00
Tim-Philipp Müller
7f1acfb0c8 gst/gsturi.c: Don't leak plugin feature.
Original commit message from CVS:
* gst/gsturi.c: (gst_element_make_from_uri):
Don't leak plugin feature.
* tests/check/Makefile.am:
* tests/check/gst/.cvsignore:
* tests/check/gst/gsturi.c: (GST_START_TEST), (gst_uri_suite):
Add brain-dead unit test.
2007-05-11 14:46:10 +00:00
Tim-Philipp Müller
2c5a8cdb31 API: add gst_buffer_try_new_and_alloc() plus unit test (#431940).
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstbuffer.c: (gst_buffer_try_new_and_alloc):
* gst/gstbuffer.h:
* tests/check/gst/gstbuffer.c: (GST_START_TEST),
(gst_buffer_suite):
API: add gst_buffer_try_new_and_alloc() plus unit test (#431940).
2007-04-26 10:00:49 +00:00
Wim Taymans
79e426d5f9 tests/check/gst/gstsystemclock.c: Unref some more to make valgrind happy.
Original commit message from CVS:
* tests/check/gst/gstsystemclock.c: (GST_START_TEST),
(mixed_thread), (mixed_async_cb), (gst_systemclock_suite):
Unref some more to make valgrind happy.
2007-03-22 12:31:54 +00:00
Wim Taymans
94054fc1b7 gst/gstsystemclock.c: Fix anoying regression that survived a few releases. When adding an async entry while blocking ...
Original commit message from CVS:
* gst/gstsystemclock.c: (gst_system_clock_id_wait_jitter_unlocked),
(gst_system_clock_id_wait_jitter),
(gst_system_clock_id_wait_async), (gst_system_clock_id_unschedule):
Fix anoying regression that survived a few releases. When adding an
async entry while blocking on a sync entry, the sync entry will unblock
but still be busy, so it should continue to wait instead of returning
_BUSY to the app.
Add some comments here and there.
* tests/check/gst/gstsystemclock.c: (mixed_thread),
(mixed_async_cb), (GST_START_TEST), (gst_systemclock_suite):
Add testcase for this.
2007-03-22 11:58:08 +00:00
Wim Taymans
d14c4c4a67 docs/gst/gstreamer-sections.txt: Add new element field and method.
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
Add new element field and method.
* gst/gstbin.c: (gst_bin_class_init), (gst_bin_init),
(bin_remove_messages), (gst_bin_add_func), (gst_bin_remove_func),
(gst_bin_recalc_state), (gst_bin_get_state_func),
(gst_bin_element_set_state), (gst_bin_change_state_func),
(gst_bin_continue_func), (bin_bus_handler),
(bin_push_state_continue), (bin_handle_async_start),
(bin_handle_async_done), (gst_bin_handle_message_func):
Make async state changes a bit smarter by using new ASYNC_START and
ASYNC_DONE messages. This reduces the number of times we run the state
recalculation thread.
Don't change state of element with a pending ASYNC_START message.
Deprecate STATE_DIRTY messages.
* gst/gstelement.c: (gst_element_init), (gst_element_send_event),
(gst_element_get_state_func), (gst_element_continue_state),
(gst_element_lost_state), (gst_element_set_state_func),
(gst_element_change_state):
* gst/gstelement.h:
Keep the state that was last set by the app in a new element field.
Don't allow state changes when handling an element event.
Post ASYNC_START and ASYNC_DONE messages.
Change lost_state so that we go to PAUSED and wait for the parent to set
us to PLAYING again (so latency calculation can be performed)
Export gst_element_change_state() method so that subclasses can use it.
API: gst_element_change_state()
API: GST_STATE_TARGET
* gst/gstpipeline.c: (gst_pipeline_class_init),
(reset_stream_time), (gst_pipeline_change_state),
(gst_pipeline_handle_message), (gst_pipeline_set_new_stream_time):
Using the new ASYNC_START message we can reset the base_time when
needed. This can then be used to implement base_time redistribution in
flushing seeks so that we can remove the explicit seek handling.
Perform latency query and configuration when going to PLAYING.
* libs/gst/base/gstbasesink.c: (gst_base_sink_commit_state),
(gst_base_sink_query), (gst_base_sink_change_state):
Post new ASYNC_START/ASYNC_DONE messages.
* tests/check/generic/sinks.c: (GST_START_TEST):
Fix test because the bin will not set the async element to PLAYING right
away.
* tests/check/gst/gstbin.c: (pop_async_done), (GST_START_TEST):
Make the message check a little stronger.
Handle ASYNC messages.
* tests/check/pipelines/cleanup.c: (GST_START_TEST):
* tests/check/pipelines/simple-launch-lines.c: (GST_START_TEST):
Expect ASYNC_DONE messages.
2007-03-19 10:47:56 +00:00
Wim Taymans
b864edefbd libs/gst/base/gstbasesink.c: Improve latency query code.
Original commit message from CVS:
* libs/gst/base/gstbasesink.c: (gst_base_sink_query_latency),
(gst_base_sink_queue_object_unlocked), (gst_base_sink_send_event),
(gst_base_sink_change_state):
Improve latency query code.
Don't leak latency events.
* tests/check/gst/gstbin.c: (GST_START_TEST):
Improve debugging.
2007-02-28 16:46:07 +00:00
Wim Taymans
7553c996a4 API: gst_bus_timed_pop()
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstbus.c: (gst_bus_init), (gst_bus_dispose), (gst_bus_post),
(gst_bus_timed_pop), (gst_bus_pop):
* gst/gstbus.h:
API: gst_bus_timed_pop()
Implement gst_bus_timed_pop() to do a blocking timed wait for a
message to arrive on the bus.
* tests/check/gst/gstbus.c: (GST_START_TEST), (pop_thread),
(gst_bus_suite):
Two unit tests for new _timed_pop() function.
2007-02-27 17:22:07 +00:00
Wim Taymans
6f24e3101e tests/check/gst/gstevent.c: Improve debugging.
Original commit message from CVS:
* tests/check/gst/gstevent.c: (event_probe), (test_event),
(GST_START_TEST):
Improve debugging.
2007-02-15 08:40:38 +00:00
Wim Taymans
e683477828 tests/check/gst/gstsegment.c: Fix check
Original commit message from CVS:
* tests/check/gst/gstsegment.c: (GST_START_TEST):
Fix check
2007-02-13 15:51:00 +00:00
Andy Wingo
96d9b88bbc tests/check/: Add ABI checks for PPC32.
Original commit message from CVS:
2007-02-09  Andy Wingo  <wingo@pobox.com>

* tests/check/Makefile.am (noinst_HEADERS):
* tests/check/libs/libsabi.c:
* tests/check/libs/struct_ppc32.h: Add ABI checks for PPC32.
* tests/check/gst/gstabi.c:
* tests/check/gst/struct_ppc32.h: Add ABI checks for PPC32.
2007-02-09 13:59:32 +00:00
Tim-Philipp Müller
7cd0c45ee0 tests/check/: Add ABI structs for HPPA (see #393796).
Original commit message from CVS:
* tests/check/gst/gstabi.c:
* tests/check/gst/struct_hppa.h:
* tests/check/libs/libsabi.c:
* tests/check/libs/struct_hppa.h:
Add ABI structs for HPPA (see #393796).
2007-01-17 12:31:01 +00:00
Stefan Kost
5826d1676c tests/check/gst/gsttask.c: Fix header comment.
Original commit message from CVS:
* tests/check/gst/gsttask.c:
Fix header comment.
2007-01-15 14:51:09 +00:00
Tim-Philipp Müller
52a29f5bb4 tests/check/: Add minimal unit test for beforementioned GstTagSetter bug.
Original commit message from CVS:
* tests/check/Makefile.am:
* tests/check/gst/.cvsignore:
* tests/check/gst/gsttagsetter.c: (gst_dummy_enc_add_interfaces),
(gst_dummy_enc_base_init), (gst_dummy_enc_class_init),
(gst_dummy_enc_init), (tag_list_foreach), (tag_setter_list_length),
(GST_START_TEST), (gst_tag_setter_suite):
Add minimal unit test for beforementioned GstTagSetter bug.
2007-01-12 10:53:54 +00:00
Tim-Philipp Müller
4a911a8100 tests/check/gst/gstpad.c: Fix 'make check' too.
Original commit message from CVS:
* tests/check/gst/gstpad.c: (test_get_allowed_caps):
Fix 'make check' too.
2007-01-11 10:48:59 +00:00
Tim-Philipp Müller
702fbf77e9 API: add gst_update_registry() (#391296).
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gst.c: (load_plugin_func), (scan_and_update_registry),
(init_post), (gst_deinit), (gst_update_registry):
* gst/gst.h:
API: add gst_update_registry() (#391296).
* tests/check/Makefile.am:
* tests/check/gst/gstregistry.c:
* tests/check/gst/.cvsignore:
Simple unit test for the above.
2007-01-08 20:30:12 +00:00
Tim-Philipp Müller
2991d5cd33 gst/gstregistry.c: Plugin extension on HP-UX is .sl, add that to the list of approved plugin extensions (see #393796).
Original commit message from CVS:
* gst/gstregistry.c: (gst_registry_scan_path_level):
Plugin extension on HP-UX is .sl, add that to the list of approved
plugin extensions (see #393796).
* tests/check/gst/gstpad.c: (GST_START_TEST):
ulong => gulong. Fixes compilation with HP-UX compiler.
* tests/check/pipelines/parse-launch.c: (GST_START_TEST):
Fix compilation if valgrind headers are not available.
2007-01-08 16:23:03 +00:00
Edward Hervey
f65a1d384e gst/gstsegment.c: Fine tune the cases where the segment start/stop values are really updated.
Original commit message from CVS:
* gst/gstsegment.c: (gst_segment_set_seek):
Fine tune the cases where the segment start/stop values are really
updated.
* tests/check/gst/gstsegment.c: (GST_START_TEST):
Add tests for the return values of gst_segment_set_seek().
2006-12-19 12:38:00 +00:00
Jan Schmidt
5a79cb9ede tests/check/gst/gstbin.c: It is acceptable to have a refcount of 2 or 3 at this point in the test, because the pipeli...
Original commit message from CVS:
* tests/check/gst/gstbin.c: (GST_START_TEST):
It is acceptable to have a refcount of 2 or 3 at this point in the
test, because the pipeline might be just posting its state_change
message. The next line then waits for that message to appear using
bus_poll, so that should be fine too.
2006-12-09 20:23:10 +00:00
René Stadler
a258e87342 gst/gstclock.c: Make period ids add the interval to the origial requested time instead of the possibly updated time w...
Original commit message from CVS:
Patch by: René Stadler <mail at renestadler dot de>
* gst/gstclock.c: (gst_clock_id_wait):
Make period ids add the interval to the origial requested time instead
of the possibly updated time which can be wrong when there are multiple
waiters for the same id. Fixes #382592.
* gst/gstsystemclock.c: (gst_system_clock_async_thread),
(gst_system_clock_id_wait_jitter_unlocked),
(gst_system_clock_id_wait_jitter):
Fix restart in the async notify thread when an async entry is added to
the front of the list. Fixes #381492.
* tests/check/gst/gstsystemclock.c: (store_callback),
(notify_callback), (GST_START_TEST), (gst_systemclock_suite):
Added test for multiple async waits.
Added test for async wait order.
2006-12-07 10:51:36 +00:00
Wim Taymans
f830f6f4ac gst/gstsegment.c: Fix boundary checking in to_running_time() and to_stream_time().
Original commit message from CVS:
* gst/gstsegment.c: (gst_segment_set_seek),
(gst_segment_set_newsegment_full), (gst_segment_to_stream_time),
(gst_segment_to_running_time):
Fix boundary checking in to_running_time() and to_stream_time().
Fixes #377183.
* tests/check/gst/gstsegment.c: (GST_START_TEST):
stream and running time can now be calculated for the complete
clipped segment.
2006-11-20 10:27:49 +00:00
Stefan Kost
234221776e tests/check/gst/gsttag.c: relicence (okay with author=company)
Original commit message from CVS:
* tests/check/gst/gsttag.c:
relicence (okay with author=company)
2006-11-06 15:22:40 +00:00
Tim-Philipp Müller
c7fc3dc0e8 gst/gststructure.c: If someone tries to set a non-UTF8 string field on a structure, don't just print a warning, but a...
Original commit message from CVS:
* gst/gststructure.c: (gst_structure_id_set_value):
If someone tries to set a non-UTF8 string field on a structure,
don't just print a warning, but also ignore the request and do
not change/add that field to the structure.
* tests/check/gst/gsttag.c: (GST_START_TEST), (gst_tag_suite):
Test for the above.
2006-10-26 08:49:52 +00:00
Wim Taymans
0a53651b1f gst/gstevent.c: Rename some more @cur to @start to fix docs.
Original commit message from CVS:
* gst/gstevent.c: (gst_event_new_seek), (gst_event_parse_seek):
Rename some more @cur to @start to fix docs.
* gst/gstsegment.c: (gst_segment_set_seek):
Fix typo.
time and start must always stay in sync as defined in design doc.
* gst/gsttaglist.c: (gst_tag_list_is_empty):
Rename param to fix docs.
* tests/check/gst/gstsegment.c: (GST_START_TEST):
Check that start and time are in sync.
* tests/check/pipelines/parse-launch.c:
(gst_parse_test_element_change_state):
Activate pad before adding to the element.
2006-10-09 17:15:39 +00:00
Wim Taymans
89814eed61 docs/design/part-qos.txt: Fix typo.
Original commit message from CVS:
* docs/design/part-qos.txt:
Fix typo.
* gst/gstevent.c:
* gst/gstevent.h:
Update seek event docs regarding negative rates.
Rename @cur to @start.
* gst/gstsegment.c: (gst_segment_set_seek):
* gst/gstsegment.h:
Update set_seek docs regarding negative rates.
Correctly update last_stop to @stop when dealing with negative
rates.
Rename @cur to @start.
* tests/check/gst/gstpad.c: (GST_START_TEST):
Activate pads before trying to use them.
* tests/check/gst/gstsegment.c: (GST_START_TEST),
(gst_segment_suite):
Add simple check for segments and negative rates.
2006-10-09 16:33:29 +00:00
Tim-Philipp Müller
3a8fdc1d39 API: add gst_tag_list_is_empty() (#360467).
Original commit message from CVS:
* gst/gsttaglist.c: (gst_tag_list_is_empty):
* gst/gsttaglist.h:
* docs/gst/gstreamer-sections.txt:
API: add gst_tag_list_is_empty() (#360467).
* tests/check/gst/gsttag.c: (GST_START_TEST):
And a test case.
2006-10-09 11:20:44 +00:00
Tim-Philipp Müller
35ae6c7472 gst/gsttaglist.*: Minor fixes to GST_IS_TAG_LIST and gst_is_tag_list().
Original commit message from CVS:
* gst/gsttaglist.c: (gst_is_tag_list):
* gst/gsttaglist.h:
Minor fixes to GST_IS_TAG_LIST and gst_is_tag_list().
* tests/check/gst/gsttag.c: (GST_START_TEST), (gst_tag_suite):
Small test for the above.
2006-10-07 18:41:19 +00:00
Wim Taymans
15b2ccbcc9 tests/check/gst/gstghostpad.c: Fix leak in check.
Original commit message from CVS:
* tests/check/gst/gstghostpad.c: (GST_START_TEST),
(gst_ghost_pad_suite):
Fix leak in check.
2006-10-02 16:46:16 +00:00
Alessandro Decina
86a6abe32d gst/gstevent.c: Fix gst_mini_object_make_writable() and gst_event_copy() for events with event structures by setting ...
Original commit message from CVS:
Patch by: Alessandro Decina  <alessandro at nnva org>
* gst/gstevent.c: (_gst_event_copy):
Fix gst_mini_object_make_writable() and gst_event_copy() for events
with event structures by setting the parent refcount address of the
copied structure to the address of the refcount member of the newly
copied event rather than the address of the refcount member of the
original event. Fixes #358737.
* tests/check/gst/gstevent.c: (GST_START_TEST):
Unit test for the above.
2006-10-02 08:37:24 +00:00
Tim-Philipp Müller
b74d2e83a6 tests/check/gst/gstcaps.c: Add some tests for gst_caps_intersect().
Original commit message from CVS:
* tests/check/gst/gstcaps.c: (GST_START_TEST), (gst_caps_suite):
Add some tests for gst_caps_intersect().
* tools/gst-launch.c: (event_loop):
Print all buffering percentages we get, even the 100% one.
2006-09-27 09:23:18 +00:00
Tim-Philipp Müller
f3c07d5d20 gst/gstformat.c: Fix locking order (must take lock before using n_values).
Original commit message from CVS:
* gst/gstformat.c: (gst_format_register):
Fix locking order (must take lock before using n_values).
* gst/gstvalue.c: (gst_value_serialize_enum),
(gst_value_deserialize_enum_iter_cmp),
(gst_value_deserialize_enum):
Fix serialisation/deserialisation of custom registered GstFormats.
* tests/check/gst/gstvalue.c: (GST_START_TEST), (gst_value_suite):
Unit test for custom format serialisation/deserialisation.
2006-09-17 19:26:16 +00:00
Wim Taymans
bb634398b7 gst/: Small cleanups in docs and code.
Original commit message from CVS:
* gst/gstobject.c: (gst_object_set_parent):
* gst/gstpipeline.c: (do_pipeline_seek):
Small cleanups in docs and code.
* gst/gstsegment.c: (gst_segment_clip):
* tests/check/gst/gstsegment.c: (GST_START_TEST):
if stop == start and start is in the segment, no clipping should be
done. Also add a test for this.
2006-09-15 08:43:44 +00:00
Wim Taymans
47e5ba2f15 docs/design/part-gstghostpad.txt: Update ascii art in documentation.
Original commit message from CVS:
* docs/design/part-gstghostpad.txt:
Update ascii art in documentation.
* gst/gstghostpad.c: (gst_proxy_pad_do_internal_link),
(gst_proxy_pad_set_target_unlocked), (gst_proxy_pad_init),
(gst_ghost_pad_parent_set), (gst_ghost_pad_parent_unset),
(gst_ghost_pad_internal_do_activate_push),
(gst_ghost_pad_internal_do_activate_pull),
(gst_ghost_pad_do_activate_push), (gst_ghost_pad_do_activate_pull),
(gst_ghost_pad_do_link), (gst_ghost_pad_do_unlink),
(gst_ghost_pad_dispose), (gst_ghost_pad_new_full),
(gst_ghost_pad_set_target):
Small cleanups and leak fixes.
Remove some checks now that the internal pad is never NULL.
Fix the case where linking pads without a target would create nasty
criticals. Fixes #341029.
Don't assign a GstPadLinkReturn to a gboolean and mess up the return
value of _set_target().
* tests/check/gst/gstghostpad.c: (GST_START_TEST),
(gst_ghost_pad_suite):
Some more tests for creating and linking untargeted ghostpads.
2006-08-31 15:19:44 +00:00
Edward Hervey
ce6e126d47 Refactored *_new() functions.
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstghostpad.c: (gst_proxy_pad_do_getcaps),
(gst_proxy_pad_do_setcaps), (gst_proxy_pad_set_target_unlocked),
(gst_proxy_pad_dispose), (gst_ghost_pad_new_full),
(gst_ghost_pad_new_no_target), (gst_ghost_pad_new),
(gst_ghost_pad_new_from_template),
(gst_ghost_pad_new_no_target_from_template):
* gst/gstghostpad.h:
Refactored *_new() functions.
Templates are now used as a g_object_new() parameter.
Use template in _do_getcaps() if we don't have a target.
Small documentation cleanups.
Added two new constructors:
gst_ghost_pad_new_from_template()
gst_ghost_pad_new_no_target_from_template()
* tests/check/gst/gstghostpad.c: (GST_START_TEST),
(gst_ghost_pad_suite):
Added tests for new ghostpad instanciation functions.
API additions: gst_ghost_pad_new_from_template,
gst_ghost_pad_new_no_target_from_template
2006-08-31 10:59:11 +00:00
Tim-Philipp Müller
ab00f16f12 gst/gstxml.c: Improve and detypofy docs.
Original commit message from CVS:
* gst/gstxml.c:
Improve and detypofy docs.
* tests/check/Makefile.am:
* tests/check/gst/.cvsignore:
* tests/check/gst/gstxml.c: (GST_START_TEST), (gst_xml_suite):
Add a basic test suite for GstXML.
2006-08-29 10:49:03 +00:00
Wim Taymans
a0dbcd9ee4 gst/gstcaps.*: Fix docs and indentation again.
Original commit message from CVS:
* gst/gstcaps.c: (gst_caps_merge_structure):
* gst/gstcaps.h:
Fix docs and indentation again.
* tests/check/gst/gstquery.c: (GST_START_TEST):
Fix leak in tests and add some more tests.
2006-08-28 16:39:20 +00:00
Torsten Schoenfeld
481238cfce Initialize variables when creating a new segment query.
Original commit message from CVS:
Patch by: Torsten Schoenfeld <kaffeetisch at gmx dot de>
* gst/gstquery.c: (gst_query_new_segment):
* tests/check/gst/gstquery.c: (GST_START_TEST):
Initialize variables when creating a new segment query.
Fixes #353121.
2006-08-28 08:44:29 +00:00
Torsten Schoenfeld
7fc02489e3 Check for NULL before _reffing the bus. Fixes #353122.
Original commit message from CVS:
Patch by: Torsten Schoenfeld <kaffeetisch at gmx dot de>
* gst/gstelement.c: (gst_element_get_bus):
* tests/check/gst/gstelement.c: (GST_START_TEST):
Check for NULL before _reffing the bus. Fixes #353122.
2006-08-28 08:35:31 +00:00
Tim-Philipp Müller
e8578fd5cf tests/check/gst/gstcaps.c: Don't leak caps in unit test; add a few more simple checks.
Original commit message from CVS:
* tests/check/gst/gstcaps.c: (GST_START_TEST):
Don't leak caps in unit test; add a few more simple
checks.
2006-08-24 12:30:04 +00:00
Stefan Kost
fc8d184bba implement caps merging (fixes #352580)
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstcaps.c: (gst_caps_structure_is_subset_field),
(gst_caps_structure_is_subset), (gst_caps_merge),
(gst_caps_merge_structure):
* gst/gstcaps.h:
* libs/gst/base/gstbasetransform.c:
(gst_base_transform_transform_caps):
* tests/check/gst/gstcaps.c: (GST_START_TEST), (gst_caps_suite):
implement caps merging (fixes #352580)
2006-08-24 10:40:31 +00:00
Wim Taymans
87a78cc03d gst/gstbuffer.c: Copy duration/offset_end/caps when creating a subbuffer of the complete parent.
Original commit message from CVS:
* gst/gstbuffer.c: (gst_buffer_make_metadata_writable),
(gst_buffer_create_sub):
Copy duration/offset_end/caps when creating a subbuffer of the
complete parent.
Make the subbuffer read-only when we make the metadata writable for
now. Fixes #351768.
* tests/check/gst/gstbuffer.c: (GST_START_TEST):
Added check for metadata copy when creating subbuffers.
2006-08-21 09:30:04 +00:00
Edward Hervey
b19d19a8b6 tests/check/gst/gstinfo.c: Disable test that require gstdebug if it wasn't built in core.
Original commit message from CVS:
* tests/check/gst/gstinfo.c: (gst_info_suite):
Disable test that require gstdebug if it wasn't built in core.
2006-08-18 13:41:02 +00:00
Tim-Philipp Müller
a8714f5195 gst/gstutils.c: Fix memleak (#351502).
Original commit message from CVS:
* gst/gstutils.c: (gst_util_set_value_from_string):
Fix memleak (#351502).
* tests/check/gst/gstutils.c: (GST_START_TEST), (gst_utils_suite):
Add unit test for most of gst_util_set_value_from_string()
(not that one would want to encourage use of this function).
2006-08-15 18:45:39 +00:00
Tim-Philipp Müller
87e578704a gst/gstinfo.c: Make GST_PTR_FORMAT print messages as well.
Original commit message from CVS:
* gst/gstinfo.c: (gst_debug_print_object):
Make GST_PTR_FORMAT print messages as well.
* tests/check/gst/gstinfo.c: (printf_extension_log_func),
(GST_START_TEST), (gst_info_suite):
More tests.
2006-08-14 17:29:31 +00:00
Tim-Philipp Müller
4a33367208 tests/check/: Let's enable the new unit test as well.
Original commit message from CVS:
* tests/check/Makefile.am:
* tests/check/gst/.cvsignore:
Let's enable the new unit test as well.
2006-08-09 15:26:54 +00:00
Tim-Philipp Müller
57212633aa API: add GST_SEGMENT_FORMAT, which is a printf extension we register that lets us easily dump GstSegments into debug ...
Original commit message from CVS:
* configure.ac:
* docs/gst/gstreamer-sections.txt:
* gst/gstconfig.h.in:
* gst/gstinfo.c: (_gst_debug_init), (gst_debug_print_segment),
(_gst_info_printf_extension_ptr),
(_gst_info_printf_extension_segment):
API: add GST_SEGMENT_FORMAT, which is a printf extension we
register that lets us easily dump GstSegments into debug
logs (#350419).
* tests/check/gst/gstinfo.c: (segment_printf_extension_log_func),
(info_segment_format_printf_extension), (gst_info_suite):
Add simple unit test that logs a bunch of different segments (not
valgrinded at the moment because of leaks in gst_debug_add_log_function).
2006-08-09 15:13:14 +00:00
Wim Taymans
6487eb661e gst/gstvalue.c: Fix GstValueList comparison code. Fixes #347293.
Original commit message from CVS:
* gst/gstvalue.c: (gst_value_compare_list):
Fix GstValueList comparison code. Fixes #347293.
* tests/check/gst/gstvalue.c: (GST_START_TEST):
Check to test GstValueList comparison.
2006-07-31 16:34:41 +00:00
Jan Schmidt
bc3daae9c2 gst/gstelementfactory.c: Remove unnecessary ref/unref pair
Original commit message from CVS:
* gst/gstelementfactory.c: (gst_element_factory_create):
Remove unnecessary ref/unref pair
* gst/parse/grammar.y:
Make sure to free the parse buffer on all code paths.
Move a g_free up to the error handler where it's easier to see.
* tests/check/gst/gstevent.c: (test_event):
Extending timeout for downstream travelling events to 10 seconds to
hopefully avoid intermittent failure on the buildbots.
* tests/check/pipelines/parse-launch.c: (run_delayed_test):
Don't manually set the state of the src element - it will happen as a
natural consequence of the pipeline changing state, and that way it
will do it in the right order too.
2006-07-31 15:07:30 +00:00
Wim Taymans
626d7a1fb2 tests/check/gst/gstpad.c: Fix leak in test.
Original commit message from CVS:
* tests/check/gst/gstpad.c: (GST_START_TEST):
Fix leak in test.
2006-07-21 10:38:53 +00:00
Antoine Tremblay
147c3d0ef6 gst/gstutils.c: Free iterator when done (#347311).
Original commit message from CVS:
Patch by: Antoine Tremblay <hexa00 at gmail com>
* gst/gstutils.c: (gst_element_unlink):
Free iterator when done (#347311).
* tests/check/gst/gstutils.c: (GST_START_TEST), (gst_utils_suite):
And add a test case for this.
2006-07-14 16:20:18 +00:00
Jan Schmidt
7e61004213 Make GstValueArray comparison be order dependent as designed.
Original commit message from CVS:
* gst/gstvalue.c: (gst_value_compare_list),
(gst_value_compare_array), (_gst_value_initialize):
* tests/check/gst/gstvalue.c: (GST_START_TEST):
Make GstValueArray comparison be order dependent as designed.
Add checks for value lists and value array comparisons.
Fixes #347221
2006-07-11 20:14:20 +00:00
Edward Hervey
4f9d5adb40 gst/gstbin.c: (de)activate src pads before calling state_change on the childs.
Original commit message from CVS:
* gst/gstbin.c: (activate_pads),
(iterator_activate_fold_with_resync), (gst_bin_src_pads_activate),
(gst_bin_change_state_func):
(de)activate src pads before calling state_change on the childs.
This is to avoid the case where a src ghostpad is blocked (holding the
stream lock), which would block the deactivation of the ghostpad's
target pad.
* gst/gstghostpad.c: (gst_proxy_pad_do_query_type),
(gst_proxy_pad_do_event), (gst_proxy_pad_do_query),
(gst_proxy_pad_do_internal_link), (gst_proxy_pad_do_bufferalloc),
(gst_proxy_pad_do_chain), (gst_proxy_pad_do_getrange),
(gst_proxy_pad_do_checkgetrange), (gst_proxy_pad_do_getcaps),
(gst_proxy_pad_do_acceptcaps), (gst_proxy_pad_do_fixatecaps),
(gst_proxy_pad_do_setcaps), (gst_proxy_pad_set_target_unlocked),
(gst_proxy_pad_set_target), (gst_proxy_pad_get_internal),
(gst_proxy_pad_dispose), (gst_proxy_pad_init),
(gst_ghost_pad_parent_set), (gst_ghost_pad_parent_unset),
(gst_ghost_pad_class_init),
(gst_ghost_pad_internal_do_activate_push),
(gst_ghost_pad_internal_do_activate_pull),
(gst_ghost_pad_do_activate_push), (gst_ghost_pad_do_activate_pull),
(gst_ghost_pad_do_link), (gst_ghost_pad_do_unlink),
(gst_ghost_pad_dispose), (gst_ghost_pad_new_no_target),
(gst_ghost_pad_new), (gst_ghost_pad_set_target):
GhostPads now create their internal GstProxyPad at creation (and not
when they're linked, as it was being done previously).
The internal and target pads are linked straight away.
The data will also travel through the other pad in order to make
pad blocking and probes non-hackish (the probe/block now really happens
on the GhostPad and not on the target).
* gst/gstpad.c: (gst_pad_set_blocked_async),
(gst_pad_link_prepare), (gst_pad_push_event):
Remove previous ghostpad cruft.
* gst/gstutils.c: (gst_pad_add_data_probe),
(gst_pad_add_event_probe), (gst_pad_add_buffer_probe),
(gst_pad_remove_data_probe), (gst_pad_remove_event_probe),
(gst_pad_remove_buffer_probe):
Remove previous ghost pad cruft.
Added more detailed debug statements.
* tests/check/gst/gstghostpad.c: (GST_START_TEST):
Fix the testsuite for refcounting changes.
The comments about who has references were correct, but the refcount
being checked wasn't the same (!?!).
2006-07-11 16:20:09 +00:00
Tim-Philipp Müller
ea60952f06 gst/gstobject.c: Random micro-optimisation: don't use a hash table with strings as keys and the usual strdup/strcmp i...
Original commit message from CVS:
* gst/gstobject.c: (gst_object_set_name_default),
(gst_object_set_name):
Random micro-optimisation: don't use a hash table
with strings as keys and the usual strdup/strcmp
involved, but rather just use the GQuark of the
type name as key, since it needs to be looked up
anyway to get the type name string.
* tests/check/gst/gstobject.c: (GST_START_TEST):
Fix various leaks.
2006-07-07 17:16:26 +00:00
Wim Taymans
fa9bb7929e No point in checking if the size of the subbuffer > 0, the code handles it correclty as demonstrated by unit test.
Original commit message from CVS:
* gst/gstbuffer.c: (_gst_buffer_copy), (gst_buffer_create_sub):
* tests/check/gst/gstbuffer.c: (GST_START_TEST),
(gst_buffer_suite):
No point in checking if the size of the subbuffer > 0, the
code handles it correclty as demonstrated by unit test.
Also add a unit test for the zero sized _new_and_alloc and
_copy. Fixes #346663.
2006-07-05 17:09:18 +00:00
Thomas Vander Stichele
c2491a1e2d fix leak
Original commit message from CVS:
fix leak
2006-07-03 11:10:43 +00:00
Edward Hervey
4999836f48 gst/gstpad.c: Implement pad blocking on events according to part-block.txt.
Original commit message from CVS:
* gst/gstpad.c: (handle_pad_block), (gst_pad_push_event):
Implement pad blocking on events according to part-block.txt.
More comments on behaviour.
* tests/check/gst/gstevent.c: (test_event):
Send event to peer pad of blocked pad (else it will block).
2006-07-03 10:30:49 +00:00
Thomas Vander Stichele
cb65f3e99f moap ignore
Original commit message from CVS:
moap ignore
2006-07-02 22:20:20 +00:00
Thomas Vander Stichele
23b4355665 tests/check/gst/gstbin.c: add a test for adding self
Original commit message from CVS:
* tests/check/gst/gstbin.c: (GST_START_TEST), (gst_bin_suite):
add a test for adding self
2006-07-02 22:17:31 +00:00
Thomas Vander Stichele
f8fa84b087 libs/gst/check/gstcheck.h: add some assert_ as alias for fail_unless_*
Original commit message from CVS:
* libs/gst/check/gstcheck.h:
add some assert_ as alias for fail_unless_*
* tests/check/gst/gst.c: (GST_START_TEST), (gst_suite):
increase test coverage
2006-07-02 22:05:48 +00:00
Thomas Vander Stichele
df244744a5 unbreak test
Original commit message from CVS:
unbreak test
2006-07-02 12:57:19 +00:00
Thomas Vander Stichele
5d47eca524 gst/gstcaps.c: whitespace fixes
Original commit message from CVS:
* gst/gstcaps.c: (gst_caps_compare_structures):
whitespace fixes
* tests/check/gst/gstbuffer.c: (GST_START_TEST):
* tests/check/gst/gstcaps.c: (GST_START_TEST), (gst_caps_suite):
add more tests
2006-07-02 12:54:03 +00:00
Thomas Vander Stichele
cceab6ee95 tests/check/gst/gststructure.c: Push coverage from 59.04% to 70.00%
Original commit message from CVS:
* tests/check/gst/gststructure.c: (GST_START_TEST),
(gst_structure_suite):
Push coverage from 59.04% to 70.00%
2006-07-02 08:26:48 +00:00
Thomas Vander Stichele
64086e2970 tests/check/: use the new macro
Original commit message from CVS:
* tests/check/elements/fakesink.c:
* tests/check/elements/fakesrc.c:
* tests/check/elements/fdsrc.c:
* tests/check/elements/identity.c:
* tests/check/generic/sinks.c: (gst_sinks_suite):
* tests/check/generic/states.c:
* tests/check/gst/gst.c:
* tests/check/gst/gstabi.c:
* tests/check/gst/gstbin.c:
* tests/check/gst/gstbuffer.c: (gst_buffer_suite):
* tests/check/gst/gstbus.c: (gst_bus_suite):
* tests/check/gst/gstcaps.c: (GST_START_TEST):
* tests/check/gst/gstelement.c:
* tests/check/gst/gstevent.c: (gst_event_suite):
* tests/check/gst/gstghostpad.c:
* tests/check/gst/gstiterator.c: (gst_iterator_suite):
* tests/check/gst/gstmessage.c: (gst_message_suite):
* tests/check/gst/gstminiobject.c:
* tests/check/gst/gstobject.c:
* tests/check/gst/gstpad.c:
* tests/check/gst/gstpipeline.c:
* tests/check/gst/gstplugin.c:
* tests/check/gst/gstquery.c: (gst_query_suite):
* tests/check/gst/gstsegment.c: (gst_segment_suite):
* tests/check/gst/gststructure.c:
* tests/check/gst/gstsystemclock.c:
* tests/check/gst/gsttag.c:
* tests/check/gst/gsttask.c: (gst_task_suite):
* tests/check/gst/gstutils.c:
* tests/check/gst/gstvalue.c:
* tests/check/libs/adapter.c:
* tests/check/libs/basesrc.c:
* tests/check/libs/collectpads.c:
* tests/check/libs/controller.c:
* tests/check/libs/gdp.c: (gst_dp_suite):
* tests/check/libs/gstnetclientclock.c:
* tests/check/libs/gstnettimeprovider.c:
* tests/check/libs/libsabi.c: (libsabi_suite):
* tests/check/libs/typefindhelper.c:
* tests/check/pipelines/cleanup.c:
* tests/check/pipelines/parse-launch.c:
* tests/check/pipelines/simple-launch-lines.c:
* tests/check/pipelines/stress.c: (stress_suite):
use the new macro
2006-07-01 20:56:56 +00:00
Wim Taymans
479ef6daa5 tests/check/gst/gstghostpad.c: Added some more ghostpad tests, mainly blocking and probes.
Original commit message from CVS:
* tests/check/gst/gstghostpad.c: (block_callback),
(GST_START_TEST), (gst_ghost_pad_suite):
Added some more ghostpad tests, mainly blocking
and probes.
2006-06-20 08:40:40 +00:00
Thomas Vander Stichele
7b44d3ae2e ifdef LOADSAVE
Original commit message from CVS:
ifdef LOADSAVE
2006-06-06 16:52:59 +00:00
Thomas Vander Stichele
b6d24c014d tests/check/: add ppc64 structure sizes
Original commit message from CVS:
* tests/check/Makefile.am:
* tests/check/gst/gstabi.c:
* tests/check/gst/struct_ppc64.h:
* tests/check/libs/libsabi.c:
* tests/check/libs/struct_ppc64.h:
add ppc64 structure sizes
2006-06-06 14:10:09 +00:00
Thomas Vander Stichele
f6284c80cb tests/check/: generate and add structure size lists for x86_64
Original commit message from CVS:
* tests/check/Makefile.am:
* tests/check/gst/gstabi.c:
* tests/check/gst/struct_x86_64.h:
* tests/check/libs/libsabi.c:
* tests/check/libs/struct_x86_64.h:
generate and add structure size lists for x86_64
2006-06-06 13:59:10 +00:00
Thomas Vander Stichele
e036ea0995 libs/gst/check/gstcheck.*: factor out the method from tests that checks size of structures, and add code to generate ...
Original commit message from CVS:
* libs/gst/check/gstcheck.c: (gst_check_abi_list):
* libs/gst/check/gstcheck.h:
factor out the method from tests that checks size of structures,
and add code to generate the header containing these sizes
* tests/check/gst/gstabi.c: (GST_START_TEST):
* tests/check/gst/struct_i386.h:
* tests/check/libs/libsabi.c: (GST_START_TEST):
* tests/check/libs/struct_i386.h:
use it
2006-06-06 13:48:20 +00:00
Wim Taymans
8bec13ec53 gst/gstpad.*: Added _CUSTOM error and success GstFlowReturn that can be used be elements internally.
Original commit message from CVS:
* gst/gstpad.c: (gst_flow_get_name), (gst_flow_to_quark):
* gst/gstpad.h:
Added _CUSTOM error and success GstFlowReturn that can be
used be elements internally.
Added macro to check for SUCCESS flowreturns.
API: GST_FLOW_CUSTOM_SUCCESS
API: GST_FLOW_CUSTOM_ERROR
API: GST_FLOW_IS_SUCCESS
* tests/check/gst/gstpad.c: (GST_START_TEST), (gst_pad_suite):
Added check for GstFlowReturn sanity.
2006-05-23 11:13:51 +00:00
Thomas Vander Stichele
9e1111cb03 tests/check/gst/gststructure.c: add a test for a complete structure
Original commit message from CVS:
* tests/check/gst/gststructure.c: (GST_START_TEST),
(gst_structure_suite):
add a test for a complete structure
2006-05-22 13:34:03 +00:00
Thomas Vander Stichele
46de58b721 gst/gstvalue.c: fix a leak if no flags are set
Original commit message from CVS:

* gst/gstvalue.c: (gst_value_serialize_flags):
fix a leak if no flags are set
* tests/check/gst/gstvalue.c: (GST_START_TEST):
fix leak in tests
2006-05-10 15:38:53 +00:00
Thomas Vander Stichele
b4e05d624b gst/: make sure some essential types used by events are registered as part of gst_init()
Original commit message from CVS:
* gst/gstevent.c: (_gst_event_initialize):
* gst/gstformat.c: (_gst_format_initialize):
make sure some essential types used by events are registered
as part of gst_init()
* gst/gstvalue.c: (gst_value_serialize_flags):
if no flags are set, serialize them to a value that represents NONE
so that deserializing them works
* tests/check/gst/gstvalue.c: (GST_START_TEST), (gst_value_suite):
add tests for serialization and deserialization of flags
2006-05-10 14:05:46 +00:00
Tim-Philipp Müller
bd97801195 tests/check/gst/gstbuffer.c: Add test case for flags + gst_buffer_make_metadata_writable().
Original commit message from CVS:
* tests/check/gst/gstbuffer.c: (GST_START_TEST):
Add test case for flags + gst_buffer_make_metadata_writable().
2006-05-09 13:23:06 +00:00
Wim Taymans
b9dbb55105 docs/design/part-overview.txt: Make upsteam/downstream concepts more clear.
Original commit message from CVS:
* docs/design/part-overview.txt:
Make upsteam/downstream concepts more clear.
Give an example of serialized/non-serialized events.
* docs/design/part-events.txt:
* docs/design/part-streams.txt:
Mention applied_rate.
* docs/design/part-trickmodes.txt:
Mention applied rate, flesh out some more use cases.
* gst/gstevent.c: (gst_event_new_new_segment),
(gst_event_parse_new_segment), (gst_event_new_new_segment_full),
(gst_event_parse_new_segment_full), (gst_event_new_tag),
(gst_event_parse_tag), (gst_event_new_buffer_size),
(gst_event_parse_buffer_size), (gst_event_new_qos),
(gst_event_parse_qos), (gst_event_parse_seek),
(gst_event_new_navigation):
* gst/gstevent.h:
Add applied_rate field to NEWSEGMENT event.
API: gst_event_new_new_segment_full()
API: gst_event_parse_new_segment_full()
* gst/gstsegment.c: (gst_segment_init), (gst_segment_set_seek),
(gst_segment_set_newsegment), (gst_segment_set_newsegment_full),
(gst_segment_to_stream_time), (gst_segment_to_running_time):
* gst/gstsegment.h:
Add applied_rate to GstSegment structure.
Make calculation of stream_time and running_time more correct
wrt rate/applied_rate.
Add some more docs.
API: GstSegment::applied_rate field
API: gst_segment_set_newsegment_full();
* libs/gst/base/gstbasesink.c: (gst_base_sink_configure_segment),
(gst_base_sink_get_sync_times), (gst_base_sink_get_position):
* libs/gst/base/gstbasetransform.c:
(gst_base_transform_sink_eventfunc),
(gst_base_transform_handle_buffer):
Parse and use applied_rate in the GstSegment field.
* tests/check/gst/gstevent.c: (GST_START_TEST):
Add check for applied_rate field.
* tests/check/gst/gstsegment.c: (GST_START_TEST),
(gstsegments_suite):
Add more checks for various GstSegment operations.
2006-05-08 09:52:33 +00:00
Thomas Vander Stichele
da97c1dfe9 tests/check/gst/gstghostpad.c: add more asserts on refcounts do more cleanup at end of tests fix test leaks showing i...
Original commit message from CVS:
2006-04-29  Thomas Vander Stichele  <thomas at apestaart dot org>

* tests/check/gst/gstghostpad.c: (GST_START_TEST):
add more asserts on refcounts
do more cleanup at end of tests
fix test leaks showing in FC5
2006-04-29 00:33:44 +00:00
Wim Taymans
14a89b387e gst/gstutils.c: Added some more docs.
Original commit message from CVS:
* gst/gstutils.c: (push_and_ref):
Added some more docs.
Fix refcount issue whith gst_element_found_tags() helper
function. Fixes #338335
* tests/check/gst/gstutils.c: (GST_START_TEST), (gst_utils_suite):
Added testsuite for gst_element_found_tags().
2006-04-28 15:48:50 +00:00
Wim Taymans
1089154f2a gst/gstvalue.c: Don't try to serialize a GValue with a NULL buffer.
Original commit message from CVS:
* gst/gstvalue.c: (gst_value_serialize_buffer),
(gst_value_deserialize_buffer):
Don't try to serialize a GValue with a NULL buffer.
Fixes #339821.
* tests/check/gst/gstvalue.c: (GST_START_TEST), (gst_value_suite):
Added check for serialisation of NULL buffers.
2006-04-28 13:13:23 +00:00
Wim Taymans
4c9ba80be2 tests/check/gst/gstelement.c: Don't leak the factory.
Original commit message from CVS:
* tests/check/gst/gstelement.c: (GST_START_TEST):
Don't leak the factory.
2006-04-12 11:58:43 +00:00
Wim Taymans
05aa66eb42 gst/gstelementfactory.c: Some cleanups.
Original commit message from CVS:
* gst/gstelementfactory.c: (gst_element_register),
(gst_element_factory_create), (gst_element_factory_make):
Some cleanups.
Fixed a FIXME.
Updated docs (Fixes #131079)
* gst/gstpluginfeature.c: (gst_plugin_feature_load):
Small cleanups.
* tests/check/gst/gstelement.c: (GST_START_TEST),
(gst_element_suite):
Added testcase for elementfactory class field.
2006-04-11 11:47:39 +00:00
Michael Smith
763b2d3278 tests/check/gst/gstghostpad.c: Unref a pad we reffed.
Original commit message from CVS:
* tests/check/gst/gstghostpad.c: (GST_START_TEST):
Unref a pad we reffed.
* tests/check/gst/gstutils.c: (GST_START_TEST):
Unref bins
2006-04-05 15:12:39 +00:00
Thomas Vander Stichele
07bb30df7e disable some tests when we don't have a registry
Original commit message from CVS:

* configure.ac:
* tests/check/Makefile.am:
disable some tests when we don't have a registry
* tests/check/gst/gstutils.c: (gst_utils_suite):
don't build the part that needs parsing
2006-03-21 19:27:15 +00:00
Edward Hervey
067db77499 gst/: gst_[buffer|event|message]_ref() macros are replaced by a static inline functions because gcc-4.1 will about if...
Original commit message from CVS:
* gst/gstbuffer.h:
* gst/gstevent.h:
* gst/gstmessage.h:
gst_[buffer|event|message]_ref() macros are replaced by a static
inline functions because gcc-4.1 will about if the return value
isn't used.
* tests/check/gst/gstevent.c: (event_probe):
gst_event_ref now has to be given a GstEvent* , fix check accordingly.
2006-03-21 13:50:52 +00:00
Wim Taymans
99a61247bc gst/gstclock.*: Review docs.
Original commit message from CVS:
* gst/gstclock.c: (gst_clock_entry_new),
(gst_clock_id_compare_func), (gst_clock_id_wait),
(gst_clock_id_wait_async), (gst_clock_id_unschedule),
(gst_clock_init), (gst_clock_get_internal_time),
(gst_clock_set_master), (do_linear_regression),
(gst_clock_add_observation), (gst_clock_set_property):
* gst/gstclock.h:
Review docs.
Small cleanups.
Fix a possible segfault when the window-size is made smaller.
Calculate jitter before performing the clock wait. Ideally
the clock implementation should calculate jitter but we need
API breakage for that.
* gst/gstsystemclock.c: (gst_system_clock_init):
Docs review.
* libs/gst/base/gstbasesink.c: (gst_base_sink_do_sync):
Remove leftover else
* tests/check/gst/gstsystemclock.c: (GST_START_TEST),
(gst_systemclock_suite):
Added check to test GST_CLOCK_DIFF.
2006-03-09 11:45:14 +00:00
Tim-Philipp Müller
083e7eb417 Ignore more stuff.
Original commit message from CVS:
* docs/gst/tmpl/.cvsignore:
* docs/plugins/tmpl/.cvsignore:
* tests/check/gst/.cvsignore:
* tests/check/libs/.cvsignore:
* tests/check/pipelines/.cvsignore:
Ignore more stuff.
2006-02-23 18:06:31 +00:00
Tim-Philipp Müller
2402343a7d tests/check/gst/gstutils.c: Test case originally showed the problem fixed below, but was then amended. Add checks bac...
Original commit message from CVS:
* tests/check/gst/gstutils.c: (test_buffer_probe_n_times):
Test case originally showed the problem fixed below,
but was then amended. Add checks back at the place
where they used to be.
2006-02-23 16:56:18 +00:00
Wim Taymans
70e4214ebf tests/check/gst/gstquery.c: Added another check.
Original commit message from CVS:
* tests/check/gst/gstquery.c: (GST_START_TEST):
Added another check.
2006-02-17 15:25:39 +00:00
Wim Taymans
2fbeada812 docs/gst/gstreamer-sections.txt: Reworked query docs.
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
Reworked query docs.

* gst/gstquery.c: (gst_query_new_formats),
(gst_query_list_add_format), (gst_query_set_formats),
(gst_query_set_formatsv), (gst_query_parse_formats_length),
(gst_query_parse_formats_nth):
* gst/gstquery.h:
Flesh out formats query, added some new methods.
Fix part of #324398.

* tests/check/gst/gstquery.c: (GST_START_TEST), (gstquery_suite):
Added query creation tests.
2006-02-14 12:07:16 +00:00
Wim Taymans
2681eaea50 gst/gsttask.*: Detect and warn for obvious deadlocks. fixes #320340
Original commit message from CVS:
* gst/gsttask.c: (gst_task_init), (gst_task_func),
(gst_task_set_lock), (gst_task_start), (gst_task_pause),
(gst_task_join):
* gst/gsttask.h:
Detect and warn for obvious deadlocks. fixes #320340
Fix error case where lock was not released.

* tests/check/Makefile.am:
* tests/check/gst/gsttask.c: (task_func2), (GST_START_TEST),
(task_func), (gst_element_suite), (main):
Add task check.
2006-02-13 17:03:23 +00:00
Wim Taymans
8521262f84 tests/check/gst/gstutils.c: Only events up to the pipeline EOS are counted, there are some more when going to NULL cu...
Original commit message from CVS:
* tests/check/gst/gstutils.c: (data_probe), (buffer_probe),
(event_probe), (GST_START_TEST):
Only events up to the pipeline EOS are counted, there are
some more when going to NULL currently which we don't care
about for now.
2006-02-13 10:54:03 +00:00
Tim-Philipp Müller
722f297238 tests/check/gst/gstutils.c: Add some simple tests for gst_parse_bin_from_description() and gst_bin_find_unconnected_p...
Original commit message from CVS:
* tests/check/gst/gstutils.c: (test_parse_bin_from_description),
(gst_utils_suite):
Add some simple tests for gst_parse_bin_from_description() and
gst_bin_find_unconnected_pad() (#329069).
2006-02-04 12:49:53 +00:00
Wim Taymans
1071a5979d tests/check/gst/gstbin.c: Wait for refcount to settle down before checking.
Original commit message from CVS:
* tests/check/gst/gstbin.c: (GST_START_TEST):
Wait for refcount to settle down before checking.
2006-01-30 15:57:43 +00:00
Jan Schmidt
1559c57a8e gst/gstutils.c: Don't leak pad references.
Original commit message from CVS:
* gst/gstutils.c: (gst_element_unlink_pads):
Don't leak pad references.

* tests/check/elements/fakesink.c: (GST_START_TEST):
* tests/check/generic/sinks.c: (GST_START_TEST):
* tests/check/generic/states.c: (GST_START_TEST):
* tests/check/gst/gstbin.c: (GST_START_TEST):
* tests/check/gst/gstcaps.c: (GST_START_TEST):
* tests/check/gst/gstelement.c: (GST_START_TEST):
* tests/check/gst/gstghostpad.c: (GST_START_TEST):
* tests/check/gst/gstiterator.c: (GST_START_TEST):
* tests/check/gst/gstvalue.c: (GST_START_TEST):
Fix a bunch of leaks. Make generic/sinks.c
use a bit less cpu by slowing the buffer rate
between fakesrc and fakesink.
2006-01-28 00:59:37 +00:00
Jan Schmidt
a25bb7be67 tests/check/: Add a very simple check that should have caught the memleak I fixed last night (if not for the slice al...
Original commit message from CVS:
* tests/check/Makefile.am:
* tests/check/gst/gstquery.c: (GST_START_TEST), (gstquery_suite),
(main):
Add a very simple check that should have caught the memleak I fixed
last night (if not for the slice allocator hiding it)
2006-01-27 11:53:20 +00:00
Wim Taymans
33e1f68555 tests/check/: Added fakesink test that checks prerolling and clipping behaviour.
Original commit message from CVS:
* tests/check/Makefile.am:
* tests/check/elements/fakesink.c: (chain_async_buffer),
(chain_async), (chain_async_return), (GST_START_TEST),
(fakesink_suite), (main):
Added fakesink test that checks prerolling and clipping
behaviour.

* tests/check/gst/gstutils.c: (GST_START_TEST):
Make check run faster so that buildbots don't timeout.
2006-01-18 17:57:57 +00:00
Jan Schmidt
0c0d5462a2 Replace gst_buffer_(make|is)_metadata_writable patch now that the release is out.
Original commit message from CVS:
* gst/gstbuffer.c: (gst_buffer_is_metadata_writable),
(gst_buffer_make_metadata_writable):
* gst/gstbuffer.h:
* libs/gst/base/gstbasetransform.c:
(gst_base_transform_prepare_output_buf):
* plugins/elements/gstcapsfilter.c: (gst_capsfilter_prepare_buf):
* tests/check/gst/gstbuffer.c: (GST_START_TEST), (gst_test_suite):
Replace gst_buffer_(make|is)_metadata_writable patch now
that the release is out.
2006-01-17 12:14:20 +00:00
Jan Schmidt
6876d64a29 Back out patch until after the release.
Original commit message from CVS:
* gst/gstbuffer.c:
* gst/gstbuffer.h:
* libs/gst/base/gstbasetransform.c:
(gst_base_transform_prepare_output_buf):
* plugins/elements/gstcapsfilter.c: (gst_capsfilter_prepare_buf):
* tests/check/gst/gstbuffer.c: (gst_test_suite):
Back out patch until after the release.
2006-01-16 15:42:08 +00:00
Jan Schmidt
c7506c8b0a gst/gstbuffer.*: Add gst_buffer_(is|make)_metadata_writable as analogues of gst_buffer_(is|make)_writable.
Original commit message from CVS:
Reviewed By: Andy Wingo

* gst/gstbuffer.c: (gst_buffer_is_metadata_writable),
(gst_buffer_make_metadata_writable):
* gst/gstbuffer.h:
Add gst_buffer_(is|make)_metadata_writable as analogues of
gst_buffer_(is|make)_writable.

* libs/gst/base/gstbasetransform.c:
(gst_base_transform_prepare_output_buf):
* plugins/elements/gstcapsfilter.c: (gst_capsfilter_prepare_buf):
Use name gst_buffer_(is|make)_metadata_writable functions.

* tests/check/gst/gstbuffer.c: (GST_START_TEST), (gst_test_suite):
Test gst_buffer_(is|make)_metadata_writable

(Closes: #324162)
2006-01-16 14:32:33 +00:00
Thomas Vander Stichele
19e6cc15f1 add unlink and some asserts
Original commit message from CVS:
add unlink and some asserts
2006-01-14 14:12:26 +00:00
Andy Wingo
e70e7f7d95 plugins/elements/gstbufferstore.c
Original commit message from CVS:
2005-12-16  Andy Wingo  <wingo@pobox.com>

* plugins/elements/gstbufferstore.c
(gst_buffer_store_cleared_func): Pay attention to g_list_append
return value.

* tests/check/gst/gstobject.c
(test_fake_object_name_threaded_unique): Pay attention to
g_list_sort return value.
2005-12-16 14:44:49 +00:00
Tim-Philipp Müller
8ea948df92 gst/gstminiobject.c: Fix lcopy for mini objects, the mini object needs to be ref'ed.
Original commit message from CVS:
* gst/gstminiobject.c: (gst_value_mini_object_lcopy):
Fix lcopy for mini objects, the mini object needs to be ref'ed.
* tests/check/gst/gstminiobject.c: (my_foo_init),
(my_foo_get_property), (my_foo_set_property), (my_foo_class_init),
(test_value_collection), (gst_mini_object_suite):
Add test to ensure refcounts end up as expected when passing
GstMiniObjects through g_object_get() and g_object_set().
2005-12-15 12:22:38 +00:00
Wim Taymans
8666c1597d gst/gstsegment.c: Added more documentation.
Original commit message from CVS:
* gst/gstsegment.c: (gst_segment_init),
(gst_segment_set_last_stop), (gst_segment_set_seek),
(gst_segment_set_newsegment), (gst_segment_to_stream_time),
(gst_segment_to_running_time):
Added more documentation.
Make sure the last_pos value is updated properly.
Make sure to_stream_time and to_running_time don't
operate on wrong values.

* tests/check/gst/gstsegment.c: (GST_START_TEST):
Update check.
2005-12-12 12:48:35 +00:00
Thomas Vander Stichele
72cf82552e tests/check/gst/struct_i386.h: ifdef out the XML structs
Original commit message from CVS:

* tests/check/gst/struct_i386.h:
ifdef out the XML structs
2005-12-12 11:40:11 +00:00
Thomas Vander Stichele
96b8d069e5 add a ; and an example
Original commit message from CVS:
add a ; and an example
2005-12-12 10:57:37 +00:00
Wim Taymans
a7fda4dfb2 tests/check/: Added check for ABI compatibility.
Original commit message from CVS:
* tests/check/Makefile.am:
* tests/check/gst/.cvsignore:
* tests/check/gst/gstabi.c: (GST_START_TEST), (gstabi_suite),
(main):
* tests/check/gst/struct_i386.h:
Added check for ABI compatibility.
2005-12-07 17:36:44 +00:00
Thomas Vander Stichele
288f61d21f expand tabs
Original commit message from CVS:
expand tabs
2005-12-06 19:29:15 +00:00
Thomas Vander Stichele
30dab643af really add the tests for the 64/double conversion
Original commit message from CVS:
really add the tests for the 64/double conversion
2005-12-05 12:33:44 +00:00
Thomas Vander Stichele
174304cf32 fix test
Original commit message from CVS:
fix test
2005-12-01 12:36:10 +00:00
Wim Taymans
2dc0ef57fd check/gst/gstutils.c: Updated check, add some scaling accuracy checking code.
Original commit message from CVS:
* check/gst/gstutils.c: (GST_START_TEST):
Updated check, add some scaling accuracy checking code.

* gst/gstutils.c: (gst_util_div128_64),
(gst_util_uint64_scale_int64), (gst_util_uint64_scale),
(gst_util_uint64_scale_int):
Fix 6 times faster division code. Optimize for common
1/1 and less common X/1 cases.
2005-11-28 18:44:11 +00:00
Wim Taymans
870d272630 check/gst/gstutils.c: More checks.
Original commit message from CVS:
* check/gst/gstutils.c: (GST_START_TEST), (gst_utils_suite):
More checks.

* gst/gstclock.c: (gst_clock_finalize), (gst_clock_set_master),
(do_linear_regression), (gst_clock_add_observation):
Cleanups.
Release lock when the clock cannot be slaved.
Catch the case where the regression returned an invalid denominator.

* gst/gstutils.c: (gst_util_div128_64_iterate),
(gst_util_div128_64), (gst_util_uint64_scale_int64),
(gst_util_uint64_scale), (gst_util_uint64_scale_int):
Add protentially more performant non-iterative 128/64 divide function
that unfortunatly does not work yet.
Shortcut the trivial 0/X = 0 case.
Remove the warnings on overflow.
2005-11-28 16:05:35 +00:00
Thomas Vander Stichele
1a92a78432 disable pipeline test until someone fixes the unreliable errors
Original commit message from CVS:
disable pipeline test until someone fixes the unreliable errors
2005-11-28 10:29:37 +00:00
Thomas Vander Stichele
11662f1307 add some additional fail_if's
Original commit message from CVS:
add some additional fail_if's
2005-11-27 14:03:22 +00:00
Wim Taymans
fb7302fc41 check/gst/gstutils.c: Added more checks for the high precision uint64 cases.
Original commit message from CVS:
* check/gst/gstutils.c: (GST_START_TEST), (gst_utils_suite):
Added more checks for the high precision uint64 cases.

* gst/gstutils.c: (gst_util_uint64_scale_int64),
(gst_util_uint64_scale), (gst_util_uint64_scale_int):
Implement high precission (guint64 * guint64) / guint64.
2005-11-25 00:02:05 +00:00
Thomas Vander Stichele
4251529223 remove wrongly commited comments
Original commit message from CVS:
remove wrongly commited comments
2005-11-24 18:44:43 +00:00
Thomas Vander Stichele
888bf79853 check/gst/gstminiobject.c: don't use check calls from threads; check probably isn't threadsafe and using a lock to ma...
Original commit message from CVS:

* check/gst/gstminiobject.c: (thread_ref), (GST_START_TEST),
(gst_mini_object_suite):
don't use check calls from threads; check probably isn't
threadsafe and using a lock to make it threadsafe would
defeat the purpose of this check
* gst/check/gstcheck.c:
* gst/check/gstcheck.h:
use GST_DEBUG some more
2005-11-24 18:40:58 +00:00
Wim Taymans
fbf5f16d69 check/gst/gstutils.c: Added test for scaling.
Original commit message from CVS:
* check/gst/gstutils.c: (GST_START_TEST), (gst_utils_suite):
Added test for scaling.

* gst/gstclock.h:
Small doc fix.

* gst/gstutils.c: (gst_util_uint64_scale_int):
Implemented high precision scaling code.
2005-11-24 17:44:57 +00:00
Thomas Vander Stichele
7b2d3e5536 ignore more
Original commit message from CVS:
ignore more
2005-11-24 11:16:32 +00:00
Jan Schmidt
5f54f34216 Oops, broke automatic string type parsing.
Original commit message from CVS:
* check/gst/gststructure.c: (GST_START_TEST):
* gst/gststructure.c: (gst_structure_parse_value):
Oops, broke automatic string type parsing.
Add a test to catch it in future.
2005-11-22 13:14:51 +00:00
Jan Schmidt
32538f9ed2 check/gst/capslist.h: Comment test cases
Original commit message from CVS:

* check/gst/capslist.h:
Comment test cases
* check/gst/gststructure.c: (GST_START_TEST),
(gst_structure_suite):
Test automatic value type detection in gst_structure_from_string.
* gst/gststructure.c: (gst_structure_parse_value):
Add fraction as a type we try and guess automatically in
caps/structure strings.
2005-11-22 12:35:42 +00:00
Jan Schmidt
ba0d715dc8 check/gst/gstcaps.c: Extend caps string tests to check that a caps to string conversion is reversible and produces th...
Original commit message from CVS:
* check/gst/gstcaps.c: (GST_START_TEST):
Extend caps string tests to check that a caps to string
conversion is reversible and produces the same caps.

* gst/gststructure.c: (gst_structure_value_get_generic_type):
Output "fraction" as the generic type fraction range, so caps
serialisation and deserialisation works.
* check/gst/capslist.h:
* gst/gstvalue.c: (gst_value_deserialize_fraction):
Support 'MIN' and 'MAX' for deserialising fractions.
2005-11-22 11:56:01 +00:00
Andy Wingo
19858fd9f0 gst/gstevent.h (gst_event_new_new_segment) (gst_event_parse_new_segment, gst_event_new_buffer_size)
Original commit message from CVS:
2005-11-22  Andy Wingo  <wingo@pobox.com>

* gst/gstevent.h (gst_event_new_new_segment)
(gst_event_parse_new_segment, gst_event_new_buffer_size)
(gst_event_parse_buffer_size, gst_ghost_pad_new_no_target):
Renamed from *_newsegment, *_buffersize, *_notarget.

* scripts/update-funcnames: New script, performs the changes
listed above.
2005-11-22 11:48:58 +00:00
Jan Schmidt
819307ab28 check/gst/gstevent.c: Block the fakesrc srcpad when we send an event, to avoid contention on the stream_lock causing ...
Original commit message from CVS:
* check/gst/gstevent.c: (test_event), (GST_START_TEST):
Block the fakesrc srcpad when we send an event, to avoid
contention on the stream_lock causing random test failures.
2005-11-22 10:24:31 +00:00
Jan Schmidt
97d08eb1a3 Fix subtraction.
Original commit message from CVS:
* check/gst/gstvalue.c: (GST_START_TEST):
* gst/gstvalue.c: (gst_value_fraction_subtract):
Fix subtraction.
2005-11-22 09:42:17 +00:00
Jan Schmidt
506aa94ce2 Implement fraction ranges and extend GstFraction to support arithmetic subtraction, as well as deserialization from i...
Original commit message from CVS:
* check/gst/capslist.h:
* check/gst/gstcaps.c: (GST_START_TEST):
* check/gst/gstvalue.c: (GST_START_TEST), (gst_value_suite):
* gst/gststructure.c: (gst_structure_parse_range),
(gst_structure_fixate_field_nearest_fraction):
* gst/gststructure.h:
* gst/gstvalue.c: (gst_value_init_fraction_range),
(gst_value_free_fraction_range), (gst_value_copy_fraction_range),
(gst_value_collect_fraction_range),
(gst_value_lcopy_fraction_range), (gst_value_set_fraction_range),
(gst_value_set_fraction_range_full),
(gst_value_get_fraction_range_min),
(gst_value_get_fraction_range_max),
(gst_value_serialize_fraction_range),
(gst_value_transform_fraction_range_string),
(gst_value_compare_fraction_range),
(gst_value_deserialize_fraction_range),
(gst_value_intersect_fraction_fraction_range),
(gst_value_intersect_fraction_range_fraction_range),
(gst_value_subtract_fraction_fraction_range),
(gst_value_subtract_fraction_range_fraction),
(gst_value_subtract_fraction_range_fraction_range),
(gst_value_collect_fraction), (gst_value_fraction_multiply),
(gst_value_fraction_subtract), (gst_value_deserialize_fraction),
(gst_value_transform_string_fraction), (_gst_value_initialize):
* gst/gstvalue.h:
Implement fraction ranges and extend GstFraction to support
arithmetic subtraction, as well as deserialization from integer
strings such as "100"
Add a testsuite as for int and double range set operations
2005-11-21 23:54:59 +00:00
Andy Wingo
153931fa86 check/gst/gstevent.c (create_custom_events): Check that
Original commit message from CVS:
2005-11-21  Andy Wingo  <wingo@pobox.com>

* check/gst/gstevent.c (create_custom_events): Check that
FLUSH_STOP is serialized.

* check/elements/identity.c (event_func):
* check/elements/fakesrc.c (event_func): No stream lock, the core
takes it.

* gst/base/gstbasetransform.c (gst_base_transform_event): No more
stream lock taking, yay.

* gst/gstevent.h (GST_EVENT_FLUSH_STOP): Marked as serialized to
ensure that core takes the stream lock.

* gst/base/gstbasesrc.c (gst_base_src_do_seek): Update for stream
lock name change.

* gst/base/gstbasesink.c (gst_base_sink_event): No need to take
the stream lock for EOS, NEWSEGMENT, or FLUSH_STOP, the core does
it already. For the flush start we do take it though so we get the
right preroll state change messages.

* gst/gstqueue.c (gst_queue_sink_activate_push): No need to take
the stream lock here, the core does it for us.

* gst/gstpad.h (GST_PAD_GET_STREAM_LOCK): Renamed from
GST_STREAM_GET_LOCK.
(GST_PAD_STREAM_LOCK, GST_PAD_STREAM_TRYLOCK)
(GST_PAD_STREAM_UNLOCK, GST_PAD_STREAM_UNLOCK_FULL)
(GST_PAD_STREAM_LOCK_FULL): Renamed from GST_STREAM_*.
(GST_PAD_GET_PREROLL_LOCK): Renamed from GST_PREROLL_GET_LOCK.
(GST_PAD_PREROLL_LOCK, GST_PAD_PREROLL_TRYLOCK)
(GST_PAD_PREROLL_UNLOCK): Renamed from GST_PREROLL_*.

* gst/gstpad.c: Update for stream lock name change.

* gst/base/gstbasesink.c: Update for preroll lock name change.
2005-11-21 17:21:15 +00:00
Wim Taymans
a35882df1f More segment updates, replace code in plugins with segment helper functions.
Original commit message from CVS:
* check/gst/gstsegment.c: (GST_START_TEST):
* docs/design/part-TODO.txt:
* gst/base/gstbasesink.c: (gst_base_sink_handle_object),
(gst_base_sink_event), (gst_base_sink_do_sync),
(gst_base_sink_activate_pull), (gst_base_sink_get_position),
(gst_base_sink_query), (gst_base_sink_change_state):
* gst/base/gstbasesink.h:
* gst/base/gstbasesrc.c: (gst_base_src_init), (gst_base_src_query),
(gst_base_src_default_newsegment),
(gst_base_src_configure_segment), (gst_base_src_do_seek),
(gst_base_src_get_range), (gst_base_src_loop),
(gst_base_src_change_state):
* gst/base/gstbasesrc.h:
* gst/base/gstbasetransform.c:
(gst_base_transform_prepare_output_buf),
(gst_base_transform_event), (gst_base_transform_change_state):
* gst/base/gstbasetransform.h:
* gst/base/gstcollectpads.c: (gst_collect_pads_add_pad),
(gst_collect_pads_event):
* gst/base/gstcollectpads.h:
* gst/elements/gstfakesrc.c: (gst_fake_src_init),
(gst_fake_src_create):
* gst/elements/gstfakesrc.h:
* gst/elements/gstidentity.c: (gst_identity_transform_ip):
* gst/gstsegment.c: (gst_segment_init), (gst_segment_set_duration),
(gst_segment_set_last_stop), (gst_segment_set_seek),
(gst_segment_set_newsegment), (gst_segment_to_stream_time),
(gst_segment_to_running_time), (gst_segment_clip):
* gst/gstsegment.h:
More segment updates, replace code in plugins with segment
helper functions.
2005-11-21 17:09:45 +00:00
Andy Wingo
44c548b205 *.*: Ran scripts/update-macros. Oh yes. gst/gstobject.h (GST_OBJECT_GET_LOCK, GST_OBJECT_LOCK)
Original commit message from CVS:
2005-11-21  Andy Wingo  <wingo@pobox.com>

* *.h:
* *.c: Ran scripts/update-macros. Oh yes.

* gst/gstobject.h (GST_OBJECT_GET_LOCK, GST_OBJECT_LOCK)
(GST_OBJECT_TRYLOCK, GST_OBJECT_UNLOCK): Renamed from
GST_GET_LOCK, etc.

* scripts/update-macros: New script. Run it on your files to
change GST_LOCK to GST_OBJECT_LOCK, and the same for UNLOCK as
well.
2005-11-21 16:34:26 +00:00
Wim Taymans
29ea4a0bb0 More segment updates and more checks.
Original commit message from CVS:
* check/gst/gstsegment.c: (GST_START_TEST), (gstsegments_suite),
(main):
* gst/gstsegment.c: (gst_segment_init), (gst_segment_set_duration),
(gst_segment_set_last_stop), (gst_segment_set_seek),
(gst_segment_set_newsegment), (gst_segment_to_stream_time),
(gst_segment_to_running_time), (gst_segment_clip):
* gst/gstsegment.h:
More segment updates and more checks.
2005-11-21 13:26:51 +00:00
Andy Wingo
e4b8378ba4 gst/gstevent.h (GST_EVENT_FILLER): Removed. Can be added back during the stable series if we need it. Fixes #319178.
Original commit message from CVS:
2005-11-21  Andy Wingo  <wingo@pobox.com>

* gst/gstevent.h (GST_EVENT_FILLER): Removed. Can be added back
during the stable series if we need it. Fixes #319178.

* gst/gstevent.c (gst_event_new_filler): Removed.

* check/gst/gstevent.c: Update comment about filler events.
2005-11-21 13:03:36 +00:00
Andy Wingo
33d5749b88 gst/gstevent.h (GstEventTypeFlags): New data type, the flags of the event type (upstream, downstream, serialized). Re...
Original commit message from CVS:
2005-11-21  Andy Wingo  <wingo@pobox.com>

* gst/gstevent.h (GstEventTypeFlags): New data type, the flags of
the event type (upstream, downstream, serialized). Renamed
GST_EVDIR_* and GST_EVSER to GST_EVENT_TYPE_*.
(GstEventType): Use GstEventTypeFlags. Rename CUSTOM_UP to
CUSTOM_UPSTREAM, CUSTOM_DS to CUSTOM_DOWNSTREAM, etc.

* gst/gstevent.c: Update for new CUSTOM event names.

* check/gst/gstevent.c: Update check for new CUSTOM event names.

* gst/gstevent.h:
* gst/gstevent.c (gst_event_type_get_flags): New function. Fixes
bug #319392.
2005-11-21 11:06:42 +00:00
Wim Taymans
2754334f05 Added segment helper structure and methods. Not fully implemented yet.
Original commit message from CVS:
* check/Makefile.am:
* check/gst/gstsegment.c: (GST_START_TEST), (gstevents_suite),
(main):
* gst/Makefile.am:
* gst/gst.h:
* gst/gstsegment.c: (gst_segment_init), (gst_segment_set_duration),
(gst_segment_set_seek), (gst_segment_set_newsegment),
(gst_segment_to_stream_time), (gst_segment_to_running_time),
(gst_segment_clip):
* gst/gstsegment.h:
Added segment helper structure and methods. Not fully implemented
yet.
Added segment check.
2005-11-20 19:11:09 +00:00
Jan Schmidt
c05ba2d666 check/gst/gstvalue.c: Add a deserialisation test for fractions
Original commit message from CVS:
* check/gst/gstvalue.c: (GST_START_TEST), (gst_value_suite):
Add a deserialisation test for fractions
* examples/metadata/read-metadata.c: (message_loop),
(make_pipeline), (main):
Fix up metadata reading sample.
* gst/base/gstbasesink.c: (gst_base_sink_do_sync):
Debug format fix
* gst/base/gstbasesrc.c: (gst_base_src_default_negotiate):
Don't try and fixate empty caps
* gst/gst_private.h:
Wrap in G_BEGIN_DECLS/G_END_DECLS
* gst/gstvalue.c: (gst_value_collect_fraction),
(gst_value_set_fraction), (gst_value_get_fraction_denominator),
(gst_value_transform_string_fraction),
(gst_value_compare_fraction):
Add some extra guards to ensure that we don't end up
with an invalid denominator of 0 in a gstfraction and
that fractions always get reduced.
2005-11-20 17:12:49 +00:00
Andy Wingo
77d95482f6 check/gst/gstvalue.c (test_string): Add test for bug #165650.
Original commit message from CVS:
2005-11-19  Andy Wingo  <wingo@pobox.com>

* check/gst/gstvalue.c (test_string): Add test for bug #165650.

* gst/gstvalue.c (gst_string_wrap): Trying to serialize a NULL
string should produce an error, given the lack of a way to
represent NULL strings. Fixes #165650.
2005-11-19 17:08:23 +00:00
Andy Wingo
2124c0fded gst/gstelement.c (gst_element_set_base_time): Add debugging.
Original commit message from CVS:
2005-11-15  Andy Wingo  <wingo@pobox.com>

* gst/gstelement.c (gst_element_set_base_time): Add debugging.

* gst/gstpipeline.c (gst_pipeline_set_new_stream_time): Document
using GST_CLOCK_TIME_NONE to disable base time management.
(do_pipeline_seek, gst_pipeline_change_state): Don't reset stream
time if it was NONE before.
(gst_pipeline_change_state): Only munge the base time if
stream_time != GST_CLOCK_TIME_NONE.

* check/gst/gstpipeline.c (test_base_time): Punt around the
problem of the probe not being called, because that's not the
issue I'm looking at. Add a check that setting stream_time to NONE
disables base time management.
2005-11-15 17:57:51 +00:00
Andy Wingo
87e4af77a1 check/gst/gstpipeline.c (test_base_time): Punt around the problem of the probe not being called, because that's not t...
Original commit message from CVS:
2005-11-15  Andy Wingo  <wingo@pobox.com>

* check/gst/gstpipeline.c (test_base_time): Punt around the
problem of the probe not being called, because that's not the
issue I'm looking at...
2005-11-15 16:52:46 +00:00
Andy Wingo
a594b62809 check/gst/gstpipeline.c (test_base_time): Add check that the base time and stream time are reset correctly.
Original commit message from CVS:
2005-11-15  Andy Wingo  <wingo@pobox.com>

* check/gst/gstpipeline.c (test_base_time): Add check that the
base time and stream time are reset correctly.
2005-11-15 16:27:04 +00:00
Andy Wingo
58a5b2f5fa check/gst/gstpipeline.c (test_base_time): New test for buffer timestamps with live capture.
Original commit message from CVS:
2005-11-15  Andy Wingo  <wingo@pobox.com>

* check/gst/gstpipeline.c (test_base_time): New test for buffer
timestamps with live capture.

* gst/elements/gstfakesrc.c (gst_fake_src_create): If the datarate
is 0 but we are a live source, timestamp the buffers using the
element's clock.
2005-11-15 12:29:07 +00:00
Andy Wingo
c4740f0b48 check/gst/gstbin.c (test_message_state_changed_children): Style fix..
Original commit message from CVS:
2005-11-10  Andy Wingo  <wingo@pobox.com>

* check/gst/gstbin.c (test_message_state_changed_children): Style
fix..

* gst/gstbus.c (poll_destroy, poll_func, gst_bus_poll): Implement
gst_bus_poll with the signal watch. Ensures that poll and a signal
watch see the same messages.

* check/gst/gstbus.c (test_watch_with_poll): New test, checks that
a poll and a watch at the same time get the same messages.
2005-11-10 18:15:24 +00:00
Tim-Philipp Müller
a144ca207c gst/gststructure.c: Forward-port a 0.8 patch to handle escaped spaces in structure string, so that gst_parse...
Original commit message from CVS:

patch by: Tim-Philipp Müller <tim at centricular dot net>

* gst/gststructure.c: (gst_structure_parse_field),
(gst_structure_from_string):
Forward-port a 0.8 patch to handle escaped spaces in structure string,          so that gst_parse_launch() can deal with spaces in filtered link
caps (fixes #164479)
* check/gst/capslist.h:
* check/gst/gststructure.c: (GST_START_TEST):
add unit tests for this change
2005-11-10 12:32:57 +00:00
Wim Taymans
8bf3884cbb check/gst/gstghostpad.c: Added check for bug #317341
Original commit message from CVS:
* check/gst/gstghostpad.c: (GST_START_TEST), (gst_ghost_pad_suite):
Added check for bug #317341

* gst/gstbuffer.c:
* gst/gstbuffer.h:
Some more spiffifying.

* gst/gstghostpad.c: (gst_ghost_pad_do_link):
Call peer linkfunction if we are a source pad. Totally fixes
#317341

* gst/gstpad.c:
Update docs, source pads should call the peer linkfunction
so they can atomically perform the pad link.
2005-11-10 09:19:12 +00:00
Wim Taymans
67b27a2c01 check/gst/gstbin.c: An extra refcount is taken in basesrc.
Original commit message from CVS:
* check/gst/gstbin.c: (GST_START_TEST):
An extra refcount is taken in basesrc.

* gst/base/gstbasesrc.c: (gst_base_src_init), (gst_base_src_query),
(gst_base_src_get_range), (gst_base_src_pad_get_range),
(gst_base_src_loop):
Small cleanups, check for flushing after being unlocked from the
LIVE_LOCK. take refcounts correctly (not yet everywhere).
Don't send out EOS when going to READY.
2005-10-27 13:47:33 +00:00
Thomas Vander Stichele
842007120e check/: wait on thread to die so we can check refcount correctly
Original commit message from CVS:

* check/gst/gstbin.c: (GST_START_TEST):
* check/gst/gstghostpad.c: (GST_START_TEST):
* check/pipelines/cleanup.c: (GST_START_TEST):
wait on thread to die so we can check refcount correctly
2005-10-19 11:43:42 +00:00