platform/upstream/gstreamer.git
4 years agoh264/h265parse: Fix handling of very last frame
Nicolas Dufresne [Wed, 22 Apr 2020 21:53:39 +0000 (17:53 -0400)]
h264/h265parse: Fix handling of very last frame

Baseparse will never call us back on draining, so going into more: label will
cause the current frame to be discarded. So if we have a complete NAL, but not
a complete AU, make sure to terminate the frame properly.

This is a gression introduce by commit e88d8480709581a2e54b7954c47193b729b23c79 and
a194a87b2600a21f1b47b8c89b1c930d5f30de42.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1275

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1208>

4 years agod3d11decoder: Add VP8 decoder element
Seungha Yang [Fri, 28 Feb 2020 09:14:51 +0000 (18:14 +0900)]
d3d11decoder: Add VP8 decoder element

New d3d11 VP8 decoder implementation

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1079>

4 years agocodecs: Fix some documentation
Seungha Yang [Wed, 22 Apr 2020 16:02:58 +0000 (01:02 +0900)]
codecs: Fix some documentation

Add missing "transfer full" annotation, etc

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1079>

4 years agocodecs: Add new baseclass for VP8 decoder
Seungha Yang [Sun, 29 Mar 2020 13:23:23 +0000 (22:23 +0900)]
codecs: Add new baseclass for VP8 decoder

This implemenation is similar to VP9 but much simpler than it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1079>

4 years agod3d11decoder: Add helper methods for negotiation and decide_allocation
Seungha Yang [Sun, 29 Mar 2020 14:31:13 +0000 (23:31 +0900)]
d3d11decoder: Add helper methods for negotiation and decide_allocation

The implementation for all codecs is almost the same.
No need to duplicate code.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1079>

4 years agovp9decoder: Fix small typo
Seungha Yang [Sun, 29 Mar 2020 13:36:59 +0000 (22:36 +0900)]
vp9decoder: Fix small typo

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1079>

4 years agocodecs: Reorganize the order of vfunc
Seungha Yang [Sun, 29 Mar 2020 13:35:06 +0000 (22:35 +0900)]
codecs: Reorganize the order of vfunc

... to the order in which it is actually called

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1079>

4 years agokmssink: Add support for P010 and P016 formats
Seungha Yang [Fri, 10 Apr 2020 18:11:35 +0000 (03:11 +0900)]
kmssink: Add support for P010 and P016 formats

Support high bit-depth YUV formats

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1188>

4 years agod3d11window: Fix videoprocessor leak
Seungha Yang [Tue, 21 Apr 2020 06:30:03 +0000 (15:30 +0900)]
d3d11window: Fix videoprocessor leak

Clear all objects in dispose function

4 years agod3d11device: Drop floating reference count
Seungha Yang [Tue, 21 Apr 2020 06:27:56 +0000 (15:27 +0900)]
d3d11device: Drop floating reference count

... and use gst_object_unref instead of g_object_unref for tracer
to be happy.

4 years agoh264decoder: Don't handle gap frame num for the first picture
Seungha Yang [Mon, 20 Apr 2020 13:48:43 +0000 (22:48 +0900)]
h264decoder: Don't handle gap frame num for the first picture

If the first picture is not IDR, it would have non-zero frame_num
but it's not gap. We should skip gap frame handling in that case

4 years agoh264decoder: Add some debug messages
Seungha Yang [Mon, 20 Apr 2020 07:00:30 +0000 (16:00 +0900)]
h264decoder: Add some debug messages

4 years agov4l2codecs: allocator: use gst_clear_object
Víctor Manuel Jáquez Leal [Thu, 16 Apr 2020 20:15:37 +0000 (22:15 +0200)]
v4l2codecs: allocator: use gst_clear_object

So tracer can do its job.

4 years agotsmux: Don't assert sinkpad reference counts in test
Sebastian Dröge [Sun, 19 Apr 2020 16:18:14 +0000 (19:18 +0300)]
tsmux: Don't assert sinkpad reference counts in test

We can't be sure about the reference count if the muxer is currently
running, which can happen in the test_reappearing_pad test. An
additional reference might temporarily be owned by the srcpad task of
tsmux while iterating over the pads.

4 years agocodecs: h264picture: typo in GstH264PictureField enum
Víctor Manuel Jáquez Leal [Sun, 19 Apr 2020 16:37:58 +0000 (18:37 +0200)]
codecs: h264picture: typo in GstH264PictureField enum

