Commit graph

6732 commits

Author SHA1 Message Date
Thiago Santos
a6dc5e19a2 videoencoders: use template subset check for accept-caps
It is faster than doing a query that propagates downstream and
should be enough

Elements: openjpegenc, schroenc, webpenc, pnmenc
2015-08-17 14:39:44 -03:00
Thiago Santos
6517282af7 audioencoders: use template subset check for accept-caps
It is faster than doing a query that propagates downstream and
should be enough

Elements: faac, gsmenc, opusenc, sbcenc, voamrwbenc, adpcmenc, sirenenc
2015-08-17 10:07:54 -03:00
Olivier Crête
567b1e8c46 videoparsers: Use gst_base_parse_merge_tags()
Instead of squashing all upstream tags

https://bugzilla.gnome.org/show_bug.cgi?id=679768
2015-08-16 17:28:29 +01:00
Edward Hervey
7ea4a66b9f mpegtsdemux: Fix illogical comparision
A variable can't be two values at once. We want to stop if it's not the
actual ts *AND* not the other ts

CID #1316475
2015-08-16 12:56:56 +02:00
Thiago Santos
56b822f9f6 audiodecoders: use default pad accept-caps handling
Avoids useless check of downstream caps when handling an
accept-caps query

Elements: dtsdec, faad, gsmdec, mpg123audiodec, opusdec,
          sbcdec, adpcmdec, sirendec
2015-08-15 13:51:16 -03:00
Thiago Santos
a5ed877783 videodecoders: use default pad accept-caps handling
Avoids useless check of downstream caps when handling an
accept-caps query

Elements: daaladec, libde265dec, openjpegdec, rsvgdec, schrodec,
          webpdec, pnmdec, vmncdec, openexrdec
2015-08-15 13:51:16 -03:00
Luis de Bethencourt
51dfa3b135 rtph265depay: make sure we call handle_nal for each NAL
Call handle_nal for each NAL in the STAP-A RTP packet. This makes sure
we correctly extract the SPS and PPS.

https://bugzilla.gnome.org/show_bug.cgi?id=730999
2015-08-15 16:22:22 +01:00
Luis de Bethencourt
4075b1112c rtph265pay: Copy metadata in the payloader, but only the relevant ones
The payloader didn't copy anything so far, the depayloader copied every
possible meta. Let's make it consistent and just copy all metas without
tags or with only the video tag.

https://bugzilla.gnome.org/show_bug.cgi?id=751774
2015-08-15 14:45:37 +01:00
Luis de Bethencourt
5b2ddfb90c rtph265pay: Use GST_WARNING_OBJECT() instead of GST_WARNING()
https://bugzilla.gnome.org/show_bug.cgi?id=753228
2015-08-15 11:41:43 +01:00
Luis de Bethencourt
585e042fca rtph265pay: fix potential crash when shutting down
A race condition in the state change function may cause buffers to be
unreffed while they are still used by the streaming thread in
gst_rtp_h265_pay_send_vps_sps_pps() resulting in a crash. Chain up to the
parent class first in the state change function to make sure streaming
has stopped and only then free those buffers.

https://bugzilla.gnome.org/show_bug.cgi?id=741381
2015-08-15 11:34:31 +01:00
Jan Schmidt
fdac09d843 h264parse: Clear SPS info after processing.
The SPS struct might be filled out by a call to
gst_h264_parser_parse_subset_sps, which fills out
dynamically allocated data and requires a call
to gst_h264_sps_clear() to free it. Also make sure
to clear out any allocated SPS data when returning
an error.

https://bugzilla.gnome.org/show_bug.cgi?id=753306
2015-08-15 15:39:23 +10:00
Thiago Santos
8f855a8b78 pngparse: enable accept-intersect and accept-template flags on sinkpad
Do a quick check with the pad template caps as it is enough. Users
should have figured the appropriate full caps on a previous caps query

