Commit graph

3657 commits

Author SHA1 Message Date
Simon Berg f18d2a5a9a audiotestsrc: fix rounding errors that might cause segments to be one sample too short
https://bugzilla.gnome.org/show_bug.cgi?id=676884
2013-03-24 20:53:05 +00:00
Simon Berg d8b42e993b audiotestsrc: fix buffer size of last buffer
The last buffer before EOS may be smaller than the maximum
size. The current code doesn't adjust for this, it only sets
the duration and offsets.

https://bugzilla.gnome.org/show_bug.cgi?id=696411
2013-03-24 20:53:05 +00:00
Wim Taymans a092cbee5e videoconvert: avoid double free
Set variable to NULL after free so that we don't free twice.
2013-03-24 00:38:22 +01:00
Wim Taymans b1950b6409 Revert "videoconvert: prevent bad interlaced conversions"
This reverts commit adc9694ed7.

No need to restrict the conversion, we can handle interlace correctly. We
basically unpack each field, then convert each field to the target colorspace
and pack and interleave each field to the target format. We also disable any
fast path that can't deal with interlaced formats.
2013-03-24 00:21:36 +01:00
David Schleef adc9694ed7 videoconvert: prevent bad interlaced conversions
Don't allow conversion that changes vertical subsampling if video
is interlaced.
2013-03-22 17:24:43 -07:00
Arnaud Vrac 4816885ce3 subparse: fix off by one offset calculation
Do not use the buffer start offset when it is invalid, otherwise a
discontinuity is detected on the next buffer, and the subtitle parser
reset and some subtitle lines are not shown.

Also remove unused next_offset field.

https://bugzilla.gnome.org/show_bug.cgi?id=693981
2013-03-22 11:09:11 +00:00
Tim-Philipp Müller c7855b5505 typefinding: fix y4m caps
We need to specify the y4mversion field now.

https://bugzilla.gnome.org/show_bug.cgi?id=696282
2013-03-22 09:35:21 +00:00
Sebastian Dröge 383f58b0ed subtitleoverlay: Return ANY caps for the GET_CAPS query
subtitleoverlay handles any caps, not just the ones
for which a subtitle parser/renderer exist. It will
just ignore any unsupported streams instead of causing
an error.

https://bugzilla.gnome.org/show_bug.cgi?id=688476
2013-03-21 15:37:31 +01:00
Sebastian Dröge 9084bc151b playsinkconvertbin: Make sure to return all allowed caps in the GET_CAPS query
Add all the caps that we can convert to to the filter caps,
otherwise downstream might just return EMPTY caps because
it doesn't handle the filter caps but we could still convert
to these caps, causing us to return EMPTY caps although
conversion would be possible.

https://bugzilla.gnome.org/show_bug.cgi?id=688803
2013-03-21 13:42:41 +01:00
Sebastian Dröge d06c332655 playsinkconvertbin: Use gst_caps_is_subset() for handling the ACCEPT_CAPS query 2013-03-21 11:42:43 +01:00
Sebastian Dröge 575f0640ed videoscale: Let the add-borders property default to TRUE
It's undesirable most of the time that the display aspect ratio
is changed.
2013-03-21 11:14:41 +01:00
Jan Schole 8e791d52aa videoscale: Correct DAR and border calculations
changed: gst_video_scale_set_info in gst/videoscale/gstvideoscale.c
DAR on sink side now calculated with PAR on sink side
ratio of output width/height now calculated with inverse PAR
additional condition that borders are 0:0 for passthrough mode

