Commit graph

24865 commits

Author SHA1 Message Date
Jeffy Chen
b8946d06c7 Revert "waylandsink: Don't create throwaway empty regions"
This reverts commit 68fa80e831.

Some wayland servers, especially weston, only expect empty input
region as a request to disable input.

Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
2019-09-03 13:27:12 +00:00
Matthew Waters
82e23a27f7 decklinkaudiosink: Drop late buffers
Asking decklink to render audio data seems to be based entirely on
the sample counts which completely disregards the timestamps
we pass to decklink.  As a result, we need to explicitly check
for late buffers and drop them ourselves.
2019-09-02 11:09:02 +00:00
Seungha Yang
e31c1423b7 tests: nvenc: Test runtime resolution change 2019-09-02 10:59:07 +09:00
Seungha Yang
09fd34dbb0 nvenc: Add support runtime resolution change freely
Do not restrict allowed maximum resolution depending on the
initial resolution. If new resolution is larger than previous one,
just re-init encode session.
2019-09-02 10:59:03 +09:00
Wangfei
5f63f59837 tests: h265parser: Add test parsing range extension in PPS 2019-08-31 23:22:44 +00:00
Wangfei
4bc46b902d h265parse lib: fix missing condition when parse PPS
Follow h265 spec(04/2015), log2_max_transform_skip_block_size_minus2
should get with condition when transform_skip_enabled_flag is 1.
2019-08-31 23:22:44 +00:00
Sam Gigliotti
90d939ea36 webrtcbin: Fixed memory leak in gstwebrtcstats
The function _get_stats_from_ice_transport returns a string which must be
freed by the caller. However, _get_stats_from_dtls_transport was ignoring
the return value from this function, resulting in a leak.

Ran this with valgrind. Before this fix there was a leak of 40 bytes each
time this was called. After there was no leak.
2019-08-30 15:55:35 +00:00
Matthew Waters
02814a43da decklink: fix macos werror build
../sys/decklink/gstdecklink.cpp:1703:7: error: format specifies type 'long' but the argument has type 'int64_t' (aka 'long long') [-Werror,-Wformat]
      persistent_id);
      ^~~~~~~~~~~~~~
/Library/Frameworks/GStreamer.framework/Versions/1.0/include/gstreamer-1.0/gst/gstinfo.h:1070:87: note: expanded from macro 'GST_DEBUG'
#define GST_DEBUG(...)                  GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_DEBUG,   NULL, __VA_ARGS__)
                                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
/Library/Frameworks/GStreamer.framework/Versions/1.0/include/gstreamer-1.0/gst/gstinfo.h:646:31: note: expanded from macro 'GST_CAT_LEVEL_LOG'
        (GObject *) (object), __VA_ARGS__);                             \
                              ^~~~~~~~~~~
