Commit graph

24729 commits

Author SHA1 Message Date
Mathieu Duponchelle
1ef3186243 rtponvifparse: parse E flag and send EOS when needed 2019-08-06 22:49:25 +00:00
Seungha Yang
85c0a1e85b x265enc: Add support more 8/10/12 bits 4:2:0, 4:2:2 and 4:4:4 profiles
... with multi-library interface support. Depending on bit depth support of
the linked library, run-time api switch can be made via multi-library interface.

See more detail about libx265 multi-library interface
https://x265.readthedocs.io/en/default/api.html#multi-library-interface
2019-08-07 00:20:31 +03:00
Sebastian Dröge
ab8bd0aa44 decklinkaudiosrc/decklinkvideosrc: Do nothing in BaseSrc::negotiate() and always set caps in ::create()
We don't support negotiation with downstream but simply set caps based
on the buffers we receive. This prevents renegotiation to other formats,
and negotiation to NTSC in mode=auto in the beginning until the first
buffer is received.

As side-effect of this, also remove various other caps handling code
that was working around the behaviour of the default
BaseSrc::negotiate().
2019-08-06 19:05:38 +00:00
Sebastian Dröge
8257159909 errorignore: Try pushing again after a caps event too
It might have reconfigured everything correctly so that pushing buffers
works again afterwards, e.g. if the previous caps event was just
rejected.
2019-08-06 16:22:27 +00:00
Sebastian Dröge
5002efbf8d timecodestamper: Require a non-0/1 framerate on the pad templates
We reject caps with other framerates as it's impossible to generate
timecodes unless we actually know a constant framerate. Reflect this
also in the pad template caps.
2019-08-06 16:22:27 +00:00
Sebastian Dröge
2386385822 avwait: Improve debug output a bit 2019-08-06 16:22:27 +00:00
Seungha Yang
7de4dbdeb2 nvenc: Return profile compatible input formats from GstVideoEncoder::getcaps
Do not accept any input formats which could not be supported
by downstream requested codec profiles.
2019-08-06 15:03:22 +00:00
Seungha Yang
9e81f8e700 nvenc: Fix caps negotiation failure on unspecified interlace-mode
During GstVideoInfo conversion from GstCaps, interlace-mode is
inferred to progressive so unspecified interlace-mode should not cause any
negotiation issue. Simly set GST_PAD_FLAG_ACCEPT_INTERSECT flag
on sinkpad to fix issue.
2019-08-06 15:03:22 +00:00
Seungha Yang
b43d0f785c nvenc: Remove unused member variables
Supported interlace-mode and codec profiles are checked
during plugin init and those values are never used.
2019-08-06 15:03:22 +00:00
Seungha Yang
eba4e7e989 tests: nvenc: Add test caps negotiation with interlace-mode field 2019-08-06 15:03:22 +00:00
Sebastian Dröge
28b0be4036 rtptransceiver: Remove direction setter and vfunc and replace it by a property
It was changed from a function to a property in the latest WebRTC spec.
2019-08-06 12:22:21 +00:00
Haihao Xiang
ef81c9d6c4 msdkdec: Update frame info from video parameters
A 10bit stream may have different depth values for Luma and Chroma, and
MSDK requires the frame info must match the corresponding video
parameters
2019-08-06 09:20:21 +00:00
Yeongjin Jeong
68057cee98 vulkan: Fix GstMemory leaks
Allocated GstMemory should be freed with g_free()
2019-08-06 07:44:05 +00:00
Fuwei Tang
f3587c61ba h264parse: fix issue that caps "interlace-mode" can't be updated correctly
Upstream overrides the info "interlace-mode", otherwise update it with
SPS info.
2019-08-06 09:47:36 +08:00
Seungha Yang
f7f9f327cd nvdec: Respect upstream provided timestamp
Decoder sometimes reports nonincreasing timestamp.
Use input frame's timestamp like other decoder elements.
2019-08-05 20:32:39 +00:00
Seungha Yang
e68bfd7566 nvenc: Add support RGB 8/10bits formats
BGRA/RGBA/RGB10A2/BGR10A2 formats can be supported by nvenc.
Depending on device, supported format can be different.

Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/1038
2019-08-05 18:55:28 +00:00
Seungha Yang
c99b160b50 nvdec: Use upstream framerate if possible
Encoded bitstream might not have valid framerate. If upstream
provided non-variable-framerate (i.e., fps_n > 0 and fps_d > 0)
use upstream framerate instead of parsed one.
2019-08-05 15:32:43 +00:00
Seungha Yang
158b4d8649 nvenc: Fix crash with unspecified framerate
Nvidia driver seems to calculating floating point framerate
without validation. This causes crash both on linux and Windows.

Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/1012
2019-08-05 15:32:43 +00:00
Doug Nazar
6c552030f7 mpegdemux: Parse mpeg audio layer version and add to caps. 2019-08-05 14:32:24 +00:00
Doug Nazar
341a800954 mpegdemux: Finish setting up stream before adding pad. 2019-08-05 14:32:24 +00:00
Aaron Boxer
40f7001bef msdkdec: no need to cache allocation_caps 2019-08-05 13:32:15 +00:00
Matthew Waters
d916cad886 vulkan: add a couple of headers to the install list 2019-08-05 11:32:59 +10:00
Marc Leeman
f5e7b4bd73 mpeg4videoparse: allow sending config at IDR
Based on h264parse, also allow to send the config at every IDR.
2019-07-31 18:03:19 +00:00
Seungha Yang
2a76807c9a configure: Update for nvcodec dependency change
nvcodec is compilable without external dependency
2019-07-31 15:36:04 +00:00
Seungha Yang
f1cbab7cfd nvdec: Fix build warning error
gstnvdec.c:1222:3: error: implicit declaration of function ‘memset’ [-Werror=implicit-function-declaration]
   memset (&type_info, 0, sizeof (type_info));
   ^~~~~~
