Commit graph

29 commits

Author SHA1 Message Date
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 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
Andy Wingo a08a8d8fea libs/gst/base/: en-LARGE the padding.
Original commit message from CVS:
2005-11-29  Andy Wingo  <wingo@pobox.com>

* libs/gst/base/gstbasetransform.h:
* libs/gst/base/gstbasesrc.h:
* libs/gst/base/gstbasesink.h: en-LARGE the padding.

* gst/gstconfig.h.in (GST_PADDING_LARGE): New define, the number
of pointers by which to pad very extensible base classes (like the
ones in libs/gst/base).
2005-11-29 19:37:49 +00:00
Wim Taymans a9f7f7b7b6 Doc fixes.
Original commit message from CVS:
Doc fixes.
2005-11-24 09:44:07 +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
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
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 7a2e55a750 forgot this one
Original commit message from CVS:
forgot this one
2005-10-11 17:33:25 +00:00
Wim Taymans d80f874fc8 gst/base/gstbasesink.*: Repost EOS message while going to PLAYING if still EOS.
Original commit message from CVS:
* gst/base/gstbasesink.c: (gst_base_sink_preroll_queue_flush),
(gst_base_sink_handle_object), (gst_base_sink_event),
(gst_base_sink_wait), (gst_base_sink_handle_event),
(gst_base_sink_change_state):
* gst/base/gstbasesink.h:
Repost EOS message while going to PLAYING if still EOS.
Make sure that when receiving a FLUSH_START we don't attempt
to sync on the clock anymore.
2005-10-08 09:58:30 +00:00
Wim Taymans 3a3b15c8a3 gst/base/gstbasesink.*: Added sync property to basesink to disable clock sync.
Original commit message from CVS:
* gst/base/gstbasesink.c: (gst_base_sink_class_init),
(gst_base_sink_set_property), (gst_base_sink_get_property),
(gst_base_sink_do_sync):
* gst/base/gstbasesink.h:
Added sync property to basesink to disable clock sync.
2005-09-20 12:05:47 +00:00
Thomas Vander Stichele 9b3e3a2613 various doc fixes
Original commit message from CVS:
various doc fixes
2005-09-11 12:57:36 +00:00
Wim Taymans 8099c34220 gst/base/gstbasesink.*: Handle newsegments more correctly.
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_handle_event):
* gst/base/gstbasesink.h:
Handle newsegments more correctly.

* gst/gstbus.c:
Fix docs.

* gst/gstevent.c: (gst_event_new_newsegment):
A newsegment cannot have a start_time of -1
2005-09-01 18:12:18 +00:00
Andy Wingo 9d1b5e07b3 check/pipelines/simple_launch_lines.c (run_pipeline): Check element_set_state's return val.
Original commit message from CVS:
2005-08-26  Andy Wingo  <wingo@pobox.com>

* check/pipelines/simple_launch_lines.c (run_pipeline): Check
element_set_state's return val.
(test_2_elements): Add test that's been disabled for months.

* gst/elements/gstfakesink.c: Cleanups. Add can-activate-push and
can-activate-pull properties.

* gst/elements/gstfakesrc.c: Cleanups. Add can-activate-push and
can-activate-pull properties. Implement is_seekable so fakesrc can
operate in pull mode.

* gst/base/gstbasesink.c (GstBaseSink): Remove has-loop, has-chain
properties.
(gst_base_sink_activate, gst_base_sink_activate_pull)
(gst_base_sink_activate_push): Make activation mode choosing work.
Cleanups.
(gst_base_sink_chain, gst_base_sink_loop): Assert activation mode
is right. Make pull mode work. Post an eos before pausing in pull
mode.
(gst_base_sink_change_state): Pay attention to the core's
change_state() return val.

* gst/base/gstbasesrc.c (GstBaseSrc): Remove has-loop,
has-getrange properties. Cleanups.

* gst/base/gstbasesrc.h (GstBaseSrc): Remove has_loop,
has_getrange and replace with can_activate_pull and
can_activate_push.

