Commit graph

22 commits

Author SHA1 Message Date
Andy Wingo eb6c9dd801 check/gst/gstobject.c (test_fake_object_name): The object *does* have a name after g_object_new.
Original commit message from CVS:
2005-03-07  Andy Wingo  <wingo@pobox.com>

* check/gst/gstobject.c (test_fake_object_name): The object *does*
have a name after g_object_new.

* gst/base/gstbasesink.c: Change "arguments" to "properties" in
the code. Die GtkObject die!
(GstBaseSink::preroll-queue-len): New object property, the number
of buffers to queue in preroll. By default, does not queue any
buffers. Set to a higher number if you have a one-threaded
demuxer.
(gst_basesink_preroll_queue_push)
(gst_basesink_preroll_queue_empty)
(gst_basesink_preroll_queue_flush): Implement a queue of buffers
for preroll. All must be called with PREROLL_LOCK.
(gst_basesink_finish_preroll): Instead of always blocking, push
the buffer onto the queue. preroll_queue_push will block if the
queue is full.
(gst_basesink_event): Make sure the preroll queue is emptied on
eos and flushed on flush.
(gst_basesink_handle_buffer): Does the work of chain_unlocked, but
without going into finish_preroll.
(gst_basesink_change_state): Handle setting up the queue and
flushing it in READY<->PAUSED transitions.
2005-03-07 10:35:12 +00:00
Andy Wingo bffbacfaae gst/gstiterator.c (gst_iterator_find_custom)
Original commit message from CVS:
2005-03-03  Andy Wingo  <wingo@pobox.com>

* gst/gstiterator.c (gst_iterator_find_custom)
(gst_iterator_foreach, gst_iterator_fold): Never free the
iterator.

* gst/elements/gsttee.c (gst_tee_handle_buffer):
* gst/gstutils.c (gst_pad_proxy_setcaps, gst_pad_proxy_getcaps):
Always free the iterator.

* check/gst/gstbus.c (pull_messages): Use public
gst_message_get_structure().
2005-03-03 15:58:42 +00:00
Andy Wingo 70d2a801d9 tests/complexity.c: Adjust to lack of gst_bin_iterate, boolean link return values.
Original commit message from CVS:
2005-03-01  Andy Wingo  <wingo@pobox.com>

* tests/complexity.c: Adjust to lack of gst_bin_iterate, boolean
link return values.

* gst/elements/gsttee.c, gst/elements/gsttee.h: I am the master of
do-nothing plugins! Fear the dev-zero!

* gst/elements/gstelements.c
* gst/elements/Makefile.am: Add tee back to gstelements.

* gst/gstutils.h
* gst/gstutils.c (gst_pad_proxy_getcaps, gst_pad_proxy_setcaps):
Resurrect from the dead. Use gst_iterator_fold to be threadsafe.

* gst/gstiterator.h (GstIteratorFoldFunction): Return a bool.

* gst/gstiterator.c (gst_iterator_fold): Only continue folding as
long as the fold function returns TRUE. Add a bunch o docs.
(gst_iterator_foreach): Add docs about when the iterator will be
freed.
(gst_iterator_find_custom): Make more efficient because of the
bool-return-value thing.

* check/gst/gstiterator.c (add_fold_func): Adapt to new
fold-funcs-returning-bool policy.

* gst/gstutils.h:
* gst/gstutils.c (gst_element_link, gst_element_link_many)
(gst_element_link_filtered, gst_element_link_pads)
(gst_element_link_pads_filtered): It seems Wim changed the return
type to booleans internally. Assume he knows what he's doing and
change the prototypes as well.
2005-03-01 16:51:11 +00:00
Andy Wingo b56662cf97 gst/gstpipeline.c: Fix element details.
Original commit message from CVS:
2005-03-01  Andy Wingo  <wingo@pobox.com>

* gst/gstpipeline.c: Fix element details.
(gst_pipeline_set_property, gst_pipeline_get_property): Lock
around the whole get/set properties.

* gst/gstpad.c (gst_real_pad_set_property): Add a FIXME, the
::active property doesn't make sense any more.
(gst_pad_set_active): Check to see if the pad has the right
functions to be activated in this mode.
(gst_pad_event_default): Handle EOS specially, pausing the task on
the pad if necessary.

