Commit graph

542 commits

Author SHA1 Message Date
Wim Taymans 0d8a01f595 gst/gstpad.c: Correctly check flushing and emit probes. fixes #330125
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_send_event):
Correctly check flushing and emit probes. fixes #330125
2006-02-13 09:59:03 +00:00
Stefan Kost a53172d79d doc fixes, to link to function, just write gst_cool_function(), don't prefix with '#'
Original commit message from CVS:
* gst/gstcaps.c:
* gst/gstelement.c: (gst_element_send_event):
* gst/gstevent.c:
* gst/gstinfo.c:
* gst/gstiterator.c:
* gst/gstiterator.h:
* gst/gstpad.c: (gst_pad_send_event):
* gst/gststructure.c:
* gst/gsturi.c:
* gst/gstutils.c:
* gst/gstvalue.c:
* libs/gst/base/gstadapter.c:
doc fixes, to link to function, just write gst_cool_function(), don't
prefix with '#'
2006-01-27 22:34:51 +00:00
Stefan Kost b352cee4f7 added code for downstream events, reviewed docs in gstevent.c
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstbin.c: (bin_element_is_src), (src_iterator_filter),
(gst_bin_iterate_sources), (gst_bin_send_event):
* gst/gstbin.h:
* gst/gstelement.c: (gst_element_send_event):
* gst/gstevent.c:
* gst/gstpad.c: (gst_pad_send_event):
added code for downstream events, reviewed docs in gstevent.c
2006-01-26 06:57:14 +00:00
Wim Taymans ae957681a7 gst/gstpad.c: Make it actually compile too..
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_link_check_compatible_unlocked):
Make it actually compile too..
2006-01-20 09:56:38 +00:00
Wim Taymans b5b28e2e39 gst/gstcaps.c: Clarify behaviour of _is_equal() when passing NULL parameters.
Original commit message from CVS:
* gst/gstcaps.c:
Clarify behaviour of _is_equal() when passing NULL parameters.

* gst/gstpad.c: (gst_pad_link_check_compatible_unlocked),
(gst_pad_set_caps):
Cleanups. Don't unref NULL caps.
When setting the same caps, protect caps of the pad with
proper lock.
Use full functionality of _is_equal() when comparing caps.
2006-01-20 09:53:24 +00:00
Jan Schmidt bcdfacaf5d gst/gstpad.c: Don't allow activation of a srcpad in pull_range if it has no getrange function.
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_activate_pull), (gst_pad_link_prepare):
Don't allow activation of a srcpad in pull_range if it has no
getrange function.
Change some debug statements to be a little clearer

* plugins/elements/gsttypefindelement.c:
(gst_type_find_handle_src_query):
Check that we have a peer before executing queries thereupon.

* tests/examples/metadata/read-metadata.c: (message_loop):
Use gst_bus_pop instead of gst_bus_poll when we just want it to
immediately return us any available message with 0 timeout.
2005-12-14 10:09:35 +00:00
Wim Taymans 4f28ca8331 libs/gst/base/gstbasetransform.c (gst_base_transform_prepare_output_buf)
Original commit message from CVS:
2005-12-05  Andy Wingo  <wingo@pobox.com>

patch by: Wim Taymans <wim@fluendo.com>

* libs/gst/base/gstbasetransform.c
(gst_base_transform_prepare_output_buf)
(gst_base_transform_buffer_alloc):
* plugins/elements/gstqueue.c (gst_queue_bufferalloc): Call
alloc_buffer_and_set_caps.

* gst/gstpad.c (gst_pad_alloc_buffer): Changed to not call
set_caps on the source pad.
(gst_pad_alloc_buffer_and_set_caps): New function, does what
alloc_buffer used to do. Fixes #322874.

* docs/gst/gstreamer-sections.txt:
* docs/design/part-negotiation.txt:
* docs/pwg/advanced-negotiation.xml: Update for the alloc_buffer
changes.
2005-12-05 13:01:35 +00:00
Andy Wingo 3cf09efb92 gst/gstpad.c (fixate_value): Use array functions for arrays.
Original commit message from CVS:
2005-11-28  Andy Wingo  <wingo@pobox.com>

* gst/gstpad.c (fixate_value): Use array functions for arrays.
2005-11-28 10:04:45 +00:00
Wim Taymans a9f7f7b7b6 Doc fixes.
Original commit message from CVS:
Doc fixes.
2005-11-24 09:44:07 +00:00
Thomas Vander Stichele 3dfcce5a99 remove mentions of sinesrc
Original commit message from CVS:
remove mentions of sinesrc
2005-11-23 15:49:06 +00:00
Andy Wingo ef7787ed72 gst/gst.h: Include glib-compat.h.
Original commit message from CVS:
2005-11-21  Andy Wingo  <wingo@pobox.com>

* gst/gst.h: Include glib-compat.h.

* gst/glib-compat.h: Add G_GNUC_NULL_TERMINATED.

* gst/glib-compat.c: Include the public and the private header.

* gst/glib-compat-private.h: Copied here from glib-compat.h.

* gst/gstvalue.c:
* gst/gstpad.c:
* gst/gstregistryxml.c: s/glib-compat/glib-compat-private/.
2005-11-21 18:03:22 +00:00
Andy Wingo 153931fa86 check/gst/gstevent.c (create_custom_events): Check that
Original commit message from CVS:
2005-11-21  Andy Wingo  <wingo@pobox.com>