* gst/base/gstbasesink.h (GstBaseSink): Rearrange fields, add
locking comments. Remove has_loop, has_chain and replace with
can_activate_pull and can_activate_push.
2005-08-26 14:21:43 +00:00
Wim Taymans ec8ec3da8a gst/base/gstbasesink.*: Handle newsegment events correctly.
Original commit message from CVS:
* gst/base/gstbasesink.c: (gst_base_sink_handle_object),
(gst_base_sink_get_times), (gst_base_sink_do_sync),
(gst_base_sink_handle_buffer), (gst_base_sink_change_state):
* gst/base/gstbasesink.h:
Handle newsegment events correctly.
Drop buffers out of the segment range.
2005-08-24 17:57:36 +00:00
Andy Wingo aa0fb69d49 Make sure that when a pipeline goes to PLAYING, that data has actually hit the sink.
Original commit message from CVS:
2005-08-18  Andy Wingo  <wingo@pobox.com>

Make sure that when a pipeline goes to PLAYING, that data has
actually hit the sink.

* check/states/sinks.c (test_sink): A sink that doesn't get any
data shouldn't return SUCCESS for going to either PLAYING or
PAUSED. Test also the return values on the way back down.

* gst/gstelement.c (gst_element_set_state): When changing the
state of an element currently changing state asynchronously, go to
lost-state after commiting the pending state. Makes future calls
to get_state continue to return ASYNC.

* gst/base/gstbasesink.c (gst_base_sink_change_state): Return
ASYNC when going to PLAYING if we still don't have preroll, as can
happen with live sources.
2005-08-18 16:20:24 +00:00
Stefan Kost cdc8ba9725 docs/gst/gstreamer-sections.txt: made some defines private
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
made some defines private
* docs/gst/tmpl/gstconfig.sgml:
* docs/gst/tmpl/gstqueue.sgml:
* docs/gst/tmpl/gsttaglist.sgml:
* docs/gst/tmpl/gsttypes.sgml:
* docs/gst/tmpl/gstutils.sgml:
* docs/pwg/appendix-porting.xml:
* gst/base/gstbasesink.h:
* gst/base/gstbasesrc.c:
* gst/base/gstbasesrc.h:
* gst/elements/gstfakesink.c: (gst_fake_sink_class_init):
* gst/elements/gstfakesrc.c: (gst_fake_src_class_init):
* gst/gstelement.c: (gst_element_class_init):
* gst/gstpad.c: (gst_pad_class_init):
* gst/gstqueue.c: (gst_queue_class_init):
* gst/gstxml.c: (gst_xml_class_init):
documented all undocumented signal inline
* libs/gst/controller/gst-controller.h:
added padding
2005-08-15 16:57:34 +00:00
Tim-Philipp Müller 46cc9bc152 gst/: Add padding to our base elements' class and instance structs and to GstIterator (you will need to rebuild all p...
Original commit message from CVS:
* gst/base/gstadapter.h:
* gst/base/gstbasesink.h:
* gst/base/gstbasesrc.h:
* gst/base/gstbasetransform.h:
* gst/base/gstcollectpads.h:
* gst/base/gstpushsrc.h:
* gst/gstiterator.h:
Add padding to our base elements' class and instance structs and
to GstIterator (you will need to rebuild all plugins and apps!)
2005-08-08 13:31:09 +00:00
Stefan Kost 722f83a8fc add short/long description docs to base classes add pushsrc to the docs remove consolidated doc fragments
Original commit message from CVS:
add short/long description docs to base classes
add pushsrc to the docs
remove consolidated doc fragments
2005-08-03 13:30:18 +00:00
Wim Taymans 030ff93e82 docs/design/part-seeking.txt: Some small additions.
Original commit message from CVS:
* docs/design/part-seeking.txt:
Some small additions.

* gst/base/gstbasesink.c: (gst_base_sink_handle_object),
(gst_base_sink_get_times), (gst_base_sink_do_sync),
(gst_base_sink_activate_push), (gst_base_sink_activate_pull):
* gst/base/gstbasesink.h:
discont values are gint64, handle the math correctly.

* gst/base/gstbasesrc.c: (gst_base_src_loop):
Make the basesrc report error if the source pad is not linked.

* gst/gstqueue.c: (gst_queue_link_src), (gst_queue_chain),
(gst_queue_loop), (gst_queue_handle_src_query),
(gst_queue_src_activate_push):
Make queue collect data even if the srcpad is not linked.
Start pushing out data as soon as it is linked.

* gst/gstutils.c: (gst_element_unlink), (gst_flow_get_name):
* gst/gstutils.h:
Added gst_flow_get_name() to ease error reporting.
2005-07-21 17:22:13 +00:00
Wim Taymans d5be929bf8 gst/base/gstbasesink.*: Store and use discont values when syncing buffers as described in design docs.
Original commit message from CVS:
* gst/base/gstbasesink.c: (gst_base_sink_handle_object),
(gst_base_sink_event), (gst_base_sink_get_times),
(gst_base_sink_do_sync), (gst_base_sink_change_state):
* gst/base/gstbasesink.h:
Store and use discont values when syncing buffers as described
in design docs.

