Commit graph

132 commits

Author SHA1 Message Date
Stefan Kost
57cc1150a9 adder: add support for negative playback rates
Decrement sample counter when playing backwards. Set proper segment when playing
backwards (0..cur instead or cur..-1). Add more logging and fix a format string.
2010-04-11 23:23:39 +03:00
Wim Taymans
b44a5c8dc7 adder: don't hold object lock when calling peer elements
Do not hold the object lock while we call methods on peer elements as this can
lead to deadlocks.

Fixes #608179
2010-01-28 17:43:47 +01:00
Wim Taymans
775636e734 adder: be a lot smarter with buffer management
Detect EOS faster.
Try to reuse one of the input buffer as the output buffer. This usually works
and avoids an allocation and a memcpy.
Be smarter with GAP buffers so that they don't get mixed or cleared at all. Also
try to use a GAP buffer as the output buffer when all input buffers are GAP
buffers.
2009-12-24 19:56:55 +01:00
Wim Taymans
59ace1b9ee adder: use collectpads clipping function
Install a clipping function in the collectpads and use the audio clipping helper
function to perform clipping to the segment boundaries.

Fixes #590265
2009-12-24 16:30:23 +01:00
Wim Taymans
66ae01eced adder: fix juvenile comment 2009-12-24 13:58:52 +01:00
Stefan Kost
3d73a7458a adder: make events succeed, if they succed on atleast one pad 2009-11-19 21:28:23 +02:00
Tim-Philipp Müller
6f4c1ac583 Remove GST_DEBUG_FUNCPTR where they're pointless
There's not much point in using GST_DEBUG_FUNCPTR with GObject
virtual functions such as get_property, set_propery, finalize and
dispose, since they'll never be used by anyone anyway. Saves a
few bytes and possibly a sixteenth of a polar bear.
2009-10-28 00:59:35 +00:00
Stefan Kost
e7368354d5 adder: improve caps filter functionality. Fixes #590146.
Also use the capsfilter if there is no src-peer as the caps constrain what
we can do. Don't create any_caps as a default, as we check for NULL to skip the
filtering. This is a (small) performance regression as we always intersect
otherwise.
2009-08-31 22:48:01 +03:00
Edward Hervey
8cd1b5209b gst: Remove dead assignments and resulting unused variables 2009-08-08 15:54:02 +02:00
Stefan Kost
7205bbc031 adder: reset pending flush-stop flag in state_changed. (mostly) Fixes #590146. 2009-07-30 13:45:42 +03:00
Edward Hervey
3708ca37a8 gstadder: Don't forget to free pending events on flush/dispose.
Fixes #588747
2009-07-20 12:42:32 +02:00
Edward Hervey
50b0cf2c03 adder: Collect incoming tag events and send them after newsegment. Fixes #588747 2009-07-19 10:49:17 +02:00
Stefan Kost
94baad7490 adder: add since tags to docs 2009-07-10 23:27:11 +01:00
Stefan Kost
725bd20045 adder: add a caps-property to avoid to need to plug a capsfilter afterwards
Adder can only handle one common format accross the pads. Thus one needed to add
a capsfilter afterwards and manage the caps. Now one can simply set the caps on
the property.
2009-07-10 20:06:28 +01:00
Stefan Kost
da27fd57e8 adder: keep sending newsegments after seeking
Adder sends with timestamps from 0 upwards. After seeking we need to send
new-segments to get correct positions-queries.
2009-07-06 22:35:14 +01:00
Edward Hervey
c3adf88621 adder: Call set_flushing(TRUE) for flushing seeks *when* the streaming is stopped.
This ensures that collectpads' cookie is properly updated so that when the streaming
threads will restart and be checking for the flushing status of all pads there will
be no inconsistent state.
2009-07-05 21:32:20 +02:00
Wim Taymans
09737d728b adder: only unflush when we flushed before
Ass suggested by Stefan Kost:
Keep track of when the sinkpad was set to flushing and unflush the pad when an
upstream flushing seek failed.
2009-06-23 18:08:44 +02:00
Wim Taymans
85dbf93515 adder: more seeking fixes.
When a seek failed upstream, make sure the adder sinkpad is set unflushing again
so that streaming can continue.
We only have a pending segment when we flushed.
Set the flush_stop_pending flag inside the appropriate locks and before we
attempt to perform the upstream seek.
Add some more comments.
Use the right lock to protect the flags in flush_stop.