* check/gst/gstevent.c (create_custom_events): Check that
FLUSH_STOP is serialized.

* check/elements/identity.c (event_func):
* check/elements/fakesrc.c (event_func): No stream lock, the core
takes it.

* gst/base/gstbasetransform.c (gst_base_transform_event): No more
stream lock taking, yay.

* gst/gstevent.h (GST_EVENT_FLUSH_STOP): Marked as serialized to
ensure that core takes the stream lock.

* gst/base/gstbasesrc.c (gst_base_src_do_seek): Update for stream
lock name change.

* gst/base/gstbasesink.c (gst_base_sink_event): No need to take
the stream lock for EOS, NEWSEGMENT, or FLUSH_STOP, the core does
it already. For the flush start we do take it though so we get the
right preroll state change messages.

* gst/gstqueue.c (gst_queue_sink_activate_push): No need to take
the stream lock here, the core does it for us.

* gst/gstpad.h (GST_PAD_GET_STREAM_LOCK): Renamed from
GST_STREAM_GET_LOCK.
(GST_PAD_STREAM_LOCK, GST_PAD_STREAM_TRYLOCK)
(GST_PAD_STREAM_UNLOCK, GST_PAD_STREAM_UNLOCK_FULL)
(GST_PAD_STREAM_LOCK_FULL): Renamed from GST_STREAM_*.
(GST_PAD_GET_PREROLL_LOCK): Renamed from GST_PREROLL_GET_LOCK.
(GST_PAD_PREROLL_LOCK, GST_PAD_PREROLL_TRYLOCK)
(GST_PAD_PREROLL_UNLOCK): Renamed from GST_PREROLL_*.

* gst/gstpad.c: Update for stream lock name change.

* gst/base/gstbasesink.c: Update for preroll lock name change.
2005-11-21 17:21:15 +00:00
Andy Wingo 44c548b205 *.*: Ran scripts/update-macros. Oh yes. gst/gstobject.h (GST_OBJECT_GET_LOCK, GST_OBJECT_LOCK)
Original commit message from CVS:
2005-11-21  Andy Wingo  <wingo@pobox.com>

* *.h:
* *.c: Ran scripts/update-macros. Oh yes.

* gst/gstobject.h (GST_OBJECT_GET_LOCK, GST_OBJECT_LOCK)
(GST_OBJECT_TRYLOCK, GST_OBJECT_UNLOCK): Renamed from
GST_GET_LOCK, etc.

* scripts/update-macros: New script. Run it on your files to
change GST_LOCK to GST_OBJECT_LOCK, and the same for UNLOCK as
well.
2005-11-21 16:34:26 +00:00
Andy Wingo e53432c9bb gst/gstpad.c (gst_pad_send_event): Doc more. Take stream lock on behalf of event function if necessary. It should no ...
Original commit message from CVS:
2005-11-21  Andy Wingo  <wingo@pobox.com>

* gst/gstpad.c (gst_pad_send_event): Doc more. Take stream lock on
behalf of event function if necessary. It should no longer be
necessary to take the stream lock in pad's event functions. Fixes
#320299.
2005-11-21 14:34:07 +00:00
Thomas Vander Stichele 533a6eacb0 gst/gstpad.*: add gst_pad_new_from_static_template functions
Original commit message from CVS:

* gst/gstpad.c: (gst_pad_new_from_static_template):
* gst/gstpad.h:
add gst_pad_new_from_static_template functions
* gst/check/gstcheck.c: (gst_check_setup_src_pad),
(gst_check_setup_sink_pad):
* gst/elements/gsttee.c: (gst_tee_init):
and use them
2005-11-16 16:09:49 +00:00
Wim Taymans c96f128c88 gst/gstpad.c: Removed warning, it's not realy an error either.
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_pause_task):
Removed warning, it's not realy an error either.
2005-11-16 16:06:06 +00:00
Thomas Vander Stichele d5497ccd53 gst/: use gst_object_ref when setting the pad template; this will trigger the pad template leaks on GLib 2.6 and the ...
Original commit message from CVS:

* gst/glib-compat.c: (g_value_dup_gst_object):
* gst/glib-compat.h:
* gst/gstpad.c: (gst_pad_set_property):
use gst_object_ref when setting the pad template; this will
trigger the pad template leaks on GLib 2.6 and the slaves
2005-11-16 12:40:18 +00:00
Tim-Philipp Müller 57f0a5b232 gst/gstpad.c: GST_PAD_PAD_TEMPLATE(pad) gets the pad template, while
Original commit message from CVS:
Reviewed by: Tim-Philipp Müller  <tim at centricular dot net>
* gst/gstpad.c: (gst_pad_get_property):
GST_PAD_PAD_TEMPLATE(pad) gets the pad template, while
GST_PAD_TEMPLATE(pad) does a cast. We want the former here.
(#321452)
2005-11-15 19:24:46 +00:00
Andy Wingo 6da40a32f4 gst/gstpad.c (gst_pad_set_active): Change docs; parent's
Original commit message from CVS:
2005-11-14  Andy Wingo  <wingo@pobox.com>

* gst/gstpad.c (gst_pad_set_active): Change docs; parent's
STATE_LOCK not necessary. Fixes #311489.
2005-11-14 12:43:43 +00:00
Wim Taymans e39c2beaae gst/gstpad.c: While checking the flag for reentrancy in the gstcaps function is nice to detect recursive invocations,...
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_get_caps), (gst_pad_peer_get_caps):
While checking the flag for reentrancy in the gstcaps function
is nice to detect recursive invocations, it also makes it
impossible to call getcaps from multiple threads, which must be
possible. So, checking for recursive calls has to go.
2005-11-11 16:34:15 +00:00
Wim Taymans 8bf3884cbb check/gst/gstghostpad.c: Added check for bug #317341
Original commit message from CVS:
* check/gst/gstghostpad.c: (GST_START_TEST), (gst_ghost_pad_suite):
Added check for bug #317341

