Commit graph

677 commits

Author SHA1 Message Date
Sebastian Dröge fd68dbc08f gst: Use GSlice instead of normal g_malloc in more places 2010-03-28 19:48:45 +02:00
Wim Taymans f089c3cceb pad: set a good name on the task of the pad
Use the element:pad names to configure a good name for the pad task.
2010-03-15 13:48:30 +01:00
Benjamin Otte 7e7f51f617 Fixes for -Wmissing-declarations -Wmissing-prototypes
Also adds those flags to the configure warning flags

https://bugzilla.gnome.org/show_bug.cgi?id=611692
2010-03-11 10:59:57 +01:00
Tim-Philipp Müller c802301b69 pad: don't print WARN debug statements for normal things like EOS 2010-02-15 00:08:16 +00:00
Thijs Vermeir 053ada3308 gstpad: directly set the caps when pushing buffer with different caps.
This check is not necesarry as we are not negotiating anymore. And it can
be wrong if upstream can't produce this caps anymore, but downstream can
process them fine.
2010-01-19 14:13:25 +01:00
Wim Taymans fc7dd46b20 avoid some more type checks 2009-12-24 14:40:54 +01:00
Wim Taymans 381d35fd1e pad: Fix problem with destroy callback not being called
When we unblock a pad with the same user_data, the destroy callback is not
called. This leads to refcounting leaks that cannot be avoided. Instead always
call the destroy notify whenever we install a new pad block.
In particular, this fixes a nasty pad leak in decodebin2.

Also update the unit test to have more accurate comments and test the required
behaviour.
2009-12-23 21:20:14 +01:00
Edward Hervey 4da0da822a gstpad: Only register debug funcptr once.
This makes pad initialization 2 times faster and without any contention
over the debug funcptr global lock.
2009-12-01 17:56:19 +01:00
Stefan Kost 23da3639f0 docs: fix xrefs in docs
Fix typos in xrefs, links to non existing functions and rework plural forms.
2009-11-25 16:59:50 +02:00
Stefan Kost f63ecd04a8 pad: rename new api from _refed to _reffed.
Due to popular demand rename the new api as we still can.
API: gst_pad_get_caps_reffed(), gst_pad_peer_get_caps_reffed()
2009-11-05 12:54:32 +02:00
Rob Clark 746284f807 pad: make _fixate_caps() also truncate when needed
The default gst_pad_fixate_caps() previously would only fixate each individual
struct. In case there are multiple structs, the resulting caps would still not
be fixed. In the spirit of how individual structs are fixated, this patch
changes gst_pad_fixate_caps() to remove all but the first struct.

Fixes #595886
2009-10-28 16:36:13 +01:00
Tim-Philipp Müller daecaf0e8a Remove GST_DEBUG_FUNCPTR where they're pointless
There's not much point in using GST_DEBUG_FUNCPTR with GObject
virtual functions such as get_property, set_propery, finalize and
dispose, since they'll never be used by anyone anyway. Saves a
few bytes and possibly a tenth of a polar bear.
2009-10-28 00:44:24 +00:00
Tim-Philipp Müller 07d953b791 docs: fix Since: tags in docs for newly-added API 2009-10-07 23:34:44 +01:00
Stefan Kost fcc5d783df pad: add variants of gst_pad_get_caps() that don't copy caps. Fixes #590941
In most places in core and baseclasses we just need the caps to do caps-
intersections. In that case ref'ed caps are enough (no need to copy).
This patch also switches the code to use the new functions.
API: gst_pad_get_caps_refed(), gst_pad_peer_get_caps_refed()
2009-10-07 22:41:30 +03:00
Tim-Philipp Müller 3c6db4ed95 gst: remove more unnecessary cast when using g_signal_*() 2009-10-06 20:04:10 +01:00
Wim Taymans f64243e037 states: post structure change on sinkpads
Post the structure change messages on the sinkpads of the elements. This allows
us to catch unlinked pads earlier without ending up with inconsistent element
degrees.
2009-09-02 18:54:06 +02:00
Sebastian Dröge 884467d493 gstpad: Add some DISABLE_DEPRECATED markers in the header too
The internal links function is deprecated since some time and
there already were GST_REMOVE_DEPRECATED markers in the source file,
now add them to the header too.

Fixes bug #592209.
2009-08-18 14:57:08 +02:00
Edward Hervey 51bc185f7f gst: Remove dead assignments 2009-08-08 14:47:40 +02:00
Stefan Kost aee208ff30 pad: use new _caps_can_intersect() 2009-08-06 15:30:33 +03:00
Stefan Kost 12f9b39fac pad: use correct variable in test 2009-08-06 15:30:32 +03:00
Wim Taymans 4146fa2eed pad: Add some more debugging 2009-08-06 10:52:05 +02:00
Edward Hervey 3c21f2d86c Spread branch prediction macros.
These are based on profiling several playback scenarios using playbin2.
2009-06-30 16:29:58 +02:00
Edward Hervey 923913984e Use local variables in for/while loops.
This makes the generated code faster since:
* It won't have to read an undirect value (which will most likely be
 outside of the L1/L2 cache)