See #585708
2009-06-17 11:22:51 +02:00
Stefan Kost
fd36634f88 adder: send flush_stop when seeking failed
At least do the fix to sent the flush_stop when seeking failed to ensure we
keep no pads flushing. before it was send when the seeking worked which is just
plain wrong and was not the intention.
2009-06-15 11:45:19 +03:00
Wim Taymans
45084bf579 adder: send flush-stop earlier
When no flush-stop has been sent by upstream, we have to send one ourselves to
continue playback. Do this as soon as the collect function is called instead of
after we possibly pushed segment events (that got then flushed out)
2009-06-12 16:31:00 +02:00
Stefan Kost
4228ba0c6b adder: only send flush_stop when seek failed
This is still not the ultimate fix. Added some comment to explain the troubles.
2009-05-19 18:44:01 +03:00
Stefan Kost
ef56ebad48 adder: send flush_stop to match flush_start
Adder was relying that something else sends a flush stop. When using adder with
a livesource it was not getting a flush_stop and thus all pads downstream where
keept flushing. Mark a pending flush_stop and send it when we are working on
the new segment back in the streaming thread.
2009-05-19 16:49:35 +03:00
Stefan Kost
c94f952056 adder: add more logging and return value checking 2009-05-19 01:13:34 +03:00
Stefan Kost
705b01aa93 adder: handle the return value from iterator_fold 2009-05-19 01:11:45 +03:00
Stefan Kost
591fbbcea7 adder: use the pad in logging as objects
Helps to differenciate between source and sinks pads.
2009-05-19 01:03:44 +03:00
Stefan Kost
e633c46e95 adder: log details in getcaps like in setcaps 2009-03-10 21:14:43 +02:00
Stefan Kost
79771eaba7 adder: add variants for unsigned to fix warnings for unneeded check
For unsigned int out+in can't be < 0.
2009-03-05 12:27:16 +02:00
Jan Schmidt
6b1e08f277 Don't do void pointer arithmetic. 2009-01-30 17:16:39 +00:00
Stefan Kost
5a30245c38 gst/adder/: Cleanup variable names to make the adder-loop easier to understand.
Original commit message from CVS:
* gst/adder/Makefile.am:
* gst/adder/gstadder.c:
Cleanup variable names to make the adder-loop easier to understand.
Also try to use liboil to spee it up, but ifdef it out as it does not
make any change for me (Intel pentim M (sse,sse2) please try on other
systems).
2008-12-17 08:51:34 +00:00
Thomas Vander Stichele
9b6f3ad0c8 gst/adder/gstadder.c: Change author string after seeing output of gst-inspector.
Original commit message from CVS:
* gst/adder/gstadder.c:
Change author string after seeing output of gst-inspector.
2008-11-10 13:55:08 +00:00
Stefan Kost
7c2a26c9ed gst/adder/gstadder.c: Cleanup lots of empty lines that came from gst-indent going havoc before I added the INDENT_ON/...
Original commit message from CVS:
* gst/adder/gstadder.c:
Cleanup lots of empty lines that came from gst-indent going havoc
before I added the INDENT_ON/OFF marker some time agao.
2008-08-01 13:06:59 +00:00
Stefan Kost
2b33c755b6 Cleanup Plugin docs. Link to signals and properties. Fix sub-section titles. Drop mentining that all our example pipe...
Original commit message from CVS:
* docs/plugins/gst-plugins-base-plugins-docs.sgml:
* docs/plugins/gst-plugins-base-plugins-overrides.txt:
* docs/plugins/gst-plugins-base-plugins-sections.txt:
* docs/plugins/gst-plugins-base-plugins.args:
* docs/plugins/gst-plugins-base-plugins.hierarchy:
* docs/plugins/gst-plugins-base-plugins.interfaces:
* docs/plugins/gst-plugins-base-plugins.prerequisites:
* docs/plugins/gst-plugins-base-plugins.signals:
* docs/plugins/inspect/plugin-adder.xml:
* docs/plugins/inspect/plugin-alsa.xml:
* docs/plugins/inspect/plugin-audioconvert.xml:
* docs/plugins/inspect/plugin-audiorate.xml:
* docs/plugins/inspect/plugin-audioresample.xml:
* docs/plugins/inspect/plugin-audiotestsrc.xml:
* docs/plugins/inspect/plugin-cdparanoia.xml:
* docs/plugins/inspect/plugin-decodebin.xml:
* docs/plugins/inspect/plugin-ffmpegcolorspace.xml:
* docs/plugins/inspect/plugin-gdp.xml:
* docs/plugins/inspect/plugin-gnomevfs.xml:
* docs/plugins/inspect/plugin-libvisual.xml:
* docs/plugins/inspect/plugin-ogg.xml:
* docs/plugins/inspect/plugin-pango.xml:
* docs/plugins/inspect/plugin-playback.xml:
* docs/plugins/inspect/plugin-queue2.xml:
* docs/plugins/inspect/plugin-subparse.xml:
* docs/plugins/inspect/plugin-tcp.xml:
* docs/plugins/inspect/plugin-theora.xml:
* docs/plugins/inspect/plugin-typefindfunctions.xml:
* docs/plugins/inspect/plugin-uridecodebin.xml:
* docs/plugins/inspect/plugin-video4linux.xml:
* docs/plugins/inspect/plugin-videorate.xml:
* docs/plugins/inspect/plugin-videoscale.xml:
* docs/plugins/inspect/plugin-videotestsrc.xml:
* docs/plugins/inspect/plugin-volume.xml:
* docs/plugins/inspect/plugin-vorbis.xml:
* docs/plugins/inspect/plugin-ximagesink.xml:
* docs/plugins/inspect/plugin-xvimagesink.xml:
* ext/alsa/gstalsamixer.c:
* ext/alsa/gstalsasink.c:
* ext/alsa/gstalsasrc.c:
* ext/gio/gstgiosink.c:
* ext/gio/gstgiosrc.c:
* ext/gio/gstgiostreamsink.c:
* ext/gio/gstgiostreamsrc.c:
* ext/gnomevfs/gstgnomevfssink.c:
* ext/gnomevfs/gstgnomevfssrc.c:
* ext/ogg/gstoggdemux.c:
* ext/ogg/gstoggmux.c:
* ext/pango/gstclockoverlay.c:
* ext/pango/gsttextoverlay.c:
* ext/pango/gsttextrender.c:
* ext/pango/gsttimeoverlay.c:
* ext/theora/theoradec.c:
* ext/theora/theoraenc.c:
* ext/theora/theoraparse.c:
* ext/vorbis/vorbisdec.c:
* ext/vorbis/vorbisenc.c:
* ext/vorbis/vorbisparse.c:
* ext/vorbis/vorbistag.c:
* gst/adder/gstadder.c:
* gst/audioconvert/gstaudioconvert.c:
* gst/audioresample/gstaudioresample.c:
* gst/audiotestsrc/gstaudiotestsrc.c:
* gst/ffmpegcolorspace/gstffmpegcolorspace.c:
* gst/gdp/gstgdpdepay.c:
* gst/gdp/gstgdppay.c:
* gst/playback/gstdecodebin2.c:
* gst/playback/gstplaybin.c:
* gst/playback/gstplaybin2.c:
* gst/playback/gstqueue2.c:
* gst/playback/gsturidecodebin.c:
* gst/tcp/gstmultifdsink.c:
* gst/tcp/gsttcpserversink.c:
* gst/videorate/gstvideorate.c:
* gst/videoscale/gstvideoscale.c:
* gst/videotestsrc/gstvideotestsrc.c:
* gst/volume/gstvolume.c:
* sys/ximage/ximagesink.c:
* sys/xvimage/xvimagesink.c:
Cleanup Plugin docs. Link to signals and properties. Fix sub-section
titles. Drop mentining that all our example pipelines are "simple"
pipelines.
2008-07-10 21:06:06 +00:00
Stefan Kost
e0d27d23cc gst/adder/gstadder.c: Use GST_DEBUG_FUNCPTR and remove some extra vlnak lines.
Original commit message from CVS:
* gst/adder/gstadder.c:
Use GST_DEBUG_FUNCPTR and remove some extra vlnak lines.
2008-06-29 13:45:27 +00:00
Sebastian Dröge
1d37b272ce gst/adder/gstadder.c: When using gst_element_iterate_pads() one has to unref every pad after usage.
Original commit message from CVS:
* gst/adder/gstadder.c: (gst_adder_query_duration),
(gst_adder_query_latency):
When using gst_element_iterate_pads() one has to unref every pad
after usage.
2008-06-02 12:20:35 +00:00
Sebastian Dröge
57c3aa9b66 gst/adder/gstadder.c: Implement latency query.
Original commit message from CVS:
* gst/adder/gstadder.c: (gst_adder_query_duration),
(gst_adder_query_latency), (gst_adder_query):
Implement latency query.
2008-05-28 08:14:47 +00:00
Sebastian Dröge
4ccac97b40 gst/adder/gstadder.c: Correctly resync the iterator if gst_iterator_next() returns
Original commit message from CVS:
* gst/adder/gstadder.c: (gst_adder_query_duration):
Correctly resync the iterator if gst_iterator_next() returns
GST_ITERATOR_RESYNC.
2008-05-27 18:10:00 +00:00
Sebastian Dröge
e66b0a6642 gst/adder/gstadder.c: Adder also doesn't support audio/x-raw-int with width!=depth so don't claim this on the pad tem...
Original commit message from CVS:
* gst/adder/gstadder.c:
Adder also doesn't support audio/x-raw-int with width!=depth so don't
claim this on the pad template caps.
2008-05-21 05:48:05 +00:00
Sebastian Dröge
05cf63634e gst/adder/gstadder.c: Adder doesn't support 24 bit samples so don't claim it supports them in the pad template caps.
Original commit message from CVS:
* gst/adder/gstadder.c:
Adder doesn't support 24 bit samples so don't claim it supports them
in the pad template caps.
2008-05-16 21:12:02 +00:00
Sebastian Dröge
6720c5beb8 gst/adder/gstadder.c: Correctly declare the supported endianness on the pad templates and check for correct endiannes...
Original commit message from CVS:
* gst/adder/gstadder.c: (gst_adder_setcaps),
(gst_adder_class_init):
Correctly declare the supported endianness on the pad templates
and check for correct endianness in the set caps function. Adder
only supports native endianness.
Also use gst_element_class_set_details_simple().
2008-05-14 10:58:52 +00:00
Stefan Kost
054842ca82 configure.ac: Require CVS of core for new API in collectpads.
Original commit message from CVS:
* configure.ac:
Require CVS of core for new API in collectpads.
* gst/adder/gstadder.c:
Use new API to make adder sparse stream aware.
2008-02-18 13:51:34 +00:00
Wim Taymans
d42ca1fd83 gst/adder/gstadder.c: Make getcaps more robust by not using the proxycaps function. This makes sure that we don't end...
Original commit message from CVS:
* gst/adder/gstadder.c: (gst_adder_sink_getcaps),
(gst_adder_request_new_pad):
Make getcaps more robust by not using the proxycaps function. This makes
sure that we don't end up recursively calling getcaps upstream.
See #316248.
2007-07-03 11:52:47 +00:00
Stefan Kost
736a5c082f gst/adder/gstadder.c (gst_adder_src_event, gst_adder_collected, gst_adder_change_state): gst/adder/gstadder.h (bps, o...
Original commit message from CVS:
* gst/adder/gstadder.c (gst_adder_src_event, gst_adder_collected,
gst_adder_change_state):
* gst/adder/gstadder.h (bps, offset, collect_event, segment,
segment_pending, segment_position, segment_rate):
Handle playback-rate on adder.
2007-05-08 19:24:01 +00:00
Stefan Kost
64a9674bd2 gst/: gst/audiotestsrc/gstaudiotestsrc.c
Original commit message from CVS:
* gst-libs/gst/rtp/gstbasertpaudiopayload.c:
* gst/adder/gstadder.c:
* gst/audiotestsrc/gstaudiotestsrc.c
(gst_audio_test_src_create_white_noise):
* gst/videotestsrc/gstvideotestsrc.c:
* gst/volume/gstvolume.c (VOLUME_UNITY_INT16,
VOLUME_UNITY_INT16_BIT_SHIFT, VOLUME_MAX_DOUBLE,
volume_sink_template, volume_src_template, gst_volume_init,
volume_process_double, volume_process_int16,
volume_process_int16_clamp):
Doc fixes and formatting.
2007-05-04 13:10:07 +00:00
Stefan Kost
d24aff28b2 gst/adder/gstadder.c: Fix non-flushing segmented seeks, Fixes #340060 for me
Original commit message from CVS:
* gst/adder/gstadder.c: (gst_adder_setcaps), (gst_adder_src_event),
(gst_adder_sink_event), (gst_adder_collected):
Fix non-flushing segmented seeks, Fixes #340060 for me
2007-04-23 20:04:28 +00:00
Tim-Philipp Müller
6863a09803 gst/adder/gstadder.c: Fix build.
Original commit message from CVS:
* gst/adder/gstadder.c: (gst_adder_src_event):
Fix build.
2006-08-31 14:37:33 +00:00
Edward Hervey
814b9a530e gst/adder/gstadder.*: Remember the start position asked in the incoming seeks, so we can output GST_EVENT_NEW_SEGMENT...
Original commit message from CVS:
* gst/adder/gstadder.c: (forward_event_func),
(gst_adder_src_event), (gst_adder_collected),
(gst_adder_change_state):
* gst/adder/gstadder.h:
Remember the start position asked in the incoming seeks, so we can
output GST_EVENT_NEW_SEGMENT with a correct position value (instead
of assuming it will always be 0).
2006-08-31 12:39:17 +00:00
Wim Taymans
977f089d84 gst/adder/gstadder.c: Don't clip float values. Fixes #350900.
Original commit message from CVS:
* gst/adder/gstadder.c:
Don't clip float values. Fixes #350900.
2006-08-11 15:53:43 +00:00
Wim Taymans
157124eacb gst/adder/gstadder.c: Fix leak in duration query.
Original commit message from CVS:
* gst/adder/gstadder.c: (gst_adder_setcaps),
(gst_adder_query_duration):
Fix leak in duration query.
Reflow some docs and notes.
2006-07-28 14:14:58 +00:00
Wim Taymans
28cbbee0fb gst/adder/gstadder.*: Implement release_request_pad.
Original commit message from CVS:
* gst/adder/gstadder.c: (gst_adder_class_init), (gst_adder_init),
(gst_adder_request_new_pad), (gst_adder_release_pad):
* gst/adder/gstadder.h:
Implement release_request_pad.
Make padcounter atomic.
* tests/check/elements/adder.c: (GST_START_TEST), (adder_suite):
Added check for release_pad in adder.
2006-05-30 16:07:50 +00:00
Wim Taymans
444f73582d gst/adder/gstadder.c: Don't leak pad name.
Original commit message from CVS:
* gst/adder/gstadder.c: (gst_adder_request_new_pad):
Don't leak pad name.
2006-05-29 17:19:48 +00:00