Commit graph

470 commits

Author SHA1 Message Date
Wim Taymans cd599c3718 gst/base/gstbasetransform.c: passthrough elements can even do inplace on non writable buffers (as they don't touch th...
Original commit message from CVS:
* gst/base/gstbasetransform.c: (gst_base_transform_handle_buffer):
passthrough elements can even do inplace on non writable
buffers (as they don't touch them).
2005-08-31 10:07:24 +00:00
Stefan Kost f02b655fc0 check/gst-libs/controller.c: more tests (hehe I have the most)
Original commit message from CVS:
* check/gst-libs/controller.c: (gst_test_mono_source_get_property),
(gst_test_mono_source_set_property),
(gst_test_mono_source_class_init), (GST_START_TEST),
(gst_controller_suite):
more tests (hehe I have the most)
* gst/gstbus.c:
describe popping messages whenusing mulltiple sources
* libs/gst/controller/gst-controller.c:
(gst_controlled_property_set_interpolation_mode),
(gst_controlled_property_new):
* libs/gst/controller/gst-controller.h:
* libs/gst/controller/gst-interpolation.c:
implement boolean properties
2005-08-31 10:00:08 +00:00
Wim Taymans d7cfd8a12e gst/base/gstadapter.c: Flushing out 0 bytes is ok for this function.
Original commit message from CVS:
* gst/base/gstadapter.c: (gst_adapter_flush):
Flushing out 0 bytes is ok for this function.

* gst/base/gstbasesink.c: (gst_base_sink_handle_object):
no newsegment gives a warning and sets the start/stop to
invalid.

* gst/base/gstbasetransform.c: (gst_base_transform_change_state),
(gst_base_transform_set_passthrough):
Some debug info.

* gst/gstminiobject.c: (gst_mini_object_ref):
Check refcount here too.

* gst/gstpad.c: (gst_pad_init):
Pads are initially flushing and refusing data.

* gst/gstutils.c: (gst_element_link_pads_filtered):
When adding a capsfilter element make sure it has the
same state as the parent bin.
2005-08-30 19:29:59 +00:00
Stefan Kost 219c0c1947 docs/gst/gstreamer-sections.txt: ultral33t func10ns deserve to appear in the docs actualy
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
ultral33t func10ns deserve to appear in the docs actualy
* docs/gst/tmpl/.cvsignore:
* docs/gst/tmpl/gstcompat.sgml:
* docs/gst/tmpl/gstconfig.sgml:
* gst/check/gstcheck.c:
* gst/gstcompat.h:
* gst/gstconfig.h.in:
inlined more docs
2005-08-30 08:17:48 +00:00
Andy Wingo 944491ab45 gst/gstutils.h (GST_BOILERPLATE_FULL): Prototype instance_init as having two arguments instead of just one. Allows su...
Original commit message from CVS:
2005-08-28  Andy Wingo  <wingo@pobox.com>

* gst/gstutils.h (GST_BOILERPLATE_FULL): Prototype instance_init
as having two arguments instead of just one. Allows superclasses
to access information on subclasses -- see the terrible for() loop
in gtype.c:g_type_create_instance for the reason why. All callers
changed.
2005-08-28 17:45:58 +00:00
Stefan Kost 90b2a570bb gst/base/gstbasetransform.c: fix div-by-zero
Original commit message from CVS:
* gst/base/gstbasetransform.c: (gst_base_transform_transform_size):
fix div-by-zero
2005-08-26 21:23:51 +00:00
Andy Wingo 9d1b5e07b3 check/pipelines/simple_launch_lines.c (run_pipeline): Check element_set_state's return val.
Original commit message from CVS:
2005-08-26  Andy Wingo  <wingo@pobox.com>

* check/pipelines/simple_launch_lines.c (run_pipeline): Check
element_set_state's return val.
(test_2_elements): Add test that's been disabled for months.

* gst/elements/gstfakesink.c: Cleanups. Add can-activate-push and
can-activate-pull properties.

* gst/elements/gstfakesrc.c: Cleanups. Add can-activate-push and
can-activate-pull properties. Implement is_seekable so fakesrc can
operate in pull mode.

* gst/base/gstbasesink.c (GstBaseSink): Remove has-loop, has-chain
properties.
(gst_base_sink_activate, gst_base_sink_activate_pull)
(gst_base_sink_activate_push): Make activation mode choosing work.
Cleanups.
(gst_base_sink_chain, gst_base_sink_loop): Assert activation mode
is right. Make pull mode work. Post an eos before pausing in pull
mode.
(gst_base_sink_change_state): Pay attention to the core's
change_state() return val.

* gst/base/gstbasesrc.c (GstBaseSrc): Remove has-loop,
has-getrange properties. Cleanups.

* gst/base/gstbasesrc.h (GstBaseSrc): Remove has_loop,
has_getrange and replace with can_activate_pull and
can_activate_push.

* gst/base/gstbasesink.h (GstBaseSink): Rearrange fields, add
locking comments. Remove has_loop, has_chain and replace with
can_activate_pull and can_activate_push.
2005-08-26 14:21:43 +00:00
Stefan Kost 7d6e2cbfd5 libs/gst/bytestream/: removing obsolete files
Original commit message from CVS:
* libs/gst/bytestream/.cvsignore:
* libs/gst/bytestream/Makefile.am:
* libs/gst/bytestream/adapter.c:
* libs/gst/bytestream/adapter.h:
* libs/gst/bytestream/bytestream.c:
* libs/gst/bytestream/bytestream.h:
* libs/gst/bytestream/filepad.c:
* libs/gst/bytestream/filepad.h:
removing obsolete files
2005-08-26 13:17:54 +00:00
Thomas Vander Stichele 6c3416a44d gst/base/: fix up some debugging
Original commit message from CVS:

* gst/base/gstbasesink.c: (gst_base_sink_handle_object):
* gst/base/gstbasetransform.c: (gst_base_transform_transform_size),
fix up some debugging
(gst_base_transform_get_unit_size),
(gst_base_transform_buffer_alloc), (gst_base_transform_event),
(gst_base_transform_handle_buffer):
* gst/base/gstbasetransform.h:
handle and store timed NEWSEGMENT events so that subclasses that
calculate time by counting samples have a segment_start time they
need to add to their timestamps - see audioresample
2005-08-26 11:56:11 +00:00
Thomas Vander Stichele 8b739d91e7 whitespace, doc and debug fixing/additions
Original commit message from CVS:
whitespace, doc and debug fixing/additions
2005-08-26 11:19:22 +00:00
Wim Taymans b9ab9854e3 gst/base/gstbasetransform.*: Cache caps unit_size.
Original commit message from CVS:
* gst/base/gstbasetransform.c: (gst_base_transform_init),
(gst_base_transform_transform_size),
(gst_base_transform_configure_caps),
(gst_base_transform_get_unit_size),
(gst_base_transform_buffer_alloc),
(gst_base_transform_change_state):
* gst/base/gstbasetransform.h:
Cache caps unit_size.
Make sure we cannot negotiate up and downstream at the
same time.
2005-08-25 19:36:05 +00:00
Thomas Vander Stichele 31e37fe64c add docs
Original commit message from CVS:
add docs
2005-08-25 18:54:00 +00:00
Thomas Vander Stichele 9ef5832ec0 add a uint64 checking method
Original commit message from CVS:
add a uint64 checking method
2005-08-25 16:27:44 +00:00
Wim Taymans ec8ec3da8a gst/base/gstbasesink.*: Handle newsegment events correctly.
Original commit message from CVS:
* gst/base/gstbasesink.c: (gst_base_sink_handle_object),
(gst_base_sink_get_times), (gst_base_sink_do_sync),
(gst_base_sink_handle_buffer), (gst_base_sink_change_state):
* gst/base/gstbasesink.h:
Handle newsegment events correctly.
Drop buffers out of the segment range.
2005-08-24 17:57:36 +00:00
Thomas Vander Stichele 6519d7bfba gst/base/gstbasetransform.c: use gboolean return values and pointers to size so we can use the full GST_BUFFER_SIZE r...
Original commit message from CVS:
* gst/base/gstbasetransform.c: (gst_base_transform_transform_caps),
(gst_base_transform_transform_size), (gst_base_transform_getcaps),
(gst_base_transform_setcaps), (gst_base_transform_get_unit_size),
(gst_base_transform_buffer_alloc),
(gst_base_transform_handle_buffer):
use gboolean return values and pointers to size so we can use the
full GST_BUFFER_SIZE range (guint) for buffer sizes
use GstPadDirection for transform_caps
* gst/base/gstbasetransform.h:
rename get_size to get_unit_size since that's what it is
* gst/elements/gstcapsfilter.c: (gst_capsfilter_transform_caps):
use GstPadDirection for transform_caps
* gst/gstbuffer.c: (gst_buffer_new_and_alloc):
* gst/gstutils.h:
cleanup and debugging
2005-08-24 13:33:21 +00:00
Wim Taymans 15af2428df gst/base/gstbasetransform.*: Many fixes and new features added by Thomas. Can now also do transforms with variable si...
Original commit message from CVS:
* gst/base/gstbasetransform.c: (gst_base_transform_init),
(gst_base_transform_transform_caps),
(gst_base_transform_transform_size),
(gst_base_transform_configure_caps), (gst_base_transform_setcaps),
(gst_base_transform_get_size), (gst_base_transform_buffer_alloc),
(gst_base_transform_handle_buffer):
* gst/base/gstbasetransform.h:
Many fixes and new features added by Thomas. Can now also do
transforms with variable sizes and a custom fixate_caps function.
2005-08-24 11:44:24 +00:00
Stefan Kost da9c04e2f0 gracefully handle helper method calls to objects that are not beeing controlled, added test case for that
Original commit message from CVS:
* check/gst-libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* docs/gst/tmpl/gstcaps.sgml:
* docs/gst/tmpl/gstghostpad.sgml:
* docs/gst/tmpl/gstquery.sgml:
* docs/gst/tmpl/gstutils.sgml:
* libs/gst/controller/gst-helper.c: (gst_object_set_controller),
(gst_object_sink_values), (gst_object_get_value_arrays),
(gst_object_get_value_array):
gracefully handle helper method calls to objects that are not beeing
controlled, added test case for that
2005-08-23 21:32:31 +00:00
Stefan Kost 3e1c4a2c42 inlined more doc comments, added missing comments and fixed comments fixed typos
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* docs/gst/tmpl/.cvsignore:
* docs/gst/tmpl/gstbin.sgml:
* docs/gst/tmpl/gstbuffer.sgml:
* gst/base/gstbasesrc.c:
* gst/gstbin.c: (gst_bin_get_type), (gst_bin_class_init):
* gst/gstbuffer.c:
* gst/gstbuffer.h:
* tools/gst-launch.1.in:
inlined more doc comments, added missing comments and fixed comments
fixed typos
2005-08-23 11:53:58 +00:00
Wim Taymans 5ffafdb34a gst/base/gstbasetransform.c: Also call the transform function if we have ANY caps.
Original commit message from CVS:
* gst/base/gstbasetransform.c: (gst_base_transform_transform_caps),
(gst_base_transform_handle_buffer):
Also call the transform function if we have ANY caps.

* gst/gstpipeline.c: (gst_pipeline_set_new_stream_time):
Fix debug info.
2005-08-22 19:48:46 +00:00
Jan Schmidt ee1f83092e gst/base/gstbasesrc.c: (gst_base_src_event_handler)
Original commit message from CVS:
* gst/base/gstbasesrc.c: (gst_base_src_event_handler)
Don't pretend to handle seek events if the source is not seekable
2005-08-22 19:22:34 +00:00
Jan Schmidt 05fa076d05 gst/base/gstbasesink.c: Remove extra parameter to debug output
Original commit message from CVS:
* gst/base/gstbasesink.c: (gst_base_sink_handle_object):
Remove extra parameter to debug output

* gst/base/gstbasesrc.c: (gst_base_src_send_discont),
(gst_base_src_do_seek), (gst_base_src_activate_push):
Fix seek event handling.

* gst/gstpipeline.c: (gst_pipeline_change_state):
* gst/gstqueue.c: (gst_queue_handle_sink_event),
(gst_queue_src_activate_push):
Don't start the src pad task on FLUSH_STOP if the pad
isn't linked.
Debug changes.
2005-08-22 18:48:48 +00:00
Thomas Vander Stichele d961ea4c93 check/gst/gstbin.c: since we don't know when preroll is done, use refcount range check for the sink
Original commit message from CVS:

* check/gst/gstbin.c: (GST_START_TEST):
since we don't know when preroll is done, use refcount range
check for the sink
* gst/check/gstcheck.h:
add macro for checking refcount range
2005-08-22 09:25:51 +00:00
Thomas Vander Stichele e5afa8a31b check/Makefile.am: clean up environment for when registry gets built versus when actual tests are run; valgrind seems...
Original commit message from CVS:

* check/Makefile.am:
clean up environment for when registry gets built versus
when actual tests are run; valgrind seems to not report
leaks if GST_PLUGIN_PATH is set to some specific values
* check/gst/gstbin.c: (GST_START_TEST):
add more refcounting checks; maybe this exposes a
preroll lock bug ?
* common/check.mak:
* gst/base/gstbasesink.c: (gst_base_sink_handle_object):
* gst/check/gstcheck.h:
* gst/gstbin.c: (bin_element_is_semi_sink), (gst_bin_get_state),
(gst_bin_change_state):
* gst/gstpad.c: (gst_pad_activate_push), (gst_pad_chain):
add/fix debugging/whitespace
2005-08-21 15:01:18 +00:00
Jan Schmidt 84b76a4359 check/Makefile.am: Use CHECK_CFLAGS and CHECK_LIBS
Original commit message from CVS:
* check/Makefile.am:
Use CHECK_CFLAGS and CHECK_LIBS
* check/gst/gstevent.c: (event_probe), (test_event),
(GST_START_TEST):
Don't leak events.
* gst/base/gstbasesrc.c: (gst_base_src_send_discont),
(gst_base_src_start), (gst_base_src_stop),
(gst_base_src_activate_push), (gst_base_src_activate_pull),
(gst_base_src_change_state):
Sprinkle gst_base_src_stop liberally around error paths to fix
problems reusing a source after failed state changes.
* gst/base/gsttypefindhelper.c: (helper_find_peek),
(helper_find_suggest), (gst_type_find_helper):
Extra debug output. Don't segfault on GST_PAD_GETRANGEFUNC = NULL
* gst/gstevent.h:
* docs/gst/tmpl/gstevent.sgml:
Migrate part of the docs from the SGML file. Wait for ensonic to
tell me how I did it wrong ;)
* tools/gst-typefind.c: (main):
Extra robustness to state changes between files.
2005-08-21 10:54:47 +00:00
Thomas Vander Stichele 744193f884 check/Makefile.am: don't valgrind the controller test - it's leaking - Stefan, HELP
Original commit message from CVS:

* check/Makefile.am:
don't valgrind the controller test - it's leaking - Stefan, HELP
* gst/check/gstcheck.c: (gst_check_message_error),
(gst_check_chain_func), (gst_check_setup_element),
(gst_check_teardown_element), (gst_check_setup_src_pad),
(gst_check_teardown_src_pad), (gst_check_setup_sink_pad),
(gst_check_teardown_sink_pad):
* gst/check/gstcheck.h:
add a bunch of methods to set up elements, and src and sink pads
* check/elements/fakesrc.c: (setup_fakesrc), (cleanup_fakesrc):
* check/elements/identity.c: (setup_identity), (cleanup_identity),
(GST_START_TEST):
use them
* gst/gstmessage.c:
* gst/gsttag.h:
whitespace/doc fixes
2005-08-21 10:39:39 +00:00
Thomas Vander Stichele 088fed6d36 check/Makefile.am: set GST_TOOLS_DIR
Original commit message from CVS:

* check/Makefile.am:
set GST_TOOLS_DIR
* gst/check/gstcheck.c: (gst_check_message_error):
* gst/check/gstcheck.h:
add a fail_unless_equals_int
add fail_unless for error messages
2005-08-20 20:15:53 +00:00
Thomas Vander Stichele 8ce827c406 move check stuff to its own library to be used by other modules
Original commit message from CVS:
move check stuff to its own library to be used by other modules
2005-08-20 12:14:28 +00:00
Andy Wingo aa0fb69d49 Make sure that when a pipeline goes to PLAYING, that data has actually hit the sink.
Original commit message from CVS:
2005-08-18  Andy Wingo  <wingo@pobox.com>

Make sure that when a pipeline goes to PLAYING, that data has
actually hit the sink.

* check/states/sinks.c (test_sink): A sink that doesn't get any
data shouldn't return SUCCESS for going to either PLAYING or
PAUSED. Test also the return values on the way back down.

* gst/gstelement.c (gst_element_set_state): When changing the
state of an element currently changing state asynchronously, go to
lost-state after commiting the pending state. Makes future calls
to get_state continue to return ASYNC.

* gst/base/gstbasesink.c (gst_base_sink_change_state): Return
ASYNC when going to PLAYING if we still don't have preroll, as can
happen with live sources.
2005-08-18 16:20:24 +00:00
Jan Schmidt 8377afc0ba check/: I wrote a test!
Original commit message from CVS:
* check/Makefile.am:
* check/gst/gstevents.c: (GST_START_TEST), (event_probe),
(test_event), (timediff), (gstevents_suite), (main):
I wrote a test!

* docs/design/part-seeking.txt:
Spelling correction

* docs/gst/tmpl/gstevent.sgml:
Docs updates.

* gst/base/gstbasesink.c: (gst_base_sink_handle_object):
Treat a buffer-without-newsegment the same as a receiving
a newsegment not in time format, and disable syncing to the clock
with a warning.

* gst/gstbus.c: (gst_bus_set_sync_handler):
Assert if anyone tries to replace the existing sync_handler for bus,
as only the owner should be setting it.

* gst/gstevent.h:
Have a fixed set of custom event enums with events identified by
their structure name (as in 0.8), rather than a free-for-all
allowing collisions between enum values from different plugins.

* gst/gstpad.c: (gst_pad_class_init):
Docs change.

* gst/gstqueue.c: (gst_queue_handle_sink_event):
Handle out-of-band downstream events from the sending thread.
2005-08-18 15:31:28 +00:00
Andy Wingo c5e2202f20 gst/base/gstbasetransform.c: Debug changes.
Original commit message from CVS:
2005-08-17  Andy Wingo  <wingo@pobox.com>

* gst/base/gstbasetransform.c: Debug changes.

* gst/gstutils.h:
* gst/gstutils.c (gst_bin_watch_for_state_change): Add function to
ensure bins post state change messages. A bit of a hack but I can't
think of a way to avoid it.

* check/gst/gstbin.c (test_watch_for_state_change): Added test.
2005-08-17 16:33:27 +00:00
Andy Wingo ecbae942c5 gst/base/gstadapter.*: New function, like peek() but you own the data. Not terribly efficient atm.
Original commit message from CVS:
2005-08-16  Andy Wingo  <wingo@pobox.com>

* gst/base/gstadapter.h:
* gst/base/gstadapter.c (gst_adapter_take): New function, like
peek() but you own the data. Not terribly efficient atm.
2005-08-16 17:23:55 +00:00
Stefan Kost cdc8ba9725 docs/gst/gstreamer-sections.txt: made some defines private
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
made some defines private
* docs/gst/tmpl/gstconfig.sgml:
* docs/gst/tmpl/gstqueue.sgml:
* docs/gst/tmpl/gsttaglist.sgml:
* docs/gst/tmpl/gsttypes.sgml:
* docs/gst/tmpl/gstutils.sgml:
* docs/pwg/appendix-porting.xml:
* gst/base/gstbasesink.h:
* gst/base/gstbasesrc.c:
* gst/base/gstbasesrc.h:
* gst/elements/gstfakesink.c: (gst_fake_sink_class_init):
* gst/elements/gstfakesrc.c: (gst_fake_src_class_init):
* gst/gstelement.c: (gst_element_class_init):
* gst/gstpad.c: (gst_pad_class_init):
* gst/gstqueue.c: (gst_queue_class_init):
* gst/gstxml.c: (gst_xml_class_init):
documented all undocumented signal inline
* libs/gst/controller/gst-controller.h:
added padding
2005-08-15 16:57:34 +00:00
Stefan Kost cdd579efc9 added deprecation and since indexes added since tags
Original commit message from CVS:
added deprecation and since indexes
added since tags
2005-08-11 17:39:48 +00:00
Tim-Philipp Müller ba8a8319fd gst/base/gsttypefindhelper.c: The memory returned by gst_type_find_peek() needs to stay valid until the end of a type...
Original commit message from CVS:
* gst/base/gsttypefindhelper.c: (helper_find_peek),
(gst_type_find_helper):
The memory returned by gst_type_find_peek() needs to
stay valid until the end of a typefind function, and
typefind functions may keep results from different
offsets around, so we can't just unref the buffer from
the previous _peek(), but have to save all buffers
returned by _peek() until typefinding is done and only
free them then.
2005-08-10 15:08:03 +00:00
Ronald S. Bultje d32de37076 gst/base/gstbasetransform.c: Fix a pretty good memleak.
Original commit message from CVS:
* gst/base/gstbasetransform.c: (gst_base_transform_buffer_alloc):
Fix a pretty good memleak.
2005-08-08 15:08:14 +00:00
Tim-Philipp Müller 46cc9bc152 gst/: Add padding to our base elements' class and instance structs and to GstIterator (you will need to rebuild all p...
Original commit message from CVS:
* gst/base/gstadapter.h:
* gst/base/gstbasesink.h:
* gst/base/gstbasesrc.h:
* gst/base/gstbasetransform.h:
* gst/base/gstcollectpads.h:
* gst/base/gstpushsrc.h:
* gst/gstiterator.h:
Add padding to our base elements' class and instance structs and
to GstIterator (you will need to rebuild all plugins and apps!)
2005-08-08 13:31:09 +00:00
Stefan Kost 4e2d045ed2 adding more entries to the docs and fix small doc-bugs
Original commit message from CVS:
adding more entries to the docs and fix small doc-bugs
2005-08-05 17:28:30 +00:00
Stefan Kost da7dd48860 added long/short desc for controller docs added collectpads base class docs added correct includes to base-class docs
Original commit message from CVS:
added long/short desc for controller docs
added collectpads base class docs
added correct includes to base-class docs
2005-08-05 12:59:46 +00:00
Stefan Kost a34f2613f9 more tests (and fixes) for the controller more docs for the controller integrated companies docs for the adapter
Original commit message from CVS:
more tests (and fixes) for the controller
more docs for the controller
integrated companies docs for the adapter
2005-08-05 10:02:44 +00:00
Andy Wingo e20ed97cb2 gst/elements/gstcapsfilter.c: Reimplement using basetransform, fixes buffer_alloc proxying among other things.
Original commit message from CVS:
2005-08-04  Andy Wingo  <wingo@pobox.com>

* gst/elements/gstcapsfilter.c: Reimplement using basetransform,
fixes buffer_alloc proxying among other things.

* gst/base/gstbasetransform.c:
* gst/base/gstbasetransform.h:
Revert patch to gstbasetransform from 7-28 removing
delay_configure.

* gst/base/gstbasetransform.h (GstBaseTransformClass.get_size):
* gst/base/gstbasetransform.c (gst_base_transform_get_size):
Semantics changed, should return not the size of the output buffer
but the byte size of a buffer with a given caps.

* gst/base/gstbasetransform.c (gst_base_transform_getcaps): Better
debug object.
(gst_base_transform_configure_caps): Don't set out_size here: (in,
out) are not the pad caps until setcaps finishes.
(gst_base_transform_buffer_alloc): Proxy the buffer_alloc for the
not-in-place case as well. Deal with changing from in-place to
not-in-place within calling pad_alloc_buffer. Still a bit
concerned about the overhead here...
2005-08-04 19:40:43 +00:00
Edward Hervey 8ff106a019 gst/base/gstadapter.h: Added gst_adapter_get_type() to the header
Original commit message from CVS:
* gst/base/gstadapter.h:
Added gst_adapter_get_type() to the header
2005-08-04 11:56:57 +00:00
Stefan Kost b3034dba54 added check test suite for the controller fixed a doc typo
Original commit message from CVS:
added check test suite for the controller
fixed a doc typo
2005-08-03 15:59:11 +00:00
Stefan Kost 722f83a8fc add short/long description docs to base classes add pushsrc to the docs remove consolidated doc fragments
Original commit message from CVS:
add short/long description docs to base classes
add pushsrc to the docs
remove consolidated doc fragments
2005-08-03 13:30:18 +00:00
Stefan Kost c32233b7fc added controller code removed dparam pc files
Original commit message from CVS:
added controller code
removed dparam pc files
2005-08-02 21:35:34 +00:00
Jan Schmidt 75c955843e gst/base/gstcollectpads.c: Broadcast the condition when shutting down, to make sure we wake all threads up. Shut down...
Original commit message from CVS:
* gst/base/gstcollectpads.c: (gst_collectpads_finalize),
(gst_collectpads_stop):
Broadcast the condition when shutting down, to make sure we wake all
threads up. Shut down pads on finalize, for safety.
2005-08-01 21:17:01 +00:00
Jan Schmidt 4572dcaa86 gst/base/gstbasetransform.c: Handle PAUSED->READY->PAUSED transition after negotiation occurred already.
Original commit message from CVS:
2005-08-01  Jan Schmidt  <thaytan@mad.scientist.com>
* gst/base/gstbasetransform.c: (gst_base_transform_init),
(gst_base_transform_handle_buffer),
(gst_base_transform_change_state):
Handle PAUSED->READY->PAUSED transition after negotiation
occurred already.
* gst/gstmessage.c: (gst_message_init):
Extra piece of debug for new messages.
2005-08-01 17:26:00 +00:00
Stefan Kost 20efddd11e deactivate and remove dparams (libgstcontrol)
Original commit message from CVS:
deactivate and remove dparams (libgstcontrol)
2005-08-01 16:17:31 +00:00
Ronald S. Bultje cd76217ce5 gst/base/gstbasetransform.*: Remove broken delay_configure (fixes renegotiation of software scaling pipelines); remov...
Original commit message from CVS:
* gst/base/gstbasetransform.c: (gst_base_transform_setcaps),
(gst_base_transform_handle_buffer):
* gst/base/gstbasetransform.h:
Remove broken delay_configure (fixes renegotiation of software
scaling pipelines); remove some leftover printf()s.
2005-07-28 11:49:56 +00:00
Ronald S. Bultje f6195ba59a gst/base/gstbasetransform.c: Better debug if no transform is possible.
Original commit message from CVS:
* gst/base/gstbasetransform.c: (gst_base_transform_setcaps):
Better debug if no transform is possible.
2005-07-28 10:38:02 +00:00
Wim Taymans 540d6342e9 libs/gst/dataprotocol/dataprotocol.c: Fix serialization of seek events.
Original commit message from CVS:
* libs/gst/dataprotocol/dataprotocol.c: (gst_dp_packet_from_event),
(gst_dp_event_from_packet):
Fix serialization of seek events.
2005-07-27 19:00:36 +00:00
Wim Taymans 66d7070ef1 Some docs updates
Original commit message from CVS:
* CHANGES-0.9:
* docs/design/part-TODO.txt:
* docs/design/part-events.txt:
Some docs updates