* gst/gstbin.c: Adapt callers of gst_iterator_foreach and
gst_iterator_filter to new argument order.

* gst/gstiterator.c (gst_iterator_find_custom)
(gst_iterator_foreach): Implement on top of gst_iterator_fold
instead of using the filter_next internals. A bit cleaner this
way.

* gst/gstiterator.h:
(gst_iterator_filter, gst_iterator_find_custom): Switch the
argument order so user_data is last.
(gst_iterator_foreach): Return the GstIteratorResult so the caller
knows if all elements were called, or if an error or resync
happened.
(gst_iterator_fold): New procedure.

* check/Makefile.am (TESTS):
* check/gst/gstiterator.c: New test suite for GstIterator. Checks
that iterating through a list hits all members in order, that
resync works correctly, and that fold works.

* gst/base/gstbasesink.c (gst_basesink_event): Fix Waymans bug.
2005-03-01 12:55:32 +00:00
Andy Wingo 5e8e74f37a add missing file
Original commit message from CVS:
add missing file
2005-02-23 16:09:59 +00:00
Andy Wingo 0d557a7bc2 gst/gstmessage.h gst/gstmessage.c (_gst_message_free)
Original commit message from CVS:
2005-02-23  Andy Wingo  <wingo@pobox.com>

* gst/gstmessage.h
* gst/gstmessage.c (_gst_message_free)
(gst_message_new_application): New message type, APPLICATION,
explicitly for use by applications.

* gst/gstbus.c (gst_bus_post): Only write a byte to the wakeup
socket if the queue is coming from an empty state. Fixes a bug
where posting a message could block, waiting for someone to read
out bytes from the socket.
(bus_watch_callback): Renamed from bus_callback, let gst_bus_pop
handle the socket read.
(bus_watch_destroy): Renamed from bus_destroy.

* check/Makefile.am: Re-enable the gst-register test so we can
deal with elements here. Add the gstbus tests.

* check/gst/gstbus.c: New check, spawns off a bunch of threads all
posting messages to a bus, then reads to see if they are in the
right order.

* check/pipelines/simple_launch_lines.c: Add some tests, and make
sure to pop the message off the bus after the poll.

* gst/gstbus.c (gst_bus_pop): Read off the control byte if the
queue becomes empty.
2005-02-23 16:08:21 +00:00
Andy Wingo 5b676004db check/Makefile.am (TESTS): Add pipelines/simple_launch_lines.
Original commit message from CVS:
2005-02-23  Andy Wingo  <wingo@pobox.com>

* check/Makefile.am (TESTS): Add pipelines/simple_launch_lines.

* check/pipelines/simple_launch_lines.c: New test suite for simple
gst-launch lines. Just a beginning right now.
2005-02-23 12:15:46 +00:00
Thomas Vander Stichele 325219ea1a threadsafe pad link/unlink
Original commit message from CVS:
threadsafe pad link/unlink
2005-02-16 18:31:45 +00:00
Thomas Vander Stichele a0845b59e6 add pad tests
Original commit message from CVS:
add pad tests
2005-02-16 17:34:32 +00:00
Thomas Vander Stichele d2d601e447 sprinkle enters over emacs
Original commit message from CVS:
sprinkle enters over emacs
2005-02-11 16:59:22 +00:00
Thomas Vander Stichele 99d71befbe don't print expected criticals
Original commit message from CVS:
don't print expected criticals
2005-02-11 16:43:18 +00:00
Andy Wingo 98e3377631 tools/gst-inspect.c (print_field): Change prototype for non-mutating caps_foreach.
Original commit message from CVS:
2005-02-11  Andy Wingo  <wingo@pobox.com>

* tools/gst-inspect.c (print_field): Change prototype for
non-mutating caps_foreach.

* check/gst/gstobject.c (test_fail_abstract_new): Expect a warning
from GLib.

* check/gst/gstcaps.c (test_double_append): Renamed from
test_fail_double_append.
(test_mutability): New test, tests that caps and structures are
mutable only with refcount 1, or in the case of structures, also
when unparented.

