Commit graph

126 commits

Author SHA1 Message Date
Wim Taymans 7c9402d5ab libs/gst/base/gstbasesink.c: Small cleanups.
Original commit message from CVS:
* libs/gst/base/gstbasesink.c: (gst_base_sink_init),
(gst_base_sink_do_sync):
Small cleanups.
Use QOS debug category.
2006-03-13 11:16:45 +00:00
Thomas Vander Stichele 485f6d33cd log what we're waiting on
Original commit message from CVS:
log what we're waiting on
2006-03-10 19:12:01 +00:00
Wim Taymans 99a61247bc gst/gstclock.*: Review docs.
Original commit message from CVS:
* gst/gstclock.c: (gst_clock_entry_new),
(gst_clock_id_compare_func), (gst_clock_id_wait),
(gst_clock_id_wait_async), (gst_clock_id_unschedule),
(gst_clock_init), (gst_clock_get_internal_time),
(gst_clock_set_master), (do_linear_regression),
(gst_clock_add_observation), (gst_clock_set_property):
* gst/gstclock.h:
Review docs.
Small cleanups.
Fix a possible segfault when the window-size is made smaller.
Calculate jitter before performing the clock wait. Ideally
the clock implementation should calculate jitter but we need
API breakage for that.
* gst/gstsystemclock.c: (gst_system_clock_init):
Docs review.
* libs/gst/base/gstbasesink.c: (gst_base_sink_do_sync):
Remove leftover else
* tests/check/gst/gstsystemclock.c: (GST_START_TEST),
(gst_systemclock_suite):
Added check to test GST_CLOCK_DIFF.
2006-03-09 11:45:14 +00:00
Wim Taymans 06aa56aca4 libs/gst/base/gstbasesink.c: Use last buffer timestamp in qos message.
Original commit message from CVS:
* libs/gst/base/gstbasesink.c: (gst_base_sink_do_sync):
Use last buffer timestamp in qos message.
2006-03-08 09:46:54 +00:00
Wim Taymans 7a88e2a762 docs/libs/gstreamer-libs-sections.txt: Added basesink new methods.
Original commit message from CVS:
* docs/libs/gstreamer-libs-sections.txt:
Added basesink new methods.
* gst/gstevent.c:
* gst/gstevent.h:
Docs updates. Flesh out the QoS docs.
* libs/gst/base/gstadapter.c:
Small doc clarification about ownership and flushing.
* libs/gst/base/gstbasesink.c: (gst_base_sink_set_sync),
(gst_base_sink_get_sync), (gst_base_sink_set_max_lateness),
(gst_base_sink_get_max_lateness), (gst_base_sink_set_property),
(gst_base_sink_get_property), (gst_base_sink_do_sync):
* libs/gst/base/gstbasesink.h:
Added new methods to allow subclass to control max-lateness
and sync.
Generate very basic QoS events based on last sync observation.
Updated docs, fix typo, added some QoS blurb.
* libs/gst/base/gstbasesrc.c:
Remove obsolete _get_state() calls from docs.
2006-03-07 16:21:02 +00:00
Wim Taymans 991af9aab5 libs/gst/base/gstbasesink.c: Make property overridable.
Original commit message from CVS:
* libs/gst/base/gstbasesink.c: (gst_base_sink_class_init):
Make property overridable.
2006-03-06 16:10:42 +00:00
Wim Taymans 3290a06b36 libs/gst/base/gstbasesink.*: Make max-lateness a property.
Original commit message from CVS:
* libs/gst/base/gstbasesink.c: (gst_base_sink_class_init),
(gst_base_sink_init), (gst_base_sink_set_property),
(gst_base_sink_get_property), (gst_base_sink_do_sync):
* libs/gst/base/gstbasesink.h:
Make max-lateness a property.
2006-03-06 16:02:37 +00:00
Wim Taymans 6367b03096 libs/gst/base/gstbasesink.c: Don't ever draw a frame that is >10ms late.
Original commit message from CVS:
* libs/gst/base/gstbasesink.c: (gst_base_sink_wait_clock),
(gst_base_sink_do_sync), (gst_base_sink_render_object):
Don't ever draw a frame that is >10ms late.
2006-03-06 15:16:23 +00:00
Wim Taymans c1b135b4a3 Docs fixes.
Original commit message from CVS:
* gst/gstbuffer.c:
* gst/gstquery.c: (gst_query_list_add_format),
(gst_query_set_formatsv), (gst_query_parse_formats_length),
(gst_query_parse_formats_nth):
* libs/gst/base/gstbasesink.c: (gst_base_sink_get_sync_times):
Docs fixes.
2006-02-14 13:07:10 +00:00
Andy Wingo 55ff7942ee libs/gst/base/gstcollectpads.c (gst_collect_pads_chain): Only update last_stop if we're in TIME format and the timest...
Original commit message from CVS:
2006-02-07  Andy Wingo  <wingo@pobox.com>