https://bugzilla.gnome.org/show_bug.cgi?id=696019
2013-03-21 11:13:49 +01:00
Stefan Sauer 60ccc2f17f adder: add a missing break 2013-03-11 22:46:45 +01:00
Stefan Sauer c6c27b9926 videotestsrc: make colors controlable
Also trim since markers.
2013-03-07 09:39:14 +01:00
Tim-Philipp Müller 7dd2fad888 uridecodebin: minor GValue handling optimisation 2013-03-03 17:44:11 +00:00
Sebastian Dröge 5a58f8b9ec videoscale: Fix compiler errors caused by not including config.h
_stdint.h requires config.h to be included to properly
use the correct code to get uint8_t and friends.
2013-03-02 19:29:40 +01:00
Stefan Sauer e2d0a1835b adder: don't discard the flush-start events
This reverts one more part of a86ca535c8 and
hopefully fixes #694553 for good.
2013-02-27 22:07:11 +01:00
Stefan Sauer 13e8c9878a adder: fix looping
Use gst_segment_do_seek() and clip position before updating the segment.
2013-02-27 22:07:11 +01:00
Stefan Sauer 8ea1f331b3 adder: remove defines we don#t use anymore 2013-02-27 22:07:11 +01:00
Stefan Sauer 1504153012 adder: mark pending flush-stop on segment event
Also add more debug logging. Fixes #694553.
2013-02-25 19:55:00 +01:00
Sreerenj Balachandran 9791f0aaf1 typefindfunctions: recognize SVC and MVC nal units in h264 streams
Ensure the detection of svc and mvc as a part of h264 stream.
Once the typefinder detect a subset_sequence_parameter_set(ssps),
then each nal unit with type 14 or 20 should be detected as a
part of h264 stream thereafter.

https://bugzilla.gnome.org/show_bug.cgi?id=694346
2013-02-21 12:20:36 +00:00
Stefan Sauer a86ca535c8 adder: ensure sending a flush-stop after flush-start
Previously adder was only sending the flush-stop, when it saw the flushing seek.
If one sends a flushing see direcly to an element upstream of adder, it would
fail to unflush the downstream pads.
2013-02-21 10:11:32 +01:00
Vincent Penquerc'h bccfc679b5 encodebin: activate ghost pad after creating it
This ensures the ghost pad will not stay in flushing mode
when it receives a flush stop event, and generally behave
badly.

This fixes at least one case of a dynamic decodebin2 + encodebin
pipeline finding a source that has not prerolled when it should
have been (due to the ghostpad staying in flushing mode).
2013-02-14 16:07:48 +00:00
Matej Knopp 1e5b50e94c decodebin: don't block on caps 2013-02-14 11:37:54 +01:00
Sebastian Dröge cfd73a8cf7 decodebin: Remove left-over line from last commit 2013-02-14 11:25:37 +01:00
Matej Knopp 872cc295a6 decodebin: Check if value is set before unsetting it
https://bugzilla.gnome.org/show_bug.cgi?id=693401
2013-02-14 11:22:34 +01:00
Tim-Philipp Müller 03d4a69df4 typefinding: add parsed=true to mp3 and mpeg2 video ES caps
Because we can, and that's also what we do for other formats.
2013-02-13 21:02:39 +00:00
Stefan Sauer cff9fccc69 adder: use the collect_pads_query func
We were setting the query-func on the sink-pad, which got overwritten when
adding the new pad to collect pads. Instead register our query-func with the
collect pads object. This fixes filter caps. Add a test for it.
2013-02-13 21:11:41 +01:00
Vincent Penquerc'h 17cdb54aa4 encodebin: sync muxer state with parent bin
Other elements were synced, but not the muxer.
2013-02-12 17:27:10 +00:00
Alexander Schrab e7caef6b29 decodebin: Push caps event immediately to ghost pad to avoid exposing pads without caps 2013-02-12 10:12:14 +01:00
Marc Leeman f704b3f975 decodebin: g_mutex_new -> g_mutex_init
Don't use deprecated GLib API.

https://bugzilla.gnome.org/show_bug.cgi?id=693302
2013-02-07 13:51:17 +00:00
Tim-Philipp Müller dce49a1a7e video: fix return type of _get_palette() and add since markers to docs
'const gpointer' is not the same as 'gconstpointer', see
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35928.
2013-02-06 12:43:51 +00:00
Wim Taymans ebf24e292e videotestsrc: use video library palette
Use the palette provided and used by the video library instead of making our own
copy.
2013-02-05 11:20:20 +01:00
Wim Taymans 0085a77919 videoscale: scale each field in interlace mode
When we are dealing with interlaced content, scale each field intependently so
that we don't destroy the interlacing.