* gst/base/gstbasesink.c: (gst_base_sink_handle_object),
(gst_base_sink_event), (gst_base_sink_do_sync),
(gst_base_sink_activate_push), (gst_base_sink_activate_pull):
* gst/base/gstbasesrc.c: (gst_base_src_send_discont),
(gst_base_src_do_seek), (gst_base_src_event_handler),
(gst_base_src_loop):
* gst/base/gstbasetransform.c: (gst_base_transform_transform_caps),
(gst_base_transform_configure_caps), (gst_base_transform_setcaps),
(gst_base_transform_get_size), (gst_base_transform_buffer_alloc),
(gst_base_transform_event), (gst_base_transform_handle_buffer),
(gst_base_transform_set_passthrough),
(gst_base_transform_is_passthrough):
* gst/elements/gstfakesink.c: (gst_fake_sink_event):
* gst/elements/gstfilesink.c: (gst_file_sink_event):
Event updates.

* gst/gstbuffer.h:
Use faster casts.

* gst/gstelement.c: (gst_element_seek):
* gst/gstelement.h:
Update gst_element_seek.

* gst/gstevent.c: (gst_event_finalize), (_gst_event_copy),
(gst_event_new), (gst_event_new_custom), (gst_event_get_structure),
(gst_event_new_flush_start), (gst_event_new_flush_stop),
(gst_event_new_eos), (gst_event_new_newsegment),
(gst_event_parse_newsegment), (gst_event_new_tag),
(gst_event_parse_tag), (gst_event_new_filler), (gst_event_new_qos),
(gst_event_parse_qos), (gst_event_new_seek),
(gst_event_parse_seek), (gst_event_new_navigation):
* gst/gstevent.h:
Make GstEvent use GstStructure. Add parsing code, make sure the
API is sufficiently generic.
Mark possible directions of events and serialization.

