Commit graph

272 commits

Author SHA1 Message Date
Benjamin Otte 29642c4548 gst/schedulers/gstoptimalscheduler.c: revert last commit by Andy Wingo. It causes segfaults on unreffing in Rhythmbox...
Original commit message from CVS:
2004-03-03  Benjamin Otte  <otte@gnome.org>

* gst/schedulers/gstoptimalscheduler.c:
revert last commit by Andy Wingo. It causes segfaults on unreffing
in Rhythmbox. (see bug #135672)
2004-03-02 23:04:50 +00:00
Andy Wingo 3f5a8814d5 gst/gstelement.c (gst_element_dispose): Protect against multiple invocations.
Original commit message from CVS:
2004-02-24  Andy Wingo  <wingo@pobox.com>

* gst/gstelement.c (gst_element_dispose): Protect against multiple
invocations.

* gst/schedulers/gstoptimalscheduler.c
I added a mess of prototypes at the top of the file by way of
documentation. Some of the operations on chains and groups were
re-organized.

(create_group): Added a type argument so if the group is enabled,
the setup_group_scheduler knows what to do.
(group_elements): Added a type argument here, too, to be passed on
to create_group.
(group_element_set_enabled): If an unlinked PLAYING element is
added to a bin, we have to create a new group to hold the element,
and this function will be called before the group is added to the
chain. Thus we have a valid case for group->chain==NULL. Instead
of calling chain_group_set_enabled, just set the flag on the group
(the chain's status will be set when the group is added to it).
(gst_opt_scheduler_state_transition, chain_group_set_enabled):
Setup the group scheduler when the group is enabled, not
specifically when an element goes PAUSED->PLAYING. This means
PLAYING elements can be added, linked, and scheduled into a
PLAYING pipeline, as was intended.
(add_to_group): Don't ref the group twice. I don't know when this
double-ref got in here. Removing it has the potential to cause
segfaults if other parts of the scheduler are buggy. If you find
that the scheduler is segfaulting for you, put in an extra ref
here and see if that hacks over the underlying issue. Of course,
then find out what code is unreffing a group it doesn't own...
(create_group): Make the extra refcount floating, and remove it
after adding the element. This means that...
(unref_group): Destroy when the refcount reaches 0, not 1, like
every other refcounted object in the known universe.
(remove_from_group): When a group becomes empty, set it to be not
active, and remove it from its chain. Don't unref it again,
there's no floating reference any more.
(destroy_group): We have to remove the group from the chain in
remove_from_group (rather than here) to break refcounting cycles
(the chain always has a ref on the group). So assert that
group->chain==NULL.
(ref_group_by_count): Removed, it was commented out anyway.
(merge_chains): Use the remove_from_chain and add_to_chain
primitives to do the reparenting, instead of rolling our own
implementation.
(add_to_chain): The first non-disabled group in the chain's group
list will be the entry point for the chain. Because buffers can
accumulate in loop elements' peer bufpens, we preferentially
schedule loop groups before get groups to avoid unnecessary
execution of get-based groups when the bufpens are already full.
(gst_opt_scheduler_schedule_run_queue): Debug fixes.
(get_group_schedule_function): Ditto.
(loop_group_schedule_function): Ditto.
(gst_opt_scheduler_loop_wrapper): Ditto.
(gst_opt_scheduler_iterate): Ditto.

I understand the opt scheduler now, yippee!

* gst/gstpad.c: All throughout, added FIXMEs to look at for 0.9.
(gst_pad_get_name, gst_pad_set_chain_function)
(gst_pad_set_get_function, gst_pad_set_event_function)
(gst_pad_set_event_mask_function, gst_pad_get_event_masks)
(gst_pad_get_event_masks_default, gst_pad_set_convert_function)
(gst_pad_set_query_function, gst_pad_get_query_types)
(gst_pad_get_query_types_default)
(gst_pad_set_internal_link_function)
(gst_pad_set_formats_function, gst_pad_set_link_function)
(gst_pad_set_fixate_function, gst_pad_set_getcaps_function)
(gst_pad_set_bufferalloc_function, gst_pad_unlink)
(gst_pad_renegotiate, gst_pad_set_parent, gst_pad_get_parent)
(gst_pad_add_ghost_pad, gst_pad_proxy_getcaps)
(gst_pad_proxy_pad_link, gst_pad_proxy_fixate)
(gst_pad_get_pad_template_caps, gst_pad_check_compatibility)
(gst_pad_get_peer, gst_pad_get_allowed_caps)
(gst_pad_alloc_buffer, gst_pad_push, gst_pad_pull)
(gst_pad_selectv, gst_pad_select, gst_pad_template_get_caps)
(gst_pad_event_default_dispatch, gst_pad_event_default)
(gst_pad_dispatcher, gst_pad_send_event, gst_pad_convert_default)
(gst_pad_convert, gst_pad_query_default, gst_pad_query)
(gst_pad_get_formats_default, gst_pad_get_formats): Better
argument checks, and some doc fixes.

(gst_pad_custom_new_from_template): Um, does anyone
use these functions? Actually make a custom pad instead of a
normal one.
(gst_pad_try_set_caps): Transpose some checks.
(gst_pad_try_set_caps_nonfixed): Same, and use a macro to check if
the pad is in negotiation.
(gst_pad_try_relink_filtered): Use pad_link_prepare.

* gst/gstelement.c: Remove prototypes also defined in gstclock.h.

* gst/gstelement.h:
* gst/gstclock.h: Un-deprecate the old clocking API, as discussed
on the list.
2004-02-25 13:16:12 +00:00
Andy Wingo cded585aa2 gst/: Debugging tweaks.
Original commit message from CVS:
2004-02-20  Andy Wingo  <wingo@pobox.com>

* gst/gstbin.c:
* gst/gstbuffer.c:
* gst/gstplugin.c:
* gst/registries/gstxmlregistry.c:
* gst/schedulers/gstoptimalscheduler.c: Debugging tweaks.

* gst/gstelement.c (gst_element_set_scheduler): Debugging fixes.
(gst_element_add_pad): DEBUG->INFO, some fixes.
(gst_element_get_compatible_pad_template): Just see if the
templates' caps intersect, not if one is a strict subset of the
other. This conforms more to what gst_pad_link_intersect() does.
(gst_element_class_add_pad_template): Don't memcpy the pad
template, just ref it.
(gst_element_get_compatible_pad_filtered): Clean up debug messages

* gst/gstpad.c (gst_pad_can_link_filtered): Debug a true result.
(gst_pad_link_filtered): Debug changes.
(gst_pad_link_prepare): New function, consolidated from
can_link_filtered and link_filtered.

* gst/parse/grammar.y (gst_parse_perform_link): Made INFO output
look more like that of the functions in gstelement.c

* gst/gstinfo.c (gst_debug_print_object): Put a space before the
object, and return the empty string if object is NULL.

* gst/parse/parse.l: Remove trailing newlines when calling PRINT.
* gst/parse/grammar.y (YYFPRINTF): Log bison debugging info via
LOG, not DEBUG. We still get flex info on debug.

* gst/registries/gstxmlregistry.c (gst_xml_registry_load): Make
debug string more verbose.
(plugin_times_older_than): DEBUG->LOG.
2004-02-20 13:18:32 +00:00
Thomas Vander Stichele 5f91e9ad66 suffix errors with period.
Original commit message from CVS:
suffix errors with period.
use (NULL) over NULL
2004-01-31 19:30:31 +00:00
Thomas Vander Stichele c5b612edef GST_ELEMENT_ERROR
Original commit message from CVS:
GST_ELEMENT_ERROR
2004-01-29 23:17:58 +00:00
Thomas Vander Stichele 4efc300279 changing error signal add error codes and domains
Original commit message from CVS:
changing error signal
add error codes and domains
2004-01-18 21:36:20 +00:00
Benjamin Otte 1e82f617e4 gst/gstclock.*: deprecate old interface and disable functions that aren't in use anymore.
Original commit message from CVS:
2004-01-13  Benjamin Otte  <in7y118@public.uni-hamburg.de>

* gst/gstclock.c: (gst_clock_class_init), (gst_clock_init),
(gst_clock_set_speed), (gst_clock_set_active),
(gst_clock_is_active), (gst_clock_reset),
(gst_clock_handle_discont):
* gst/gstclock.h:
deprecate old interface and disable functions that aren't in use
anymore.
* gst/gstelement.h:
* gst/gstelement.c: (gst_element_get_time), (gst_element_wait),
(gst_element_set_time), (gst_element_adjust_time):
add concept of "element time" and functions to get/set this time.
* gst/gstelement.c: (gst_element_change_state):
update element time correctly.
* gst/gstelement.c: (gst_element_get_compatible_pad_filtered):
This is a debug message, not a g_critical.
* gst/gstpad.c: (gst_pad_event_default):
handle discontinuous events right with element time.
* gst/gstscheduler.c: (gst_scheduler_state_transition):
update to clocking fixes.
set clocks on elements in READY=>PAUSED. The old behaviour caused
a wrong element time on the first element that started playing.
* gst/schedulers/gstbasicscheduler.c:
(gst_basic_scheduler_class_init):
* gst/schedulers/gstoptimalscheduler.c:
(gst_opt_scheduler_class_init):
remove code that just implements the default behaviour.
* gst/elements/gstfakesink.c: (gst_fakesink_chain):
update to use new clocking functions
* testsuite/clock/clock1.c: (gst_clock_debug), (main):
* testsuite/clock/clock2.c: (gst_clock_debug), (main):
update to test new element time.
* gst/autoplug/gstspideridentity.c: (gst_spider_identity_getcaps):
use _get_allowed_caps instead of _get_caps. This catches filtered
caps correctly.
* testsuite/debug/commandline.c:
update for new GST_DEBUG syntax.
* testsuite/threads/Makefile.am:
disable a test that only works sometimes.
2004-01-14 00:46:48 +00:00
Iain Holmes e10cd625ca Reference the group when we add an element to it.
Original commit message from CVS:
Reference the group when we add an element to it.
2004-01-13 01:34:32 +00:00
Benjamin Otte a5bb704036 update - this is huge, because it includes *.bb, *.bbg and *.da files which are generated for gcov.
Original commit message from CVS:
2004-01-12  Benjamin Otte  <in7y118@public.uni-hamburg.de>

* examples/cutter/.cvsignore:
* examples/helloworld/.cvsignore:
* examples/launch/.cvsignore:
* examples/manual/.cvsignore:
* examples/mixer/.cvsignore:
* examples/pingpong/.cvsignore:
* examples/plugins/.cvsignore:
* examples/queue/.cvsignore:
* examples/queue2/.cvsignore:
* examples/queue3/.cvsignore:
* examples/queue4/.cvsignore:
* examples/retag/.cvsignore:
* examples/thread/.cvsignore:
* examples/typefind/.cvsignore:
* examples/xml/.cvsignore:
* gst/.cvsignore:
* gst/autoplug/.cvsignore:
* gst/elements/.cvsignore:
* gst/indexers/.cvsignore:
* gst/parse/.cvsignore:
* gst/registries/.cvsignore:
* gst/schedulers/.cvsignore:
* libs/gst/bytestream/.cvsignore:
* libs/gst/control/.cvsignore:
* libs/gst/getbits/.cvsignore:
* tests/.cvsignore:
* tests/bufspeed/.cvsignore:
* tests/instantiate/.cvsignore:
* tests/memchunk/.cvsignore:
* tests/muxing/.cvsignore:
* tests/sched/.cvsignore:
* tests/seeking/.cvsignore:
* tests/threadstate/.cvsignore:
* testsuite/.cvsignore:
* testsuite/caps/.cvsignore:
* testsuite/cleanup/.cvsignore:
* testsuite/dynparams/.cvsignore:
* testsuite/plugin/.cvsignore:
* tools/.cvsignore:
update - this is huge, because it includes *.bb, *.bbg and *.da files
which are generated for gcov.
2004-01-12 16:53:23 +00:00
Thomas Vander Stichele e448390775 removing last mentions of wingo cothreads
Original commit message from CVS:
removing last mentions of wingo cothreads
2003-12-24 15:11:20 +00:00
Benjamin Otte 46a70fddfb removed GST_*_CAST. Disabling of type checking is done in glib.
Original commit message from CVS:
removed GST_*_CAST. Disabling of type checking is done in glib.
2003-12-13 16:58:29 +00:00
Andy Wingo 8ca1b1fe7f remove copyright field from plugin structs
Original commit message from CVS:
remove copyright field from plugin structs
2003-12-04 10:02:41 +00:00
Benjamin Otte cb853c1bcf change the chainwrapper to allow removing pads during iterations
Original commit message from CVS:
change the chainwrapper to allow removing pads during iterations
2003-11-22 19:11:58 +00:00
Benjamin Otte 907e3e97d9 update plugin initialization restructuring (see email for details
Original commit message from CVS:
update plugin initialization restructuring (see email for details
2003-10-31 19:32:47 +00:00
Andy Wingo 31d748d332 s/GstBuffer/GstData/ in the API where you can pass events. Fix the plugins to deal with that. Fixes #113488. Also inc...
Original commit message from CVS:
s/GstBuffer/GstData/ in the API where you can pass events. Fix the plugins to deal with that. Fixes #113488. Also includes scheduler patches, and probably fixes some queue bugs relating to events and buffers.
2003-10-08 16:06:02 +00:00
Thomas Vander Stichele 1adec99a85 forward port of 123517 adds more debug info to optscheduler
Original commit message from CVS:
forward port of 123517
adds more debug info to optscheduler
2003-10-05 15:18:11 +00:00
Iain Holmes ebaed96716 When scheduling a group, check that its not the group thats currently in the top of the runqueue.
Original commit message from CVS:
When scheduling a group, check that its not the group thats currently in the
top of the runqueue.

Then, when scheduling a different group, disable the first group and search for the next enabled group to run. Stops deadlocking in loop based elements.

Also remove the g_list_length's from the debugging statements for a bit of speed
2003-09-27 14:13:41 +00:00
Thomas Vander Stichele c4c3c998df reverting error patches before making a branch.
Original commit message from CVS:
reverting error patches before making a branch.
2003-09-16 09:57:31 +00:00
Benjamin Otte be1eaa4de3 implement translatable error messages using gerror.
Original commit message from CVS:
implement translatable error messages using gerror.

Includes bugfixes for:
- crash when unlinking Ghostpads
- make *_PAD_* macros use glib casts
- make spider typefinding merge buffers correctly
2003-09-14 19:49:32 +00:00
Angel Carpintero 7e6ea67d56 fix the error that break the built
Original commit message from CVS:
fix the error that break the built
2003-08-27 10:19:08 +00:00
Thomas Vander Stichele 4aeb784a6f fixes event function setting on unconnected pads
Original commit message from CVS:
fixes event function setting on unconnected pads
2003-08-26 10:50:35 +00:00
David Schleef 590d364baa Removed building of ext/cothreads and corresponding scheduler. If you want to reenable it, please fix it first. (Se...
Original commit message from CVS:
Removed building of ext/cothreads and corresponding scheduler.  If
you want to reenable it, please fix it first.  (See bug #87163)
2003-07-27 05:10:42 +00:00
Andy Wingo ff57e00592 run pre_run_func and post_run_func when working without a cothread -- fixes threadsafe element props
Original commit message from CVS:
run pre_run_func and post_run_func when working without a cothread -- fixes threadsafe element props
2003-07-16 15:39:46 +00:00
Benjamin Otte 803ce6bf48 GST_DEBUG reorganization containing loads of stuff:
Original commit message from CVS:
GST_DEBUG reorganization
This is a big diff (ca 450k), containing loads of stuff:
- gstinfo.[ch] complete rewrite
- changing of all GST_DEBUG messages to reflect that change
- reorganization of subsystem disabling
- addition of gstconfig.h.in so we can track the disablings
- <gst/gst.h> does not include <unistd.h> and <config.h> anymore
- documentation updated for gstinfo stuff (build the docs yourself to know what changed)
- bugfixes for making of the docs (files from CVS are not deleted anymore
- testsuite for debugging changes in testsuite/debug

expect breakage
2003-06-29 14:05:49 +00:00
Wim Taymans 61a4a6389f try to fix #114252
Original commit message from CVS:
try to fix #114252
2003-06-07 11:36:42 +00:00
David Schleef 214c557a6d Change GST_DEBUG_FUNCPTR() to return a pointer of the same type that it is called with. Fix lots of warnings due to ...
Original commit message from CVS:
Change GST_DEBUG_FUNCPTR() to return a pointer of the same type that it
is called with.  Fix lots of warnings due to change.
2003-05-18 23:34:12 +00:00
Thomas Vander Stichele bdea7633cd a bunch of gtk-doc fixes
Original commit message from CVS:
a bunch of gtk-doc fixes
2003-05-18 15:03:34 +00:00
Benjamin Otte b7077cab18 make gst_thread_get_current() work with threaded cothreads
Original commit message from CVS:
make gst_thread_get_current() work with threaded cothreads
2003-04-21 18:37:13 +00:00
Wim Taymans 63db8dfb67 - enable chain if an active group is added to it
Original commit message from CVS:
- enable chain if an active group is added to it
- enable group if a PLAYING element is added to it
2003-03-28 17:29:57 +00:00
Wim Taymans 5b91593b0e Set initial flags on various scheduler structures
Original commit message from CVS:
Set initial flags on various scheduler structures
2003-03-25 19:34:30 +00:00
Benjamin Otte 981f6185c5 debugging session with wim
Original commit message from CVS:
debugging session with wim
2003-03-13 23:59:36 +00:00
Wim Taymans 4e44ab15b5 - fix unlink between decoupled elements
Original commit message from CVS:
- fix unlink between decoupled elements
- clear the entry point of a group when we remove the element
- fix a potential problem in _merge_groups that could be triggered when
someone is holding an extra refcount to the group.
2003-03-13 18:46:21 +00:00
Benjamin Otte 35391c0907 mutexes want to be free, too
Original commit message from CVS:
mutexes want to be free, too
2003-03-12 21:55:09 +00:00
Wim Taymans 678ea8bbbb Fix optimal scheduler with cothreads
Original commit message from CVS:
Fix optimal scheduler with cothreads
2003-03-11 23:26:18 +00:00
Benjamin Otte 0f2a63a169 Fix bug when joining threads.
Original commit message from CVS:
Fix bug when joining threads.
2003-03-11 21:37:36 +00:00
Benjamin Otte c3ebe159bd added (hopefully) compatible cothreads emulation by using GThreads.
Original commit message from CVS:
added (hopefully) compatible cothreads emulation by using GThreads.
use '--gst-scheduler=basicgthread' to try it out
includes bugfix for opt to call do_cothreads_init when using threads
2003-03-11 21:01:31 +00:00
Wim Taymans aab288b33e Never take away the group from a loop based element
Original commit message from CVS:
Never take away the group from a loop based element
2003-03-04 20:55:25 +00:00
Wim Taymans 5bda977d93 Fix the get_wrapper to handle the case where the peer group is disabled
Original commit message from CVS:
Fix the get_wrapper to handle the case where the peer group is disabled
2003-02-28 23:14:50 +00:00
Wim Taymans f006787228 Stupid bug, always use the runqueue to start scheduling things.
Original commit message from CVS:
Stupid bug, always use the runqueue to start scheduling things.
2003-02-28 17:50:04 +00:00
Wim Taymans 777cae1b0b Schedule next chain on interrupt
Original commit message from CVS:
Schedule next chain on interrupt
2003-02-27 23:47:40 +00:00
Wim Taymans 71775c37e3 - More refcounting fixes that now sustain abuse from spider, key is to be careful when iterating over a list when our...
Original commit message from CVS:
- More refcounting fixes that now sustain abuse from spider, key is to be
careful when iterating over a list when our current pointer could be
removed.
2003-02-27 23:07:30 +00:00
Wim Taymans e44d5c1d4a Removed an assert that will not hold when the chain currently executing was merged into another one.
Original commit message from CVS:
Removed an assert that will not hold when the chain currently executing
was merged into another one.
2003-02-27 21:23:39 +00:00
Wim Taymans 2b3c56c4d1 print refcount in _show
Original commit message from CVS:
print refcount in _show
2003-02-27 18:29:07 +00:00
Wim Taymans 91d33d766a Added refcounting to the optimal scheduler to guard against modifications during iterations
Original commit message from CVS:
Added refcounting to the optimal scheduler to guard against modifications
during iterations
2003-02-27 18:21:34 +00:00
Wim Taymans a2b7df0911 More sensible name for the scheduler when compiled without cothreads
Original commit message from CVS:
More sensible name for the scheduler when compiled without cothreads
2003-02-10 20:11:14 +00:00
Erik Walthinsen 0da768dacb Fix various inconsistencies discovered while attempting to fix --disable-*.
Original commit message from CVS:
Fix various inconsistencies discovered while attempting to fix --disable-*.
Uraeus: this should fix the bison.simple problem that you've had.
2003-02-10 07:53:58 +00:00
Wim Taymans 50fccd3791 Clear any queued buffers when going to READY.
Original commit message from CVS:
Clear any queued buffers when going to READY.
2003-02-06 20:22:34 +00:00
Ronald S. Bultje 637326bc8d older gccs crack here
Original commit message from CVS:
older gccs crack here
2003-02-05 17:09:50 +00:00
Wim Taymans d7e33dd2ce - Use the eventhandler instead of the event function to send events.
Original commit message from CVS:
- Use the eventhandler instead of the event function to send events.
- make the scheduler setup the eventhandlers
- intercept flush events on pads links that can potentially queue data
and flush it.
- some more debugging info in spider.

I can think of one case where this flush might fail: unconnected pads where
the scheduler has not set up the eventhandler yet. I'll come up with a
solution for that soon.
2003-02-03 22:50:55 +00:00
Wim Taymans b87dbe8c98 Some extra debug info
Original commit message from CVS:
Some extra debug info
2003-02-02 19:14:26 +00:00
Erik Walthinsen bab7be2c91 revert the revert, switch out the new code for the 'working' code with an #if
Original commit message from CVS:
revert the revert, switch out the new code for the 'working' code with an #if
2003-01-21 20:48:23 +00:00
Wim Taymans 69be241342 Revert 1.66 and 1.67 that seemed to break the unlink scheduler function 1.68 is still added
Original commit message from CVS:
Revert 1.66 and 1.67 that seemed to break the unlink scheduler function
1.68 is still added
2003-01-21 18:39:11 +00:00
Wim Taymans 59a224893a Some more debugging
Original commit message from CVS:
Some more debugging
2003-01-20 23:11:51 +00:00
Wim Taymans 826f848618 - We need to pull UNUSABLE pads too because it might be an event
Original commit message from CVS:
- We need to pull UNUSABLE pads too because it might be an event
2003-01-20 23:10:32 +00:00
Erik Walthinsen de6bcd890a - added 'remove' argument to _chain_recursive_add to remove elements from old chain before adding to new one
Original commit message from CVS:
- added 'remove' argument to _chain_recursive_add to remove elements from
old chain before adding to new one
- reworked _pad_unlink to be simpler and more correct
2003-01-20 22:22:46 +00:00
Erik Walthinsen cbbb8371fe moved recursive exit to the front of the call, to make it easier to add prevchain removal
Original commit message from CVS:
moved recursive exit to the front of the call, to make it easier to add prevchain removal
2003-01-20 22:02:46 +00:00
Erik Walthinsen 590604e430 - some minor whitespace cleanups
Original commit message from CVS:
- some minor whitespace cleanups
- rework _chain_add_element to put the element in either the main or
disabled lists depending on whether the element is PLAYING or not.
2003-01-20 21:23:19 +00:00
Wim Taymans 59bd88118f Added interrupt back in spider, make opt scheduler schedule next chain on interrupt (like basic did)
Original commit message from CVS:
Added interrupt back in spider, make opt scheduler schedule next chain
on interrupt (like basic did)
2003-01-12 20:28:08 +00:00
Wim Taymans 89bf2733e9 - return boolean in _interrupt to better inform element
Original commit message from CVS:
- return boolean in _interrupt to better inform element
- fix default bufferpool unref
2003-01-11 16:27:45 +00:00
Iain Holmes 7ec295a0cd Don't remove an element from its chain if it doesn't have a chain
Original commit message from CVS:
Don't remove an element from its chain if it doesn't have a chain
2003-01-11 13:44:33 +00:00
David I. Lehn 5a74101933 more connect -> link updates
Original commit message from CVS:
more connect -> link updates
2003-01-09 22:59:37 +00:00
Thomas Vander Stichele 5529bbc7dc first pass of connect->link gst-plugins and other stuff compiles without change at this point
Original commit message from CVS:
first pass of connect->link
gst-plugins and other stuff compiles without change at this point
2003-01-09 14:15:37 +00:00
Wim Taymans e8b63df877 Provide intrastructure to not have to pass NULL buffers on errors and interrupts, this should fix some issues with th...
Original commit message from CVS:
Provide intrastructure to not have to pass NULL buffers on errors and
interrupts, this should fix some issues with the optimal scheduler.
2003-01-08 21:33:20 +00:00
Wim Taymans 6653167f11 - Remove annoying \n from cothread INFO/DEBUG messages
Original commit message from CVS:
- Remove annoying \n from cothread INFO/DEBUG messages
- only set an element to PAUSED when it gave an error during PLAYING
- ensure internal consistency of opt scheduler structures
- Added mex_recursion to opt scheduler
2003-01-01 04:28:33 +00:00
Wim Taymans a03425c8b3 - disable pads when going to PAUSED, we want to make sure no data is passing when an element is not PLAYING.
Original commit message from CVS:
- disable pads when going to PAUSED, we want to make sure no data is
passing when an element is not PLAYING.
- changed the clock sync API, element should now get a ClockID first and
sync on that. This makes it possible to cancel clock requests.
2002-12-27 22:57:13 +00:00
Wim Taymans 2694db659d Fix merge_groups
Original commit message from CVS:
Fix merge_groups
2002-12-26 22:11:04 +00:00
Wim Taymans abfc7a0ed8 implemented yield/interrupt
Original commit message from CVS:
implemented yield/interrupt
2002-12-21 02:25:54 +00:00
Wim Taymans 4a63ac4d02 Destroy cothreads first before destroying context
Original commit message from CVS:
Destroy cothreads first before destroying context
2002-12-20 18:49:17 +00:00
Wim Taymans 68b53ac4ab - Cleanups
Original commit message from CVS:
- Cleanups
- Added padding to structs
- fixed typechecking/casts
- reduced casts
- implemented remove_element in gstbin
- implemented set index on bin
2002-12-19 21:31:03 +00:00
Wim Taymans 7e16eb73de Delete chains only once..
Original commit message from CVS:
Delete chains only once..
2002-12-19 19:45:13 +00:00
Wim Taymans e7ccc2ec08 - Factor out some error functions
Original commit message from CVS:
- Factor out some error functions
- handle the cases where multipad get to multi-sink loop/chain based
elements are connected.
2002-12-16 21:21:02 +00:00
Wim Taymans 103d810e2c Decoupled elements needs special case when we look for grouped elements.
Original commit message from CVS:
Decoupled elements needs special case when we look for grouped elements.
2002-12-15 22:52:48 +00:00
Wim Taymans bd9dc3604f Some cleanups, added FIXMEs
Original commit message from CVS:
Some cleanups, added FIXMEs
2002-12-15 22:02:20 +00:00
Wim Taymans 8f06b55c38 - Removed old deprecated fastscheduler
Original commit message from CVS:
- Removed old deprecated fastscheduler
- ifdef out cothread specific code in optimalscheduler
- added more g_asserts to optimalscheduler
- create separate scheduler called "opt", removed property from scheduler
- fixed iterations property
2002-12-15 18:21:43 +00:00
Wim Taymans 11b376c838 Improve the optimal scheduler, mainly element remove and pad disconnect
Original commit message from CVS:
Improve the optimal scheduler, mainly element remove and pad disconnect
2002-12-15 12:18:04 +00:00
Wim Taymans 0d994e41ad turn off cothreads, fix some typos
Original commit message from CVS:
turn off cothreads, fix some typos
2002-12-09 22:31:16 +00:00
Wim Taymans f07281a771 Destroying the cothread seems like a good idea here
Original commit message from CVS:
Destroying the cothread seems like a good idea here
2002-12-09 20:33:27 +00:00
Thomas Vander Stichele 7eea6a04b7 fix for parallel installability
Original commit message from CVS:
fix for parallel installability
2002-12-08 14:39:38 +00:00
David Schleef 2fed56b4a8 Removing unused code related to stack allocation (cothreads_stackquery(), gst_scheduler_get_preferred_stack())
Original commit message from CVS:
Removing unused code related to stack allocation (cothreads_stackquery(),
gst_scheduler_get_preferred_stack())
2002-12-06 23:05:26 +00:00
Wim Taymans 86376a2402 Make different names for the different cothreads implementations
Original commit message from CVS:
Make different names for the different cothreads implementations
2002-11-25 00:20:52 +00:00
Wim Taymans ce5f3238d2 Make sure to unset the scheduler
Original commit message from CVS:
Make sure to unset the scheduler
2002-11-22 23:17:39 +00:00
Wim Taymans 9955ea95b9 Remove groups from chains and elements from groups when they are destroyed.
Original commit message from CVS:
Remove groups from chains and elements from groups when they are destroyed.
2002-11-07 18:50:06 +00:00
Wim Taymans 91b824a34c - Reworked the clock to prepare for async notifications
Original commit message from CVS:
- Reworked the clock to prepare for async notifications
- moved some common scheduler checking to gstbin
- added some vmethods to gstbin for future use
- more fixes to the optimal scheduler
- use new clock api in the schedulers
2002-11-02 13:54:34 +00:00
Thomas Vander Stichele 929f37fab1 I ran into this and had to hunt for it
Original commit message from CVS:
I ran into this and had to hunt for it
2002-09-30 10:58:40 +00:00
David Schleef 4da8cc062b Fix for compiler warnings on PowerPC. Compiler complains about longjmp() clobbering local variables, which appear to...
Original commit message from CVS:
Fix for compiler warnings on PowerPC.  Compiler complains about longjmp()
clobbering local variables, which appear to be bogus.
2002-09-18 06:21:58 +00:00
Wim Taymans e6e1dc2e0e - some cleanups
Original commit message from CVS:
- some cleanups
- revert a patch that needs more thinking..
- move common code and sanity checks in gstscheduler.c instead of the
real schedulers.
- remove sanity checks from the schedulers
2002-09-13 23:02:54 +00:00
Wim Taymans 3443f74f10 Added optimal scheduler to build and call it optomega
Original commit message from CVS:
Added optimal scheduler to build and call it optomega
2002-09-12 21:00:57 +00:00
Wim Taymans 37a127d9ed - Make the return GList of gst_element_get_pad_list as const
Original commit message from CVS:
- Make the return GList of gst_element_get_pad_list as const
- Pad scheduler refactoring
- Remove gst_pad_set/unset_scheduler as it's not needed
- Reimplement gst_pad_get_scheduler using the parent scheduler
- Remove gst_pad_peek as it cannot work reliably
- Remove the pad bufpen, replace with scheduler private gpointer
- Make queue use the new _get_scheduler implementation
- Remove _pad_unset_scheduler from GstScheduler
- Remove LOOP_SEEK mode from aggregator
- Other fixes for API changes.
2002-09-12 20:52:03 +00:00
Thomas Vander Stichele 17d01b5d21 scheduler renaming
Original commit message from CVS:
scheduler renaming
- wingo or omega for cothreads package
- basic or fast or optimal for algorithms
2002-09-12 19:23:41 +00:00
Wim Taymans 27301abdb3 More updates to the non-cothread scheduler
Original commit message from CVS:
More updates to the non-cothread scheduler
2002-09-12 19:22:03 +00:00
Thomas Vander Stichele dd9d93d295 code cleanup
Original commit message from CVS:
code cleanup
2002-09-12 18:54:16 +00:00
Thomas Vander Stichele 01c9750b48 makes for nicer looking code
Original commit message from CVS:
makes for nicer looking code
2002-09-12 18:51:17 +00:00
Wim Taymans 09051e110b Added comments
Original commit message from CVS:
Added comments
Added _show
Special cased wrapper functions to minimize checks at runtime
2002-09-08 22:42:29 +00:00
Wim Taymans d5d1387153 A new scheduler that tries to minimize the number of cothreads, still needs a lot of work.
Original commit message from CVS:
A new scheduler that tries to minimize the number of cothreads,
still needs a lot of work.
2002-09-08 17:58:00 +00:00
Thomas Vander Stichele de527dd234 nicer looking
Original commit message from CVS:
nicer looking
2002-08-28 10:11:26 +00:00
Thomas Vander Stichele 5921d35a67 more nonsrcdir build fixes
Original commit message from CVS:
more nonsrcdir build fixes
2002-08-13 22:30:46 +00:00
Wim Taymans a33c875057 Don't try to pull on disabled pads in the scheduler
Original commit message from CVS:
Don't try to pull on disabled pads in the scheduler
2002-07-24 21:09:46 +00:00
Thomas Vander Stichele 45d414338b Makefile.am portability fix better error handling, this solves the g_error_free assert error some people had
Original commit message from CVS:
Makefile.am portability fix
better error handling, this solves the g_error_free assert error some people
had
2002-07-12 14:14:30 +00:00
Wim Taymans 83f2253007 Set the scheduler to NULL in all cases.
Original commit message from CVS:
Set the scheduler to NULL in all cases.
2002-07-02 18:42:00 +00:00
Andy Wingo 2eb7f04289 free stack properly s/prefered/preferred/
Original commit message from CVS:
* free stack properly
* s/prefered/preferred/
2002-06-27 23:55:27 +00:00
Thomas Vander Stichele b7bc06aee5 ok, this seems to be the right fix for the basic scheduler.
Original commit message from CVS:
ok, this seems to be the right fix for the basic scheduler.
I'd appreciate it if :
a) someone looks over these minimal changes and tells me if they're done
in the right way (especially the alignment argument ;))
b) others run lots of pipes with basic and tell me if they still have
issues
If all goes well I want to revert to the basic scheduler and do a release
2002-06-26 08:22:17 +00:00
Wim Taymans bcb921d550 This makes more sense and solves the locking problem when a loop based element is selected as the entry point.
Original commit message from CVS:
This makes more sense and solves the locking problem when a loop based
element is selected as the entry point.
2002-06-23 12:50:12 +00:00
Wim Taymans 14186b75ea Or not..
Original commit message from CVS:
Or not..
2002-06-23 12:42:01 +00:00
Wim Taymans b70675d241 Unlock an element even if it was a loop based one
Original commit message from CVS:
Unlock an element even if it was a loop based one
2002-06-23 12:21:50 +00:00
Andy Wingo 16074b7263 implement _destroy, and fix some bugs changing songs in the player doesn't work now, i don't know why yet
Original commit message from CVS:
implement _destroy, and fix some bugs

changing songs in the player doesn't work now, i don't know why yet
2002-06-23 04:31:45 +00:00
Thomas Vander Stichele d3e33a16ac as promised, the header changes and some of wingo's virtual fixes as well by accident
Original commit message from CVS:
as promised, the header changes
and some of wingo's virtual fixes as well by accident
2002-06-22 23:17:44 +00:00
Wim Taymans 1fa83fa256 Pass some required params to cothreads_init
Original commit message from CVS:
Pass some required params to cothreads_init
2002-06-21 08:00:13 +00:00
Wim Taymans 3dd3895eea Added _get_prefered_stack to the scheduler
Original commit message from CVS:
Added _get_prefered_stack to the scheduler
2002-06-19 18:13:28 +00:00
Wim Taymans b1125b04ba Added more debugging info
Original commit message from CVS:
Added more debugging info
2002-06-16 22:36:10 +00:00
Thomas Vander Stichele 8e0687e93d print the name
Original commit message from CVS:
print the name
2002-06-16 21:20:07 +00:00
Wim Taymans 02adc6b669 Better add the check instead of crashing
Original commit message from CVS:
Better add the check instead of crashing
2002-06-16 19:48:38 +00:00
Wim Taymans bfca3a0739 Fixed the fast scheduler by proxying event to the event handler when the element is not event aware.
Original commit message from CVS:
Fixed the fast scheduler by proxying event to the event handler when the
element is not event aware.
2002-06-16 19:33:15 +00:00
Wim Taymans 4d85bfc2df Use setfunc to set the cothread function instead of _reset
Original commit message from CVS:
Use setfunc to set the cothread function instead of _reset
2002-06-16 17:34:14 +00:00
Wim Taymans be30fb14fd Set the right scheduler on the pads of decoupled elements.
Original commit message from CVS:
Set the right scheduler on the pads of decoupled elements.
2002-06-05 18:10:55 +00:00
Wim Taymans a0979c2ddc Some sanity checking emit a warning when interrupting a queue bacause we do it wrongly
Original commit message from CVS:
Some sanity checking
emit a warning when interrupting a queue bacause we do it wrongly
2002-06-04 23:00:36 +00:00
Wim Taymans 62cea79ba7 Some cleanups, refactor some code, make sure the decoupled peer element has the right handlers
Original commit message from CVS:
Some cleanups, refactor some code, make sure the decoupled peer element
has the right handlers
2002-06-04 21:03:35 +00:00
Wim Taymans 7e1a122599 Some sanity checking for when the element was removed from the pipeline.
Original commit message from CVS:
Some sanity checking for when the element was removed from the pipeline.
2002-06-02 17:44:20 +00:00
Andy Wingo 0694a337a1 Properly fix locking in the scheduler
Original commit message from CVS:
Properly fix locking in the scheduler
2002-06-02 16:20:09 +00:00
Wim Taymans 71e51b171c This is needed after all..
Original commit message from CVS:
This is needed after all..
2002-06-02 11:21:35 +00:00
Steve Baker 52af47c5e4 fix from wingo so that get functions inside threads won't be locked twice
Original commit message from CVS:
fix from wingo so that get functions inside threads won't be locked twice
2002-05-29 15:33:46 +00:00
Wim Taymans b07791a06b Handle the case where the pad change mid-switch.
Original commit message from CVS:
Handle the case where the pad change mid-switch.
Handle the case where the entry poin is removed from the scheduler.
2002-05-29 15:09:36 +00:00
Andy Wingo c887de8332 fixups in the prop view/controller compilation fixes in the player add gst-editor to gst-all fixes to adder to comply...
Original commit message from CVS:
* fixups in the prop view/controller
* compilation fixes in the player
* add gst-editor to gst-all
* fixes to adder to comply with new osssink sync issues
* alsa fixes, although still 100% cpu is used, yum
* reenable locking of threaded elements, seems to work fine here
* fix a makefile in examples/plugins
2002-05-27 04:48:57 +00:00
Wim Taymans 6f96a24d2e - The clock_wait now returns the difference between requested time and unlock time.
Original commit message from CVS:
- The clock_wait now returns the difference between requested time and
unlock time.
- Misc defines like GST_SECOND in gstclock.h
- remove pre/post in gstelement.c until fixed.
- added release_locks to gstelement so that the element can unlock itself
- added some more predefined events.
- added folowing functions to gstpad:
- convert function: get the relation between formats on this pad
- query function: get stats about the pad (position/total/latency)
- internal connect function: find out how this pad connects to other
pad internally to the element.
- generic pad_dispatcher.
- removed the last bits of pullregion
- use release_locks on the queue.
- added some events to queue
- make gstthread use the new release_locks function
- make the scheduler use the new clock_wait functions
- added events to fakesink
- added query functions to filesrc
- swap type and offset in the bytestream seek API to match fseek
- added some event handling in bytestream.
2002-05-26 21:54:27 +00:00
Andy Wingo d2ed0906a6 implemented threadsafe property set/get system as discussed in docs/random/wingo/threadsafe-properties some cleanups ...
Original commit message from CVS:
* implemented threadsafe property set/get system as discussed in
docs/random/wingo/threadsafe-properties
* some cleanups
* this change will cause binary incompatibilities, better rebuild them plugins

now, off to drink :-)
2002-05-26 03:23:25 +00:00
Thomas Vander Stichele e8982eaf0f API cleanup: (s/g)et_sched -> _scheduler
Original commit message from CVS:
API cleanup: (s/g)et_sched -> _scheduler
2002-05-25 15:36:59 +00:00
Wim Taymans 92a284110b Unconnected pad errors are detected elsewhere
Original commit message from CVS:
Unconnected pad errors are detected elsewhere
ERROR has higher priority than CHANGED.
2002-05-09 15:15:49 +00:00
Wim Taymans 086de421dc Totally rewritten registry handling.
Original commit message from CVS:
Totally rewritten registry handling.
- move the registry save/load code into a gstregistry subclass, this
will make it possible to use other registries (flat file, web based,
RDBMS type, etc..)
- a simple GMarkup xml registry is implemented
- use standard statically linked plugins for core elements.
- GstPlugin has a very well defined set of functions now
A little bytestream hack..
Added more info to -inspect.
Some more debugging info for clocking.
Small cleanups

I use ./gst-register --gst-plugin-path=/opt/src/sourceforge/gst-plugins/gst-libs:/opt/src/sourceforge/gst-plugins/
to register core and gst-plugins now.
2002-05-08 20:40:48 +00:00
Andy Wingo e559ea8a64 virtual patch from taaz
Original commit message from CVS:
virtual patch from taaz
2002-05-08 01:44:03 +00:00
Andy Wingo cb5ca2ffb5 fix distcheck issue
Original commit message from CVS:
fix distcheck issue
2002-05-07 20:24:56 +00:00
Benjamin Otte 72dd13b5bd merged schedulers
Original commit message from CVS:
merged schedulers
- new file cothreads_compat.h to provide linking to desired cothreads package
- changes in basic and fast scheduler to use cothreads_compat.h
- updated Makefile to build the basic and the fast scheduler from both packages
- removed gststandardscheduler.c - it is not needed anymore

Available schedulers are now 'basic', 'standard', 'fastbasic' and 'faststandard' where the basic ones are built with old cothreads and the standard ones with the new cothreads.
2002-05-06 19:23:37 +00:00
Andy Wingo 16867f27e6 let's not clobber our local variables -- i think this is a good short-term fix until i get to hacking on the standard...
Original commit message from CVS:
let's not clobber our local variables -- i think this is a good short-term
fix until i get to hacking on the standard scheduler again.
2002-04-22 04:43:28 +00:00
Benjamin Otte ce8e4a8879 we don't use // in code we commit :)
Original commit message from CVS:
hi wtay (and some others): we don't use // in code we commit :)
2002-04-14 14:59:34 +00:00
Andy Wingo b214d35eed commit to make gstreamer follow the gtk function/macro naming conventions:
Original commit message from CVS:
commit to make gstreamer follow the gtk function/macro naming conventions:

GstPadTemplate <-> gst_pad_template <-> GST_PAD_TEMPLATE

and the same for *factory and typefind.
2002-04-11 20:35:18 +00:00
Benjamin Otte 8ae7350492 fix all compiler warnings
Original commit message from CVS:
fix all compiler warnings
2002-04-04 19:28:23 +00:00
Andy Wingo cfb228b0f9 add notify back to filesrc, it's needed for MVC applications remove notify printouts from gst-launch cleanup in gst-p...
Original commit message from CVS:
* add notify back to filesrc, it's needed for MVC applications
* remove notify printouts from gst-launch
* cleanup in gst-plugins configure.ac
* some jack updates
* remove SELF_ITERATING flag in favor of SEF_SCHEDULABLE (not a clear name,
but it's what we have for the moment)
* improve parsing of request pad names, no more sscanf
* fixes to the fastscheduler Makefile.am
2002-03-30 19:31:14 +00:00
Wim Taymans f0326eea55 - Remove the propsprivate header file
Original commit message from CVS:
- Remove the propsprivate header file
- Added new API for properties.
- Moved the clock distribution to the scheduler.
- Removed the lock from GstCaps
- Added boxed types for Caps/Props
- Simplified the clock, new systemclock implementation
- Removed deprecated element_info/send_event functions
- First step at exposing more info in the pad_connect functions
- Queue cleanup
- Make the scheduler aware of other schedulers inside it
- Added the _SELF_SCHEDULABLE flag to gstthread
- Removed _get_widget from _utils, changed to new props API
- Make fakesink sync on timestamps when requested
- Removed the offset notify from filesrc
- Added a fast scheduler
- some scheduler cleanups.
2002-03-30 17:05:03 +00:00
Andy Wingo ed9b628168 filter newlines out of GST_DEBUG statements to reflect new core behavior fixes to adder's caps, again
Original commit message from CVS:
* filter newlines out of GST_DEBUG statements to reflect new core behavior
* fixes to adder's caps, again
2002-03-24 22:07:09 +00:00
Andy Wingo d6b07866ca let's not give our plugins -release versioning make clean before rebuilding after you update on this one...
Original commit message from CVS:
let's not give our plugins -release versioning
make clean before rebuilding after you update on this one...
2002-03-19 05:46:38 +00:00
Andy Wingo 0067d17205 removal of //-style comments don't link plugins to core libs -- the versioning is done internally to the plugins with...
Original commit message from CVS:
* removal of //-style comments
* don't link plugins to core libs -- the versioning is done internally to the plugins with the plugin_info struct,
and symbol resolution is lazy, so we can always know if a plugin can be loaded by the plugin_info data. in theory.
2002-03-19 04:10:13 +00:00
Thomas Vander Stichele 8a39e98f8b G_BREAKPOINT is x86-only
Original commit message from CVS:
G_BREAKPOINT is x86-only
2002-03-14 16:01:14 +00:00
David Schleef b7d0645e36 Add inclusion of errno.h, so it compiles on PowerPC.
Original commit message from CVS:
Add inclusion of errno.h, so it compiles on PowerPC.
2002-03-10 20:45:11 +00:00
Andy Wingo 0c6802533c document gst_caps_debug change gst_caps_debug to accept a label argument, assists greatly in debugging capsnego bette...
Original commit message from CVS:
* document gst_caps_debug
* change gst_caps_debug to accept a label argument, assists greatly
in debugging capsnego
* better names from gst_object_name_default
* some more debugging in gstpad.c
* require caps to match padtemplates on both side of a connection
* gstspider uses default naming so that names are globally unique
* moved filesrc offset arg to the top -- show up first in a prop list.
in the future we should have flags on props indicating which ones
it might be interesting for the end-user to change.
* initialize cothreads in the more standard way, and provide some more debugging
2002-03-03 00:44:41 +00:00
Wim Taymans 7835b75f0a Store the element in the cothread private field.
Original commit message from CVS:
Store the element in the cothread private field.
If we remove the current entry in the cothread chain, make sure another
cothread is marked as COTHREAD_STOPPING.
2002-02-23 13:42:51 +00:00
Andy Wingo 2cb0dd9d9b many fixes related to dynamic pipelines.
Original commit message from CVS:
* many fixes related to dynamic pipelines.
* addition of gst_element_disconnect_elements(), as per connect_elements()
* don't have a cow if typefind changes state in its signal handlers
* support of request pad -> request pad in connect_elements()
* some fixes in int2float that will eventually need to be ported to float2int and
adder

the gstelement api is getting bloated, expect a rewrite within the next month.
2002-02-18 00:40:56 +00:00
Thomas Vander Stichele 3758abca8d revert part of wingo's patch wingo, I'm not doing this to piss you off ;) but with your change we get the reverse iss...
Original commit message from CVS:
revert part of wingo's patch
wingo, I'm not doing this to piss you off ;)
but with your change we get the reverse issue : stuff in libs/gst needs
gstmarshal.[ch], which are only generated if we go in gst before libs.
So unless we just throw the egg at the chicken we'll have to settle for a
hack.
Alternatively, we could take the egg out of the chicken and put it in
a separate tarball which would then be installed ;)
2002-02-12 22:28:25 +00:00
Andy Wingo 7305565829 fix funny build issue by not linking plugin libraries to gstreamer core. this is because they are plugins, not shared...
Original commit message from CVS:
fix funny build issue by not linking plugin libraries to gstreamer core. this is
because they are plugins, not shared libraries per se, and will only be loaded by
the core itself. this change allows the core elements (schedulers, autopluggers, etc)
to use the core loadable libraries (bytestream, getbits, etc) as well as "ext" libs
like the new cothreads package.
2002-02-12 17:50:22 +00:00
Thomas Vander Stichele 211f7c994d this is a really evil hack.
Original commit message from CVS:
this is a really evil hack.
I would like for someone to help wingo and me fixing it properly ;)
and for that I could use a little basic education on some of the LD FLAGS
we need all over because trying to fix it properly got me confused.
2002-02-11 12:08:50 +00:00
Andy Wingo e8b452e27c it still only iterates once, but we're getting there
Original commit message from CVS:
it still only iterates once, but we're getting there
2002-02-11 07:45:30 +00:00
Andy Wingo 8af369ecf6 removed cothread-specific code from gstinfo.c because the new cothreads has no cothread_self()
Original commit message from CVS:
* removed cothread-specific code from gstinfo.c because the new cothreads has no cothread_self()
* added a new scheduler, untested but it does compile :-)
* cothreads links to the scheduler, not core now
* no installation of cothreads headers
2002-02-11 01:38:55 +00:00
Thomas Vander Stichele f985019e4c more build cleanups (using as-version and as-libtool) some release doc notes from the previous release
Original commit message from CVS:
* more build cleanups (using as-version and as-libtool)
* some release doc notes from the previous release
2002-02-09 21:05:12 +00:00