Commit graph

78 commits

Author SHA1 Message Date
Stefan Kost 9cc956c370 plugins/elements/gsttypefindelement.c: reverted wrong change and reflowed code to avoid others falling into this trap
Original commit message from CVS:
* plugins/elements/gsttypefindelement.c:
(gst_type_find_element_handle_event):
reverted wrong change and reflowed code to avoid others falling into
this trap
2006-04-28 22:56:28 +00:00
Stefan Kost e90fcdbc80 make GstElementDetails const
Original commit message from CVS:
* gst/gstbin.c:
* gst/gstpipeline.c:
* plugins/elements/gstcapsfilter.c:
* plugins/elements/gstfakesink.c:
* plugins/elements/gstfakesrc.c:
* plugins/elements/gstfdsink.c:
* plugins/elements/gstfdsrc.c:
* plugins/elements/gstfilesink.c:
* plugins/elements/gstfilesrc.c:
* plugins/elements/gstidentity.c:
* plugins/elements/gstqueue.c:
* plugins/elements/gsttee.c:
* plugins/elements/gsttypefindelement.c:
(gst_type_find_element_handle_event):
make GstElementDetails const
2006-04-28 18:55:17 +00:00
Michael Smith 2f152285da plugins/elements/gsttypefindelement.c: If we get EOS before any data is accumulated, don't use uninitialised local va...
Original commit message from CVS:
* plugins/elements/gsttypefindelement.c:
(gst_type_find_element_handle_event):
If we get EOS before any data is accumulated, don't use
uninitialised local variables.
2006-04-28 13:43:03 +00:00
Tim-Philipp Müller a0d6437c15 gst/gstinfo.c: Add some newlines.
Original commit message from CVS:
* gst/gstinfo.c: (__gst_in_valgrind):
Add some newlines.
* plugins/elements/gsttypefindelement.c:
(gst_type_find_element_chain):
Don't leak buffer caps.
2006-04-06 11:27:24 +00:00
Tim-Philipp Müller 3b67b0ad82 plugins/elements/gsttypefindelement.c: More debug info; when skipping typefinding, send cached events in all cases.
Original commit message from CVS:
* plugins/elements/gsttypefindelement.c:
(gst_type_find_element_chain):
More debug info; when skipping typefinding, send cached
events in all cases.
2006-04-04 08:55:44 +00:00
Michael Smith 5b86e7bf4e plugins/elements/gsttypefindelement.c: Do not typefind content if the buffers already have caps. and the right thing ...
Original commit message from CVS:
* plugins/elements/gsttypefindelement.c:
(gst_type_find_element_chain):
Do not typefind content if the buffers already have caps.
Neccesary for icydemux (#333657), and the right thing to do anyway.
2006-03-31 15:26:04 +00:00
Tim-Philipp Müller 30ae52d1b9 plugins/elements/gsttypefindelement.*: When typefinding is done in push mode, we should cache events we receive durin...
Original commit message from CVS:
* plugins/elements/gsttypefindelement.c: (stop_typefinding),
(gst_type_find_element_handle_event),
(gst_type_find_element_send_cached_events),
(gst_type_find_element_change_state):
* plugins/elements/gsttypefindelement.h:
When typefinding is done in push mode, we should cache
events we receive during typefinding instead of just
dropping them (e.g. newsegment, custom events from
dvdreadsrc etc.) and then send them out once we've
determined the type of the stream (and decodebin
has had a chance to plug in a decoder/demuxer).
2006-03-29 10:33:19 +00:00
Tim-Philipp Müller e2b2ce11f1 gst/gstpipeline.c: Add 'Since: 0.10.5' to gtk-doc blurb for added property.
Original commit message from CVS:
* gst/gstpipeline.c: (gst_pipeline_class_init):
Add 'Since: 0.10.5' to gtk-doc blurb for added property.
* plugins/elements/gsttypefindelement.c:
(gst_type_find_element_handle_event):
Don't try to typefind empty streams.
2006-03-14 16:32:58 +00:00
Tim-Philipp Müller 6619c85779 plugins/elements/gsttypefindelement.*: Use gst_type_find_helper_for_buffer() for chain-based typefinding.
Original commit message from CVS:
* plugins/elements/gsttypefindelement.h:
* plugins/elements/gsttypefindelement.c:
(gst_type_find_element_src_event), (start_typefinding),
(stop_typefinding), (gst_type_find_element_handle_event),
(gst_type_find_element_chain),
(gst_type_find_element_chain_do_typefinding):
Use gst_type_find_helper_for_buffer() for chain-based
typefinding.
2006-03-03 14:18:01 +00:00
Tim-Philipp Müller 4a4a73adf1 plugins/elements/gsttypefindelement.c: Deprecate "maximum" property (not only was it only taken into account for type...
Original commit message from CVS:
* plugins/elements/gsttypefindelement.c:
(gst_type_find_element_class_init),
(gst_type_find_element_set_property),
(gst_type_find_element_get_property):
Deprecate "maximum" property (not only was it only taken into
account for typefinding in push-mode anyway, it also was never
actually possible to set it in the first place because the
property was registered with the numeric property ID for the
"minimum" property). Register "maximum" property correctly,
for the sake of future copy'n'pasters. Remove some cruft
from property get/set functions.
2006-03-03 11:42:40 +00:00
Tim-Philipp Müller e7ec08ad5d plugins/elements/gsttypefindelement.c: Use gst_type_find_helper_get_range() here, so we can honour the min-probabilit...
Original commit message from CVS:
* plugins/elements/gsttypefindelement.c:
(gst_type_find_element_activate):
Use gst_type_find_helper_get_range() here, so we
can honour the min-probability property and also emit
the signal with the correct probability of the found caps.
2006-03-03 11:27:02 +00:00
Tim-Philipp Müller e4d393eb66 plugins/elements/gsttypefindelement.c: When we get an EOS event and have not found a type yet (most likely because we...
Original commit message from CVS:
* plugins/elements/gsttypefindelement.c:
(gst_type_find_element_handle_event):
When we get an EOS event and have not found a type yet
(most likely because we had not yet accumulated
TYPE_FIND_MIN_SIZE of data yet), try to determine the
type given the data we have so far. Fixes typefinding
for very short streams again, most notably quicktime
redirections as used on Apple's trailer site (#331701).
2006-02-27 20:01:53 +00:00
Tim-Philipp Müller b86c545a88 plugins/elements/gsttypefindelement.c: This should be 0 not GST_CLOCK_TIME_NONE (see #331701).
Original commit message from CVS:
* plugins/elements/gsttypefindelement.c: (stop_typefinding):
This should be 0 not GST_CLOCK_TIME_NONE (see #331701).
2006-02-26 19:20:51 +00:00
Tim-Philipp Müller e203621dcb plugins/elements/gsttypefindelement.c: Use gst_pad_check_pull_range() before _activate_pull() to avoid unnecessary op...
Original commit message from CVS:
* plugins/elements/gsttypefindelement.c:
(gst_type_find_element_activate):
Use gst_pad_check_pull_range() before _activate_pull()
to avoid unnecessary open/close (see #331690).
2006-02-26 14:42:29 +00:00
Tim-Philipp Müller a225c1ed41 plugins/elements/gsttypefindelement.c: We can do peeks at non-zero offsets, as long as they fall within the buffer we...
Original commit message from CVS:
* plugins/elements/gsttypefindelement.c: (find_peek):
We can do peeks at non-zero offsets, as long as they
fall within the buffer we have.
2006-02-15 12:17:50 +00:00
Tim-Philipp Müller 573b793f08 plugins/elements/gsttypefindelement.c: When typefinding is unsuccessful in the chain function, don't error out immedi...
Original commit message from CVS:
* plugins/elements/gsttypefindelement.c:
(gst_type_find_element_chain):
When typefinding is unsuccessful in the chain function, don't
error out immediately. Only error out with NO_CAPS_FOUND if
the amount of data is at least MAX_TYPEFIND_SIZE bytes,
otherwise simply wait for more data so we can try typefinding
again with more data later. Also, don't attempt to typefind
if we have less than MIN_TYPEFIND_SIZE data available. Overall,
this should improve typefinding from network sources where the
size of the first buffer can be somewhat random.
2006-02-14 20:57:31 +00:00
Tim-Philipp Müller 5edbf28ba3 plugins/elements/gsttypefindelement.c: Post TYPE_NOT_FOUND error message when typefinding is unsuccessful in the acti...
Original commit message from CVS:
* plugins/elements/gsttypefindelement.c:
(gst_type_find_element_activate):
Post TYPE_NOT_FOUND error message when typefinding
is unsuccessful in the activate function as well.
2006-02-03 21:14:57 +00:00
Tim-Philipp Müller ab34eeb94e plugins/elements/gsttypefindelement.c: 'have-type' signal needs to be G_SIGNAL_RUN_FIRST, as it is the object method ...
Original commit message from CVS:
* plugins/elements/gsttypefindelement.c:
(gst_type_find_element_class_init):
'have-type' signal needs to be G_SIGNAL_RUN_FIRST, as it is the
object method handler that sets the caps on the pad and we want
that to happen before we emit the signal (fixes e.g. feeding a
plain text file to decodebin).
2006-01-18 16:31:49 +00:00
Wim Taymans 4f15126b53 Small updates to various docs.
Original commit message from CVS:
* docs/manual/basics-pads.xml:
* docs/plugins/Makefile.am:
* docs/plugins/gstreamer-plugins-docs.sgml:
* docs/plugins/gstreamer-plugins-sections.txt:
* docs/pwg/advanced-clock.xml:
* docs/pwg/advanced-scheduling.xml:
* docs/pwg/advanced-types.xml:
* plugins/elements/gstfdsink.c:
* plugins/elements/gstfdsrc.c:
* plugins/elements/gstfdsrc.h:
* plugins/elements/gstidentity.c: (gst_identity_class_init):
* plugins/elements/gstidentity.h:
* plugins/elements/gstqueue.h:
* plugins/elements/gsttee.c:
* plugins/elements/gsttee.h:
* plugins/elements/gsttypefindelement.c:
(gst_type_find_element_class_init):
* plugins/elements/gsttypefindelement.h:
Small updates to various docs.
Added core plugins to docs.
2006-01-04 12:41:35 +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
Michael Smith 83a815e648 gst/gsttypefindfactory.c: Don't unref factories after calling them.
Original commit message from CVS:
* gst/gsttypefindfactory.c: (gst_type_find_factory_call_function):
Don't unref factories after calling them.
* libs/gst/base/gsttypefindhelper.c: (gst_type_find_helper):
* plugins/elements/gsttypefindelement.c:
(gst_type_find_element_chain):
Free lists of factories after using them. Fixing typefinding memory
leaks.
2005-12-12 19:09:49 +00:00
Tim-Philipp Müller c821be101e plugins/elements/gsttypefindelement.c: Catch the special case where we are operating chain-based, but the downstream ...
Original commit message from CVS:
* plugins/elements/gsttypefindelement.c: (stop_typefinding):
Catch the special case where we are operating chain-based,
but the downstream peer pad has no chain function. Emit a
custom error message in this case instead of letting the
core generate one implying that this is some sort of core
bug. It's not, it just means that whatever got plugged
into the pipeline downstream when we announced the type
can only operate pull-based, while our source can only
operate push-based (e.g. http://foo/bar.mov ! qtdemux ! ...)
Error string has not been marked for translation yet, as
it probably needs some more work first.
(gst_type_find_element_get_best_possibility):
Add helper function to find the best of all available
found possibilities that qualify given the min. threshold.
(gst_type_find_element_handle_event):
Fix the case where we get an EOS while still in TYPEFIND
mode (we want to chose the best of all possible types,
not just the first type that happens to be in our unsorted
list of possible types).
(gst_type_find_element_chain):
Make sure we return GST_FLOW_ERROR when we errored out
in stop_typefinding(); also, don't just find the best of
all found type entries and then use the last examined
type entry, but actually use the best entry.
2005-12-12 17:09:04 +00:00
Michael Smith 3af7b196f9 plugins/elements/gsttypefindelement.c: Now that we're not leaking factories, make sure we keep references to them whi...
Original commit message from CVS:
* plugins/elements/gsttypefindelement.c: (free_entry),
(gst_type_find_element_chain):
Now that we're not leaking factories, make sure we keep references
to them while we need them.
2005-12-12 12:32:04 +00:00
Michael Smith 88e514af33 plugins/elements/gsttypefindelement.c: Fix leaking element factories in typefinding.
Original commit message from CVS:
* plugins/elements/gsttypefindelement.c: (find_peek),
(gst_type_find_element_chain):
Fix leaking element factories in typefinding.
Fix problem where we forgot about a probable type on non-seekable
files, and thus later mis-typefound it.
2005-12-09 17:26:31 +00:00
Thomas Vander Stichele 288f61d21f expand tabs
Original commit message from CVS:
expand tabs
2005-12-06 19:29:15 +00:00
Wim Taymans b9eaa6aebe check/Makefile.am: Enable valgrind check that should work fine now.
Original commit message from CVS:
* check/Makefile.am:
Enable valgrind check that should work fine now.

* gst/elements/gsttypefindelement.c: (gst_type_find_element_init):
* gst/gstqueue.c: (gst_queue_init):
Fix memleaks in pad allocation.
2005-11-16 17:18:34 +00:00
Thomas Vander Stichele 74546e0323 Revert all these unrefs, they don't even pass make check !
Original commit message from CVS:
Revert all these unrefs, they don't even pass make check !
2005-11-15 23:53:08 +00:00
Johan Dahlin 8a9bd6aac8 And gst_object_unref here too
Original commit message from CVS:
And gst_object_unref here too
2005-11-15 19:48:40 +00:00
Johan Dahlin ba68a823c9 gst/: Free pad templates, fixes a couple of leaks.
Original commit message from CVS:
* gst/base/gstbasesrc.c: (gst_base_src_init):
* gst/elements/gsttypefindelement.c: (gst_type_find_element_init):
* gst/gstqueue.c: (gst_queue_init):
Free pad templates, fixes a couple of leaks.
2005-11-15 19:31:05 +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
Tim-Philipp Müller 215a6a26e0 docs/manual/advanced-position.xml: Update seek example and explanations to current 0.9 API.
Original commit message from CVS:
* docs/manual/advanced-position.xml:
Update seek example and explanations to current 0.9 API.
* gst/elements/gsttypefindelement.c:
(gst_type_find_element_activate):
Remove FIXME comment now that the found caps
are unreffed.
2005-11-03 09:18:53 +00:00
Johan Dahlin c49861f331 gst/elements/gsttypefindelement.c (gst_type_find_element_activate): Unref found_caps after we used it.
Original commit message from CVS:
* gst/elements/gsttypefindelement.c (gst_type_find_element_activate):
Unref found_caps after we used it.
2005-11-02 14:28:02 +00:00
Wim Taymans 7612a38449 gst/: API change fix.
Original commit message from CVS:
* gst/base/gstbasesink.c: (gst_base_sink_commit_state),
(gst_base_sink_handle_object), (gst_base_sink_query), (do_playing):
* gst/base/gstbasesrc.c: (gst_base_src_query):
* gst/elements/gstfilesink.c: (gst_file_sink_query):
* gst/elements/gsttypefindelement.c:
(gst_type_find_handle_src_query), (find_element_get_length),
(gst_type_find_element_activate):
API change fix.

* gst/gstquery.c: (gst_query_new_position),
(gst_query_set_position), (gst_query_parse_position),
(gst_query_new_duration), (gst_query_set_duration),
(gst_query_parse_duration), (gst_query_set_segment),
(gst_query_parse_segment):
* gst/gstquery.h:
Bundling query position/duration is not a good idea since duration
does not change much and we don't want to recalculate it for every
position query, so they are separated again..
Base value in segment query is not needed.

* gst/gstqueue.c: (gst_queue_handle_src_query):
* gst/gstutils.c: (gst_element_query_position),
(gst_element_query_duration), (gst_pad_query_position),
(gst_pad_query_duration):
* gst/gstutils.h:
Updates for query API change.
Added some docs here and there.
2005-10-19 15:50:10 +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 2bc75efbf3 gst/elements/: fix some signedness
Original commit message from CVS:

* gst/elements/gstfakesrc.h:
* gst/elements/gstfilesrc.c: (gst_file_src_create_read):
* gst/elements/gsttypefindelement.c:
fix some signedness
* gst/elements/gstfilesink.c: (gst_file_sink_render):
I wonder if this could actually write +2GB files before
2005-10-13 17:43:36 +00:00
Wim Taymans 6d0be74351 Use GstClockTime in _get_state() instead of GTimeVal.
Original commit message from CVS:
* check/gst/gstbin.c: (GST_START_TEST):
* check/gst/gstelement.c: (GST_START_TEST):
* check/gst/gstevent.c: (GST_START_TEST), (test_event):
* check/gst/gstghostpad.c: (GST_START_TEST):
* check/gst/gstpipeline.c: (GST_START_TEST):
* check/pipelines/simple_launch_lines.c: (run_pipeline):
* check/states/sinks.c: (GST_START_TEST):
* gst/elements/gsttypefindelement.c: (stop_typefinding):
* gst/gstbin.c: (gst_bin_provide_clock_func), (gst_bin_add_func),
(gst_bin_remove_func), (gst_bin_get_state_func),
(gst_bin_recalc_state), (gst_bin_change_state_func),
(bin_bus_handler):
* gst/gstelement.c: (gst_element_get_state_func),
(gst_element_get_state), (gst_element_abort_state),
(gst_element_commit_state), (gst_element_set_state),
(gst_element_change_state), (gst_element_change_state_func):
* gst/gstelement.h:
* gst/gstpipeline.c: (gst_pipeline_class_init), (do_pipeline_seek),
(gst_pipeline_provide_clock_func):
* gst/gstutils.c: (gst_element_link_pads_filtered):
* tools/gst-launch.c: (main):
* tools/gst-typefind.c: (main):
Use GstClockTime in _get_state() instead of GTimeVal.
Remove old code in gstutils.c
2005-10-12 12:18:48 +00:00
Tim-Philipp Müller 99d855fdc9 gst/elements/: Make element details static.
Original commit message from CVS:
* gst/elements/gstcapsfilter.c:
* gst/elements/gstfakesink.c:
* gst/elements/gstfakesrc.c:
* gst/elements/gstfdsink.c:
* gst/elements/gstfdsrc.c:
* gst/elements/gstfilesink.c:
* gst/elements/gstfilesrc.c:
* gst/elements/gstidentity.c:
* gst/elements/gsttee.c:
* gst/elements/gsttypefindelement.c:
Make element details static.
2005-09-28 12:52:51 +00:00
David Schleef 02bde78085 check/gst/gstplugin.c: More testing
Original commit message from CVS:
* check/gst/gstplugin.c: (register_check_elements),
(GST_START_TEST), (peek), (suggest), (gst_plugin_suite):
More testing
* gst/elements/gsttypefindelement.c: Fix refcounting.
* gst/gsttypefind.c:
* gst/gsttypefindfactory.c:
* gst/gsttypefindfactory.h:
2005-09-16 03:46:14 +00:00
Stefan Kost 628f773e65 gst/: splitted gsttypefind into gsttypefind, gsttypefindfactory
Original commit message from CVS:
* gst/Makefile.am:
* gst/elements/gstbufferstore.h:
* gst/elements/gsttypefindelement.c:
* gst/elements/gsttypefindelement.h:
* gst/gst.h:
* gst/gsttypefind.c:
* gst/gsttypefind.h:
* gst/gsttypefindfactory.c: (gst_type_find_factory_get_type),
(gst_type_find_factory_class_init), (gst_type_find_factory_init),
(gst_type_find_factory_dispose),
(gst_type_find_factory_unload_thyself),
(gst_type_find_load_plugin), (gst_type_find_factory_get_list),
(gst_type_find_factory_get_caps),
(gst_type_find_factory_get_extensions),
(gst_type_find_factory_call_function):
* gst/gsttypefindfactory.h:
* gst/registries/gstlibxmlregistry.c:
* gst/registries/gstxmlregistry.c:
splitted gsttypefind into gsttypefind, gsttypefindfactory
2005-09-07 12:35:23 +00:00
Andy Wingo e040bb2dbe gst/gstelement.h (GstState): Renamed from GstElementState, changed to be a normal enum instead of flags.
Original commit message from CVS:
2005-09-02  Andy Wingo  <wingo@pobox.com>

* gst/gstelement.h (GstState): Renamed from GstElementState,
changed to be a normal enum instead of flags.
(GstStateChangeReturn): Renamed from GstElementStateReturn, names
munged to be GST_STATE_CHANGE_*.
(GST_STATE_CHANGE): Renamed from GST_STATE_TRANSITION, updated to
work with the new state representation.
(GstStateChange): New enumeration of possible state transitions.
Replaces GST_STATE_FOO_TO_BAR with GST_STATE_CHANGE_FOO_TO_BAR.
(GstElementClass::change_state): Pass the GstStateChange along as
an argument. Helps language bindings, so they don't have to use
tricky lock-needing macros like GST_STATE_CHANGE ().

* scripts/update-states (file): New script. Run it on a file to
update it for state naming and API changes. Updates files in
place.

* All files updated for the new API.
2005-09-02 15:42:00 +00:00
Andy Wingo 944491ab45 gst/gstutils.h (GST_BOILERPLATE_FULL): Prototype instance_init as having two arguments instead of just one. Allows su...
Original commit message from CVS:
2005-08-28  Andy Wingo  <wingo@pobox.com>

* gst/gstutils.h (GST_BOILERPLATE_FULL): Prototype instance_init
as having two arguments instead of just one. Allows superclasses
to access information on subclasses -- see the terrible for() loop
in gtype.c:g_type_create_instance for the reason why. All callers
changed.
2005-08-28 17:45:58 +00:00
Tim-Philipp Müller 536aef2218 gst/elements/gsttypefindelement.*: Set caps on all outgoing buffers, not just the first one.
Original commit message from CVS:
* gst/elements/gsttypefindelement.c:
(gst_type_find_element_have_type), (gst_type_find_element_init),
(stop_typefinding), (gst_type_find_element_handle_event),
(gst_type_find_element_chain), (gst_type_find_element_getrange):
* gst/elements/gsttypefindelement.h:
Set caps on all outgoing buffers, not just the first one.
2005-08-01 11:15:47 +00:00
Tim-Philipp Müller 8ec43a5445 gst/elements/gsttypefindelement.*: Set caps on first outgoing buffer when we've found the type.
Original commit message from CVS:
* gst/elements/gsttypefindelement.c:
(gst_type_find_element_have_type),
(gst_type_find_element_check_set_buffer_caps),
(gst_type_find_element_init), (stop_typefinding),
(gst_type_find_element_handle_event),
(gst_type_find_element_chain), (gst_type_find_element_getrange):
* gst/elements/gsttypefindelement.h:
Set caps on first outgoing buffer when we've found the type.
2005-08-01 09:10:01 +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 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
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 26a1c2c663 gst/elements/gsttypefindelement.c (do_pull_typefind): Query the file size, pass it on to the type find helper.
Original commit message from CVS:
2005-06-02  Andy Wingo  <wingo@pobox.com>

* gst/elements/gsttypefindelement.c (do_pull_typefind): Query the
file size, pass it on to the type find helper.

* gst/base/gstbasesrc.c (gst_basesrc_do_seek): Set the
segment_start and segment_end properly according to the seek
method. Segment_end is still a bit flaky because offset can be
negative for CUR and END cases, but it takes -1 as an "unset"
value.
2005-06-02 11:12:34 +00:00
Ronald S. Bultje f0ed41684a gst/base/gstbasesrc.c: Don't go in pull mode for non-seekable sources.
Original commit message from CVS:
* gst/base/gstbasesrc.c: (gst_basesrc_activate):
Don't go in pull mode for non-seekable sources.
* gst/elements/gsttypefindelement.c: (gst_type_find_element_init),
(gst_type_find_element_dispose), (gst_type_find_handle_src_query),
(free_entry), (stop_typefinding),
(gst_type_find_element_handle_event), (find_peek),
(gst_type_find_element_chain), (do_pull_typefind),
(gst_type_find_element_change_state):
Allow typefinding (w/o seeking) in push-mode, simplified version
of what was in 0.8.
* gst/gstutils.c: (gst_buffer_join):
* gst/gstutils.h:
gst_buffer_join() from 0.8.
2005-05-25 15:57:57 +00:00
David Schleef e134f7f75b check/Makefile.am: remove GstData checks
Original commit message from CVS:
* check/Makefile.am: remove GstData checks
* check/gst-libs/gdp.c: (START_TEST): fix for API changes
* gst/Makefile.am: add miniobject, remove data
* gst/gst.h: add miniobject, remove data
* gst/gstdata.c: remove
* gst/gstdata.h: remove
* gst/gstdata_private.h: remove
* gst/gsttypes.h: remove GstEvent and GstMessage
* gst/gstelement.c: (gst_element_post_message): fix for API changes
* gst/gstmarshal.list: change BOXED -> OBJECT
Implement GstMiniObject.
* gst/gstminiobject.c:
* gst/gstminiobject.h:
Modify to be subclasses of GstMiniObject.
* gst/gstbuffer.c: (_gst_buffer_initialize), (gst_buffer_get_type),
(gst_buffer_class_init), (gst_buffer_finalize), (_gst_buffer_copy),
(gst_buffer_init), (gst_buffer_new), (gst_buffer_new_and_alloc),
(gst_subbuffer_get_type), (gst_subbuffer_init),
(gst_buffer_create_sub), (gst_buffer_is_span_fast),
(gst_buffer_span):
* gst/gstbuffer.h:
* gst/gstevent.c: (_gst_event_initialize), (gst_event_get_type),
(gst_event_class_init), (gst_event_init), (gst_event_finalize),
(_gst_event_copy), (gst_event_new):
* gst/gstevent.h:
* gst/gstmessage.c: (_gst_message_initialize),
(gst_message_get_type), (gst_message_class_init),
(gst_message_init), (gst_message_finalize), (_gst_message_copy),
(gst_message_new), (gst_message_new_error),
(gst_message_new_warning), (gst_message_new_tag),
(gst_message_new_state_changed), (gst_message_new_application):
* gst/gstmessage.h:
* gst/gstprobe.c: (gst_probe_perform),
(gst_probe_dispatcher_dispatch):
* gst/gstprobe.h:
* gst/gstquery.c: (_gst_query_initialize), (gst_query_get_type),
(gst_query_class_init), (gst_query_finalize), (gst_query_init),
(_gst_query_copy), (gst_query_new):
Update elements for GstData -> GstMiniObject changes
* gst/gstquery.h:
* gst/gstqueue.c: (gst_queue_finalize), (gst_queue_locked_flush),
(gst_queue_chain), (gst_queue_loop):
* gst/elements/gstbufferstore.c:
(gst_buffer_store_add_buffer_func),
(gst_buffer_store_cleared_func), (gst_buffer_store_get_buffer):
* gst/elements/gstfakesink.c: (gst_fakesink_class_init),
(gst_fakesink_render):
* gst/elements/gstfakesrc.c: (gst_fakesrc_class_init):
* gst/elements/gstfilesrc.c: (gst_mmap_buffer_get_type),
(gst_mmap_buffer_class_init), (gst_mmap_buffer_init),
(gst_mmap_buffer_finalize), (gst_filesrc_map_region),
(gst_filesrc_create_read):
* gst/elements/gstidentity.c: (gst_identity_class_init):
* gst/elements/gsttypefindelement.c:
(gst_type_find_element_src_event), (free_entry_buffers),
(gst_type_find_element_handle_event):
* libs/gst/dataprotocol/dataprotocol.c:
(gst_dp_header_from_buffer):
* libs/gst/dataprotocol/dataprotocol.h:
* libs/gst/dataprotocol/dp-private.h:
2005-05-16 20:21:55 +00:00
Ronald S. Bultje 5b9c84091d gst/: Handle negative offsets better. Fixes decodebin.
Original commit message from CVS:
* gst/base/gsttypefindhelper.c: (helper_find_peek):
* gst/elements/gsttypefindelement.c: (find_peek):
Handle negative offsets better. Fixes decodebin.
2005-05-09 15:54:26 +00:00