Commit graph

2612 commits

Author SHA1 Message Date
Thomas Vander Stichele 4507397788 debug disable fixes
Original commit message from CVS:
debug disable fixes
2005-06-30 12:26:26 +00:00
Wim Taymans 4dd878f93b Added CHANGES-0.9 doc, updated status of other docs.
Original commit message from CVS:
* CHANGES-0.9:
* docs/design/draft-ghostpads.txt:
* docs/design/draft-push-pull.txt:
* docs/design/draft-query.txt:
* docs/design/part-TODO.txt:
* docs/design/part-query.txt:
Added CHANGES-0.9 doc, updated status of other docs.

* gst/gstquery.h:
Remove "hmm" macro
2005-06-30 12:18:19 +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
Andy Wingo 6da6bc4530 gst/gstghostpad.c (gst_ghost_pad_do_activate_push): Proxy activate_push down to the internal pad as well.
Original commit message from CVS:
2005-06-30  Andy Wingo  <wingo@pobox.com>

* gst/gstghostpad.c (gst_ghost_pad_do_activate_push): Proxy
activate_push down to the internal pad as well.
2005-06-30 11:39:34 +00:00
Ronald S. Bultje 6c8dc39ee4 gst/gsttaginterface.c: Some documentation fixes (#307394 and #307397).
Original commit message from CVS:
Reviewed by:  Ronald S. Bultje  <rbultje@ronald.bitfreak.net>
* gst/gsttaginterface.c:
Some documentation fixes (#307394 and #307397).
2005-06-30 10:59:34 +00:00
Ronald S. Bultje f05cd57bf2 gst/gstvalue.c: Fix memleak (#309125).
Original commit message from CVS:
Reviewed by:  Ronald S. Bultje  <rbultje@ronald.bitfreak.net>
* gst/gstvalue.c: (gst_value_intersect_list):
Fix memleak (#309125).
2005-06-30 10:10:00 +00:00
Wim Taymans a578cfd009 gst/gstbin.c: Lame attempt at making the state change function a bit more readable.
Original commit message from CVS:
* gst/gstbin.c: (clear_queue), (remove_all_from_queue),
(gst_bin_change_state):
Lame attempt at making the state change function a bit
more readable.
2005-06-30 09:41:15 +00:00
Wim Taymans 092745b46d gst/: Removed atomic operations, use existing LOCK.
Original commit message from CVS:
* gst/gstpad.c: (_gst_do_pass_data_accumulator),
(default_have_data), (gst_pad_class_init), (gst_pad_init),
(gst_pad_emit_have_data_signal), (gst_pad_chain), (gst_pad_push),
(gst_pad_check_pull_range), (gst_pad_get_range),
(gst_pad_pull_range), (gst_pad_push_event), (gst_pad_send_event):
* gst/gstpad.h:
* gst/gstutils.c: (gst_atomic_int_set), (gst_pad_add_data_probe),
(gst_pad_add_event_probe), (gst_pad_add_buffer_probe),
(gst_pad_remove_data_probe), (gst_pad_remove_event_probe),
(gst_pad_remove_buffer_probe):
Removed atomic operations, use existing LOCK.
Move exception handling out of main code path.
2005-06-30 09:23:54 +00:00
Ronald S. Bultje a220106c57 gst/gstpad.c: Fix accumulator, add default value by using _emitv() instead of _emit() for signal emission.
Original commit message from CVS:
* gst/gstpad.c: (_gst_do_pass_data_accumulator),
(silly_return_true_function), (gst_pad_class_init),
(gst_pad_emit_have_data_signal), (gst_pad_chain), (gst_pad_push),
(gst_pad_get_range), (gst_pad_pull_range), (gst_pad_push_event),
(gst_pad_send_event):
Fix accumulator, add default value by using _emitv() instead
of _emit() for signal emission.
2005-06-29 19:20:07 +00:00
Ronald S. Bultje af3acddad9 Add probe example.
Original commit message from CVS:
* docs/manual/advanced-dataaccess.xml:
* examples/manual/Makefile.am:
Add probe example.
* gst/gstpad.c: (_gst_do_pass_data_accumulator):
Make work (??).
2005-06-29 16:57:59 +00:00
Thomas Vander Stichele faf3c9d652 fix for ppc, hopefully
Original commit message from CVS:
fix for ppc, hopefully
2005-06-29 16:45:58 +00:00
Tim-Philipp Müller 38565eafdb gst/elements/gstfilesink.c: Simplify code so that we don't have to handle short writes and return GST_FLOW_ERROR if a...
Original commit message from CVS:
* gst/elements/gstfilesink.c: (gst_filesink_render):
Simplify code so that we don't have to handle short
writes and return GST_FLOW_ERROR if an error occured.
2005-06-29 16:11:12 +00:00
Ronald S. Bultje d13478b357 Remove old probes, add new g-signal-based probes and some utility functions.
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* docs/gst/tmpl/gstpad.sgml:
* docs/gst/tmpl/gstprobe.sgml:
* gst/Makefile.am:
* gst/gstpad.c: (_gst_do_pass_data_accumulator),
(gst_pad_class_init), (gst_pad_init), (gst_pad_chain),
(gst_pad_push), (gst_pad_get_range), (gst_pad_pull_range),
(gst_pad_push_event), (gst_pad_send_event):
* gst/gstpad.h:
* gst/gstutils.c: (gst_pad_add_data_probe),
(gst_pad_add_event_probe), (gst_pad_add_buffer_probe),
(gst_pad_remove_data_probe), (gst_pad_remove_event_probe),
(gst_pad_remove_buffer_probe):
* gst/gstutils.h:
Remove old probes, add new g-signal-based probes and some utility
functions.
2005-06-29 15:51:25 +00:00
Edward Hervey 6aa149a930 gst/: Moved gst_element_factory_can_[sink|src]_caps() to gstutils and added the definition to the header file.
Original commit message from CVS:
* gst/gstelementfactory.c:
* gst/gstutils.h:
* gst/gstutils.c:
Moved gst_element_factory_can_[sink|src]_caps() to gstutils and added
the definition to the header file.
2005-06-29 15:17:25 +00:00
Thomas Vander Stichele 80717cb5d1 logic was reversed, duh
Original commit message from CVS:
logic was reversed, duh
2005-06-29 12:40:39 +00:00
Thomas Vander Stichele a30e9069d1 add A GST_PLUGIN_PATH_ONLY env var; if it is set, it will only scan the GST_PLUGIN_PATH locations, and not add system...
Original commit message from CVS:

* check/Makefile.am:
* gst/gst.c: (add_path_func), (init_pre):
* gst/gstregistry.c: (gst_registry_add_path):
add A GST_PLUGIN_PATH_ONLY env var; if it is set, it will
only scan the GST_PLUGIN_PATH locations, and not add
system locations
2005-06-29 12:25:05 +00:00
Thomas Vander Stichele bd728f0b2c doc fixes
Original commit message from CVS:
doc fixes
2005-06-29 12:23:35 +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
Wim Taymans bd72354e9a gst/gstbus.c: Add debugging messages.
Original commit message from CVS:
* gst/gstbus.c: (gst_bus_post), (gst_bus_have_pending),
(gst_bus_set_flushing), (gst_bus_pop), (gst_bus_peek),
(gst_bus_source_dispatch):
Add debugging messages.
Make internal methods static.
Handle the case where the bus is flushed in the handler.

* gst/gstelement.c: (gst_element_get_bus):
Fix refcount in _get_bus();

* gst/gstpipeline.c: (gst_pipeline_change_state),
(gst_pipeline_get_clock_func):
Clock refcounting fixes.
Handle the case where preroll timed out more gracefully.

* gst/gstsystemclock.c: (gst_system_clock_dispose):
Clean up the internal thread in dispose. This is needed
for subclasses that actually get disposed.

* gst/schedulers/threadscheduler.c:
(gst_thread_scheduler_class_init), (gst_thread_scheduler_func),
(gst_thread_scheduler_dispose):
Free thread pool in dispose.
2005-06-28 19:45:26 +00:00
Wim Taymans d0616cd459 gst/gstghostpad.c: Correctly proxy the check_pull_range function.
Original commit message from CVS:
* gst/gstghostpad.c: (gst_proxy_pad_do_bufferalloc),
(gst_proxy_pad_do_checkgetrange), (gst_proxy_pad_do_acceptcaps),
(gst_proxy_pad_do_fixatecaps):
Correctly proxy the check_pull_range function.
2005-06-28 13:40:12 +00:00
Thomas Vander Stichele e65ae0c3c8 fix fake elements too
Original commit message from CVS:
fix fake elements too
2005-06-28 12:45:21 +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
Edward Hervey 2e75d2ae7e gst/gstpipeline.c: Wheen a seek was successful on a pipeline, set the stream_time to the seek offset in order to have...
Original commit message from CVS:
* gst/gstpipeline.c: (gst_pipeline_send_event):
Wheen a seek was successful on a pipeline, set the stream_time to the
seek offset in order to have a synchronized stream_time.
2005-06-28 10:45:48 +00:00
Wim Taymans 57d529de3a gst/gstghostpad.c: Call wrapper function instead of just calling the function pointers. This takes care of any lockin...
Original commit message from CVS:
* gst/gstghostpad.c: (gst_proxy_pad_do_bufferalloc),
(gst_proxy_pad_do_getrange), (gst_proxy_pad_do_checkgetrange),
(gst_proxy_pad_do_getcaps), (gst_proxy_pad_do_acceptcaps),
(gst_proxy_pad_do_fixatecaps):
Call wrapper function instead of just calling the function
pointers. This takes care of any locking and whatmore.
2005-06-28 10:37:24 +00:00
Wim Taymans 9a6500143f gst/gstpad.*: CONNECTED -> LINKED.
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_alloc_buffer), (gst_pad_push),
(gst_pad_pull_range):
* gst/gstpad.h:
CONNECTED -> LINKED.
2005-06-28 10:28:31 +00:00
Andy Wingo f8e79bdf86 *.c: Don't cast to GST_OBJECT when reffing or unreffing. Large source-munging commit!!!
Original commit message from CVS:
2005-06-28  Andy Wingo  <wingo@pobox.com>

* *.c: Don't cast to GST_OBJECT when reffing or unreffing. Large
source-munging commit!!!
2005-06-28 09:59:01 +00:00
Andy Wingo 5016035bc6 gst/gstobject.c (gst_object_unref, gst_object_ref)
Original commit message from CVS:
2005-06-28  Andy Wingo  <wingo@pobox.com>

* gst/gstobject.c (gst_object_unref, gst_object_ref)
(gst_object_sink): Take gpointer arguments, not GstObject --
avoids casts. Like GLib.
2005-06-28 09:17:14 +00:00
Andy Wingo 1b02b1d741 gst/gstghostpad.c (gst_proxy_pad_do_activate): Don't proxy activate.
Original commit message from CVS:
2005-06-28  Andy Wingo  <wingo@pobox.com>

* gst/gstghostpad.c (gst_proxy_pad_do_activate): Don't proxy
activate.
2005-06-28 08:41:43 +00:00
Andy Wingo 7fda2039b3 shut up gcc3
Original commit message from CVS:
shut up gcc3
2005-06-27 18:39:41 +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
Wim Taymans adbd17c378 gst/gstbin.c: Cleanup the get_state() function a little, make sure it iterates the same set of elements.
Original commit message from CVS:
* gst/gstbin.c: (gst_bin_get_state), (gst_bin_iterate_state_order),
(gst_bin_change_state):
Cleanup the get_state() function a little, make sure it
iterates the same set of elements.
Added stub iterate_state_order().
2005-06-27 18:11:24 +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 2d63826a90 gst/gstghostpad.c: At least get the chain function correct, needs more fixing.
Original commit message from CVS:
* gst/gstghostpad.c: (gst_proxy_pad_do_chain):
At least get the chain function correct, needs more
fixing.
2005-06-25 19:53:02 +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
Wim Taymans 4e9438da9f Allow elements to post EOS in the state change function.
Original commit message from CVS:
* gst/gstpipeline.c: (is_eos), (pipeline_bus_handler),
(gst_pipeline_change_state):
* tools/gst-launch.c: (check_intr), (event_loop), (main):
Allow elements to post EOS in the state change function.
Fix up -launch, make it exit the poll loop when the
pipeline actually changed state.
Fix up warning parsing in -launch.
2005-06-25 17:51:12 +00:00
Wim Taymans f4f2cadeb5 gst/elements/gsttee.c: Core takes STREAM_LOCK for us now.
Original commit message from CVS:
* gst/elements/gsttee.c: (gst_tee_chain), (gst_tee_loop),
(gst_tee_sink_activate):
Core takes STREAM_LOCK for us now.
2005-06-25 17:44:39 +00:00
Wim Taymans 2169b1a5d8 gst/: Keep track of current target state while performing a state change so that subclasses can do something interest...
Original commit message from CVS:
* gst/gstelement.c: (gst_element_get_state_func),
(gst_element_set_state):
* gst/gstelement.h:
* gst/gstmessage.c: (gst_message_parse_error),
(gst_message_parse_warning):
Keep track of current target state while performing a state
change so that subclasses can do something interesting.
Fix parsing of warning/error messages when GError is NULL.
2005-06-25 17:42:17 +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
Wim Taymans 52a445a41d gst/gstelement.c: When the state did not change, also report NO_PREROLL when it matters.
Original commit message from CVS:
* gst/gstelement.c: (gst_element_get_state_func),
(gst_element_set_state), (gst_element_change_state):
When the state did not change, also report NO_PREROLL
when it matters.
2005-06-23 17:11:49 +00:00
Wim Taymans d56ab76d57 gst/: No unsafe task pausing please.
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_event_default):
* gst/gstqueue.c: (gst_queue_loop):
No unsafe task pausing please.
2005-06-23 17:09:21 +00:00
Wim Taymans 830a0368b4 gst/schedulers/threadscheduler.c: Ref the task before pushing it on the threadpool. This makes sure that we have a re...
Original commit message from CVS:
* gst/schedulers/threadscheduler.c:
(gst_thread_scheduler_task_start),
(gst_thread_scheduler_task_pause), (gst_thread_scheduler_func):
Ref the task before pushing it on the threadpool. This
makes sure that we have a ref when the threadfunction is
actually called.
2005-06-23 17:07:08 +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
Andy Wingo cc2d216e88 gst/gstobject.h (GST_CLASS_LOCK, GST_CLASS_TRYLOCK) (GST_CLASS_UNLOCK, GST_CLASS_GET_LOCK, GstObjectClass)
Original commit message from CVS:
2005-06-23  Andy Wingo  <wingo@pobox.com>

* gst/gstobject.h (GST_CLASS_LOCK, GST_CLASS_TRYLOCK)
(GST_CLASS_UNLOCK, GST_CLASS_GET_LOCK, GstObjectClass)
* gst/gstobject.c (gst_object_class_init): Make the class lock
recursive. Wim won't let me drop deep_notify. Decodebin works
again, whoopdy doo.
2005-06-23 15:04:48 +00:00
Andy Wingo 57bfdb30e4 gst/gstghostpad.c (on_int_notify): Catches notify::caps on the internal pad, and hacks accordingly. Doesn't do it on ...
Original commit message from CVS:
2005-06-23  Andy Wingo  <wingo@pobox.com>

* gst/gstghostpad.c (on_int_notify): Catches notify::caps on the
internal pad, and hacks accordingly. Doesn't do it on the target
pad because we change its caps. Probably catches all cases of
interest tho.
(gst_ghost_pad_set_property): Connect to notify::caps as
appropritate.
2005-06-23 14:18:15 +00:00