Commit graph

24539 commits

Author SHA1 Message Date
Sebastian Dröge 407f311f2c avwait: Fix clipping of audio buffers at the start of recording 2019-07-12 12:54:02 +03:00
Ting-Wei Lan af360dc641 build: Fix error messages for missing hotdoc extensions 2019-07-10 00:34:18 +08:00
Sebastian Dröge dad6e51165 cccombiner: Proxy POSITION/DURATION/URI/CAPS/ALLOCATION queries between video sinkpad and source pad
We pass-through the video as is, only putting a GstMeta on it from the
caption sinkpad.

This fixes negotation problems caused by not passing through caps
queries in both directions.

Also handle CAPS/ACCEPT_CAPS queries directly for the caption pad
instead of proxying.
2019-07-09 14:11:34 +00:00
Seungha Yang 8862abd7c6 nvdec: Fix possible frame drop on EOS
On eos, baseclass videoencoder call finish() vfunc instead of drain()
2019-07-09 20:52:23 +09:00
Ray Tiley b00f6c4f81 decklinkvideosrc: remove g_print
Causes a lot of output :)
2019-07-09 08:38:18 +00:00
Seungha Yang 6b6bb6b203 vulkan: Fix incompatible type build warning
Make declare/define a function consistent.
Note that GstBaseTransform::set_caps should return gboolean

Compiling C object subprojects/gst-plugins-bad/ext/vulkan/f3f9d6b@@gstvulkan@sha/vkviewconvert.c.obj.
../subprojects/gst-plugins-bad/ext/vulkan/vkviewconvert.c(644):
  warning C4133: '=': incompatible types - from 'GstFlowReturn (__cdecl *)(GstBaseTransform *,GstCaps *,GstCaps *)'
  to 'gboolean (__cdecl *)(GstBaseTransform *,GstCaps *,GstCaps *)'
2019-07-09 01:42:58 +00:00
Olivier Crête 15f2cdd750 srt: Remove msg-size property
Remove the now unused property
2019-07-08 16:00:51 -04:00
Olivier Crête 42fa4cb2ad srtsrc: Receive one frame per gstbuffer
Don't aggregate the received data, just receive it one packet at a
time. So it keeps the packetization boundaries
2019-07-08 16:00:51 -04:00
Nicolas Dufresne 1acd9c726a srt: Fix listener crash if no URI is specified 2019-07-08 13:52:48 -04:00
Nicolas Dufresne b06f7824e1 srt: Use macro instead of duplicating a default value 2019-07-08 13:52:48 -04:00
Nicolas Dufresne e5b6622546 srt: Fix confusing typo in FIXME comment
SRT does not support IPv6, but the comment said IPv4 which was the
opposite of the following code.
2019-07-08 13:52:48 -04:00
Sebastian Dröge 6ea4557271 timecodestamper: Add support for linear timecode (LTC) from an audio stream
Based on a patch by
  Georg Lippitsch <glippitsch@toolsonair.com>
  Vivia Nikolaidou <vivia@toolsonair.com>

Using libltc from https://github.com/x42/libltc
2019-07-08 16:45:12 +00:00
Sebastian Dröge 678064d603 timecodestamper: Rewrite element API and code flow
We now have a single property to select the timecode source that should
be applied, and for each timecode source the timecode is updated at
every frame. Then based on a set mode, the timecode is added to the
frame if none exists already or all existing timecodes are removed and
the timecode is added.

In addition the real-time clock is considered a proper timecode source
now instead of only allowing to initialize once in the beginning with
it, and also instead of just taking the current time we now take the
current time at the clock time of the video frame.
2019-07-08 16:45:12 +00:00
Marc Leeman 489ff8604f nvcodec: do a generic cuda tests before going into version specifics 2019-07-08 10:37:46 +00:00
Seungha Yang c18fda03d9 nvdec,nvenc: Port to dynamic library loading
... and put them into new nvcodec plugin.

* nvcodec plugin
Now each nvenc and nvdec element is moved to be a part of nvcodec plugin
for better interoperability.
Additionally, cuda runtime API header dependencies
(i.e., cuda_runtime_api.h and cuda_gl_interop.h) are removed.
Note that cuda runtime APIs have prefix "cuda". Since 1.16 release with
Windows support, only "cuda.h" and "cudaGL.h" dependent symbols have
been used except for some defined types. However, those types could be
replaced with other types which were defined by "cuda.h".

* dynamic library loading
CUDA library will be opened with g_module_open() instead of build-time linking.
On Windows, nvcuda.dll is installed to system path by CUDA Toolkit
installer, and on *nix, user should ensure that libcuda.so.1 can be
loadable (i.e., via LD_LIBRARY_PATH or default dlopen path)
Therefore, NVIDIA_VIDEO_CODEC_SDK_PATH env build time dependency for Windows
is removed.
2019-07-08 10:37:46 +00:00
Seungha Yang 5c3879ace6 d3d11videosink: Add new Direct3D11 video render plugin
Direct3D11 was shipped as part of Windows7 and it's obviously
primary graphics API on Windows.

