Commit graph

66 commits

Author SHA1 Message Date
Wim Taymans 9f23c76bea Aplied more fixage from Michael Meeks.
Original commit message from CVS:
Aplied more fixage from Michael Meeks.
2001-12-13 23:14:39 +00:00
wrobell 08eaa11259 - some fixes to int2float making automake 1.5 happy (gst now requires automake1.5). It's still not perfect but it bui...
Original commit message from CVS:
- added playondemand plugin by Leif Morgan Johnson <lmjohns3@eos.ncsu.edu>
- some fixes to int2float
- aplied a patch from wrobell <wrobell@ite.pl> that is a first attempt at
making automake 1.5 happy (gst now requires automake1.5). It's still not
perfect but it builds.
- Made the schedulers plugable. The default scheduler now lives inside a
plugin.
- Added a new mpeg1/2 parser/demuxer.
- Fixed some compiler warnings in the core libs.
- substantial work to GstThread (hopefully less race conditions). simplified
the code in GstThread a bit. A state change can now also happen in the
thread context.
- reworked the state semantics of a bin. it'll now automatically get the
highest state of its children.
- the autoplugger now nests the threads so that a state change failure of
one thread doesn't make its upstream thread lock.
- GstQueue refuses to go to PLAYING if the sinkpad is not connected. This
way the queue will not wedge in the _get lock.
- GstQueue unlocks its mutexes when going to PAUSED.
- make sure that when all elements in a bin/thread go to PAUSED, the bin
is set to PAUSED too.
- make a parent bin wait for its children to PAUSE before ending the
iteration with FALSE (EOS)
- Some changes to GstPlay to deal with EOS.
- aplied the latest patch from Zeenix to gstrtp.

end result: GstPlay doesn't crash on EOS and the pipeline is now shut down
properly.
2001-12-04 22:12:50 +00:00
Wim Taymans 8e2530ee1c Added a flag to indicate an element is event aware.
Original commit message from CVS:
Added a flag to indicate an element is event aware.
2001-11-14 21:07:33 +00:00
Wim Taymans cccc097ca5 API docs. revived _buffer_ref_by_count fast types for scheduler and bin.
Original commit message from CVS:
API docs.
revived _buffer_ref_by_count
fast types for scheduler and bin.
error checking on plugin features;
removed some prototypes that were not implemented (gst_pipeline_iterate
comes to mind)
remove gst_pad_event until we know what it's supposed to do.
remove sinesrc, it wasn't compiles anymore, so...
updates to various elements that used the old event API.
2001-10-21 18:00:31 +00:00
Erik Walthinsen d574ab8126 merge from EVENTS1 on 20011016
Original commit message from CVS:
merge from EVENTS1 on 20011016
2001-10-17 10:21:27 +00:00
Steve Baker a0334eba32 remove dparams from core
Original commit message from CVS:
remove dparams from core
2001-10-07 09:41:36 +00:00
Joshua N. Pritikin 4b88028280 fix memory leaks
Original commit message from CVS:
fix memory leaks
2001-09-13 20:12:17 +00:00
Steve Baker 4fefa734d6 s/Dparam/DParam/ <taaz> i'll whine about an irrelevant thing: Dparam vs DParam. though Dparam is more consistantly s...
Original commit message from CVS:
s/Dparam/DParam/ <taaz> i'll whine about an irrelevant thing: Dparam vs DParam.  though Dparam is more consistantly screwed up with everything else ;)
2001-09-10 17:20:45 +00:00
Steve Baker 750e6b8c97 dparams have arrived. see previous mail for an intro
Original commit message from CVS:
dparams have arrived. see previous mail for an intro
2001-09-10 16:28:43 +00:00
Wim Taymans 12bbbd5c1e Lots of modifications to the plugin system.
Original commit message from CVS:
Lots of modifications to the plugin system.
- Added a GstPluginfeature object that serves as a base class for all
plugin contents.
- changed the plugin API, everyhting is now added with
gst_plugin_add_feature
- typefactories are named now so that they can be located easily and filled
in at plugin load.
- mime types like "video/raw image/raw" are gone for now.
- lots of plugin updates (style and API changes)
- tested with an without registry.
- updates to various tools.
- added a little testsuite to test/show how you can load plugins (4 modes)

