Commit graph

112 commits

Author SHA1 Message Date
Wim Taymans
9ef1346b1f context: use context on buffers instead of caps
Put the srcpad context on buffers instead of caps. This allows us to associate
all the relevant info contained in events with a buffer.
2011-05-04 18:59:47 +02:00
Wim Taymans
6ab7e6c15d Remove pad_alloc, this can now be done better
Remove pad_alloc and all references. This can now be done more efficiently and
more flexible with the ALLOCATION query and the bufferpool objects. There is no
reverse negotiation yet but that will be done with an event later.
2011-04-29 13:26:19 +02:00
Sebastian Dröge
355dbdfa7e tests: Use G_DEFINE_TYPE instead of GST_BOILERPLATE 2011-04-19 11:45:37 +02:00
Sebastian Dröge
f51a23a83c Merge branch 'master' into 0.11 2011-04-16 08:59:58 +02:00
Sebastian Dröge
b44d555865 multiqueue: Don't leak pads in the named pads unit test 2011-04-14 09:07:25 +02:00
Tim-Philipp Müller
0e94961069 tests: fix unusued-but-assigned-variable warnings with gcc 4.6 2011-04-11 15:08:30 +01:00
Wim Taymans
6be4dbdb5a Merge branch 'master' into 0.11
Conflicts:
	android/base.mk
	android/controller.mk
	android/dataprotocol.mk
	android/elements.mk
	android/gst-inspect.mk
	android/gst-launch.mk
	android/gst-plugin-scanner.mk
	android/gst.mk
	android/indexers.mk
	android/net.mk
	win32/common/libgstbase.def
2011-04-11 10:26:54 +02:00
Tim-Philipp Müller
5c75330fea tests: add some basic unit tests for queue2 2011-04-07 20:50:04 +01:00
Wim Taymans
8bcaf95662 Merge branch 'master' into 0.11 2011-04-04 11:17:28 +02:00
Tim-Philipp Müller
439bbf1fde checks: ignore new funnel unit test binary 2011-04-03 16:18:14 +01:00
Wim Taymans
7a62d32a07 Merge branch 'master' into 0.11-fdo
Conflicts:
	docs/plugins/gstreamer-plugins.hierarchy
	gst/gstelement.c
2011-03-30 19:58:52 +02:00
Sebastian Dröge
8db570f48c multiqueue: Make assignment of queue IDs and pad names threadsafe
Also add a test for naming pads by the caller and return NULL
when requesting an already existing pad.
2011-03-30 10:52:36 +02:00
Sebastian Dröge
565efa30ea funnel: Integrate into the build system and rename the types 2011-03-29 11:20:05 +02:00
Sebastian Dröge
e5a857e78a funnel: Import funnel element from farsight2 2011-03-29 11:20:05 +02:00
Wim Taymans
beac9c4a95 buffer: fix remaining unit tests 2011-03-28 20:08:46 +02:00
Wim Taymans
4a9a59df08 tests: make some tests compile 2011-03-28 20:08:46 +02:00
Tim-Philipp Müller
1f59906ec1 filesrc, filesink: fix URI creation regression for non-absolute locations
Passing e.g. location=foo would lead to warnings because g_filename_to_uri()
wants an absolute file path and returns NULL otherwise. Use brand-new
gst_filename_to_uri() instead, which will try harder to create a proper
URI for us.

