Commit graph

119662 commits

Author SHA1 Message Date
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
Erik Walthinsen
47bd1b0545 Added a check to see if the plugin actually exists before even bothering to try to load it. Saves a fair amount of d...
Original commit message from CVS:
Added a check to see if the plugin actually exists before even bothering
to try to load it.  Saves a fair amount of debugging spew with
_gst_plugin_spew enabled.
2000-12-04 09:32:43 +00:00
Wim Taymans
61ed3b06ee More test cases.
Original commit message from CVS:
More test cases.
2000-12-03 20:15:24 +00:00
Wim Taymans
0c40e4b819 Implemented real Caps checking.
Original commit message from CVS:
Implemented real Caps checking.
2000-12-03 20:15:15 +00:00
Wim Taymans
9652a3aef9 Added a test program for the capabilities
Original commit message from CVS:
Added a test program for the capabilities
2000-12-03 17:52:14 +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
Richard Boulton
ed8dac9fa8 Remove cothreads.[ch] from tests/cothreads/ and replace then with a rule in the Makefile.am to generate symlinks to t...
Original commit message from CVS:
Remove cothreads.[ch] from tests/cothreads/ and replace then with a rule
in the Makefile.am to generate symlinks to the live versions of the code
in gst/ : fixes a compile error, and should keep things cleaner.
2000-12-03 15:02:24 +00:00
Erik Walthinsen
34811a366d Enhanced debugging by making DEBUG() print out the cothread ID as well as the process ID. cothread_getcurrent return...
Original commit message from CVS:
Enhanced debugging by making DEBUG() print out the cothread ID as well as
the process ID.  cothread_getcurrent returns the current cothread ID, or
-1 if cothreads aren't set up in this process context.
2000-12-03 00:17:52 +00:00
Erik Walthinsen
16834308e7 First pass at an outline for the Filter Writer's Guide. Mostly complete, though the structure needs some work. Just...
Original commit message from CVS:
First pass at an outline for the Filter Writer's Guide.  Mostly complete,
though the structure needs some work.  Just need someone to write it ;-)
2000-12-02 10:07:50 +00:00
Wim Taymans
f2128112c3 Another type system proposal.
Original commit message from CVS:
Another type system proposal.
2000-11-30 20:30:45 +00:00
Erik Walthinsen
64b4ac5cdf Rearranged cothread_switch a bit to move all the code for error conditions to the end, using goto's to get there. Th...
Original commit message from CVS:
Rearranged cothread_switch a bit to move all the code for error conditions
to the end, using goto's to get there.  This has the presumed advantage of
consolidating all the normally run code into one chunk, reducing jumps
(and the associated penalties in any modern processor) and limiting cache-
line usage.  It may be instructive to look at the generated assembly for
this revision and the previous, to see if gcc is smart enough to do this
for us anyway.