* gst/gstmessage.c: (gst_message_init), (gst_message_finalize),
(_gst_message_copy), (gst_message_new_segment_start),
(gst_message_new_segment_done), (gst_message_new_custom),
(gst_message_parse_segment_start),
(gst_message_parse_segment_done):
Small cleanups.

* gst/gstpad.c: (gst_pad_get_caps_unlocked), (gst_pad_accept_caps),
(gst_pad_set_caps), (gst_pad_send_event):
Update for new events.
Catch events sent in wrong directions.

* gst/gstqueue.c: (gst_queue_link_src),
(gst_queue_handle_sink_event), (gst_queue_chain), (gst_queue_loop),
(gst_queue_handle_src_query):
Event updates.

* gst/gsttag.c:
* gst/gsttag.h:
Remove event code from this file.

* libs/gst/dataprotocol/dataprotocol.c: (gst_dp_packet_from_event),
(gst_dp_event_from_packet):
Event updates.
2005-07-27 18:33:03 +00:00
Ronald S. Bultje 4795d25721 gst/base/gstbasetransform.c: Make debugging actually useful.
Original commit message from CVS:
* gst/base/gstbasetransform.c: (gst_base_transform_getcaps),
(gst_base_transform_configure_caps), (gst_base_transform_setcaps),
(gst_base_transform_get_size), (gst_base_transform_handle_buffer):
Make debugging actually useful.
2005-07-27 15:05:45 +00:00
Wim Taymans 9f06376bab docs/design/part-events.txt: Small update.
Original commit message from CVS:
* docs/design/part-events.txt:
Small update.

