Commit graph

4040 commits

Author SHA1 Message Date
Stefan Sauer
c51bf98af4 playbin: improve debug log
Log the human readable pad_link_return desc as well.
2015-02-11 22:16:53 -08:00
Sebastian Dröge
8547594727 Improve and fix LATENCY query handling
This now follows the design docs everywhere, especially the maximum latency
handling.

https://bugzilla.gnome.org/show_bug.cgi?id=744106
2015-02-11 17:53:49 +02:00
Luis de Bethencourt
f85212ed4b videoscale: fix memory leak
In gst_video_scale_fixate_caps () it can goto done without freeing the memory
of the tmp GstStructure. This makes it go out of scope and leak.

CID #1265766
2015-02-04 12:09:45 +00:00
Wim Taymans
47bd6a138c videoscale: don't do dithering 2015-01-28 17:30:53 +01:00
Luis de Bethencourt
783204824d orc: update orc files 2015-01-27 13:39:14 +00:00
Wim Taymans
3db8879f25 videoscale: disable chroma and matrix operations
Ignore chroma subsampling and color matrix transformations like the
old videoscale used to do. This is to make the performance like it was
before.

See https://bugzilla.gnome.org/show_bug.cgi?id=741987
2015-01-27 10:52:29 +01:00
Sebastian Dröge
2bd4ea6e8e Constify some static arrays everywhere 2015-01-21 09:49:47 +01:00
Vincent Penquerc'h
661588b150 dcodebin2: fix lock/unlock mismatch on multiqueue overrun 2015-01-20 15:09:13 +00:00
Jan Alexander Steffens (heftig)
a636c39638 audioresample: Try to prevent endless looping
Speex may decide not to consume any samples because it can't write any. I've
seen a hang during draining caused by the resample loop never terminating.
In that case, resampling happened as normal until olen was 0 but ilen was
still 1. _process_native then reduced ichunk to 0, so ilen never decreased
below 1 and the loop never terminated.

