Commit graph

134 commits

Author SHA1 Message Date
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
Thomas Vander Stichele 5a6cf24c16 code review
Original commit message from CVS:
code review
2002-04-12 09:38:47 +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
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 6ff6eb1017 warning fixes gst_object_set_name (name, NULL) uniquifies the name globally
Original commit message from CVS:
* warning fixes
* gst_object_set_name (name, NULL) uniquifies the name globally
- needs robusticizing
* gst_elementfactory_make can now take NULL as a second argument
2002-02-20 21:31:16 +00:00
Benjamin Otte 9d34e82b9a add API to make life easier
Original commit message from CVS:
add API to make life easier
2002-01-28 00:51:39 +00:00
Wim Taymans b1bcc1875c Delay pad negotiation until the element is in READY or higher. this will gice the element a chance to open its device...
Original commit message from CVS:
Delay pad negotiation until the element is in READY or higher. this will
gice the element a chance to open its devices before we start calling the
connect functions.
Make sure we use the real pad in the negotiation.
Some other small cleanups.
2002-01-20 11:55:35 +00:00
Andy Wingo a43702feb0 miscellaneous fixes, added gst_pad_unset_sched() api.
Original commit message from CVS:
miscellaneous fixes, added gst_pad_unset_sched() api.

although I unref the old pipeline and the cothread context gets freed in dynamic-pipeline.c,
I still get segfaults.
2002-01-19 06:29:40 +00:00
Wim Taymans b2ee38575d Landed the new improved capsnegotiation system.
Original commit message from CVS:
Landed the new improved capsnegotiation system.
The main idea is to keep track of the possible data types that can
pass through a connection. plugins can at any time inspect, adjust and
refine these caps. plugins also get notified when something changes to
the types so that they can reconfigure themselves.
Look at the updated plugins and the soon to be finished doc.
2002-01-13 22:22:42 +00:00
Wim Taymans e7f54b1e74 - Added a function to get the currently executing cothread
Original commit message from CVS:
- Added a function to get the currently executing cothread
- Removed some useless includes
- _interrupt now returns a boolean so the behaviour after the interrupt
can be controlled by the scheduler.
- Added a better way to set/get the default scheduler.
- make thread and pipeline get the default scheduler.
2001-12-27 00:47:41 +00:00
Wim Taymans bd128c199c Tee Fixes. added cothread_stop (not used) improved the pad event dispatcher.
Original commit message from CVS:
Tee Fixes.
added cothread_stop (not used)
improved the pad event dispatcher.
added an event_received signal on the pad.
do less state changes in the autoplugger.
small scheduler fix.
2001-12-25 02:15:46 +00:00
Wim Taymans 087dee1f62 This is an attempt at not segfaulting on errors but reporting some usefull info instead.
Original commit message from CVS:
This is an attempt at not segfaulting on errors but reporting some
usefull info instead.
- bin changes so errors can propagate.
- changed the _FAST macros to _CAST because that is what they do.
- removed all references to cothreads out of the core, they are
really a scheduler issue, handler with a sched_private gpointer.
- added a live buffer count, for debugging buffer leaks.
- added error checking in gst_scheduler_state_transition this solves the
"out of cothreads" problem.
- GST_ELEMENT_NO_ENTRY == GST_ELEMENT_INFINITE_LOOP
- added 2 private element flasg for use by the scheduler
(_COTHREAD_STOPPING) is now
- added scheduler entry points:
- _yield : to create possible scheduling points.
- _interrupt: to stop execution of an element.
- _error: to signal en error condition to the scheduler.
- improved error messages for pads.
- signal gst_element_error where appropriate.
- added the a new bin to the parent before entering it so one can reference
its children.
- queue memleak fixes on dispose.
- added possible deadlock detection in queue (turned off be default)
- GstBasicScheduler is a real class of its own now, hiding its internal
variables.
- GST_ELEMENT_IS_COTHREAD_STOPPING is gone. either call explicit _yield
operations, or make a sane loop.
- Better state change handling in filesrc. Better error reporting/recovery
too.
- updated core plugins.
- detect non decoupled elements on scheduler boundries and error.
2001-12-22 21:18:17 +00:00
Wim Taymans 23eb626391 include gstevent.h
Original commit message from CVS:
include gstevent.h
2001-12-19 02:19:00 +00:00
Wim Taymans 56d3cdf64a - Elements can now send events to their parent.
Original commit message from CVS:
- Elements can now send events to their parent.
- remove the g_signals from the core for parent<->child communication
- the application can easily get element info by listening for an event
signal from the toplevel bin.
- added gst_element_info()/_error().
- fakesrc and fakesink use the info event instead of g_print.
- GST_TYPE_* causes segfaults with elect fence, rever to G_TYPE_POINTER
until we know what's wrong.
- various leaks fixed wrt element destroy.
- The object that created the event is now stored as GST_EVENT_SRC
2001-12-18 19:03:07 +00:00
Christian Schaller 9dca9db01b updated .h files with // fixes
Original commit message from CVS:
updated .h files with // fixes
2001-12-15 18:15:13 +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 fa78165bcd Added a default handler for the pads.
Original commit message from CVS:
Added a default handler for the pads.
2001-11-14 21:08:44 +00:00
Erik Walthinsen 42ec9085a2 added taaz's threading patch, including queue events
Original commit message from CVS:
added taaz's threading patch, including queue events
2001-10-27 20:28:31 +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
Joshua N. Pritikin 8b29840f55 1. Add more warnings for the gst core only. Various trival fixes to quiet the warnings.
Original commit message from CVS:
1. Add more warnings for the gst core only.  Various trival fixes
to quiet the warnings.