* gst/base/gstbasesink.c: (gst_base_sink_handle_object),
(gst_base_sink_do_sync), (gst_base_sink_activate_push),
(gst_base_sink_activate_pull):
Some more comments.

* gst/elements/gstfakesrc.c: (gst_fake_src_class_init),
(gst_fake_src_create):
Fix handoff marshall.

* gst/elements/gstidentity.c: (gst_identity_class_init),
(gst_identity_transform_ip):
We're a real inplace element.

* gst/gstbus.c: (gst_bus_post):
Added some comments.

* tests/lat.c: (fakesrc), (fakesink), (simple), (queue), (main):
* tests/muxing/case1.c: (main):
* tests/sched/dynamic-pipeline.c: (main):
* tests/sched/interrupt1.c: (main):
* tests/sched/interrupt2.c: (main):
* tests/sched/interrupt3.c: (main):
* tests/sched/runxml.c: (main):
* tests/sched/sched-stress.c: (main):
* tests/seeking/seeking1.c: (event_received), (main):
* tests/threadstate/threadstate2.c: (bus_handler), (timeout_func),
(main):
* tests/threadstate/threadstate3.c: (main):
* tests/threadstate/threadstate4.c: (main):
* tests/threadstate/threadstate5.c: (main):
Fix the tests.
2005-07-22 11:47:10 +00:00
Wim Taymans 030ff93e82 docs/design/part-seeking.txt: Some small additions.
Original commit message from CVS:
* docs/design/part-seeking.txt:
Some small additions.