See https://bugzilla.gnome.org/show_bug.cgi?id=588535
2013-02-05 10:49:57 +01:00
Wim Taymans be866d4b78 videoconvert: interlace support to some fastpath functions
Add interlace support for some fastpath functions.
2013-02-04 16:21:20 +01:00
Wim Taymans 599880ff8d videoconvert: make fast path interlaced aware
Make sure that we also handle interlacing when choosing the fast path.

See https://bugzilla.gnome.org/show_bug.cgi?id=588535
2013-02-04 15:40:02 +01:00
Wim Taymans e3a9a7cf07 videoconvert: pass frame interlaced flag to pack/unpack
If the frame is interlaced, pass the interlaced flag to the pack/unpack
functions to make it unpack correctly.
2013-02-04 15:19:35 +01:00
Wim Taymans ed2ce49499 videoconvert: use the palette helper functions
Get the palette from the video library instead of making our own.
2013-02-04 15:06:10 +01:00
Wim Taymans 9b95f9de95 videoconvert: make a constant of scale factor 2013-02-04 15:06:06 +01:00
Tim-Philipp Müller 500b864899 decodebin: try harder to always expose pads in the same order
Use stream-id as sort criterion in addition to the media type.

https://bugzilla.gnome.org/show_bug.cgi?id=634407
2013-01-19 13:03:03 +00:00
Tim-Philipp Müller fcd8566665 typefinding: add typefind functions for SBC audio
https://bugzilla.gnome.org/show_bug.cgi?id=690582
2013-01-15 17:27:31 +00:00
Stefan Sauer 8296b683ca volume: a return value of FALSE from the controller is not fatal
A return value of FALSE here indicates that we don't have control-values. In
0.10 we were returning the default value of the property. Now we don't fill an
array with defaults in the ControlBinding, but leave it up to the element to
handle this case.
2013-01-09 23:15:06 +01:00
Wim Taymans 0feecef275 decodebin2: use NO_RESYNC flag
to avoid the state change function from messing with the state of the elements
that we add.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=690420
2012-12-21 16:38:36 +01:00
Thibault Saunier e79f0e801e encodebing: Use the preset_name as the factory name and preset as the name of the preset
The naming is not perfect, but at least we can keep the exact same behaviour as
before.
2012-12-17 10:12:11 -03:00
Tim-Philipp Müller 53072a4326 ssaparse: ignore invalid UTF-8 in init section
The codec data blob we get from matroskademux with the SSA/ASS
init section is supposed to be valid UTF-8. If it's not, just
continue with the bits that are valid UTF-8 instead of erroring
out. We don't actually parse the init section yet anyway..

https://bugzilla.gnome.org/show_bug.cgi?id=607630
2012-12-17 01:09:11 +00:00
Tim-Philipp Müller 6549db36cd subparse: fix GError leak 2012-12-16 12:34:14 +00:00
Tim-Philipp Müller 2f177a7616 typefinding: detect stand-alone SSA/ASS subtitle files
https://bugzilla.gnome.org/show_bug.cgi?id=625113
2012-12-16 12:11:27 +00:00
Wim Taymans 66cafcc34d playsink: fix vis switch with format change
Block the pad before the resample and convertor elements to give the a chance to
negotiate new caps with the newly switched vis plugin.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=679976
2012-12-13 11:34:54 +01:00
Tim-Philipp Müller 4c58077f22 typefindfunctions: aac: don't try to unref NULL caps 2012-12-12 15:31:20 +00:00
Thibault Saunier 7358cba017 encodebin: Make use of the new preset_name when setting a preset
The behaviour is sensibly changed here. Instead of purely falling when a
preset is set on the #GstEncodingProfile, we now make sure that the
element that is plugged corresponds to the one specified as preset. Then,
if we have a preset_name, we use it, if it fails, we fail (we might rather
just keep working even without setting the element properties?)

 + Add tests that it behave correctly
2012-12-05 17:48:38 -03:00
Tim-Philipp Müller 0b172593fa tcp: print warning if someone tries to add clients in NULL state
And mention this in docs.