* gst/gstbuffer.c:
* gst/gstbuffer.h:
Some more spiffifying.

* gst/gstghostpad.c: (gst_ghost_pad_do_link):
Call peer linkfunction if we are a source pad. Totally fixes
#317341

* gst/gstpad.c:
Update docs, source pads should call the peer linkfunction
so they can atomically perform the pad link.
2005-11-10 09:19:12 +00:00
Tim-Philipp Müller fc387bfd46 gst/: Use GST_DEBUG_FUNCPTR() more extensively.
Original commit message from CVS:
* gst/base/gstcollectpads.c: (gst_collectpads_add_pad):
* gst/elements/gstfilesink.c: (gst_file_sink_init):
* gst/elements/gsttypefindelement.c: (gst_type_find_element_init):
* gst/gstghostpad.c: (gst_ghost_pad_set_internal),
(gst_ghost_pad_init), (gst_ghost_pad_new_notarget):
* gst/gstpad.c: (gst_pad_init):
Use GST_DEBUG_FUNCPTR() more extensively.
2005-11-09 17:55:13 +00:00
Wim Taymans c4abf79f02 docs/: Small docs updates.
Original commit message from CVS:
* docs/design/part-events.txt:
* docs/design/part-gstpipeline.txt:
* docs/design/part-messages.txt:
* docs/design/part-overview.txt:
* docs/design/part-seeking.txt:
* docs/design/part-states.txt:
* docs/design/part-trickmodes.txt:
* docs/manual/advanced-position.xml:
Small docs updates.

* gst/gstobject.h:
People think !! is ugly, this looks better.

* gst/gstpad.c: (gst_pad_set_blocked_async):
Remove !! since it's fixed elsewhere now.
2005-11-03 14:22:44 +00:00
Edward Hervey 7c1da7fee0 gst/gstpad.c: comparing a flag and a gboolean rarely returns coherent results...
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_set_blocked_async):
comparing a flag and a gboolean rarely returns coherent results...
Added two characters (!!) to make that work correctly.
2005-11-03 12:48:30 +00:00
Julien Moutte e4f8d3b6de gst/gstpad.c: Fix some typos.
Original commit message from CVS:
2005-11-03  Julien MOUTTE  <julien@moutte.net>

* gst/gstpad.c: (gst_pad_alloc_buffer): Fix some typos.
2005-11-03 10:56:23 +00:00
Edward Hervey 3b80a92550 gst/gstpad.c: Follow-up to Wim's patch, solves deadlock for blocked and flushing pads
Original commit message from CVS:
* gst/gstpad.c: (handle_pad_block):
Follow-up to Wim's patch, solves deadlock for blocked and flushing pads
2005-11-02 19:04:20 +00:00
Wim Taymans feca07fdd7 gst/gstpad.c: Unlock blocked pads when they are flushed.
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_alloc_buffer), (handle_pad_block),
(gst_pad_push), (gst_pad_push_event):
Unlock blocked pads when they are flushed.
2005-11-02 18:33:00 +00:00
Tim-Philipp Müller 3e5676f6a8 gst/base/gstcollectpads.c: Guard public API with assertions.
Original commit message from CVS:
* gst/base/gstcollectpads.c: (gst_collectpads_set_function),
(gst_collectpads_add_pad), (gst_collectpads_remove_pad),
(gst_collectpads_is_active), (gst_collectpads_collect),
(gst_collectpads_collect_range), (gst_collectpads_start),
(gst_collectpads_stop), (gst_collectpads_peek),
(gst_collectpads_pop), (gst_collectpads_available),
(gst_collectpads_read), (gst_collectpads_flush):
Guard public API with assertions.
* gst/gstpad.c:
Fix docs for gst_pad_set_link_function().
2005-11-02 15:08:05 +00:00
Stefan Kost 349aa7e2e6 fixing examples fixing docs typos changing log priority in error situations
Original commit message from CVS:
* examples/controller/audio-example.c: (main):
* examples/queue/queue.c: (event_loop):
* gst/base/gstbasetransform.h:
* gst/gstelement.c: (gst_element_send_event):
* gst/gstevent.h:
* gst/gstpad.c: (gst_pad_send_event):
fixing examples
fixing docs typos
changing log priority in error situations
2005-10-26 18:57:43 +00:00
Wim Taymans df2df58966 gst/: Another 1% more coverage.
Original commit message from CVS:
* gst/gstbuffer.h:
* gst/gstpad.c:
* gst/gstparse.c:
Another 1% more coverage.
2005-10-20 20:46:17 +00:00
Thomas Vander Stichele 8f79484b52 log an if branch
Original commit message from CVS:
log an if branch
2005-10-19 11:42:39 +00:00
Julien Moutte c1e4762a6d gst/gstcaps.c: Fix a bad bug with a simple fix. Because of unsigned ints, caps intersection was going nuts and trying...
Original commit message from CVS:
2005-10-16  Julien MOUTTE  <julien@moutte.net>