* gst/base/gstbasesink.c: (gst_base_sink_handle_object),
(gst_base_sink_get_times), (gst_base_sink_do_sync),
(gst_base_sink_activate_push), (gst_base_sink_activate_pull):
* gst/base/gstbasesink.h:
discont values are gint64, handle the math correctly.

* gst/base/gstbasesrc.c: (gst_base_src_loop):
Make the basesrc report error if the source pad is not linked.

* gst/gstqueue.c: (gst_queue_link_src), (gst_queue_chain),
(gst_queue_loop), (gst_queue_handle_src_query),
(gst_queue_src_activate_push):
Make queue collect data even if the srcpad is not linked.
Start pushing out data as soon as it is linked.

* gst/gstutils.c: (gst_element_unlink), (gst_flow_get_name):
* gst/gstutils.h:
Added gst_flow_get_name() to ease error reporting.
2005-07-21 17:22:13 +00:00
Wim Taymans e261956ca6 gst/gstmessage.*: Added a bunch of messages for advanced seeking.
Original commit message from CVS:
* gst/gstmessage.c: (gst_message_new_segment_start),
(gst_message_new_segment_done), (gst_message_parse_segment_start),
(gst_message_parse_segment_done):
* gst/gstmessage.h:
Added a bunch of messages for advanced seeking.

* gst/parse/grammar.y:
* libs/gst/control/dparammanager.c: (gst_dpman_set_parent),
(gst_dpman_state_changed):
Fix some new-pad -> pad-added signals
2005-07-20 18:02:13 +00:00
Wim Taymans f73fb55d1e gst/base/gstbasesrc.*: Add a gboolean to decide when to push out a discont.
Original commit message from CVS:
* gst/base/gstbasesrc.c: (gst_base_src_init),
(gst_base_src_do_seek), (gst_base_src_loop), (gst_base_src_start):
* gst/base/gstbasesrc.h:
Add a gboolean to decide when to push out a discont.

* gst/gstqueue.c: (gst_queue_handle_sink_event), (gst_queue_chain),
(gst_queue_loop), (gst_queue_handle_src_query),
(gst_queue_sink_activate_push), (gst_queue_src_activate_push),
(gst_queue_set_property), (gst_queue_get_property):
Some cleanups.

* tests/threadstate/threadstate1.c: (main):
Make a thread test compile and run... very silly..
2005-07-20 10:58:10 +00:00
Wim Taymans 737969ce5b gst/base/gstbasesrc.c: Make sure we never call the create function is we got deactivated.
Original commit message from CVS:
* gst/base/gstbasesrc.c: (gst_base_src_get_range):
Make sure we never call the create function is we
got deactivated.
2005-07-19 13:43:50 +00:00
Wim Taymans 99a3a0a6c0 Small docs updates.
Original commit message from CVS:
* docs/design/part-clocks.txt:
* docs/design/part-events.txt:
* gst/base/gstbasesrc.c: (gst_base_src_do_seek):
Small docs updates.
Only update the seeking values when we are not
busy streaming.
2005-07-19 09:19:06 +00:00
Jan Schmidt 690e87b1fd Oops, ignore the result of gst_pad_push_event here.
Original commit message from CVS:
Oops, ignore the result of gst_pad_push_event here.
2005-07-18 17:43:52 +00:00
Jan Schmidt 518e590f8b gst/base/gstbasesrc.c: Send discont event from the loop function, as pads aren't activated yet in the activate_push h...
Original commit message from CVS:
* gst/base/gstbasesrc.c: (gst_base_src_loop),
(gst_base_src_activate_push):
Send discont event from the loop function, as pads
aren't activated yet in the activate_push handler.

* gst/gstbin.c: (bin_bus_handler):
Don't leak element name.
2005-07-18 17:12:36 +00:00
Wim Taymans e1aeec6d77 Removed plugable schedulers.
Original commit message from CVS:
Removed plugable schedulers.
Removed Scheduler/Manager from elements.
Removed gsttypes.h, rearranged includes.
Removed dependency pad<->element, element<>pipeline, and
various others,  fix includes.
implement gst_pad_get_parent() with gst_object_get_parent()
Make GstTask sefcontained.
Fix _get_state() on GstBin, it did not return ASYNC with a 0
timeout.
Fix endless loop in iterator_fold_with_resync.
2005-07-18 12:49:53 +00:00
Wim Taymans 2b1ce5f29e docs/design/: Some more docs in the works.
Original commit message from CVS:
* docs/design/part-dynamic.txt:
* docs/design/part-events.txt:
* docs/design/part-seeking.txt:
Some more docs in the works.

* gst/base/gstbasetransform.c: (gst_base_transform_transform_caps),
(gst_base_transform_getcaps), (gst_base_transform_configure_caps),
(gst_base_transform_setcaps), (gst_base_transform_get_size),
(gst_base_transform_buffer_alloc), (gst_base_transform_event),
(gst_base_transform_handle_buffer),
(gst_base_transform_sink_activate_push),
(gst_base_transform_src_activate_pull),
(gst_base_transform_set_passthrough),
(gst_base_transform_is_passthrough):
Refcounting fixes.

* gst/gstbus.c: (gst_bus_source_dispatch), (gst_bus_poll):
Cleanups.

* gst/gstevent.c: (gst_event_finalize):
Set SRC to NULL.

* gst/gstutils.c: (gst_element_unlink),
(gst_pad_get_parent_element), (gst_pad_proxy_getcaps),
(gst_pad_proxy_setcaps):
* gst/gstutils.h:
Add _get_parent_element() to get a pads parent as an element.
2005-07-18 08:28:48 +00:00
Wim Taymans 56453e01b9 gst/base/gstbasesink.c: Refcounting fixes.
Original commit message from CVS:
* gst/base/gstbasesink.c: (gst_base_sink_pad_getcaps),
(gst_base_sink_pad_setcaps), (gst_base_sink_pad_buffer_alloc),
(gst_base_sink_preroll_queue_flush), (gst_base_sink_handle_object),
(gst_base_sink_event), (gst_base_sink_do_sync),
(gst_base_sink_chain), (gst_base_sink_loop),
(gst_base_sink_deactivate), (gst_base_sink_activate_push),
(gst_base_sink_activate_pull), (gst_base_sink_change_state):
Refcounting fixes.
Fix logic for returning ASYNC when not prerolled.
2005-07-17 22:26:02 +00:00
Wim Taymans 11bc479656 gst/base/gstbasesink.c: Fix compile error.
Original commit message from CVS:
* gst/base/gstbasesink.c: (gst_base_sink_handle_object),
(gst_base_sink_do_sync):
Fix compile error.
2005-07-16 14:52:15 +00:00
Wim Taymans d5be929bf8 gst/base/gstbasesink.*: Store and use discont values when syncing buffers as described in design docs.
Original commit message from CVS:
* gst/base/gstbasesink.c: (gst_base_sink_handle_object),
(gst_base_sink_event), (gst_base_sink_get_times),
(gst_base_sink_do_sync), (gst_base_sink_change_state):
* gst/base/gstbasesink.h:
Store and use discont values when syncing buffers as described
in design docs.