2019-08-30 14:16:54 +10:00
Seungha Yang
fa83f086be nvdec: Check flow return of the only current handle_frame() to fix seeking issue
Due to uncleared last flow, decoding after seek was never possible
(last_ret == GST_FLOW_FLUSHING).
nvdec dose not need to keep track of the previous flow return,
and actually the interest is data/even flow of the current handle_frame().
2019-08-30 11:27:27 +09:00
Seungha Yang
be3a3da829 nvdec: Fallback to system memory if OpenGL context could not support PBO memory
If the environment could not support OpenGL PBO memory, nvdec will do negotiation
with system memory as fallback.
2019-08-30 01:36:46 +09:00
Seungha Yang
069fe93452 nvdec: Add support dynamic output format change
Implementing ::negotiate() method to support runtime output format
change. If downstream was reconfigured, baseclass will invoke
::negotiate() method, and nvdec should update output memory
type depending on downstream caps.
2019-08-30 01:36:46 +09:00
Seungha Yang
39f800c449 nvdec: Re-negotiate whenever output format is changed
Input stream might be silently changed without ::set_format() call.
Since nvdec has internal parser, nvdec element can figure out the format change
by itself.
2019-08-30 01:36:41 +09:00
Seungha Yang
a572bddd2f tests: nvdec: Add test runtime downstream reconfigure
Add test case for output format change
2019-08-30 01:19:17 +09:00
Seungha Yang
f4f8941a91 nvdec: Add support 4:4:4 and 4:2:0 12bit decoding
Depending on GPU architecture, HEVC decoder can support
4:4:4 format up to 12 bitdepth. This commit covers VP9 4:2:0 12 bits
decoding also.
2019-08-29 13:39:59 +00:00
Seungha Yang
ff9838fd3d nvenc: Add support for old drivers which could not understand SDK version 9.0
Add helper functions to support old drivers
with our previous SDK version 8.1
2019-08-29 13:39:59 +00:00
Seungha Yang
afebb15d99 nvenc: Use consistent snake case convention 2019-08-29 13:39:59 +00:00
Seungha Yang
1010b9f567 nvcodec: Bump SDK header to version 9.0
The latest Turing architecture (e.g., RTX serise) can support
decoding HEVC 4:4:4 format up to 12bits.
2019-08-29 13:39:59 +00:00
Yeongjin Jeong
fdab54611b vulkan: Fix some confusing typos
Seems to have been copy pasted from around gl element
2019-08-29 11:19:37 +00:00
Yeongjin Jeong
8bc5144020 vulkan: Don't dereference null pointer when printing error
When printing error message because the function failed, the GError variable
may not be used and it can be NULL.
2019-08-29 11:19:37 +00:00
Yeongjin Jeong
94671be428 vulkan/xcb: Don't try to create xcb window with non-xcb display
Non-xcb display does not have a xcb_connection and trying
to create xcb window with wild pointer can cause segfault.
2019-08-29 11:19:37 +00:00
Seungha Yang
338a32b672 nvenc: Port to GstCudaGraphicsResource
Register openGL resource only once per memory. Also if upstream
provides the registered information, reuse the information
instead of doing it again. This can improve performance dramatically
depending on system since the resource registration might cause
high overhead.
2019-08-29 18:45:25 +09:00
Seungha Yang
d0846f8eab nvdec: Port to GstCudaGraphicsResource
Make it possible to share registered graphics resource among nvidia encoders
and decoders.
2019-08-29 18:05:51 +09:00
Seungha Yang
da075b94a9 cudautils: Add GstCudaGraphicsResource structure for better openGL interoperability
Introduce GstCudaGraphicsResource structure to represent registered
CUDA graphics resources and to enable sharing the information among
nvdec and nvenc. This structure can reduce the number of resource
registration which cause high overhead.
2019-08-29 18:04:33 +09:00
Seungha Yang
8dc2b4a393 nvdec: Port to openGL PBO memory
For openGL interoperability, nvdec uses cuGraphicsGLRegisterImage API
which is to register openGL texture image.
Meanwhile nvenc uses cuGraphicsGLRegisterBuffer API to registure openGL buffer object.
That means two kinds of graphics resources are registered per memory
when nvdec/nvenc are configured at the same time.
The graphics resource registration brings possibly high overhead
so the registration should be performed only once per resource
from optimization point of view.
2019-08-29 18:04:33 +09:00
Seungha Yang
9bfd6d13e6 nvdec: Filter openGL API version to use
To ensure PBO buffer, openGL API >= 3 is required.
2019-08-29 18:04:29 +09:00
Haihao Xiang
4841c2759d msdk: avoid reading data from freed memory
Both g_list_delete_link and g_list_remove remove an element and free it,
so l->next is invalid (catched by valgrind) after calling g_list_delete_link
or g_list_remove
2019-08-28 14:51:54 +00:00
Thibault Saunier
fa18824d32 doc: Update plugin cache 2019-08-28 13:02:13 +00:00
Saunier Thibault
7a66b16d97 Import GstTranscoder 2019-08-28 13:02:13 +00:00
Matthew Waters
87311d404e vulkan/swapper: add a couple of missing g_clear_error()'s 2019-08-28 10:34:39 +00:00
Matthew Waters
542af25eb1 vulkan/build: conditionally depend on Vulkan-1.0.gir
Vulkan-1.0.gir is new in gobject-introspection >= 1.61.1
2019-08-28 10:34:39 +00:00
Matthew Waters
c237c8de6a vulkandisplay: silence an unused but set error with no enable winsys implementations 2019-08-28 10:34:39 +00:00
Matthew Waters
09883b6a6b vulkan/swapper: check queue present return later
During resizes, the VkQueuePresent can return OUT_OF_DATE and if a buffer
is displayed returning OUT_OF_DATE it would error out and stop the pipeline.

