platform/upstream/gstreamer.git
4 years agoclockselect: Add TAI clock support
Ederson de Souza [Fri, 13 Dec 2019 19:28:08 +0000 (11:28 -0800)]
clockselect: Add TAI clock support

Via new value for property clock-id, "tai", it's possible to use
GST_CLOCK_TYPE_TAI as pipeline clock.

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

4 years agoclockselect: Remove non-sense comment
Ederson de Souza [Mon, 27 Jan 2020 23:16:12 +0000 (15:16 -0800)]
clockselect: Remove non-sense comment

Commentary appears to assume `gst_harness_find_element` return value was
"transfer none", but it is not the case. So, element must be unrefed
before the end.

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

4 years agoUpdate gstsrtobject.c
krivoguzovVlad [Thu, 23 Jan 2020 15:57:34 +0000 (15:57 +0000)]
Update gstsrtobject.c

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

4 years agoristrtpdeext: Expose the largest sequence number received
Olivier Crête [Tue, 30 Jul 2019 21:09:55 +0000 (17:09 -0400)]
ristrtpdeext: Expose the largest sequence number received

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

4 years agoristrtpdeext: Update RTP header extension packet to latest spec
Olivier Crête [Wed, 18 Mar 2020 21:34:47 +0000 (17:34 -0400)]
ristrtpdeext: Update RTP header extension packet to latest spec

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

4 years agoristrtpext: Update RTP header extension packet to latest spec
Olivier Crête [Wed, 18 Mar 2020 21:14:14 +0000 (17:14 -0400)]
ristrtpext: Update RTP header extension packet to latest spec

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

4 years agorist: Document main profile support
Olivier Crête [Wed, 31 Jul 2019 16:01:07 +0000 (12:01 -0400)]
rist: Document main profile support

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

4 years agoristsrc: Add ristrtpdeext to the pipeline
Olivier Crête [Mon, 29 Jul 2019 21:53:21 +0000 (17:53 -0400)]
ristsrc: Add ristrtpdeext to the pipeline

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

4 years agoristsink: Add ristrtpext to sink
Olivier Crête [Mon, 29 Jul 2019 17:58:37 +0000 (13:58 -0400)]
ristsink: Add ristrtpext to sink

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

4 years agoristsink: Receive RIST seqnum ext and feed it to rtxsend
Olivier Crête [Fri, 26 Jul 2019 21:57:40 +0000 (17:57 -0400)]
ristsink: Receive RIST seqnum ext and feed it to rtxsend

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

4 years agoristsink: Pass the session id to the on-app-rtcp callback
Olivier Crête [Fri, 26 Jul 2019 21:43:57 +0000 (17:43 -0400)]
ristsink: Pass the session id to the on-app-rtcp callback

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

4 years agoristrtxsend: Use externally given seqnum extension when available
Olivier Crête [Fri, 26 Jul 2019 21:14:14 +0000 (17:14 -0400)]
ristrtxsend: Use externally given seqnum extension when available

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

4 years agoristrtxsend: Store sent packets with extended seqnum
Olivier Crête [Fri, 26 Jul 2019 20:50:21 +0000 (16:50 -0400)]
ristrtxsend: Store sent packets with extended seqnum

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

4 years agorist: Factor our seqnum extension code
Olivier Crête [Fri, 26 Jul 2019 20:49:51 +0000 (16:49 -0400)]
rist: Factor our seqnum extension code

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

4 years agorist: Add test for rtp ext code
Olivier Crête [Wed, 24 Jul 2019 21:32:07 +0000 (17:32 -0400)]
rist: Add test for rtp ext code

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

4 years agorist: Drop packets that are more than G_MAXINT16 seqnum late
Olivier Crête [Tue, 23 Jul 2019 21:27:06 +0000 (17:27 -0400)]
rist: Drop packets that are more than G_MAXINT16 seqnum late

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