* gst/base/gstbasesrc.c: (gst_base_src_send_discont),
(gst_base_src_do_seek), (gst_base_src_loop), (gst_base_src_start),
(gst_base_src_activate_push):
Push discont event when starting.

* gst/elements/gstidentity.c: (gst_identity_transform):
Small cleanups.

* gst/gstbin.c: (gst_bin_change_state):
Small cleanups in base_time  distribution.

* gst/gstelement.c: (gst_element_set_base_time),
(gst_element_get_base_time), (gst_element_change_state):
* gst/gstelement.h:
Added methods for the base_time of the element.
Some MT fixes.

* gst/gstpipeline.c: (gst_pipeline_send_event),
(gst_pipeline_change_state), (gst_pipeline_set_new_stream_time),
(gst_pipeline_get_last_stream_time):
* gst/gstpipeline.h:
MT fixes.
Handle seeking as described in design doc, remove stream_time
hack.
Cleanups clock and stream_time selection code. Added accessors
for the stream_time.
2005-07-16 14:41:25 +00:00
Tim-Philipp Müller d34751b8c2 gst/base/gstbasesrc.c: Don't unref the caps we passed to gst_caps_make_writable() after passing them. gst_caps_make_w...
Original commit message from CVS:
* gst/base/gstbasesrc.c: (gst_base_src_default_negotiate):
Don't unref the caps we passed to gst_caps_make_writable() after
passing them. gst_caps_make_writable() will do that for us.
2005-07-16 12:33:13 +00:00
Andy Wingo ad1970eae2 tools/gst-typefind.c: Update, add copyright block.
Original commit message from CVS:
2005-07-15  Andy Wingo  <wingo@pobox.com>

* tools/gst-typefind.c: Update, add copyright block.

* gst/base/gstbasesrc.c (gst_base_src_default_negotiate):
Normalize and truncate caps before fixation.

* gst/gstcaps.h:
* gst/gstcaps.c (gst_caps_truncate): New function, destructively
discards all but the first structure from its argument.
2005-07-15 11:04:18 +00:00
Wim Taymans 7f4581d977 gst/base/gstbasetransform.*: Make passthrough work using the bufferpools.
Original commit message from CVS:
* gst/base/gstbasetransform.c: (gst_base_transform_init),
(gst_base_transform_transform_caps), (gst_base_transform_getcaps),
(gst_base_transform_configure_caps), (gst_base_transform_setcaps),
(gst_base_transform_get_size), (gst_base_transform_buffer_alloc),
(gst_base_transform_handle_buffer), (gst_base_transform_getrange),
(gst_base_transform_chain), (gst_base_transform_change_state),
(gst_base_transform_set_passthrough),
(gst_base_transform_is_passthrough):
* gst/base/gstbasetransform.h:
Make passthrough work using the bufferpools.
Changed API a bit, subclasses have to write into a buffer
provided by the base class.
More debug info in nego functions.

* gst/elements/gstidentity.c: (gst_identity_init),
(gst_identity_transform):
Port to new base class.
2005-07-15 10:41:32 +00:00
Wim Taymans 40a158fa44 gst/base/gstbasesrc.c: Post error messages on errors.
Original commit message from CVS:
* gst/base/gstbasesrc.c: (gst_base_src_loop):
Post error messages on errors.
2005-07-14 18:45:51 +00:00
Thomas Vander Stichele 259dec97fd more autistic cleanliness in functions/names/defines
Original commit message from CVS:
more autistic cleanliness in functions/names/defines
2005-07-14 09:35:12 +00:00
Andy Wingo 9cb62f69e3 gst/base/gstbasesrc.c (gst_base_src_start): Post an error if the source couldn't negotiate.
Original commit message from CVS:
2005-07-13  Andy Wingo  <wingo@pobox.com>

* gst/base/gstbasesrc.c (gst_base_src_start): Post an error if the
source couldn't negotiate.
2005-07-13 16:26:07 +00:00
Wim Taymans f7c0c25d58 gst/base/gstbasetransform.c: Added more debug info in the negotiate process.
Original commit message from CVS:
* gst/base/gstbasetransform.c: (gst_base_transform_setcaps):
Added more debug info in the negotiate process.

* gst/gstmessage.h:
Prepare for segment playback.

* gst/gstpad.c: (gst_pad_accept_caps), (gst_pad_set_caps):
Better debugging.

* gst/gstutils.c:
Some more docs.

* tools/gst-launch.c: (main):
NULL pipeline on errors.
2005-07-12 17:17:34 +00:00
Thomas Vander Stichele aff85422dc add num-buffers property to basesrc
Original commit message from CVS:
add num-buffers property to basesrc
2005-07-11 15:06:27 +00:00
Thomas Vander Stichele 82596fea62 more macro splitting
Original commit message from CVS:
more macro splitting
2005-07-10 12:03:13 +00:00
Thomas Vander Stichele 51bfa5c30b gst/base/gstbasesrc.c: add finalize method and clean up properly
Original commit message from CVS:

* gst/base/gstbasesrc.c: (gst_base_src_class_init),
(gst_base_src_finalize):
add finalize method and clean up properly
* gst/gstpipeline.c: (gst_pipeline_dispose):
add debug
2005-07-09 23:33:24 +00:00
Wim Taymans c985c341ab gst/base/gstbasesrc.c: Allow subclasses to implement their own negotiation.
Original commit message from CVS:
* gst/base/gstbasesrc.c: (gst_base_src_get_range),
(gst_base_src_default_negotiate), (gst_base_src_negotiate):
Allow subclasses to implement their own negotiation.
2005-07-07 08:16:54 +00:00
Jan Schmidt ba5cecf321 examples/: Update a couple of the examples to work again.
Original commit message from CVS:
* examples/Makefile.am:
* examples/helloworld/helloworld.c: (event_loop), (main):
* examples/queue/queue.c: (event_loop), (main):
* examples/queue2/queue2.c: (main):
Update a couple of the examples to work again.

* gst/base/gstbasesink.c: (gst_base_sink_preroll_queue_empty),
(gst_base_sink_preroll_queue_flush), (gst_base_sink_handle_event):
Spelling corrections and extra debug.

* gst/gstbin.c: (gst_bin_class_init), (gst_bin_init), (is_eos),
(gst_bin_add_func), (bin_element_is_sink), (gst_bin_get_state),
(gst_bin_change_state), (gst_bin_dispose), (bin_bus_handler):
* gst/gstbin.h:
* gst/gstpipeline.c: (gst_pipeline_init), (gst_pipeline_dispose),
(gst_pipeline_change_state):
* gst/gstpipeline.h:
Move the bus handler for children to the GstBin, and create a
separate bus for receiving messages from children to the one the
bus sends 'upwards' on.
2005-07-06 16:22:47 +00:00
Wim Taymans 03aa950f7d gst/base/: Make basesrc negotiate.
Original commit message from CVS:
* gst/base/README:
* gst/base/gstbasesink.c: (gst_base_sink_preroll_queue_empty),
(gst_base_sink_handle_object), (gst_base_sink_loop),
(gst_base_sink_change_state):
* gst/base/gstbasesink.h:
* gst/base/gstbasesrc.c: (gst_base_src_class_init),
(gst_base_src_init), (gst_base_src_setcaps),
(gst_base_src_getcaps), (gst_base_src_loop),
(gst_base_src_default_negotiate), (gst_base_src_negotiate),
(gst_base_src_start), (gst_base_src_change_state):
* gst/base/gstbasesrc.h:
Make basesrc negotiate.
Handle the case where preroll fails in basesink.
Update README.
2005-07-06 13:25:26 +00:00
Andy Wingo 0675bff0fc gst/: s/BASESRC/BASE_SRC/g.
Original commit message from CVS:
2005-07-05  Andy Wingo  <wingo@pobox.com>