https://bugzilla.gnome.org/show_bug.cgi?id=753623
2015-08-14 13:42:59 -03:00
Thiago Santos
c4cd1ce4fd videoparsers: enable accept-template flag
Do a quick check with the pad template caps as it is enough. Users
should have figured the appropriate full caps on a previous caps query

https://bugzilla.gnome.org/show_bug.cgi?id=753623
2015-08-14 13:42:59 -03:00
Luis de Bethencourt
b3418759d9 rtph265pay: fix buffer leak when using SPS/PPS
Fixes a buffer leak that would occur if the pipeline was shutdown while a
SPS/PPS header was being created.

https://bugzilla.gnome.org/show_bug.cgi?id=741271
2015-08-14 15:08:10 +01:00
Luis de Bethencourt
fd665514ba rtph265depay: copy metadata in the depayloader, but only the relevant ones
The payloader didn't copy anything so far, the depayloader copied every
possible meta. Let's make it consistent and just copy all metas without
tags or with only the video tag.

https://bugzilla.gnome.org/show_bug.cgi?id=751774
2015-08-14 12:00:23 +01:00
Vineeth TM
6fb346717b spu-pgs: fix buffer and event leak
When playing mts files with embedded subtitles, the buffer is mapped,
but not unmapped at the end resulting in a memory leak.

Also unref event in handle_dvd_event as it takes ownership of the event.

https://bugzilla.gnome.org/show_bug.cgi?id=753539
2015-08-13 14:56:00 +01:00
Vineeth TM
0812437293 dvdspu: Fix event leaks
When playing mts files with embedded subtitles, there are few event leaks.
Events are supposed to be transfer full. So if not forwarding the event,
they need to be freed.

https://bugzilla.gnome.org/show_bug.cgi?id=753539
2015-08-13 14:38:03 +01:00
Luis de Bethencourt
397b5d06ec rtph265depay: checking if depay has sps/pps nals before insertion
Related to: https://bugzilla.gnome.org/show_bug.cgi?id=753430

https://bugzilla.gnome.org/show_bug.cgi?id=753228
2015-08-12 17:54:55 +01:00
Luis de Bethencourt
ef9b7ef60a rtph265depay: only update the srcpad caps if something else than the codec_data changed
h264parse and gstrtph264depay do the same, let's keep the behaviour
consistent. As we now include the codec_data inside the stream, this causes
less caps renegotiation.

https://bugzilla.gnome.org/show_bug.cgi?id=753228
2015-08-12 17:22:44 +01:00
Luis de Bethencourt
4edf2ac1c5 rtph265depay: PPS replaces old PPS if it has the same id
https://bugzilla.gnome.org/show_bug.cgi?id=753228
2015-08-12 16:51:18 +01:00
Luis de Bethencourt
021333a9fc rtph265depay: Insert SPS/PPS NALs into the stream
rtph264depay does the same and this fixes decoding of some streams with 32
SPS (or 256 PPS). It is allowed to have SPS ID 0 to 31 (or PPS ID 0 to 255),
but the field in the codec_data for the number of SPS or PPS is only 5
(or 8) bit. As such, 32 SPS (or 256 PPS) are interpreted as 0 everywhere.

This looks like a mistake in the part of the spect about the codec_data.
2015-08-12 16:34:43 +01:00
Luis de Bethencourt
fee3129d49 rtph265depay: implement process_rtp_packet() vfunc
For more optimised RTP packet handling: means we don't need to map the
input buffer again but can just re-use the mapping the base class has
already done.

Based on: https://bugzilla.gnome.org/show_bug.cgi?id=750235

https://bugzilla.gnome.org/show_bug.cgi?id=753228
2015-08-12 15:53:23 +01:00
Luis de Bethencourt
2d3dc2caa6 rtph265depay: Use GST_BUFFER_PTS() instead of GST_BUFFER_TIMESTAMP()
Switching to GST_BUFFER_TIMESTAMP() to be consistent with other rtp code.
2015-08-12 15:14:52 +01:00
Luis de Bethencourt
9379933607 rtph265depay: prevent trying to get 0 bytes from adapter
This causes an assertion and would lead to getting a NULL instead
of a buffer. Without proper checking this would easily lead to a
segfault.