Test this one, Almost everything has changed :-)
2001-08-21 20:16:48 +00:00
Wim Taymans d1b4ff4eed Added missing pad_select prototypes/defs.
Original commit message from CVS:
Added missing pad_select prototypes/defs.
2001-07-16 20:18:17 +00:00
Andy Wingo eaaaabf3aa to element classes without using an elementfactory.
Original commit message from CVS:
Aplied the patch from Andy Wingo <apwingo@eos.ncsu.edu> add padtemplates
to element classes without using an elementfactory.
The gst_element_add_padtemplate_to_class method was renamed to
gst_element_class_add_padtemplate to better match glib/gtk conventions.
2001-07-11 12:33:17 +00:00
Erik Walthinsen 7f8d8fe8d5 Merged from GOBJECT1 to HEAD at 200106241
Original commit message from CVS:
Merged from GOBJECT1 to HEAD at 200106241
2001-06-25 01:20:11 +00:00
Wim Taymans 51df56e1aa Removed redundant prototypes.
Original commit message from CVS:
Removed redundant prototypes.
2001-05-26 16:41:27 +00:00
Erik Walthinsen 4a583683e5 Merged from INCSCHED on 200505251!!!
Original commit message from CVS:
Merged from INCSCHED on 200505251!!!
2001-05-25 21:00:07 +00:00
Erik Walthinsen 2f424eb4d4 added comment about missing flag
Original commit message from CVS:
added comment about missing flag
2001-04-15 22:54:03 +00:00
Wim Taymans 3ec275832a Merged the CAPSNEGO1 branch..
Original commit message from CVS:
Merged the CAPSNEGO1 branch..
2001-03-12 21:02:12 +00:00
Wim Taymans 55006f6367 Merged the AUTOPLUG2 branch
Original commit message from CVS:
Merged the AUTOPLUG2 branch
2001-03-07 21:52:56 +00:00
Erik Walthinsen b48585ce6c minor change: changed case of the strings for states
Original commit message from CVS:
minor change: changed case of the strings for states
2001-02-22 00:47:40 +00:00
Wim Taymans 51cbf22624 This is a megapatch with the following changes:
Original commit message from CVS:
This is a megapatch with the following changes:

- moved the gchar *name to GstObject, removed the ones in GstElement and
GstPad.
- moved the parent handling completely into GstObject. This cause *all* of
the plugins to fail (except those that used gst_pad_get_parent)
- rearanged the XML save handling.
- GstObject now has a class function save/restore_thyself.
- GstObject has a generic method gst_object_save_thyself, this makes it
possible to fire a signal wehever a new object is loaded. This is needed
so we can add XML save hooks.
- GstXML API has changed slightly. You now have to create a GstXML object
first before you can actually load something. This makes it possible to
attach a signal to GstXML whenever an object is loaded. I'm not sure we
will keep this interface.
- GstObject can now print the path_string without knowing about the GstPad and
GstElement types.
- Added gst_bin_get_by_name_recurse_up to lookup an element in the current
element hierarchy.
- added XML namespaces to the saved pipelines the namespace is:
http://gstreamer.net/gst-core/1.0/
namespaces are needed to distinguish user generated XML from the core XML.