This plugin includes HDR10 rendering if following requirements are satisfied
* IDXGISwapChain4::SetHDRMetaData is available (decleared in dxgi1_5.h)
* Display can support DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020 color space
* Upstream provides 10 bitdepth format with smpte-st 2084 static metadata
2019-07-08 08:31:47 +00:00
Sebastian Dröge 329b2d3a6a webrtcbin: Don't assert if an SDP media can't be converted to caps
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/1008
2019-07-08 07:18:41 +00:00
Haihao Xiang f5b1c75d4c msdk: add msdkvp9enc element 2019-07-07 15:16:28 +00:00
Haihao Xiang ba7f3f48c2 msdk: workaround for MFX_FOURCC_VP9_SEGMAP surface
MFX_FOURCC_VP9_SEGMAP surface in MSDK is an internal surface however
MSDK still call the external allocator for this surface, so this plugin
has to return UNSUPPORTED and force MSDK allocates surface using the
internal allocator.

See https://github.com/Intel-Media-SDK/MediaSDK/issues/762 for details
2019-07-07 15:16:28 +00:00
Haihao Xiang 1221898404 msdkenc: allow encode element requires extra frames
The call of MFXVideoENCODE_EncodeFrameAsync may not generate output and
the function returns MFX_ERR_MORE_DATA with NULL sync point, the input
frame is cached in this case, so it is possible that all allocated
frames go into the surfaces_used list after calling
MFXVideoENCODE_EncodeFrameAsync a few times, then the encoder will fail
to get an available surface before releasing used frames

This patch adds a new field of num_extra_frames to GstMsdkEnc and allows
encode element requires extra frames, the default value is 0.

This patch is the preparation for msdkvp9enc element.
2019-07-07 15:16:28 +00:00
Matthew Waters 8bad9d5d8a tests/vulkan: fix copyright name 2019-07-05 16:20:29 +10:00
Matthew Waters 58f203844d vulkan/window: add property for the parent display 2019-07-05 16:20:05 +10:00
Matthew Waters fda9b57dbe vulkan/device: add property for the parent instance 2019-07-05 16:13:13 +10:00
Matthew Waters 014642e188 vulkan: add view converter element 2019-07-05 15:04:28 +10:00
Matthew Waters 6ebaf7276e vulkan: fix output framebuffer creation size
We don't scale when color converting so there is no impact.
2019-07-05 10:47:45 +10:00
Mathieu Duponchelle 9996ae9ae0 tsmux: output smoothly increasing PTS when in CBR mode
Thanks to that, when its output is plugged into eg a udp sink, the
outgoing data can be output in a smoother way, reducing burstiness
2019-07-04 23:28:42 +00:00
Jan Schmidt 15f149a990 tests: Add h264parser SEI checks
Add some tests around SEI parsing.
2019-07-05 00:17:59 +10:00
Jan Schmidt de115dac4e h264parser lib: Add more profile_idc to the recognised set
Update the list of profile_idc recognised during SPS parsing
based on H.264 201704
2019-07-05 00:17:59 +10:00
Jan Schmidt 8899a471e3 h264parse lib: Remove the SPS parse_vui_params flag
The SPS parsing functions take a parse_vui_param flag
to skip VUI parsing, but there's no indication in the output
SPS struct that the VUI was skipped.

The only caller that ever passed FALSE seems to be the
important gst_h264_parser_parse_nal() function, meaning - so the
cached SPS were always silently invalid. That needs changing
anyway, meaning noone ever passes FALSE.

I don't see any use for saving a few microseconds in
order to silently produce garbage, and since this is still
unstable API, let's remove the parse_vui_param.
2019-07-05 00:17:59 +10:00
Jan Schmidt 81c20cadea h264parser lib: Warn on invalid pic_timing SEI
The spec calls for pic_timing SEI to be absent unless
there's either a CpbDpbDelaysPresentFlag or
pic_struct_present_flag in the SPS VUI data. If
both those flags are missing, warn.
2019-07-05 00:17:59 +10:00
Jan Schmidt 75ce024b1e h264parser lib: Always consume all SEI bits
If parsing an SEI errors out, it might not consume
all bits, leaving extra unparsed data in the reader
that the outer loop then tries to parse as a new
appended SEI.

Skip all the bits if any are left over to avoid
'finding' extra garbage SEI in the parsing.
2019-07-05 00:17:59 +10:00
Jan Schmidt a978bd2cab h264parser: Return BROKEN_LINK for missing SPS
When parsing SEI that require an SPS, return
GST_H264_PARSER_BROKEN_LINK instead of a generic
parsing error to let callers distinguish
bitstream errors from (expected) missing packets
when resuming decode.
2019-07-05 00:17:59 +10:00
Jan Schmidt 34b0eb4953 h264parser: Improve documentation
Improve some docs around the NALU structure contents
2019-07-05 00:17:58 +10:00
Jan Schmidt 44d16fc00d gstmpegvideoparser: Documentation fixes
Fix some spelling mistakes and improve documentation in
the MPEG video parser
2019-07-05 00:17:58 +10:00
Seungha Yang 1c99c37548 tsmuxstream: Do not try return from void function
../subprojects/gst-plugins-bad/gst/mpegtsmux/tsmux/tsmuxstream.c(1082): warning C4098:
  'tsmux_stream_get_es_descrs': 'void' function returning a value