4 years agorist: Insert RTP seqnum extension header
Olivier Crête [Tue, 23 Jul 2019 21:26:16 +0000 (17:26 -0400)]
rist: Insert RTP seqnum extension header

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

4 years agorist: Add element to remove the header extension
Olivier Crête [Fri, 12 Jul 2019 15:43:26 +0000 (11:43 -0400)]
rist: Add element to remove the header extension

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

4 years agorist: Add element that inserts the RTP header extension
Olivier Crête [Thu, 11 Jul 2019 22:53:00 +0000 (18:53 -0400)]
rist: Add element that inserts the RTP header extension

Currently can suppress the TS null packets, but can't insert
the seqnum extension yet.

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

4 years agoh264decoder: Allow frame gap even if it's not allowed by SPS
Seungha Yang [Thu, 30 Apr 2020 16:51:10 +0000 (01:51 +0900)]
h264decoder: Allow frame gap even if it's not allowed by SPS

It's most likely the case where some frames were dropped for some reason
(e.g., broken stream, network loss or so). However, decoder might be able to
decode following frames even if some frames are visually broken.

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

4 years agowebrtcbin: only start gathering on local descriptions
Matthew Waters [Wed, 29 Apr 2020 12:01:32 +0000 (22:01 +1000)]
webrtcbin: only start gathering on local descriptions

If we are in a state where we are answering, we would start gathering
when the offer is set which is incorrect for at least two reasons.

1. Sending ICE candidates before sending an answer is a hard error in
   all of the major browsers and will fail the negotiation.
2. If libnice ever adds the username fragment to the candidate for
   ice-restart hardening, the ice username and fragment would be
   incorrect.

JSEP also hints that the right call flow is to only start gathering when
a local description is set in 4.1.9 setLocalDescription

"This API indirectly controls the candidate gathering process."

as well as hints throughout other sections.

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

4 years agowebrtc: Correct symbol visibility to fix build warning on Windows
Seungha Yang [Wed, 29 Apr 2020 10:42:05 +0000 (19:42 +0900)]
webrtc: Correct symbol visibility to fix build warning on Windows

GstWebRTCDataChannel is fully internal of plugin

webrtcdatachannel.c(50): warning C4273: 'gst_webrtc_data_channel_get_type': inconsistent dll linkage

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

4 years agolv2: Namespace global variables and explicitly make them private
Thibault Saunier [Wed, 29 Apr 2020 19:12:36 +0000 (15:12 -0400)]
lv2: Namespace global variables and explicitly make them private

And fix a LV2_PORT_GROUPS__rearLeft/LV2_PORT_GROUPS__rearRight typo

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

4 years agolv2: Make it build with -fno-common
Debarshi Ray [Fri, 20 Mar 2020 14:49:06 +0000 (15:49 +0100)]
lv2: Make it build with -fno-common

GCC 10 defaults to -fno-common. This means that global variables shared
across multiple translation units should be declared as 'extern' in
header files and defined in exactly one C file. See:
https://gcc.gnu.org/gcc-10/porting_to.html

https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1125

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

4 years agod3d11h264dec: Rearrange the order of supported profiles in caps
Seungha Yang [Wed, 29 Apr 2020 17:41:07 +0000 (02:41 +0900)]
d3d11h264dec: Rearrange the order of supported profiles in caps

constrained-baseline profile is much preferred than baseline.

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

4 years agonvh264sldec: Allow constrained-baseline and baseline profiles
Seungha Yang [Wed, 29 Apr 2020 17:25:35 +0000 (02:25 +0900)]
nvh264sldec: Allow constrained-baseline and baseline profiles

Like d3d11h264dec, we need to relax the condition for profiles of nvh264sldec

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

4 years agod3d11h264dec: Add constrained-baseline and baseline profile
Seungha Yang [Thu, 23 Apr 2020 14:25:21 +0000 (23:25 +0900)]
d3d11h264dec: Add constrained-baseline and baseline profile