We already have a explicit check for OUT_OF_DATE and the same general
error check in the statements following so just use that code.
2019-08-28 10:34:39 +00:00
Matthew Waters
d1f8f7436d vulkan/swapper: destroy the surface in finalize
Fixes a leak of the VkSurface object.
2019-08-28 10:34:39 +00:00
Matthew Waters
cac1487479 vulkan/swapper: set some values to NULL in error conditions
So that they are not double free()-ed.
2019-08-28 10:34:39 +00:00
Matthew Waters
d9248560e4 vulkancolorconvert: explicitly initalize swizzle arrays
Fixes uninitialized access of the indexed values larger than
the number of planes in the video format.
2019-08-28 10:34:39 +00:00
Matthew Waters
be9c9e44f1 vulkan/error: add the error value in hex and decimal
Provides more information for what may be an 'Unknown' error.
2019-08-28 10:34:39 +00:00
Matthew Waters
5ab92e05d8 vulkanswapper: disconnect window signals before any internal resources
Otherwise, it's racy whether the necessary resources are available in
the signal callbacks on destruction.
2019-08-28 10:34:39 +00:00
Haihao Xiang
ffa82e07a7 msdkvpp: don't return GST_FLOW_ERROR for MFX_WRN_INCOMPATIBLE_VIDEO_PARAM
Returning MFX_WRN_INCOMPATIBLE_VIDEO_PARAM means MSDK detects some
incompatible parameters but it is resolved, and we may not regard
MFX_WRN_INCOMPATIBLE_VIDEO_PARAM as a fatal error. In this fix,
GST_FLOW_OK is returned but with a warning message so that a pipeline
may run to the end.
2019-08-28 09:37:06 +00:00
Matthew Waters
c941db0c2e ahcsrc: #define GST_USE_UNSTABLE_API for phtography inteface
Fixes werror build:

In file included from ../sys/androidmedia/gstahcsrc.c:70:
../gst-libs/gst/interfaces/photography.h:27:2: error: "The GstPhotography interface is unstable API and may change in future." [-Werror,-W#warnings]
#warning "The GstPhotography interface is unstable API and may change in future."
 ^
../gst-libs/gst/interfaces/photography.h:28:2: error: "You can define GST_USE_UNSTABLE_API to avoid this warning."  [-Werror,-W#warnings]
#warning "You can define GST_USE_UNSTABLE_API to avoid this warning."
 ^
2019-08-28 16:12:11 +10:00
Matthew Waters
278039be06 mpeg2enc: fix werror build with clang
/usr/include/mjpegtools/mpeg2enc/ontheflyratectlpass1.hh:1:9: error: '_ONTHEFLYRATECTLPASS1_HH' is used as a header guard here, followed by #define of a different macro [-Werror,-Wheader-guard]
#ifndef _ONTHEFLYRATECTLPASS1_HH
        ^~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/mjpegtools/mpeg2enc/ontheflyratectlpass1.hh:2:9: note: '_ONTHELFYRATECTLPASS1_HH' is defined here; did you mean '_ONTHEFLYRATECTLPASS1_HH'?
#define _ONTHELFYRATECTLPASS1_HH
        ^~~~~~~~~~~~~~~~~~~~~~~~
        _ONTHEFLYRATECTLPASS1_HH
In file included from ../subprojects/gst-plugins-bad/ext/mpeg2enc/gstmpeg2encoder.cc:31:
/usr/include/mjpegtools/mpeg2enc/ontheflyratectlpass2.hh:1:9: error: '_ONTHEFLYRATECTLPASS2_HH' is used as a header guard here, followed by #define of a different macro [-Werror,-Wheader-guard]
#ifndef _ONTHEFLYRATECTLPASS2_HH
        ^~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/mjpegtools/mpeg2enc/ontheflyratectlpass2.hh:2:9: note: '_ONTHELFYRATECTLPASS2_HH' is defined here; did you mean '_ONTHEFLYRATECTLPASS2_HH'?
#define _ONTHELFYRATECTLPASS2_HH
        ^~~~~~~~~~~~~~~~~~~~~~~~
        _ONTHEFLYRATECTLPASS2_HH

/usr/include/mjpegtools/mpeg2enc/encoderparams.hh:82:1: error: struct 'RateCtl' was previously declared as a class; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Werror,-Wmismatched-tags]
struct RateCtl;
^
/usr/include/mjpegtools/mpeg2enc/ratectl.hh:50:7: note: previous use is here
class RateCtl
      ^
/usr/include/mjpegtools/mpeg2enc/encoderparams.hh:82:1: note: did you mean class here?
struct RateCtl;
^~~~~~
class
2019-08-28 02:47:18 +00:00
Matthew Waters
6e9d0ac61b uvch264: fix werror build with clang
../subprojects/gst-plugins-bad/sys/uvch264/gstuvch264deviceprovider.c:48:1: warning: unused function 'GST__UVC_H264_DEVICE' [-Wunused-function]
G_DECLARE_FINAL_TYPE (GstUvcH264Device, gst_uvc_h264_device, GST_,
^
/usr/include/glib-2.0/gobject/gtype.h:1405:33: note: expanded from macro 'G_DECLARE_FINAL_TYPE'
  static inline ModuleObjName * MODULE##_##OBJ_NAME (gpointer ptr) {                                     \
                                ^
<scratch space>:75:1: note: expanded from here
GST__UVC_H264_DEVICE
^
../subprojects/gst-plugins-bad/sys/uvch264/gstuvch264deviceprovider.c:48:1: warning: unused function 'GST__IS_UVC_H264_DEVICE' [-Wunused-function]
/usr/include/glib-2.0/gobject/gtype.h:1407:26: note: expanded from macro 'G_DECLARE_FINAL_TYPE'
  static inline gboolean MODULE##_IS_##OBJ_NAME (gpointer ptr) {                                         \
                         ^
<scratch space>:78:1: note: expanded from here
GST__IS_UVC_H264_DEVICE
^
../subprojects/gst-plugins-bad/sys/uvch264/gstuvch264deviceprovider.c:139:1: warning: unused function 'GST_UVC_H264_DEVICE_PROVIDER' [-Wunused-function]
G_DECLARE_FINAL_TYPE (GstUvcH264DeviceProvider, gst_uvc_h264_device_provider, GST, UVC_H264_DEVICE_PROVIDER, GstDeviceProvider)
^
/usr/include/glib-2.0/gobject/gtype.h:1405:33: note: expanded from macro 'G_DECLARE_FINAL_TYPE'
  static inline ModuleObjName * MODULE##_##OBJ_NAME (gpointer ptr) {                                     \
                                ^
<scratch space>:137:1: note: expanded from here
GST_UVC_H264_DEVICE_PROVIDER
^
../subprojects/gst-plugins-bad/sys/uvch264/gstuvch264deviceprovider.c:139:1: warning: unused function 'GST_IS_UVC_H264_DEVICE_PROVIDER' [-Wunused-function]
/usr/include/glib-2.0/gobject/gtype.h:1407:26: note: expanded from macro 'G_DECLARE_FINAL_TYPE'
  static inline gboolean MODULE##_IS_##OBJ_NAME (gpointer ptr) {                                         \
                         ^
<scratch space>:140:1: note: expanded from here
GST_IS_UVC_H264_DEVICE_PROVIDER
^
2019-08-28 02:47:18 +00:00
Matthew Waters
3cb01699d4 av1enc: fix werror build with clang
../subprojects/gst-plugins-bad/ext/aom/gstav1enc.c:415:34: warning: implicit conversion from enumeration type 'GstAV1EncEndUsageMode' to different enumeration type 'enum aom_rc_mode' [-Wenum-conversion]
  av1enc->aom_cfg.rc_end_usage = DEFAULT_END_USAGE;
                               ~ ^~~~~~~~~~~~~~~~~
../subprojects/gst-plugins-bad/ext/aom/gstav1enc.c:162:41: note: expanded from macro 'DEFAULT_END_USAGE'
#define DEFAULT_END_USAGE               GST_AV1_ENC_END_USAGE_VBR
                                        ^~~~~~~~~~~~~~~~~~~~~~~~~
2019-08-28 02:47:18 +00:00
Olivier Crête
fa842f2156 srt: Set latency property on SRT socket 2019-08-27 22:31:50 +00:00
Olivier Crête
177f1f95e1 srt: Add sender side statistics 2019-08-27 22:31:50 +00:00
Olivier Crête
54dc0b5579 srtobject: Remove pointless GMainLoop
Just use srt's blocking epoll function and fix locking while we're at it.
2019-08-27 22:31:50 +00:00
Nirbheek Chauhan
733f5b2851 wasapi: Move to CoInitializeEx for COM initialization
CoInitialize is not allowed when targeting UWP and causes a Windows
Application Certification Kit (WACK) error.
2019-08-27 19:10:36 +00:00
Olivier Crête
963dda3482 tsdemux: Make latency configurable
Allows for "low latency" mpeg-ts mode which is not standard, but somewhat common.
For this to work the sender has to put timestamps at a higher frequency than the spec requires.
2019-08-27 12:09:57 -04:00
Guillaume Desmottes
403cffeace h265parse: fix colorimetry in src caps if sink caps has no structure
We do want to include the colorimetry in the src caps if the sink caps
doesn't have any structure associated.
2019-08-27 06:06:01 +00:00
Guillaume Desmottes
e0d9722a1b h264parse: fix colorimetry in src caps if sink caps has no structure
We do want to include the colorimetry in the src caps if the sink caps
doesn't have any structure associated.
2019-08-27 06:06:01 +00:00
Xavier Claessens
121711e4ac amc: Do not skip decoders that have no profile levels 2019-08-27 02:23:41 +00:00