Instead of reverting 684cf44 ({audioresample: don't skip input samples),
break only if all output samples have been produced and speex refuses
to consume any more input samples.

https://bugzilla.gnome.org/show_bug.cgi?id=732908
2015-01-19 19:36:13 +01:00
Sebastian Dröge
63afbce6be videorate: Add $(GST_PLUGINS_BASE_CFLAGS) to be able to find gst/video/video.h 2015-01-19 11:17:18 +01:00
Nicolas Dufresne
e60158c98f videorate: Implement allocation query
The videorate element keeps 1 buffer internally. This buffer need
to be requested during allocation query otherwise the pipeline may
stall.

https://bugzilla.gnome.org/show_bug.cgi?id=738302
2015-01-18 14:58:36 -05:00
Nicolas Dufresne
2e264103e1 Revert "videorate: Implement allocation query"
This reverts commit 3c04db4a30.
2015-01-18 14:17:07 -05:00
Nicolas Dufresne
3c04db4a30 videorate: Implement allocation query
VideRate keeps 1 buffer in order to duplicate base on closest buffer
relative to targeted time. This extra buffer need to be request
otherwise the pipeline may stall when fixed size buffer pool is used.

https://bugzilla.gnome.org/show_bug.cgi?id=738302
2015-01-18 11:02:00 -05:00
Sebastian Dröge
2228d9f22b decodebin: Fix compilation 2015-01-17 14:51:48 +01:00
Branislav Katreniak
d16df7f70d decodebin: do call set_queue_size in no_more_pads_cb
Consider pipeline: gst-launch-1.0 playbin uri=http://example.com/a.ogg
Consider 128kbit audio stream.

As soon as uridecodebin detects the bitrate, it configures its input
queue2 max-size to 32000 bytes.
The 2MB buffer in multiqueue is nearly 2 orders of magnitude bigger.
This non-deterministically drives queue2 buffer anywhere from
100% to 0% until multiqueue is filled.

This patch sets multiqueue size to 5 buffers early in no_more_pads_cb.

Partly reverts commit db771185ed.

https://bugzilla.gnome.org/show_bug.cgi?id=740689
2015-01-16 20:58:40 +01:00
Vincent Penquerc'h
6ab711f3f1 decodebin: free old groups when switching groups
Old groups are freed with one switch's delay when switching groups.
They're freed in a scratch thread to avoid delaying the switch.
2015-01-16 15:55:10 +00:00
Thiago Santos
a5ed7afb4c decodebin: disable pad link checks as it has already been done
Decodebin has already added the element to the bin and should only
select caps compatible pads. It should disable the pad link checks
to avoid doing those again.

https://bugzilla.gnome.org/show_bug.cgi?id=742885
2015-01-14 10:33:52 -03:00
Sebastian Dröge
8abfdd127f videotestsrc: Report our latency properly in live mode
While we have no latency at all in theory, any other live source has the
duration of one buffer as minimum latency. Do the same in videotestsrc.

https://bugzilla.gnome.org/show_bug.cgi?id=741879
2014-12-24 12:59:37 +01:00
Sebastian Dröge
631d356845 audiotestsrc: Report our latency properly in live mode
While we have no latency at all in theory, any other live source has the
duration of one buffer as minimum latency. Do the same in audiotestsrc.

https://bugzilla.gnome.org/show_bug.cgi?id=741879
2014-12-24 12:59:37 +01:00
Sebastian Dröge
6521870077 Revert "decodebin: Only emit the drain signal for the main decode chain, not any subchains"
This reverts commit a391dfe17f.

It breaks gapless playback: https://bugzilla.gnome.org/show_bug.cgi?id=740045
2014-12-15 09:46:13 +01:00
Matej Knopp
4713694082 audiorate: Fill gap events
https://bugzilla.gnome.org/show_bug.cgi?id=741281
2014-12-14 12:09:12 +01:00
Thibault Saunier
b9cbfcdeb4 playbin: Do not mix up stream type when getting stream combiner element
We were always returning the video stream combiner whatever stream type
combiner was wanted.
2014-12-11 13:47:58 +01:00
Thiago Santos
7e801a5f26 playbin2: always unref the combiner sinkpad when removing the srcpad
Create a function to do the pad cleanup of the GstSourceCombine struct
and use it to not forget to also cleanup the sink pad and fix a memory
leak.

https://bugzilla.gnome.org/show_bug.cgi?id=741198
2014-12-10 13:36:37 -03:00
Edward Hervey
6a2f017bfa playbin: Only check sinks which are in >= GST_STATE_READY
Otherwise we endup with bogus caps intersection (from the pad template
caps and not from what the actual hardware/device supports)

https://bugzilla.gnome.org/show_bug.cgi?id=738131
2014-12-05 07:58:44 +01:00
Chad
e397b03f35 audiorate: Use gst_util_uint64_scale_int_round()
Using gst_util_uint64_scale_int() causes slight drift
which accumulates over time.

https://bugzilla.gnome.org/show_bug.cgi?id=741045
2014-12-02 16:07:05 -05:00
Wim Taymans
991a81bd5d videoconvert: add dither-bits option
Fix the dither option.
Add a new option to set the quantizer
2014-12-02 15:23:00 +01:00
Sebastian Dröge
90eb93c2ef Don't compare booleans for equality to TRUE and FALSE
TRUE is 1, but every other non-zero value is also considered true. Comparing
for equality with TRUE would only consider 1 but not the others.
2014-12-01 09:51:12 +01:00
Thibault Saunier
72c05d1cbb encodebin: Add a way to disable caps renegotiation for output stream format
In some cases, the user might want the stream outputted by encodebin to
be in the exact same format during all the stream. We should let the
user specify when this is the case. This commit add some API in the
GstEncodingProfile to determine whether the format can be renegotiated
after the encoding started or not.

API:
    gst_encoding_profile_set_allow_dynamic_output
    gst_encoding_profile_get_allow_dynamic_output

https://bugzilla.gnome.org/show_bug.cgi?id=740214
2014-11-28 16:56:32 +01:00
Wim Taymans
9efbba8c1c videoscale: use old property name
Unbreak ABI by changing to the old property name again.

https://bugzilla.gnome.org/show_bug.cgi?id=740798
2014-11-27 09:47:41 +01:00
Thibault Saunier
35f6259b24 decodebin: Analyze source pad before setting to PAUSED for 'simple demuxers'
Before we were setting them to PAUSED and (much) later connecting to
their source pad caps notify signal.

There was a race where that demuxer was pushing a caps and later a buffer
on its source pad when we were not even connected to its source pad caps notify
signal leading to decodebin missing the information and not keeping on
building the pipeline on CAPS event thus the demuxer was posting an ERROR
(not linked) message on the bus. This need to be done for 'simple
demuxers' because those have one ALWAYS source pad, not like usual demuxers
that have several dynamic source pads.

A "simple demuxer" is a demuxer that has one and only one ALWAYS source
pad.

https://bugzilla.gnome.org/show_bug.cgi?id=740693
2014-11-26 19:38:48 +01:00
Mathieu Duponchelle
68edf0ebd6 decodebin2: Take STREAM_LOCK before sending sticky events.
There was a race where:

1) we would put the element to PAUSED
2) It would get data sent to it from upstream
3) It would thus send caps
3) caps_notify_cb would continue autoplugging
4) caps would flow downstream, the last pad would get exposed
5) we were still not done sending the sticky events

Taking the stream lock on the new element's sinkpad and only
releasing it when sticky events have all been sent prevents
the caps from reaching the source pad of the element before
we're all set.