Also add unit test.
2011-02-24 15:36:53 +00:00
Sebastian Dröge
c1c0c86bba file{sink,src}: Check if non-URI characters are escaped, but only for the URI not the location property 2011-02-15 22:57:28 +01:00
Sebastian Dröge
39eeab382c file{src,sink}: Fix unit tests
filesink and filesrc should return exactly the same URI as passed
and must not escape path separators.
2011-02-15 22:57:28 +01:00
Jan Schmidt
d38933081e multiqueue test: Remove workaround for pad_task hangs
Remove code that isn't needed any longer, which sets the multiqueue
to PLAYING and back before unreffing, in order to avoid a deadlock
waiting for gstpad tasks that were never started. The problem seems
to have been fixed long ago.
2011-01-25 16:09:18 +10:00
Thiago Santos
08a71b98a9 test: outputselector: Add another negotiation test
Adds an unit test to check that the output-selector works
when negotiating before srcpads are requested
2011-01-10 14:52:05 -03:00
Thiago Santos
e1e81ca16d tests: selector: unref peer pad
Do not forget to unref peer's pad on output-selector negotiation
tests
2011-01-10 10:04:46 -03:00
Thiago Santos
757dc90faa output-selector: Add pad-negotiation-mode property
Adds getcaps/setcaps to output-selector and adds a property
to select which type of negotiation should be done.

The available modes are:
 * none:   no negotiation (current behavior), getcaps return ANY and
           setcaps aren't set on any of the peers
 * all:    use all pads (default), getcaps returns the intersection of
           peer pads and setcaps is set on all peers
 * active: getcaps and setcaps are proxied to the active pad

https://bugzilla.gnome.org/show_bug.cgi?id=638381
2011-01-06 18:42:29 +00:00
Tim-Philipp Müller
a97199c6a4 checks: enable input-selector and output-selector unit tests after move 2010-12-31 01:01:02 +00:00
Benjamin Otte
8915626090 Add -Wwrite-strings
and fix its warnings
2010-12-31 00:54:04 +00:00
Benjamin Otte
9bb7806e01 Add -Wmissing-declarations -Wmissing-prototypes to configure flags
And fix all warnings
2010-12-31 00:54:04 +00:00
Wim Taymans
3fcc406815 plugins/elements/gstinputselector.*: Various cleanups.
Original commit message from CVS:
* plugins/elements/gstinputselector.c: (gst_selector_pad_class_init),
(gst_selector_pad_finalize), (gst_selector_pad_get_property),
(gst_selector_pad_event), (gst_input_selector_class_init),
(gst_input_selector_init), (gst_input_selector_set_active_pad),
(gst_input_selector_set_property),
(gst_input_selector_get_property),
(gst_input_selector_request_new_pad),
(gst_input_selector_release_pad),
(gst_input_selector_push_pending_stop),
(gst_input_selector_switch):
* plugins/elements/gstinputselector.h:
Various cleanups.
Added tags to the pads.
Select active pad based on the pad object instead of its name.
Fix refcount in set_active_pad.
Add property to get the number of pads.
* plugins/elements/gstoutputselector.c:
(gst_output_selector_class_init),
(gst_output_selector_set_property),
(gst_output_selector_get_property):
Various cleanups.
Select the active pad based on the pad object instead of its name.
Fix locking when setting the active pad.
* plugins/elements/gstselector-marshal.list:
* tests/check/elements/selector.c: (cleanup_pad),
(selector_set_active_pad), (run_input_selector_buffer_count):
Fixes for pad instead of padname for pad selection.
2010-12-31 00:53:14 +00:00
Stefan Kost
7b742d1cf4 plugins/elements/gstinputselector.*: Added "select-all" property to make it work like aggregator in 0.8.
Original commit message from CVS:
* plugins/elements/gstinputselector.c:
* plugins/elements/gstinputselector.h:
Added "select-all" property to make it work like aggregator in 0.8.
* plugins/elements/gstoutputselector.c:
Fix resend-latest behavoiur.
* tests/check/Makefile.am:
* tests/check/elements/.cvsignore:
* tests/check/elements/selector.c:
Add unit tests for selector.
2010-12-31 00:52:48 +00:00
Tim-Philipp Müller
736daba993 tests: enable valve unit test 2010-12-31 00:51:12 +00:00
Tim-Philipp Müller
ad628d0bc5 tests: fix valve unit test
gst_buffer_pad_alloc() needs simple caps or NULL caps,
ANY caps are not allowed.
2010-12-31 00:51:12 +00:00
Olivier Crête
284b9f0e84 tests: Fix caps leak in the valve test 2010-12-31 00:51:12 +00:00
Olivier Crête
17e0b91890 valve: Add unit tests
Add a unit test for the valve element.
2010-12-31 00:51:12 +00:00
Wim Taymans
a813aad0ac basesink: rework position reporting code
Unify the different position reporting code paths to make it more
understandable.
Use start_time to get more accurate position reporting in paused.
Fix unit tests for more accurate reporting.
2010-12-02 19:10:46 +01:00
Jan Schmidt
6d590c65e5 tests: Add a multiqueue sparse streams test 2010-10-27 18:11:35 +02:00
Ognyan Tonchev
36b533d5b2 queue: apply sink segment on the source if queue is empty
Apply the sink segment on the source immediatly when it is received
and there is nothing in the queue.