https://bugzilla.gnome.org/show_bug.cgi?id=689326
2012-12-02 12:54:17 +00:00
Tim-Philipp Müller 7c89a7298a streamsynchronizer: don't send gap events with huge bogus durations when advancing EOS streams
When the input buffers for a stream don't have a duration set,
timestamp_end might still be GST_CLOCK_TIME_NONE. When advancing
EOSed streams via GAP events (with other streams not yet EOS), we
would then use the invalid timestamp_end to calculate the duration
of the gap. This in turn would make baseaudiosink abort, because it
would try to allocate memory for a trizillion samples.

So if buffers don't have a duration set, assume a duration of
one second for stream catch-up purposes, just so we can still
continue to catch up in those cases. And make sure that
timestamp_end is valid before doing calculations with it.

http://bugzilla.gnome.org/show_bug.cgi?id=678530
2012-11-26 19:03:38 +00:00
Tim-Philipp Müller 601aabdf9c streamsynchronizer: reduce debug log spam a bit
Log locking/unlocking with TRACE debug level.
2012-11-25 18:07:04 +00:00
Sebastian Dröge 830b500d40 decodebin: Set element to NULL state before removing it from the bin 2012-11-22 13:09:46 +01:00
Sebastian Dröge 2faef82b9a decodebin: Check if the element really accepts the caps after setting it to READY
It might know the caps constraints for sure only after opening a decoder.
2012-11-22 13:07:11 +01:00
Sebastian Dröge 4f480612e9 streamsynchronizer: Make the element public
https://bugzilla.gnome.org/show_bug.cgi?id=688240
2012-11-21 10:29:44 +01:00
Tim-Philipp Müller 61f04f1460 typefinding: improve AAC LOAS typefinding
Make AAC LOAS typefinding a bit more reliable; don't report
a LIKELY probability already after just two sync points, but
scan for a few more consecutive frames and determine probability
based on how many we found. Fixes mis-detection of wavpack file.

https://bugzilla.gnome.org/show_bug.cgi?id=687674
2012-11-11 20:08:52 +00:00
Tim-Philipp Müller bccb3feebf typefinding: improve wavpack typefinder
Check for second block sync and return different
probabilities depending on what we found (trumping
the AAC loas typefinder's LIKELY probability after
finding a second frame sync in this particular case).

https://bugzilla.gnome.org/show_bug.cgi?id=687674
2012-11-11 20:08:17 +00:00
Tim-Philipp Müller 20c9d2d2cc typefinding: fix block size calculation in wavpack typefinder
The blocksize includes part of the header, just not the sync
marker and the four size bytes.
2012-11-11 19:44:31 +00:00
Thiago Santos a4cfe8c43c typefind: isml is iso-fragmented video/quicktime
Add isml typefinding to the video/quicktime function
2012-11-07 01:40:18 -03:00
Tim-Philipp Müller 5f59b4f7ee Fix FSF address
https://bugzilla.gnome.org/show_bug.cgi?id=687520
2012-11-03 23:05:09 +00:00
Sebastian Dröge 9e6021fe4b audioconvert: Always prefer the input format if possible
Previously we could've chosen another format with the same
depth even if the input format was possible.

Also make sure to chose according to the order in the
caps.
2012-11-01 16:44:05 +01:00
Sebastian Dröge bc4389806d audioconvert: Also ignore the SIGNED flag when matching an output format 2012-11-01 14:31:29 +01:00
Rasmus Rohde c286f8ffa2 audioconvert: Prefer output formats with the same depth or at least a higher depth
Enhance current code to prefer an exact match on sample depth if
possible. Also ignore GST_AUDIO_FORMAT_FLAG_UNPACK when checking
equality on the flags.
2012-11-01 14:29:43 +01:00
Tim-Philipp Müller 8abc646ecb gio: handle g_vfs_get_supported_uri_schemes() returning NULL
Handle g_vfs_get_supported_uri_schemes() returning NULL more
gracefully, without criticals for passing NULL to g_strv_length().
2012-10-29 13:31:28 +00:00
Sebastian Dröge 3864209f6e audioresample: Use auto sinc table mode by default 2012-10-25 14:03:52 +02:00
Carlos Rafael Giani d793a2b560 audioresample: added ARM NEON support
This adds ARM NEON accelerated code paths for 16-bit integer
and 32-bit floating point samples.