* We know that value never changes (the compiler has no clue that it doesn't).
2009-06-30 16:29:50 +02:00
Wim Taymans 92b0f32d74 bufferlist: use faster gst_buffer_list_get()
Use the faster gst_buffer_list_get() to get the first buffer of a list.
2009-06-29 11:56:10 +02:00
Wim Taymans 309d78770c debug: add some more debug to element and pads 2009-06-15 18:42:59 +02:00
Wim Taymans 8f7c59936e pad: add pad private structure
Add pad private structure and move the new chainlistfunc into the private
struct. This avoids ABI breakage and allows us to expand in the future.
2009-05-28 16:36:32 +02:00
Wim Taymans fd8559e4fb pad: keep task ref before releasing the lock
Keep a ref to the task on the pad so that a concurrent stop can stop and join
the task.
2009-05-25 13:03:42 +02:00
Stefan Kost c2da78a953 docs: fix gtk-doc warnings
Move MT safety to main description (it does not belong to Return: or Since:
statement). Add a few missing return docs. Downgrade a normal comment froma doc
comment. Fix a doc header to only contain symbol name.
2009-05-22 12:53:11 +03:00
Jan Schmidt c05e2382cb docs: Fix up some documentation warnings.
Since: tags should always be the last thing in a doc block, apparently.
Add some Returns: descriptions to some recent functions.
2009-05-22 09:33:02 +01:00
Hannes Bistry b47f425069 loadsave: fix requestpad handling and serialisation order.
Support request pads when loading. Reverse pad serialisation order to
preserve it when recreating the pipeline.
2009-05-20 10:58:59 +03:00
Jonas Holmberg 22a48fb08c bufferlist: hook up the pad functions
Reuse buffer code for bufferlists. Not sure if this measurably impacts performance
for the simple buffer case, if it does after doing some benchmarks, we can
decouple it later.

Fixes #572285
2009-05-12 15:18:53 +02:00
Wim Taymans 4b604f7da6 Pad: post STREAM_STATUS_TYPE_CREATE
Post a stream-status message indicating that a new task was created so that the
application has a chance to change the properties of the task.

Fix unit test to take into account the new ref of the message.
2009-05-12 00:27:10 +02:00
Wim Taymans b59045aab9 GstTask: improve documentation
Improve the documentation for the callbacks.
2009-05-12 00:05:12 +02:00
Wim Taymans 540560a758 GstPad: install thread callbacks of the task
Install thread status callbacks on the task object of a pad and post
STREAM_STATUS messages.
2009-05-12 00:00:44 +02:00
Wim Taymans 10f5429887 GstPad: use new task function
Use the new task_set_state function and actually return its result to
the caller.
2009-05-11 23:00:45 +02:00
Sebastian Dröge e7ccf786c3 gst: Use G_DEFINE_TYPE and friends or at least g_once_init_* in the _get_type() functions 2009-04-04 10:20:36 +02:00
Wim Taymans b4b386a1fd gstpad: fix gst_pad_can_link
We were converting the GstPadLinkReturn to a gboolean, which is not what we want
to do.
2009-03-19 17:20:50 +01:00
Zeeshan Ali (Khattak) 8af9d58ea7 gstpad: fix gst_pad_can_link()
Move the gst_pad_can_link() implementation from gstutils to gstpad and use
gst_pad_link_prepare() to make it work correctly and also check the caps.

Make the broken implementation in gstutils static.

Small cleanups in the _get_fixed_caps() function.

Fixes #575682.
2009-03-18 17:01:16 +01:00
Wim Taymans da0060d3aa pad: call new callbacks set in the block callback
Keep track of when a new callback is installed in the callback and call the new
callback in that case.
Add unit test for checking pad blocking.
Fixes #573823.
2009-03-09 11:48:36 +01:00
Antoine Tremblay fe2f12b162 GstPad: relax failure to deactivate unlinked pads
When de/activating a pad in pull mode the pad needs to de/activate the
peer pad it is connected to, failure to be able to do this in activation mode
is an error.

However if there is no peerpad, we can still deactivate the pad correctly and
assume the application will deactivate the unlinked peer pad eventually.

Fixes #574163.
2009-03-05 11:29:48 +01:00
Alessandro Decina d3940f520b GstPad: Add gst_pad_set_blocked_async_full
This allows connecting a GDestroyNotify for when the callback is removed/replaced.
Partially fixes #514717
2009-02-22 20:01:05 +01:00
Wim Taymans ede1e01d13 gst/gstpad.c: Avoid getting the acceptcaps function too early.
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_accept_caps):
Avoid getting the acceptcaps function too early.
2008-11-21 16:48:48 +00:00
Wim Taymans b340b510ce gst/gstpad.c: When we use gst_pad_alloc_buffer() without wanting to set the caps we also don't need to check if the c...
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_configure_src):
When we use gst_pad_alloc_buffer() without wanting to set the caps we
also don't need to check if the caps are compatible because the caller
presumably is going to perform its own custom checks. Fixes some cases
where basetransform elements would error out when it was not needed.
2008-10-20 13:32:07 +00:00
Wim Taymans 401cc7fe6a gst/gstpad.c: Revert a patch from 21 months ago that broke caps negotiation in pull mode. Basically, having a buffer ...
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_get_range), (gst_pad_pull_range):
Revert a patch from 21 months ago that broke caps negotiation in pull
mode. Basically, having a buffer pass over a pad will trigger the
setcaps function when caps change, just like in push mode.
2008-10-10 15:27:37 +00:00
Olivier Crete ee0eaf824b gst/gstbin.c: Keep track of pads that are being linked/unlinked and resync the state changes.
Original commit message from CVS:
Base on Patch by: Olivier Crete <tester at tester dot ca>
* gst/gstbin.c: (gst_bin_init), (gst_bin_add_func),
(gst_bin_remove_func), (update_degree),
(gst_bin_sort_iterator_new), (gst_bin_handle_message_func):
Keep track of pads that are being linked/unlinked and resync the state
changes.
* gst/gstpad.c: (gst_pad_get_direction),
(gst_pad_set_chain_function), (gst_pad_set_getrange_function),
(gst_pad_set_checkgetrange_function), (gst_pad_unlink),
(gst_pad_link_prepare), (gst_pad_link),
(gst_pad_event_default_dispatch), (gst_pad_chain), (gst_pad_push),
(gst_pad_check_pull_range), (gst_pad_get_range),
(gst_pad_pull_range):
Some code cleanups, use macros to check pad direction.
Don't need to take the lock on the pad direction.
Post structure change when pads are linked/unlinked.
Change some checks into _return_if_fail().
* tests/check/gst/gstbin.c:
(test_link_structure_change_state_changed_sync_cb),
(GST_START_TEST), (gst_bin_suite):
Add testcase for pad link/unlinke resync during a state change.
Fixes #510354.
2008-10-06 16:15:02 +00:00
Antoine Tremblay db71547857 gst/gstpad.c: Fix small refount leak in caps compatibility check.
Original commit message from CVS:
Patch by: Antoine Tremblay <hexa00 at gmail dot com>
* gst/gstpad.c: (gst_pad_link_check_compatible_unlocked):
Original patch by : Simon Descaries
Fix small refount leak in caps compatibility check.
Fixes #551676.
2008-10-06 08:45:42 +00:00
Wim Taymans 7cf8be7fd8 gst/gstpad.c: Add fallback when calling the deprecated function on an element that implements the new internal_link h...
Original commit message from CVS:
* gst/gstpad.c: (add_unref_pad_to_list),
(gst_pad_get_internal_links_default):
Add fallback when calling the deprecated function on an element that
implements the new internal_link handler.
2008-09-01 14:05:45 +00:00
Olivier Crete 390369246e gst/gstpad.c: Use thread-safe internal links iterator. Fixes #549504.
Original commit message from CVS:
Patch by: Olivier Crete <tester at tester dot ca>
* gst/gstpad.c: (gst_pad_iterate_internal_links_default),
(gst_pad_event_default_dispatch), (gst_pad_dispatcher):
Use thread-safe internal links iterator. Fixes #549504.
2008-09-01 11:27:45 +00:00
Olivier Crete 68037404b8 Add threadsafe replacement functions for getting internal links of an element. Deprecate the old internal links funct...
Original commit message from CVS:
Based on patch by: Olivier Crete <tester at tester dot ca>
* docs/gst/gstreamer-sections.txt:
* win32/common/libgstreamer.def:
* gst/gstpad.c: (gst_pad_init),
(gst_pad_set_iterate_internal_links_function),
(int_link_iter_data_free), (iterate_pad),
(gst_pad_iterate_internal_links_default),
(gst_pad_iterate_internal_links), (gst_pad_get_internal_links):
* gst/gstpad.h:
Add threadsafe replacement functions for getting internal links of an
element. Deprecate the old internal links functions.
API:GstPad::gst_pad_set_iterate_internal_links_function()
API:GstPad::GstPadIterIntLinkFunction
API:GstPad::gst_pad_iterate_internal_links()
API:GstPad::gst_pad_iterate_internal_links_default()
* gst/gstghostpad.c: (gst_proxy_pad_do_iterate_internal_links),
(gst_proxy_pad_init):
Implement threadsafe internal links.
* tests/check/elements/tee.c: (GST_START_TEST), (tee_suite):
Unit test for internal links on tee. See #549504.
2008-09-01 10:42:04 +00:00
Edward Hervey 98354dc527 gst/gstpad.c: Die evil deadlock, die !
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_get_internal_links_default):
Die evil deadlock, die !
2008-08-30 12:07:41 +00:00
Wim Taymans 31aded4133 gst/gstpad.c: Make the internal links function less thread-unsafe and add some comments, dunno why.
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_get_internal_links_default):
Make the internal links function less thread-unsafe and add some
comments, dunno why.
2008-08-29 16:10:56 +00:00
Wim Taymans 48336614c0 gst/gstpad.c: Remove silly redundant debug.
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_acceptcaps_default),
(gst_pad_configure_src), (gst_pad_alloc_buffer_full):
Remove silly redundant debug.
Add some more debug info.
Clarify the docs regarding new caps received from pad_alloc.
2008-07-31 12:50:52 +00:00
Tim-Philipp Müller 20d11b6fe0 gst/gstpad.c: Only sanity-check the buffer size if requested_caps == buffer_caps (ie. don't take pad caps into accoun...
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_alloc_buffer_full):
Only sanity-check the buffer size if requested_caps == buffer_caps
(ie. don't take pad caps into account, they're not relevant here)
2008-07-29 15:32:11 +00:00
Wim Taymans e84afb820d gst/gstpad.c: The default event function on a sinkpad should return TRUE when there are no internal links but should ...
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_event_default_dispatch):
The default event function on a sinkpad should return TRUE when
there are no internal links but should collect the return values from
the internal links otherwise.
2008-05-27 10:59:38 +00:00
Tim-Philipp Müller 1d5691d033 gst/gstpad.c: Move size sanity check to the right place: downstream may return a buffer with a smaller size if the bu...
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_alloc_buffer_full):
Move size sanity check to the right place: downstream may return
a buffer with a smaller size if the buffer caps are different than
the requested ones, as may happen when doing reverse negotiation.
2008-05-21 18:33:08 +00:00
Wim Taymans cc8334905c Don't use gst_element_get_pad().
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_load_and_link):
* gst/gstutils.c: (gst_element_link_pads),
(gst_element_unlink_pads):
* libs/gst/check/gstcheck.c: (gst_check_setup_src_pad),
(gst_check_teardown_src_pad), (gst_check_setup_sink_pad),
(gst_check_teardown_sink_pad),
(gst_check_element_push_buffer_list):
* tests/check/elements/fakesink.c: (GST_START_TEST):
* tests/check/elements/filesink.c:
* tests/check/elements/filesrc.c: (GST_START_TEST):
* tests/check/elements/multiqueue.c: (setup_multiqueue),
(mq_sinkpad_to_srcpad):
* tests/check/elements/tee.c: (GST_START_TEST):
* tests/check/generic/sinks.c: (GST_START_TEST):
* tests/check/gst/gstbin.c: (GST_START_TEST):
* tests/check/gst/gstevent.c: (GST_START_TEST):
* tests/check/gst/gstghostpad.c: (GST_START_TEST):
* tests/check/gst/gstpipeline.c: (GST_START_TEST):
* tests/check/gst/gstquery.c: (GST_START_TEST):
* tests/check/gst/gstutils.c: (GST_START_TEST):
* tests/check/libs/basesrc.c: (GST_START_TEST):
* tests/check/pipelines/parse-launch.c: (run_delayed_test),
(gst_parse_test_element_change_state):
Don't use gst_element_get_pad().
2008-05-21 15:57:52 +00:00
Tim-Philipp Müller fcc9f0b091 gst/gstpad.c: Add sanity check to make sure we don't get smaller buffers than requested (and fallback to normal buffe...
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_buffer_alloc_unchecked):
Add sanity check to make sure we don't get smaller buffers
than requested (and fallback to normal buffer alloc if we do).
2008-05-19 11:59:34 +00:00
Wim Taymans 98db43c6f0 gst/gstpad.c: Release pad lock before calling out to avoid a possible deadlock.
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_peer_accept_caps):
Release pad lock before calling out to avoid a possible deadlock.
2008-05-14 13:52:59 +00:00
Sebastian Dröge e9e0d0f0eb Don't allow negative sizes when allocating new buffers.
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_alloc_buffer_full):
* libs/gst/base/gstbasetransform.c:
(gst_base_transform_prepare_output_buffer):
Don't allow negative sizes when allocating new buffers.
Fixes bug #461253.
2008-05-06 08:43:57 +00:00
Stefan Kost dbbdcf5dd3 gst/gstpad.c: Do not abort on out of memory for pad_alloc_buffer.
Original commit message from CVS:
* gst/gstpad.c:
Do not abort on out of memory for pad_alloc_buffer.
2008-04-10 14:10:51 +00:00
Stefan Kost 847e64d8ee Expose macro to docs and fix link to it.
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstpad.c:
* gst/gstpad.h:
Expose macro to docs and fix link to it.
2008-03-27 19:13:45 +00:00
Sebastian Dröge b0346dff44 Define G_PARAM_STATIC_STRINGS if it's undefined (GLib < 2.13.0) and use it everywhere for GParamSpecs that use static...
Original commit message from CVS:
* docs/pwg/advanced-dparams.xml:
* docs/pwg/building-props.xml:
* docs/pwg/other-source.xml:
* gst/glib-compat.h:
* gst/gstbin.c: (gst_bin_class_init):
* gst/gstclock.c: (gst_clock_class_init):
* gst/gstindex.c: (gst_index_class_init):
* gst/gstobject.c: (gst_object_class_init):
* gst/gstpad.c: (gst_pad_class_init):
* gst/gstpipeline.c: (gst_pipeline_class_init):
* libs/gst/base/gstbasesink.c: (gst_base_sink_class_init):
* libs/gst/base/gstbasesrc.c: (gst_base_src_class_init):
* libs/gst/base/gstbasetransform.c:
(gst_base_transform_class_init):
* libs/gst/base/gstdataqueue.c: (gst_data_queue_class_init):
* libs/gst/check/gstcheck.c: (_gst_check_fault_handler_restore),
(_gst_check_fault_handler_sighandler),
(_gst_check_fault_handler_setup), (gst_check_init):
* libs/gst/controller/gstcontroller.c:
(_gst_controller_class_init):
* libs/gst/controller/gstlfocontrolsource.c:
(gst_lfo_control_source_class_init):
* libs/gst/net/gstnetclientclock.c:
(gst_net_client_clock_class_init):
* libs/gst/net/gstnettimeprovider.c:
(gst_net_time_provider_class_init):
* plugins/elements/gstcapsfilter.c: (gst_capsfilter_class_init):
* plugins/elements/gstfakesink.c: (gst_fake_sink_class_init):
* plugins/elements/gstfakesrc.c: (gst_fake_src_class_init):
* plugins/elements/gstfdsink.c: (gst_fd_sink_class_init):
* plugins/elements/gstfdsrc.c: (gst_fd_src_class_init):
* plugins/elements/gstfilesink.c: (gst_file_sink_class_init):
* plugins/elements/gstfilesrc.c: (gst_file_src_class_init):
* plugins/elements/gstidentity.c: (gst_identity_class_init):
* plugins/elements/gstmultiqueue.c: (gst_multi_queue_class_init):
* plugins/elements/gstqueue.c: (gst_queue_class_init):
* plugins/elements/gsttee.c: (gst_tee_class_init):
* plugins/elements/gsttypefindelement.c:
(gst_type_find_element_class_init):
* plugins/indexers/gstfileindex.c: (gst_file_index_class_init):
Define G_PARAM_STATIC_STRINGS if it's undefined (GLib < 2.13.0) and
use it everywhere for GParamSpecs that use static strings (i.e. all).
This gives us less memory usage, fewer allocations and thus less
memory defragmentation. Fixes bug #523806.
2008-03-22 14:56:17 +00:00
Stefan Kost 502337a510 gst/gstconfig.h.in: Add 'id' for example.
Original commit message from CVS:
* gst/gstconfig.h.in:
Add 'id' for example.
* gst/gstpad.c:
* gst/gstutils.c:
* plugins/elements/gstfdsink.c:
Link to signals. Doc and comment fixes.
2008-02-06 12:21:05 +00:00
Thijs Vermeir bb3dfba3f5 Be sure that we have a new copy of the caps and not reffed caps from a template
Original commit message from CVS:
* gst/gstpad.c:
* tests/check/gst/gstpad.c:
Be sure that we have a new copy of the caps and not
reffed caps from a template
2008-02-04 14:14:42 +00:00
Wim Taymans 8951071467 gst/gstpad.c: Don't crash when trying to fixate and empty list.
Original commit message from CVS:
* gst/gstpad.c: (fixate_value):
Don't crash when trying to fixate and empty list.
Fixes #506643.
2008-01-04 18:39:15 +00:00
Wim Taymans 96d28a501f gst/gstpad.c: Really unlink the peer pad instead of setting the peer pointer to NULL when we dispose the pad.
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_dispose):
Really unlink the peer pad instead of setting the peer pointer to NULL
when we dispose the pad.
This correctly calls the unlink functions and makes sure that the peer
does not have a handle to invalid memory. See #504671.
* tests/check/gst/gstpad.c: (GST_START_TEST), (gst_pad_suite):
Add testsuite for above case.
2007-12-21 13:54:07 +00:00
Wim Taymans 731f14c4b9 gst/: Small comment and documentation update.
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_pause_task):
* gst/gstutils.c:
Small comment and documentation update.
2007-10-05 14:44:18 +00:00
Wim Taymans 0d3299c63b Add function to perform a query on the peer of a pad.
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstpad.c: (gst_pad_peer_query):
* gst/gstpad.h:
Add function to perform a query on the peer of a pad.
API: gst_pad_peer_query()
2007-09-11 15:55:50 +00:00
Wim Taymans 56b5aa1ccb docs/design/part-TODO.txt: Add some more TODO items
Original commit message from CVS:
* docs/design/part-TODO.txt:
Add some more TODO items
* gst/gstbin.c: (find_message), (gst_bin_change_state_func):
Improve debugging.
* gst/gstcaps.c: (gst_caps_intersect):
Optimize trivial intersection case between identical caps pointers.
* gst/gstelement.c: (gst_element_continue_state),
(gst_element_set_state_func):
* gst/gstpad.c:
Fix spelling and grammar mistakes.
2007-08-07 09:56:08 +00:00
Jan Schmidt ba9acc9b57 gst/gstpad.c: Fix typo in the docs.
Original commit message from CVS:
* gst/gstpad.c:
Fix typo in the docs.
2007-06-15 14:37:28 +00:00
Wim Taymans 3d4e515e77 Improve debugging.
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_push_event), (gst_pad_send_event):
* libs/gst/base/gstbasesrc.c: (gst_base_src_query_latency),
(gst_base_src_default_query), (gst_base_src_get_range),
(gst_base_src_start):
* tests/check/pipelines/parse-launch.c: (setup_pipeline):
Improve debugging.
2007-06-15 10:43:51 +00:00
Stefan Kost 239d09ecdc gst/gstpad.c: Show the caps change in the log to help spotting the case of not exactly matching caps.
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_alloc_buffer_full), (gst_pad_push):
Show the caps change in the log to help spotting the case of not
exactly matching caps.
2007-06-14 10:33:28 +00:00
Stefan Kost e87a530b73 gst/gstelement.c (gst_element_requires_clock, gst_element_provides_clock, gst_element_request_pad, gst_element_class_...
Original commit message from CVS:
* gst/gstelement.c (gst_element_requires_clock,
gst_element_provides_clock, gst_element_request_pad,
gst_element_class_set_details, gst_element_class_set_details_simple,
gst_element_default_send_event, gst_element_abort_state,
gst_element_continue_state, gst_element_set_state,
gst_element_set_state_func, iterator_activate_fold_with_resync):
* gst/gstpad.c (gst_pad_activate_pull, gst_pad_set_getcaps_function,
gst_pad_fixate_caps, gst_pad_configure_sink, gst_pad_configure_src,
gst_pad_query, gst_pad_save_thyself, handle_pad_block, gst_pad_push,
gst_pad_get_range, gst_pad_pull_range):
* gst/gstpad.h (GST_PAD_LINK_SUCCESSFUL, GST_FLOW_CUSTOM_SUCCESS,
GST_FLOW_NOT_SUPPORTED, GST_FLOW_IS_FATAL, GstPadActivateFunction,
GstPadActivateModeFunction, GstPadChainFunction,
GstPadGetCapsFunction, GstPadAcceptCapsFunction,
GstPadFixateCapsFunction, GstPadTemplate):
* gst/gstpipeline.c (gst_pipeline_change_state,
gst_pipeline_set_new_stream_time, gst_pipeline_use_clock,
gst_pipeline_set_clock, gst_pipeline_auto_clock,
gst_pipeline_get_delay):
Whitespace and docs fixes.
2007-05-22 06:37:37 +00:00
Wim Taymans fc32cd9c98 gst/gstpad.c: Added simple version of improved caps checking. It was previously assumed that a setcaps function would...
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_get_caps_unlocked),
(gst_pad_acceptcaps_default), (gst_pad_configure_sink),
(gst_pad_configure_src):
Added simple version of improved caps checking. It was previously
assumed that a setcaps function would check the validity of the caps but
people prefer us to check caps against the template automatically.
Fixes #421543.
2007-05-21 12:00:42 +00:00
Wim Taymans 682d75a392 gst/gstpad.c: Fix documentation as spotted by rg on IRC.
Original commit message from CVS:
* gst/gstpad.c:
Fix documentation as spotted by rg on IRC.
2007-05-02 15:14:32 +00:00
Thomas Vander Stichele c0b13c07ee docs/faq/gst-uninstalled: don't get empty paths on the PATH variables
Original commit message from CVS:
* docs/faq/gst-uninstalled:
don't get empty paths on the PATH variables
* gst/gstpad.c (gst_pad_is_active, gst_pad_set_blocked_async):
Don't format for the uncommon terminal width of 84 characters.
2007-04-12 10:32:38 +00:00
Thomas Vander Stichele a93ce49bad don't format for the uncommon editor width of 84 characters
Original commit message from CVS:
don't format for the uncommon editor width of 84 characters
2007-04-09 08:17:13 +00:00
Sebastian Dröge 12111f3107 gst/gstpad.c: Revert last commit. This needs some more thoughts.
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_set_caps), (gst_pad_configure_sink),
(gst_pad_configure_src), (gst_pad_alloc_buffer_full),
(gst_pad_chain_unchecked), (gst_pad_push):
Revert last commit. This needs some more thoughts.
2007-03-22 18:28:00 +00:00
Sebastian Dröge 0c34057ee5 gst/gstpad.c: Check in set_caps if the caps are compatible with the pad and remove two functions that are redundant n...
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_set_caps), (gst_pad_alloc_buffer_full),
(gst_pad_chain_unchecked), (gst_pad_push):
Check in set_caps if the caps are compatible with the pad and remove
two functions that are redundant now. Fixes #421543.
2007-03-22 17:12:23 +00:00
Wim Taymans 88c8547b67 gst/gstpad.c: Fix possible deadlock if pad eventfunc is not specified. Fixes #421177.
Original commit message from CVS:
Patch by: <syrjala at sci dot fi>
* gst/gstpad.c: (gst_pad_alloc_buffer_full), (gst_pad_send_event):
Fix possible deadlock if pad eventfunc is not specified.  Fixes #421177.
Improve debugging.
2007-03-22 08:23:41 +00:00
Stefan Kost 08afeb6120 docs/: Do some Architect work.
Original commit message from CVS:
* docs/design/draft-tagreading.txt:
* docs/random/ensonic/audiobaseclasses.txt:
Do some Architect work.
* gst/gstobject.c: (gst_object_set_name):
Add a WARNING.
* gst/gstpad.c:
Add docs that point from gst_pad_get_range to gst_pad_pull_range
2007-03-13 14:53:21 +00:00
Wim Taymans 60212ff197 Make the ghostpad a parent of the internal pad again for better backward compatibility. Don't write code that relies ...
Original commit message from CVS:
* docs/design/part-gstghostpad.txt:
* gst/gstghostpad.c: (gst_ghost_pad_dispose),
(gst_ghost_pad_new_full):
Make the ghostpad a parent of the internal pad again for better backward
compatibility. Don't write code that relies on this however.
* gst/gstpad.c: (gst_pad_activate_pull), (gst_pad_activate_push),
(gst_pad_link_check_hierarchy):
Require that parents should be GstElements in the hierarchy check.
2007-02-20 18:02:50 +00:00
Wim Taymans d772c87442 Do not set the internal pad as a parent anymore so we can avoid hierarchy linking errors when the ghostpad has no par...
Original commit message from CVS:
* docs/design/part-gstghostpad.txt:
* gst/gstghostpad.c: (gst_ghost_pad_class_init),
(gst_ghost_pad_internal_do_activate_push),
(gst_ghost_pad_internal_do_activate_pull),
(gst_ghost_pad_do_activate_push), (gst_ghost_pad_do_activate_pull),
(gst_ghost_pad_do_link), (gst_ghost_pad_dispose),
(gst_ghost_pad_new_full), (gst_ghost_pad_set_target):
Do not set the internal pad as a parent anymore so we can avoid
hierarchy linking errors when the ghostpad has no parent yet. This also
fixes failed activation because of unlinked internal pads, which in
turn fixes the impossible case where you have to activate a pad before
you can add it to a running element.
Also fix the docs.
* gst/gstpad.c: (pre_activate), (post_activate),
(gst_pad_set_active), (gst_pad_activate_pull),
(gst_pad_activate_push), (gst_pad_check_pull_range):
Add some more debug info.
Mark activation mode in pre_activate so that we don't try to activate in
endless loops. Fixes #385084.
2007-02-20 10:16:27 +00:00
Wim Taymans a02edf4d61 gst/gstpad.c: Improve debugging of default pad dispatcher and query functions.
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_get_internal_links_default),
(gst_pad_dispatcher):
Improve debugging of default pad dispatcher and query functions.
2007-02-15 08:37:19 +00:00
Stefan Kost ea55e1357e configure.ac: comment about refining the xml deps
Original commit message from CVS:
* configure.ac:
comment about refining the xml deps
* docs/manuals.mak:
comments about moving away from jade for docs
* gst/gst.c:
recommit the ifdefs to use the binary registry
* gst/gstbin.c: (gst_bin_change_state_func):
this break is obsolete
* gst/gstelementfactory.h:
better GST_ELEMENT_DETAILS docs, add comment about translation
* gst/gstinfo.h:
remove eol slash
* gst/gstobject.c: (gst_signal_object_get_type):
add G_UNLIKELY as usual
* gst/gstpad.c: (gst_pad_event_default):
add fall trhu comment
* gst/gstregistrybinary.c: (gst_registry_binary_write),
(gst_registry_binary_initialize_magic),
(gst_registry_binary_save_string),
(gst_registry_binary_save_pad_template),
(gst_registry_binary_save_feature),
(gst_registry_binary_save_plugin),
(gst_registry_binary_write_cache),
(gst_registry_binary_check_magic),
(gst_registry_binary_load_pad_template),
(gst_registry_binary_load_feature),
(gst_registry_binary_load_plugin),
(gst_registry_binary_read_cache):
comment typo and formatting
* gst/gstutils.c: (gst_element_state_get_name),
(gst_element_state_change_return_get_name):
remove obsolete breaks
* gst/gstvalue.c: (gst_date_get_type), (_gst_value_initialize):
add FIXME 0.11 and remove cpp comment
2007-01-29 15:54:09 +00:00
Mark Nauwelaerts e56bad5b13 gst/gstpad.c: Fix two docs typoes (#399094).
Original commit message from CVS:
Patch by: Mark Nauwelaerts <manauw at skynet be>
* gst/gstpad.c:
Fix two docs typoes (#399094).
2007-01-21 20:24:11 +00:00
Andy Wingo 63693a682a gst/gstpad.c (gst_pad_get_range, gst_pad_pull_range): Allow getrange() to return buffers with other caps, while we fi...
Original commit message from CVS:
2007-01-13  Andy Wingo  <wingo@pobox.com>

* gst/gstpad.c (gst_pad_get_range, gst_pad_pull_range): Allow
getrange() to return buffers with other caps, while we fix
demuxers and typefind, or otherwise change part-negotiation.txt.
2007-01-13 10:33:41 +00:00
Andy Wingo 871e807482 gst/gstpad.c (gst_pad_activate_pull): Refuse to activate unlinked sink pads in pull mode. In addition to being correc...
Original commit message from CVS:
2007-01-12  Andy Wingo  <wingo@pobox.com>

* gst/gstpad.c (gst_pad_activate_pull): Refuse to activate unlinked
sink pads in pull mode. In addition to being correct, fixes
filesrc ! decodebin ! identity ! fakesink.
(gst_pad_get_range, gst_pad_pull_range): Don't call
gst_pad_set_caps() if the caps changes; instead error out with
GST_FLOW_NOT_NEGOTIATED, as discussed in part-negotiation.txt.
2007-01-12 15:48:00 +00:00
Andy Wingo 7ef6acd8cd docs/design/part-negotiation.txt: Update with, um, one way that pull-mode negotiation might work?
Original commit message from CVS:
2007-01-10  Andy Wingo  <wingo@pobox.com>

* docs/design/part-negotiation.txt: Update with, um, one way that
pull-mode negotiation might work?

* gst/gstpad.h:
* gst/gstpad.c (gst_pad_get_allowed_caps): Remove the restriction
that the pad must be a src pad; makes sense to call it the other
way in pull mode, and the logic is symmetric anyway.
2007-01-10 21:15:08 +00:00
Andy Wingo 77472ddbd7 gst/gstpad.c (gst_pad_get_range, gst_pad_pull_range): Set caps on the pads if necessary, as in push()/chain(). Update...
Original commit message from CVS:
2007-01-06  Andy Wingo  <wingo@pobox.com>

* gst/gstpad.c (gst_pad_get_range, gst_pad_pull_range): Set caps
on the pads if necessary, as in push()/chain(). Update docs.
Shouldn't affect existing pull() usage as it is currently only
being used on buffers without caps.
2007-01-06 17:09:10 +00:00
Wim Taymans 1affbe8e9f gst/: Set pads to FLUSHING when they are created. Check, warn and fix when a demuxer adds an inactive pad to itself w...
Original commit message from CVS:
* gst/gstelement.c: (gst_element_add_pad):
* gst/gstghostpad.c: (gst_ghost_pad_new_full):
* gst/gstpad.c: (gst_pad_init):
Set pads to FLUSHING when they are created. Check, warn and fix when a
demuxer adds an inactive pad to itself when running. Fixes #339326.
2006-12-15 16:01:58 +00:00
Tim-Philipp Müller c0ce620980 gst/gstpad.c: Can't access event structure after giving away ownership of the event.
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_push_event):
Can't access event structure after giving away ownership of
the event.
2006-11-15 17:38:13 +00:00
Mark Nauwelaerts 47976eb0c2 gst/gstpad.c: Fix documentation for gst_pad_dispatcher. Fixes #374475.
Original commit message from CVS:
Patch by: Mark Nauwelaerts <manauw at skynet dot be>
* gst/gstpad.c:
Fix documentation for gst_pad_dispatcher. Fixes #374475.
2006-11-13 18:03:35 +00:00
Stefan Kost d6c257363b gst/gstpad.c: Enhance debug and improve docs
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_event_default_dispatch),
(gst_pad_push_event):
Enhance debug and improve docs
* gst/gsturi.c:
Fix docs
2006-11-06 15:18:57 +00:00
Mark Nauwelaerts 6e0416787d gst/gstpad.c: Some small cleanups. Improve debugging.
Original commit message from CVS:
Patch by: Mark Nauwelaerts <manauw at skynet dot be>
* gst/gstpad.c: (gst_pad_init), (pre_activate),
(gst_pad_set_blocked_async), (gst_pad_acceptcaps_default),
(gst_pad_accept_caps), (handle_pad_block), (gst_pad_push_event):
Some small cleanups. Improve debugging.
* gst/gstpad.h:
Signal all waiting threads with a broadcast instead of just one.
Fixes #369942.
2006-11-03 13:57:28 +00:00
Wim Taymans 340a8fee72 docs/design/part-events.txt: Update some docs.
Original commit message from CVS:
* docs/design/part-events.txt:
Update some docs.
* docs/design/part-block.txt:
* gst/gstpad.c: (gst_pad_is_blocking), (handle_pad_block),
(gst_pad_push_event):
Revert BLOCKING patch, it tries to be smart without really having a
clear idea what or how. So, now we discard all FLUSHING events again on
a blocking pad. Should fix gnonlin again.
2006-10-23 15:21:12 +00:00
Yves Lefebvre 1b417192e6 gst/gstelement.h: Clarify _NO_PREROLL a bit more.
Original commit message from CVS:
* gst/gstelement.h:
Clarify _NO_PREROLL a bit more.
* gst/gstevent.c:
Fix docs.
* gst/gstpad.c: (gst_pad_link_check_hierarchy),
(gst_pad_get_caps_unlocked), (gst_pad_save_thyself),
(handle_pad_block), (gst_pad_push_event), (gst_pad_send_event):
Patch by: Yves Lefebvre <ivanohe at abacom dot com> Fix possible deadlock
due to wrong locking order. Fixes #361769.
Remove some redundant/misplaced checks in pad_block.
* libs/gst/base/gstbasesink.c: (gst_base_sink_get_position):
For negative rates, count backwards from the duration.
2006-10-13 13:27:46 +00:00
Sebastien Cote 1482e8bd9b gst/gstpad.c: Update some docs.
Original commit message from CVS:
Patch by: Sebastien Cote <sebas642 at yahoo dot ca>
* gst/gstpad.c: (gst_pad_get_caps_unlocked),
(gst_pad_save_thyself):
Update some docs.
Write pad direction in XML output. Fixes #345496.
2006-10-10 14:47:40 +00:00
Tim-Philipp Müller f468db236d Printf fixes.
Original commit message from CVS:
* gst/gstpad.c: (pre_activate):
* gst/gstregistry.c: (gst_registry_scan_path_level):
* gst/gstregistryxml.c: (load_plugin):
* libs/gst/controller/gstcontroller.c:
(gst_controlled_property_set_interpolation_mode):
* libs/gst/dataprotocol/dataprotocol.c:
(gst_dp_packet_from_event_1_0):
* libs/gst/net/gstnetclientclock.c:
(gst_net_client_clock_observe_times):
* plugins/elements/gstfdsrc.c: (gst_fd_src_create):
Printf fixes.
2006-10-05 14:26:08 +00:00
Tim-Philipp Müller 785eafa32a gst/gstpad.c: Add 'Since: 0.10.11' to gst_pad_is_blocking() gtk-doc blurb.
Original commit message from CVS:
* gst/gstpad.c:
Add 'Since: 0.10.11' to gst_pad_is_blocking() gtk-doc blurb.
2006-10-02 16:37:56 +00:00