* libs/gst/base/gstcollectpads.c (gst_collect_pads_chain): Only
update last_stop if we're in TIME format and the timestamp is
valid.

* libs/gst/base/gstcollectpads.c (gst_collect_pads_event)
* libs/gst/base/gstbasetransform.c (gst_base_transform_eventfunc):
* libs/gst/base/gstbasesink.c (gst_base_sink_configure_segment):
If we get a new newsegment with a different format, adapt
accordingly.

* gst/gstclock.c (gst_clock_set_calibration): Accept a numerator
of 0. Not a problem, really.
2006-02-07 15:49:40 +00:00
Andy Wingo e8f2242503 libs/gst/base/gstbasesink.c (gst_base_sink_chain_unlocked): Only warn if sync=true.
Original commit message from CVS:
2006-02-07  Andy Wingo  <wingo@pobox.com>

* libs/gst/base/gstbasesink.c (gst_base_sink_chain_unlocked): Only
warn if sync=true.
2006-02-07 13:20:16 +00:00
Wim Taymans d5c530e34f libs/gst/base/gstbasesink.c: Only keep track of prerollable items when we are prerolling.
Original commit message from CVS:
* libs/gst/base/gstbasesink.c: (gst_base_sink_do_sync),
(gst_base_sink_render_object),
(gst_base_sink_queue_object_unlocked):
Only keep track of prerollable items when we are
prerolling.
Before rendering after preroll, always check if we
have queued items.
Added some more debugging.
2006-02-02 16:12:35 +00:00
Wim Taymans be1f48de3a docs/design/part-element-sink.txt: Updated document.
Original commit message from CVS:
* docs/design/part-element-sink.txt:
Updated document.

* libs/gst/base/gstbasesink.c: (gst_base_sink_init),
(gst_base_sink_finalize), (gst_base_sink_preroll_queue_flush),
(gst_base_sink_configure_segment), (gst_base_sink_commit_state),
(gst_base_sink_get_sync_times), (gst_base_sink_wait_clock),
(gst_base_sink_do_sync), (gst_base_sink_render_object),
(gst_base_sink_preroll_object),
(gst_base_sink_queue_object_unlocked),
(gst_base_sink_queue_object), (gst_base_sink_event),
(gst_base_sink_chain_unlocked), (gst_base_sink_chain),
(gst_base_sink_loop), (gst_base_sink_activate_pull),
(gst_base_sink_get_position), (gst_base_sink_change_state):
* libs/gst/base/gstbasesink.h:
Totally refactored matching the design doc.
Use two segments, one to clip incomming buffers and another to
perform sync.
Handle queueing correctly, bypass the queue when playing.
Make EOS cancelable.
Handle errors correctly when operating in pull based mode.