Related to rpth264depay: https://bugzilla.gnome.org/show_bug.cgi?id=737199
2015-08-12 15:05:02 +01:00
Nicolas Dufresne
e531ea9ff0 frei0r: Fix setting string parameters
String parameters are expected to be passed as (f0r_param_string *),
which actually map to char**. In the filters this is evaluated as
(*(char**)param) which currently lead to crash when passing char*.

Remove the special case for string, all types, including char* as
passed as a reference.

https://phabricator.freedesktop.org/T83
2015-08-11 15:11:01 -04:00
Sreerenj Balachandran
a83dabd5e8 videoparsers: h265: Fix the frame start detection code
Check slice headers in between GST_H265_NAL_SLICE_TRAIL_N
and GST_H265_NAL_SLICE_RASL_R for frame start detection.

https://bugzilla.gnome.org/show_bug.cgi?id=753497
2015-08-11 11:34:36 +01:00
Sreerenj Balachandran
2775b202dc videoparsers: h265: Avoid skipping of EOS and EOB nals
EndOfSequence and EndOfBitstream nal units have size of 2 bytes.
Don't consider them as broken nals.

https://bugzilla.gnome.org/show_bug.cgi?id=753497
2015-08-11 11:34:36 +01:00
Tim-Philipp Müller
424426f486 asfmux: output TIME segment if we output a stream and won't seek back later
Check if downstream is seekable via a SEEKING query and output a
BYTE segment if we want to seek back to fix up the headers later,
but if we're streaming send a TIME segment instead (which goes
down better with e.g. asfmux ! rtpasfpay).

https://bugzilla.gnome.org/show_bug.cgi?id=719553
2015-08-08 16:19:09 +01:00
Sreerenj Balachandran
69becd734d h265parse: expose compatible profiles to downstream
Some video bitstreams report a too restrictive set of profiles. If a video
decoder was to strictly follow the indicated profile, it wouldn't support that
stream, whereas it could in theory and in practice. So we should relax the
profile restriction for allowing the decoder to get connected with parser.

https://bugzilla.gnome.org/show_bug.cgi?id=747613
2015-08-07 13:11:53 +02:00
Nicolas Dufresne
ef7a074fa0 rgb2bayer: Use mapped frame stride 2015-08-06 18:12:07 -04:00
Nicolas Dufresne
97a0d9d72d rgb2bayer: Protect against failing map 2015-08-06 18:11:53 -04:00
Nicolas Dufresne
6bd93bd7e5 bayer2rgb: Read stride from the video info 2015-08-06 18:04:58 -04:00
Nicolas Dufresne
7d6fd42726 bayer2rgb: Protect against failing map 2015-08-06 18:04:41 -04:00
Nicolas Dufresne
3757e507f3 pcapparse: Segment should start at base ts
Instead we would use cur_ts which matches the last TS store
in the buffer list.

https://bugzilla.gnome.org/show_bug.cgi?id=753037
2015-08-05 14:54:05 -04:00
Anders Jonsson
3fb2222470 camerabin2: Fix string typo
https://bugzilla.gnome.org/show_bug.cgi?id=753241
2015-08-05 09:15:07 -04:00
Jimmy Ohn
be714c7441 rawparse: fix duplicated format in handle_seek_pull
GstFormat variable are duplicated in handle_seek_pull function.
So we need to move this variable in condition statement.