* gst/gstcaps.c: (gst_caps_intersect): Fix a bad bug with a
simple
fix. Because of unsigned ints, caps intersection was going nuts
and
trying to access structures with G_MAXUINT index. That fixes
videotestsrc ! ffmpegcolorspace ! fakesink
* gst/gstpad.c: (gst_pad_link_check_compatible_unlocked): logs
consistency.
2005-10-16 09:56:33 +00:00
Thomas Vander Stichele 2ca1c89aac gst/gst.*: remove _gst_registry_auto_load, not used anymore
Original commit message from CVS:

* gst/gst.c:
* gst/gst.h:
remove _gst_registry_auto_load, not used anymore
* gst/gstbin.c: (gst_bin_get_type):
* gst/gstbin.h:
* gst/gstelement.c: (gst_element_get_type):
* gst/gstelement.h:
* gst/gstobject.c: (gst_object_get_type):
* gst/gstobject.h:
* gst/gstpad.c: (gst_pad_get_type):
* gst/gstpad.h:
make _get_type functions similar, fixes data export from library
2005-10-15 16:33:09 +00:00
Thomas Vander Stichele bef56ce78d various style fixes
Original commit message from CVS:
various style fixes
2005-10-15 16:01:57 +00:00
Thomas Vander Stichele 2dd1598c56 whitespace fixes
Original commit message from CVS:
whitespace fixes
2005-10-15 15:30:24 +00:00
Thomas Vander Stichele 9ffd425b5d signedness fixes
Original commit message from CVS:
signedness fixes
2005-10-15 00:15:43 +00:00
Thomas Vander Stichele ef8b2e27ec include header correctly; show me the name
Original commit message from CVS:
include header correctly; show me the name
2005-10-13 17:20:44 +00:00
Stefan Kost a98aef82db renamed GST_FLAGS macros to GST_OBJECT_FLAGS moved bitshift from macro to enum definition
Original commit message from CVS:
* check/gst/gstbin.c: (GST_START_TEST):
* docs/gst/gstreamer-sections.txt:
* gst/base/gstbasesink.c: (gst_base_sink_init):
* gst/base/gstbasesrc.c: (gst_base_src_init),
(gst_base_src_get_range), (gst_base_src_check_get_range),
(gst_base_src_start), (gst_base_src_stop):
* gst/base/gstbasesrc.h:
* gst/elements/gstfakesrc.c: (gst_fake_src_set_property):
* gst/gstbin.c: (gst_bin_add_func), (gst_bin_remove_func),
(bin_element_is_sink), (reset_degree), (gst_bin_element_set_state),
(bin_bus_handler):
* gst/gstbin.h:
* gst/gstbuffer.h:
* gst/gstbus.c: (gst_bus_post), (gst_bus_set_flushing):
* gst/gstbus.h:
* gst/gstelement.c: (gst_element_is_locked_state),
(gst_element_set_locked_state), (gst_element_commit_state),
(gst_element_set_state):
* gst/gstelement.h:
* gst/gstindex.c: (gst_index_init):
* gst/gstindex.h:
* gst/gstminiobject.h:
* gst/gstobject.c: (gst_object_init), (gst_object_sink),
(gst_object_set_parent):
* gst/gstobject.h:
* gst/gstpad.c: (gst_pad_set_blocked_async), (gst_pad_is_blocked),
(gst_pad_get_caps_unlocked), (gst_pad_set_caps):
* gst/gstpad.h:
* gst/gstpadtemplate.h:
* gst/gstpipeline.c: (gst_pipeline_provide_clock_func),
(gst_pipeline_use_clock), (gst_pipeline_auto_clock):
* gst/gstpipeline.h:
* gst/indexers/gstfileindex.c: (gst_file_index_load),
(gst_file_index_commit):
* testsuite/bytestream/filepadsink.c: (gst_fp_sink_init):
* testsuite/pad/link.c: (gst_test_src_init),
(gst_test_filter_init), (gst_test_sink_init):
* testsuite/states/locked.c: (main):
renamed GST_FLAGS macros to GST_OBJECT_FLAGS
moved bitshift from macro to enum definition
2005-10-12 14:28:39 +00:00
Andy Wingo c3cc492c7e gst/gstpad.c (gst_pad_pause_task): Actually return FALSE if there is no task. Shouldn't affect any code, as nothing i...
Original commit message from CVS:
2005-10-12  Andy Wingo  <wingo@pobox.com>

* gst/gstpad.c (gst_pad_pause_task): Actually return FALSE if
there is no task. Shouldn't affect any code, as nothing in our
plugins checks this return value.
(gst_pad_stop_task): Also take the stream lock if the pad has no
task. Docs updated.
2005-10-12 11:49:35 +00:00
Wim Taymans e11ddea888 gst/gstpad.c: Cleanup activation code. Reset old state if activation failed.
Original commit message from CVS:
* gst/gstpad.c: (pre_activate), (post_activate),
(gst_pad_activate_pull), (gst_pad_activate_push):
Cleanup activation code. Reset old state if
activation failed.
2005-10-12 10:05:36 +00:00
Andy Wingo 3ef37179a1 gst/gstpad.c (pre_activate): Renamed from pre_activate_switch, take the mode we're going to as an arg. Go head and se...
Original commit message from CVS:
2005-10-11  Andy Wingo  <wingo@pobox.com>