* tests/check/elements/fakesink.c: (GST_START_TEST),
(fakesink_suite):
Added new check for sinks.
2006-02-02 12:07:48 +00:00
Wim Taymans 0cab8b4fbc libs/gst/base/gstbasesink.c: Basesink cleanups, remove some old code.
Original commit message from CVS:
* libs/gst/base/gstbasesink.c: (gst_base_sink_init),
(gst_base_sink_preroll_queue_empty), (gst_base_sink_commit_state),
(gst_base_sink_handle_object), (gst_base_sink_event),
(gst_base_sink_is_prerolled), (gst_base_sink_wait),
(gst_base_sink_do_sync), (gst_base_sink_handle_event),
(gst_base_sink_handle_buffer), (gst_base_sink_set_flushing),
(gst_base_sink_deactivate), (gst_base_sink_activate),
(gst_base_sink_activate_pull), (gst_base_sink_get_position),
(gst_base_sink_query), (gst_base_sink_change_state):
Basesink cleanups, remove some old code.
Handle the case where a subclass can preroll in the render
method (mostly audiosinks).
Handle more events.
Remove some locks around variables that are now protected
with the PREROLL_LOCK (clock_id, flushing, ..).
Optimize position query some more, do correct locking.
Remove old code to push queue in state change, this is not
needed anymore since preroll blocks on all prerollable items
now.
Almost implemented as described in design doc.
2006-01-30 16:07:48 +00:00
Julien Moutte 8791aa4fbc libs/gst/base/gstbasesink.c: We only query position using the clock in the playing state.
Original commit message from CVS:
2006-01-25  Julien MOUTTE  <julien@moutte.net>

* libs/gst/base/gstbasesink.c: (gst_base_sink_get_position):
We only query position using the clock in the playing state.
Query peer in the other cases.
* win32/common/config.h: Updates.
2006-01-25 18:07:02 +00:00
Wim Taymans 213c508b5c gst/gstsystemclock.c: A clock entry that is scheduled for the exact time of the clock is still in time.
Original commit message from CVS:
* gst/gstsystemclock.c: (gst_system_clock_id_wait_unlocked):
A clock entry that is scheduled for the exact time of the
clock is still in time.

* libs/gst/base/gstbasesink.c: (gst_base_sink_handle_object),
(gst_base_sink_do_sync):
Add some more debug info.
2006-01-24 16:23:17 +00:00
Wim Taymans c33121174b gst/: Added some more debug info.
Original commit message from CVS:
* gst/gstbin.c: (gst_bin_element_set_state):
* gst/gstclock.c: (gst_clock_id_wait):
Added some more debug info.

* libs/gst/base/gstadapter.c:
Added more docs.