https://bugzilla.gnome.org/show_bug.cgi?id=753243
2015-08-04 12:29:40 -03:00
Olivier Crête
10ef6403b6 audiointerleave: Avoid caps processing if not yet negotiated
https://bugzilla.gnome.org/show_bug.cgi?id=745768
2015-07-30 14:00:05 -04:00
Olivier Crête
3f2bc1e4b2 audioaggregator: On timeout, resync pads with not enough data
https://bugzilla.gnome.org/show_bug.cgi?id=745768
2015-07-30 14:00:05 -04:00
Olivier Crête
6efc106a67 aggregator: Queue "latency" buffers at each sink pad.
In the case where you have a source giving the GstAggregator smaller
buffers than it uses, when it reaches a timeout, it will consume the
first buffer, then try to read another buffer for the pad. If the
previous element is not fast enough, it may get the next buffer even
though it may be queued just before. To prevent that race, the easiest
solution is to move the queue inside the GstAggregatorPad itself. It
also means that there is no need for strange code cause by increasing
the min latency without increasing the max latency proportionally.

This also means queuing the synchronized events and possibly acting
on them on the src task.

https://bugzilla.gnome.org/show_bug.cgi?id=745768
2015-07-30 14:00:05 -04:00
Vineeth TM
09992f32dc h265parse: Avoid checking for Non Mandatory VPS NAL
VPS is not mandatory, and need not check for its presence before setting
the caps. Because of the check, in streams which don't have VPS,
sticky event mishandling happens.

https://bugzilla.gnome.org/show_bug.cgi?id=752807
2015-07-30 15:10:05 +01:00
Vineeth TM
8f7a84a9a1 sdpdemux: assertion error due to wrong condition check
In media to caps function, reserved_keys array is being used for variable i,
leading to GLib-CRITICAL **: g_ascii_strcasecmp: assertion 's1 != NULL' failed
changed it to variable j

https://bugzilla.gnome.org/show_bug.cgi?id=753009
2015-07-30 15:51:53 +03:00
Luis de Bethencourt
0e29906a6f rtp: remove dead assignment
Value set to ret will be overwritten at least once at the end of the while
loop, removing assignment.
2015-07-29 17:33:27 +01:00
Tim-Philipp Müller
d37fcff732 mpegtsmux: use GQueue instead of GList prepend/reverse 2015-07-29 17:30:15 +01:00
Luis de Bethencourt
d6b637532f sdpdemux: remove redundant assignment
Value of p is already set below just before being used. Removing this
first assignment that will be ignored.
2015-07-29 17:19:33 +01:00
Luis de Bethencourt
7ddaf8741b mpegtsbase: remove redundant check
No need to check if done is True since break will already terminate the for
loop.
2015-07-29 16:52:08 +01:00
Sebastian Dröge
a4a2638d86 sdpdemux: Don't assert in GstAdapter if no data was received before EOS 2015-07-29 14:35:50 +01:00
Sebastian Dröge
86a9b84c92 sdpdemux: Strip keys from the fmtp that we use internally in our caps
Skip keys from the fmtp, which we already use ourselves for the
caps. Some software is adding random things like clock-rate into
the fmtp, and we would otherwise here set a string-typed clock-rate
in the caps... and thus fail to create valid RTP caps

https://bugzilla.gnome.org/show_bug.cgi?id=753009
2015-07-29 14:35:50 +01:00
Jan Schmidt
c1b0d818bb h264parse: Add more NAL types for debugging output.
Register more NAL unit types so that they are dumped
by name in the debug output instead of being labelled
'Invalid'
2015-07-29 23:10:49 +10:00
Jan Schmidt
55373e21a8 mpegtsmux: Don't clear the PID on reset.
The PID on a pad shouldn't change on a state change, only
if the pad is freed and a new one created. Clearing the PID
prevented mpegtsmux from being reused, because all packets
would end up muxed in PID 0

https://bugzilla.gnome.org/show_bug.cgi?id=752999
2015-07-29 23:10:49 +10:00
Jan Schmidt
0d170d51c7 mpegtsmux: Accumulate streamheaders in reverse
Accumulate streamheader packets in reverse into the
GList for efficiency, and reverse the list once when
processing.

Improves muxing speed when there are a lot of
streamheaders.
2015-07-29 23:10:49 +10:00