Commit graph

811 commits

Author SHA1 Message Date
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
Thijs Vermeir
4bf6171fc1 Add more functions for unit testing: gst_check_drop_buffers, gst_check_caps_equal, gst_check_element_push_buffer_list...
Original commit message from CVS:
* docs/libs/gstreamer-libs-sections.txt:
* libs/gst/check/gstcheck.c:
* libs/gst/check/gstcheck.h:
Add more functions for unit testing: gst_check_drop_buffers,
gst_check_caps_equal, gst_check_element_push_buffer_list,
gst_check_element_push_buffer
2008-02-01 17:16:26 +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
e8d69fc551 libs/gst/base/gstbasetransform.c: Fix long property description for QoS.
Original commit message from CVS:
* libs/gst/base/gstbasetransform.c:
Fix long property description for QoS.
2008-01-14 11:40:55 +00:00
Jan Schmidt
f2c36159ef gst/gst.c: _gst_trace_on is already provided by gsttrace.h, no need to declare it ourselves.
Original commit message from CVS:
* gst/gst.c:
_gst_trace_on is already provided by gsttrace.h, no need to declare
it ourselves.
* docs/libs/gstreamer-libs-sections.txt:
Add 'buffers', 'check_cond' and 'check_mutex' from libgstcheck
and remove strange tcase_add_test which is outputting a warning.
* libs/gst/check/gstcheck.c:
* libs/gst/check/gstcheck.h:
Properly declare 'buffers', 'check_cond', 'check_mutex' extern
and define them in gstcheck.c instead of having every .c file whcih
includes gstcheck.h be defining its own copy and relying on symbol
interposing to marry them all, which doesn't work on Solaris.
* tests/check/elements/identity.c: (GST_START_TEST):
Don't define 'buffers' locally, it comes from libgstcheck.
* tests/check/generic/sinks.c: (send_buffer):
Fix type of variable (GstFlowReturn, not GstStateChangeReturn)
* tests/check/gst/gststructure.c: (GST_START_TEST):
* tests/check/gst/gstsystemclock.c: (GST_START_TEST):
* tests/check/gst/gstutils.c: (GST_START_TEST):
* tests/check/gst/gstvalue.c: (GST_START_TEST):
Add a bunch of casts to make various constants fit the types
they're being assigned to.
2008-01-12 20:22:30 +00:00
Wim Taymans
0c964dd348 libs/gst/base/gstbasesrc.c: The start segment for reverse playback goes from start to last_stop.
Original commit message from CVS:
* libs/gst/base/gstbasesrc.c: (gst_base_src_perform_seek),
(gst_base_src_loop):
The start segment for reverse playback goes from start to last_stop.
2008-01-09 12:25:17 +00:00
Tim-Philipp Müller
58338a041b libs/gst/base/gstbasetransform.c: Print element name with g_warning() if there's a problem with the unit size.
Original commit message from CVS:
* libs/gst/base/gstbasetransform.c:
(gst_base_transform_transform_size):
Print element name with g_warning() if there's a problem
with the unit size.
2008-01-08 21:13:58 +00:00
Damien Lespiau
16fe8b9626 libs/gst/: Fix empty prototypes. Fixes bug #507957.
Original commit message from CVS:
Patch by: Damien Lespiau <damien.lespiau@gmail.com>
* libs/gst/controller/gstcontroller.h:
* libs/gst/controller/gstcontrolsource.h:
* libs/gst/controller/gstinterpolationcontrolsource.h:
* libs/gst/controller/gstlfocontrolsource.h:
* libs/gst/dataprotocol/dataprotocol.h:
Fix empty prototypes.  Fixes bug #507957.
2008-01-08 02:07:38 +00:00
Wim Taymans
f473d72719 libs/gst/base/gstbasesrc.c: Don't update the last_stop position in do_seek, that's the position we did a seek to.
Original commit message from CVS:
* libs/gst/base/gstbasesrc.c: (gst_base_src_default_do_seek),
(gst_base_src_loop):
Don't update the last_stop position in do_seek, that's the position we
did a seek to.
Read backwards when we have a negative rate.
* tests/check/elements/filesrc.c: (event_func), (wait_eos),
(setup_filesrc), (cleanup_filesrc), (GST_START_TEST),
(filesrc_suite):
Add check for reverse reading.
2008-01-07 11:23:00 +00:00
Peter Kjellerstedt
b0ba7ff031 libs/gst/check/gstcheck.h: Fix detection of the check version we're compiling against (would otherwise break if check...
Original commit message from CVS:
Patch by: Peter Kjellerstedt <pkj axis com>
* libs/gst/check/gstcheck.h:
Fix detection of the check version we're compiling against (would
otherwise break if check goes v0.10.0); correctly report the
name of the failed test again in case of failure, instead of
just 'tf' (fixes #504499).
2007-12-20 09:20:27 +00:00
Wim Taymans
b0076d395d libs/gst/base/gstbasesrc.c: Allow sending EOS to the source to make it send out an EOS event from the streaming thread.
Original commit message from CVS:
* libs/gst/base/gstbasesrc.c: (gst_base_src_send_event),
(gst_base_src_get_range), (gst_base_src_pad_get_range),
(gst_base_src_loop), (gst_base_src_set_flushing),
(gst_base_src_change_state):
Allow sending EOS to the source to make it send out an EOS event from
the streaming thread.
Update docs and deprecate the old NULL/READY shutdown method.
* tests/check/libs/basesrc.c: (GST_START_TEST),
(gst_basesrc_suite):
Add unit test for controlled shutdown.
2007-12-19 17:49:38 +00:00
Wim Taymans
8a695165c2 libs/gst/base/gstbasesrc.c: Make _wait_playing() not check any variables so that we can call this function from subcl...
Original commit message from CVS:
* libs/gst/base/gstbasesrc.c: (gst_base_src_wait_playing),
(gst_base_src_perform_seek), (gst_base_src_get_range),
(gst_base_src_set_playing), (gst_base_src_change_state):
Make _wait_playing() not check any variables so that we can call this
function from subclasses. Move the checks elsewhere similar to
_wait_preroll() in basesink.
Add some debugging.
Only signal the LIVE cond when we are going back to PLAYING.
2007-12-17 16:38:40 +00:00
Sebastian Dröge
5f55ba792a API: Add gst_base_transform_set_gap_aware() to control whether the element correctly handles GST_BUFFER_FLAG_GAP or s...
Original commit message from CVS:
* docs/libs/gstreamer-libs-sections.txt:
* libs/gst/base/gstbasetransform.c: (gst_base_transform_init),
(gst_base_transform_prepare_output_buffer),
(gst_base_transform_set_gap_aware):
* libs/gst/base/gstbasetransform.h:
API: Add gst_base_transform_set_gap_aware() to control whether
the element correctly handles GST_BUFFER_FLAG_GAP or shouldn't
get buffers with this flag at all. Fixes #503231.
2007-12-14 16:52:38 +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
Tim-Philipp Müller
0ef9a5f5b1 Makefile.am: Add check-exports target and run it as part of 'make check' (see #499140 and #493983).
Original commit message from CVS:
* Makefile.am:
Add check-exports target and run it as part of 'make check'
(see #499140 and #493983).
* gst/gst_private.h:
* gst/gstelementfactory.h:
* gst/gstghostpad.c: (gst_proxy_pad_class_init):
* gst/gstinfo.c: (_priv_gst_in_valgrind), (_gst_debug_init),
(_priv_gst_in_valgrind):
* gst/gstinfo.h: (GstLogFunction):
* gst/gsttypefind.c: (type_find_debug), (GST_CAT_DEFAULT),
(gst_type_find_register):
* gst/gsttypefindfactory.c: (type_find_debug), (GST_CAT_DEFAULT),
(gst_type_find_factory_get_type):
* libs/gst/controller/gstcontroller.c: (GST_CAT_DEFAULT),
(GST_CAT_DEFAULT), (parent_class), (priv_gst_controller_key),
(gst_controller_new_valist), (gst_controller_new_list),
(_gst_controller_dispose), (_gst_controller_class_init):
* libs/gst/controller/gstcontrolsource.c: (GST_CAT_DEFAULT):
* libs/gst/controller/gsthelper.c: (GST_CAT_DEFAULT),
(GST_CAT_DEFAULT), (gst_object_uncontrol_properties),
(gst_object_get_controller), (gst_object_set_controller),
(gst_object_suggest_next_sync), (gst_object_sync_values),
(gst_object_set_control_source), (gst_object_get_control_source),
(gst_object_get_value_arrays), (gst_object_get_value_array),
(gst_object_get_control_rate), (gst_object_set_control_rate):
* libs/gst/controller/gstinterpolation.c: (GST_CAT_DEFAULT):
* libs/gst/controller/lib.c: (GST_CAT_DEFAULT):
Make some functions that should be static static; rename some
private symbols so that they don't get exported; add some FIXME
comments so we can move accidentally exported functions into
our private section in 0.11.
* win32/common/libgstreamer.def:
Add gst_utils_get_timestamp().
2007-12-12 23:20:00 +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
Stefan Kost
d8e77f9bf8 gst/gstevent.c: Little documentation improvment.
Original commit message from CVS:
* gst/gstevent.c:
Little documentation improvment.
* gst/gstpreset.c:
More TODO cleanups. Remove c++ comments.
* libs/gst/controller/gstcontroller.c:
Add TODO and use quark from static string.
* tests/check/gst/gstmessage.c:
* tests/check/gst/gststructure.c:
Use quark from static string.
2007-11-17 17:50:21 +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
8b5019bb54 libs/gst/base/gstbasesrc.c: Unify flushing code, remove some old unlock code that is no longer used.
Original commit message from CVS:
* libs/gst/base/gstbasesrc.c: (gst_base_src_default_query),
(gst_base_src_perform_seek), (gst_base_src_default_event),
(gst_base_src_set_flushing), (gst_base_src_activate_push),
(gst_base_src_activate_pull):
Unify flushing code, remove some old unlock code that is no longer used.
Take the streaming lock when seeking to avoid races. Fixes #492729.
Added some more comments.
2007-11-06 17:18:14 +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
Tim-Philipp Müller
99a41cefe3 g_type_class_ref() other types as well, see #349410 and #64764.
Original commit message from CVS:
* gst/gst.c: (init_post):
* gst/gstevent.c: (_gst_event_initialize):
* gst/gstquery.c: (_gst_query_initialize):
* libs/gst/dataprotocol/dataprotocol.c (gst_dp_init):
g_type_class_ref() other types as well, see #349410 and #64764.
* gst/gstbuffer.c: (_gst_buffer_initialize):
* gst/gstmessage.c: (_gst_message_initialize):
Simplify existing g_type_class_ref().
2007-11-01 21:50:05 +00:00
Ole André Vadla Ravnås
3317754e3e Fix a couple of missing includes for MSVC2005 and a C99 issue. Also, starting with 2.14.0, GLib won't provide a pipe(...
Original commit message from CVS:
Patch by: Ole André Vadla Ravnås  <ole.andre.ravnas@tandberg.com>
* gst/gsttrace.c:
* libs/gst/net/gstnetclientclock.c: (gst_net_client_clock_new):
* libs/gst/net/gstnettimepacket.c: (gst_net_time_packet_send):
* libs/gst/net/gstnettimeprovider.c: (gst_net_time_provider_new):
Fix a couple of missing includes for MSVC2005 and a C99 issue. Also,
starting with 2.14.0, GLib won't provide a pipe() macro any longer,
so use _pipe() directly (#492077).
* win32/common/dirent.c: (_treaddir):
Add a couple of casts to make it build without warnings with MSVC.
* win32/common/libgstreamer.def:
Add some more symbols that need to be exported.
2007-10-31 22:01:03 +00:00
Stefan Kost
cb909e5a85 libs/gst/base/gstbasesrc.c: Its "Since:" and not "@Since:". And remove an superflous cast.
Original commit message from CVS:
* libs/gst/base/gstbasesrc.c:
Its "Since:" and not "@Since:". And remove an superflous cast.
2007-10-31 13:01:34 +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
Jan Schmidt
d7cbd5de33 Use a custom export symbol regex for libgstcheck, as it needs to export symbols that don't match the standard GStream...
Original commit message from CVS:
* configure.ac:
* libs/gst/check/Makefile.am:
Use a custom export symbol regex for libgstcheck, as it needs
to export symbols that don't match the standard GStreamer gst_*
pattern, and  --export-dynamic is not portable (only works on
GNU ld)
* libs/gst/check/gstcheck.c: (gst_check_setup_src_pad),
(gst_check_setup_sink_pad):
Make sure to pass a message parameter to the fail_* macros.
* tests/check/gst/gstinfo.c: (GST_START_TEST):
Fix some compiler warnings.
2007-10-25 14:50:48 +00:00
Tim-Philipp Müller
eb1af0ddab libs/gst/check/gstcheck.*: Allow runtime selection of unit tests to run via the GST_CHECKS environment variable (test...
Original commit message from CVS:
* libs/gst/check/gstcheck.c:
* libs/gst/check/gstcheck.h:
Allow runtime selection of unit tests to run via the GST_CHECKS
environment variable (test case function names, comma-separated).
2007-10-16 16:12:36 +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
04fb0735f9 libs/gst/base/gstbasesrc.c: Rework the locking of basesrc in a similar fashion to basesink. We basically have one loc...
Original commit message from CVS:
* libs/gst/base/gstbasesrc.c: (gst_base_src_wait_playing),
(gst_base_src_set_live), (gst_base_src_is_live),
(gst_base_src_query_latency), (gst_base_src_perform_seek),
(gst_base_src_default_event), (gst_base_src_wait),
(gst_base_src_do_sync), (gst_base_src_get_range),
(gst_base_src_pad_get_range), (gst_base_src_loop),
(gst_base_src_unlock), (gst_base_src_unlock_stop),
(gst_base_src_set_flushing), (gst_base_src_set_playing),
(gst_base_src_activate_push), (gst_base_src_activate_pull),
(gst_base_src_change_state):
Rework the locking of basesrc in a similar fashion to basesink. We
basically have one lock (LIVE_LOCK) protecting the dataflow. This allows
us to handle live sources and semi live ones much better.
Simplify flushing.
Fix unlocking when seeking, shutting down and pausing in live sources.
2007-10-05 14:40:06 +00:00
Stefan Kost
4331d3880e libs/gst/base/gsttypefindhelper.c: Speedup typefinding. This is work in progress (see #459862).
Original commit message from CVS:
* libs/gst/base/gsttypefindhelper.c:
Speedup typefinding. This is work in progress (see #459862).
2007-10-03 12:05:17 +00:00
Wim Taymans
d39d3debfc libs/gst/base/gstbasesrc.c: Call unlock for live sources so that they can't get stuck in _create and produce a buffer...
Original commit message from CVS:
* libs/gst/base/gstbasesrc.c: (gst_base_src_do_sync),
(gst_base_src_get_range), (gst_base_src_change_state):
Call unlock for live sources so that they can't get stuck in _create and
produce a buffer before they are set back to PLAYING.
2007-10-02 15:20:58 +00:00
Wim Taymans
03cce63d25 libs/gst/base/gstbasesrc.c: Also initialize the counter that calculates the first timestamp on a buffer correctly for...
Original commit message from CVS:
* libs/gst/base/gstbasesrc.c: (gst_base_src_change_state):
Also initialize the counter that calculates the first timestamp on a
buffer correctly for non-live sources.
2007-10-01 17:59:21 +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
85177c0511 libs/gst/base/gstbasesrc.c: Don't unref the event after pushing it. Fixes #478401.
Original commit message from CVS:
* libs/gst/base/gstbasesrc.c: (gst_base_src_send_event):
Don't unref the event after pushing it. Fixes #478401.
2007-09-19 20:39:52 +00:00
Jan Schmidt
04757dd2d3 Fix minor compilation warnings shown with Forte.
Original commit message from CVS:
* gst/gstbin.c: (gst_bin_continue_func):
* libs/gst/base/gstbasesrc.c: (gst_base_src_do_sync):
* libs/gst/base/gstcollectpads.c: (gst_collect_pads_add_pad_full):
* plugins/elements/gstmultiqueue.c: (gst_multi_queue_loop):
Fix minor compilation warnings shown with Forte.
2007-09-17 17:17:29 +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
3336e1211a libs/gst/base/gstbasesrc.c: Push OOB events downstream when we get them in send_event. This allows the application to...
Original commit message from CVS:
* libs/gst/base/gstbasesrc.c: (gst_base_src_send_event):
Push OOB events downstream when we get them in send_event. This allows
the application to insert events in the pipeline.
Add some more comments.
2007-09-13 23:53:48 +00:00
Wim Taymans
2a94dbb663 libs/gst/base/gstbasesrc.c: Update docs.
Original commit message from CVS:
* libs/gst/base/gstbasesrc.c: (gst_base_src_query_latency),
(gst_base_src_do_sync), (gst_base_src_change_state):
Update docs.
Clean up the timestamping and syncing code for pseudo live sources.
2007-09-13 21:19:08 +00:00
Sebastien Moutte
e332c34902 libs/gst/controller/: Use gst_guint64_to_gdouble() when converting from a uint64 or
Original commit message from CVS:
Patch by: Sebastien Moutte <sebastien at moutte dot net>
* libs/gst/controller/gstinterpolation.c:
* libs/gst/controller/gstlfocontrolsource.c:
Use gst_guint64_to_gdouble() when converting from a uint64 or
GstClockTime to double to fix the build on win32. Fixes #474371.
2007-09-13 09:08:23 +00:00
Wim Taymans
3b67d01585 docs/design/part-live-source.txt: Add docs on how live sources should timestamp.
Original commit message from CVS:
* docs/design/part-live-source.txt:
Add docs on how live sources should timestamp.
* libs/gst/base/gstbasesrc.c: (gst_base_src_do_sync):
Add some more debug info.
For subclasses that are live and like to sync, add aditional startup
latency to sync time and timestamps so that we timstamp according to the
design doc.
2007-09-11 23:27:42 +00:00
Wim Taymans
5d57d96af6 libs/gst/base/gstbasesrc.*: Add property to make the basesrc timestamp buffers based on the current running time.
Original commit message from CVS:
* libs/gst/base/gstbasesrc.c: (gst_base_src_class_init),
(gst_base_src_init), (gst_base_src_set_do_timestamp),
(gst_base_src_get_do_timestamp), (gst_base_src_set_property),
(gst_base_src_get_property), (gst_base_src_do_sync):
* libs/gst/base/gstbasesrc.h:
Add property to make the basesrc timestamp buffers based on the current
running time.
API: GstBaseSrc::do-timestamp
API: gst_base_src_set_do_timestamp()
API: gst_base_src_get_do_timestamp()
2007-09-10 16:50:11 +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