Note that the plugins still contain a macro GST_OBJECT_PARENT that will be
replaced with gst_pad_get_parent shortly.
2001-01-29 00:06:02 +00:00
Wim Taymans 59211a49ff Updated the docs with the new _request methods
Original commit message from CVS:
Updated the docs with the new _request methods
2001-01-23 20:03:07 +00:00
Richard Boulton d20f0b4bae Add gst_element_request_compatible_pad and remove gst_element_request_pad.
Original commit message from CVS:
Add gst_element_request_compatible_pad and remove gst_element_request_pad.
Implemented something reasonable for gst_element_request_compatible_pad,
but havn't tested much: it won't work for tee because the pad templates
have no caps, and negotiation is not yet written, so it is assumed that the
tee pads can't connect to anything.
2001-01-23 18:42:23 +00:00
Wim Taymans 75aa948e0c Docs updates
Original commit message from CVS:
Docs updates
Added XML load from memory functionality
Undid the videosink patch, something else is wrong now on my machine:
no MMX acceleration :-(
2001-01-21 23:20:46 +00:00
Wim Taymans fdaa2307da A very small change to make eos somewhat work. no inner bins are checked.
Original commit message from CVS:
A very small change to make eos somewhat work. no inner bins are checked.
When an element fires EOS, the chain with that element is removed from
the scheduler (marked inactive). If all chains are inactive, the bin
fires EOS.
2001-01-20 03:10:44 +00:00
Erik Walthinsen 4a5ed7bf58 Got ghostpads to work, even in -launch. Needs more testing still.
Original commit message from CVS:
Got ghostpads to work, even in -launch.  Needs more testing still.
2001-01-20 02:57:46 +00:00
Wim Taymans 9b3f1277ce API docs updates
Original commit message from CVS:
API docs updates
2001-01-19 22:15:21 +00:00
Wim Taymans 90f82b6840 Added mthodes to request an element to create pads: gst_element_request_pad*
Original commit message from CVS:
Added mthodes to request an element to create pads: gst_element_request_pad*
This can be used to construct a tee and a muxer/mixer/aggregator element.
Moved the tee element to elements/ because it can now be handled with the
new pad request features.
The padfactory also has some changes: a pad can now be of presence REQUEST,
which means that the pad can be requested from this plugin (doh).
2001-01-18 23:46:15 +00:00
Richard Boulton 41ebd85275 Fixes to work with libxml2.
Original commit message from CVS:
Fixes to work with libxml2.
Also improved a couple of debugging messagse.
2001-01-18 11:16:53 +00:00
Erik Walthinsen 9ca8248cc2 Massive build fixup. Will send message to -devel list later with details on the changes and what they mean for Makef...
Original commit message from CVS:
Massive build fixup.  Will send message to -devel list later with details
on the changes and what they mean for Makefile.am writers.  Check
docs/random/omega/build/TODO for a list of things that I had to make sure
of.

NOTE: this requires a complete rebuild of all plugins, since I also
changed the STATE enum to a bitfield instead of sequential numbers.
2001-01-14 21:55:41 +00:00
Wim Taymans 22c9d0f1a6 include parser.h instead of gnome-xml/parser.h untill xml-config is fixed...
Original commit message from CVS:
include parser.h instead of gnome-xml/parser.h untill xml-config is
fixed...
2001-01-13 13:51:08 +00:00
Richard Boulton 7291b0f7e8 Correct typo in comment, and make another comment more helpful.
Original commit message from CVS:
Correct typo in comment, and make another comment more helpful.
2001-01-08 22:04:52 +00:00
Wim Taymans 3d34ce7b95 Updated the manual and the docs.
Original commit message from CVS:
Updated the manual and the docs.
Removed the esdsink in gst/elements/ we have a real one not in the
plugins dir.
Added more APIs to query the plugins, types and caps. more fields now
have a getter and a setter. This is needed to make gstreamer wrapper
fiendly.
Added gst_element_disconnect beacuse we also have a gst_element_connect
2001-01-06 02:35:17 +00:00
Erik Walthinsen fc1645131b debug updates and a padtemplate counter added
Original commit message from CVS:
debug updates and a padtemplate counter added
2001-01-03 20:44:28 +00:00
Erik Walthinsen 9a0438ba93 Started work on better ghostpad management, and started to build the low- level EOS mechanism.
Original commit message from CVS:
Started work on better ghostpad management, and started to build the low-
level EOS mechanism.

Also removed a couple of printouts that aren't needed any more.
2000-12-31 22:18:05 +00:00
Wim Taymans bc4619a44b Added multiple caps to the pads
Original commit message from CVS:
Added multiple caps to the pads
Extended the padfactory for the multiple caps
GstCaps now have a name so that future manipulations on them can be done by name
Updated the plugins for the new caps list
2000-12-31 16:12:48 +00:00
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 09eeadb15f Reparented everything to GstElement, removing GstSrc, GstSink, GstFilter, and GstConnection. Also fixed a bug in gst...
Original commit message from CVS:
Reparented everything to GstElement, removing GstSrc, GstSink, GstFilter,
and GstConnection.  Also fixed a bug in gst_bin_iterate_func.
2000-12-29 02:28:04 +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
Wim Taymans 9655c3b593 Updated the API docs.
Original commit message from CVS:
Updated the API docs.
2000-12-28 21:42:23 +00:00
Wim Taymans 41aa51ba45 Fixes for the new scheduler.
Original commit message from CVS:
Fixes for the new scheduler.
Autoplug works again with mp3/mpeg1/ogg
2000-12-28 00:18:26 +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
Wim Taymans d207d375a1 Lots of editor changes:
Original commit message from CVS:
Lots of editor changes:
- restucturing of object creation
- loading of xml files
- visual eye candy: color changes on mouseover
- active object is indicated
- property box changes for boolean and enum types
- property box: create properties per element
- show pads/caps in propertybox
added gst_util_get_bool_arg in gstutils.c
added default properties for audiosink
2000-12-25 01:33:06 +00:00
Wim Taymans 74598fdf6c Added handoff signals to fakesrc and fakesink
Original commit message from CVS:
Added handoff signals to fakesrc and fakesink
Added scheduling property to identity
Added GST_STATE_TRANSITION macro to check for state changes.
Modified gstbin and gstthread to the new state change macros
2000-12-23 03:17:52 +00:00
Erik Walthinsen c287566d0c Massive scheduling changes (again). Not entirely complete, but getting closer. Need to think about various scheduli...
Original commit message from CVS:
Massive scheduling changes (again).  Not entirely complete, but getting
closer.  Need to think about various scheduling plans that we might want
to produce, and figure out the rules for what is legal, and how to get
the results we need as far as the plan.
2000-12-20 09:39:43 +00:00
Wim Taymans bbb9799996 Cleanup in gsttypes.c: removed the crazy GList of GHashTables, since the autoplugger will use the GstCaps and element...
Original commit message from CVS:
Cleanup in gsttypes.c:
removed the crazy GList of GHashTables, since the autoplugger will
use the GstCaps and elementfactories instead of the type system.
We don't maintain a list anymore of the elements for the specific
removed unused code in XML loading/saving.

Cleanup in gstelementfactory:
removed the register/unregister methods, register is now implicit when
gst_elementfactory_new is called. _unregister is now _destroy.
Removed logic to register/unregister the types in gsttypes.
added methods to query if the factory can src/sink a GstCaps
Make sure the elementfactory is set in the element_class when a new
element is registered with gst_elementfactory_new.

gst.c: properly register the basic bins
gst_pipeline: use new gstautoplug (next checkin)
gstprops: fixed an error in compatibility check
registry test program changes
plugins: misc changes for the new caps system.
2000-12-19 13:41:55 +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
Wim Taymans 196c67d7ff Changed the GstPadFactory and added the GstPadTemplate.
Original commit message from CVS:
Changed the GstPadFactory and added the GstPadTemplate.

The GstPadFactory is an easy way to define a pad with capabilities.
The GstPadFactory is converted into a GstPadTemplate. The template is
used to create new pads and to expose the possible pads used in an
element to the plugin system.

updated mp3parse, mpg123, cdparanoia to the new API.
Rerun gstreamer-register because the XML definition has changed.
2000-12-13 19:29:35 +00:00
Wim Taymans d78215be9d More Caps changes, this change introduces the padfactory. the GstPadFactory will be used to describe the pads that an...
Original commit message from CVS:
More Caps changes, this change introduces the padfactory. the GstPadFactory
will be used to describe the pads that an element will contain during
its lifetime.
mpg123 and mp3parse serve as an example.
More XML changes to incorporate the padfactories.
2000-12-12 19:29:43 +00:00
Wim Taymans 6fa6cd8ce4 First attempt at rebuilding the type/plugin system
Original commit message from CVS:
First attempt at rebuilding the type/plugin system
- make sure caps/props are saved in the registry
autoplugging is completely broken.
removed the typefactories and typeids from all the pads in the plugins
XML load/save is ok (be sure to rerun gstreamer-register)
2000-12-11 00:04:25 +00:00
Erik Walthinsen 04c360e39f Changed the way things are scheduled, especially sources. A Src used to have a push() function, and optionally a pus...
Original commit message from CVS:
Changed the way things are scheduled, especially sources.  A Src used to
have a push() function, and optionally a pushregion() to deal with async
reads, etc.  That whole thing has gone away, in favor of providing a
pull() function for the output (Src) pad instead, ala chain functions.
This makes constructing cothreaded schedules out of non-loop elements
somewhat easier.  Basically there was always a question as to which pad
was being dealt with.  In the pullregion case, cothread-specific data was
used to try to pass the region struct to the right place, which is a slow
hack.  And in general, the push function severely limited the kind of
tricks that could be played when there's more than one output pad, such as
a multi-out file reader with async capabilities on each pad independently.

This changes the way cothread scheduling occurs.  Instead of the hack to
deal with Src's by calling their push() function (or optionally the
pushregion(), in certain cases), we now are working towards a general
mechanism where pads are the only thing that are dealt with directly.