2019-07-04 19:43:42 +09:00
Seungha Yang 00b2b599d6 mpegtsmux: Remove white space 2019-07-04 19:42:48 +09:00
Matthew Waters 69af8a9360 vulkan: move swapper object to the gstvulkan library
Allows other sinks and/or user code to display to a VkSurface
2019-07-04 14:18:15 +10:00
Matthew Waters b5256d94fc vulkan: move trash list to library 2019-07-04 14:18:15 +10:00
Matthew Waters cef839533e webrtcbin: use the latest self-generated SDP as the basis for renegotiations
Fixes multiple errors when a webrtcbin renegotiation can switch between the
offerer and the answerer.
2019-07-03 23:44:15 +00:00
Ederson de Souza f18fab0eb1 avtp: Update documentation 2019-07-03 09:59:35 -07:00
Ederson de Souza a6fc6558eb tests: Add AVTP CVF depayloader tests
In these tests, some specially crafted buffers are sent to the
depayloader, simulating some scenarios and checking what comes out from
it.
2019-07-03 09:59:35 -07:00
Ederson de Souza b34acc0c8c tests: Add AVTP CVF payloader tests
In these tests, some specially crafted buffers are sent to the
payloader, simulating some scenarios and checking what comes out from
it.
2019-07-03 09:59:35 -07:00
Andre Guedes c427fd1aec tests: Add AVTP source tests
This patch adds test cases for the AVTP source element. For now, only
properties get() and set() are covered.
2019-07-03 09:59:35 -07:00
Andre Guedes e0deddbcf6 tests: Add AVTP sink tests
This patch adds test cases for the AVTP sink element. For now, only
properties get() and set() are covered.
2019-07-03 09:59:35 -07:00
Andre Guedes 82b6b0faa7 tests: Add AAF depayloader tests
This patch adds test cases for the AAF depayloader element covering the
basic functionalities.
2019-07-03 09:59:35 -07:00
Andre Guedes e09470fac8 tests: Add AAF payloader tests
This patch adds the infrastructure to test AVTP plugin elements. It also
adds a test case to check avtpaafpay element basic functionality. The
test consists in setting the element sink caps and properties, and
verifying if the output buffer is set as expected.
2019-07-03 09:59:35 -07:00
Ederson de Souza 5592ab1769 docs: Add AVTP elements documentation 2019-07-03 09:59:35 -07:00
Ederson de Souza 45624661ba avtp: Add fragmented packets handling to CVF depayloader
This patch adds to the CVF depayloader the capability to regroup H.264
fragmented FU-A packets.

After all packets are regrouped, they are added to the "stash" of H.264
NAL units that will be sent as soon as an AVTP packet with M bit set is
found (usually, the last fragment).

Unrecognized fragments (such as first fragment seen, but with no Start
bit set) are discarded - and any NAL units on the "stash" are sent
downstream, as if a SEQNUM discontinuty happened.
2019-07-03 09:59:35 -07:00
Ederson de Souza 45d2f5a779 avtp: Introduce AVTP CVF depayloader element
This patch introduces the AVTP Compressed Video Format (CVF) depayloader
specified in IEEE 1722-2016 section 8. Currently, this depayloader only
supports H.264 encapsulation described in section 8.5.

Is also worth noting that only single NAL units are handled: aggregated
and fragmented payloads are not handled.

As stated in AVTP CVF payloader patch, AVTP timestamp is used to define
outgoing buffer DTS, while the H264_TIMESTAMP defines outgoing buffer
PTS.

When an AVTP packet is received, the extracted H.264 NAL unit is added to
a "stash" (the out_buffer) of H.264 NAL units. This "stash" is pushed
downstream as single buffer (with NAL units aggregated according to format
used on GStreamer, based on ISO/IEC 14496-15) as soon as we get the AVTP
packet with M bit set.

This patch groups NAL units using a fixed NAL size lenght, sent downstream
on the `codec_data` capability.

The "stash" of NAL units can be prematurely sent downstream if a
discontinuity (a missing SEQNUM) happens.

This patch reuses the infra provided by gstavtpbasedepayload.c.
2019-07-03 09:59:35 -07:00
Ederson de Souza b056297eea avtp: Add fragmentation feature to CVF payloader
Based on `mtu` property, the CVF payloader is now capable of properly
fragmenting H.264 NAL units that are bigger than MTU in several AVTP
packets.

AVTP spec defines two methods for fragmenting H.264 packets, but this
patch only generates non-interleaved FU-A fragments.

Usually, only the last NAL unit from a group of NAL units in a single
buffer will be big enough to be fragmented. Nevertheless, only the last
AVTP packet sent for a group of NAL units will have the M bit set (this
means that the AVTP packet for the last fragment will only have the M
bit set if there's no more NAL units in the group).
2019-07-03 09:59:35 -07:00