4 years agotranscodebin: fix caps NULL unref
Guillaume Desmottes [Thu, 16 Apr 2020 16:17:56 +0000 (16:17 +0000)]
transcodebin: fix caps NULL unref

gst_pad_get_current_caps() can return a NULL pointer which was raisin a CRITICAL.

4 years agokmssink: fix memory leak on failing allowed caps
Stéphane Cerveau [Thu, 16 Apr 2020 13:35:44 +0000 (15:35 +0200)]
kmssink: fix memory leak on failing allowed caps

When drm does not find any format, the allowed_caps is
empty one and need to be unref by the caller.

Fix #1268

4 years agokmssink: Save last metadata at the same time as the last buffer
Nicolas Dufresne [Tue, 14 Apr 2020 21:10:34 +0000 (17:10 -0400)]
kmssink: Save last metadata at the same time as the last buffer

The render width/height and the vinfo was only saved upon renegotiation. This
fixes the problem by saving this metadata at the same time the buffer is
saved. The saved copy of this is needed for expose() and drain() virtual functions.
This fixes various assertion that happens on drain query.

4 years agotests: h265parse: Add unit test for conversion and sliced data
George Kiagiadakis [Tue, 31 Mar 2020 16:42:26 +0000 (12:42 -0400)]
tests: h265parse: Add unit test for conversion and sliced data

testing only byte-stream for now

4 years agotests: h264parse: unit tests for sliced data processing
George Kiagiadakis [Thu, 28 Mar 2019 15:23:30 +0000 (17:23 +0200)]
tests: h264parse: unit tests for sliced data processing

4 years agoh264parse: Remove unused arguments
Xavier Claessens [Fri, 20 Sep 2019 19:21:17 +0000 (15:21 -0400)]
h264parse: Remove unused arguments

4 years agoh264parse: Don't push NALs before we have HEADERS
Nicolas Dufresne [Thu, 13 Jun 2019 02:19:04 +0000 (22:19 -0400)]
h264parse: Don't push NALs before we have HEADERS

Otherwise we may endup pushing incomplete caps, which cause a renegotiation.
Note that this has the effect that caps are no longer pushed twice in presence
of valid framerate in the headers.

4 years agoh265parse: Don't push NALs before we have HEADERS
Nicolas Dufresne [Wed, 10 Oct 2018 15:27:30 +0000 (15:27 +0000)]
h265parse: Don't push NALs before we have HEADERS

Otherwise we may endup pushing incomplete caps. Note that this has the side
effect that caps are no longer pushed twice in presence of VUI with valid
framerate.

4 years agoh265parse: Differentiate PREFIX SEI from SUFFIX
Nicolas Dufresne [Tue, 9 Oct 2018 20:42:58 +0000 (16:42 -0400)]
h265parse: Differentiate PREFIX SEI from SUFFIX

There is some code to fixup broken stream that uses the SEI location,
this code is meant to locate SUFFIX SEI only. This should prevent
unwanted side effect if SUFFIX SEI is used.

4 years agoh265parse: Don't add latency when not needed
Nicolas Dufresne [Wed, 3 Oct 2018 20:43:14 +0000 (16:43 -0400)]
h265parse: Don't add latency when not needed

We no longer add latency when doing AU->AU, AU->NAL and NAL->NAL
parsing.

4 years agoh265parse: Propagate MARKER flag
Nicolas Dufresne [Wed, 3 Oct 2018 20:35:39 +0000 (16:35 -0400)]
h265parse: Propagate MARKER flag

4 years agoh265parse: Don't wait for next NAL if input is aligned
Nicolas Dufresne [Tue, 9 Oct 2018 20:01:08 +0000 (16:01 -0400)]
h265parse: Don't wait for next NAL if input is aligned

Waiting for the next NAL increases the latency. If alignment=nal/au
has been negotiated, assumes the the buffer contains a complete
NAL and don't expect a second start-code. This way, nal -> nal,
au -> au and au -> nal no longer introduce latency.

As a side effect, the collect_pad() function was not able to poke at the
following NAL. This call is now moved before processing the NAL, so
it's looking at the current NAL before it's ingested into the parser
state in order to dermin if the end of an AU has been reached. The AUD
injection state as been adapted to support this.

This change will break pipelines if alignment=nal is used without respecting the
alignment. Effectively, the parser will no longer fix the broken aligment
which will result in parser error and the termination of the pipeline. Such
issue existed in tsdemux element and might exist in any forks of that code.

Related to https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1193