* gst/elements/gstfilesrc.c:
* gst/elements/gstfakesrc.c:
* gst/base/gstpushsrc.c:
* gst/base/gstbasesrc.h:
* gst/base/gstbasesrc.c: s/BASESRC/BASE_SRC/g.
2005-07-05 16:38:13 +00:00
Wim Taymans 658bba4626 Ported dataprotol to 0.9.
Original commit message from CVS:
* configure.ac:
* libs/gst/dataprotocol/Makefile.am:
* libs/gst/dataprotocol/dataprotocol.c: (gst_dp_validate_packet):
* libs/gst/dataprotocol/dataprotocol.h:
* pkgconfig/Makefile.am:
* pkgconfig/gstreamer-dataprotocol-uninstalled.pc.in:
* pkgconfig/gstreamer-dataprotocol.pc.in:
Ported dataprotol to 0.9.
Added pkgconfig files.
2005-07-05 10:20:14 +00:00
Andy Wingo fd980b9f72 gst/base/gstbasetransform.c (gst_base_transform_setcaps): Default to returning TRUE for the case when tranform_caps r...
Original commit message from CVS:
2005-07-05  Andy Wingo  <wingo@pobox.com>

* gst/base/gstbasetransform.c (gst_base_transform_setcaps):
Default to returning TRUE for the case when tranform_caps returns
a fixed caps, like for identity or volume.
2005-07-05 09:35:22 +00:00
Andy Wingo 83a7075f8a check/: Application message API change.
Original commit message from CVS:
2005-07-05  Andy Wingo  <wingo@pobox.com>

* check/gst/gstbus.c (pound_bus_with_messages):
* check/gst/gstmessage.c (START_TEST):
* check/pipelines/simple_launch_lines.c (got_handoff): Application
message API change.

* gst/base/gstbasetransform.c (gst_base_transform_setcaps): More
logic weaks here: always run transform_caps, trying passthrough
operation only if the original caps intersects with the transform.

* gst/gstpad.c (gst_pad_link_check_compatible_unlocked): Debug
source and sink caps.

* gst/base/gstbasetransform.c (gst_base_transform_getcaps):
Intersect the peer caps with the pad template before going into
transform_caps.
(gst_base_transform_transform_caps): More debugging.

* gst/gstmessage.h (gst_message_new_application): Take a GstObject
src argument.
2005-07-05 08:47:40 +00:00
Andy Wingo c1d34b8acf tests/network-clock.scm: Commentary update.
Original commit message from CVS:
2005-07-01  Andy Wingo  <wingo@pobox.com>

* tests/network-clock.scm: Commentary update.

* gst/elements/gstidentity.c (PROP_DUPLICATE): Gone daddy gone.
Didn't really make sense, not implementable with basetransform,
etc.
(gst_identity_transform): Unref inbuf via make_writable. Feeble
attempt at implementing the sync property, needs an unlock method.

* gst/base/gstbasetransform.c (gst_base_transform_transform_caps):
New func, by default returns the same caps (the identity
transformation).
(gst_base_transform_getcaps): Uses transform_caps to return
something sensible.
(gst_base_transform_setcaps): Complicated logic to get caps on
both pads, even if they are different, and to call set_caps once
for every time both pads get their caps set.
(gst_base_transform_handle_buffer): Give the ref to the transform
function. Allows in-place modification of the buffer.

* gst/base/gstbasetransform.h (transform_caps): New class method.
Given caps on one side, what can I do on the other.
(set_caps): Take two caps, one for each side of the element.

* gst/gstpad.h:
* gst/gstpad.c (gst_pad_fixate_caps): Change prototype to modify
caps in place. This is safe because we can check the mutability of
the caps, and a good idea because fixate functions are just called
as a matter of last resort. (Not actually implemented.)
(gst_pad_set_caps): If the caps we're setting is actually the same
as the existing pad caps, just update the pointer without calling
setcaps. Assert that caps is either NULL or fixed, as per the
docs.

* gst/gstghostpad.c: Update for fixate changes.
2005-07-01 16:46:59 +00:00
Wim Taymans 6a6a717235 gst/base/gstbasesink.*: Some tweaks, only EOS and a buffer complete a preroll.
Original commit message from CVS:
* gst/base/gstbasesink.c: (gst_base_sink_preroll_queue_empty),
(gst_base_sink_preroll_queue_flush), (gst_base_sink_handle_object),
(gst_base_sink_change_state):
* gst/base/gstbasesink.h:
Some tweaks, only EOS and a buffer complete a preroll.
2005-06-30 12:14:47 +00:00
Wim Taymans 06ab4b7831 gst/base/gstbasesink.c: Small debug line.
Original commit message from CVS:
* gst/base/gstbasesink.c: (gst_base_sink_handle_object),
(gst_base_sink_change_state):
Small debug line.

* gst/gstclock.h:
map SIGNAL and BROADCAST to the right function.

* gst/gstobject.h:
Remove redundant braces.

* gst/gstpad.c: (gst_pad_set_caps):
Don't call setcaps function when reseting caps to NULL.

* gst/gstsystemclock.c: (gst_system_clock_dispose),
(gst_system_clock_async_thread), (gst_system_clock_id_wait_async),
(gst_system_clock_id_unschedule):
Use BROADCAST as this is what we do.
2005-06-29 11:10:44 +00:00
Wim Taymans a34bc0bd60 gst/base/gstbasesink.c: We are actually prerolling before commiting the state change.
Original commit message from CVS:
* gst/base/gstbasesink.c: (gst_base_sink_handle_object):
We are actually prerolling before commiting the state
change.
2005-06-29 10:24:08 +00:00
Thomas Vander Stichele f0e5bb0a33 did s/bases(rc/ink)_/base_s(rc/ink)_/; wim wants to remove base completely, but that's for later
Original commit message from CVS:
did s/bases(rc/ink)_/base_s(rc/ink)_/; wim wants to remove base completely, but that's for later
2005-06-28 12:01:49 +00:00
Wim Taymans de3be844ec gst/: The deprecated pad loop function is removed now.
Original commit message from CVS:
* gst/base/gstbasesink.c: (gst_basesink_set_pad_functions),
(gst_basesink_preroll_queue_flush):
* gst/base/gstbasesrc.c: (gst_basesrc_set_dataflow_funcs):
* gst/elements/gsttee.c: (gst_tee_update_pad_functions):
* gst/gstghostpad.c: (gst_proxy_pad_do_bufferalloc),
(gst_proxy_pad_do_acceptcaps), (gst_proxy_pad_do_fixatecaps),
(gst_proxy_pad_set_property):
* gst/gstpad.c:
* gst/gstpad.h:
* gst/gstqueue.c: (gst_queue_init):
The deprecated pad loop function is removed now.
2005-06-28 11:36:43 +00:00
Wim Taymans 7dc174d140 gst/base/gstbasesink.c: Flushing the preroll queue always needs to unlock the waiters.
Original commit message from CVS:
* gst/base/gstbasesink.c: (gst_basesink_preroll_queue_flush),
(gst_basesink_event), (gst_basesink_deactivate):
Flushing the preroll queue always needs to unlock the waiters.
2005-06-28 11:02:18 +00:00
Andy Wingo f2cf753b17 gst/base/gsttypefindhelper.c (gst_type_find_helper): Unref any remaining buffer.
Original commit message from CVS:
2005-06-27  Andy Wingo  <wingo@pobox.com>