* gst/base/gstbasesrc.c: (gst_base_src_send_discont),
(gst_base_src_do_seek), (gst_base_src_loop), (gst_base_src_start),
(gst_base_src_activate_push):
Push discont event when starting.

* gst/elements/gstidentity.c: (gst_identity_transform):
Small cleanups.

* gst/gstbin.c: (gst_bin_change_state):
Small cleanups in base_time  distribution.

* gst/gstelement.c: (gst_element_set_base_time),
(gst_element_get_base_time), (gst_element_change_state):
* gst/gstelement.h:
Added methods for the base_time of the element.
Some MT fixes.

* gst/gstpipeline.c: (gst_pipeline_send_event),
(gst_pipeline_change_state), (gst_pipeline_set_new_stream_time),
(gst_pipeline_get_last_stream_time):
* gst/gstpipeline.h:
MT fixes.
Handle seeking as described in design doc, remove stream_time
hack.
Cleanups clock and stream_time selection code. Added accessors
for the stream_time.
2005-07-16 14:41:25 +00:00
Thomas Vander Stichele 82596fea62 more macro splitting
Original commit message from CVS:
more macro splitting
2005-07-10 12:03:13 +00:00
Wim Taymans 03aa950f7d gst/base/: Make basesrc negotiate.
Original commit message from CVS:
* gst/base/README:
* gst/base/gstbasesink.c: (gst_base_sink_preroll_queue_empty),
(gst_base_sink_handle_object), (gst_base_sink_loop),
(gst_base_sink_change_state):
* gst/base/gstbasesink.h:
* gst/base/gstbasesrc.c: (gst_base_src_class_init),
(gst_base_src_init), (gst_base_src_setcaps),
(gst_base_src_getcaps), (gst_base_src_loop),
(gst_base_src_default_negotiate), (gst_base_src_negotiate),
(gst_base_src_start), (gst_base_src_change_state):
* gst/base/gstbasesrc.h:
Make basesrc negotiate.
Handle the case where preroll fails in basesink.
Update README.
2005-07-06 13:25:26 +00:00
Wim Taymans 6a6a717235 gst/base/gstbasesink.*: Some tweaks, only EOS and a buffer complete a preroll.
Original commit message from CVS:
* gst/base/gstbasesink.c: (gst_base_sink_preroll_queue_empty),
(gst_base_sink_preroll_queue_flush), (gst_base_sink_handle_object),
(gst_base_sink_change_state):
* gst/base/gstbasesink.h:
Some tweaks, only EOS and a buffer complete a preroll.
2005-06-30 12:14:47 +00:00
Thomas Vander Stichele f0e5bb0a33 did s/bases(rc/ink)_/base_s(rc/ink)_/; wim wants to remove base completely, but that's for later
Original commit message from CVS:
did s/bases(rc/ink)_/base_s(rc/ink)_/; wim wants to remove base completely, but that's for later
2005-06-28 12:01:49 +00:00
Wim Taymans d3edbe1718 gst/: Bufferalloc: return GstFlowReturn to more accuratly report why allocation failed.
Original commit message from CVS:
* gst/base/gstbasesink.c: (gst_basesink_pad_buffer_alloc),
(gst_base_sink_buffer_alloc), (gst_basesink_preroll_queue_push),
(gst_basesink_activate):
* gst/base/gstbasesink.h:
* gst/gstpad.c: (gst_pad_set_active), (gst_pad_link_prepare),
(gst_pad_link), (gst_pad_accept_caps), (gst_pad_alloc_buffer),
(gst_pad_query), (gst_pad_start_task):
* gst/gstpad.h:
* gst/gstqueue.c: (gst_queue_bufferalloc),
(gst_queue_handle_sink_event), (gst_queue_chain):
Bufferalloc: return GstFlowReturn to more accuratly report
why allocation failed.
2005-06-02 09:42:02 +00:00
Wim Taymans c11c932f88 Some more documentation.
Original commit message from CVS:
* docs/design/part-element-sink.txt:
* docs/design/part-element-source.txt:
* gst/base/gstbasesink.c: (gst_basesink_class_init),
(gst_basesink_event), (gst_basesink_activate):
* gst/base/gstbasesink.h:
* gst/base/gstbasesrc.c: (gst_basesrc_init), (gst_basesrc_unlock),
(gst_basesrc_activate):
* gst/base/gstbasesrc.h:
* gst/gstelement.c: (gst_element_pads_activate):
Some more documentation.
Fixed scheduling decision in _pads_activate().
2005-05-06 08:25:19 +00:00
Wim Taymans 113250d274 gst/: Added object to help in making collect pad based elements.
Original commit message from CVS:
* gst/base/Makefile.am:
* gst/base/gstbasesink.h:
* gst/base/gstbasesrc.c: (gst_basesrc_init),
(gst_basesrc_set_dataflow_funcs), (gst_basesrc_query):
* gst/base/gstcollectpads.c: (gst_collectpads_get_type),
(gst_collectpads_class_init), (gst_collectpads_init),
(gst_collectpads_finalize), (gst_collectpads_new),
(gst_collectpads_set_function), (gst_collectpads_add_pad),
(find_pad), (gst_collectpads_remove_pad),
(gst_collectpads_is_active), (gst_collectpads_collect),
(gst_collectpads_collect_range), (gst_collectpads_start),
(gst_collectpads_stop), (gst_collectpads_peek),
(gst_collectpads_pop), (gst_collectpads_available),
(gst_collectpads_read), (gst_collectpads_flush),
(gst_collectpads_chain):
* gst/base/gstcollectpads.h:
* gst/elements/Makefile.am:
* gst/elements/gstelements.c:
* gst/elements/gstfakesink.c: (gst_fakesink_class_init),
(gst_fakesink_get_times), (gst_fakesink_event),
(gst_fakesink_preroll), (gst_fakesink_render):
* gst/elements/gstfilesink.c: (gst_filesink_class_init),
(gst_filesink_init), (gst_filesink_set_location),
(gst_filesink_open_file), (gst_filesink_close_file),
(gst_filesink_pad_query), (gst_filesink_event),
(gst_filesink_render), (gst_filesink_change_state):
* gst/elements/gstfilesink.h:
Added object to help in making collect pad based elements.
Ported filesink.
Make event function in sink baseclass return gboolean.
2005-05-05 09:31:59 +00:00
Wim Taymans bb1be5f509 gst/: Simplify pad activation.
Original commit message from CVS:
* gst/base/Makefile.am:
* gst/base/README:
* gst/base/gstbasesink.c: (gst_basesink_get_type),
(gst_basesink_base_init), (gst_basesink_class_init),
(gst_basesink_pad_getcaps), (gst_basesink_init),
(gst_basesink_activate), (gst_basesink_change_state):
* gst/base/gstbasesink.h:
* gst/base/gstbasetransform.c: (gst_base_transform_get_type),
(gst_base_transform_base_init), (gst_base_transform_finalize),
(gst_base_transform_class_init), (gst_base_transform_init),
(gst_base_transform_proxy_getcaps), (gst_base_transform_setcaps),
(gst_base_transform_event), (gst_base_transform_getrange),
(gst_base_transform_chain), (gst_base_transform_handle_buffer),
(gst_base_transform_set_property),
(gst_base_transform_get_property),
(gst_base_transform_sink_activate),
(gst_base_transform_src_activate),
(gst_base_transform_change_state):
* gst/base/gstbasetransform.h:
* gst/elements/gstidentity.c: (gst_identity_finalize),
(gst_identity_class_init), (gst_identity_init),
(gst_identity_event), (gst_identity_check_perfect),
(gst_identity_transform), (gst_identity_set_property),
(gst_identity_get_property), (gst_identity_change_state):
* gst/elements/gstidentity.h:
* gst/gstelement.c: (gst_element_get_state_func),
(gst_element_lost_state), (gst_element_pads_activate):
* gst/gstpad.c: (gst_pad_set_active), (gst_pad_peer_set_active),
(gst_pad_check_pull_range), (gst_pad_pull_range):
* gst/gstpad.h:
Simplify pad activation.
Added function to check if pull_range can be performed.
Error out when pulling inactive or flushing pads.
Removed const from refcounted types as it does not make sense.
Simplify pad templates in basesink
Added base class for simple 1-to-1 transforms.
Make identity subclass the base transform.
2005-03-29 16:18:12 +00:00
Wim Taymans 326d36b8d8 Added state change code.
Original commit message from CVS:
Added state change code.
Added/updated docs.
Added sink base class, make fakesink extend the base class.
Small cleanups in GstPipeline.
2005-03-28 14:54:33 +00:00