2019-07-31 15:36:04 +00:00
Mathieu Duponchelle
73f92371b8 basetsmux: expose pcr-interval property
Instead of using a static hardcoded PCR interval, allow the user
to configure it.

Also revert back the default to a 40 ms interval, that was changed
in recent patches for no good reason.
2019-07-31 15:54:13 +02:00
Yeongjin Jeong
dae6e7964c tests: x265enc: Add tiny resolution encoding check
Add the tiny picture encoding test case allowed in x265
2019-07-31 18:13:31 +09:00
Yeongjin Jeong
8f2c53f6f5 x265enc: Specify max CU size depending on input resolution
x265 does not allow user to configure a picture size smaller than
at least one CU size, and maxCUSize must be 16, 32, or 64.
Therefore, the CU size must be set according to the input resolution,
and the input resolution can not be less than 16.
2019-07-31 18:13:28 +09:00
Ederson de Souza
416afd5fa9 avtp: CVF - fix error message
The error is about *not* being able to map a buffer.
2019-07-30 11:34:31 -07:00
Ederson de Souza
f9a16731d1 avtp: CVF - Do not infinite loop trying to fragment zero sized NAL unit
Zero sized NAL-units should not happen, but if they do, do not infinite
loop. Added also a unit test for this case.
2019-07-30 11:34:31 -07:00
Jan Schmidt
18b54f8d34 h265parser: Skip unused SEI bits differently
3-byte emulation bytes can confuse the current code that skips
bits at the end of an SEI. Use a simpler method that's also
quicker because it skips all remaining bits in one go instead
of 1 bit at a time.
2019-07-30 17:37:49 +00:00
Seungha Yang
5e7dbdf585 h265parse: Add support for compatible profiles of extensions
From decoder's capability point of view as defined by the h265 specification,
accept peer profile caps.
2019-07-31 00:32:40 +09:00
Seungha Yang
4fa5a82762 nvenc: Fix build error with x86 msvc
__stdcall is accepted or ignored by the compiler on x64 but x86
is not the case. So the function definition should be consistent
with declaration.

Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/1039
2019-07-30 19:12:46 +09:00
Seungha Yang
0445ed6ba5 nvenc: Fix deadlock when pad_push return was not GST_FLOW_OK
Encoding thread is terminated without any notification so
upstream streaming thread is locked because there is nothing
to pop from GAsyncQueue. If downstream returns error,
we need put SHUTDOWN_COOKIE to GAsyncQueue for chain function
can wakeup.
2019-07-30 17:49:25 +09:00
Seungha Yang
3faf439347 nvcodec: Fix broken ABI in cuda stub header to fix nvenc with opengl
Fix the broken ABI introduced by the commit 367e742e5d
From CUDA Toolkit 3.2, size_t has been used in CUDA_MEMCPY2D structure
instead of unsigned int.
2019-07-30 11:13:18 +09:00
Jakub Adam
831b124976 webrtcbin: Support data channel SDP offers from Chrome
When negotiating a data channel, Chrome as recent as 75 still uses SDP
based on version 05 of the SCTP SDP draft, for example:

 m=application 9 DTLS/SCTP 5000
 a=sctpmap:5000 webrtc-datachannel 1024