* gst/base/gsttypefindhelper.c (gst_type_find_helper): Unref any
remaining buffer.

* gst/gsttrace.c (gst_alloc_trace_list_sorted): New helper,
returns a sorted copy of the trace list.
(gst_alloc_trace_print_live): New API, only prints traces with
live objects. Sort the list.
(gst_alloc_trace_print_all): Sort the list.
(gst_alloc_trace_print): Align columns.

* gst/elements/gstttypefindelement.c:
* gst/elements/gsttee.c:
* gst/base/gstbasesrc.c:
* gst/base/gstbasesink.c:
* gst/base/gstbasetransform.c:
* gst/gstqueue.c: Adapt for pad activation changes.

* gst/gstpipeline.c (gst_pipeline_init): Unref after parenting
sched.
(gst_pipeline_dispose): Drop ref on sched.

* gst/gstpad.c (gst_pad_init): Set the default activate func.
(gst_pad_activate_default): Push mode by default.
(pre_activate_switch, post_activate_switch): New stubs, things to
do before and after switching activation modes on pads.
(gst_pad_set_active): Take a boolean and not a mode, dispatch to
the pad's activate function to choose which mode to activate.
Shortcut on deactivation and call the right function directly.
(gst_pad_activate_pull): New API, (de)activates a pad in pull
mode.
(gst_pad_activate_push): New API, same for push mode.
(gst_pad_set_activate_function)
(gst_pad_set_activatepull_function)
(gst_pad_set_activatepush_function): Setters for new API.

* gst/gstminiobject.c (gst_mini_object_new, gst_mini_object_free):
Trace all miniobjects.
(gst_mini_object_make_writable): Unref the arg if we copy, like
gst_caps_make_writable.

* gst/gstmessage.c (_gst_message_initialize): No trace init.

* gst/gstghostpad.c (gst_proxy_pad_do_activate)
(gst_proxy_pad_do_activatepull, gst_proxy_pad_do_activatepush):
Adapt for new pad API.

* gst/gstevent.c (_gst_event_initialize): Don't initialize trace.

* gst/gstelement.h:
* gst/gstelement.c (gst_element_iterate_src_pads)
(gst_element_iterate_sink_pads): New API functions.

* gst/gstelement.c (iterator_fold_with_resync): New utility,
should fold into gstiterator.c in some form.
(gst_element_pads_activate): Simplified via use of fold and
delegation of decisions to gstpad->activate.

* gst/gstbus.c (gst_bus_source_finalize): Set the bus to NULL,
help in debugging.

* gst/gstbuffer.c (_gst_buffer_initialize): Ref the buffer type
class once in init, like gstmessage. Didn't run into this issue
but it seems correct. Don't initialize a trace, gstminiobject does
that.

* check/pipelines/simple_launch_lines.c (test_stop_from_app): New
test, runs fakesrc ! fakesink, stopping on ::handoff via a message
to the bus.
(assert_live_count): New util function, uses alloc traces to check
cleanup.

* check/gst/gstghostpad.c (test_ghost_pads): More refcount checks.
To be modified when unlink drops the internal pad.
2005-06-27 18:35:05 +00:00
Thomas Vander Stichele 0b44c713a7 adding basetransform and iterator docs
Original commit message from CVS:
adding basetransform and iterator docs
2005-06-27 14:40:09 +00:00
Thomas Vander Stichele 012d4ec9de more doc and whitespace fixes
Original commit message from CVS:
more doc and whitespace fixes
2005-06-27 08:16:51 +00:00
Wim Taymans 97194517fe gst/: Right, two problems here: ghostpads don't take locks and glib _rec_mutex_lock_full() with depth==0 still locks.
Original commit message from CVS:
* gst/base/gstbasesink.c: (gst_basesink_preroll_queue_empty),
(gst_basesink_handle_object), (gst_basesink_event),
(gst_basesink_do_sync), (gst_basesink_handle_event),
(gst_basesink_change_state):
* gst/gsttask.h:
Right, two problems here: ghostpads don't take locks and
glib _rec_mutex_lock_full() with depth==0 still locks.
Catch illegal locking and g_warn them.
2005-06-25 19:37:59 +00:00
Wim Taymans 613dc3d631 gst/: Unlock STREAM_LOCK whatever the recursion was.
Original commit message from CVS:
* gst/base/gstbasesink.c: (gst_basesink_preroll_queue_empty),
(gst_basesink_handle_object), (gst_basesink_event),
(gst_basesink_do_sync), (gst_basesink_handle_event),
(gst_basesink_change_state):
* gst/gstpad.h:
Unlock STREAM_LOCK whatever the recursion was.
2005-06-25 19:09:28 +00:00
Wim Taymans 8303454db7 gst/base/gstbasesink.c: Reworked the base sink, handle event and buffer serialisation correctly and removed possible ...
Original commit message from CVS:
* gst/base/gstbasesink.c: (gst_basesink_set_property),
(gst_basesink_preroll_queue_empty),
(gst_basesink_preroll_queue_flush), (gst_basesink_handle_object),
(gst_basesink_event), (gst_basesink_do_sync),
(gst_basesink_handle_event), (gst_basesink_handle_buffer),
(gst_basesink_chain), (gst_basesink_loop), (gst_basesink_activate),
(gst_basesink_change_state):
Reworked the base sink, handle event and buffer serialisation
correctly and removed possible deadlock.
Handle EOS correctly.
2005-06-25 17:54:58 +00:00
Thomas Vander Stichele 87d6d3143b start pulling in base classes and elements for docs
Original commit message from CVS:
start pulling in base classes and elements for docs
2005-06-24 18:16:14 +00:00
Andy Wingo 09ab1d8fb2 gst/base/gstbasesrc.c (gst_basesrc_get_range): Check if the offset is greater than the file's size.
Original commit message from CVS:
2005-06-23  Andy Wingo  <wingo@pobox.com>

* gst/base/gstbasesrc.c (gst_basesrc_get_range): Check if the
offset is greater than the file's size.
2005-06-23 15:26:09 +00:00
Wim Taymans 1cda8197e9 Added support for live sources and other elements that cannot do preroll.
Original commit message from CVS:
Added support for live sources and other elements that
cannot do preroll.
Updated design docs, added live-source design doc.
Implemented live source functionality in basesrc
Fix error condition in _bin_get_state()
Implement live source handling in -launch.
Added check for live sources.
Fixed case in GstBin where elements were changed state
multiple times.
2005-06-23 10:37:09 +00:00
Andy Wingo 355499790b gst/base/gstbasesink.c (gst_basesink_chain): Remove bogus assert; it's always possible that the pad gets deactivated ...
Original commit message from CVS:
2005-06-17  Andy Wingo  <wingo@pobox.com>

* gst/base/gstbasesink.c (gst_basesink_chain): Remove bogus
assert; it's always possible that the pad gets deactivated in
between the checks in gstpad.c and the implementation. Rely on
finish_preroll() to return a FLUSHING or similar instead of on the
assert.
2005-06-17 11:58:48 +00:00
Andy Wingo d47ea57975 gst/base/gstbasesink.c (gst_basesink_event): Only wait for the clock and post an EOS message if we come out of finish...
Original commit message from CVS:
2005-06-17  Andy Wingo  <wingo@pobox.com>

* gst/base/gstbasesink.c (gst_basesink_event): Only wait for the
clock and post an EOS message if we come out of finish_preroll in
the playing state.
2005-06-17 11:33:27 +00:00