* check/gstcheck.c (gst_check_init): Handle WARNING in addition to
CRITICAL.
(gst_check_log_critical_func): Print criticals in both the
expected and unexpected cases.
2005-02-11 15:28:20 +00:00
Andy Wingo ff9b065eaa add cvsignore
Original commit message from CVS:
add cvsignore
2005-02-11 12:57:58 +00:00
Andy Wingo a3d8e2c9d8 add missing file, cvsignore updates
Original commit message from CVS:
add missing file, cvsignore updates
2005-02-11 12:57:24 +00:00
Andy Wingo 9ffa8aff27 check/gst/gstcaps.c: New test suite. Only one test at the moment
Original commit message from CVS:
2005-02-11  Andy Wingo  <wingo@pobox.com>

* check/gst/gstcaps.c: New test suite. Only one test at the moment
-- this is an infrastructure commit.

* check/gst/gstobject.c (main):
* check/gst/gstdata.c (main):
* check/gst-libs/gdp.c (main): Use gst_check_init() to initialize
gstreamer.

* check/gstcheck.h: Declare all variables as extern so they are
defined once in gstcheck.c.
(ASSERT_CRITICAL): New macro, asserts that the expression passed
as an argument raises one or more critical logs.

* check/gstcheck.c: Define the extern-declared variables here.
(gst_check_log_message_func, gst_check_log_critical_func): The log
function was split in two, one for messages and one for criticals.
The criticals logfunc will fail if a critical was not expected.
The messages logfunc is the same as before.
(gst_check_init): Set up all log handlers, and initialize
gstreamer too.

* check/Makefile.am: Pulled over some pieces from the old
testsuite/ directory. Don't use --gst-fatal-warnings though, we
have some new mechanisms for that.
(TESTS): Added gst/gstcaps.
2005-02-11 12:55:16 +00:00
Thomas Vander Stichele 1fece171ea adding gstdata tests, cleaning up source files
Original commit message from CVS:
adding gstdata tests, cleaning up source files
2004-12-21 15:51:09 +00:00
Thomas Vander Stichele 8f8da12228 move common code to a lib
Original commit message from CVS:
move common code to a lib
2004-12-21 14:50:57 +00:00
Thomas Vander Stichele 993b529a3c Change dataprotocol test to new check
Original commit message from CVS:
Change dataprotocol test to new check
2004-12-21 12:26:38 +00:00
Thomas Vander Stichele 29177515ff add _get/_set_name_prefix() for debugging. Update docs.
Original commit message from CVS:

* check/gst/gstobject.c:
* docs/design/part-gstelement.txt:
* docs/design/part-gstobject.txt:
* gst/gstobject.c:
* gst/gstobject.h:
add _get/_set_name_prefix() for debugging. Update docs.
Finish unique name unit test
2004-12-14 11:47:44 +00:00
Thomas Vander Stichele 5d24ac1be7 make names only settable when unparented, so we can guarantee uniqueness inside a parent together with the _add checks
Original commit message from CVS:
make names only settable when unparented, so we can guarantee
uniqueness inside a parent together with the _add checks

2
2004-12-13 19:23:04 +00:00
Thomas Vander Stichele 54cf91ba76 unit test for threadsafe naming
Original commit message from CVS:
unit test for threadsafe naming
2004-12-13 17:55:57 +00:00
Thomas Vander Stichele a192d6d688 adding unit testing
Original commit message from CVS:
* Makefile.am:
* check/Makefile.am:
* check/gst/.cvsignore:
* check/gst/gstobject.c:
* configure.ac:
adding unit testing
* docs/upload.mak:
fixing double vars
* gst/Makefile.am:
disable some unused stuff
* gst/gstbus.h:
* gst/gsttypes.h:
move typedefs for gstbus
* gst/gstelement.c:
* gst/gstelement.h:
add getter/setter for bus and scheduler
add functionality to have (non-fatal) warnings as messages
* gst/gsterror.c:
* gst/gsterror.h:
* gst/gstmessage.c:
* gst/gstmessage.h:
rework API to be more general for warnings as well
* gst/gstobject.c:
fix docs
* tools/gst-launch.c:
fix macros for errors
2004-12-13 14:49:11 +00:00