If you want to turn off some of the checks (they are all checks for NULL
pointers, if you're curious) for a speed gain, disable the #define of
COTHREAD_PARANOID at the top.
2000-11-29 10:05:47 +00:00
Wim Taymans
1eb3884bc6 Added the type system design.
Original commit message from CVS:
Added the type system design.
2000-11-26 19:11:00 +00:00
Wim Taymans
933bf32b3f More ramblings..
Original commit message from CVS:
More ramblings..
2000-11-25 18:13:26 +00:00
Wim Taymans
a588e5748b Another alternative to the src. Please correct.
Original commit message from CVS:
Another alternative to the src. Please correct.
2000-11-25 16:45:16 +00:00
Wim Taymans
d8e23920eb Added asci art control flow diagrams
Original commit message from CVS:
Added asci art control flow diagrams
2000-11-25 16:00:39 +00:00
Wim Taymans
26a69ef7f8 Code Cleanups
Original commit message from CVS:
Code Cleanups
Added use cases for the source elements.
2000-11-25 14:18:47 +00:00
Erik Walthinsen
a075cbda18 Added code to force the gsttypes plugin to load before gstelements, by simply having gstelements.c request the plugin...
Original commit message from CVS:
Added code to force the gsttypes plugin to load before gstelements, by
simply having gstelements.c request the plugin.  Solves some dependency
problems.  This is the correct method of doing this for now, though I had
a thought:

Have a static list of hard dependencies that the plugin system is responsible
for satisfying before even trying to load the plugin.  Makes plugin design
easier.
2000-11-25 07:43:57 +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
Erik Walthinsen
ab45f4c930 Fixed a dumb mistake: in gst_element_set_loop_function, it was forcing the cothread's entry function to change. This ...
Original commit message from CVS:
Fixed a dumb mistake: in gst_element_set_loop_function, it was forcing
the cothread's entry function to change. This is totally wrong, the
create_plan function in GstBin is responsible for setting that to its
own internal helper function.  Code removed outright...
2000-11-24 22:28:19 +00:00
Erik Walthinsen
9120d1bd43 Closed 22145 - gstelement.c: support hotswapping of loopfunc
Original commit message from CVS:
Closed 22145 - gstelement.c: support hotswapping of loopfunc

Added a flag GST_ELEMENT_NEW_LOOPFUNC that's set when a new loopfunc is set,
which needs to be obeyed by the loopfuncs themselves.  The assumption is
that only a loopfunc or an element that knows what it's doing will ever
change the loopfunc pointer, so they can be responsible for exitting
the loopfunc itself appropriately.

The loopfunc_wrapper function has been changed to call the loopfunc
pointer itself in a loop.  If the loopfunc changes, the current loop is
supposed to exit, which causes the loopfunc_wrapper to start up the new
loopfunc.
2000-11-23 21:49:09 +00:00
Erik Walthinsen
c758337d5a Closed task 22143 - gstelemnt.c: complete gst_element_connect
Original commit message from CVS:
Closed task 22143 - gstelemnt.c: complete gst_element_connect

SImple matter of cleaning up the conflicting checks and actually
connecting the pads in question.
2000-11-23 20:39:54 +00:00
Erik Walthinsen
4638451539 gstbin.c: modified so create_plan occurs after the state change of all the child elements.
Original commit message from CVS:
gstbin.c: modified so create_plan occurs after the state change of all the
child elements.
gstelement.c: set_state now loops such that each element only deals with
one state change at a time, i.e. NULL->READY,READY->PLAYING,
instead of a single NULL->PLAYING.
2000-11-23 08:13:43 +00:00
Wim Taymans
587051a384 Something was wrong with SSE initialisation in mpeg2dec
Original commit message from CVS:
Something was wrong with SSE initialisation in mpeg2dec
Added little performance test (compile with gprof)
2000-11-20 22:05:30 +00:00
Wim Taymans
92c447c536 Reworked AC3 decoder. No seeking yet but at least we do not need ac3parse anymore.
Original commit message from CVS:
Reworked AC3 decoder. No seeking yet but at least we do not need ac3parse
anymore.
Reworked dvdsrc to read scrambled data (DeCSS not included). I have
modified DeCSS a bit to work in GStreamer. Can I release the code or is
there some lawyer that's going to sue me?
MPEG2 SSE motion compensation.
Tried to add PTS to the MPEG decoder but failed.
2000-11-20 19:04:32 +00:00
Wim Taymans
01eb2caf72 The bonobo component now works on audio only (mp3/vorbis). Video is broken because bonobo does not handle multithread...
Original commit message from CVS:
The bonobo component now works on audio only (mp3/vorbis). Video
is broken because bonobo does not handle multithreading yet.
Added Bonobo toolbar and menu.
2000-11-12 20:34:29 +00:00
Wim Taymans
ef31aa64e8 Docs updates.
Original commit message from CVS:
Docs updates.
Added LICENSE info to headers/code where missing in gst directory
Added a bonobo wrapper for the media player (it shows up in gshell but
locks up when activating the component, anyone?)
Fixed some XML save/load problems with arguments.
2000-11-11 15:13:50 +00:00
Wim Taymans
a9a7f77e07 Fix for the new gnome libraries. It looks like glade does not like empty dockitems...
Original commit message from CVS:
Fix for the new gnome libraries. It looks like glade does not like
empty dockitems...
2000-11-08 19:53:48 +00:00
Wim Taymans
4454f1f2a2 Library docs update
Original commit message from CVS:
Library docs update
2000-11-07 21:38:34 +00:00
Wim Taymans
092db54409 I'm too lazy to comment this
Original commit message from CVS:
*** empty log message ***
2000-11-07 21:24:12 +00:00
Wim Taymans
e990c2c7d5 Updated docs
Original commit message from CVS:
Updated docs
2000-11-07 21:18:52 +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
1129c63266 I'm too lazy to comment this
Original commit message from CVS:
*** empty log message ***
2000-11-04 18:55:01 +00:00
Wim Taymans
c125059f97 Added the excellent mpeg2dec decoder. Not 100% optimized but allready very fast.
Original commit message from CVS:
Added the excellent mpeg2dec decoder. Not 100% optimized but allready
very fast.
More cleanup.
2000-11-04 18:54:07 +00:00
Wim Taymans
dbe262dfbb Make sure the Gdk thread lock is not held inside the gstreamer pipeline.
Original commit message from CVS:
Make sure the Gdk thread lock is not held inside the gstreamer pipeline.
Fix the videosink to not hold the Gdk lock when emitting a signal.
All Gtk GUI apps using GStreamer should now handle the Gdk locks when
handling signals from the pipeline (as it should be)
2000-11-02 20:10:08 +00:00
Wim Taymans
e8ea96d23b Some code cleanup
Original commit message from CVS:
Some code cleanup
Let the parent GstBin decide when to do a create_plan (bin inside a thread)
2000-11-01 22:11:48 +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
c69c6914c9 Missing files..
Original commit message from CVS:
Missing files..
2000-10-30 21:10:35 +00:00
Wim Taymans
4a38cd655b Misc fixes and cleanups
Original commit message from CVS:
Misc fixes and cleanups
A reworked gstplay. Now it is called gstmediaplay. gstplay is a custom
widget that can display media and is to become a bonobo component soon.
put the tables of the mpeg audio encoder in a header file.
maybe faster quantisation for the mpeg encoder.
2000-10-30 21:02:08 +00:00
Wim Taymans
31cae4b447 Slightly faster yuv to rgb conversion.
Original commit message from CVS:
Slightly faster yuv to rgb conversion.
2000-10-26 19:07:27 +00:00
Wim Taymans
9bae9d4b91 More Docs updates.
Original commit message from CVS:
More Docs updates.
Added plugin documentation. I fear we need a gstdoc implementation
that loads plugins and does introspection on them. I think we should
automatically create the docs for the pads and mime types the plugins
provide. Does anyone have enough perl knowledge to add these features? I
allready changed the C code to output the pad definitions but my perl
knowledge is too limited, for now, to implement the rest of the needed
functionality...
2000-10-25 19:09:53 +00:00
Wim Taymans
268bcbb89d More docs updates
Original commit message from CVS:
More docs updates
2000-10-22 16:30:25 +00:00
Wim Taymans
894215eb29 Documentation updates documented the libraries
Original commit message from CVS:
Documentation updates
documented the libraries
2000-10-22 16:27:21 +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
b7810a3635 Removed the hardcoded pipeline setup is gstplay in favor of the autoplugging features. Still in a rought shape...
Original commit message from CVS:
Removed the hardcoded pipeline setup is gstplay in favor of the
autoplugging features. Still in a rought shape...
2000-10-12 19:41:30 +00:00
Richard Boulton
7694a06b5d Manual now gets installed correctly by make install. Problems: clean / uninstall don't work.
Original commit message from CVS:
Manual now gets installed correctly by make install.  Problems:
clean / uninstall don't work.
make dist not tested.
pdf manual doesn't have images.
2000-10-12 08:43:03 +00:00
Wim Taymans
04bb8b0142 Added extra Gtk types for better editor properties (FILENAME, enums)
Original commit message from CVS:
Added extra Gtk types for better editor properties (FILENAME, enums)
The disksrcs location property can now be set in the editor: we can
now make our first working mp3 player with gsteditor!!
2000-10-11 19:30:07 +00:00
Wim Taymans
870c6045b2 Fixed a severe timestamp bug in mpeg_play.
Original commit message from CVS:
Fixed a severe timestamp bug in mpeg_play.
Create a new thread upon a multisrc element in autoplugging: the autoplug
example now correctly sets up 5 threads for an mpeg player.
2000-10-09 20:01:17 +00:00
Richard Boulton
f1d8e760fb Added building of the manual to the build system. Currently in a rudimentary state - will not gracefully give up if ...
Original commit message from CVS:
Added building of the manual to the build system.  Currently in a
rudimentary state - will not gracefully give up if tools not available,
will not uninstall / clean, and may not install / make dist properly.
Documentation does not have dependencies on images, so won't rebuild if
they're altered either.
2000-10-09 00:34:21 +00:00
Wim Taymans
b772f81d4a Added an autoplug example. This little program (30 relevant lines) is able to play MPEG1(system)/MPEG2(system)/AVI(DI...
Original commit message from CVS:
Added an autoplug example. This little program (30 relevant lines) is able
to play MPEG1(system)/MPEG2(system)/AVI(DIVX)/Vorbis/AC3 and whatever codec
you write.
Separated the mp3 and mpeg1 types for better reuse.
2000-10-08 22:23:12 +00:00
Wim Taymans
695f761c2b Fixed a bug in the typeloading.
Original commit message from CVS:
Fixed a bug in the typeloading.
Fixes to various elements so that correct types are returned.
Fixed flag collision with GtkObject.
Elements can now suggest a thread. not sure if this is the right way to
handle automatic thread creation.
Autoplugging now works with multiple sinks and thread setup. No threads
are created for intermediate elements yet, so MPEG may still be choppy.
2000-10-08 22:17:11 +00:00