It is a modified combination of patches #3 and #5 from Jyri Sarha
( http://lists.xiph.org/pipermail/speex-dev/2011-September/008240.html &
http://lists.xiph.org/pipermail/speex-dev/2011-September/008238.html )

Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
2012-10-25 14:03:52 +02:00
Carlos Rafael Giani 19073ab8c4 audioresample: changed inner_product_single semantics
This is an adaptation of patch #3 from Jyri Sarha
( http://lists.xiph.org/pipermail/speex-dev/2011-September/008240.html ),
but without the NEON optimizations (these come in a separate commit).
The idea is to replace SATURATE32(PSHR32(x, shift), a) operations with a
combined SATURATE32PSHR(x, shift, a) macro that can be optimized for
specific platforms (and also avoids rare rounding errors).

Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
2012-10-25 14:03:52 +02:00
Carlos Rafael Giani c41faa3d8e audioresample: sinc filter performance improvements
Original idea comes from Jyri Sarha
( http://lists.xiph.org/pipermail/speex-dev/2011-September/008243.html ).
Patch was discovered by Branislav Katreniak
( branislav.katreniak@streamunlimited.com ) for StreamUnlimited
( http://streamunlimited.com/ ). Tests showed up to 5x speed increase in
the resampler in the 44.1<->48kHz case.
I added the sinc-filter-mode and sinc-filter-auto-threshold properties
and the auto mode threshold tests, and adapted the code to GStreamer 1.0.

Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
2012-10-25 14:03:52 +02:00
Sebastian Dröge b9d4d0cd29 streamsynchronizer: Also send a GAP event to let audio sinks start their clock in case they did not have enough data yet 2012-10-24 13:34:15 +02:00
Sebastian Dröge 6a31051feb streamsynchronizer: Use correct timestamp/duration for the GAP events 2012-10-24 13:29:45 +02:00
Sebastian Dröge 3c1041d5eb Revert "gst: Add better support for static plugins"
This reverts commit d2d79e3bc2,
which was accidentially pushed.
2012-10-24 13:26:26 +02:00
Sebastian Dröge 52d48109bc streamsynchronizer: Send GAP events to advance streams 2012-10-24 13:25:19 +02:00
Sebastian Dröge d2d79e3bc2 gst: Add better support for static plugins 2012-10-24 12:10:44 +02:00
Sebastian Dröge 7b12afa4cb streamsynchronizer: Create a GAP event with a sensible timestamp 2012-10-24 11:19:06 +02:00
Sebastian Dröge 356579157e streamsynchronizer: Also propagate return value of pushing GAP event upstream 2012-10-23 18:21:32 +02:00
Sebastian Dröge 120c7be970 streamsynchronizer: Return TRUE from the EOS handler 2012-10-23 17:38:43 +02:00
Sebastian Dröge ce0bfbb7cc tcp: sys/socket.h is needed for getsockname() and similar functions 2012-10-22 15:45:47 +02:00
Wim Taymans a5ef81e05e videoconvert: add more debug 2012-10-22 09:51:34 +02:00
Tim-Philipp Müller 0ea6526770 tcpserver{sink,src}: improve docs and property strings
And some minor clean-ups.
2012-10-19 18:29:56 +01:00
Alexandre Relange d2f1d82778 tcpserver{sink,src}: add 'current-port' property and signal actually used port
Useful when port=0 (use random available port) was requested.

https://bugzilla.gnome.org/show_bug.cgi?id=580093
2012-10-19 18:23:20 +01:00
Mark Nauwelaerts a66ff00908 audioconvert: enhance transforming caps
... so as to preserve input format precision,
and preferably not convert at all.
2012-10-19 16:02:44 +02:00
Wim Taymans d73dcb6af3 videotestsrc: make and copy palette 2012-10-15 16:33:24 +02:00
Wim Taymans f3f08e829d videoconvert: actually copy the palette
Copy the default palette in the destination buffer too.
2012-10-15 16:32:25 +02:00
David Corvoysier 87fd43aaaa decodebin2: Fix group switching algorithm
There were two issues with the previous decodebin2 group switching algorithm:

Issue 1: It operated with no memory of what has been drained or not, leading to
multiple checks for chains/groups that were already drained.

Issue 2: When receiving an EOS, it only detected that a higher-level chain
was drained if it contained the pad receiving the EOS.

The following modifications have been applied:
- a new drained property has been added to GstDecodeChain
- both drained properties of chain/group are set as soon as they are detected
- the algorithm now tests agains these values

See https://bugzilla.gnome.org/show_bug.cgi?id=685938
2012-10-14 10:58:18 +02:00
Sebastian Dröge 80e4f3e912 playsinkconvertbin: Change GST_WARNING to GST_INFO
It's not a problem if we have no converters, this only means
that none were requested at this point.
2012-10-10 11:50:12 +02:00
Wim Taymans 3591df23b1 docs: playbin2 -> playbin 2012-10-09 12:20:10 +02:00
Tim-Philipp Müller 81097f485a playback: class_ref() some types so we can create multiple playback elements at the same time
Should fix "cannot register existing type `GstPlaybinSelectorPad'" warnings
and subsequent errors when creating multiple players at the same time.

Conflicts:
	gst/playback/gststreamselector.c
2012-10-03 11:48:25 +01:00
Alban Browaeys 579458f613 encodebin: muxer sink pad is not always a request pad
GstId3Mux sink pad is an always (static) pad. Thus releasing it
as if a request pad triggers:
(sound-juicer:11826): GStreamer-CRITICAL **:
gst_element_release_request_pad: assertion `GST_PAD_PAD_TEMPLATE (pad)
== NULL || GST_PAD_TEMPLATE_PRESENCE (GST_PAD_PAD_TEMPLATE (pad)) ==
GST_PAD_REQUEST' failed

https://bugzilla.gnome.org/show_bug.cgi?id=685110
2012-09-30 15:08:17 +01:00
Tim-Philipp Müller 6842698f0d Purge all references to liboil
And remove unused ffmpegcolorspace tests in the process.

https://bugzilla.gnome.org/show_bug.cgi?id=673285
2012-09-29 11:47:52 +01:00
Sebastian Dröge a3878f8bb8 videoconvert: Set correct plugin metadata 2012-09-25 13:16:45 +02:00
Thiago Santos 386206e627 videotestsrc: keep track of the correct running time after renegotiations
Need to store the old running time and frame numbers when renegotiating and
start from 0 again when a new caps is set, preventing that framerate changes
cause timestamping issues.

For example, if a stream pushed 10 buffers on framerate=2/1, its
running time will be 5s. If a new framerate of 1/1 is set, it would
make the running time go to 10s as it would count those 10 buffers
as being sent on this new framerate.

Fixes camerbin unit test.

https://bugzilla.gnome.org/show_bug.cgi?id=682973
2012-09-23 17:48:56 +01:00
Tim-Philipp Müller cec6d634b6 adder: send stream-start event, and send caps event after stream-start
Delay sending of caps event so that it is sent only after
the stream-start event.
2012-09-23 13:31:17 +01:00
Mark Nauwelaerts 17e3dc3357 audioresample: mark semi-unused variable
../../../gst-plugins-base/gst/audioresample/gstaudioresample.c: In function 'gst_audio_resample_dump_drain':
../../../gst-plugins-base/gst/audioresample/gstaudioresample.c:729:9: warning: variable 'in_len' set but not used [-Wunused-but-set-variable]
2012-09-18 13:16:39 +02:00
Sebastian Dröge b19944d1e4 gst: Update for link/unlink function API change 2012-09-17 13:24:52 +02:00
Mark Nauwelaerts e491d24341 use gst_element_factory_get_metadata to replace obsolete API 2012-09-15 18:57:09 +02:00
Mark Nauwelaerts c629a44162 replace gst_tag_list_free with gst_tag_list_unref 2012-09-14 17:53:21 +02:00
Wim Taymans acb3aeebd4 fix caps 2012-09-14 13:22:31 +02:00
Andreas Frisch 6e469b2ac5 playbin: subtitleoverlay: don't segfault in incorrectly init'ed plugins
https://bugzilla.gnome.org/show_bug.cgi?id=683865
2012-09-14 08:49:47 +01:00
Tim-Philipp Müller f7c6aa5abd Release 0.11.94 2012-09-14 02:47:54 +01:00