4 years agoh265parse: Set PTS/DTS and DISCONT on crafted NAL
Nicolas Dufresne [Wed, 3 Oct 2018 19:53:23 +0000 (15:53 -0400)]
h265parse: Set PTS/DTS and DISCONT on crafted NAL

When we inject a NAL in the bitstream before another one, make
sure to pass both DTS and PTS. Also make sure to transfer the
DISCONT flag properly.

4 years agoh264parse: Don't add latency when not needed
Nicolas Dufresne [Fri, 28 Sep 2018 02:10:14 +0000 (22:10 -0400)]
h264parse: Don't add latency when not needed

We no longer add latency when doing AU->AU, AU->NAL and NAL->NAL
parsing.

4 years agoh264parse: Propagate MARKER flag
Nicolas Dufresne [Fri, 28 Sep 2018 20:49:52 +0000 (16:49 -0400)]
h264parse: Propagate MARKER flag

4 years agoh264parse: Don't wait for next NAL if input is aligned
Nicolas Dufresne [Tue, 25 Sep 2018 20:10:13 +0000 (16:10 -0400)]
h264parse: Don't wait for next NAL if input is aligned

Waiting for the next NAL increases the latency. If alignment=nal/au
has been negotiated, assumes that the buffer contains a complete
NAL and don't expect a second start-code. This way, nal -> nal,
au -> au and au -> nal no longer introduce latency.

As a side effect, the collect_pad() function was not able to poke at the
following NAL. This call is now moved before processing the NAL, so
it's looking at the current NAL before it's ingested into the parser
state in order to dermin if the end of an AU has been reached. The AUD
injection state as been adapted to support this.

This change will break pipelines if alignment=nal is used without respecting the
alignment. Effectively, the parser will no longer fix the broken aligment
which will result in parser error and the termination of the pipeline. Such
issue existed in tsdemux element and might exist in any forks of that code.

Related to https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1193

4 years agoh264parse: Set PTS/DTS and DISCONT on crafted NAL
Nicolas Dufresne [Tue, 25 Sep 2018 20:16:42 +0000 (16:16 -0400)]
h264parse: Set PTS/DTS and DISCONT on crafted NAL

When we inject a NAL in the bitstream before another one, make
sure to pass both DTS and PTS. Also make sure to transfer the
DISCONT flag properly.

4 years agoh264parse: Remove no-op assignment
Nicolas Dufresne [Tue, 25 Sep 2018 20:11:03 +0000 (16:11 -0400)]
h264parse: Remove no-op assignment

upstream was set to *out_ts, setting *out_ts to upstream here will
have no effect.

4 years agompegtsmux: Chain up pad dispose function to the one of the parent class
Sebastian Dröge [Mon, 13 Apr 2020 15:18:45 +0000 (18:18 +0300)]
mpegtsmux: Chain up pad dispose function to the one of the parent class

Otherwise we will leak various memory.

4 years agompegtsmux: Properly release requests pads by chaining up to aggregators function
Sebastian Dröge [Mon, 13 Apr 2020 15:04:19 +0000 (18:04 +0300)]
mpegtsmux: Properly release requests pads by chaining up to aggregators function

4 years agotsmux: Ability for streams to disappear and reappear
Vivia Nikolaidou [Fri, 10 Apr 2020 16:54:31 +0000 (19:54 +0300)]
tsmux: Ability for streams to disappear and reappear

Until now, any streams in tsmux had to be present when the element
started its first buffer. Now they can appear at any point during the
stream, or even disappear and reappear later using the same PID.

4 years agosrt: Accumulate total bytes sent/received over all connections/callers
Jan Alexander Steffens (heftig) [Wed, 18 Mar 2020 16:58:52 +0000 (17:58 +0100)]
srt: Accumulate total bytes sent/received over all connections/callers

So we don't lose them. Split gst_srt_object_open_internal for internal
reconnections that don't reset the accumulated bytes.

4 years agosrt: Fix type of bytes-received-lost
Jan Alexander Steffens (heftig) [Mon, 23 Mar 2020 15:38:58 +0000 (16:38 +0100)]
srt: Fix type of bytes-received-lost

The field is a uint64_t.

4 years agosrt: Remove use of closures for signal emission
Jan Alexander Steffens (heftig) [Wed, 18 Mar 2020 17:06:59 +0000 (18:06 +0100)]
srt: Remove use of closures for signal emission

It seems overly complicated.

4 years agosrt: Clean up locking
Jan Alexander Steffens (heftig) [Wed, 18 Mar 2020 16:55:38 +0000 (17:55 +0100)]
srt: Clean up locking