* libs/gst/base/gstbasesink.c: (gst_base_sink_handle_object),
(gst_base_sink_do_sync), (gst_base_sink_chain):
Added some comments.
2006-01-18 18:01:54 +00:00
Wim Taymans a42ee31bd8 libs/gst/base/gstbasesink.c: Some cleanups.
Original commit message from CVS:
* libs/gst/base/gstbasesink.c: (gst_base_sink_handle_object),
(gst_base_sink_do_sync):
Some cleanups.
When the sink finishes blocking on the preroll buffer, it can
immediatly render it instead of rendering when the next buffer
arrives.
2006-01-18 17:18:39 +00:00
Wim Taymans 94e1664fca libs/gst/base/gstbasesink.c: Small cleanups.
Original commit message from CVS:
* libs/gst/base/gstbasesink.c: (gst_base_sink_set_property),
(gst_base_sink_get_property), (gst_base_sink_do_sync),
(gst_base_sink_chain):
Small cleanups.
GST_ELEMENT_CLOCK and sync are protected with LOCK.
Don't store _last_stop if the buffer is dropped.
2006-01-18 16:40:16 +00:00
Sébastien Moutte 3c5c1d29ea libs/gst/base/gstbasesink.c: *cur = (now - base) * basesink->segment.abs_rate + time; replaced by
Original commit message from CVS:
* libs/gst/base/gstbasesink.c:
*cur = (now - base) * basesink->segment.abs_rate + time; replaced by
*cur = gst_guint64_to_gdouble(now - base) * basesink->segment.abs_rate + time; for vs6
* win32/common/config.h:
added some defines GST_MAJORMINOR and HOST_CPU
* win32/common/libgstbase.def:
* win32/common/libgstreamer.def:
added some exported functions
2006-01-12 22:04:58 +00:00
Wim Taymans 588e11ad39 libs/gst/: Documentation updates.
Original commit message from CVS:
* libs/gst/base/gstadapter.c:
* libs/gst/base/gstadapter.h:
* libs/gst/base/gstbasesink.c: (gst_base_sink_class_init),
(gst_base_sink_get_position):
* libs/gst/base/gstbasesink.h:
* libs/gst/base/gstbasesrc.c: (gst_base_src_class_init),
(gst_base_src_default_query), (gst_base_src_default_do_seek),
(gst_base_src_do_seek), (gst_base_src_perform_seek),
(gst_base_src_send_event), (gst_base_src_update_length),
(gst_base_src_get_range), (gst_base_src_loop),
(gst_base_src_start):
* libs/gst/base/gstbasesrc.h:
* libs/gst/base/gstbasetransform.h:
* libs/gst/base/gstcollectpads.h:
* libs/gst/base/gstpushsrc.c:
* libs/gst/base/gstpushsrc.h:
* libs/gst/dataprotocol/dataprotocol.c:
* libs/gst/dataprotocol/dataprotocol.h:
* libs/gst/net/gstnetclientclock.h:
* libs/gst/net/gstnettimeprovider.h:
Documentation updates.
2005-12-18 16:04:41 +00:00
Wim Taymans 6a80d3c4ea libs/gst/base/gstbasesink.c: Take current playback rate into account when reporting the position.
Original commit message from CVS:
* libs/gst/base/gstbasesink.c: (gst_base_sink_get_position):
Take current playback rate into account when reporting
the position.
2005-12-12 10:16:11 +00:00
Wim Taymans d16ce65df7 gst/gstbuffer.c: Small docs update.
Original commit message from CVS:
* gst/gstbuffer.c:
Small docs update.

* gst/gstcaps.c: (gst_caps_is_equal):
Don't assert on NULL <--> X. Fixes #323260

* gst/gstminiobject.c: (gst_mini_object_replace):
If we're doing atomic operations, we might just as well use
the proper way to get an atomic pointer.

* libs/gst/base/gstbasesink.c: (gst_base_sink_get_position):
Clean up debugging.
2005-12-07 15:16:43 +00:00
Wim Taymans db2b4d916c gst/gstutils.c: Small cleanup.
Original commit message from CVS:
* gst/gstutils.c: (gst_util_uint64_scale_int64),
(gst_util_uint64_scale_int):
Small cleanup.

* libs/gst/base/gstbasesink.c: (gst_base_sink_handle_object):
Add debug log line.

* libs/gst/base/gstbasetransform.c: (gst_base_transform_event):
Add FIXME.
2005-12-02 11:36:50 +00:00
Edward Hervey c4d1ffa5c7 gst/base/gstbasesink.c: Properly handle non GST_FORMAT_TIME segment
Original commit message from CVS:
* gst/base/gstbasesink.c: (gst_base_sink_handle_object),
(gst_base_sink_event), (gst_base_sink_do_sync),
(gst_base_sink_activate_pull), (gst_base_sink_change_state):
Properly handle non GST_FORMAT_TIME segment
* gst/elements/gstidentity.c: (gst_identity_transform_ip):
Properly handle non GST_FORMAT_TIME segment
* gst/gstsegment.c:
This function is valid if the accumulator is 0 and the format
is different from the requested format.
2005-11-29 17:13:44 +00:00
Michael Smith 836eb1dd02 gst/base/gstbasesink.c: Unlock the PREROLL_LOCK in a failure case.
Original commit message from CVS:
2005-11-24  Michael Smith <msmith@fluendo.com>

