Commit graph

200 commits

Author SHA1 Message Date
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
Wim Taymans f3850aca81 libs/gst/base/gstbasesink.c: Small doc update.
Original commit message from CVS:
* libs/gst/base/gstbasesink.c: (gst_base_sink_class_init):
Small doc update.
2008-02-29 15:39:44 +00:00
Sebastian Dröge 2faa733276 Revert previous changes to the behaviour of GstPadTemplates, etc and the possiblity to call them in class_init as it ...
Original commit message from CVS:
* gst/gstbin.c: (gst_bin_get_type), (gst_bin_base_init),
(gst_bin_class_init):
* gst/gstelement.c: (gst_element_base_class_init),
(gst_element_class_add_pad_template):
* gst/gstpadtemplate.c: (gst_pad_template_init):
* gst/gstpipeline.c: (gst_pipeline_get_type),
(gst_pipeline_base_init), (gst_pipeline_class_init):
* libs/gst/base/gstbasesink.c:
* libs/gst/base/gstbasesrc.c: (gst_base_src_get_type),
(gst_base_src_base_init), (gst_base_src_class_init):
* plugins/elements/gstcapsfilter.c: (gst_capsfilter_base_init),
(gst_capsfilter_class_init):
* plugins/elements/gstfakesink.c: (gst_fake_sink_base_init),
(gst_fake_sink_class_init):
* plugins/elements/gstfakesrc.c: (gst_fake_src_base_init),
(gst_fake_src_class_init):
* plugins/elements/gstfdsink.c: (gst_fd_sink_base_init),
(gst_fd_sink_class_init):
* plugins/elements/gstfdsrc.c: (gst_fd_src_base_init),
(gst_fd_src_class_init):
* plugins/elements/gstfilesink.c: (gst_file_sink_base_init),
(gst_file_sink_class_init):
* plugins/elements/gstfilesrc.c: (gst_file_src_base_init),
(gst_file_src_class_init):
* plugins/elements/gstidentity.c: (gst_identity_base_init),
(gst_identity_class_init):
* plugins/elements/gstmultiqueue.c: (gst_multi_queue_base_init),
(gst_multi_queue_class_init):
* plugins/elements/gstqueue.c: (gst_queue_base_init),
(gst_queue_class_init):
* plugins/elements/gsttee.c: (gst_tee_base_init),
(gst_tee_class_init):
* plugins/elements/gsttypefindelement.c:
(gst_type_find_element_base_init),
(gst_type_find_element_class_init):
* tests/check/gst/gstelement.c: (gst_element_suite):
Revert previous changes to the behaviour of GstPadTemplates, etc
and the possiblity to call them in class_init as it breaks too
many elements. Reopens bug #491501.
Should be applied again for 0.11, thus added a few FIXME 0.11 at
several places.
2008-02-05 14:15:15 +00:00
Sebastian Dröge 9db28f8537 Don't use base_init where not absolutely necessary. For example it's not necessary anymore for adding pad templates o...
Original commit message from CVS:
* gst/gstbin.c: (gst_bin_get_type), (gst_bin_class_init):
* gst/gstpipeline.c: (gst_pipeline_get_type),
(gst_pipeline_class_init):
* libs/gst/base/gstbasesink.c: (gst_base_sink_get_type),
(gst_base_sink_class_init):
* libs/gst/base/gstbasesrc.c: (gst_base_src_get_type),
(gst_base_src_class_init):
* libs/gst/base/gstbasetransform.c: (gst_base_transform_get_type),
(gst_base_transform_class_init):
* libs/gst/base/gstcollectpads.c: (gst_collect_pads_base_init),
(gst_collect_pads_class_init):
* libs/gst/base/gstdataqueue.c: (gst_data_queue_get_type):
* libs/gst/net/gstnettimeprovider.c:
(gst_net_time_provider_base_init),
(gst_net_time_provider_class_init):
* plugins/elements/gstcapsfilter.c: (gst_capsfilter_base_init),
(gst_capsfilter_class_init):
* plugins/elements/gstfakesink.c: (gst_fake_sink_base_init),
(gst_fake_sink_class_init):
* plugins/elements/gstfakesrc.c: (gst_fake_src_base_init),
(gst_fake_src_class_init):
* plugins/elements/gstfdsink.c: (gst_fd_sink_base_init),
(gst_fd_sink_class_init):
* plugins/elements/gstfdsrc.c: (gst_fd_src_base_init),
(gst_fd_src_class_init):
* plugins/elements/gstfilesink.c: (gst_file_sink_base_init),
(gst_file_sink_class_init):
* plugins/elements/gstfilesrc.c: (gst_file_src_base_init),
(gst_file_src_class_init):
* plugins/elements/gstidentity.c: (gst_identity_base_init),
(gst_identity_class_init):
* plugins/elements/gstmultiqueue.c: (gst_multi_queue_base_init),
(gst_multi_queue_class_init):
* plugins/elements/gstqueue.c: (gst_queue_base_init),
(gst_queue_class_init):
* plugins/elements/gsttee.c: (gst_tee_base_init),
(gst_tee_class_init):
* plugins/elements/gsttypefindelement.c:
(gst_type_find_element_base_init),
(gst_type_find_element_class_init):
Don't use base_init where not absolutely necessary. For example it's
not necessary anymore for adding pad templates or setting element
details.
Leave empty base_init functions in several places as GST_BOILERPLATE
still defines and uses them.
2008-02-03 12:04:37 +00:00
Wim Taymans ba976a1864 libs/gst/base/gstbasesink.c: Add fixme regarding EOS in pull mode.
Original commit message from CVS:
* libs/gst/base/gstbasesink.c: (gst_base_sink_loop),
(gst_base_sink_get_position_paused):
Add fixme regarding EOS in pull mode.
Fix position reporting in PAUSED for negative rates.
2008-02-01 10:27:10 +00:00
Stefan Kost 55bfc68e93 libs/gst/base/: Replace gst_pad_get_parent by GST_OBJECT_PARENT inside streaming thread. Correct log message in gstba...
Original commit message from CVS:
* libs/gst/base/gstbasesink.c:
* libs/gst/base/gstbasesrc.c:
* libs/gst/base/gstbasetransform.c:
Replace gst_pad_get_parent by GST_OBJECT_PARENT inside streaming
thread. Correct log message in gstbasesrc.c.
2007-12-13 16:49:54 +00:00
Stefan Kost 428a4e9669 Change GST_GET_TIMESTAMP into gst_util_get_timestamp and replace all uses as we don't have HAVE_POSIX_TIMERS in publi...
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstclock.h:
* gst/gstdebugutils.c:
* gst/gstinfo.c:
* gst/gstutils.c:
* gst/gstutils.h:
* libs/gst/base/gstbasesink.c:
* tools/gst-launch.c:
Change GST_GET_TIMESTAMP into gst_util_get_timestamp and replace all
uses as we don't have HAVE_POSIX_TIMERS in public headers.
Thanks Tim for spotting.
2007-12-11 20:23:58 +00:00
Stefan Kost 8e2d76084f libs/gst/base/gstbasesink.c: Use new API to get elapsed time.
Original commit message from CVS:
* libs/gst/base/gstbasesink.c:
Use new API to get elapsed time.
2007-11-28 13:02:30 +00:00
Wim Taymans b4c503929a libs/gst/base/gstbasesink.c: Only send upstream events upstream. Fixes #498746.
Original commit message from CVS:
* libs/gst/base/gstbasesink.c: (gst_base_sink_send_event):
Only send upstream events upstream. Fixes #498746.
2007-11-21 13:47:52 +00:00
Wim Taymans 2c51884bb8 libs/gst/base/gstbasesink.c: Don't hold the object lock when unreffing a buffer because it could cause a deadlock whe...
Original commit message from CVS:
* libs/gst/base/gstbasesink.c: (gst_base_sink_set_last_buffer):
Don't hold the object lock when unreffing a buffer because it could
cause a deadlock when the finalize function wants to grab the object
lock too. Fixes #495133.
2007-11-09 14:05:02 +00:00
Wim Taymans c28238d8fe gst/gstsegment.c: Also accumulate time correctly when doing reverse playback. Fixes #488201,
Original commit message from CVS:
* gst/gstsegment.c: (gst_segment_set_newsegment_full),
(gst_segment_to_stream_time), (gst_segment_to_running_time):
Also accumulate time correctly when doing reverse playback. Fixes
#488201,
When converting to running and stream time, use default values for
start/stop/time/accum when comparing different formats. Fixes #494245.
* libs/gst/base/gstbasesink.c: (gst_base_sink_get_sync_times):
Do running/stream time in TIME format.
* tests/check/gst/gstsegment.c: (GST_START_TEST),
(gst_segment_suite):
2 new unit tests for segment accumulation.
2007-11-09 11:56:41 +00:00
Wim Taymans 9e50fa303e libs/gst/base/gstbasesink.c: Don't try to report a 0 position when we don't know, return -1 and FALSE instead. This m...
Original commit message from CVS:
* libs/gst/base/gstbasesink.c: (gst_base_sink_get_sync_times),
(gst_base_sink_do_sync), (gst_base_sink_preroll_object),
(gst_base_sink_event), (gst_base_sink_get_position_last),
(gst_base_sink_get_position_paused), (gst_base_sink_get_position),
(gst_base_sink_change_state):
Don't try to report a 0 position when we don't know, return -1 and FALSE
instead. This mostly happens when we are prerolling.
Make sure we can report the right position before we post the ASYNC_DONE
message so that a message handler can query position without races.
* tests/check/generic/sinks.c: (send_eos), (GST_START_TEST),
(async_done_handoff), (async_done_func), (send_buffer),
(async_done_eos_func), (gst_sinks_suite):
Add two tests for the above.
2007-11-06 10:33:22 +00:00
Wim Taymans 2715cf6e28 Add a new last-buffer property that contains the last buffer used in basesink for preroll or rendering. useful for ma...
Original commit message from CVS:
* docs/libs/gstreamer-libs-sections.txt:
* libs/gst/base/gstbasesink.c: (gst_base_sink_class_init),
(gst_base_sink_get_last_buffer), (gst_base_sink_set_last_buffer),
(gst_base_sink_get_property), (gst_base_sink_render_object),
(gst_base_sink_preroll_object),
(gst_base_sink_queue_object_unlocked), (gst_base_sink_event),
(gst_base_sink_change_state):
* libs/gst/base/gstbasesink.h:
Add a new last-buffer property that contains the last buffer used in
basesink for preroll or rendering. useful for making snapshots.
API: gst_base_sink_get_last_buffer()
API: GstBaseSink::last-buffer
2007-10-30 18:30:13 +00:00
Wim Taymans cf21248714 libs/gst/base/gstbasesink.c: Reset last seen position after flushing so that we don't report the old position anymore.
Original commit message from CVS:
* libs/gst/base/gstbasesink.c: (gst_base_sink_event):
Reset last seen position after flushing so that we don't report the old
position anymore.
2007-10-25 17:20:47 +00:00
Wim Taymans 8a96f93dc2 libs/gst/base/gstbasesink.*: Add function to wait for EOS, subclasses can use this to correctly wait for devices to d...
Original commit message from CVS:
Patch inspired by: Benoit Fouet <benoit dot fouet at purplelabs dot com>
* libs/gst/base/gstbasesink.c: (gst_base_sink_wait_eos),
(gst_base_sink_event):
* libs/gst/base/gstbasesink.h:
Add function to wait for EOS, subclasses can use this to correctly wait
for devices to drain before performing the EOS logic. Fixes #485343.
API: gst_base_sink_wait_eos()
2007-10-10 15:18:44 +00:00
Wim Taymans de5d9793d7 libs/gst/base/gstbasesink.c: When we received EOS and are waiting for when to post the EOS message, our state is prer...
Original commit message from CVS:
* libs/gst/base/gstbasesink.c: (gst_base_sink_preroll_queue_flush),
(gst_base_sink_queue_object_unlocked),
(gst_base_sink_queue_object), (gst_base_sink_event),
(gst_base_sink_needs_preroll), (gst_base_sink_chain_unlocked):
When we received EOS and are waiting for when to post the EOS message,
our state is prerolled and we should not return ASYNC.
Reorganize some code paths to implement this behavior.
* tests/check/generic/sinks.c: (send_eos), (GST_START_TEST),
(gst_sinks_suite):
Add unit test to verify above EOS fix.
2007-10-08 17:05:06 +00:00
Wim Taymans 71f92e2b3e libs/gst/base/gstbasesink.c: Don't try to preroll non-async elements after a flush.
Original commit message from CVS:
* libs/gst/base/gstbasesink.c: (gst_base_sink_event),
(gst_base_sink_get_position):
Don't try to preroll non-async elements after a flush.
Subtract latency form clock times when reporting position.
2007-10-08 10:21:15 +00:00
Wim Taymans 5865af927f libs/gst/base/gstbasesink.c: Return correct gboolean from query function.
Original commit message from CVS:
* libs/gst/base/gstbasesink.c: (gst_base_sink_query_latency),
(gst_base_sink_event), (gst_base_sink_change_state):
Return correct gboolean from query function.
2007-09-24 12:46:17 +00:00
Wim Taymans af6e6cf1cc libs/gst/base/gstbasesink.c: Simplify latency query.
Original commit message from CVS:
* libs/gst/base/gstbasesink.c: (gst_base_sink_query_latency),
(gst_base_sink_event), (gst_base_sink_query),
(gst_base_sink_change_state):
Simplify latency query.
When not synchronizing, we can report latency without querying the peer
element.
2007-09-24 12:29:23 +00:00
Wim Taymans 86bae93b0c libs/gst/base/gstbasesink.c: Sinks that don't preroll can always be queried for the latency.
Original commit message from CVS:
* libs/gst/base/gstbasesink.c: (gst_base_sink_preroll_queue_flush),
(gst_base_sink_event), (gst_base_sink_change_state):
Sinks that don't preroll can always be queried for the latency.
Don't post ASYNC start when we are not async.
2007-09-14 23:06:31 +00:00
Wim Taymans 4987f5a70f libs/gst/base/gstbasesink.c: Latency query is allowed after we are prerolled. Introduce a new flag for this and stop ...
Original commit message from CVS:
* libs/gst/base/gstbasesink.c: (gst_base_sink_init),
(gst_base_sink_preroll_queue_flush), (gst_base_sink_commit_state),
(gst_base_sink_wait_preroll), (gst_base_sink_needs_preroll),
(gst_base_sink_set_flushing), (gst_base_sink_query),
(gst_base_sink_change_state):
Latency query is allowed after we are prerolled. Introduce a new flag
for this and stop abusing other variables.
2007-09-14 15:52:27 +00:00
Wim Taymans 851eaad606 libs/gst/base/gstbasesink.c: Protect eos and have_preroll with the OBJECT lock so we don't need to take the PREROLL l...
Original commit message from CVS:
* libs/gst/base/gstbasesink.c: (gst_base_sink_preroll_queue_flush),
(gst_base_sink_wait_preroll), (gst_base_sink_needs_preroll),
(gst_base_sink_query):
Protect eos and have_preroll with the OBJECT lock so we don't need to
take the PREROLL lock when querying the latency. Fixes #473846.
2007-09-05 22:12:42 +00:00
Wim Taymans 84ec4caaa4 docs/libs/gstreamer-libs-sections.txt: Add new methods to docs.
Original commit message from CVS:
* docs/libs/gstreamer-libs-sections.txt:
Add new methods to docs.
* libs/gst/base/gstbasesink.c: (gst_base_sink_class_init),
(gst_base_sink_init), (gst_base_sink_set_ts_offset),
(gst_base_sink_get_ts_offset), (gst_base_sink_set_property),
(gst_base_sink_get_property), (gst_base_sink_wait_clock):
* libs/gst/base/gstbasesink.h:
Add ts-offset property to fine-tune the synchronisation.
API: GstBaseSink::ts-offset property
API: gst_base_sink_set_ts_offset()
API: gst_base_sink_get_ts_offset()
2007-08-30 17:50:54 +00:00
Wim Taymans 55a2e73654 libs/gst/base/gstbasesink.*: Add async property to instruct the sink never to inform the parent about
Original commit message from CVS:
* libs/gst/base/gstbasesink.c: (gst_base_sink_class_init),
(gst_base_sink_init), (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_qos_enabled),
(gst_base_sink_is_qos_enabled), (gst_base_sink_set_async_enabled),
(gst_base_sink_is_async_enabled), (gst_base_sink_set_property),
(gst_base_sink_get_property), (gst_base_sink_change_state):
* libs/gst/base/gstbasesink.h:
Add async property to instruct the sink never to inform the parent about
ASYNC state changes, update docs.
Check argument with g_return_* for the public functions.
API: GstBaseSink::async property
API: gst_base_sink_set_async_enabled()
API: gst_base_sink_is_async_enabled()
2007-08-29 20:57:58 +00:00
Wim Taymans 2db0fa576b libs/gst/base/gstbasesink.c: Improve debugging.
Original commit message from CVS:
* libs/gst/base/gstbasesink.c: (gst_base_sink_loop):
Improve debugging.
* libs/gst/base/gstbasesrc.c: (gst_base_src_query_latency),
(gst_base_src_default_query), (gst_base_src_wait),
(gst_base_src_do_sync), (gst_base_src_change_state):
Rearrange some code so that we can add support for measuring the
startup latency.
2007-08-28 15:02:19 +00:00
Wim Taymans 4f98b744d2 gst/gstmessage.h: Add some more docs for the messages.
Original commit message from CVS:
* gst/gstmessage.h:
Add some more docs for the messages.
* libs/gst/base/gstbasesink.c: (gst_base_sink_commit_state),
(gst_base_sink_query):
Add some more debugging.
* tools/gst-launch.c: (event_loop):
When interrupting, don't try to set pipeline to PAUSED twice.
2007-08-16 10:07:48 +00:00
Philippe Kalaf c99ddd944f libs/gst/base/gstbasesink.c: Don't send an async_start message during downwards state change if target state is less ...
Original commit message from CVS:
* libs/gst/base/gstbasesink.c:
Don't send an async_start message during downwards state change if target
state is less than READY
2007-08-09 21:50:19 +00:00
Tim-Philipp Müller 1a87e450ee libs/gst/base/gstbasesink.c: Remove unused signal enum.
Original commit message from CVS:
* libs/gst/base/gstbasesink.c:
Remove unused signal enum.
2007-06-21 22:37:27 +00:00
Andy Wingo 4e1c9c226a tests/check/pipelines/simple-launch-lines.c
Original commit message from CVS:
2007-06-19  Andy Wingo  <wingo@pobox.com>

