Commit graph

229 commits

Author SHA1 Message Date
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
Wim Taymans 931ef328d8 libs/gst/base/gstbasesink.c: When operating in pull mode update the offset so that we read sequentially.
Original commit message from CVS:
* libs/gst/base/gstbasesink.c: (gst_base_sink_preroll_object),
(gst_base_sink_loop), (gst_base_sink_get_position):
When operating in pull mode update the offset so that we
read sequentially.
2006-07-05 18:18:47 +00:00
Wim Taymans b9000a7878 libs/gst/base/: Don't randomly and silently reset a segment when the format changes as this is a bug somewhere upstre...
Original commit message from CVS:
* libs/gst/base/gstbasesink.c: (gst_base_sink_configure_segment),
(gst_base_sink_preroll_object), (gst_base_sink_get_position):
* libs/gst/base/gstbasetransform.c:
(gst_base_transform_sink_eventfunc):
* libs/gst/base/gstcollectpads.c: (gst_collect_pads_event):
Don't randomly and silently reset a segment when the format
changes as this is a bug somewhere upstream. Fixes #330379.
2006-06-14 10:31:43 +00:00
Wim Taymans 7e972ee6b9 Add G_UNLIKELY in type registration.
Original commit message from CVS:
* gst/gsterror.c: (gst_g_error_get_type):
* gst/gstpadtemplate.c: (gst_pad_template_get_type),
(gst_static_pad_template_get_type):
* gst/gsttaglist.c: (gst_tag_list_get_type):
* gst/gsttagsetter.c: (gst_tag_setter_get_type):
* gst/gsttypefindfactory.c: (gst_type_find_factory_get_type):
* gst/gsturi.c: (gst_uri_handler_get_type):
* gst/gstvalue.c: (gst_date_get_type):
* gst/gstxml.c: (gst_xml_get_type):
* libs/gst/base/gstbasesink.c: (gst_base_sink_get_type),
(gst_base_sink_preroll_object), (gst_base_sink_get_position):
* libs/gst/base/gstbasesrc.c: (gst_base_src_get_type):
Add G_UNLIKELY in type registration.
2006-06-12 08:55:21 +00:00
Wim Taymans 6af1d4c999 libs/gst/base/gstbasesink.c: Don't report POSITION based on clock time if sync is disabled in a sink.
Original commit message from CVS:
* libs/gst/base/gstbasesink.c: (gst_base_sink_get_position):
Don't report POSITION based on clock time if sync is
disabled in a sink.
2006-05-15 11:54:22 +00:00
Stefan Kost dc3d1df8ec G_OBJECT_CLASS macro usage batch cleanup, fixes #337747 for core
Original commit message from CVS:
* 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/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/gsttee.c: (gst_tee_class_init):
* tests/old/examples/plugins/example.c: (gst_example_class_init):
* tests/old/testsuite/threads/signals.c: (gst_test_class_init):
G_OBJECT_CLASS macro usage batch cleanup, fixes #337747 for core
2006-05-11 18:10:34 +00:00
Jan Schmidt 9d3f628b81 libs/gst/base/gstbasesink.c: Add applied_rate to the debug
Original commit message from CVS:
* libs/gst/base/gstbasesink.c: (gst_base_sink_configure_segment):
Add applied_rate to the debug
* libs/gst/base/gstbasesrc.c: (gst_base_src_perform_seek):
Copy applied_rate into the outgoing NEWSEGMENT event
2006-05-08 14:55:26 +00:00
Philippe Rouquier 246712327d libs/gst/base/gstbasesink.c: call ::unlock before taking the PREROLL_LOCK so we can safely handle elements that lock ...
Original commit message from CVS:
Patch by: Philippe Rouquier <philippero at libertysurf dot fr>
* libs/gst/base/gstbasesink.c: (gst_base_sink_set_flushing),
(gst_base_sink_change_state):
call ::unlock before taking the PREROLL_LOCK so we can safely
handle elements that lock in ::render.
Fixes #340174.
2006-05-08 11:49:43 +00:00
Wim Taymans b9dbb55105 docs/design/part-overview.txt: Make upsteam/downstream concepts more clear.
Original commit message from CVS:
* docs/design/part-overview.txt:
Make upsteam/downstream concepts more clear.
Give an example of serialized/non-serialized events.
* docs/design/part-events.txt:
* docs/design/part-streams.txt:
Mention applied_rate.
* docs/design/part-trickmodes.txt:
Mention applied rate, flesh out some more use cases.
* gst/gstevent.c: (gst_event_new_new_segment),
(gst_event_parse_new_segment), (gst_event_new_new_segment_full),
(gst_event_parse_new_segment_full), (gst_event_new_tag),
(gst_event_parse_tag), (gst_event_new_buffer_size),
(gst_event_parse_buffer_size), (gst_event_new_qos),
(gst_event_parse_qos), (gst_event_parse_seek),
(gst_event_new_navigation):
* gst/gstevent.h:
Add applied_rate field to NEWSEGMENT event.
API: gst_event_new_new_segment_full()
API: gst_event_parse_new_segment_full()
* gst/gstsegment.c: (gst_segment_init), (gst_segment_set_seek),
(gst_segment_set_newsegment), (gst_segment_set_newsegment_full),
(gst_segment_to_stream_time), (gst_segment_to_running_time):
* gst/gstsegment.h:
Add applied_rate to GstSegment structure.
Make calculation of stream_time and running_time more correct
wrt rate/applied_rate.
Add some more docs.
API: GstSegment::applied_rate field
API: gst_segment_set_newsegment_full();
* libs/gst/base/gstbasesink.c: (gst_base_sink_configure_segment),
(gst_base_sink_get_sync_times), (gst_base_sink_get_position):
* libs/gst/base/gstbasetransform.c:
(gst_base_transform_sink_eventfunc),
(gst_base_transform_handle_buffer):
Parse and use applied_rate in the GstSegment field.
* tests/check/gst/gstevent.c: (GST_START_TEST):
Add check for applied_rate field.
* tests/check/gst/gstsegment.c: (GST_START_TEST),
(gstsegments_suite):
Add more checks for various GstSegment operations.
2006-05-08 09:52:33 +00:00
Wim Taymans 029c8d820b libs/gst/base/gstbasesink.c: Store the sync time of the buffer end position separatly in a new variable eos_rtime so ...
Original commit message from CVS:
* libs/gst/base/gstbasesink.c: (gst_base_sink_get_sync_times),
(gst_base_sink_do_sync), (gst_base_sink_chain_unlocked),
(gst_base_sink_get_position), (gst_base_sink_change_state):
Store the sync time of the buffer end position separatly in a
new variable eos_rtime so we can properly sync the EOS event.
Fixes #340697.
Fix the docs for gst_base_sink_set_qos_enabled().
Don't set segment start to invalid value when we receive a
non TIME newsegment.
get closer to handling position reporting for negative rates
correctly.
2006-05-08 09:16:01 +00:00
Thomas Vander Stichele 493b84107d whitespace removal and width coercion
Original commit message from CVS:
whitespace removal and width coercion
2006-05-03 16:42:08 +00:00
Stefan Kost 4852eda85a libs/gst/base/: more detailed debug and formatting cleanup
Original commit message from CVS:
* libs/gst/base/gstbasesink.c: (gst_base_sink_event):
* libs/gst/base/gstcollectpads.c: (gst_collect_pads_base_init),
(gst_collect_pads_is_collected), (gst_collect_pads_event):
more detailed debug and formatting cleanup
2006-04-28 18:48:38 +00:00
Wim Taymans ca144eb425 libs/gst/base/gstbasesink.c: When frame dropping is enabled, we should not ignore frames without a duration.
Original commit message from CVS:
* libs/gst/base/gstbasesink.c: (gst_base_sink_is_too_late),
(gst_base_sink_do_render_stats), (gst_base_sink_render_object),
(gst_base_sink_get_position), (gst_base_sink_change_state):
When frame dropping is enabled, we should not ignore frames
without a duration.
Update some documentation.
2006-04-28 13:25:58 +00:00
Wim Taymans c2d86926f5 gst/gstsegment.c: Added some more docs.
Original commit message from CVS:
* gst/gstsegment.c:
Added some more docs.
* libs/gst/base/gstbasesink.c: (gst_base_sink_perform_qos),
(gst_base_sink_reset_qos):
Calculate more accurate rate values.
2006-04-10 10:46:44 +00:00
Sébastien Moutte 78ee95a508 gst/gst_private.h: add a new #ifdef to use __declspec(dllimport) only for other modules and not for gstreamer core
Original commit message from CVS:
* gst/gst_private.h:
add a new #ifdef to use __declspec(dllimport) only for
other modules and not for gstreamer core
* gst/gstbasesink.c: (gst_base_sink_perform_qos):
use gst_guint64_to_gdouble for conversion
* win32/common/libgstreamer.def:
add new exported functions
* win32/vs6/gst_inspect.dsp:
* win32/vs6/gst_launch.dsp:
* win32/vs6/libgstbase.dsp:
* win32/vs6/libgstcontroller.dsp:
* win32/vs6/libgstcoreelements.dsp:
* win32/vs6/libgstdataprotocol.dsp:
* win32/vs6/libgstnet.dsp:
update project files
2006-04-09 16:57:34 +00:00
Stefan Kost 77a5695718 Fix #337365 (g_type_class_ref <-> g_type_class_peek_parent)
Original commit message from CVS:
* gst/gstbuffer.c: (gst_subbuffer_class_init):
* gst/gstclock.c: (gst_clock_class_init):
* gst/gstelement.c: (gst_element_class_init):
* gst/gstindex.c: (gst_index_class_init):
* gst/gstindexfactory.c: (gst_index_factory_class_init):
* gst/gstobject.c: (gst_object_class_init),
(gst_signal_object_class_init):
* gst/gstpad.c: (gst_pad_class_init):
* gst/gstpadtemplate.c: (gst_pad_template_class_init):
* gst/gstpluginfeature.c: (gst_plugin_feature_class_init):
* gst/gstregistry.c: (gst_registry_class_init):
* gst/gstsystemclock.c: (gst_system_clock_class_init):
* gst/gsttask.c: (gst_task_class_init):
* gst/gstxml.c: (gst_xml_class_init):
* libs/gst/base/gstbasesink.c: (gst_base_sink_class_init):
* libs/gst/base/gstbasesrc.c: (gst_base_src_class_init),
(gst_base_src_loop):
* libs/gst/controller/gstcontroller.c:
(_gst_controller_class_init):
* plugins/elements/gstfdsrc.c: (gst_fd_src_class_init):
* plugins/indexers/gstfileindex.c: (gst_file_index_class_init):
* plugins/indexers/gstmemindex.c: (gst_mem_index_class_init):
* tests/old/examples/plugins/example.c: (gst_example_class_init):
* tests/old/testsuite/threads/signals.c: (gst_test_class_init):
Fix #337365 (g_type_class_ref <-> g_type_class_peek_parent)
2006-04-08 20:57:31 +00:00
Wim Taymans 92b7dfef7d libs/gst/base/gstbasesink.c: Initialize start and stop times, thanks valgrind.
Original commit message from CVS:
* libs/gst/base/gstbasesink.c: (gst_base_sink_get_sync_times):
Initialize start and stop times, thanks valgrind.
2006-04-07 15:19:08 +00:00
Wim Taymans 902e249e88 libs/gst/base/gstbasesink.c: Be a bit nicer to badly behaving upstream elements that expect us to deal with non TIME ...
Original commit message from CVS:
* libs/gst/base/gstbasesink.c: (gst_base_sink_get_sync_times):
Be a bit nicer to badly behaving upstream elements that expect
us to deal with non TIME segments and timestamps (such as fakesrc
in the testsuite).
2006-04-07 14:50:06 +00:00
Wim Taymans 9a897acec0 gst/gstbus.c: Small documentation clarification about the signal watch.
Original commit message from CVS:
* gst/gstbus.c:
Small documentation clarification about the signal watch.
* libs/gst/base/gstbasesink.c: (gst_base_sink_get_sync_times),
(gst_base_sink_wait_clock), (gst_base_sink_do_sync),
(gst_base_sink_perform_qos), (gst_base_sink_reset_qos),
(gst_base_sink_do_render_stats), (gst_base_sink_render_object),
(gst_base_sink_get_position_last),
(gst_base_sink_get_position_paused), (gst_base_sink_change_state):
Convert and store timestamps in stream time and running time, the
raw timestamps are not usefull, also document this better.
Use different window sizes for good and bad QoS observations so
we react to badness a little quicker.
Keep track of the amount of rendered and dropped buffers.
Send QoS timestamps in running time.
* libs/gst/base/gstbasetransform.c:
(gst_base_transform_sink_eventfunc),
(gst_base_transform_handle_buffer):
Compare QoS timestamps against running time.
2006-04-07 14:02:12 +00:00
Jan Schmidt fb8ad07b59 Documentation updates. Make BaseSink and BaseSrc docs contain the class structure so that people can actually see the...
Original commit message from CVS:
* docs/libs/gstreamer-libs-sections.txt:
* gst/gsttaglist.c:
* libs/gst/base/gstbasesink.c:
* libs/gst/base/gstbasesink.h:
* libs/gst/base/gstbasesrc.c:
* libs/gst/base/gstbasesrc.h:
Documentation updates. Make BaseSink and BaseSrc docs contain the
class structure so that people can actually see the prototypes for
virtual functions they're supposed to be overriding.
2006-04-04 14:58:50 +00:00
Wim Taymans 0a4ba6610f libs/gst/base/gstbasesink.c: More QoS measurements as described in the design doc.
Original commit message from CVS:
* libs/gst/base/gstbasesink.c: (gst_base_sink_init),
(gst_base_sink_finalize), (gst_base_sink_set_qos_enabled),
(gst_base_sink_is_qos_enabled), (gst_base_sink_do_sync),
(gst_base_sink_record_qos_observation),
(gst_base_sink_perform_qos), (gst_base_sink_reset_qos),
(gst_base_sink_is_too_late), (gst_base_sink_render_object),
(gst_base_sink_change_state):
More QoS measurements as described in the design doc.
Get rid of ringbuffer with observations, running average is
more simple and equally good.
Calculates valid proportion now.
Added beginning of flood measurement.
2006-03-30 16:36:12 +00:00
Wim Taymans 3a21be3b8c libs/gst/base/gstbasesink.c: Decouple max-lateness and the fact that QoS messages are generated with a new property (...
Original commit message from CVS:
* libs/gst/base/gstbasesink.c: (gst_base_sink_class_init),
(gst_base_sink_init), (gst_base_sink_finalize),
(gst_base_sink_set_qos_enabled), (gst_base_sink_is_qos_enabled),
(gst_base_sink_set_property), (gst_base_sink_get_property),
(gst_base_sink_commit_state), (gst_base_sink_get_sync_times),
(gst_base_sink_wait_clock), (gst_base_sink_do_sync),
(gst_base_sink_add_qos_observation), (gst_base_sink_send_qos),
(gst_base_sink_perform_qos), (gst_base_sink_reset_qos),
(gst_base_sink_is_too_late), (gst_base_sink_render_object),
(gst_base_sink_preroll_object), (gst_base_sink_event),
(gst_base_sink_chain_unlocked), (gst_base_sink_get_position_last),
(gst_base_sink_get_position_paused), (gst_base_sink_get_position),
(gst_base_sink_query), (gst_base_sink_change_state):
Decouple max-lateness and the fact that QoS messages are generated
with a new property (qos).
Add vmethod so subclasses can be notified of ASYNC playing
state changes.
Collect timestamp start and stop to report better current
position in EOS/PLAYING/PAUSED/READY/NULL.
Refactor QoS/frame dropping and other measurements.
API: GstBaseSrc::qos
* libs/gst/base/gstbasesink.h:
Added Private struct.
API: gst_base_sink_set_qos_enabled
API: gst_base_sink_is_qos_enabled
2006-03-23 16:20:40 +00:00
Wim Taymans 1d86546801 libs/gst/base/gstbasesink.c: Better debug info when we receive a segment event.
Original commit message from CVS:
* libs/gst/base/gstbasesink.c: (gst_base_sink_configure_segment),
(gst_base_sink_get_sync_times), (gst_base_sink_wait_clock),
(gst_base_sink_do_sync), (gst_base_sink_do_qos):
Better debug info when we receive a segment event.
Reorganize a bit so we can pass the get_times() results around.
Use the segment format when calculating the running time.
Don't do QoS is sync is disabled or we have no clock or the
element does not want us to sync to the clock.
Don't drop buffers if QoS is disabled for now.
2006-03-14 19:36:05 +00:00
Tim-Philipp Müller 9394a81b82 libs/gst/base/gstbasesink.c: Can't use gst_segment_to_running_time() when the segment is not in GST_TIME_FORMAT (like...
Original commit message from CVS:
* libs/gst/base/gstbasesink.c: (gst_base_sink_get_sync_times):
Can't use gst_segment_to_running_time() when the segment
is not in GST_TIME_FORMAT (like with filesink, for example).
Stops flac encoding pipelines from spewing critical warnings
at EOS (#331248).
2006-03-14 18:25:54 +00:00
Wim Taymans 926ef9413a libs/gst/base/gstbasesink.c: Separate QoS calculation.
Original commit message from CVS:
* libs/gst/base/gstbasesink.c: (gst_base_sink_do_sync),
(gst_base_sink_do_qos):
Separate QoS calculation.
Only drop buffers when lateness is bigger than the
duration of the buffer.
2006-03-14 11:18:07 +00:00
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