* gst/base/gstbasesink.c: (gst_base_sink_handle_object):
Unlock the PREROLL_LOCK in a failure case.
2005-11-24 12:44:25 +00:00
Wim Taymans cf925ebb6f gst/base/gstbasesink.*: No need to store the clock, the parent element class already has it.
Original commit message from CVS:
* gst/base/gstbasesink.c: (gst_base_sink_class_init),
(gst_base_sink_wait), (gst_base_sink_do_sync),
(gst_base_sink_handle_event):
* gst/base/gstbasesink.h:
No need to store the clock, the parent element class already
has it.

* gst/gstbin.c: (gst_bin_set_clock_func), (gst_bin_add_func):
Updates for clock_set returning a gboolean

* gst/gstclock.c: (gst_clock_entry_new), (gst_clock_id_wait),
(gst_clock_id_wait_async), (gst_clock_class_init),
(gst_clock_init), (gst_clock_finalize),
(gst_clock_get_internal_time), (gst_clock_get_time),
(gst_clock_slave_callback), (gst_clock_set_master),
(gst_clock_get_master), (do_linear_regression),
(gst_clock_add_observation), (gst_clock_set_property),
(gst_clock_get_property):
* gst/gstclock.h:
Implement master/slave. When setting a clock as a slave, a
periodic timeout is scheduled to sample master and slave times.
Then the slave clock is recalibrated to match offset and rate
of the master clock.
Update logging a bit.
Add flag so that a clock can state that is cannot be slaved to
another clock.

* gst/gstelement.c: (gst_element_set_clock):
* gst/gstelement.h:
The set_clock returns a gboolean for when an element cannot
deal with the selected clock in the pipeline.

* gst/gstpipeline.c: (gst_pipeline_change_state),
(gst_pipeline_set_clock):
* gst/gstpipeline.h:
Handle the case where the selected clock cannot be set on
the pipeline.

* gst/net/gstnetclientclock.c: (gst_net_client_clock_class_init),
(gst_net_client_clock_init), (gst_net_client_clock_finalize),
(gst_net_client_clock_set_property),
(gst_net_client_clock_get_property),
(gst_net_client_clock_observe_times):
* gst/net/gstnetclientclock.h:
Use regression code in GstClock parent, remove duplicated
functionality.
2005-11-22 18:28:44 +00:00
Andy Wingo 19858fd9f0 gst/gstevent.h (gst_event_new_new_segment) (gst_event_parse_new_segment, gst_event_new_buffer_size)
Original commit message from CVS:
2005-11-22  Andy Wingo  <wingo@pobox.com>

* gst/gstevent.h (gst_event_new_new_segment)
(gst_event_parse_new_segment, gst_event_new_buffer_size)
(gst_event_parse_buffer_size, gst_ghost_pad_new_no_target):
Renamed from *_newsegment, *_buffersize, *_notarget.

* scripts/update-funcnames: New script, performs the changes
listed above.
2005-11-22 11:48:58 +00:00
Wim Taymans e9606ada93 gst/base/gstbasesink.c: Make sure the GstFlowReturn is returned.
Original commit message from CVS:
* gst/base/gstbasesink.c: (gst_base_sink_handle_object):
Make sure the GstFlowReturn is returned.

* gst/gstbus.c: (gst_bus_add_signal_watch_full),
(gst_bus_add_signal_watch):
* gst/gstbus.h:
add gst_bus_add_signal_watch_full.

