Commit graph

11 commits

Author SHA1 Message Date
Erik Walthinsen
a80b0c26d5 Added DEBUG, INFO, and ERROR systems. Very little code is converted yet.
Original commit message from CVS:
Added DEBUG, INFO, and ERROR systems.  Very little code is converted yet.
Policy decisions need to be made as to what kinds of cases get what kind
of response, and what the default ERROR response should be.  Right now it
will print out all the information, then have gdb spew a stack trace.
2000-12-29 10:02:17 +00:00
Erik Walthinsen
ca1c48e95c Updated copyright in all the libgst files.
Original commit message from CVS:
Updated copyright in all the libgst files.
Created gst_private.h, set up all files to use it.
2000-12-28 22:12:02 +00:00
Erik Walthinsen
a46c5a73f0 More massive changes to the scheduling system. Moved the scheduling code to gstscheduler.[ch], so an child bin can r...
Original commit message from CVS:
More massive changes to the scheduling system.  Moved the scheduling code
to gstscheduler.[ch], so an child bin can replace the scheduler.
Introduced the concept of chains, which are subsets of the list of managed
elements for a given manager bin, which get scheduled as separate entities.
gst_bin_iterate_func should be pretty much fixed now, the scheduling code
gets to do all the hard work.

Cothreaded case work in the couple tests I've tried, chained is next.
2000-12-26 23:51:04 +00:00
Erik Walthinsen
4e1875f826 Some minor compilation fixes...
Original commit message from CVS:
Some minor compilation fixes...
2000-12-17 04:54:57 +00:00
Wim Taymans
c6ac8a0f6b some editor changes= loading of save pipelines (not working) added include in gstdebug.h for getpid property loading ...
Original commit message from CVS:
some editor changes= loading of save pipelines (not working)
added include in gstdebug.h for getpid
property loading implemented
GstXML can now be queried for the toplevel elements.
2000-12-16 17:12:28 +00:00
Erik Walthinsen
da03fde054 WARNING: Don't grab this updated unless you're really, REALLY sure.
Original commit message from CVS:
WARNING: Don't grab this updated unless you're really, REALLY sure.
WARNING: Wait for the next one.

Whole lotta changes here, including a few random bits:

examples/*/Makefile: updated to use `libtool gcc`, not just `gcc`
gst/
gstbuffer.h: updated to new flag style
gst.c, gstdebug.h: added new debugging for function ptrs
gstpipeline.c: set type of parent_class to the class, not the object
gstthread.c: ditto
plugins/
cdparanoia/cdparanoia.c: added an argument type, updated some defaults
cobin/spindentity.c: updated to new do/while loopfunction style
mp3encode/lame/gstlame.c: argument types, whole lotta lame options
tests/: various changes

Now, for the big changes:  Once again, the scheduling system has changed.
And once again, it broke a whole bunch of things.  The gist of the change
is that there is now a function pointer for gst_pad_push and gst_pad_pull,
instead of a hard-wired function.  Well, currently they are functions, but
that's for debugging purposes only, they just call the function pointer
after spewing lots of DEBUG().

This changed the GstPad structure a bit, and the GstPad API as well.
Where elements used to provide chain() and pull() functions, they provide
chain() and get() functions. gst_pad_set_pull[region]_function has been
changed to get_pad_set_get[region]_function.  This means all the elements
out there that used to have pull functions need to be updated.  The calls
to that function have been changed in the normal elements, but the names
of the functions passed is still _pull[region](), which is an aesthetic
issue more than anything.

As for what doesn't work yet, just about anything dealing with Connections
is hosed, meaning threaded stuff won't work.  This will be fixed about 12
hours from now, after I've slept, etc.  The simplefake.c test works in
both cothreaded and chained cases, but not much else will work due to the
Connection problem.  Needless to say, don't grab this unless you *need*
these features *now*, else wait to update this stuff until tomorrow.

I'm going to sleep now.
2000-12-16 10:18:09 +00:00
Wim Taymans
a63780a377 Header cleanup: try to include as little as possible; this will probably speed up compilation a bit.
Original commit message from CVS:
Header cleanup: try to include as little as possible; this will probably
speed up compilation a bit.
changed the .c files to use #include "..."
Fix for the 'plugins are loaded twice' bug.
Fix 22186: GstObject flags are now used everywhere. Added *_FLAG_LAST so
elements do not use the same flags. Added some padding in the flag enum
for future expansion.
2000-12-15 01:57:34 +00:00
Erik Walthinsen
b063cb96f1 Implemented the hybrid scheduling system for sources and connections outside the current Bin. Is a bit hackish in on...
Original commit message from CVS:
Implemented the hybrid scheduling system for sources and connections
outside the current Bin.  Is a bit hackish in one place, but I'll work out
a way to make that cleaner soon.  queue.c in tests now works nicely in all
cases.  More to come later.
2000-12-11 00:24:32 +00:00
Wim Taymans
cd24b35b70 Added pullregion in again, it got removed with the previous commit.
Original commit message from CVS:
Added pullregion in again, it got removed with the previous commit.
2000-12-08 18:24:16 +00:00
Erik Walthinsen
990baba8e3 Another big set of changes. Connections are now also pullfunc based. gstqueue has been updated, I don't know of any ...
Original commit message from CVS:
Another big set of changes.  Connections are now also pullfunc based.
gstqueue has been updated, I don't know of any other connections offhand.

There are still a few things that need doing, specifically the concept
of a source or connection with connections to multiple thread contexts is
not dealt with.  This may force us to move the threadstate from the
element to the pad, maybe keeping the element's copy for simple cases.
Then the Bin would create a structure to pass to the cothreaded _wrappers
of any such elements, which would detail the pads that are to be dealt with
by this particular cothread context.

That will speed things up to, since we don't have to look through the list
of all pads for every Src or Connection element for every iteration, we can
simply step through the list provided by the plan.  Special case might even
have a single pad pointer sitting there to trump the list, if there's only
one (the common case anyway).

Task 23098 is tracking these changes.  The main task 22588 depends on that
subtask, as well as 22240, which is a consistency check on PAD_DISABLED.
2000-12-08 10:33:01 +00:00
Erik Walthinsen
29d567ba23 Changes made to the DEBUG system. New header file gstdebug.h holds the stuff to keep it out of gst.h's hair. DEBUG ...
Original commit message from CVS:
Changes made to the DEBUG system.  New header file gstdebug.h holds the
stuff to keep it out of gst.h's hair.  DEBUG prints out the process id,
cothread id, source filename and line number.  Two new macros DEBUG_ENTER
and DEBUG_LEAVE are used to show the entry and exit of a given function.
This eventually might be used to construct call trace graphs, even taking
cothreads into account.  This would be quite useful in visualizing the
scheduling mechanism.

Minor changes to various debug messages.

Also sitting in gstdebug.h is a prototypical DEBUG_ENTER that's capable of
performing DEBUG_LEAVE automatically.  It does this by utilizing a
little-known GCC extension that allows one to call a function with the
same parameters as the current function.  The macro uses this to basically
call itself.  A boolean is used to ensure that when it calls itself it
actually runs the body of the function.  In the meantime it prints stuff
out before and after the real function, as well as constructing a
debugging string.  This can be used eventually to provide call-wide data
on the DEBUG lines, instead of having to replicate data on each call to
DEBUG.  More research is needed into how this would most cleanly be fit
into some other chunk of code, like GStreamer (I think of this DEBUG trick
as a separate project, sorta).

Unfortunately, the aforementioned DEBUG trick interacts quite poorly with
cothreads.  Almost any time it's used in a function that has anything
remotely to do with a cothread context (as in, it runs in one), a segfault
results from the __builtin_apply call, which is the heart of the whole
thing.  If someone who really knows assembly could analyze the resulting
code to see what's really going on, we might find a way to fix either the
macro or the cothreads (I'm thinking that there's something we missed in
constructing the cothreads themselves) so this works in all cases.

In the meantime, please insert both DEBUG_ENTER and DEBUG_LEAVE in your
functions.  Be sure to put DEBUG_ENTER after your variable declarations
and before any functional code, not to put the function name in any DEBUG
strings (it's already there, trust me), and put a DEBUG_LEAVE if you care
enough.

Changes are going to happen in the way DEBUGs and other printouts occur,
so stay tuned.
2000-12-04 09:35:08 +00:00