* tests/check/pipelines/simple-launch-lines.c
(test_state_change_returns): Enable pull-mode tests now that
basesink has been fixed.

* libs/gst/base/gstbasesink.c (gst_base_sink_needs_preroll):
Changed from gst_base_sink_is_prerolled, reversing the sense of
the return value. Returns FALSE also if the sink is in pull mode,
in which case it needs no preroll.
(gst_base_sink_query, gst_base_sink_change_state): Update for
needs_preroll change.
(gst_base_sink_change_state): Add a case for READY_TO_PAUSED after
chaining up, in which we return SUCCESS directly if we activated
in pull mode instead of ASYNC. Involves countering an async_start
message sent before chaining up; not sure if this is correct, in
an ideal world we only send async-start when activating in push
mode.
2007-06-19 21:58:30 +00:00
Stefan Kost 86e3999647 libs/gst/base/gstbasesink.c: Add two breaks thats where missing.
Original commit message from CVS:
* libs/gst/base/gstbasesink.c: (gst_base_sink_reset_qos),
(gst_base_sink_render_object), (gst_base_sink_get_position):
Add two breaks thats where missing.
2007-06-14 12:03:44 +00:00
Tim-Philipp Müller 06f054445b Typo fixes; minor docs addition.
Original commit message from CVS:
* docs/design/part-events.txt:
* docs/design/part-overview.txt:
* gst/gstevent.c:
* gst/gsturi.c:
* gst/gsturi.h:
* libs/gst/base/gstbasesink.c:
Typo fixes; minor docs addition.
2007-04-28 11:29:54 +00:00
Wim Taymans 12c9334667 libs/gst/base/gstbasesink.c: Fix leak caused when refusing newsegment after EOS.
Original commit message from CVS:
* libs/gst/base/gstbasesink.c:
(gst_base_sink_queue_object_unlocked), (gst_base_sink_event):
Fix leak caused when refusing newsegment after EOS.
* plugins/elements/gstfakesink.c: (gst_fake_sink_class_init),
(gst_fake_sink_init), (gst_fake_sink_set_property),
(gst_fake_sink_get_property), (gst_fake_sink_preroll),
(gst_fake_sink_render), (gst_fake_sink_change_state):
* plugins/elements/gstfakesink.h:
Add num-buffers property to make the element generate EOS after a
configurable amount of buffers.
API: fakesink::num-buffers property.
* tests/check/elements/fakesink.c: (GST_START_TEST),
(fakesink_suite):
Fix GstBus leak in test.
Test for fakesink num-buffers.
2007-04-05 11:16:09 +00:00
Wim Taymans cc82861367 libs/gst/base/gstbasesink.c: Don't accept anything after an EOS, return UNEXPECTED instead.
Original commit message from CVS:
* libs/gst/base/gstbasesink.c:
(gst_base_sink_queue_object_unlocked), (gst_base_sink_event),
(gst_base_sink_change_state):
Don't accept anything after an EOS, return UNEXPECTED instead.
* tests/check/elements/fakesink.c: (GST_START_TEST),
(fakesink_suite):
Unit test for new EOS behaviour.
2007-04-05 10:10:08 +00:00
Jan Schmidt c248d1dba0 libs/gst/base/: Add ::unlock_stop to basesrc and basesink. This allows an opportunity for sub-classes to correctly cl...
Original commit message from CVS:
* libs/gst/base/gstbasesink.c: (gst_base_sink_set_flushing),
(gst_base_sink_change_state):
* libs/gst/base/gstbasesink.h:
* libs/gst/base/gstbasesrc.c: (gst_base_src_perform_seek),
(gst_base_src_default_event), (gst_base_src_unlock_stop),
(gst_base_src_deactivate):
* libs/gst/base/gstbasesrc.h:
Add ::unlock_stop to basesrc and basesink. This allows an opportunity
for sub-classes to correctly clear any state they set trying to
unlock, such as clearing out unlock commands from a command fd.
* plugins/elements/gstfdsink.c: (gst_fd_sink_class_init),
(gst_fd_sink_render), (gst_fd_sink_unlock),
(gst_fd_sink_unlock_stop):
* plugins/elements/gstfdsrc.c: (gst_fd_src_class_init),
(gst_fd_src_init), (gst_fd_src_unlock), (gst_fd_src_unlock_stop),
(gst_fd_src_create), (gst_fd_src_get_size), (gst_fd_src_do_seek):
Implement unlock_stop in fdsrc and fdsink.
Implement seeking in fdsrc when a seekable fd is passed, as in
gst-launch-0.10 fdsrc ! ... ! xvimagesink < /path/to/file
2007-03-19 15:01:40 +00:00
Wim Taymans d14c4c4a67 docs/gst/gstreamer-sections.txt: Add new element field and method.
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
Add new element field and method.
* gst/gstbin.c: (gst_bin_class_init), (gst_bin_init),
(bin_remove_messages), (gst_bin_add_func), (gst_bin_remove_func),
(gst_bin_recalc_state), (gst_bin_get_state_func),
(gst_bin_element_set_state), (gst_bin_change_state_func),
(gst_bin_continue_func), (bin_bus_handler),
(bin_push_state_continue), (bin_handle_async_start),
(bin_handle_async_done), (gst_bin_handle_message_func):
Make async state changes a bit smarter by using new ASYNC_START and
ASYNC_DONE messages. This reduces the number of times we run the state
recalculation thread.
Don't change state of element with a pending ASYNC_START message.
Deprecate STATE_DIRTY messages.
* gst/gstelement.c: (gst_element_init), (gst_element_send_event),
(gst_element_get_state_func), (gst_element_continue_state),
(gst_element_lost_state), (gst_element_set_state_func),
(gst_element_change_state):
* gst/gstelement.h:
Keep the state that was last set by the app in a new element field.
Don't allow state changes when handling an element event.
Post ASYNC_START and ASYNC_DONE messages.
Change lost_state so that we go to PAUSED and wait for the parent to set
us to PLAYING again (so latency calculation can be performed)
Export gst_element_change_state() method so that subclasses can use it.
API: gst_element_change_state()
API: GST_STATE_TARGET
* gst/gstpipeline.c: (gst_pipeline_class_init),
(reset_stream_time), (gst_pipeline_change_state),
(gst_pipeline_handle_message), (gst_pipeline_set_new_stream_time):
Using the new ASYNC_START message we can reset the base_time when
needed. This can then be used to implement base_time redistribution in
flushing seeks so that we can remove the explicit seek handling.
Perform latency query and configuration when going to PLAYING.
* libs/gst/base/gstbasesink.c: (gst_base_sink_commit_state),
(gst_base_sink_query), (gst_base_sink_change_state):
Post new ASYNC_START/ASYNC_DONE messages.
* tests/check/generic/sinks.c: (GST_START_TEST):
Fix test because the bin will not set the async element to PLAYING right
away.
* tests/check/gst/gstbin.c: (pop_async_done), (GST_START_TEST):
Make the message check a little stronger.
Handle ASYNC messages.
* tests/check/pipelines/cleanup.c: (GST_START_TEST):
* tests/check/pipelines/simple-launch-lines.c: (GST_START_TEST):
Expect ASYNC_DONE messages.
2007-03-19 10:47:56 +00:00
Thomas Vander Stichele 852774ec6c fix misleading log statement
Original commit message from CVS:
fix misleading log statement
2007-03-14 11:21:48 +00:00
Wim Taymans ff5129a795 libs/gst/base/gstbasesink.c: Don't unref query twice.
Original commit message from CVS:
* libs/gst/base/gstbasesink.c: (gst_base_sink_query_latency):
Don't unref query twice.
2007-02-28 18:51:47 +00:00
Wim Taymans b864edefbd libs/gst/base/gstbasesink.c: Improve latency query code.
Original commit message from CVS:
* libs/gst/base/gstbasesink.c: (gst_base_sink_query_latency),
(gst_base_sink_queue_object_unlocked), (gst_base_sink_send_event),
(gst_base_sink_change_state):
Improve latency query code.
Don't leak latency events.
* tests/check/gst/gstbin.c: (GST_START_TEST):
Improve debugging.
2007-02-28 16:46:07 +00:00
Wim Taymans a25cedb415 docs/design/draft-latency.txt: Small update.
Original commit message from CVS:
* docs/design/draft-latency.txt:
Small update.
* docs/libs/gstreamer-libs-sections.txt:
* libs/gst/base/gstbasesink.c: (gst_base_sink_class_init),
(gst_base_sink_get_latency), (gst_base_sink_query_latency),
(gst_base_sink_wait_clock), (gst_base_sink_send_qos),
(gst_base_sink_perform_qos), (gst_base_sink_queue_object_unlocked),
(gst_base_sink_chain_unlocked), (gst_base_sink_send_event),
(gst_base_sink_get_position), (gst_base_sink_query),
(gst_base_sink_change_state):
* libs/gst/base/gstbasesink.h:
API: gst_base_sink_query_latency() to let subclasses query the upstream
latency.
API: gst_base_sink_get_latency() to let subclasses query the configured
latency in the sink.
Implement query and set latency.
Update some docs.
As spotted by Will Newton <will dot newton at gmail dot com>: Make sure we
don't continue preroll when we are flushing. Fixes #405284.
* tests/check/pipelines/stress.c: (change_state_timeout),
(quit_timeout), (GST_START_TEST), (stress_suite):
Test for #405284.
2007-02-12 11:32:22 +00:00
Andy Wingo 3482d79879 libs/gst/base/gstbasetransform.c (gst_base_transform_activate): Factor start/stop into this private function instead ...
Original commit message from CVS:
2007-01-12  Andy Wingo  <wingo@pobox.com>