Implement support for parsing SCTP port out of SDP message with sctpmap
attribute. Fixes data channel negotiation with Chrome browser.
2019-07-29 22:04:08 +00:00
Aaron Boxer
2c1244331f openjpegdec: enable multi-threaded decode 2019-07-29 15:18:34 -04:00
Aaron Boxer
1402ed8984 openjpegdec: check return value when setting up decoder 2019-07-29 14:48:39 -04:00
Charlie Turner
659d76a633 adaptivedemux: remove some deadlocks using webkitwebsrc.
WebKit's websrc depends on the main-thread for download completion
rendezvous. This exposed a number of deadlocks in adaptivedemux due to
it holding the MANIFEST_LOCK during network requests, and also needing
to hold it to change_state and resolve queries, which frequently occur
during these download windows.

Make demux->running MT-safe so that it can be accessed without using the
MANIFEST_LOCK. In case a source is downloading and requires a MT-thread
notification for completion of the fragment download, a state change
during this download window will deadlock unless we cancel the downloads
and ensure they are not restarted before we finish the state-change.

Also make demux->priv->have_manifest MT-safe. A duration query happening
in the window described above can deadlock for the same reason. Other
src queries (like SEEKING) that happen in this window also could
deadlock, but I haven't hit this scenario.

Increase granularity of API_LOCK'ing in change_state as well. We need to
cancel downloads before trying to take this lock, since sink events
(EOS) will hold it before starting a fragment download.
2019-07-29 13:19:41 +01:00
Ilya Smelykh
e898f1565d webrtcbin: fix GInetAddress leak 2019-07-29 15:55:36 +07:00
Aaron Boxer
8af8e73573 openjpeg: remove support for OpenJPEG 1.5
Also require OpenJPEG version >= 2.2
2019-07-28 17:03:13 -04:00
Wonchul Lee
1ddd13da24 av1enc: enable row-mt property conditionally
The row based multi threading control was introduced after 1.0.0 version
of libaom released. It adds a guard to check the relevant control
definition declared. It fixes #1025
2019-07-27 08:15:33 +00:00
Aaron Boxer
6c7a07bc2a msdk: enable 32 bit build on windows 2019-07-26 11:42:55 +02:00
Sebastian Dröge
060e72e370 Revert "dtls: fix generated cert dtls agent leak"
This reverts commit e5585b1bde
2019-07-26 06:35:53 +00:00
Seungha Yang
694f91da88 nvdec: Make OpenGL dependency optional
By adding system memory support for nvdec, both en/decoder
in the nvcodec plugin are able to be usable regardless of
OpenGL dependency. Besides, the direct use of system memory
might have less overhead than OpenGL memory depending on use cases.
(e.g., transcoding using S/W encoder)
2019-07-26 00:01:23 +00:00
Sebastian Dröge
aafda1c76f timecodestamper: Validate LTC timestamps before trying to use them
There's no point in working with invalid LTC timestamps as all future
calculations will be wrong based on this, and invalid LTC timestamps can
sometimes be read via the audio input.
2019-07-25 18:27:30 +03:00
Ilya Smelykh
e5585b1bde dtls: fix generated cert dtls agent leak
The generated certificate dtls agent was refed two times on the first call.
2019-07-25 20:03:02 +07:00
Ilya Smelykh
aa0dea09d6 dtls: fix dtls connection object leak 2019-07-25 10:21:29 +00:00
Sebastian Dröge
e326260173 decklink: Make sure to return a value from all code paths
False warning from MSVC, or it does not understand that
g_assert_not_reached() does not return.

...\gst-plugins-bad-1.0-1.17.0.1\sys\decklink\gstdecklink.cpp(1647) : warning C4715: 'gst_decklink_configure_duplex_mode': not all control paths return a value
2019-07-25 12:29:22 +03:00
Sebastian Dröge
b4b911da4d decklinksrc: Reset timestamp observations on format change
We will usually get timestamps starting from 0 again and due to the
format change the clock of the input might also be different.
2019-07-25 12:29:22 +03:00