2. Fix GstBufferCopyFunc prototype.

3. Re-apply the reverted type!=0 assertion in gst_elementfactory_new.
2001-09-14 22:16:47 +00:00
Joshua N. Pritikin 75a30f1f61 Nobody checks the return value of gst_pad_connect. This patch renames gst_pad_connect to gst_pad_try_connect and mak...
Original commit message from CVS:
Nobody checks the return value of gst_pad_connect.  This patch
renames gst_pad_connect to gst_pad_try_connect and makes
gst_pad_connect return void.
2001-09-14 19:45:20 +00:00
Erik Walthinsen 75312f3812 Updated the event system to use event,timestamp,data instead of a pointer.
Original commit message from CVS:
Updated the event system to use event,timestamp,data instead of a pointer.
Updated elements to use the event system correctly.
Changed "size" to "filesize" in disksrc.
2001-08-22 21:45:25 +00:00
Wim Taymans 453f2fee05 Removed the old eos and qos functions.
Original commit message from CVS:
Removed the old eos and qos functions.
Removed the functions from the elements.
2001-08-10 17:34:59 +00:00
Erik Walthinsen ee9426a1a1 Initial code for the event system.
Original commit message from CVS:
Initial code for the event system.
2001-08-06 20:37:21 +00:00
Wim Taymans 2ef964f77b Added prototypes for gst_pad_peek, gst_pad_select and gst_pad_selectv.
Original commit message from CVS:
Added prototypes for gst_pad_peek, gst_pad_select and gst_pad_selectv.
Added different scheduling methods in aggregator.
Fixed a bug in fakesrc when setting up the scheduling functions.
2001-07-11 22:52:48 +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 86316a4d29 Fixed a bug in the typecast macros for padtemplates.
Original commit message from CVS:
Fixed a bug in the typecast macros for padtemplates.
2001-05-26 16:33:02 +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 981c654a60 some minor updates with a hair more speed
Original commit message from CVS:
some minor updates with a hair more speed
2001-05-10 23:43:34 +00:00
Erik Walthinsen facc9acb7a fixed up macros to match new RealPad stuff, change #if 1 to #if 0 to use, beware you must rebuild all plugins after c...
Original commit message from CVS:
fixed up macros to match new RealPad stuff, change #if 1 to #if 0 to use, beware you must rebuild all plugins after change
2001-05-10 22:30:00 +00:00
Wim Taymans 892f4b3204 API docs updates.
Original commit message from CVS:
API docs updates.
Properly implemented the disksink.
Fixed a compile problem with alsa.
Added bufferpool handling to dvdec
Some compiler warning fixes
2001-04-22 16:04:19 +00:00
Wim Taymans 6118b074bc Added 1337 macros to create padtemplates and capstemplates.
Original commit message from CVS:
Added 1337 macros to create padtemplates and capstemplates.
Added some code for bufferpools
2001-04-16 21:45:02 +00:00
Wim Taymans b38d9a945b A rather large patch:
Original commit message from CVS:
A rather large patch:
- changed the API for the padtemplates:
- remove the factories (array of pointers) for the padtemplates,
properties and caps. The static array was a nice idea but converting
all the property values to a gpointer was not a good idea.
float properties were not possible, and casting a gint to a pointer
is not very portable. The new API just uses the _padtemplate_new,
_caps_new and _props_new functions to create the templates.
This has the added benefit that the API is now uniform for static
and dynamic templates and that the code can be made cleaner.
- lots of cleanups in the way the capabilities are constructed (va_list)
- lots of updates for all the plugins (new API)
- docs updates (new API)
- removed the videoraw docs.
2001-04-14 18:56:37 +00:00
Wim Taymans 335080574f Lots of updates to the plugins for caps negotiation.
Original commit message from CVS:
Lots of updates to the plugins for caps negotiation.
Added YUY2 output to the win32 dlls.
Added a colorspace converter in gstplay
2001-04-12 18:11:19 +00:00
Wim Taymans 1d040471a4 API docs updates
Original commit message from CVS:
API docs updates
2001-03-21 21:43:56 +00:00
Wim Taymans 0267b92c93 More work on capsnego proxying. It should be OK now.
Original commit message from CVS:
More work on capsnego proxying. It should be OK now.
Added another testcase enum that shows various capsnego algorithms.
Warn about pads that try to set a capability incompatible with their
padtemplate.
Implemented refcounting and copy_on_write for caps/props.
2001-03-20 18:29:00 +00:00
Wim Taymans 3534e68563 Reworked the capsnegotiation function audiosink now uses capsnego to set its parameters mpg123/ac3dec use capsnego in...
Original commit message from CVS:
Reworked the capsnegotiation function
audiosink now uses capsnego to set its parameters
mpg123/ac3dec use capsnego instead of metadata
Added the beginnings of a testsuite for capsnego.
2001-03-18 02:42:30 +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
Wim Taymans 1340064d57 More doc updates
Original commit message from CVS:
More doc updates
Manual additions: xml/load save of custom XML, debugging, request pads
added a signal to the example plugin
fixed a bug in mp3parse (ifdef 1)
2001-02-22 23:18:51 +00:00
Richard Boulton acfb1fc447 Include compatability defines for old versions of libxml1
Original commit message from CVS:
Include compatability defines for old versions of libxml1
2001-02-16 13:13:16 +00:00
Erik Walthinsen c17ed10404 Reworked getregion/pullregion stuff. Region is now specified by a type (OFFSET_LEN, TIME_LEN, etc.) and two guint64'...
Original commit message from CVS:
Reworked getregion/pullregion stuff.  Region is now specified by a type
(OFFSET_LEN, TIME_LEN, etc.) and two guint64's.  They are offset and len,
where offset can be used for the time field, and len would be zero or
the time unit (say, 33ms for video).
2001-02-05 17:16:23 +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 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
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
Erik Walthinsen 74f8050844 Major cleanup of the latest ghostpad changes. Fixed everything that broke, correctly. Someone will want to go updat...
Original commit message from CVS:
Major cleanup of the latest ghostpad changes.  Fixed everything that
broke, correctly.  Someone will want to go update the API doc templates.
2001-01-19 09:37:32 +00:00
Erik Walthinsen c31f9a570c First pass at updating to new ghostpad system. The objects are in place,
Original commit message from CVS:
First pass at updating to new ghostpad system.  The objects are in place,
I now need to go and get all the Bin end of things worked out.  Testing
should be fairly easy, at least for verification.