* gst/gstpad.c (pre_activate): Renamed from pre_activate_switch,
take the mode we're going to as an arg. Go head and set the mode
and flushing flags now, so that if the activate function starts a
thread all the flags will be in the right state.
(post_activate): Renamed also. Just handle making sure streaming
finishes for the deactivation case, and setting the deactivated
mode.
(gst_pad_set_active): Complain loudly if deactivation fails.
(gst_pad_activate_pull): Adapt to pre/post_activate changes.
(gst_pad_activate_push): Adapt to pre/post_activate changes,
remove the terrible hack.
2005-10-11 15:23:10 +00:00
Wim Taymans fd1a66e8b5 docs/design/part-states.txt: Some more docs.
Original commit message from CVS:
* docs/design/part-states.txt:
Some more docs.

* gst/gstbin.c: (gst_bin_set_clock_func), (gst_bin_recalc_state),
(gst_bin_change_state_func), (bin_bus_handler):
Doc updates. Don't distribute the same clock over and over again.

* gst/gstclock.c:
* gst/gstclock.h:
Doc updates.

* gst/gstpad.c: (gst_flow_get_name), (gst_flow_to_quark),
(gst_pad_get_type), (gst_pad_push), (gst_pad_push_event),
(gst_pad_send_event):
* gst/gstpad.h:
Make probe emission threadsafe again.
Register quarks and move _get_name() from utils.
Doc updates.

* gst/gstpipeline.c: (gst_pipeline_class_init),
(gst_pipeline_change_state), (gst_pipeline_provide_clock_func):
Only redistribute the clock of it changed.

* gst/gstsystemclock.h:
Doc updates.

* gst/gstutils.c:
* gst/gstutils.h:
Moved the _flow_get_name() to GstPad.
2005-10-11 11:08:52 +00:00
Stefan Kost f9c812c51c more docs, fix compilation
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstevent.c:
* gst/gstevent.h:
* gst/gstinfo.c:
* gst/gstinfo.h:
* gst/gstmessage.c: (gst_message_parse_state_changed):
* gst/gstpad.c:
* gst/gstpad.h:
more docs, fix compilation
2005-10-09 20:49:46 +00:00
Thomas Vander Stichele 68e6852e0e gst/gstpad.c: give events a chance to be handled by event probes when the pad is not linked
Original commit message from CVS:

* gst/gstpad.c: (gst_pad_event_default_dispatch):
give events a chance to be handled by event probes when the pad
is not linked
2005-10-06 14:01:44 +00:00
Thomas Vander Stichele 6eb5fb3112 doc updates
Original commit message from CVS:
doc updates
2005-10-05 22:35:14 +00:00
Thomas Vander Stichele 06c7f2231b gst/gstpad.c: emit have-data before checking for peers. This allows for probe handlers to connect elements. This he...
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_push), (gst_pad_push_event):
emit have-data before checking for peers.  This allows
for probe handlers to connect elements.  This helps autopluggers.
* check/gst/gstpad.c: (GST_START_TEST), (_probe_handler),
(gst_pad_suite):
add six checks, linked/unlinked with no/true/false probe
2005-10-05 16:16:58 +00:00
Andy Wingo 60f3c2b541 gst/gstpad.c (gst_pad_activate_push): There is a race condition whereby calling a pad's activatepush() function can s...
Original commit message from CVS:
2005-10-03  Andy Wingo  <wingo@pobox.com>

* gst/gstpad.c (gst_pad_activate_push): There is a race condition
whereby calling a pad's activatepush() function can start a thread
that starts to push or pull before the pad gets the FLUSHING flag
unset. Hack around it by holding the stream lock until the flag is
set. Need to replace this with a proper solution. Together with
the ghost pad fixes, this fixes mp3 playing/tagreading.
2005-10-02 23:24:25 +00:00
Wim Taymans 2d3e9f6438 gst/base/gstbasesink.c: Only error is an error.
Original commit message from CVS:
* gst/base/gstbasesink.c: (gst_base_sink_change_state):
Only error is an error.

* gst/gstbin.c: (gst_bin_change_state):
Better debugging.

* gst/gstpad.c: (gst_pad_alloc_buffer), (gst_pad_chain):
Also call pad_block in pad alloc.

* gst/gstutils.c: (gst_flow_get_name):
Better debugging.
2005-09-30 08:00:12 +00:00
Wim Taymans cacb844d6f gst/gstbin.c: Some documentation updates.
Original commit message from CVS:
* gst/gstbin.c: (add_to_queue), (clear_queue), (reset_outdegree),
(update_outdegree), (find_element), (gst_bin_sort_iterator_next),
(gst_bin_sort_iterator_resync), (gst_bin_sort_iterator_free),
(gst_bin_iterate_sorted), (gst_bin_element_set_state),
(gst_bin_change_state), (gst_bin_dispose):
Some documentation updates.
Clean up dispose handlers.

* gst/gstobject.c: (gst_object_ref), (gst_object_unref):
* gst/gstpad.c: (gst_pad_dispose):
Clean up dispose handler.