* gst/gstplugin.c: (gst_plugin_load_file):
Small style cleanup.
2005-11-22 11:25:01 +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
Wim Taymans a35882df1f More segment updates, replace code in plugins with segment helper functions.
Original commit message from CVS:
* check/gst/gstsegment.c: (GST_START_TEST):
* docs/design/part-TODO.txt:
* gst/base/gstbasesink.c: (gst_base_sink_handle_object),
(gst_base_sink_event), (gst_base_sink_do_sync),
(gst_base_sink_activate_pull), (gst_base_sink_get_position),
(gst_base_sink_query), (gst_base_sink_change_state):
* gst/base/gstbasesink.h:
* gst/base/gstbasesrc.c: (gst_base_src_init), (gst_base_src_query),
(gst_base_src_default_newsegment),
(gst_base_src_configure_segment), (gst_base_src_do_seek),
(gst_base_src_get_range), (gst_base_src_loop),
(gst_base_src_change_state):
* gst/base/gstbasesrc.h:
* gst/base/gstbasetransform.c:
(gst_base_transform_prepare_output_buf),
(gst_base_transform_event), (gst_base_transform_change_state):
* gst/base/gstbasetransform.h:
* gst/base/gstcollectpads.c: (gst_collect_pads_add_pad),
(gst_collect_pads_event):
* gst/base/gstcollectpads.h:
* gst/elements/gstfakesrc.c: (gst_fake_src_init),
(gst_fake_src_create):
* gst/elements/gstfakesrc.h:
* gst/elements/gstidentity.c: (gst_identity_transform_ip):
* gst/gstsegment.c: (gst_segment_init), (gst_segment_set_duration),
(gst_segment_set_last_stop), (gst_segment_set_seek),
(gst_segment_set_newsegment), (gst_segment_to_stream_time),
(gst_segment_to_running_time), (gst_segment_clip):
* gst/gstsegment.h:
More segment updates, replace code in plugins with segment
helper functions.
2005-11-21 17:09:45 +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
Jan Schmidt c05ba2d666 check/gst/gstvalue.c: Add a deserialisation test for fractions
Original commit message from CVS:
* check/gst/gstvalue.c: (GST_START_TEST), (gst_value_suite):
Add a deserialisation test for fractions
* examples/metadata/read-metadata.c: (message_loop),
(make_pipeline), (main):
Fix up metadata reading sample.
* gst/base/gstbasesink.c: (gst_base_sink_do_sync):
Debug format fix
* gst/base/gstbasesrc.c: (gst_base_src_default_negotiate):
Don't try and fixate empty caps
* gst/gst_private.h:
Wrap in G_BEGIN_DECLS/G_END_DECLS
* gst/gstvalue.c: (gst_value_collect_fraction),
(gst_value_set_fraction), (gst_value_get_fraction_denominator),
(gst_value_transform_string_fraction),
(gst_value_compare_fraction):
Add some extra guards to ensure that we don't end up
with an invalid denominator of 0 in a gstfraction and
that fractions always get reduced.
2005-11-20 17:12:49 +00:00
Edward Hervey d32702193e gst/base/gstbasesink.c: Also reset the ->current_* values in READY->PAUSED
Original commit message from CVS:
* gst/base/gstbasesink.c: (gst_base_sink_change_state):
Also reset the ->current_* values in READY->PAUSED
2005-11-18 14:49:28 +00:00
Wim Taymans d72c6e95ed gst/base/gstbasesink.c: For the current position in stream time, we need to subtract accumulated time.
Original commit message from CVS:
* gst/base/gstbasesink.c: (gst_base_sink_get_position):
For the current position in stream time, we need to subtract
accumulated time.

* gst/gstsystemclock.c: (gst_system_clock_async_thread):
Release lock before calling the callback function of async
entries.
2005-11-18 13:18:44 +00:00
Wim Taymans b0233e7b7f gst/base/gstbasesink.c: segment_stop == -1 at startup.
Original commit message from CVS:
* gst/base/gstbasesink.c: (gst_base_sink_change_state):
segment_stop == -1 at startup.

* gst/base/gstbasetransform.c: (gst_base_transform_event),
(gst_base_transform_change_state):
Init segment values at start.
2005-11-15 17:18:10 +00:00
Wim Taymans eb29555a92 gst/base/gstbasesink.c: 0 segment values are 0 in any format.
Original commit message from CVS:
* gst/base/gstbasesink.c: (gst_base_sink_handle_object):
0 segment values are 0 in any format.

* gst/base/gstbasetransform.c: (gst_base_transform_event):
* gst/base/gstbasetransform.h:
Parse newsegment correctly in basetransform