Everything I've tried so far works with no changes, with is amazing.
That's just cool.  Once again we rewrite an entire subsystem, and nothing
else notices anything but the new features ;-)
2001-01-19 02:23:35 +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
Erik Walthinsen 558e9f4308 renamed private to element_private, to make obvious its usage restrictions
Original commit message from CVS:
renamed private to element_private, to make obvious its usage restrictions
2001-01-11 22:09:29 +00:00
Erik Walthinsen 60daf21ed4 added gpointer private to pads, so elements can store ints or pointers for their own use
Original commit message from CVS:
added gpointer private to pads, so elements can store ints or pointers for their own use
2001-01-11 22:03:01 +00:00
Erik Walthinsen 759d83e487 Rearranged cothreads sources a bit, added some API docs.
Original commit message from CVS:
Rearranged cothreads sources a bit, added some API docs.
Added some functions needed for gstreamer-inspect.
Added num_sources to fakesink.
2001-01-04 10:54:27 +00:00
Erik Walthinsen 45f05bf6ed Made gst_pad_eos_func a non-static function
Original commit message from CVS:
Made gst_pad_eos_func a non-static function
2001-01-03 20:40:26 +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 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 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
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
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 6ba0668cd8 Snapshot of work-in-progress do deal with out-of-bin elements. Current system is very likely going to be ditched due...
Original commit message from CVS:
Snapshot of work-in-progress do deal with out-of-bin elements.  Current
system is very likely going to be ditched due to its complexity and the
fact that it doesn't work right now.  More than that, it's generating some
really odd results in my test program, which aren't readily explainable.

If you want to keep a working copy of your working copy (heh), don't update
until this is replaced with a hybrid approach.  This approach will be the
beginning of a plan generator that can construct full hybrid schedules
given hints from various places.