* gst/gstpipeline.c: (gst_pipeline_change_state):
Removed spurious UNLOCK.
2005-09-28 11:03:58 +00:00
Wim Taymans e32e0a17ed gst/gstbin.c: Make state change function use 3 queues again, we were adding elements in the wrong order.
Original commit message from CVS:
* gst/gstbin.c: (gst_bin_change_state):
Make state change function use 3 queues again, we were
adding elements in the wrong order.

* gst/gstghostpad.c: (gst_ghost_pad_do_unlink):
Some debug info,

* gst/gstpad.c: (gst_pad_dispose):
Added some debug info first.
2005-09-26 17:46:27 +00:00
Stefan Kost 41aca72772 inlined two more docs factored gstpadtemplate out of gstpad
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* docs/gst/tmpl/.cvsignore:
* docs/gst/tmpl/gstpad.sgml:
* docs/gst/tmpl/gstpadtemplate.sgml:
* gst/Makefile.am:
* gst/gstpad.c: (gst_pad_class_init), (gst_pad_dispose),
(gst_pad_finalize), (gst_pad_set_pad_template):
* gst/gstpad.h:
* gst/gstpadtemplate.c: (gst_pad_template_get_type),
(gst_pad_template_class_init), (gst_pad_template_init),
(gst_pad_template_dispose), (name_is_valid),
(gst_static_pad_template_get), (gst_pad_template_new),
(gst_static_pad_template_get_caps), (gst_pad_template_get_caps),
(gst_pad_template_pad_created):
* gst/gstpadtemplate.h:
inlined two more docs
factored gstpadtemplate out of gstpad
2005-09-25 11:19:22 +00:00
Thomas Vander Stichele 446ddc915f common/gtk-doc.mak: don't fail on building XML, FC4 slave shows a bunch of doc missing bits that I don't get
Original commit message from CVS:

* common/gtk-doc.mak:
don't fail on building XML, FC4 slave shows a bunch of doc
missing bits that I don't get
* gst/gstpad.c:
* gst/gstpipeline.c:
* gst/gststructure.c:
some doc updates
2005-09-23 18:08:59 +00:00
Thomas Vander Stichele 3f519e30e9 various doc updates
Original commit message from CVS:

* docs/README:
* gst/gstpad.c: (gst_pad_class_init), (gst_pad_chain):
* gst/gstpluginfeature.c:
* gst/gstutils.c:
various doc updates
* gst/base/gstbasesink.c: (gst_base_sink_handle_object):
change an assert into an error until it gets fixed properly
2005-09-23 15:36:28 +00:00
Andy Wingo 5b77a67125 check/gst/gstutils.c: New file.
Original commit message from CVS:
2005-09-21  Andy Wingo  <wingo@pobox.com>

* check/gst/gstutils.c: New file.
(test_buffer_probe_n_times): A simple buffer probe test. More to
come, foolios.

* gst/gstutils.c (gst_pad_add_buffer_probe): Connect to
have-data::buffer, not have-data.
(gst_pad_add_event_probe): Likewise for have-data::event.
(gst_pad_add_data_probe): More docs. The part about 'resolving the
peer' isn't quite right yet though.
(gst_pad_remove_buffer_probe, gst_pad_remove_event_probe)
(gst_pad_remove_data_probe): Change to take the guint handler_id
as their arg, not the function+data, which is more glib-like.

* gst/gstpad.c (gst_pad_emit_have_data_signal): Add a detail to
the signal emission to indicate if the data is a buffer or an
event.
(gst_pad_get_type): Initialize buffer and event quarks.
(gst_pad_class_init): have-data is now a detailed signal, yes it
is.
2005-09-21 12:21:10 +00:00
Thomas Vander Stichele 9cc64e4bec check/gst/gstpad.c: add tests for valid pad naming
Original commit message from CVS:

* check/gst/gstpad.c: (GST_START_TEST), (name_is_valid),
(gst_pad_suite):
add tests for valid pad naming
* gst/check/gstcheck.c: (gst_check_log_message_func),
(gst_check_log_critical_func):
add ASSERT_WARNING
remove printing of code, it is fragile when the code contains
% and the line number is enough info
* gst/check/gstcheck.h:
* gst/gstpad.c: (gst_pad_template_new):
fix memleaks
2005-09-09 14:34:43 +00:00
Jan Schmidt 9f96921e90 gst/gstpad.c: Catch misbehaving pad_alloc functions that don't set up caps and do it for them.
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_alloc_buffer):
Catch misbehaving pad_alloc functions that don't
set up caps and do it for them.
2005-09-06 22:57:05 +00:00
Tim-Philipp Müller 46616180d1 gst/base/gstbasesink.c: Add comment.
Original commit message from CVS:
* gst/base/gstbasesink.c: (gst_base_sink_pad_buffer_alloc):
Add comment.
* gst/elements/gstfakesink.c: (gst_fake_sink_init),
(gst_fake_sink_change_state):
Make state change function thread-safe.
* gst/gstpad.c: (gst_pad_alloc_buffer):
Set offset on generic buffer allocated by fallback.
2005-09-02 23:17:26 +00:00
Stefan Kost 49127d2e3e run the wingo-magic script against the docs
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* docs/gst/tmpl/gstelement.sgml:
* gst/gstpad.c:
* libs/gst/controller/gst-controller.c:
(gst_controlled_property_set_interpolation_mode),
(gst_controlled_property_new),
(gst_controller_find_controlled_property):
run the wingo-magic script against the docs
2005-09-02 21:37:55 +00:00
Wim Taymans 5711214593 gst/gstpad.c: Revert change, need to first fix badly behaving apps.
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_init):
Revert change, need to first fix badly behaving
apps.
2005-08-31 08:38:39 +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
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
Stefan Kost a28d63431a gst/gstbin.h: removed ';' from the end of macro defs
Original commit message from CVS:
* gst/gstbin.h:
removed ';' from the end of macro defs
* docs/gst/gstreamer-docs.sgml:
* docs/gst/gstreamer-sections.txt:
* docs/gst/tmpl/.cvsignore:
* gst/gstbus.h:
* gst/gstelement.c: (gst_element_class_init),
(gst_element_set_state), (activate_pads),
(gst_element_save_thyself):
* gst/gstevent.c: (gst_event_new_newsegment):
* gst/gstevent.h:
* gst/gstiterator.c:
* gst/gstiterator.h:
* gst/gstpad.c:
* gst/gstprobe.h:
* gst/gstutils.c: (gst_pad_query_convert):
* gst/gstutils.h:
fixed parameter name mismatches between source, header and docs
added some more docs, resolved the last batch of unused elements in
docs (now someone needs to doc them)
2005-08-25 23:17:18 +00:00
Thomas Vander Stichele 31e37fe64c add docs
Original commit message from CVS:
add docs
2005-08-25 18:54:00 +00:00
Wim Taymans 1e40e471d9 check/generic/states.c: Make sure all tasks are stopped.
Original commit message from CVS:
* check/generic/states.c: (GST_START_TEST):
Make sure all tasks are stopped.

* check/gst/gstbin.c: (GST_START_TEST):
Unref after usage for proper valgrinding.

* gst/gstpad.c: (gst_pad_finalize), (gst_pad_stop_task):
Really wait for the task to stop before destroying the
mutex.

* gst/gstqueue.c: (gst_queue_sink_activate_push),
(gst_queue_src_activate_push):
Small cleanups. Don't stop the task when we did not start
it.

* gst/gsttask.c: (gst_task_get_type), (gst_task_init),
(gst_task_func), (gst_task_cleanup_all), (gst_task_set_lock),
(gst_task_get_state), (gst_task_start), (gst_task_pause),
(gst_task_join):
* gst/gsttask.h:
Protect the stream lock with the object lock.
Disallow setting the stream lock when running.
Add cleanup_all to wait for the threadpool to finish.
Remove code to autoallocate a mutex if none was provided.
Add _join() to wait for a task to stop.
Protect the thread pool with a global lock.
2005-08-24 20:49:53 +00:00
Andy Wingo b2c0b3a162 gst/gstpad.c (gst_pad_fixate_caps): Check if the caps is fixed already.
Original commit message from CVS:
2005-08-24  Andy Wingo  <wingo@pobox.com>

* gst/gstpad.c (gst_pad_fixate_caps): Check if the caps is fixed
already.
2005-08-24 11:36:49 +00:00
Thomas Vander Stichele 4b0a255e95 gst/gstbuffer.c: some debugging
Original commit message from CVS:

* gst/gstbuffer.c: (gst_buffer_new_and_alloc):
some debugging
* gst/gstcaps.h:
whitespace fixes
* gst/gstpad.c: (gst_pad_activate_push), (gst_pad_alloc_buffer):
more debugging
* gst/gststructure.c: (gst_caps_structure_fixate_field_boolean):
* gst/gststructure.h:
add a fixate function for booleans; add a FIXME that these func
names should probably be gst_structure_fixate_*
2005-08-23 11:38:28 +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
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
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
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
Wim Taymans 49de56dd1f docs/design/part-gstghostpad.txt: Small update.
Original commit message from CVS:
* docs/design/part-gstghostpad.txt:
Small update.

* gst/gstbin.c: (unlink_pads), (gst_bin_add_func),
(gst_bin_remove_func):
Unlinking pads while holding the bin LOCK is not a good
idea.

* gst/gstpad.c: (gst_pad_class_init),
(gst_pad_link_check_hierarchy), (gst_pad_get_caps_unlocked),
(gst_pad_accept_caps), (gst_pad_set_caps), (gst_pad_send_event):
No prob setting template after creating the pad.
2005-07-29 19:19:29 +00:00
Wim Taymans 7c7a4b68a1 check/gst/gstghostpad.c: Added some more tests for wrong hierarchy
Original commit message from CVS:
* check/gst/gstghostpad.c: (GST_START_TEST), (gst_ghost_pad_suite):
Added some more tests for wrong hierarchy

* docs/design/part-overview.txt:
Some updates.

* gst/gstbin.c: (gst_bin_remove_func), (gst_bin_dispose):
Cleanups.

* gst/gstelement.c: (gst_element_remove_pad), (gst_element_seek),
(gst_element_dispose):
Some more cleanups.

* gst/gstpad.c: (gst_pad_link_check_compatible_unlocked),
(gst_pad_link_check_hierarchy), (gst_pad_link_prepare),
(gst_pad_get_caps_unlocked), (gst_pad_accept_caps),
(gst_pad_set_caps), (gst_pad_send_event):
Check for correct hierarchy when linking pads. Moving to
strict requirement for ghostpads when linking elements in
different bins.