Use GST_OBJECT_LOCK (srtobject->element) to protect only the fields
involved in property access.

Introduce a new mutex srtobject->sock_lock to go with
srtobject->sock_cond and protect the list of callers from concurrent
access.

4 years agosrt: Remove trailing whitespace
Jan Alexander Steffens (heftig) [Wed, 18 Mar 2020 16:54:29 +0000 (17:54 +0100)]
srt: Remove trailing whitespace

4 years agompegtsdemux: Don't pretend doing NAL alignment
Nicolas Dufresne [Wed, 10 Oct 2018 18:36:57 +0000 (18:36 +0000)]
mpegtsdemux: Don't pretend doing NAL alignment

Per specification in 2.14.2 "For PES packetization, no specific data
alignment constraints apply". So we should not advertise NAL
alignment.

This bug was introduced at the same moment the alignment field was introduced
10 years ago. The plan was that alignment=none (or no alignment field) was to
be used for mpegtsdemux, but no one noticed the error. The reason is that at
the same moment, everything dealing with H264 started defaulting to AU
alignment.

https://bugzilla.gnome.org/show_bug.cgi?id=606662#c22

This patch will have a side effect that a parser is now needed after the
tsdemux element. The following pipeline will not negotiate anymore as the
mpegtsmux element requires alignment={nal,au}.

  ... ! tsdemux ! mpegtsmux ! ...

As a side effect, anyone that forked from tsdemux should updated their code to
fix this bug.

4 years agoh264parse: Remove useless comparison
Seungha Yang [Mon, 13 Apr 2020 11:36:50 +0000 (20:36 +0900)]
h264parse: Remove useless comparison

sei_pic_struct is unsigned and GST_H264_SEI_PIC_STRUCT_FRAME is zero.

CID: 1461467

4 years agoh265parser: Fix some coverity issues
Seungha Yang [Mon, 13 Apr 2020 11:31:14 +0000 (20:31 +0900)]
h265parser: Fix some coverity issues

- Remove useless comparison
- Fix invalid memory access

CID: 1461477, 1461476, 1461475, 1461474, 1461279

4 years agowpe: Add support for SHM without requiring EGLDisplay
Philippe Normand [Fri, 3 Apr 2020 14:45:02 +0000 (15:45 +0100)]
wpe: Add support for SHM without requiring EGLDisplay

The previous version of the SHM export support still required a valid
EGLDisplay. The upcoming WPEBackend-FDO 1.8.x aims to remove this requirement,
hence allowing wpesrc to be used without GPU.

4 years agosrtobject: fix mutex lock target
J. Kim [Mon, 13 Apr 2020 06:21:48 +0000 (15:21 +0900)]
srtobject: fix mutex lock target

GstSRTObject is a structure that has an actual GstElement
which is extended to srt{src,sink}.

4 years agov4l2codecs: fix v4l2codecdevice get type
Víctor Manuel Jáquez Leal [Fri, 10 Apr 2020 19:03:04 +0000 (21:03 +0200)]
v4l2codecs: fix v4l2codecdevice get type

Currently the GType of v4l2codecdevice is hardcoded to zero, but it
rather should be delivered by the GType system.

4 years agogstmsdkdec: fix logical operation that misses parenthesis
Jordan Petridis [Fri, 10 Apr 2020 15:22:21 +0000 (18:22 +0300)]
gstmsdkdec: fix logical operation that misses parenthesis

in C, & is weaker than the ! operator and clang is giving the following
error about it.

```
../subprojects/gst-plugins-bad/sys/msdk/gstmsdkdec.c:731:7: error: logical not is only applied to the left hand side of this bitwise operator [-Werror,-Wlogical-not-parentheses]
  if (!gst_msdk_context_get_job_type (thiz->context) & GST_MSDK_JOB_DECODER) {
      ^                                              ~
../subprojects/gst-plugins-bad/sys/msdk/gstmsdkdec.c:731:7: note: add parentheses after the '!' to evaluate the bitwise operator first
  if (!gst_msdk_context_get_job_type (thiz->context) & GST_MSDK_JOB_DECODER) {
      ^
       (                                                                   )
../subprojects/gst-plugins-bad/sys/msdk/gstmsdkdec.c:731:7: note: add parentheses around left hand side expression to silence this warning
  if (!gst_msdk_context_get_job_type (thiz->context) & GST_MSDK_JOB_DECODER) {
      ^
      (                                             )
1 error generated.
```