* gst/elements/gstidentity.c: (gst_identity_transform_ip):
Sync to clock using updated segment values.
2005-11-15 16:47:07 +00:00
Michael Smith 6b2425e5a4 gst/base/gstbasesink.c: Don't sync on buffers that fall partially outside our current segment. Prevents an assertion ...
Original commit message from CVS:
* gst/base/gstbasesink.c: (gst_base_sink_do_sync):
Don't sync on buffers that fall partially outside our current
segment. Prevents an assertion failure/abort playing some files.
2005-11-11 15:19:37 +00:00
Wim Taymans d5a2005e0c gst/base/: Implement clock sync in base class.
Original commit message from CVS:
* gst/base/gstbasesink.c: (gst_base_sink_do_sync):
* gst/base/gstbasesrc.c: (gst_base_src_wait),
(gst_base_src_do_sync), (gst_base_src_get_range):
Implement clock sync in base class.
2005-11-10 14:45:27 +00:00
Andy Wingo 179f6c4f3b gst/base/gstbasesink.c: Add the beginning of docs here -- have to work on something else now tho...
Original commit message from CVS:
2005-11-09  Andy Wingo  <wingo@pobox.com>

* gst/base/gstbasesink.c: Add the beginning of docs here -- have
to work on something else now tho...
2005-11-09 10:06:30 +00:00
Wim Taymans 5bb924622f gst/: Avoid excessive typechecking in macros.
Original commit message from CVS:
* gst/base/gstbasesink.c: (gst_base_sink_preroll_queue_empty),
(gst_base_sink_do_sync), (gst_base_sink_handle_event),
(gst_base_sink_chain), (gst_base_sink_change_state):
* gst/base/gstbasesink.h:
* gst/base/gstbasesrc.h:
* gst/gstelement.h:
* gst/gstevent.h:
Avoid excessive typechecking in macros.

* gst/gstminiobject.c: (gst_mini_object_get_type),
(gst_mini_object_init), (gst_mini_object_new),
(gst_mini_object_free):
* gst/gstobject.c: (gst_object_class_init), (gst_object_init),
(gst_object_finalize):
Remove cruft code, optimize alloc_trace.
2005-11-08 11:13:07 +00:00
Wim Taymans 82a38aff77 check/states/sinks.c: Uncomment fixed check.
Original commit message from CVS:
* check/states/sinks.c: (GST_START_TEST):
Uncomment fixed check.

* docs/design/part-TODO.txt:
Updated TODO.

* gst/base/gstbasesink.c: (gst_base_sink_commit_state),
(gst_base_sink_handle_object), (gst_base_sink_do_sync),
(gst_base_sink_get_position):
If we are going to PLAYING, post the right pending state
when we post the intermediate paused message.

* gst/gstelement.c: (gst_element_continue_state),
(gst_element_set_state_func), (gst_element_change_state):
Don't post state changes that were between the same state
and were not ASYNC.
2005-11-03 20:14:24 +00:00
Wim Taymans 43fe0b06e9 check/states/sinks.c: Added some more checks. Specifically the case where NO_PREROLL elements are in the pipeline.
Original commit message from CVS:
* check/states/sinks.c: (GST_START_TEST), (gst_object_suite):
Added some more checks. Specifically the case where NO_PREROLL
elements are in the pipeline.

* gst/base/gstbasesink.c: (gst_base_sink_commit_state),
(gst_base_sink_handle_object), (gst_base_sink_do_sync),
(gst_base_sink_get_position):
Post READY->PAUSED state change messages too.
Fix bug where VOID was posted as pending state...

* gst/gstbin.c: (gst_bin_recalc_state):
use _element_continue_state() to continue the state change.

