Commit graph

559 commits

Author SHA1 Message Date
Sjoerd Simons
9479446ad8 libs/gst/base/gstcollectpads.*: Add refcounting to the collectpads data so we can track when it's safe to free the da...
Original commit message from CVS:
Patch by: Sjoerd Simons <sjoerd at luon dot net>
* libs/gst/base/gstcollectpads.c: (ref_data), (unref_data),
(gst_collect_pads_add_pad), (gst_collect_pads_remove_pad),
(gst_collect_pads_stop), (gst_collect_pads_event),
(gst_collect_pads_chain):
* libs/gst/base/gstcollectpads.h:
Add refcounting to the collectpads data so we can track when it's safe
to free the data. Fixes #383382.
2006-12-16 15:17:54 +00:00
Wim Taymans
6e2306d436 libs/gst/base/gstcollectpads.c: Automatically activate/deactivate pads when they are added to a started/stoped collec...
Original commit message from CVS:
* libs/gst/base/gstcollectpads.c: (gst_collect_pads_add_pad),
(gst_collect_pads_remove_pad):
Automatically activate/deactivate pads when they are added to a
started/stoped collectpads.
2006-12-15 17:09:59 +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
Edward Hervey
fdb51251dd libs/gst/base/: New GstDataQueue object for threadsafe queueing. Most useful for elements that need some queueing fun...
Original commit message from CVS:
* libs/gst/base/Makefile.am:
* libs/gst/base/gstdataqueue.c: (gst_data_queue_get_type),
(gst_data_queue_base_init), (gst_data_queue_class_init),
(gst_data_queue_init), (gst_data_queue_new),
(gst_data_queue_cleanup), (gst_data_queue_finalize),
(gst_data_queue_locked_flush), (gst_data_queue_locked_is_empty),
(gst_data_queue_locked_is_full), (gst_data_queue_flush),
(gst_data_queue_is_empty), (gst_data_queue_is_full),
(gst_data_queue_set_flushing), (gst_data_queue_push),
(gst_data_queue_pop), (gst_data_queue_drop_head),
(gst_data_queue_set_property), (gst_data_queue_get_property):
* libs/gst/base/gstdataqueue.h:
New GstDataQueue object for threadsafe queueing. Most useful for
elements that need some queueing functionnality.
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
Insert documentation for GstDataQueue
* plugins/elements/Makefile.am:
* plugins/elements/gstelements.c:
* plugins/elements/gstmultiqueue.c: (gst_multi_queue_base_init),
(gst_multi_queue_class_init), (gst_multi_queue_init),
(gst_multi_queue_finalize), (gst_multi_queue_set_property),
(gst_multi_queue_get_property), (gst_multi_queue_request_new_pad),
(gst_multi_queue_release_pad), (gst_single_queue_push_one),
(gst_multi_queue_item_destroy), (gst_multi_queue_item_new),
(gst_multi_queue_loop), (gst_multi_queue_chain),
(gst_multi_queue_sink_activate_push), (gst_multi_queue_sink_event),
(gst_multi_queue_getcaps), (gst_multi_queue_bufferalloc),
(gst_multi_queue_src_activate_push), (gst_multi_queue_acceptcaps),
(gst_multi_queue_src_event), (gst_multi_queue_src_query),
(wake_up_next_non_linked), (compute_next_non_linked),
(single_queue_overrun_cb), (single_queue_underrun_cb),
(single_queue_check_full), (gst_single_queue_new):
* plugins/elements/gstmultiqueue.h:
New multiqueue element, using GstDataQueue. Used for queuing multiple
streams.
Closes #344639 and #347785
2006-11-28 12:07:06 +00:00
Jonathan Matthew
ce2e82da3f libs/gst/base/gstbasesrc.c: Store new length in segment duration so we don't keep on calling the potentially expensiz...
Original commit message from CVS:
Patch by: Jonathan Matthew <jonathan at kaolin dot wh9 dot net>
* libs/gst/base/gstbasesrc.c: (gst_base_src_update_length):
Store new length in segment duration so we don't keep on calling the
potentially expensize get_size() call. Fixes #370865.
2006-11-13 17:54:58 +00:00
Jan Schmidt
2af1fde183 libs/gst/base/gstadapter.c: Fix format string to use all its arguments.
Original commit message from CVS:
* libs/gst/base/gstadapter.c: (gst_adapter_flush),
(gst_adapter_take_buffer):
Fix format string to use all its arguments.
Remove useless >= check on a guint
2006-11-10 10:50:19 +00:00
Jan Schmidt
6f363cd89b Do some optimisation work in GstAdapter to avoid copies in more cases.
Original commit message from CVS:
* Makefile.am:
* configure.ac:
* libs/gst/base/gstadapter.c: (gst_adapter_clear),
(gst_adapter_push), (gst_adapter_peek_into), (gst_adapter_peek),
(gst_adapter_flush), (gst_adapter_take), (gst_adapter_take_buffer):
* libs/gst/base/gstadapter.h:
* tests/check/libs/adapter.c: (create_and_fill_adapter),
(GST_START_TEST), (gst_adapter_suite):
* tests/examples/Makefile.am:
Do some optimisation work in GstAdapter to avoid copies in more cases.
It could still do slightly better by merging buffers when
gst_buffer_is_span_fast is true, but is already faster.
Also, avoid traversing a single-linked list to append each incoming
buffer inside the adapter.
Add simple test app that times the adapter behaviour in different
situations, and extend the unit test to check that bytes enter and
exit the adapter in their original order.
2006-11-09 14:37:38 +00:00
Wim Taymans
efebdfa353 libs/gst/base/gstbasetransform.c: Revert previous commit, 0 sized buffers are allowed. Reopens #363095.
Original commit message from CVS:
* libs/gst/base/gstbasetransform.c: (gst_base_transform_chain):
Revert previous commit, 0 sized buffers are allowed. Reopens #363095.
2006-10-27 10:10:26 +00:00
Edward Hervey
8171460bdf libs/gst/base/gstbasetransform.c: Don't push the buffer if it's empty.
Original commit message from CVS:
* libs/gst/base/gstbasetransform.c: (gst_base_transform_chain):
Don't push the buffer if it's empty.
Closes #363095
2006-10-25 13:41:44 +00:00
Wim Taymans
9bece70bf2 gst/gstevent.h: Add small comment.
Original commit message from CVS:
* gst/gstevent.h:
Add small comment.
* libs/gst/base/gstbasetransform.c:
(gst_base_transform_sink_eventfunc):
Debug segment values *after* updating them as this is more
interesting.
2006-10-24 08:22:19 +00:00
Sergey Scobich
5861382c2f libs/gst/base/gstbasesrc.c: Make sure size is always initialized. Fixes #364388.
Original commit message from CVS:
Patch by: Sergey Scobich <sergey dot scobich at gmail dot com>
* libs/gst/base/gstbasesrc.c: (gst_base_src_wait_playing),
(gst_base_src_start), (gst_base_src_activate_push):
Make sure size is always initialized. Fixes #364388.
2006-10-23 14:51:30 +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
Antoine Tremblay
3a0f9058ba libs/gst/base/gstbasesrc.c: Match _start/_stop calls in the activate functions. Remove redundant _stop call from the ...
Original commit message from CVS:
Based on patch by: Antoine Tremblay <hexa00 at gmail dot com>
* libs/gst/base/gstbasesrc.c:
(gst_base_src_default_check_get_range), (gst_base_src_start),
(gst_base_src_activate_push), (gst_base_src_activate_pull),
(gst_base_src_change_state):
Match _start/_stop calls in the activate functions. Remove redundant
_stop call from the state change function. Fixes #356910.
Turn failure DEBUG into ERROR.
2006-09-23 09:30:40 +00:00
Wim Taymans
53bf2d570c gst/gstelement.c: Use _DEBUG_OBJECT some more.
Original commit message from CVS:
* gst/gstelement.c: (gst_element_post_message),
(gst_element_dispose):
Use _DEBUG_OBJECT some more.
* libs/gst/base/gstbasesrc.c: (gst_base_src_loop):
Avoid typechecks.
* tools/gst-launch.c: (main):
If the toplevel element is not a GstPipeline, it must be put in a
pipeline so that a bus and clock is selected.
2006-09-18 13:44:12 +00:00
Tim-Philipp Müller
285f89d900 libs/gst/base/gstbasesrc.c: JITTER, RATE, and LATENCY query should be handled by the default case and not by the CONV...
Original commit message from CVS:
* libs/gst/base/gstbasesrc.c: (gst_base_src_default_query):
JITTER, RATE, and LATENCY query should be handled by the
default case and not by the CONVERT query code.
2006-09-17 19:31:27 +00:00
Edward Hervey
63b1a81cf8 libs/gst/base/gstbasetransform.c: Check if requested caps are the same as the sinks caps IF
Original commit message from CVS:
* libs/gst/base/gstbasetransform.c:
(gst_base_transform_buffer_alloc):
Check if requested caps are the same as the sinks caps IF
->have_same_caps is TRUE. If they are not, act as if have_same_caps
is FALSE.
This fixes the renegotiation issues stated in #352827.
2006-09-16 12:49:02 +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
Wim Taymans
41fbe76808 docs/: Fix docs some more.
Original commit message from CVS:
* docs/libs/gstreamer-libs-sections.txt:
* docs/plugins/gstreamer-plugins-sections.txt:
Fix docs some more.
* libs/gst/base/gstcollectpads.c: (gst_collect_pads_remove_pad),
(gst_collect_pads_event):
* libs/gst/base/gstcollectpads.h:
Documentation updates.
Free queued buffer when removing a pad.
2006-09-01 10:26:52 +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
4016e6c577 libs/gst/base/gstbasesrc.c: Small comment update.
Original commit message from CVS:
* libs/gst/base/gstbasesrc.c: (gst_base_src_perform_seek):
Small comment update.
* plugins/elements/gstidentity.c: (gst_identity_class_init),
(gst_identity_transform_ip):
Drop-probability is broken, mention this in the code with a
FIXME and also in the property description.
Make silent also be silent about the drop messages.
2006-08-28 15:48:24 +00:00
Stefan Kost
fc8d184bba implement caps merging (fixes #352580)
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstcaps.c: (gst_caps_structure_is_subset_field),
(gst_caps_structure_is_subset), (gst_caps_merge),
(gst_caps_merge_structure):
* gst/gstcaps.h:
* libs/gst/base/gstbasetransform.c:
(gst_base_transform_transform_caps):
* tests/check/gst/gstcaps.c: (GST_START_TEST), (gst_caps_suite):
implement caps merging (fixes #352580)
2006-08-24 10:40:31 +00:00
Stefan Kost
38d2d33f22 API: Add gst_caps_merge() and use it in basetransform, fixes #345444 in a better way
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstcaps.c: (gst_structure_is_equal_foreach),
(gst_caps_merge):
* gst/gstcaps.h:
* libs/gst/base/gstbasetransform.c:
(gst_base_transform_transform_caps):
API: Add gst_caps_merge() and use it in basetransform, fixes #345444
in a better way
2006-08-21 14:54:31 +00:00
Edward Hervey
4abd3fb116 libs/gst/base/gstbasetransform.c: Only call downstream buffer_alloc if transform element is passthrough or always_in_...
Original commit message from CVS:
* libs/gst/base/gstbasetransform.c:
(gst_base_transform_buffer_alloc):
Only call downstream buffer_alloc if transform element is passthrough
or always_in_place. Closes #350449.
2006-08-21 09:20:42 +00:00
Stefan Kost
c789a10963 Simplify caps to get rid of duplicates, fixes #345444
Original commit message from CVS:
* gst/gst.c:
* gst/gstpad.c: (gst_pad_set_active):
* libs/gst/base/gstbasetransform.c:
(gst_base_transform_transform_caps):
Simplify caps to get rid of duplicates, fixes #345444
2006-08-20 19:30:09 +00:00
Wim Taymans
f85c2fd84d libs/gst/base/gstbasesrc.c: If the parent state change function failed, don't assume we can safely stop the source, t...
Original commit message from CVS:
* libs/gst/base/gstbasesrc.c: (gst_base_src_change_state):
If the parent state change function failed, don't assume we can safely
stop the source, this will be done when the pads are deactivated.
2006-08-14 07:44:14 +00:00
Edward Hervey
cb49718e86 libs/gst/base/gstbasetransform.c: Even if we can't figure out the proper format to request downstream, call buffer_al...
Original commit message from CVS:
* libs/gst/base/gstbasetransform.c:
(gst_base_transform_buffer_alloc):
Even if we can't figure out the proper format to request downstream,
call buffer_alloc() downstream with the input parameters without setting
the caps on the srcpad. This will force negotiation in the chain
function.
Closes #350449
2006-08-09 11:01:20 +00:00
Wim Taymans
2d6cf77ed4 libs/gst/base/gstbasetransform.c: Use OBJECT_LOCK and refcounting to get the pad caps in the buffer_alloc function be...
Original commit message from CVS:
* libs/gst/base/gstbasetransform.c:
(gst_base_transform_buffer_alloc):
Use OBJECT_LOCK and refcounting to get the pad caps in the
buffer_alloc function because the caps could change while we are
busy with them. Fixes #349105
2006-07-31 15:12:59 +00:00
Tim-Philipp Müller
8b97e07338 libs/gst/base/gstbasesrc.h: Note in the docs that the ::newsegment vfunc is not actually used by
Original commit message from CVS:
* libs/gst/base/gstbasesrc.h:
Note in the docs that the ::newsegment vfunc is not actually used by
GstBaseSrc.
2006-07-29 13:45:09 +00:00
Wim Taymans
6939f83e75 libs/gst/base/gstcollectpads.c: When flushing a pad, also clear the queued buffer so that we don't accidentally use i...
Original commit message from CVS:
* libs/gst/base/gstcollectpads.c:
(gst_collect_pads_set_flushing_unlocked), (gst_collect_pads_pop),
(gst_collect_pads_clear), (gst_collect_pads_flush),
(gst_collect_pads_event), (gst_collect_pads_chain):
When flushing a pad, also clear the queued buffer so that we don't
accidentally use it when we shouldn't.
Fix leaks by inreffing incomming buffer.
Flush out queued buffers in case of errors.
Fixes #347452.
2006-07-28 14:09:10 +00:00
Jan Schmidt
38aad233cc libs/gst/base/gstbasetransform.c: Extra debug output
Original commit message from CVS:
* libs/gst/base/gstbasetransform.c: (gst_base_transform_setcaps):
Extra debug output
* tests/check/libs/gdp.c: (gst_dp_suite):
Take a whack at fixing the ppc compile using a different define to
disable the broken test.
* tests/check/pipelines/parse-launch.c: (GST_START_TEST):
Remove excess g_print()
2006-07-27 14:32:01 +00:00
Wim Taymans
21b8eaeab5 Revert fix for regression in #347408 after release.
Original commit message from CVS:
* libs/gst/base/gstbasesrc.c: (gst_base_src_update_length):
* tests/check/elements/filesrc.c: (GST_START_TEST):
Revert fix for regression in #347408 after release.
2006-07-14 16:42:20 +00:00
Wim Taymans
1c6b809344 Revert pull-0 fix for release. Disable check. Fixes #347408.
Original commit message from CVS:
* libs/gst/base/gstbasesrc.c: (gst_base_src_update_length):
* tests/check/elements/filesrc.c: (GST_START_TEST):
Revert pull-0 fix for release. Disable check. Fixes #347408.
2006-07-13 15:51:05 +00:00
Wim Taymans
ac216fcfdd libs/gst/base/gstbasesrc.c: Update docs. blocksize == 0 now means the default blocksize when working in push based mode.
Original commit message from CVS:
* libs/gst/base/gstbasesrc.c: (gst_base_src_class_init),
(gst_base_src_wait), (gst_base_src_update_length),
(gst_base_src_get_range), (gst_base_src_default_check_get_range),
(gst_base_src_check_get_range), (gst_base_src_pad_check_get_range),
(gst_base_src_loop), (gst_base_src_start),
(gst_base_src_activate_pull):
Update docs.
blocksize == 0 now means the default blocksize when working in push
based mode.
Remove some pointless asserts in _wait function.
Fix offset/length calculations and EOS handling. We can now pull 0
bytes as well, which is allowed.
use _check_get_range() to decide if we can operate in _pull based
mode.
Fix refcounting leak when check_get_range function was not
implemented.
API GstBaseSrc::blocksize range can be 0 too now (default)
* tests/check/elements/filesrc.c: (GST_START_TEST),
(filesrc_suite):
Added check to test _get_range() behaviour.
2006-07-06 15:46:25 +00:00
Wim Taymans
751282f41c libs/gst/base/gstpushsrc.c: Add some more docs here and there.
Original commit message from CVS:
* libs/gst/base/gstpushsrc.c: (gst_push_src_check_get_range):
Add some more docs here and there.
2006-07-05 18:20:58 +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
d7c7dcc686 libs/gst/base/gstbasetransform.c: Make sure the buffer we pass to transform_ip has a refcount of 1 and thus is writab...
Original commit message from CVS:
* libs/gst/base/gstbasetransform.c:
(gst_base_transform_prepare_output_buffer),
(gst_base_transform_buffer_alloc),
(gst_base_transform_handle_buffer):
Make sure the buffer we pass to transform_ip has a refcount of
1 and thus is writable. Fixes #343196
2006-07-05 08:16:12 +00:00
Thomas Vander Stichele
b48e0d830d moap ignore
Original commit message from CVS:
moap ignore
2006-07-02 00:39:28 +00:00
Thomas Vander Stichele
6c54c2fe59 moap ignore
Original commit message from CVS:
moap ignore
2006-07-02 00:38:35 +00:00
Thomas Vander Stichele
3c3bbc87d4 configure.ac: set CFLAGS and friends to -O0 if gcov is being used add GCOV LIBS
Original commit message from CVS:
* configure.ac:
set CFLAGS and friends to -O0 if gcov is being used
add GCOV LIBS
* gst/Makefile.am:
* libs/gst/base/Makefile.am:
* libs/gst/check/Makefile.am:
* libs/gst/controller/Makefile.am:
* libs/gst/dataprotocol/Makefile.am:
* libs/gst/net/Makefile.am:
* plugins/elements/Makefile.am:
* plugins/indexers/Makefile.am:
add makefile rules to generate gcov data and clean up
* tests/check/Makefile.am:
add a coverage target that generates an html overview
of coverage data
2006-07-01 23:26:06 +00:00
Wim Taymans
201bdf7e27 libs/gst/base/gstbasetransform.c: Forgot to remove two unneeded unrefs.
Original commit message from CVS:
* libs/gst/base/gstbasetransform.c:
(gst_base_transform_buffer_alloc):
Forgot to remove two unneeded unrefs.
Simplify a check _is_equal allready checks the obvious case.
2006-06-22 15:12:50 +00:00
Wim Taymans
ccb2e93a3a gst/gstcaps.c: Fix crasher when passed NULL. Doc clarification.
Original commit message from CVS:
* gst/gstcaps.c: (gst_caps_replace):
Fix crasher when passed NULL. Doc clarification.
Optimize for the trivial case.
* gst/gstpipeline.c: (gst_pipeline_change_state):
Small cleanups.
* libs/gst/base/gstbasesrc.c: (gst_base_src_loop):
Small documentation cleanup.
* libs/gst/base/gstbasetransform.c:
(gst_base_transform_buffer_alloc):
Don't use silly gst_pad_get_negotiated_caps, GST_PAD_CAPS
is what we need and it avoids a whole lot of redundant
refcount operations.
2006-06-22 13:51:19 +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
Alessandro Decina
d37656cf8d libs/gst/base/gstcollectpads.c: Make sure the EOS flag is cleared from pads after a flush or stop. Fixes #343538.
Original commit message from CVS:
Patch by: Alessandro Decina <alessandro at nnva dot org>
* libs/gst/base/gstcollectpads.c: (gst_collect_pads_stop):
Make sure the EOS flag is cleared from pads after a flush
or stop. Fixes #343538.
* tests/check/libs/collectpads.c: (GST_START_TEST),
(gst_collect_pads_suite):
Added test for collectpads reusage after EOS.
2006-06-01 09:02:23 +00:00
Wim Taymans
cbc70ba654 libs/gst/base/gstcollectpads.c: Handle the case where a pad is removed from the collection that could cause the other...
Original commit message from CVS:
* libs/gst/base/gstcollectpads.c: (gst_collect_pads_remove_pad),
(gst_collect_pads_chain):
Handle the case where a pad is removed from the collection
that could cause the other pads to become collectable.
2006-05-30 15:55:19 +00:00
Wim Taymans
2a51528a41 gst/gstelement.c: Clarify the use of _release_request_pad() and _get_request_pad() a bit better.
Original commit message from CVS:
* gst/gstelement.c:
Clarify the use of _release_request_pad() and
_get_request_pad() a bit better.
* libs/gst/base/gstadapter.c: (gst_adapter_peek),
(gst_adapter_take_buffer):
Fix some doc and comment typos.
2006-05-30 15:53:40 +00:00
Wim Taymans
f55a023510 libs/gst/base/gstcollectpads.c: When rebuilding the pad list, don't leak the previous list.
Original commit message from CVS:
* libs/gst/base/gstcollectpads.c: (gst_collect_pads_check_pads):
When rebuilding the pad list, don't leak the previous list.
2006-05-30 11:43:43 +00:00
Lutz Mueller
eb3f062cc1 libs/gst/base/gstbasesrc.c: Publish supported query types.
Original commit message from CVS:
Patch by: Lutz Mueller <lutz at topfrose dot de>
* libs/gst/base/gstbasesrc.c: (gst_base_src_class_init),
(gst_base_src_get_query_types), (gst_base_src_update_length):
Publish supported query types.
Update last_stop field in get_range mode so the position
query works. Fixes #342321.
2006-05-30 10:57:44 +00:00
Alessandro Decina
fc62a6f511 libs/gst/base/gstcollectpads.c: Unlock mutex when removing an unknown pad.
Original commit message from CVS:
Patch by: Alessandro Decina <alessandro at nnva dot org>
* libs/gst/base/gstcollectpads.c: (gst_collect_pads_remove_pad):
Unlock mutex when removing an unknown pad.
Fixes #343334.
* tests/check/Makefile.am:
* tests/check/libs/collectpads.c: (collected_cb), (push_buffer),
(push_event), (setup), (teardown), (GST_START_TEST),
(gst_collect_pads_suite), (main):
Added collecpads check, disabled for now as check crashes for
some reason.
2006-05-30 09:42:09 +00:00
Wim Taymans
ccc17d0bff libs/gst/base/gstcollectpads.c: Don't leak pads lists.
Original commit message from CVS:
* libs/gst/base/gstcollectpads.c: (gst_collect_pads_finalize):
Don't leak pads lists.
2006-05-29 17:20:03 +00:00
Wim Taymans
506118081e API: gst_collect_pads_set_flushing
Original commit message from CVS:
* docs/libs/gstreamer-libs-sections.txt:
* libs/gst/base/gstcollectpads.c:
(gst_collect_pads_set_flushing_unlocked),
(gst_collect_pads_set_flushing), (gst_collect_pads_start),
(gst_collect_pads_stop):
* libs/gst/base/gstcollectpads.h:
API: gst_collect_pads_set_flushing
Added api to set the pads to flushing, usefull for seeking
code in elements using collectpads.
Clear segment when receiving a flush.
2006-05-29 16:00:13 +00:00
Tim-Philipp Müller
651061dfd9 libs/gst/base/gsttypefindhelper.c: Fix off-by-one bug that would only allow peeks of N-1 bytes from the start even if...
Original commit message from CVS:
* libs/gst/base/gsttypefindhelper.c: (buf_helper_find_peek):
Fix off-by-one bug that would only allow peeks of N-1 bytes
from the start even if the buffer to typefind on contains
in fact N bytes of data (makes vorbis typefinding from a
vorbis identification header buffer work).
* tests/check/Makefile.am:
* tests/check/libs/.cvsignore:
* tests/check/libs/typefindhelper.c: (GST_START_TEST),
(gst_typefindhelper_suite), (main), (foobar_typefind),
(plugin_init):
Add very basic unit test for gst_type_find_helper_for_buffer()
that checks for the problem fixed above.
2006-05-24 17:11:06 +00:00
Mark Nauwelaerts
da7cd3b635 libs/gst/base/gstcollectpads.c: clear/reset segment info in FLUSH_STOP.
Original commit message from CVS:
Patch by: Mark Nauwelaerts <manauw at skynet dot be>
* libs/gst/base/gstcollectpads.c: (gst_collect_pads_remove_pad),
(gst_collect_pads_event):
clear/reset segment info in FLUSH_STOP.
Fixes #336929.
2006-05-23 09:40:14 +00:00
Stefan Kost
a039f14524 libs/gst/base/gstcollectpads.c: Flush queued buffer on _stop(), fixes playing again (#342454)
Original commit message from CVS:
* libs/gst/base/gstcollectpads.c: (gst_collect_pads_stop),
(gst_collect_pads_check_collected):
Flush queued buffer on _stop(), fixes playing again (#342454)
2006-05-22 16:30:34 +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
Wim Taymans
d81a21da50 libs/gst/base/gstcollectpads.*: No need to call _stop in _finalize.
Original commit message from CVS:
* libs/gst/base/gstcollectpads.c: (gst_collect_pads_finalize),
(gst_collect_pads_add_pad), (gst_collect_pads_remove_pad),
(gst_collect_pads_set_flushing), (gst_collect_pads_start),
(gst_collect_pads_stop):
* libs/gst/base/gstcollectpads.h:
No need to call _stop in _finalize.
Iterate the main pad list in _finalize.
Added some more debug.
Free lists and data in the right order.
Also free data whem doing _remove_pad when stopped for
backward compatibility protect ::started with PAD_LOCK as
well.
2006-05-10 14:51:33 +00:00
Wim Taymans
3dc7e60a90 libs/gst/base/gstcollectpads.c: Update docs.
Original commit message from CVS:
* libs/gst/base/gstcollectpads.c: (gst_collect_pads_collect),
(gst_collect_pads_collect_range), (gst_collect_pads_available),
(gst_collect_pads_check_pads), (gst_collect_pads_check_collected),
(gst_collect_pads_event), (gst_collect_pads_chain):
Update docs.
Better debug info.
Catch and return errors from the collect function
Refuse data on eos pads.
2006-05-10 11:24:55 +00:00
Wim Taymans
ce4d0980f1 libs/gst/base/gstcollectpads.*: Clean up the mess that is collectpads, add comments and
Original commit message from CVS:
* libs/gst/base/gstcollectpads.c: (gst_collect_pads_init),
(gst_collect_pads_finalize), (gst_collect_pads_add_pad),
(gst_collect_pads_remove_pad), (gst_collect_pads_set_flushing),
(gst_collect_pads_start), (gst_collect_pads_stop),
(gst_collect_pads_peek), (gst_collect_pads_pop),
(gst_collect_pads_available), (gst_collect_pads_read),
(gst_collect_pads_flush), (gst_collect_pads_check_pads),
(gst_collect_pads_is_collected), (gst_collect_pads_event),
(gst_collect_pads_chain):
* libs/gst/base/gstcollectpads.h:
Clean up the mess that is collectpads, add comments and
FIXMEs where needed.
Maintain a separate pad list so we can add pads while
collecting the other ones. For this we need a new separate
lock (see comics).
Fix memory leak in finalize.
Refactor some weird code to set/unset pad flushing flags, mark
with comments.
Don't crash in _available, _read, _flush when we're EOS.
* tests/check/libs/.cvsignore:
Ignore adapter check binary.
2006-05-09 20:47:23 +00:00
Wim Taymans
d1c7a91f20 libs/gst/base/gstbasesrc.c: Always push non-flushing serialized events in the streaming thread.
Original commit message from CVS:
* libs/gst/base/gstbasesrc.c: (gst_base_src_perform_seek),
(gst_base_src_loop), (gst_base_src_change_state):
Always push non-flushing serialized events in the streaming
thread.
2006-05-08 17:03:13 +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
c2371ecece libs/gst/base/gstbasesrc.c: Unify error handling, don't post an error message when a push() returns EOS but perform o...
Original commit message from CVS:
* libs/gst/base/gstbasesrc.c: (gst_base_src_loop):
Unify error handling, don't post an error message
when a push() returns EOS but perform our normal EOS
handling code. Fixes #340772.
2006-05-08 11:35:29 +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
James Andrewartha
5deab8d3c3 Make sure gstprivate.h and/or config.h are always included first, otherwise some of our defines (like _FILE_OFFSET_BI...
Original commit message from CVS:
Patch by: James Andrewartha <trs80 at tartarus uwa edu au>
* gst/gst.c:
* gst/gstbus.c:
* gst/gstclock.c:
* gst/gstevent.c:
* gst/gstformat.c:
* gst/gstmessage.c:
* gst/gstparse.c:
* gst/gstquery.c:
* gst/gstutils.c:
* gst/parse/Makefile.am:
* libs/gst/base/gstadapter.c:
* libs/gst/base/gstbasesrc.c:
* libs/gst/base/gstpushsrc.c:
* libs/gst/base/gsttypefindhelper.c:
* plugins/elements/gstfakesrc.c:
* plugins/elements/gstidentity.c:
Make sure gstprivate.h and/or config.h are
always included first, otherwise some of our
defines (like _FILE_OFFSET_BITS) might be
redefined in the system headers. Fixes build
on opensolaris (#340016).
2006-05-04 15:20:14 +00:00
Wim Taymans
4ceea3e44e docs/libs/gstreamer-libs-sections.txt: API: addition: gst_adapter_take_buffer()
Original commit message from CVS:
* docs/libs/gstreamer-libs-sections.txt:
API: addition: gst_adapter_take_buffer()
* libs/gst/base/gstadapter.c: (gst_adapter_push),
(gst_adapter_peek), (gst_adapter_take), (gst_adapter_take_buffer),
(gst_adapter_available_fast):
* libs/gst/base/gstadapter.h:
Prepare for optimizing the hell out of this hugely inefficient
piece of code.
Added gst_adapter_take_buffer() so we can at least start thinking
about subbuffering and merging.
Added some comments.
* tests/check/Makefile.am:
* tests/check/libs/adapter.c: (GST_START_TEST),
(gst_adapter_suite), (main):
Added GstAdapter check.
2006-05-04 14:19:53 +00:00
Thomas Vander Stichele
da6dcf9a64 docs/libs/gstreamer-libs-sections.txt: make sure GstBaseTransformClass shows up in the docs
Original commit message from CVS:

* docs/libs/gstreamer-libs-sections.txt:
make sure GstBaseTransformClass shows up in the docs
* libs/gst/base/gstbasetransform.c:
* libs/gst/base/gstbasetransform.h:
move docs so gtk-doc picks it up now
2006-05-03 16:45:11 +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
e99b5f24e9 libs/gst/base/gstcollectpads.c: back out the newsegment handling change, see #340060 for ongoing discussion
Original commit message from CVS:
* libs/gst/base/gstcollectpads.c: (gst_collect_pads_event):
back out the newsegment handling change, see #340060 for ongoing
discussion
2006-05-02 17:17:22 +00:00
Stefan Kost
d3211824bd libs/gst/base/gstcollectpads.c: fix changelog entry about last collectpads change, add notes about proper fix
Original commit message from CVS:
* libs/gst/base/gstcollectpads.c: (gst_collect_pads_event):
fix changelog entry about last collectpads change,
add notes about proper fix
2006-04-28 20:55:33 +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
d681c7ab62 libs/gst/base/gstbasesrc.c: Documentation updates.
Original commit message from CVS:
* libs/gst/base/gstbasesrc.c: (gst_base_src_perform_seek),
(gst_base_src_send_event), (gst_base_src_change_state):
Documentation updates.
2006-04-28 13:18:41 +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
Stefan Kost
7e2286d79c Fix broken GObject macros
Original commit message from CVS:
* gst/gstindex.h:
* gst/gstxml.h:
* libs/gst/base/gstadapter.h:
* libs/gst/base/gstbasesink.h:
* libs/gst/base/gstbasesrc.h:
* libs/gst/base/gstbasetransform.h:
* libs/gst/base/gstcollectpads.h:
* libs/gst/base/gstpushsrc.h:
Fix broken GObject macros
2006-04-08 18:05:16 +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
Andy Wingo
75b96e0efd gst/gstpad.c (gst_pad_set_blocked_async): More debug. libs/gst/base/gstbasetransform.c
Original commit message from CVS:
2006-04-05  Andy Wingo  <wingo@pobox.com>

* gst/gstpad.c (gst_pad_set_blocked_async): More debug.

* libs/gst/base/gstbasetransform.c
(gst_base_transform_sink_eventfunc): When resetting our segment on
FLUSH_STOP, also update the flag saying we haven't seen a
newsegment.
2006-04-05 10:26:29 +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
72d0c78c0f libs/gst/base/gstbasesrc.c: Perform the EOS logic when we reach the segment stop position.
Original commit message from CVS:
* libs/gst/base/gstbasesrc.c: (gst_base_src_finalize),
(gst_base_src_send_event), (gst_base_src_loop),
(gst_base_src_change_state):
Perform the EOS logic when we reach the segment stop position.
Fix compilation on gcc4.1
2006-03-29 13:39:05 +00:00
Wim Taymans
6b3b2678bb libs/gst/base/gstbasesrc.c: Handle element seek correctly when we are streaming.
Original commit message from CVS:
Inspired by a patch of: Lutz Mueller <lutz at topfrose dot de>
* libs/gst/base/gstbasesrc.c: (gst_base_src_finalize),
(gst_base_src_send_event), (gst_base_src_change_state):
Handle element seek correctly when we are streaming.
Fixes #326998.
2006-03-27 11:48:10 +00:00
Stefan Kost
6a55dddc1c libs/gst/base/gstcollectpads.c: more debug details
Original commit message from CVS:
* libs/gst/base/gstcollectpads.c: (gst_collect_pads_is_collected):
more debug details
2006-03-24 17:10:46 +00:00
Wim Taymans
171d23cf77 libs/gst/base/gstbasesink.h: Only add fields, not insert or we break ABI.
Original commit message from CVS:
* libs/gst/base/gstbasesink.h:
Only add fields, not insert or we break ABI.
2006-03-24 09:48:33 +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
Edward Hervey
ac377b0cdc Series of fixes for dereferenced pointers that gcc 4.1 complains about.
Original commit message from CVS:
reviewed by: <delete if not using a buddy>
* gst/gstbin.c: (gst_bin_dispose), (gst_bin_provide_clock_func),
(gst_bin_handle_message_func):
* gst/gstclock.c: (gst_clock_dispose), (gst_clock_set_master):
* gst/gstelement.c: (gst_element_set_clock), (gst_element_dispose),
(gst_element_set_bus_func):
* gst/gstghostpad.c: (gst_proxy_pad_dispose):
* gst/gstminiobject.c: (gst_value_set_mini_object),
(gst_value_take_mini_object):
* gst/gstpad.c: (gst_pad_set_pad_template):
* gst/gstpipeline.c: (gst_pipeline_dispose),
(gst_pipeline_use_clock), (gst_pipeline_auto_clock):
* libs/gst/base/gstcollectpads.c: (gst_collect_pads_pop),
(gst_collect_pads_chain):
* libs/gst/net/gstnettimeprovider.c:
(gst_net_time_provider_set_property):
Series of fixes for dereferenced pointers that gcc 4.1 complains about.
It's in fact all issues with gst_*object_replace().
2006-03-21 14:14:49 +00:00
Wim Taymans
006b34dc3f libs/gst/base/gstadapter.c: Add some docs.
Original commit message from CVS:
* libs/gst/base/gstadapter.c:
Add some docs.
2006-03-15 16:22:26 +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
1dcaa1fc4b libs/gst/base/gstbasetransform.*: Make basetransform virtual method for src events too.
Original commit message from CVS:
* libs/gst/base/gstbasetransform.c:
(gst_base_transform_class_init), (gst_base_transform_init),
(gst_base_transform_sink_event),
(gst_base_transform_sink_eventfunc),
(gst_base_transform_src_event), (gst_base_transform_src_eventfunc),
(gst_base_transform_handle_buffer), (gst_base_transform_chain),
(gst_base_transform_set_property),
(gst_base_transform_get_property),
(gst_base_transform_change_state), (gst_base_transform_update_qos),
(gst_base_transform_set_qos_enabled),
(gst_base_transform_is_qos_enabled):
* libs/gst/base/gstbasetransform.h:
Make basetransform virtual method for src events too.
Handle QOS in basetransform.
API: gst_base_transform_update_qos
API: gst_base_transform_set_qos_enabled
API: gst_base_transform_is_qos_enabled
2006-03-13 11:27:57 +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
Tim-Philipp Müller
b53dc49d8d libs/gst/base/gsttypefindhelper.c: If we are provided with the size, we should implement
Original commit message from CVS:
* libs/gst/base/gsttypefindhelper.c: (helper_find_get_length),
(gst_type_find_helper_get_range):
If we are provided with the size, we should implement
GstTypeFind::get_length, so that typefind functions who
want to can actually peek at the middle of a file.
2006-03-09 10:46:35 +00:00
Wim Taymans
3f3536bf73 docs/design/part-element-transform.txt: Added some docs about the design of tranform elements.
Original commit message from CVS:
* docs/design/part-element-transform.txt:
Added some docs about the design of tranform elements.
* libs/gst/base/gstbasesrc.c: (gst_base_src_perform_seek),
(gst_base_src_loop), (gst_base_src_change_state):
Mark buffers with the DISCONT flag.
2006-03-08 13:44:55 +00:00
Wim Taymans
21a646d674 libs/gst/base/gstbasetransform.c: Cleanups, separate normal flow from errors, add sensible
Original commit message from CVS:
* libs/gst/base/gstbasetransform.c:
(gst_base_transform_transform_caps),
(gst_base_transform_transform_size),
(gst_base_transform_prepare_output_buffer),
(gst_base_transform_get_unit_size),
(gst_base_transform_buffer_alloc),
(gst_base_transform_handle_buffer),
(gst_base_transform_change_state):
Cleanups, separate normal flow from errors, add sensible
DEBUG lines.
Don't try to renegotiate when allocating an output buffer.
Also copy DISCONT buffer flag when copying a buffer.
Reset the transform after we finish streaming, not during.
2006-03-08 10:17:41 +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
c45bd3fb9f Fix #333669, Add pad accessor defines for GstBaseTransform
Original commit message from CVS:
* docs/libs/gstreamer-libs-sections.txt:
* libs/gst/base/gstbasetransform.h:
Fix #333669, Add pad accessor defines for GstBaseTransform
Fix docs for GstBaseSrc.
2006-03-07 15:14:51 +00:00
Wim Taymans
37d77aaeee Small documentation fixes.
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstbuffer.h:
* gst/gstvalue.c:
* libs/gst/base/gstbasetransform.h:
Small documentation fixes.
2006-03-07 15:08:57 +00:00
Tim-Philipp Müller
7789e9eb94 libs/gst/base/gstpushsrc.c: Push sources don't support pull mode by default.
Original commit message from CVS:
* libs/gst/base/gstpushsrc.c: (gst_push_src_class_init),
(gst_push_src_check_get_range):
Push sources don't support pull mode by default.
2006-03-07 09:28:44 +00:00
Tim-Philipp Müller
b5161fda6a libs/gst/base/gstbasesrc.*: Add ::check_get_range() vfunc to GstBaseSrc (#332611), provide default implementation, an...
Original commit message from CVS:
* libs/gst/base/gstbasesrc.c: (gst_base_src_class_init),
(gst_base_src_init), (gst_base_src_pad_check_get_range),
(gst_base_src_default_check_get_range):
* libs/gst/base/gstbasesrc.h:
Add ::check_get_range() vfunc to GstBaseSrc (#332611),
provide default implementation, and rename
gst_base_src_check_get_range() to
gst_base_src_pad_check_get_range() for clarity.
2006-03-06 19:55:06 +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
Tim-Philipp Müller
19e9145a5c libs/gst/base/gstbasetransform.c: Make sure caps are writable before passing them to gst_caps_append().
Original commit message from CVS:
* libs/gst/base/gstbasetransform.c:
(gst_base_transform_transform_caps):
Make sure caps are writable before passing them to
gst_caps_append().
2006-03-05 20:56:55 +00:00
Tim-Philipp Müller
eeec129c6f New API: gst_type_find_helper_get_range() (#333042).
Original commit message from CVS:
* docs/libs/gstreamer-libs-sections.txt:
* libs/gst/base/gsttypefindhelper.c: (helper_find_peek),
(helper_find_suggest), (gst_type_find_helper_get_range),
(gst_type_find_helper):
* libs/gst/base/gsttypefindhelper.h:
New API: gst_type_find_helper_get_range() (#333042).
2006-03-02 13:45:32 +00:00
Tim-Philipp Müller
aad2aa1288 libs/gst/base/gsttypefindhelper.c: Try typefinding factories with the highest rank first.
Original commit message from CVS:
* libs/gst/base/gsttypefindhelper.c: (type_find_factory_rank_cmp),
(gst_type_find_helper):
Try typefinding factories with the highest rank first.
2006-02-27 19:45:31 +00:00
Tim-Philipp Müller
cc13a984eb Add section for typefind helper and add documentation for the old and the new function.
Original commit message from CVS:
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* libs/gst/base/gsttypefindhelper.c:
Add section for typefind helper and add documentation
for the old and the new function.
2006-02-27 19:19:40 +00:00
Tim-Philipp Müller
991aa71ffb libs/gst/base/gsttypefindhelper.*: New API: gst_type_find_helper_for_buffer() (#332723).
Original commit message from CVS:
* libs/gst/base/gsttypefindhelper.c: (buf_helper_find_peek),
(buf_helper_find_suggest), (type_find_factory_rank_cmp),
(gst_type_find_helper_for_buffer):
* libs/gst/base/gsttypefindhelper.h:
New API: gst_type_find_helper_for_buffer() (#332723).
2006-02-27 18:43:26 +00:00
Tim-Philipp Müller
32aff01e8d libs/gst/base/gstbasesrc.c: Document how applications can stop recording from live sources (see #330996).
Original commit message from CVS:
* libs/gst/base/gstbasesrc.c:
Document how applications can stop recording from
live sources (see #330996).
2006-02-24 10:57:42 +00:00
Tim-Philipp Müller
47f2709514 libs/gst/base/gstbasesrc.*: Don't unconditionally send EOS when going from PAUSED to
Original commit message from CVS:
* libs/gst/base/gstbasesrc.c: (gst_base_src_class_init),
(gst_base_src_init), (gst_base_src_loop),
(gst_base_src_activate_push), (gst_base_src_activate_pull),
(gst_base_src_change_state):
* libs/gst/base/gstbasesrc.h:
Don't unconditionally send EOS when going from PAUSED to
READY state, esp. make sure we don't send two EOS events
in some cases (e.g. one when reaching EOS and one when
going from PAUSED to READY). Also, we don't want to send
EOS events when operating in pull mode. However, we do
want to send an EOS event when shutting down a live
source explicitly, for example (fixes #330996).
2006-02-23 16:24:36 +00:00
Julien Moutte
4bcfb92b9a libs/gst/base/gstbasetransform.c: Fix a stupid bug. I was sure i compiled that.
Original commit message from CVS:


* libs/gst/base/gstbasetransform.c:
(gst_base_transform_change_state): Fix a stupid bug. I was
sure i compiled that.
------------------------------------------------------
2006-02-20 16:07:42 +00:00
Julien Moutte
2c04844949 libs/gst/base/gstbasetransform.c: Make basetransform reusable. (Closes #331898)
Original commit message from CVS:


* libs/gst/base/gstbasetransform.c:
(gst_base_transform_change_state): Make basetransform reusable.
(Closes #331898)
------------------------------------------------------
2006-02-20 15:01:14 +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
Wim Taymans
b37766658e docs/design/part-TODO.txt: Updated TODO list, basesrc supports seeking to non-bytes formats.
Original commit message from CVS:
* docs/design/part-TODO.txt:
Updated TODO list, basesrc supports seeking to non-bytes
formats.

* docs/design/part-element-sink.txt:
Update docs.

* gst/gstbin.c: (bin_replace_message),
(gst_bin_handle_message_func):
* gst/gstbus.c: (gst_bus_post), (gst_bus_pop):
* gst/gstevent.c: (gst_event_finalize):
* gst/gstpad.c: (gst_pad_event_default_dispatch),
(gst_pad_send_event):
Use shiny new _TYPE_NAME macros.

* libs/gst/base/gstbasesrc.c: (gst_base_src_get_range):
Move debug statement up.

* gst/gstelement.c: (gst_element_set_locked_state):
Add some debugging.
2006-02-13 11:52:43 +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
Tim-Philipp Müller
1da556ed26 libs/gst/base/gstbasesrc.c: Send EOS event when stopping.
Original commit message from CVS:
* libs/gst/base/gstbasesrc.c: (gst_base_src_change_state):
Send EOS event when stopping.
2006-02-06 14:57:40 +00:00
Julien Moutte
14de34d6ec libs/gst/base/gstcollectpads.c: Collectpads now holds a reference to the GstPad that was added. Indeed we don't want ...
Original commit message from CVS:
2006-02-05  Julien MOUTTE  <julien@moutte.net>

* libs/gst/base/gstcollectpads.c: (gst_collect_pads_finalize),
(gst_collect_pads_add_pad), (gst_collect_pads_remove_pad),
(gst_collect_pads_start), (gst_collect_pads_stop),
(gst_collect_pads_event): Collectpads now holds a reference
to the GstPad that was added. Indeed we don't want to look
at pads that might just go away with no warning...
2006-02-05 18:13:28 +00:00
Julien Moutte
eafd3ff391 libs/gst/base/gstcollectpads.*: Handle flush. Adapted from
Original commit message from CVS:
2006-02-05  Julien MOUTTE  <julien@moutte.net>

* libs/gst/base/gstcollectpads.c: (gst_collect_pads_add_pad),
(gst_collect_pads_start), (gst_collect_pads_stop),
(gst_collect_pads_event), (gst_collect_pads_chain):
* libs/gst/base/gstcollectpads.h: Handle flush. Adapted from
Mark Nauwelaerts's patch on bug #328491.
2006-02-05 16:18:37 +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
Stefan Kost
a53172d79d doc fixes, to link to function, just write gst_cool_function(), don't prefix with '#'
Original commit message from CVS:
* gst/gstcaps.c:
* gst/gstelement.c: (gst_element_send_event):
* gst/gstevent.c:
* gst/gstinfo.c:
* gst/gstiterator.c:
* gst/gstiterator.h:
* gst/gstpad.c: (gst_pad_send_event):
* gst/gststructure.c:
* gst/gsturi.c:
* gst/gstutils.c:
* gst/gstvalue.c:
* libs/gst/base/gstadapter.c:
doc fixes, to link to function, just write gst_cool_function(), don't
prefix with '#'
2006-01-27 22:34:51 +00:00
Wim Taymans
74464f0730 libs/gst/base/gstbasesrc.c: Add some debugging.
Original commit message from CVS:
* libs/gst/base/gstbasesrc.c: (gst_base_src_get_range):
Add some debugging.
2006-01-26 12:59: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
Jan Schmidt
1dad4aea3a libs/gst/base/gstcollectpads.c: Don't loop infinitely if there are no buffers to present. Partially fixes #327197, bu...
Original commit message from CVS:
* libs/gst/base/gstcollectpads.c: (gst_collect_pads_is_collected):
Don't loop infinitely if there are no buffers to present. Partially
fixes #327197, but collectpads is just broken for reusing elements
to do multiple encodes atm.
2006-01-20 09:26:00 +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
Jan Schmidt
0c0d5462a2 Replace gst_buffer_(make|is)_metadata_writable patch now that the release is out.
Original commit message from CVS:
* gst/gstbuffer.c: (gst_buffer_is_metadata_writable),
(gst_buffer_make_metadata_writable):
* gst/gstbuffer.h:
* libs/gst/base/gstbasetransform.c:
(gst_base_transform_prepare_output_buf):
* plugins/elements/gstcapsfilter.c: (gst_capsfilter_prepare_buf):
* tests/check/gst/gstbuffer.c: (GST_START_TEST), (gst_test_suite):
Replace gst_buffer_(make|is)_metadata_writable patch now
that the release is out.
2006-01-17 12:14:20 +00:00
Jan Schmidt
6876d64a29 Back out patch until after the release.
Original commit message from CVS:
* gst/gstbuffer.c:
* gst/gstbuffer.h:
* libs/gst/base/gstbasetransform.c:
(gst_base_transform_prepare_output_buf):
* plugins/elements/gstcapsfilter.c: (gst_capsfilter_prepare_buf):
* tests/check/gst/gstbuffer.c: (gst_test_suite):
Back out patch until after the release.
2006-01-16 15:42:08 +00:00
Jan Schmidt
c7506c8b0a gst/gstbuffer.*: Add gst_buffer_(is|make)_metadata_writable as analogues of gst_buffer_(is|make)_writable.
Original commit message from CVS:
Reviewed By: Andy Wingo

* gst/gstbuffer.c: (gst_buffer_is_metadata_writable),
(gst_buffer_make_metadata_writable):
* gst/gstbuffer.h:
Add gst_buffer_(is|make)_metadata_writable as analogues of
gst_buffer_(is|make)_writable.

* libs/gst/base/gstbasetransform.c:
(gst_base_transform_prepare_output_buf):
* plugins/elements/gstcapsfilter.c: (gst_capsfilter_prepare_buf):
Use name gst_buffer_(is|make)_metadata_writable functions.

* tests/check/gst/gstbuffer.c: (GST_START_TEST), (gst_test_suite):
Test gst_buffer_(is|make)_metadata_writable

(Closes: #324162)
2006-01-16 14:32:33 +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
Jan Schmidt
4159740e17 libs/gst/base/gstcollectpads.c: Need to awaken ALL the pads when we pop a buffer, otherwise collectpads only works wh...
Original commit message from CVS:
* libs/gst/base/gstcollectpads.c: (gst_collect_pads_pop):
Need to awaken ALL the pads when we pop a buffer, otherwise
collectpads only works when there is 2 input streams.
2006-01-11 21:32:21 +00:00
Tim-Philipp Müller
8e7f380fd7 libs/gst/base/gstbasesrc.*: Name (private) union; makes Sun's Forte compiler happy (#324900).
Original commit message from CVS:
Reviewed by: Tim-Philipp Müller  <tim at centricular dot net>
* libs/gst/base/gstbasesrc.c: (gst_base_src_init),
(gst_base_src_perform_seek), (gst_base_src_send_event),
(gst_base_src_set_property), (gst_base_src_get_property),
(gst_base_src_loop), (gst_base_src_start),
(gst_base_src_activate_push):
* libs/gst/base/gstbasesrc.h:
Name (private) union; makes Sun's Forte compiler happy (#324900).
2006-01-10 09:23:11 +00:00
Thomas Vander Stichele
ca814c15a6 releasing 0.10.1
Original commit message from CVS:
releasing 0.10.1
2005-12-23 18:04:49 +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
Julien Moutte
ed8fcd46b2 libs/gst/base/gstcollectpads.c: Refactoring of collectpads. This version removes a lot of races without touching API/...
Original commit message from CVS:
2005-12-14  Julien MOUTTE  <julien@moutte.net>

* libs/gst/base/gstcollectpads.c: (gst_collect_pads_base_init),
(gst_collect_pads_remove_pad), (gst_collect_pads_is_collected),
(gst_collect_pads_event), (gst_collect_pads_chain): Refactoring
of collectpads. This version removes a lot of races without
touching API/ABI. Yay !
2005-12-14 17:08:36 +00:00
Michael Smith
83a815e648 gst/gsttypefindfactory.c: Don't unref factories after calling them.
Original commit message from CVS:
* gst/gsttypefindfactory.c: (gst_type_find_factory_call_function):
Don't unref factories after calling them.
* libs/gst/base/gsttypefindhelper.c: (gst_type_find_helper):
* plugins/elements/gsttypefindelement.c:
(gst_type_find_element_chain):
Free lists of factories after using them. Fixing typefinding memory
leaks.
2005-12-12 19:09:49 +00:00
Wim Taymans
98522fc638 libs/gst/base/gstpushsrc.c: Fix typo.
Original commit message from CVS:
* libs/gst/base/gstpushsrc.c:
Fix typo.
2005-12-12 14:43:57 +00:00
Wim Taymans
aabc185dc6 docs/libs/gstreamer-libs-sections.txt: Added new symbol to docs.
Original commit message from CVS:
* docs/libs/gstreamer-libs-sections.txt:
Added new symbol to docs.

* libs/gst/base/gstbasesrc.c: (gst_base_src_class_init),
(gst_base_src_init), (gst_base_src_set_format),
(gst_base_src_default_query), (gst_base_src_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_default_event), (gst_base_src_event_handler),
(gst_base_src_set_property), (gst_base_src_get_property),
(gst_base_src_wait), (gst_base_src_do_sync),
(gst_base_src_update_length), (gst_base_src_get_range),
(gst_base_src_check_get_range), (gst_base_src_loop),
(gst_base_src_default_negotiate), (gst_base_src_start),
(gst_base_src_activate_push), (gst_base_src_activate_pull),
(gst_base_src_change_state):
* libs/gst/base/gstbasesrc.h:
Implement seeking to other formats than _BYTES.
Implement more seeking methods correctly.
Doc updates.
Added query vmethod.
Added do_seek vmethod to make life easier for subclasses
when seeking.
API addition: gst_base_src_set_format()
2005-12-12 14:41:05 +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
David Schleef
e8b8381452 libs/gst/base/gstbasetransform.c: speling fix.
Original commit message from CVS:
* libs/gst/base/gstbasetransform.c: speling fix.
2005-12-06 23:32:01 +00:00
Thomas Vander Stichele
288f61d21f expand tabs
Original commit message from CVS:
expand tabs
2005-12-06 19:29:15 +00:00
Wim Taymans
4f28ca8331 libs/gst/base/gstbasetransform.c (gst_base_transform_prepare_output_buf)
Original commit message from CVS:
2005-12-05  Andy Wingo  <wingo@pobox.com>

patch by: Wim Taymans <wim@fluendo.com>

* libs/gst/base/gstbasetransform.c
(gst_base_transform_prepare_output_buf)
(gst_base_transform_buffer_alloc):
* plugins/elements/gstqueue.c (gst_queue_bufferalloc): Call
alloc_buffer_and_set_caps.

* gst/gstpad.c (gst_pad_alloc_buffer): Changed to not call
set_caps on the source pad.
(gst_pad_alloc_buffer_and_set_caps): New function, does what
alloc_buffer used to do. Fixes #322874.

* docs/gst/gstreamer-sections.txt:
* docs/design/part-negotiation.txt:
* docs/pwg/advanced-negotiation.xml: Update for the alloc_buffer
changes.
2005-12-05 13:01:35 +00:00
Tim-Philipp Müller
93f79f0c96 libs/gst/base/gstcollectpads.c: Change debug category to 'collectpads' from 'collect_pads' (fixes #323250).
Original commit message from CVS:
* libs/gst/base/gstcollectpads.c: (gst_collect_pads_base_init):
Change debug category to 'collectpads' from 'collect_pads'
(fixes #323250).
2005-12-05 09:45:29 +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
Andy Wingo
a08a8d8fea libs/gst/base/: en-LARGE the padding.
Original commit message from CVS:
2005-11-29  Andy Wingo  <wingo@pobox.com>

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

* gst/gstconfig.h.in (GST_PADDING_LARGE): New define, the number
of pointers by which to pad very extensible base classes (like the
ones in libs/gst/base).
2005-11-29 19:37:49 +00:00
Thomas Vander Stichele
a0c4c4812c CVS surgery + support to move base, check, and net out of gst and into libs/gst
Original commit message from CVS:
CVS surgery + support to move base, check, and net out of gst
and into libs/gst
2005-11-29 19:12:30 +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
Jan Schmidt
aff648ab66 gst/base/gstbasetransform.c: Treat a pad alloc with new caps the same as if we were not negotiated, in order to allow...
Original commit message from CVS:
* gst/base/gstbasetransform.c: (gst_base_transform_buffer_alloc):
Treat a pad alloc with new caps the same as if we were not
negotiated, in order to allow a changing upstream output
to produce a new format of data.
2005-11-29 15:12:22 +00:00
Edward Hervey
33a15d5e67 gst/base/gstbasetransform.c: The event virtual method is now properly implemented, with a default handler
Original commit message from CVS:
* gst/base/gstbasetransform.c: (gst_base_transform_class_init),
(gst_base_transform_event), (gst_base_transform_eventfunc):
The event virtual method is now properly implemented, with a default
handler
Sub classes should call the parent_class event method. They should
return FALSE if they had a problem handling the given event, or don't
want GstBaseTransform to send that even downstream
* gst/elements/gstidentity.c: (gst_identity_class_init),
(gst_identity_init), (gst_identity_event),
(gst_identity_transform_ip), (gst_identity_set_property),
(gst_identity_get_property):
* gst/elements/gstidentity.h:
Added the single-segment boolean property.
If set to TRUE, it will output a single segment of data, starting from
0, will eat up all incoming newsegment, and modify the timestamp of the
buffers accordingly
2005-11-29 14:47:07 +00:00
Thomas Vander Stichele
f496f75765 update LDFLAGS use some more
Original commit message from CVS:

* configure.ac:
* gst/Makefile.am:
* gst/base/Makefile.am:
* gst/check/Makefile.am:
* gst/elements/Makefile.am:
* gst/net/Makefile.am:
update LDFLAGS use some more
2005-11-27 15:15:35 +00:00
Wim Taymans
d0c276b717 gst/base/gstbasesrc.c: Fix wrong percentage query.
Original commit message from CVS:
* gst/base/gstbasesrc.c: (gst_base_src_query):
Fix wrong percentage query.

* gst/gstutils.c: (gst_util_uint64_scale),
(gst_util_uint64_scale_int):
Add some more common cases that can be handled
efficiently to _scale.
2005-11-24 19:06:58 +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
a9f7f7b7b6 Doc fixes.
Original commit message from CVS:
Doc fixes.
2005-11-24 09:44:07 +00:00
Stefan Kost
df00e2ede5 docs/gst/gstreamer-sections.txt: make two symbols from gstinfo private for the docs
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
make two symbols from gstinfo private for the docs
* gst/base/gstcollectpads.h:
* gst/gstutils.c:
fix doc typos, update docs
2005-11-23 11:05:37 +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
Andy Wingo
a8560f7b3b gst/base/gstbasesrc.c (GST_LIVE_BROADCAST, GST_LIVE_SIGNAL) (GST_LIVE_TIMED_WAIT, GST_LIVE_WAIT, GST_LIVE_GET_COND) (...
Original commit message from CVS:
2005-11-21  Andy Wingo  <wingo@pobox.com>

* gst/base/gstbasesrc.c (GST_LIVE_BROADCAST, GST_LIVE_SIGNAL)
(GST_LIVE_TIMED_WAIT, GST_LIVE_WAIT, GST_LIVE_GET_COND)
(GST_LIVE_UNLOCK, GST_LIVE_TRYLOCK, GST_LIVE_LOCK)
(GST_LIVE_GET_LOCK): Moved here from gstbasesrc.h. They are
private to the basesrc implementation.
2005-11-21 14:41:26 +00:00
Tim-Philipp Müller
d5ce5ad5e8 docs/gst/gstreamer.types: gst_collectpads_get_type => gst_collect_pads_get_type.
Original commit message from CVS:
* docs/gst/gstreamer.types:
gst_collectpads_get_type => gst_collect_pads_get_type.
* gst/base/gstbasetransform.c:
Remove unused SIGNAL_HANDOFF enum.
2005-11-21 11:26:07 +00:00
Tim-Philipp Müller
60c50e8f11 Rename gst_collecpads_foo() => gst_collect_pads_foo(). Document unimplemented functions as unimplemented (#320766).
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* win32/common/libgstbase.def:
* win32/libgstbase.def:
* gst/base/gstcollectpads.c: (gst_collect_pads_base_init),
(gst_collect_pads_class_init), (gst_collect_pads_init),
(gst_collect_pads_finalize), (gst_collect_pads_new),
(gst_collect_pads_set_function), (gst_collect_pads_add_pad),
(gst_collect_pads_remove_pad), (gst_collect_pads_is_active),
(gst_collect_pads_collect), (gst_collect_pads_collect_range),
(gst_collect_pads_start), (gst_collect_pads_stop),
(gst_collect_pads_peek), (gst_collect_pads_pop),
(gst_collect_pads_available), (gst_collect_pads_read),
(gst_collect_pads_flush), (gst_collect_pads_event),
(gst_collect_pads_chain):
* gst/base/gstcollectpads.h:
Rename gst_collecpads_foo() => gst_collect_pads_foo(). Document
unimplemented functions as unimplemented (#320766).
2005-11-21 11:00:03 +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
Andy Wingo
c557e030a9 gst/gstclock.h (GstClock): Add rate and offset properties, preserving ABI stability. Add rate/offset accessors. Will ...
Original commit message from CVS:
2005-11-17  Andy Wingo  <wingo@pobox.com>

* gst/gstclock.h (GstClock): Add rate and offset properties,
preserving ABI stability. Add rate/offset accessors. Will file bug
for the freeze break.

* gst/gstclock.c (gst_clock_adjust_unlocked): Implement using rate
and offset, trying to keep precision and avoiding
underflow/overflow.
(gst_clock_set_rate_offset, gst_clock_get_rate_offset): New
functions. Make gst_clock_set_time_adjust obsolete.
(gst_clock_set_time_adjust): Note that this function is obsolete.
Will file bug soon.

* gst/base/gstbasetransform.h: Make the ABI-stability hack
greppable by using GST_PADDING-1+1.
2005-11-17 11:51:49 +00:00
Wim Taymans
514648a970 gst/base/gstbasetransform.c: Check if the caps are NULL, this can happen if the element is shutting down and the pad ...
Original commit message from CVS:
* gst/base/gstbasetransform.c:
(gst_base_transform_prepare_output_buf),
(gst_base_transform_event):
Check if the caps are NULL, this can happen if the element
is shutting down and the pad caps are set to NULL.
2005-11-16 14:27:20 +00:00
Thomas Vander Stichele
f22d0bce47 gst/base/gstbasesrc.c: some debug changes
Original commit message from CVS:

* gst/base/gstbasesrc.c: (gst_base_src_default_negotiate):
some debug changes
* gst/gstmessage.h:
typo fixes
2005-11-16 11:06:07 +00:00
Thomas Vander Stichele
74546e0323 Revert all these unrefs, they don't even pass make check !
Original commit message from CVS:
Revert all these unrefs, they don't even pass make check !
2005-11-15 23:53:08 +00:00
Johan Dahlin
8a9bd6aac8 And gst_object_unref here too
Original commit message from CVS:
And gst_object_unref here too
2005-11-15 19:48:40 +00:00
Johan Dahlin
ba68a823c9 gst/: Free pad templates, fixes a couple of leaks.
Original commit message from CVS:
* gst/base/gstbasesrc.c: (gst_base_src_init):
* gst/elements/gsttypefindelement.c: (gst_type_find_element_init):
* gst/gstqueue.c: (gst_queue_init):
Free pad templates, fixes a couple of leaks.
2005-11-15 19:31:05 +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
Julien Moutte
be483e517b gst/base/gstbasetransform.c: Ref the source pad caps while we need them.
Original commit message from CVS:
2005-11-14  Julien MOUTTE  <julien@moutte.net>

* gst/base/gstbasetransform.c:
(gst_base_transform_prepare_output_buf):
Ref the source pad caps while we need them.
Fixes (#321386)
2005-11-14 10:49:35 +00:00
Wim Taymans
b2ff4bd747 docs/gst/gstreamer-sections.txt: Added some docs for GstCollectData.
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
Added some docs for GstCollectData.

* gst/base/gstadapter.c:
Some small code example fix.

* gst/base/gstcollectpads.c:
* gst/base/gstcollectpads.h:
Document some more.
2005-11-11 20:12:42 +00:00
Wim Taymans
1a87f97de7 gst/base/gstbasetransform.c: Small cleanups.
Original commit message from CVS:
* gst/base/gstbasetransform.c:
(gst_base_transform_prepare_output_buf),
(gst_base_transform_handle_buffer):
Small cleanups.
If we're processing a buffer and need to allocate an output
buffer, we cannot accept a format change. If we did get a
format change, we have to alloc a buffer ourselves of the
right size.
2005-11-11 16:37:11 +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
Thomas Vander Stichele
529c727a5c gst/: Don't call gst_caps_do_simplify - it doesn't respect order of caps and it's not needed.
Original commit message from CVS:

* gst/base/gstbasetransform.c: (gst_base_transform_transform_caps):
* gst/gstcaps.c: (gst_caps_intersect):
Don't call gst_caps_do_simplify - it doesn't respect order of caps
and it's not needed.
2005-11-10 17:37:39 +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
Michael Smith
a28a3fdd04 Slightly polish docs for GstAdapter.
Original commit message from CVS:
Slightly polish docs for GstAdapter.
2005-11-09 18:41:53 +00:00
Tim-Philipp Müller
fc387bfd46 gst/: Use GST_DEBUG_FUNCPTR() more extensively.
Original commit message from CVS:
* gst/base/gstcollectpads.c: (gst_collectpads_add_pad):
* gst/elements/gstfilesink.c: (gst_file_sink_init):
* gst/elements/gsttypefindelement.c: (gst_type_find_element_init):
* gst/gstghostpad.c: (gst_ghost_pad_set_internal),
(gst_ghost_pad_init), (gst_ghost_pad_new_notarget):
* gst/gstpad.c: (gst_pad_init):
Use GST_DEBUG_FUNCPTR() more extensively.
2005-11-09 17:55:13 +00:00
Edward Hervey
04b5f119c6 gst/:
Original commit message from CVS:
* gst/base/gsttypefindhelper.c:
* gst/gsttypefind.c:
* gst/gsttypefind.h:
2005-11-09 16:44:40 +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
Andy Wingo
0ae7675f7e gst/elements/gstfilesink.c (gst_file_sink_start)
Original commit message from CVS:
2005-11-09  Andy Wingo  <wingo@pobox.com>

* gst/elements/gstfilesink.c (gst_file_sink_start)
(gst_file_sink_stop): New functions, replace the state change
handler.
(gst_file_sink_class_init): Hook up the start and stop functions.
(gst_file_sink_base_init): Don't set the state change handler any
more. It was a bit ugly too, being set from here...
(gst_file_sink_get_property, gst_file_sink_set_property):
Cleanups...
(gst_file_sink_set_location): More robust check that doesn't call
GST_STATE. Ugggggg.
2005-11-09 09:48:16 +00:00