4 years agocodecs: Add minimal state validation
Seungha Yang [Mon, 23 Mar 2020 05:40:52 +0000 (14:40 +0900)]
codecs: Add minimal state validation

... to prevent requesting decoding before the preparation.
For instance, baseclass should not request decoding a picture if there
is no parsed valid headers, since subclass is most likely
not ready to decoding it.

4 years agoh265parser: Add APIs to allow update VPS/SPS/PPS
Seungha Yang [Mon, 30 Mar 2020 06:42:35 +0000 (15:42 +0900)]
h265parser: Add APIs to allow update VPS/SPS/PPS

gst_h265_parser_parse_{vps,sps,pps} APIs were used to parse VPS/SPS/PPS and
also in order to update parser's internal state at once. Meanwhile
gst_h265_parse_{vps,sps,pps} APIs are to parse VPS/SPS/PPS without state update.
This commit introduces new APIs so that only accepted VPS/SPS/PPS by user
can be updated to be used by parser.

4 years agoh264parser: Add APIs to allow update SPS/PPS
Seungha Yang [Mon, 30 Mar 2020 06:27:40 +0000 (15:27 +0900)]
h264parser: Add APIs to allow update SPS/PPS

gst_h264_parser_parse_{sps,pps} APIs were used to parse SPS/PPS and
also in order to update parser's internal state at once. Meanwhile
gst_h264_parse_{sps,pps} APIs are to parse SPS/PPS without state update.
This commit introduces new APIs so that only accepted SPS/PPS by user
can be updated to be used by parser.

4 years agomeson: kmssink: Allow fallback only on linux
Seungha Yang [Thu, 9 Apr 2020 14:12:25 +0000 (23:12 +0900)]
meson: kmssink: Allow fallback only on linux

Otherwise fallback will waste meson configure time on non-linux

4 years agosrtp: Added support for BYE packet
Zeid Bekli [Tue, 7 Apr 2020 23:22:07 +0000 (01:22 +0200)]
srtp: Added support for BYE packet

SRTCP can't get SSRC from BYE packet, this will make srtpdec element
to drop the package. Adding support to get the SSRC from BYE packets.

4 years agonvdec: Don't hardcode DPB size
Seungha Yang [Thu, 9 Apr 2020 07:12:58 +0000 (16:12 +0900)]
nvdec: Don't hardcode DPB size

Too many decode surface would waste GPU memory. Also it seems to be
introducing additional latency depending on stream. Since nvcodec
sdk version 9.0, CUVID parser API has been providing the minimum
required number of surface. By using it, we can save GPU memory
and reduce possible latency.

4 years agov4l2codecs: Fix FD leak during device enumeration
Nicolas Dufresne [Wed, 8 Apr 2020 18:21:30 +0000 (14:21 -0400)]
v4l2codecs: Fix FD leak during device enumeration

This was revealed by Coverity.

CID 1461248

4 years agodash: fix VARARGS coverity error
Stéphane Cerveau [Tue, 7 Apr 2020 17:28:27 +0000 (19:28 +0200)]
dash: fix VARARGS coverity error

va_end was not called in every code path due to
g_return_val_if_fail.

API usage errors  (VARARGS)
va_end was not called for "myargs".

CID: 1461294

4 years agoMeson: Change extra-checks to feature option and make it yielding
Xavier Claessens [Wed, 8 Apr 2020 16:10:21 +0000 (12:10 -0400)]
Meson: Change extra-checks to feature option and make it yielding

4 years agoh264parse: Fix content light level value changes
Nicolas Dufresne [Wed, 8 Apr 2020 18:00:48 +0000 (14:00 -0400)]
h264parse: Fix content light level value changes

Same as for H265, was found by Coverity.

4 years agoh265parse: Fix content light level value changes
Nicolas Dufresne [Tue, 7 Apr 2020 21:04:30 +0000 (17:04 -0400)]
h265parse: Fix content light level value changes

The comparision was not testing anything meaninful. This fixes the comparision
so we now update the caps whenever the value differ. This was detected by
coverity.

CID 1461291

4 years agortmp2: Avoid a deadlock when getting stats
Jan Alexander Steffens (heftig) [Wed, 8 Apr 2020 16:39:06 +0000 (18:39 +0200)]
rtmp2: Avoid a deadlock when getting stats

We need to do this without holding the lock as the `g_async_queue_pop`
waits on the loop thread to deliver the stats. The loop thread might
attempt to take the lock as well, leading to a deadlock.