* gst/gstpad.h:
Clean ups. Added WRONG_HIERARCHY return value.
2005-07-28 11:24:33 +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 8de129adc4 gst/gstpad.c: Implement default fixation once again, so that gst_pad_fixate() actually does anything at all. This pro...
Original commit message from CVS:
* gst/gstpad.c: (fixate_value), (gst_pad_default_fixate),
(gst_pad_fixate_caps):
Implement default fixation once again, so that gst_pad_fixate()
actually does anything at all. This probably needs to be some
sort of a last resort, and use profile-based fixation first, but
since that doesn't exist yet, this is the best we have. Fixes
visualization in Totem.
2005-07-25 12:31:08 +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 9ace74670e gst/gstcaps.c: Remove debug info.
Original commit message from CVS:
* gst/gstcaps.c: (gst_caps_do_simplify):
Remove debug info.

* gst/gsterror.h:
Define error for stream stopped.

* gst/gstghostpad.c: (gst_proxy_pad_do_bufferalloc),
(gst_proxy_pad_do_chain), (gst_proxy_pad_do_getrange):
Do proper return values.

* gst/gstpad.c: (gst_pad_get_caps_unlocked), (gst_pad_accept_caps),
(gst_pad_set_caps), (gst_pad_chain), (gst_pad_push),
(gst_pad_get_range):
Better return values.

* gst/gstpad.h:
Reorganise return values, add macro to check for fatal errors.

* gst/gstqueue.c: (gst_queue_chain):
Return proper GstFlowReturn values,
2005-07-14 18:10:04 +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 b7e7148a4c check/Makefile.am: instate more valgrindable tests
Original commit message from CVS:
2005-07-12  Thomas Vander Stichele  <thomas at apestaart dot org>

* check/Makefile.am:
instate more valgrindable tests
* check/elements/gstfakesrc.c: (chain_func), (event_func),
(GST_START_TEST), (fakesrc_suite):
* check/gst/gstpad.c: (GST_START_TEST):
* check/gst/gststructure.c: (GST_START_TEST):
fix test leaks
* docs/gst/tmpl/gstminiobject.sgml:
* gst/gstpad.c: (gst_pad_finalize):
fix the static mutex leak
2005-07-12 09:41:00 +00:00
Thomas Vander Stichele 7d8c811095 fix caps leak in both cases
Original commit message from CVS:
fix caps leak in both cases
2005-07-09 23:52:07 +00:00
Thomas Vander Stichele 351230b554 duh, remove unused var
Original commit message from CVS:
duh, remove unused var
2005-07-09 23:48:45 +00:00
Thomas Vander Stichele 84caeeb557 fix a caps leak
Original commit message from CVS:
fix a caps leak
2005-07-09 23:47:23 +00:00
Wim Taymans 7ce828ba3a gst/gstpad.c: Implement the fixate function.
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_fixate_caps), (gst_pad_accept_caps):
Implement the fixate function.
Clean up acceptcaps.
2005-07-06 13:20:47 +00:00
Thomas Vander Stichele b9f6a4d4ee if pad has no parent, return NULL as list of internal links
Original commit message from CVS:

* check/gst/gstpad.c:
* check/gstcheck.c:
* gst/gstpad.c: (gst_pad_get_internal_links_default):
if pad has no parent, return NULL as list of internal links
2005-07-06 11:31:57 +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
Jan Schmidt e762446852 gst/gstpad.c: Put the mini_object into GValue as a mini_object, not a gpointer.
Original commit message from CVS:
2005-07-02  Jan Schmidt  <thaytan@mad.scientist.com>

* gst/gstpad.c: (gst_pad_emit_have_data_signal):
Put the mini_object into GValue as a mini_object,
not a gpointer.
2005-07-01 14:36:12 +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
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
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 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 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 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 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
Jan Schmidt 8bd306b791 gst/elements/gsttypefindelement.c: Don't restart typefinding on a discont.
Original commit message from CVS:
2005-06-23  Jan Schmidt  <thaytan@mad.scientist.com>

* gst/elements/gsttypefindelement.c:
(gst_type_find_element_handle_event):
Don't restart typefinding on a discont.
* gst/gstelement.c: (gst_element_set_state):
Debug spelling fix.
* gst/gstpad.c: (gst_pad_set_active), (gst_pad_send_event):
Allow changing mode of an active pad.
Debug output fixes.
* gst/registries/gstlibxmlregistry.c: (load_feature):
Don't cast a static pad template to a normal pad template.
2005-06-23 11:43:39 +00:00
Andy Wingo 678bb923f1 commit the file
Original commit message from CVS:
commit the file
2005-06-23 09:41:41 +00:00
Wim Taymans 5d66b9af57 gst/gstpad.c: Small doc updates.
Original commit message from CVS:
* gst/gstpad.c:
Small doc updates.

* gst/gstvalue.c: (gst_value_compare_buffer),
(gst_value_serialize_buffer), (gst_value_deserialize_buffer),
(gst_value_compare_flags), (gst_value_serialize_flags),
(gst_value_deserialize_flags), (_gst_value_initialize):
Fix serialisation of buffers, they are not boxed types anymore
2005-06-20 15:18:17 +00:00