Both profiles are expected to be supported profile by DXVA hardware

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

4 years agov4l2codecs: Factor out plugin registration
Nicolas Dufresne [Tue, 28 Apr 2020 00:26:54 +0000 (20:26 -0400)]
v4l2codecs: Factor out plugin registration

This introduce a common place for generic functions and factor out the plugin
registration code. This code is nearly identical between implementation.

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

4 years agov4l2decoder: Relax width/height return value check
Nicolas Dufresne [Tue, 28 Apr 2020 00:18:52 +0000 (20:18 -0400)]
v4l2decoder: Relax width/height return value check

The driver adjust the width/height to coded size. This was not an issue for
H264, as the coded size is in the bitstream, but is an issue with VP8.

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

4 years agov4l2codecs: Add VP8 decoder
Nicolas Dufresne [Fri, 24 Apr 2020 20:15:25 +0000 (16:15 -0400)]
v4l2codecs: Add VP8 decoder

This is derived from the H264 decoder, some boiler plate will be factored out
in the following commits.

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

4 years agomfvideosrc: add GRAY16_LE format support
Joshua M. Doe [Tue, 28 Apr 2020 18:55:00 +0000 (14:55 -0400)]
mfvideosrc: add GRAY16_LE format support

FOURCC "Y16 " is used by FLIR Boson USB Video Class (UVC) camera

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

4 years agod3d11device: Add fallback for device creation
Seungha Yang [Sun, 26 Apr 2020 13:37:12 +0000 (22:37 +0900)]
d3d11device: Add fallback for device creation

D3D11_CREATE_DEVICE_DEBUG flag will be used while creating d3d11 device
to activate debug layer. However, if system doesn't support the
debug layer for some reason, we should try to create d3d11 device
without the flag. Debug layer should be optional for device creation.

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

4 years agotests: mfvideosrc: Add unit test
Seungha Yang [Tue, 28 Apr 2020 10:58:53 +0000 (19:58 +0900)]
tests: mfvideosrc: Add unit test

Simple test for reuse scenario

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

4 years agomediafoundation: Disable querying supprted maximum resolution
Seungha Yang [Tue, 21 Apr 2020 11:49:38 +0000 (20:49 +0900)]
mediafoundation: Disable querying supprted maximum resolution

Initializing MFT for checking supported maximum resolution is too
slow.

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

4 years agomediafoundation: Add h265 encoder
Seungha Yang [Tue, 7 Jan 2020 08:12:17 +0000 (17:12 +0900)]
mediafoundation: Add h265 encoder

Add Media Foundation HEVC encoder

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

4 years agomediafoundation: Add h264 encoder
Seungha Yang [Tue, 7 Jan 2020 08:45:22 +0000 (17:45 +0900)]
mediafoundation: Add h264 encoder

Add Media Foundation h264 encoder. If hardware encoders are available
on system, they will have higher rank than software encoder.

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

4 years agomediafoundation: Introduce Microsoft Media Foundation plugin
Seungha Yang [Mon, 7 Oct 2019 12:49:26 +0000 (21:49 +0900)]
mediafoundation: Introduce Microsoft Media Foundation plugin

The Microsoft Media Foundation (MF) is the successor of DirectShow.
This commit includes two kinds of video capture implementation,
one uses IMFSourceReader interface which is available since Windows Vista
and the other is based on IMFCaptureEngine interface which is available
since Windows 8.
Note that this new video source element cannot be used in UWP app
for now, since device activation using those APIs are not allowed by MS.

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

4 years agotest: h265parser: Add check for high throughput scc.
He Junyan [Sun, 12 Apr 2020 15:52:28 +0000 (23:52 +0800)]
test: h265parser: Add check for high throughput scc.

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

4 years agolibs: h265parser: Add High throughput scc extensions profiles' IDC.
He Junyan [Sun, 12 Apr 2020 15:39:07 +0000 (23:39 +0800)]
libs: h265parser: Add High throughput scc extensions profiles' IDC.