Solves #482147
2010-10-11 15:56:31 +02:00
Jonas Holmberg
351de88529 queue: fix segfault in test 2010-08-23 14:19:50 +02:00
Jonas Holmberg
9f87f57a82 queue: added unit test for newsegment events 2010-08-20 16:11:42 +02:00
Wim Taymans
649634a98f tests: fix comments in test 2010-08-19 10:03:33 +02:00
Jonas Holmberg
63c0e75e15 queue: fixed racy unit tests
Fixes #600004
2010-08-18 15:27:04 +02:00
Tim-Philipp Müller
694f4d90f8 checks: make fakesrc check work in a CK_FORK=no environment
Reset have_eos at the beginning of each test.

See #623469.
2010-07-03 15:13:14 +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
Edward Hervey
5a0cdc7001 tests: Fix multiqueue test for latest commits.
The problem lies in the fact that multiqueue will now operate somewhat
similarly to the flow aggregation logic of demuxers and therefore
will stopp whenever all downstream pads return NOT_LINKED and/or
UNEXPECTED and there's no more buffers to push.

The latest commits should not affect any regular use-case, but the bug
report will be kept open so the previous behaviour can be re-established
if needed.

Fixes #609486
2010-02-10 14:40:17 +01:00
Edward Hervey
9cc47f8cba Revert "multiqueue: handle UNEXPECTED flowreturn better"
This reverts commit fbdf4dceda.

Partly fixes #609274
2010-02-09 15:58:36 +01:00
Wim Taymans
fbdf4dceda multiqueue: handle UNEXPECTED flowreturn better
When we receive an UNEXPECTED flowreturn from downstream, we must not shutdown
the pushing thread because upstream will at some point push an EOS that we still
need to push further downstream.

To achieve this, convert the UNEXPECTED return value to OK. Add a fixme so that
we implement the right logic to propagate the flowreturn upstream at some point.

Also clean up the unit test a little.

Fixes #608136
2010-01-26 17:07:31 +01:00
Edward Hervey
5583220a1d tests/fakesink: Add some debugging 2009-10-22 12:33:37 +02:00
Edward Hervey
ca054ff4e5 tests/faeksink: Lower the number of threads to avoid timeouts
We just end up with way too much contention in glib otherwise.
2009-10-22 12:33:01 +02:00
Tim-Philipp Müller
7e4b164c12 fakesink: hack around crasher bug in g_object_notify() for out-of-band events
GObject may crash if two threads do concurrent g_object_notify() on the same
object. This may happen if fakesink receives an out-of-band event such as
FLUSH_START while processing a buffer or serialised event in the streaming
thread. Since this may happen with the default settings during a common
operation like a seek, and there seems to be little chance of a timely fix
in GObject (see #166020), we should hack around this issue by protecting all
of fakesink's direct g_object_notify() calls with a lock.

Also add unit test for the above.

Fixes #554460.
2009-05-31 19:17:33 +01:00