An optimization was made in the process of doing this: the loopfunction
actually run as the outer [stack] frame of the cothread is now set more
intelligently in create_plan() based on what kind of element it is.  We
now have:

loopfunc_wrapper: used for loop-based elements, it simply calls the
loopfunc in a loop, paying attention to COTHREAD_STOPPING (see
below).  It currently does other, soon to be depracated, stuff.

pullsrc_wrapper: wraps a Src that's not loop-based (since your options
are now loop- or pull-based)

There will be a couple more to deal with other cases, such as Connections
and chain-based elements.  The general idea is that it's a lot more
efficient to make the decisions once in create_plan than to keep doing
this huge if/else chain in the wrapper.  Just choose the right wrapper up
front.  It'll be most apparent performance-wise in the case of whichever
element context is switched to first for each iteration, since the whole
wrapper setup is done for every iteration.

The tricky part is that there is now a bit of overloading of the function
pointers in a pad.  The current meanings (possibly to change a bit more
soon) are:

chainfunc: as always, chainfunc pointer is mirrored between peer pads
(this may change, and the chain func may end up in pushfunc)
pushfunc: SrcPad: gst_pad_pushfunc_proxy, cothread_switch to peer
SinkPad: none (may take over chainfunc, see below) pullfunc:
SrcPad: Src or Connection's function to construct buffers
SinkPad: gst_pad_pullfunc_proxy, cothread_switch to peer