It is compitable with scc and we use scc's function to identify it.

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

4 years agotest: h265parser: Add more check or h265 extensions.
He Junyan [Sun, 12 Apr 2020 14:21:01 +0000 (22:21 +0800)]
test: h265parser: Add more check or h265 extensions.

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

4 years agolibs: h265parser: select extension profile by profile idc.
He Junyan [Sat, 11 Apr 2020 08:39:03 +0000 (16:39 +0800)]
libs: h265parser: select extension profile by profile idc.

the old manner does not consider the profile idc. The profile idc should
play an more important role in recognizing the profile than the other
information. And there is no need to mix profiles of different extensions
together to find the closest profile when the bits stream is not standard,
different extensions support different features and should not be mixed.

The correct way should be recognize the extension category by profile idc
firstly, and then find the closest profile.

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

4 years agolibs: h265parser: rename the FormatRangeExtensionProfile
He Junyan [Thu, 19 Mar 2020 15:50:39 +0000 (23:50 +0800)]
libs: h265parser: rename the FormatRangeExtensionProfile

FormatRangeExtensionProfile declares the common bits used for not
only format range extensions profiles, but also for several different
h265 extension profiles, such as high throughput, screen content
coding extensions, etc. And So the old name is not proper.
We also rename the get_h265_extension_profile function.

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

4 years agolibs: h265parser: Fix a bug for getting extension profile.
He Junyan [Fri, 20 Mar 2020 08:41:16 +0000 (16:41 +0800)]
libs: h265parser: Fix a bug for getting extension profile.

We should use the traget ExtensionProfile's IDC to check the
profile_compatibility_flag, rather than the profile_idc in the
stream. The old profile_compatibility_flag check always return
true. This causes that profiles with same constraint flags but
different profile_idc can't be recognized correctly. For example,
the screen-extended-main-444 profile is always be recognized as
the high-throughput-444 profile.

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

4 years agoh264decoder: Perform low-latency outputting only for live pipeline
Seungha Yang [Fri, 24 Apr 2020 11:56:17 +0000 (20:56 +0900)]
h264decoder: Perform low-latency outputting only for live pipeline

Frequent outputting might drop throughput-wise performance.

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

4 years agoh264decoder: Output decoded pictures as soon as possible
Seungha Yang [Thu, 23 Apr 2020 10:47:09 +0000 (19:47 +0900)]
h264decoder: Output decoded pictures as soon as possible

In case of IDR, any previously decoded pictures must be drained
before the IDR and POC of IDR should be zero. So we can output
IDR immediately. Also, when POC of current picture is expected to be
the next output POC, decoder can output the picture as well
without waiting.

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

4 years agod3d11vp8dec: Remove unused parameters
Nicolas Dufresne [Mon, 27 Apr 2020 21:02:17 +0000 (17:02 -0400)]
d3d11vp8dec: Remove unused parameters

Minor cleanup removing unused picture parameters in two internal functions.

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

4 years agogsth265parser.h: escape link-like syntax in doc
Mathieu Duponchelle [Mon, 27 Apr 2020 22:29:52 +0000 (00:29 +0200)]
gsth265parser.h: escape link-like syntax in doc

4 years agoopenh264: memcmp return value 0 means match
Seppo Yli-Olli [Mon, 27 Apr 2020 08:43:57 +0000 (11:43 +0300)]
openh264: memcmp return value 0 means match
Commit e2aa76db79328b7f61536dd19d0373cf920395ad introduced version
check guard for OpenH264 binary. There was a boolean error in
memcmp so matching OpenH264 was erroneously rejected.
Fixes #1278

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

4 years agocodecs: fix gir generation
Víctor Manuel Jáquez Leal [Sun, 26 Apr 2020 11:47:27 +0000 (13:47 +0200)]
codecs: fix gir generation

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