Hybrid means that cothreads are used, but there are chunks of the pipeline
that are actually dealt with by chaining. This can improve speed by
reducing cothread switches (which are much cheaper than thread switches,
but still far from free, about 570 cycles on my PIII), but does carry a
complexity burden.  Luckily, the structure of GStreamer allows that burden
to live entirely in create_plan.  Luck?  I think not ;-)
2000-12-09 09:13:09 +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 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
Wim Taymans 4f55ae4ded Added multiple types to the pads.
Original commit message from CVS:
Added multiple types to the pads.
Added first preview of the capabilities system.
Autoplugging is seriously broken with these (and other) changes.
2000-12-03 17:51:29 +00:00
Erik Walthinsen 726f7d36dc added the ability to disable pads, not quite complete but sufficient for now
Original commit message from CVS:
added the ability to disable pads, not quite complete but sufficient for now
2000-11-25 07:02:55 +00:00
Wim Taymans 415ced1c0b Added seeking to the avi decoder by implementing pull_region.
Original commit message from CVS:
Added seeking to the avi decoder by implementing pull_region.
Fixes to the asyncdisksrc.
Added thread specific data to the cothreads.
2000-11-06 00:15:51 +00:00
Wim Taymans 9500bd2128 Code cleanup, make it adhere to the Gnome/Gtk+ code formatting, which is quite clean and more readable.
Original commit message from CVS:
Code cleanup, make it adhere to the Gnome/Gtk+ code formatting, which is
quite clean and more readable.
Renamed parseavi to avidecoder
Implemented seeking/time display/pause/play/stop/clean exit to gstmediaplay
Added an element flag to indicate that it cannot deal with noncontigous
buffers. If such an element is found in the pipeline, seeking is disabled
for the complete stream (avidecoder cannot deal with seeking until we convert
it to a loop based element with pull_region to fetch the indeces etc...)
2000-11-01 13:49:41 +00:00
Wim Taymans 2521a319c3 MPEG2 types added for better autoplugging. MPEG2 works more or less. fix in autoplugging. avi now works.
Original commit message from CVS:
MPEG2 types added for better autoplugging. MPEG2 works more or less.
fix in autoplugging. avi now works.
2000-10-21 12:04:40 +00:00
Wim Taymans 4e7f031df7 Loading and saving of XML pipeline descriptions.
Original commit message from CVS:
Loading and saving of XML pipeline descriptions.
GladeXML like operation implemented (you can retrieve parts of a pipeline)
2000-09-27 19:33:10 +00:00
Erik Walthinsen b6d31c1c72 Megapatch, changes which states are available, how they're used, and how they're set. Also modifies the scheduling s...
Original commit message from CVS:
Megapatch, changes which states are available, how they're used, and how
they're set.  Also modifies the scheduling system, breaking pulled
buffers.  Check mail archives for more details.
2000-07-17 17:14:15 +00:00
Wim Taymans 9920b88c3f This is the audio/video sync release.
Original commit message from CVS:
This is the audio/video sync release.
Changed the mpegvideoparser to parse complete pictures. Added the PTS
timestamps to the pictures.
Added PTS timestamps to the MPEG audio frames.
Made the clock a littlebit better.
Gstplay now uses two more threads one for video, one for audio playback.
Added the first QoS callbacks for the pads.
hopefully fix an mmx compilation problem.
2000-07-12 22:52:42 +00:00
Wim Taymans a3d5d3a62b Switched Cr and Cb in YUV2RGB fixed the avi parser (gstriff had wrong size) the system_encoder can now do video only ...
Original commit message from CVS:
Switched Cr and Cb in YUV2RGB
fixed the avi parser (gstriff had wrong size)
the system_encoder can now do video only system streams
sanitized the colorspace and scaler api.
added fast self modifying asm scaler.
worked on the typefind stuff.
added a cool media player (gstplay) it uses the typefinder to playback
avi, mpeg1 (system and video) streams. It is also a testbed and a real app.
2000-06-25 21:38:00 +00:00
Wim Taymans bf8c785fb0 Documentation updates. All standard library objects and standard elements are documented. Modified some of the elemen...
Original commit message from CVS:
Documentation updates. All standard library objects and standard
elements are documented. Modified some of the elements to more
accuratly report about their arguments so the documentation builds
more reasonable output.
Added aviencoder and jpegencoder elements (not working yet)
2000-03-27 19:53:43 +00:00
Wim Taymans ef63c32778 This is a rather large patch. Switched on -Wall compiler flag and fixed the warnings.
Original commit message from CVS:
This is a rather large patch. Switched on -Wall compiler flag and fixed
the warnings.
Made the Video for Linux more like it should be.
2000-02-27 23:18:38 +00:00
Wim Taymans c144819530 Added a pull function in the gstpad. Modified the videosink to implement the pull. This function allows a source elem...
Original commit message from CVS:
Added a pull function in the gstpad. Modified the videosink to implement
the pull. This function allows a source element to request a buffer
from the destination. This is much more efficient because the
videosink can then pass a buffer with SHM to the element, which does
not require an aditional memcpy.
removed scaling from the videosink. I need something better.
2000-02-26 18:55:14 +00:00
Erik Walthinsen 1762dfbf98 initial checkin
Original commit message from CVS:
initial checkin
2000-01-30 09:03:00 +00:00