https://bugzilla.gnome.org/show_bug.cgi?id=740694
2014-11-26 19:38:48 +01:00
Tim-Philipp Müller
76199fddb6 typefindfunctions: detect mp4 common file format variant
Used e.g. by UltraViolet.
2014-11-26 16:54:39 +00:00
Wim Taymans
43f44d41dc videoscale: add property to do scaling after gamma-decode 2014-11-25 11:54:51 +01:00
Wim Taymans
724b83c5f5 videoscale: add more scaling filters
Adjust the filter parameters so that they use the same number of taps
and method as the old ones.
Add some new filters
2014-11-25 11:28:42 +01:00
Andrei Sarakeev
e5c6f59140 playsink: Reset mute property of the sink to playsink's value when setting up the audio chain
Otherwise the following can happen:
1. set mute=true
2. play media1 (Ok)
3. play media without audio (audiochain removed)
4. play media2 (audiochain created, mute=*false*)

https://bugzilla.gnome.org/show_bug.cgi?id=740675
2014-11-25 10:23:50 +01:00
Tim-Philipp Müller
ef23ac5f52 typefind: improve 'audible' audio typefinder a little
Don't return NEARLY_CERTAIN just based on 4 bytes.
Also change media type to audio/x-audible.

https://bugzilla.gnome.org/show_bug.cgi?id=715050
2014-11-25 09:04:37 +00:00
Jonathan Matthew
ddda5866c5 typefindfunctions: add audio/audible typefinder
https://bugzilla.gnome.org/show_bug.cgi?id=715050
2014-11-25 00:55:50 +00:00
Sebastian Dröge
cefc518494 videorate: Operate in a zero-latency mode if drop-only is set to TRUE
There's no reason why we would have to wait for the next buffer to decide
whether to output the current one or not. We just have to check if the
current one is earlier than our expected next time, which is the previous
frame timestamp plus the expected frame duration.

https://bugzilla.gnome.org/show_bug.cgi?id=740018
2014-11-19 15:10:48 +01:00
Tim-Philipp Müller
9c5d53c7e3 docs: fix some gtk-doc warnings
Deprecated entities found in documentation for xyz:Long_description
.
2014-11-15 23:13:42 +00:00
Wim Taymans
835422b2ea videoscale: port to new API 2014-11-10 11:45:52 +01:00
Peter G. Baum
16c8856b42 typefind: recognize Apple Core Audio Format
(CAF) Specification 1.0

https://bugzilla.gnome.org/show_bug.cgi?id=739840
2014-11-09 14:42:40 +00:00
William Manley
ffb43c0591 tcpserversink: Don't leak a GSocket and a GInetSocketAddress
when accepting a connection.

Discovered by `make check-valgrind` with the new `socketintegrationtest`.

https://bugzilla.gnome.org/show_bug.cgi?id=739544
2014-11-07 10:15:43 +01:00
Andreas Frisch
bae96c85ee subtitleoverlay: return available factory CAPS instead of ANY on CAPS query
https://bugzilla.gnome.org/show_bug.cgi?id=739536
2014-11-03 08:20:13 +01:00
Vincent Penquerc'h
5d1376cefa typefind: remove unneeded test
We've already bailed out if we have less than 5 bytes.

Coverity 1226441
2014-10-30 11:42:02 +00:00
Wim Taymans
71efeaaa6f video-convert: swap src and dest
It is more natural and consistent with other uses.
2014-10-29 16:26:10 +01:00
Sebastian Dröge
8b8b8ae2e8 Revert "decodebin: fix the autoplugging of parser elements"
This reverts commit 2b0d392741.

This breaks cases where an actual second parser is required after the parser,
e.g. to do timestamp corrections.

See https://bugzilla.gnome.org/show_bug.cgi?id=738416
2014-10-26 11:04:47 +01:00
Sebastian Dröge
2da56de19f Revert "decodebin: Fix locking"
This reverts commit aa94d5dc9a.
2014-10-26 11:04:38 +01:00
Sebastian Dröge
aa94d5dc9a decodebin: Fix locking
The chain mutex needs to be locked when looking at chain->elements. Move code
around a bit to require only one lock() and unlock().
2014-10-21 13:32:19 +02:00
Sreerenj Balachandran
2b0d392741 decodebin: fix the autoplugging of parser elements
If there are two parser elements available for the same media format,
then decodebin is autoplugging an extra capsfilter and parser irrespective
of caps and rank. So restrict the decodebin from autoplugging multiple parser
elements back to back in adjacent positions with in a single DecodeChain
for the same media format.

https://bugzilla.gnome.org/show_bug.cgi?id=738416
2014-10-21 13:32:19 +02:00
Vineeth T M
c2224b8059 videotestsrc: assertion error
timestamp_offset is being declared as an int64 variable,
for which the min
value of G_MININT64 is -9223372036854775808
Changing the minimum and maximum limit for the offset variable.

https://bugzilla.gnome.org/show_bug.cgi?id=738568
2014-10-21 11:28:11 +02:00