Taking a reference to the connection should be enough to keep this
safe.

4 years agoh264parse: Add support for inband timecode update
Seungha Yang [Wed, 8 Apr 2020 06:37:03 +0000 (15:37 +0900)]
h264parse: Add support for inband timecode update

Add new property "update-timecode" to allow updating timecode
in picture timing SEI depending on timecode meta. Since the picture
timing SEI message requires proper VUI setting but we don't support
re-writing SPS, this might not work for some streams

4 years agoh264parse: Don't unconditionally append timecode meta
Seungha Yang [Wed, 8 Apr 2020 08:07:36 +0000 (17:07 +0900)]
h264parse: Don't unconditionally append timecode meta

If upstream buffer has its own timecode metatdata, don't append
new timecode meta into the buffer.

4 years agoh264parser: Parse all SEI payload type even if it's not handled by parser
Seungha Yang [Wed, 8 Apr 2020 07:24:06 +0000 (16:24 +0900)]
h264parser: Parse all SEI payload type even if it's not handled by parser

... so that user can handle it from outside of parser API

4 years agoh264parser: Add support for creating picture timing SEI
Seungha Yang [Tue, 7 Apr 2020 11:26:23 +0000 (20:26 +0900)]
h264parser: Add support for creating picture timing SEI

This new method can make it possible to inject timecode meta into
h264 bitstream

4 years agotests: h264parser: Fix picture timing SEI
Seungha Yang [Tue, 7 Apr 2020 13:30:55 +0000 (22:30 +0900)]
tests: h264parser: Fix picture timing SEI

The payloadSize don't need to include rbsp_trailing_bits()

4 years agoh264parser: Make GstH264PicTiming self-containing all the syntax information
Seungha Yang [Tue, 7 Apr 2020 10:32:29 +0000 (19:32 +0900)]
h264parser: Make GstH264PicTiming self-containing all the syntax information

... and store all parsed values.

We are storing pic_struct_present_flag although it's not part of
this SEI message but GstH264PicTiming includes it to clarify
following syntax values.
In addition to that, by adding CpbDpbDelaysPresentFlag, we don't need to
refer to VUI anymore.

4 years agoh264parser: Fix some misleading debug messages
Seungha Yang [Tue, 7 Apr 2020 12:17:30 +0000 (21:17 +0900)]
h264parser: Fix some misleading debug messages

4 years agoh264parser: Fix mismatched argument of declaration and definition
Seungha Yang [Tue, 7 Apr 2020 00:17:15 +0000 (09:17 +0900)]
h264parser: Fix mismatched argument of declaration and definition

4 years agosdpdemux: don't send EOS for unknown SSRC
Michael Olbrich [Mon, 6 Apr 2020 08:25:37 +0000 (10:25 +0200)]
sdpdemux: don't send EOS for unknown SSRC

The rtpbin sends signals for all SSRCs. Don't send an EOS when the SSRC
does not match the stream SSRC.

This avoids problems when an SSRC from another receiver times out.

4 years agocodecs: Add basic documentation stubs
Thibault Saunier [Wed, 8 Apr 2020 12:47:37 +0000 (08:47 -0400)]
codecs: Add basic documentation stubs

4 years agov4l2decoder: Fix file descriptor leak
Nicolas Dufresne [Tue, 7 Apr 2020 21:10:08 +0000 (17:10 -0400)]
v4l2decoder: Fix file descriptor leak

A copy paste error was leading to file descriptor leak. This was detected by
Coverity.

CID 1461285

4 years agofakevideosink: Allow allocation meta flags fine-tuning
Philippe Normand [Mon, 6 Apr 2020 15:40:38 +0000 (16:40 +0100)]
fakevideosink: Allow allocation meta flags fine-tuning

In some scenarios the fakevideosink shouldn't advertize the overlay-composition
meta for instance, so that overlay elements perform subtitles blending
themselves.

4 years agompegtspacketizer: be more tolerant when parsing the adaptation field
Michael Olbrich [Mon, 6 Apr 2020 08:19:23 +0000 (10:19 +0200)]
mpegtspacketizer: be more tolerant when parsing the adaptation field

According to the specification, the adaptation field length must be 183 if
there is no payload data and < 183 if the packet contains an adaptation
field and payload data.

Unfortunately some payloaders always set the flag for payload data, even if
the adaptation field length is 183.

Don't return with an error in this case. Clear the payload data flag
instead and parse the adaptation field as usual. This avoids visual
artefacts for such streams.