4 years agonvcodec: Add suppport for environment based primary h264 decoder implementation
Seungha Yang [Wed, 22 Apr 2020 05:57:12 +0000 (14:57 +0900)]
nvcodec: Add suppport for environment based primary h264 decoder implementation

Introduce GST_USE_NV_STATELESS_CODEC environment to allow user to select
primary nvidia decoder implementation. In case the environment
GST_USE_NV_STATELESS_CODEC=h264 was set, old nvidia h264 decoder element
will not be registered. Instead, both nvh264dec and nvh264sldec
factory name will create gstcodecs based new nvidia h264 decoder element.

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

4 years agonvcodec: Add H264 stateless codec implementation
Seungha Yang [Thu, 16 Apr 2020 14:27:31 +0000 (23:27 +0900)]
nvcodec: Add H264 stateless codec implementation

Introduce GstH264Decoder based Nvidia H.264 decoder element.
Similar the element factory name of to v4l2 stateless codec,
this element can be configured with factory name "gstnvh264sldec".
Note that "sl" in the name stands for "stateless"

For now, existing nvh264dec covers more profile and formats
(e.g., interlaced stream) than this implementation.
However, this implementation allows us to control lower level
parameters such as decoded picture buffer management and therefore
we can get a chance to improve performance in terms of latency.

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

4 years agocccombiner: don't drop buffers on video timestamp discontinuities
Mathieu Duponchelle [Wed, 22 Apr 2020 14:53:00 +0000 (16:53 +0200)]
cccombiner: don't drop buffers on video timestamp discontinuities

If we receive video buffers with non-perfect timestamps, the
caption buffers' timestamps might fall in the interval between
the end of one video buffer and the start of the next one.

Make our criteria for dropping that the caption buffer has
a timestamp older than the end of the previous video buffer,
not older than the start of the new one, unless of course
this is the first video buffer.

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

4 years agocccombiner: handle gap buffers adequately
Mathieu Duponchelle [Wed, 22 Apr 2020 14:51:08 +0000 (16:51 +0200)]
cccombiner: handle gap buffers adequately

- Don't try to map them as actual CC data, that was raising
  a critical

- Consume video buffers up to the end of the gap

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

4 years agov4l2slh264dec: Support avc and avc3 formats
Seungha Yang [Thu, 23 Apr 2020 16:56:57 +0000 (01:56 +0900)]
v4l2slh264dec: Support avc and avc3 formats

h264decoder baseclass provides parsed sps/pps (from codec data) for
subclass. Also, since current implementation is putting start code prefix
manually, the format of stream should not be matter for subclass.

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

4 years agospanplc: add 'stats' property
Guillaume Desmottes [Thu, 23 Apr 2020 10:28:41 +0000 (12:28 +0200)]
spanplc: add 'stats' property

Allow users to retrieve the number of samples, and their duration,
generated using PLC.

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

4 years agoHave strict version check for OpenH264 to avoid ABI issues
Seppo Yli-Olli [Tue, 21 Apr 2020 10:33:54 +0000 (13:33 +0300)]
Have strict version check for OpenH264 to avoid ABI issues
This fixes #1274 and no longer trusts soname alone

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

4 years agod3d11decoder: Fix wrong return type from output_picture vfunc
Seungha Yang [Thu, 23 Apr 2020 14:52:24 +0000 (23:52 +0900)]
d3d11decoder: Fix wrong return type from output_picture vfunc

Return type should be GstFlowReturn, not gboolean

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

4 years agocodecs: set sys frame num before new_picture()
Víctor Manuel Jáquez Leal [Thu, 23 Apr 2020 10:00:15 +0000 (12:00 +0200)]
codecs: set sys frame num before new_picture()

Derive classes might need to operate on the current frame at their
new_picture() vmethod, so it would be needed to set system_frame_number
on picture before calling the vmethod.

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

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.