There are a number of issues remaining with the scheduling, not the least
of which is the fact that Connections are still dealt with the old way,
with _push() functions and such.  I'm trying to figure out a way to unify
the system so it makes sense.  Following the scheduling system is hard
enough, trying to change it is murder.


Another useful scheduling addition, mentioned above, is COTHREAD_STOPPING.
It's an element flag that's used to signal whatever code is running in
cothread context that it should be finishing up and exiting soon.  An
example of this is in plugins/cobin/spindentity.c.  All the loops should
now be composed of do/while loops, rather than while(1) loops:

do {
buf = gst_pad_pull(spindentity->sinkpad);
gst_pad_push(spindentity->srcpad,buf);
} while (!GST_ELEMENT_IS_COTHREAD_STOPPING(element));

The reason for this is that COTHREAD_STOPPING may be set before the above
loop ever gets started.  It wouldn't do for the body of the loop to never
once get called, that would simply stall the pipeline. Note that only the
core library code is ever responsible for setting and unsetting this flag.
All elements have to do is respond to it by cleanly exiting the loop and
the function holding it.

This is needed primarily to allow iterations to occur properly.
Basically, there's a single entry point in the cothread scheduling loop,
gst_bin_iterate_func() simply switches to this cothread.  If the element
in this context is allowed to loop infinitely, nothing would even switch
back to the context from which the iterate() was originally called.  This
is a bit of a problem.  The solution is for there to be an implicit switch
back to the originating context.  Now, even I'm not sure exactly how this
works, but if the cothread that's switched to actually returns, execution
returns back to the calling context, i.e. iterate_func().

COTHREAD_STOPPING is therefore set just before switching into this
(currently randomly chosen) context, on the assumption that it will return
promptly after finishing its duties.  The burden of clearing the flag
falls to the various wrapper functions provided by the Bin code, thus
element writers don't have to worry about doing that at all (and simply
shouldn't).


Related changes:
All the sources in elements/ have been changed to reflect the new system.


FIXMEs:
1) gstpipeline.c calls gst_src_push at some point, dunno why, it's
commented out now.
2) any other sources, including vcdsrc, dvdsrc, and v4lsrc will break
badly and need to be modified to work as pull-based sources.
2000-12-04 10:52:30 +00:00