4 years agocodecs: h264: Fix DPB size calculation
Nicolas Dufresne [Mon, 6 Apr 2020 19:06:01 +0000 (15:06 -0400)]
codecs: h264: Fix DPB size calculation

As per specification in A.3.1 h) and A.3.2 f), the maximum size of the DPB is
16. Fix the maximum in the fine and fix the formula to use MIN instead of MAX
so that we no longer always use the maximum for the profile/level.

4 years agomsdkvp9dec: add support for VP9 12bit
Haihao Xiang [Wed, 1 Apr 2020 04:33:38 +0000 (12:33 +0800)]
msdkvp9dec: add support for VP9 12bit

The output formats are P012_LE for 12bit 420 and Y412_LE for 12bit 444.

4 years agomeson: build with neon 0.31
worldofpeace [Fri, 3 Apr 2020 22:50:16 +0000 (18:50 -0400)]
meson: build with neon 0.31

No API/ABI changes https://github.com/notroj/neon/blob/0.31.0/NEWS#L3

4 years agomeson: Don't use get_option('buildtype')
Nirbheek Chauhan [Fri, 3 Apr 2020 11:37:47 +0000 (17:07 +0530)]
meson: Don't use get_option('buildtype')

We should directly check the values of the `debug` and `optimization`
options instead.

`get_option('buildtype')` will return `'custom'` for most combinations
of `-Doptimization` and `-Ddebug`, but those two will always be set
correctly if only `-Dbuildtype` is set. So we should look at those
options directly.

For the two-way mapping between `buildtype` and `optimization`
+ `debug`, see this table:
https://mesonbuild.com/Builtin-options.html#build-type-options

4 years agokms: add fallback on libdrm project if available.
Stéphane Cerveau [Mon, 23 Mar 2020 11:56:46 +0000 (12:56 +0100)]
kms: add fallback on libdrm project if available.

4 years agomsdkh265dec: add support for main-444-12, main-444-12-intra profiles
Haihao Xiang [Thu, 12 Mar 2020 05:28:59 +0000 (13:28 +0800)]
msdkh265dec: add support for main-444-12, main-444-12-intra profiles

The video format is Y412_LE

4 years agomsdk: map Y412_LE to VA_FOURCC_Y416
Haihao Xiang [Thu, 12 Mar 2020 05:21:02 +0000 (13:21 +0800)]
msdk: map Y412_LE to VA_FOURCC_Y416

In media driver, VA_FOURCC_Y416 is used for packed 12 bits 4:4:4:4 YUV
format, the corresponding RT format is VA_RT_FORMAT_YUV442_12

4 years agomsdk: map MFX_FOURCC_Y416 to VA_FOURCC_Y416
Haihao Xiang [Thu, 12 Mar 2020 05:12:33 +0000 (13:12 +0800)]
msdk: map MFX_FOURCC_Y416 to VA_FOURCC_Y416

Y416 is used for packed 12 bits 4:4:4:4 YUV format in media driver, the
RT format is VA_RT_FORMAT_YUV444_12

4 years agomsdk: map Y412_LE to MFX_FOURCC_Y416
Haihao Xiang [Thu, 12 Mar 2020 04:58:40 +0000 (12:58 +0800)]
msdk: map Y412_LE to MFX_FOURCC_Y416

MFX_FOURCC_Y416 is used for packed 12 bits 4:4:4:4 YUV format in
MediaSDK

4 years agomsdkh265dec: add support for main-422-12, main-422-12-intra profiles
Haihao Xiang [Wed, 11 Mar 2020 06:55:33 +0000 (14:55 +0800)]
msdkh265dec: add support for main-422-12, main-422-12-intra profiles

The video format is Y212_LE

4 years agomsdk: map Y212_LE to VA_FOURCC_Y216
Haihao Xiang [Wed, 11 Mar 2020 06:35:55 +0000 (14:35 +0800)]
msdk: map Y212_LE to VA_FOURCC_Y216

In media driver, VA_FOURCC_Y216 is used for packed 12 bits 4:2:2 YUV
format, the corresponding RT format is VA_RT_FORMAT_YUV422_12

4 years agomsdk: map MFX_FOURCC_Y216 to VA_FOURCC_Y216
Haihao Xiang [Wed, 11 Mar 2020 06:09:11 +0000 (14:09 +0800)]
msdk: map MFX_FOURCC_Y216 to VA_FOURCC_Y216