* gst/gstelement.c: (gst_element_continue_state),
(gst_element_commit_state), (gst_element_set_state_func),
(gst_element_change_state), (gst_element_change_state_func):
Lots of state change cleanups, assign the STATE_RETURN in
a new continue_state() function that also propagates the
last return value from a state change to the app.
Update some debug statements with proper category.
2005-11-03 17:12:00 +00:00
Wim Taymans f2e8f7198f gst/base/gstbasesink.c: Some more debugging.
Original commit message from CVS:
* gst/base/gstbasesink.c: (gst_base_sink_handle_object),
(gst_base_sink_do_sync), (gst_base_sink_get_position):
Some more debugging.

* gst/base/gstbasetransform.c: (gst_base_transform_finalize),
(gst_base_transform_init), (gst_base_transform_buffer_alloc),
(gst_base_transform_event), (gst_base_transform_getrange),
(gst_base_transform_chain):
* gst/base/gstbasetransform.h:
Fix debugging,
Protect transform and concurrent buffer alloc with a new lock.
Try not to break ABI/API.
2005-10-27 20:59:00 +00:00
Wim Taymans 7f22710f65 gst/base/gstbasesink.c: Some more debug.
Original commit message from CVS:
* gst/base/gstbasesink.c: (gst_base_sink_handle_object),
(gst_base_sink_get_position):
Some more debug.

* gst/gstbin.c: (message_check), (bin_replace_message),
(bin_remove_messages), (is_eos), (gst_bin_add_func),
(update_degree), (gst_bin_sort_iterator_next), (bin_bus_handler),
(bin_query_duration_init), (bin_query_duration_fold),
(bin_query_duration_done), (bin_query_generic_fold),
(gst_bin_query):
* tools/gst-launch.c: (main):
Remove old option.
2005-10-27 08:55:44 +00:00
Wim Taymans b204604572 gst/base/gstbasesink.c: Don't use invalid stream_time.
Original commit message from CVS:
* gst/base/gstbasesink.c: (gst_base_sink_get_position):
Don't use invalid stream_time.

* gst/gstevent.c: (gst_event_new_newsegment):
stream_time in newsegment cannot be undefined.
2005-10-25 10:15:45 +00:00
Thomas Vander Stichele 013e3acc3d remove prematurely added error category and clean up the instances
Original commit message from CVS:
remove prematurely added error category and clean up the instances
2005-10-23 09:08:44 +00:00
Wim Taymans 62cfdde715 gst/base/gstbasesink.c: Simply set the right flag when going to playing, that's all we need to do instead of calling ...
Original commit message from CVS:
* gst/base/gstbasesink.c: (gst_base_sink_commit_state),
(gst_base_sink_get_position), (gst_base_sink_query),
(gst_base_sink_change_state):
Simply set the right flag when going to playing, that's all
we need to do instead of calling a function inside the object
lock (that could take the lock as well and deadlock)
2005-10-21 17:53:31 +00:00
Wim Taymans 17b62f0353 docs/design/part-TODO.txt: Update TODO
Original commit message from CVS:
* docs/design/part-TODO.txt:
Update TODO

* gst/base/gstbasesink.c: (gst_base_sink_get_position),
(gst_base_sink_query):
Don't use clock time to report position when in EOS.
2005-10-20 17:18:12 +00:00
Wim Taymans 4dbc7a5bf8 gst/base/gstbasesink.c: Speed up current position calculation.
Original commit message from CVS:
* gst/base/gstbasesink.c: (gst_base_sink_get_position),
(gst_base_sink_query):
Speed up current position calculation.

* gst/base/gstbasesrc.c: (gst_base_src_query),
(gst_base_src_default_newsegment):
Correctly set stream position in newsegment.

* gst/gstbin.c: (gst_bin_add_func), (add_to_queue),
(update_degree), (gst_bin_sort_iterator_next),
(gst_bin_sort_iterator_resync), (gst_bin_sort_iterator_free):
* gst/gstmessage.c: (gst_message_new_custom):
Clean up debugging info

* gst/gstqueue.c: (gst_queue_link_src), (gst_queue_chain),
(gst_queue_loop), (gst_queue_handle_src_query):
Pause task faster.
2005-10-20 11:48:53 +00:00