* libs/gst/base/gstbasetransform.c (gst_base_transform_activate):
Factor start/stop into this private function instead of partially
in activate functions and partially in the change_state function.
Fixes setup before the element has changed from READY->PAUSED, as
is the case in pull-mode pipelines.
(gst_base_transform_sink_activate_push)
(gst_base_transform_src_activate_pull): Refactor to use
gst_base_transform_activate().
(gst_base_transform_change_state): Removed, not needed any more.

* libs/gst/base/gstbasesink.c (gst_base_sink_negotiate_pull):
Truncate before fixating.
2007-01-12 21:13:32 +00:00
Andy Wingo 5cd94e7afc libs/gst/base/gstbasesink.c (gst_base_sink_negotiate_pull): Don't set_caps() if the result of fixating is ANY, as it'...
Original commit message from CVS:
2007-01-12  Andy Wingo  <wingo@pobox.com>

* libs/gst/base/gstbasesink.c (gst_base_sink_negotiate_pull):
Don't set_caps() if the result of fixating is ANY, as it's not
supported, and not necessary in the case of a link with no
template caps on either side. Fixes tests/check/libs/basesrc in
some pull-mode tests.
2007-01-12 18:06:29 +00:00
Andy Wingo a173768706 libs/gst/base/gstbasetransform.c (_GstBaseTransformPrivate): (gst_base_transform_init, gst_base_transform_sink_activa...
Original commit message from CVS:
2007-01-12  Andy Wingo  <wingo@pobox.com>

* libs/gst/base/gstbasetransform.c (_GstBaseTransformPrivate):
(gst_base_transform_init, gst_base_transform_sink_activate_push)
(gst_base_transform_src_activate_pull):
Track the activation mode.
(gst_base_transform_setcaps): In pull mode, when activating the
src pad, after activating the sink pad, activate the sink pad's
peer, as discussed in part-negotiation.txt.

* libs/gst/base/gstbasesrc.h:
* libs/gst/base/gstbasesrc.c (gst_base_src_fixate): Add fixate
vmethod, as in basesink.

* libs/gst/base/gstbasesink.h: Reformat docs, add fixate vmethod.

* libs/gst/base/gstbasesink.c (gst_base_sink_pad_setcaps): In pull
mode, first proxy the setcaps to the peer pad.
(gst_base_sink_pad_fixate): Add a fixate function that calls the
new fixate vmethod.
(gst_base_sink_default_activate_pull): Rename from
gst_base_sink_activate_pull.
(gst_base_sink_negotiate_pull): New function, performs negotiation
in pull mode before calling ::activate_pull().
(gst_base_sink_pad_activate_pull): Actually call the activate_pull
vmethod instead of the default implementation. I have no idea how
this worked before. Negotiate before calling activate_pull.
2007-01-12 15:56:00 +00:00
Andy Wingo 4518a5c652 libs/gst/base/gstbasesink.h: New GstBaseSinkClass vmethod, activate_pull(), providing for a way to specialize the pro...
Original commit message from CVS:
2007-01-06  Andy Wingo  <wingo@pobox.com>

* libs/gst/base/gstbasesink.h: New GstBaseSinkClass vmethod,
activate_pull(), providing for a way to specialize the process of
spawning a thread to pull on the sink pad. There is a default
implementation.

* libs/gst/base/gstbasesink.c (gst_base_sink_pad_activate_pull)
(gst_base_sink_pad_activate_push, gst_base_sink_pad_activate)
(gst_base_sink_init): Renamed pad activation functions (inserting
"_pad" in their names). Refactor to use the new activate_pull
vmethod, as appropriate.
(gst_base_sink_class_init, gst_base_sink_activate_pull): Set the
default activate_pull function to start a task pulling from the
sink pad, as before.
2007-01-06 17:18:03 +00:00
Wim Taymans 8dbb58093f libs/gst/base/gstbasesink.c: Improve debugging of events.
Original commit message from CVS:
* libs/gst/base/gstbasesink.c: (gst_base_sink_event),
(gst_base_sink_get_position):
Improve debugging of events.
2006-12-07 10:59:05 +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
Josep Torre Valles 2f32e21d72 common/m4/gst-error.m4: Disable warning of statement not reached on Forte.
Original commit message from CVS:
2006-10-09  Zaheer Abbas Merali  <zaheerabbas at merali dot org>

Patch by: Josep Torre Valles <josep@fluendo.com>

* common/m4/gst-error.m4:
Disable warning of statement not reached on Forte.
* gst/gstmessage.h:
Fix warning on Forte (value doesn't fit on enumeration).
* libs/gst/base/gstbasesink.c: (gst_base_sink_chain_unlocked):
Fix warning on Forte (value doesn't fit on enumeration).
* libs/gst/net/gstnetclientclock.c: (gst_net_client_clock_thread):
DEBUG macro says it takes minimum of 2 args and so Forte
complains about the use with just 1 arg.
* plugins/elements/gstfdsink.c:
* plugins/elements/gstfdsrc.c:
* plugins/elements/gstfilesink.c:
* plugins/elements/gstfilesrc.c:
Use correct return type for the uri handler implementations.

All these fix warnings in Forte.  Fixes bug #360860.
2006-10-09 09:32:29 +00:00
Wim Taymans a0e5a4a964 docs/random/moving-plugins: Make it clear that the "compiled-in descriptions" really mean the element details.
Original commit message from CVS:
* docs/random/moving-plugins:
Make it clear that the "compiled-in descriptions" really mean
the element details.
* libs/gst/base/gstbasesink.c: (gst_base_sink_commit_state),
(gst_base_sink_wait_preroll):
Update docs.
* docs/libs/gstreamer-libs-sections.txt:
* libs/gst/base/gstbasesrc.c: (gst_base_src_wait_playing),
(gst_base_src_get_range), (gst_base_src_activate_push):
* libs/gst/base/gstbasesrc.h:
Added function to block while waiting for PLAYING, this function
is used by live sources that block on the clock.
API: gst_base_src_wait_playing()
2006-09-27 13:19:55 +00:00
Wim Taymans 3db585b2d9 libs/gst/base/gstbasesink.c: Make sure that our internal state is correct when we commit our state asynchronously. Th...
Original commit message from CVS:
* libs/gst/base/gstbasesink.c: (gst_base_sink_commit_state),
(gst_base_sink_wait_preroll), (gst_base_sink_do_sync),
(gst_base_sink_preroll_object):
Make sure that our internal state is correct when we commit our state
asynchronously. This solves a race where a state change to PLAYING
could cause the sink to remain blocked in preroll in some situations.
2006-09-15 09:49:14 +00:00
Wim Taymans 6efdf610a3 Expose logic to wait for preroll so that subclasses such as audiosink can also use this method.
Original commit message from CVS:
* docs/libs/gstreamer-libs-sections.txt:
* libs/gst/base/gstbasesink.c: (gst_base_sink_wait_preroll),
(gst_base_sink_do_sync):
* libs/gst/base/gstbasesink.h:
Expose logic to wait for preroll so that subclasses such as audiosink
can also use this method.
API: gst_base_sink_wait_preroll()
2006-09-15 08:47:36 +00:00
Edward Hervey 8b6246f275 libs/gst/base/gstbasesink.c: Inform GstSegment of the last stop position in order for the current segment to have a p...
Original commit message from CVS:
* libs/gst/base/gstbasesink.c: (gst_base_sink_get_sync_times):
Inform GstSegment of the last stop position in order for the current
segment to have a proper duration if it doesn't have a specific stop
position from which a duration could be calculated.
This bug was noticeable when a non-flushing, non-update new segment was
followed by another segment (all buffers from the new segment were being
dropped).
2006-08-28 15:57:39 +00:00