In media driver, Y216 is used for packed 12 bits 4:2:2 format YUV
format, so the RT format is VA_RT_FORMAT_YUV422_12.

4 years agomsdk: map Y212_LE to MFX_FOURCC_Y216
Haihao Xiang [Wed, 11 Mar 2020 05:54:42 +0000 (13:54 +0800)]
msdk: map Y212_LE to MFX_FOURCC_Y216

MFX_FOURCC_Y216 is used for packed 12 bits 422 YUV format in MediaSDK

4 years agomsdkh265enc: Fix for wrong parser free function
Seungha Yang [Thu, 2 Apr 2020 15:42:23 +0000 (00:42 +0900)]
msdkh265enc: Fix for wrong parser free function

4 years agoadaptivedemux: Handle instant rate change requests directly
Jan Schmidt [Wed, 18 Mar 2020 01:30:51 +0000 (12:30 +1100)]
adaptivedemux: Handle instant rate change requests directly

Downstream demuxers will first send seek events upstream to us.
Do the right thing with instant rate change requests by handling them
immediately.

4 years agoadaptivedemux: Don't ignore gst_segment_do_seek() return result
Jan Schmidt [Tue, 17 Mar 2020 08:31:22 +0000 (19:31 +1100)]
adaptivedemux: Don't ignore gst_segment_do_seek() return result

gst_segment_do_seek() can fail, so don't ignore the return result

4 years agotsdemux: Send instant-rate-change event if requested in the SEEK event
Jan Schmidt [Thu, 29 Nov 2018 18:18:42 +0000 (05:18 +1100)]
tsdemux: Send instant-rate-change event if requested in the SEEK event

Convert instant-rate-change seek events into a downstream
instant-rate-change event and skip any further local seek handling.

4 years agomsdkh264enc: Configure parser and SEI array only if it's required
Seungha Yang [Tue, 31 Mar 2020 11:51:15 +0000 (20:51 +0900)]
msdkh264enc: Configure parser and SEI array only if it's required

4 years agomsdkh265enc: Add support for CEA708 closed caption insertion
Seungha Yang [Tue, 31 Mar 2020 06:25:47 +0000 (15:25 +0900)]
msdkh265enc: Add support for CEA708 closed caption insertion

Functionally identical to that of msdkh264enc

4 years agoh265parser: Add a helper method to create SEI nal unit
Seungha Yang [Thu, 19 Mar 2020 09:25:18 +0000 (18:25 +0900)]
h265parser: Add a helper method to create SEI nal unit

Add an API to create raw SEI nal unit. This would be useful in case
an user want to create SEI nal data and inject the SEI nal data
into bitstream.

4 years agosrtpdec: reduce log level for replay cases
Miguel Paris [Wed, 1 Apr 2020 17:43:51 +0000 (19:43 +0200)]
srtpdec: reduce log level for replay cases

These are normal cases, so DEBUG level is enough.

4 years agosrtpdec: do not warning old replay errors
Miguel París Díaz [Tue, 11 Apr 2017 10:41:11 +0000 (12:41 +0200)]
srtpdec: do not warning old replay errors

Reordered packets producing decrypting errors are very normal,
so we should filter which errors are warning and which not.

4 years agosrtpdec: fix reseting RTP sequence number on ROC changes
Miguel Paris [Tue, 29 May 2018 13:00:43 +0000 (15:00 +0200)]
srtpdec: fix reseting RTP sequence number on ROC changes

Each srtp_stream_t is tied to an specific SSRC, so a
roc_changed flag should be kept per each SSRC in order to
properly reset RTP sequence number on ROC changes.

4 years agod3d11: Update for video-hdr struct change
Seungha Yang [Fri, 13 Mar 2020 07:50:16 +0000 (16:50 +0900)]
d3d11: Update for video-hdr struct change

See the change of -base https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/594

4 years agonvh265enc: Update for video-hdr struct change
Seungha Yang [Fri, 13 Mar 2020 07:45:12 +0000 (16:45 +0900)]
nvh265enc: Update for video-hdr struct change

See the change of -base https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/594

4 years agox265enc: Update for video-hdr struct change
Seungha Yang [Fri, 13 Mar 2020 07:34:01 +0000 (16:34 +0900)]
x265enc: Update for video-hdr struct change

See the change of -base https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/594

4 years agoh264parse,h265parse: Update for video-hdr struct change
Seungha Yang [Fri, 13 Mar 2020 07:17:07 +0000 (16:17 +0900)]
h264parse,h265parse: Update for video-hdr struct change

See the change of -base https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/594