platform/upstream/gstreamer.git
5 years agoImport GstTranscoder
Saunier Thibault [Thu, 3 Dec 2015 11:32:05 +0000 (12:32 +0100)]
Import GstTranscoder

5 years agovulkan/swapper: add a couple of missing g_clear_error()'s
Matthew Waters [Fri, 23 Aug 2019 07:07:43 +0000 (17:07 +1000)]
vulkan/swapper: add a couple of missing g_clear_error()'s

5 years agovulkan/build: conditionally depend on Vulkan-1.0.gir
Matthew Waters [Fri, 23 Aug 2019 07:04:42 +0000 (17:04 +1000)]
vulkan/build: conditionally depend on Vulkan-1.0.gir

Vulkan-1.0.gir is new in gobject-introspection >= 1.61.1

5 years agovulkandisplay: silence an unused but set error with no enable winsys implementations
Matthew Waters [Fri, 23 Aug 2019 07:03:20 +0000 (17:03 +1000)]
vulkandisplay: silence an unused but set error with no enable winsys implementations

5 years agovulkan/swapper: check queue present return later
Matthew Waters [Fri, 23 Aug 2019 04:20:59 +0000 (14:20 +1000)]
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.

5 years agovulkan/swapper: destroy the surface in finalize
Matthew Waters [Fri, 23 Aug 2019 04:19:22 +0000 (14:19 +1000)]
vulkan/swapper: destroy the surface in finalize

Fixes a leak of the VkSurface object.

5 years agovulkan/swapper: set some values to NULL in error conditions
Matthew Waters [Fri, 23 Aug 2019 04:17:02 +0000 (14:17 +1000)]
vulkan/swapper: set some values to NULL in error conditions

So that they are not double free()-ed.

5 years agovulkancolorconvert: explicitly initalize swizzle arrays
Matthew Waters [Fri, 23 Aug 2019 04:14:39 +0000 (14:14 +1000)]
vulkancolorconvert: explicitly initalize swizzle arrays

Fixes uninitialized access of the indexed values larger than
the number of planes in the video format.

5 years agovulkan/error: add the error value in hex and decimal
Matthew Waters [Fri, 23 Aug 2019 04:13:16 +0000 (14:13 +1000)]
vulkan/error: add the error value in hex and decimal

Provides more information for what may be an 'Unknown' error.

5 years agovulkanswapper: disconnect window signals before any internal resources
Matthew Waters [Fri, 23 Aug 2019 04:11:16 +0000 (14:11 +1000)]
vulkanswapper: disconnect window signals before any internal resources

Otherwise, it's racy whether the necessary resources are available in
the signal callbacks on destruction.

5 years agomsdkvpp: don't return GST_FLOW_ERROR for MFX_WRN_INCOMPATIBLE_VIDEO_PARAM
Haihao Xiang [Mon, 19 Aug 2019 04:30:30 +0000 (12:30 +0800)]
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.

5 years agoahcsrc: #define GST_USE_UNSTABLE_API for phtography inteface
Matthew Waters [Wed, 28 Aug 2019 06:11:12 +0000 (16:11 +1000)]
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."
 ^

5 years agompeg2enc: fix werror build with clang
Matthew Waters [Tue, 27 Aug 2019 02:05:10 +0000 (12:05 +1000)]
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

5 years agouvch264: fix werror build with clang
Matthew Waters [Mon, 26 Aug 2019 12:19:13 +0000 (22:19 +1000)]
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
^

5 years agoav1enc: fix werror build with clang
Matthew Waters [Mon, 26 Aug 2019 12:17:57 +0000 (22:17 +1000)]
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
                                        ^~~~~~~~~~~~~~~~~~~~~~~~~

5 years agosrt: Set latency property on SRT socket
Olivier Crête [Fri, 23 Aug 2019 22:40:49 +0000 (18:40 -0400)]
srt: Set latency property on SRT socket

5 years agosrt: Add sender side statistics
Olivier Crête [Fri, 23 Aug 2019 21:54:49 +0000 (17:54 -0400)]
srt: Add sender side statistics

5 years agosrtobject: Remove pointless GMainLoop
Olivier Crête [Fri, 23 Aug 2019 20:21:47 +0000 (16:21 -0400)]
srtobject: Remove pointless GMainLoop

Just use srt's blocking epoll function and fix locking while we're at it.

5 years agowasapi: Move to CoInitializeEx for COM initialization
Nirbheek Chauhan [Tue, 13 Aug 2019 17:24:42 +0000 (22:54 +0530)]
wasapi: Move to CoInitializeEx for COM initialization

CoInitialize is not allowed when targeting UWP and causes a Windows
Application Certification Kit (WACK) error.

5 years agotsdemux: Make latency configurable
Olivier Crête [Fri, 23 Aug 2019 21:55:00 +0000 (17:55 -0400)]
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.

5 years agoh265parse: fix colorimetry in src caps if sink caps has no structure
Guillaume Desmottes [Mon, 26 Aug 2019 09:06:35 +0000 (14:36 +0530)]
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.

5 years agoh264parse: fix colorimetry in src caps if sink caps has no structure
Guillaume Desmottes [Mon, 26 Aug 2019 09:06:35 +0000 (14:36 +0530)]
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.

5 years agoamc: Do not skip decoders that have no profile levels
Xavier Claessens [Mon, 26 Aug 2019 18:53:39 +0000 (14:53 -0400)]
amc: Do not skip decoders that have no profile levels

5 years agoh265parse: add support for SEI registered user data
Aaron Boxer [Wed, 8 May 2019 15:06:40 +0000 (11:06 -0400)]
h265parse: add support for SEI registered user data

5 years agoh264parse: use gstvideoparseutils to handle user data
Aaron Boxer [Wed, 8 May 2019 15:05:40 +0000 (11:05 -0400)]
h264parse: use gstvideoparseutils to handle user data

5 years agompegvideoparse: use gstvideoparseutils to handle user data
Aaron Boxer [Wed, 8 May 2019 15:04:49 +0000 (11:04 -0400)]
mpegvideoparse: use gstvideoparseutils to handle user data

5 years agovideoparseutils: add new parser class
Aaron Boxer [Wed, 8 May 2019 15:02:35 +0000 (11:02 -0400)]
videoparseutils: add new parser class

5 years agomsdkvpp: support video-direction property
Haihao Xiang [Fri, 23 Aug 2019 01:51:20 +0000 (09:51 +0800)]
msdkvpp: support video-direction property

video-direction property is common property in gstreamer. In addition,
both mirroring & rotation properties are marked as deprecated,
video-direction will override mirroring & rotation properties when they
are set explicitly

Fix https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/1058

5 years agomsdkdec: Fix buffer allocation based on frame.
Yan Wang [Wed, 21 Aug 2019 08:44:39 +0000 (16:44 +0800)]
msdkdec: Fix buffer allocation based on frame.

gst_msdkdec_finish_task() may release all frames in
GstVideoDecoder object. In this case, allocate_output_buffer()
cannot get the oldest frame to allocate buffer.
So gst_msdkdec_handle_frame() should return GST_FLOW_OK for
letting gst_video_decoder_decode_frame() to send a new frame
for decoding.

Fixes #664.
Fixes #665.

5 years agowaylandsink: Fix return type of prototype of show_frame()
Shinya Saito [Thu, 8 Aug 2019 02:54:45 +0000 (11:54 +0900)]
waylandsink: Fix return type of prototype of show_frame()

5 years agomsdk: Don't use VA_RT_FORMAT_YUV420_10 if it's undefined
Yeongjin Jeong [Sat, 24 Aug 2019 03:18:20 +0000 (12:18 +0900)]
msdk: Don't use VA_RT_FORMAT_YUV420_10 if it's undefined

../sys/msdk/gstmsdkallocator_libva.c:99:16: error: ‘VA_RT_FORMAT_YUV420_10’

The minimum required version seems to VA_API_VERSION >= 1.2.0

5 years agodocstrings: port ulinks to markdown links
Mathieu Duponchelle [Fri, 23 Aug 2019 17:56:35 +0000 (19:56 +0200)]
docstrings: port ulinks to markdown links

5 years agodshowsrcwrapper: fix regression on device selection
gla [Tue, 20 Aug 2019 10:44:44 +0000 (12:44 +0200)]
dshowsrcwrapper: fix regression on device selection

Do not take device_name if a device has been specified. Do not take device_index into account if a device or a device name has been specified.

5 years agomeson: Don't generate doc cache when no plugins are enabled
Matthew Waters [Fri, 23 Aug 2019 07:08:20 +0000 (17:08 +1000)]
meson: Don't generate doc cache when no plugins are enabled

Fixes gst-build with -Dauto-features=disabled -Dbad=enabled

5 years agomsdk: vpp: rotate output frame
U. Artie Eoff [Wed, 21 Aug 2019 17:46:43 +0000 (10:46 -0700)]
msdk: vpp: rotate output frame

When vpp rotation is 90 or 270, the output frame
should be rotated, too.

Example:
  gst-launch-1.0 -vf videotestsrc \
   ! video/x-raw,width=720,height=480 \
   ! msdkvpp rotation=90 ! vaapisink

5 years agovulkandisplay: Also free the GSource
Matthew Waters [Thu, 22 Aug 2019 07:23:39 +0000 (17:23 +1000)]
vulkandisplay: Also free the GSource

NULL checking the main_context does not help as we've just destroyed the
GMainContext and set that field to NULL, not to mention it's unnecessary.

Fixes a leak of display's GSource.

5 years agovulkandisplay: free the list of windows on destruction
Matthew Waters [Thu, 22 Aug 2019 07:02:07 +0000 (17:02 +1000)]
vulkandisplay: free the list of windows on destruction

They may not have had an explicit removal from the subclass.

5 years agovulkan/fullscreenrender: free the attachment descriptions
Matthew Waters [Thu, 22 Aug 2019 04:57:02 +0000 (14:57 +1000)]
vulkan/fullscreenrender: free the attachment descriptions

Fixes a memory leak of the attachment descriptions we receive from the
subclass.

5 years agovulkandisplay: fix use-after-free with removal of window
Matthew Waters [Thu, 22 Aug 2019 04:55:40 +0000 (14:55 +1000)]
vulkandisplay: fix use-after-free with removal of window

g_list_delete_link() free()'s the list node so any access after that is
a use-after-free.

5 years agovulkan/xcb: display->windows is a list of allocated GWeakRef
Matthew Waters [Thu, 22 Aug 2019 04:54:30 +0000 (14:54 +1000)]
vulkan/xcb: display->windows is a list of allocated GWeakRef

Don't access them as plain GstVulkanWindow objects.

5 years agovulkanviewconvert: perform a renegotiation on multiview mode/flag property changes
Matthew Waters [Thu, 22 Aug 2019 01:48:11 +0000 (11:48 +1000)]
vulkanviewconvert: perform a renegotiation on multiview mode/flag property changes

Otherwise changing the output* properties have no effect until someone else
performs a renegotiation.

5 years agoshaders/view-convert: remove some debugging colours
Matthew Waters [Thu, 22 Aug 2019 01:47:29 +0000 (11:47 +1000)]
shaders/view-convert: remove some debugging colours

Fixes left and right output modes.

5 years agotsdemux: Limit the maximum PES payload size
Jan Schmidt [Fri, 28 Jun 2019 05:04:29 +0000 (15:04 +1000)]
tsdemux: Limit the maximum PES payload size

PES packets with size 0 are unbounded, and
could therefore overflow the 32-bit size
accumulator.

Add a 32MB limit, which is larger than
any PES packet should ever get. If one does,
then output a 32MB chunk and continue.

5 years agohlsdemux: Post error message if hlsdemux could not start decryption
Seungha Yang [Wed, 21 Aug 2019 14:47:45 +0000 (23:47 +0900)]
hlsdemux: Post error message if hlsdemux could not start decryption

_decrypt_start() failure will lead to decryption failure eventually
but catching it earlier if possible. The decrpytion start failure means
that the hls plugin was built without crypto library or crypto library
does not want to accept given key and IV.

5 years agohls: Make crypto dependency optional when hls-crypto is auto
Seungha Yang [Tue, 9 Apr 2019 11:07:05 +0000 (20:07 +0900)]
hls: Make crypto dependency optional when hls-crypto is auto

crypto libraries are not required for hlssink and hlssink2.
Also, hlsdemux with nonencrypted stream can work without crpyto.

Make an error only when users set "hls-crpyto" with non-auto option explicitly,
but no crpyto library was found.

5 years agonvdec: Always response QUERY_CONTEXT even if openGL is unavailable on the system
Seungha Yang [Sat, 17 Aug 2019 04:58:33 +0000 (13:58 +0900)]
nvdec: Always response QUERY_CONTEXT even if openGL is unavailable on the system

nvdec can response for the CUDA context type query regardless of openGL
availability.

5 years agoext/wayland: Define libdrm_dep in meson.build
Thomas Coldrick [Wed, 14 Aug 2019 10:24:19 +0000 (11:24 +0100)]
ext/wayland: Define libdrm_dep in meson.build

5 years agoamc: Print error when failing to register listener
Xavier Claessens [Fri, 16 Aug 2019 15:07:44 +0000 (11:07 -0400)]
amc: Print error when failing to register listener

5 years agoamc: Do not use g_log() for criticals
Xavier Claessens [Fri, 16 Aug 2019 15:01:05 +0000 (11:01 -0400)]
amc: Do not use g_log() for criticals

5 years agoamc: crop values are not mandatory in format
Xavier Claessens [Wed, 15 May 2019 14:16:33 +0000 (10:16 -0400)]
amc: crop values are not mandatory in format

Android documentation has example code how to compute width and height
when crop values are present.
https://developer.android.com/reference/android/media/MediaCodec#accessing-raw-video-bytebuffers-on-older-devices

5 years agoamc: Remove unused gst_amc_surface_texture_set_default_buffer_size()
Xavier Claessens [Fri, 26 Apr 2019 15:03:26 +0000 (11:03 -0400)]
amc: Remove unused gst_amc_surface_texture_set_default_buffer_size()

5 years agoamc: Fix matrix constness in _get_transform_matrix()
Xavier Claessens [Thu, 25 Apr 2019 18:50:43 +0000 (14:50 -0400)]
amc: Fix matrix constness in _get_transform_matrix()

5 years agoamc: Select between encoder/decoder at GstAmcCodec construct time
Xavier Claessens [Tue, 26 Mar 2019 15:24:58 +0000 (11:24 -0400)]
amc: Select between encoder/decoder at GstAmcCodec construct time

Magical 0/1 values where passed to gst_amc_codec_configure() flags
argument. It's more natural to have a boolean is gst_amc_codec_new().

5 years agoamc: Remove gst_amc_format_contains_key()
Xavier Claessens [Tue, 13 Nov 2018 18:16:34 +0000 (13:16 -0500)]
amc: Remove gst_amc_format_contains_key()

It is not needed, we can just try to get the key and ignore error.
NdkMediaFormat doesn't have that method.

5 years agoamc: Turn GstAmcSurfaceTexture into a base class with JNI implementation
Xavier Claessens [Mon, 12 Nov 2018 19:02:37 +0000 (14:02 -0500)]
amc: Turn GstAmcSurfaceTexture into a base class with JNI implementation

5 years agoamc: Create JNI wrapper for MediaCodecList
Xavier Claessens [Sun, 11 Nov 2018 13:51:04 +0000 (08:51 -0500)]
amc: Create JNI wrapper for MediaCodecList

There is no NdkMediaCodecList API yet, but it is still better to isolate
JNI code. This will facilitate porting to a native API if Google ever
release one.

5 years agoamc: Move MediaCodec JNI wrapper into its own module
Xavier Claessens [Sat, 10 Nov 2018 21:51:02 +0000 (16:51 -0500)]
amc: Move MediaCodec JNI wrapper into its own module

This will facilitate adding another implementation based on
NdkMediaCodec instead of JNI.

5 years agosctp: Fix crash on free() when using the MSVC binaries
Nirbheek Chauhan [Tue, 20 Aug 2019 08:51:17 +0000 (14:21 +0530)]
sctp: Fix crash on free() when using the MSVC binaries

On Windows, if libusrsctp and gstreamer are built with different
C runtimes (CRT), we cannot free memory allocated inside libusrsctp
with the `free()` function from gstreamer's CRT.

`usrsctp_freedumpbuffer()` simply calls `free()`, but because of the
way DLLs work on Windows, it will always call the free function from
the correct CRT.

5 years agoh264parse: don't critical on VUI parameters > 2^31
Matthew Waters [Wed, 14 Aug 2019 12:08:34 +0000 (22:08 +1000)]
h264parse: don't critical on VUI parameters > 2^31

A guint32 greater than 2^31 would be interpreted as negative by
gst_util_uint64_scale_int() and critical. Use the 64-bit integer version
of the function instead.

5 years agonvdec: Fix possible null object unref
Seungha Yang [Tue, 13 Aug 2019 01:07:38 +0000 (10:07 +0900)]
nvdec: Fix possible null object unref

gst_query_get_n_allocation_pools > 0 does not guarantee that
the N th internal array has GstBufferPool object. So users should
check the returned GstBufferPool object from
gst_query_parse_nth_allocation_pool.

5 years agonvcodec: Use default flag for CUDA stream creation
Seungha Yang [Mon, 19 Aug 2019 04:22:20 +0000 (13:22 +0900)]
nvcodec: Use default flag for CUDA stream creation

Since nvdec/nvenc engine is running on default stream,
non-default CUDA stream should be synchronized with default
stream eventually.

5 years agoh26[45]parser: Fix emulation prevention byte detection
Wangfei [Thu, 15 Aug 2019 02:58:01 +0000 (10:58 +0800)]
h26[45]parser: Fix emulation prevention byte detection

Add a separate epb_cache variable to the codecparser NalReader to
detect Emulation Prevention Bytes separately from the main bit cache.

This fixes problems where the existing logic can mistakenly detect
multiple EPB with a sequence like: 0x00 0x00 0x03 0x00 0x03. In that
case, the 5th byte should not be regarded as an EPB.

5 years agonvenc: Use non default CUDA stream and async operation
Seungha Yang [Sun, 18 Aug 2019 13:51:18 +0000 (22:51 +0900)]
nvenc: Use non default CUDA stream and async operation

Use CUDA async operation if possible with non default CUDA stream

5 years agonvdec: Don't use default CUDA stream
Seungha Yang [Sun, 18 Aug 2019 13:07:38 +0000 (22:07 +0900)]
nvdec: Don't use default CUDA stream

Async CUDA operation with default stream (NULL CUstream) is not much
beneficial than blocking operation since all CUDA operations which belong
to the CUDA context will be synchronized with the default stream's operation.
Note that CUDA stream will share all resources of the corresponding CUDA context
but which can help parallel operation similar to the relation between thread and process

5 years agonvdec: Push/Pop CUDA context around library API call
Seungha Yang [Sun, 18 Aug 2019 13:14:37 +0000 (22:14 +0900)]
nvdec: Push/Pop CUDA context around library API call

5 years agonvdec: Fix timestamp mismatch on draining frames
Seungha Yang [Sun, 18 Aug 2019 06:45:37 +0000 (15:45 +0900)]
nvdec: Fix timestamp mismatch on draining frames

The internal decoding state must be GST_NVDEC_STATE_PARSE before
calling CuvidParseVideoData(). Otherwise, nvdec will be confused
on decode callback as if the frame is decoding only frame and
the input timestamp of corresponding frame will be ignored.
Eventually one decoded frame will have non-increased PTS.

5 years agotsdemux: do not error if buffer size is invalid due to DISCONT
Aaron Boxer [Thu, 8 Aug 2019 20:54:32 +0000 (16:54 -0400)]
tsdemux: do not error if buffer size is invalid due to DISCONT

Don't signal a pipeline error when processing incomplete
j2pk PES packets that are too small. That can happen normally
during a DISCONT and shouldn't shut down the whole pipeline

5 years agoiqa: fix leak of map_meta.data
Mathieu Duponchelle [Fri, 16 Aug 2019 13:22:26 +0000 (15:22 +0200)]
iqa: fix leak of map_meta.data

5 years agonvdec: Do not access nvdec object from destroy function of qdata
Seungha Yang [Fri, 16 Aug 2019 10:32:39 +0000 (19:32 +0900)]
nvdec: Do not access nvdec object from destroy function of qdata

The destroy callback can be called just before the fìnalization of
GstMiniObject. So the nvdec object might be destroyed already.
Instead, store the GstCudaContext with increased ref to safely
unregister the CUDA resource.

5 years agod3dvideosink: Fix crash on WinProc handler
Seungha Yang [Thu, 15 Aug 2019 08:49:12 +0000 (17:49 +0900)]
d3dvideosink: Fix crash on WinProc handler

... caused by null pointer dereference. The d3dvideosink object might
not available yet on the handler.

5 years agomeson: d3d11: Remove unnecessary dependency
Seungha Yang [Thu, 15 Aug 2019 07:31:01 +0000 (16:31 +0900)]
meson: d3d11: Remove unnecessary dependency

d3d11 never use any API of gstreamer-allocators-1.0

5 years agod3d11videosink: Take into account pixel aspect ratio
Seungha Yang [Thu, 15 Aug 2019 07:20:26 +0000 (16:20 +0900)]
d3d11videosink: Take into account pixel aspect ratio

Fix unexpected cropping with non 1:1 pixel aspect-ratio.

The actual buffer width/height should be passed to gst_d3d11_window_render(),
instead of the calculated resolution. The width/height
values are parameters for copying d3d11 video memory.
Also, aspect-ratio should be considered on resize callback
to decide render rectangle size.

5 years agocccombiner: Make use of new GstAggregator::negotiate()
Sebastian Dröge [Wed, 14 Aug 2019 07:13:52 +0000 (10:13 +0300)]
cccombiner: Make use of new GstAggregator::negotiate()

Simplifies the caps handling code considerably here and removes some
spurious negotiation.

5 years agoamc: Fix crash when a sync_meta survives its sink
Xavier Claessens [Wed, 14 Aug 2019 15:21:30 +0000 (11:21 -0400)]
amc: Fix crash when a sync_meta survives its sink

_amc_gl_free() could be called after the GstAmcVideoDec has been
finalized, in the case downstream still has a ref to a buffer.

5 years agopitch: Fix race between putSamples() and setting soundtouch parameters
Doug Nazar [Fri, 9 Aug 2019 06:41:51 +0000 (02:41 -0400)]
pitch: Fix race between putSamples() and setting soundtouch parameters

The various soundtouch set*() functions may cause buffer (re)allocations
which interferes with inputting the audio data.

5 years agovulkan/ios: keep track of surface changes
Matthew Waters [Fri, 9 Aug 2019 04:49:24 +0000 (14:49 +1000)]
vulkan/ios: keep track of surface changes

5 years agovulkan/ios: initialize the frame to the parent's
Matthew Waters [Tue, 6 Aug 2019 02:38:41 +0000 (12:38 +1000)]
vulkan/ios: initialize the frame to the parent's

5 years agoatscmux: fix AC-3 stream id
Mathieu Duponchelle [Tue, 13 Aug 2019 21:24:41 +0000 (23:24 +0200)]
atscmux: fix AC-3 stream id

According to ATSC A/52, Annex A, section 4.2:

The value of stream_id in the PES header shall be 0xBD
(indicating private_stream_1)

5 years agopcapparse: fix DISCONT flag setting
OleksandrKvl [Tue, 13 Aug 2019 14:50:33 +0000 (17:50 +0300)]
pcapparse: fix DISCONT flag setting

DISCONT flag should be set only for first packet.
Fixes #1047.

5 years agowebrtc: fix type of max-retransmits, make it work
David Gunzinger [Tue, 13 Aug 2019 10:10:54 +0000 (12:10 +0200)]
webrtc: fix type of max-retransmits, make it work

5 years agomxfdemux: Also allow picture essence element type 0x05 for VC-3
Sebastian Dröge [Mon, 12 Aug 2019 17:26:51 +0000 (20:26 +0300)]
mxfdemux: Also allow picture essence element type 0x05 for VC-3

It's found like this in various files out there even if it does not
conform to SMPTE 2019-4.

5 years agowasapi: fix symbol redefinition build error
Ignacio Casal Quinteiro [Tue, 6 Aug 2019 15:42:15 +0000 (17:42 +0200)]
wasapi: fix symbol redefinition build error

5 years agorist: Fix documentation
Olivier Crête [Wed, 31 Jul 2019 15:49:55 +0000 (11:49 -0400)]
rist: Fix documentation

5 years agorist: Document stats-internal unit
Olivier Crête [Tue, 30 Jul 2019 16:54:04 +0000 (12:54 -0400)]
rist: Document stats-internal unit

5 years agoristsink: Only accept RTCP APP packets with subtype==0
Olivier Crête [Fri, 26 Jul 2019 20:17:59 +0000 (16:17 -0400)]
ristsink: Only accept RTCP APP packets with subtype==0

5 years agorist: Fix typo in the documentation
Olivier Crête [Tue, 9 Jul 2019 20:50:43 +0000 (16:50 -0400)]
rist: Fix typo in the documentation

5 years agorist: Use the right parameters the signal
Olivier Crête [Tue, 9 Jul 2019 20:50:14 +0000 (16:50 -0400)]
rist: Use the right parameters the signal

5 years agox265enc: Enhance profile setting with fixing infinite loop condition
Seungha Yang [Fri, 9 Aug 2019 03:52:31 +0000 (12:52 +0900)]
x265enc: Enhance profile setting with fixing infinite loop condition

Don't fixate profile caps which will choose the first profile from list.
Instead, store all profiles allowed by peer and try them until x265 can
accept one of them.

5 years agox265enc: Fix deadlock on profile setting failure
Seungha Yang [Fri, 9 Aug 2019 03:03:34 +0000 (12:03 +0900)]
x265enc: Fix deadlock on profile setting failure

Don't miss unlock before returning

5 years agonvenc: Add support YV12 format
Seungha Yang [Fri, 9 Aug 2019 02:39:43 +0000 (11:39 +0900)]
nvenc: Add support YV12 format

YV12 format is supported by Nvidia NVENC without manual conversion.
So nvenc is exposing YV12 format at sinkpad template but there is some
missing point around uploading the memory to GPU.

5 years agortp: do not overrule RtpInfo when non dynamic type
Marc Leeman [Thu, 8 Aug 2019 18:47:05 +0000 (18:47 +0000)]
rtp: do not overrule RtpInfo when non dynamic type

When looking up the Rtp information, do not overwrite information
already found with encoding-name by static information.

5 years agonvh265enc: Enable HDR related SEI nal insertion
Seungha Yang [Thu, 8 Aug 2019 11:06:41 +0000 (20:06 +0900)]
nvh265enc: Enable HDR related SEI nal insertion

If upstream provides the HDR related information, create SEI message
nals and pass them to NVENC.

5 years agoh265parse: Fix mastering display info parsing
Seungha Yang [Thu, 8 Aug 2019 11:01:41 +0000 (20:01 +0900)]
h265parse: Fix mastering display info parsing

Fix mismatched Red Y coordinate value.

5 years agomsdkdec: fix decoding issue for interlaced streams
Fuwei Tang [Wed, 7 Aug 2019 20:54:38 +0000 (04:54 +0800)]
msdkdec: fix decoding issue for interlaced streams

Currently h264parser produces a field or a frame for
alignment=au for interlaced streams, but the flag
MFX_BITSTREAM_COMPLETE_FRAME needs a complete frame
or complementary field pair of data, this results in
broken images being output.

Some patches have been sent out to fix h264parser,
but they are pending on some unfinished work. In
order to make gstreamer-msdk decoding work properly
for interlaced streams before h264parser is fixed,
this flag will be removed temporarily and will be
added back once h264parser if fixed.

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

5 years agonvh265enc: Add support YUV 444 10bits encoding
Seungha Yang [Tue, 6 Aug 2019 12:54:49 +0000 (21:54 +0900)]
nvh265enc: Add support YUV 444 10bits encoding

Note that h264 encoder does not support the YUV 444 10bits format

5 years agonvenc: Remove unnecessary constraint from YUV420 10bits capability decision
Seungha Yang [Tue, 6 Aug 2019 12:55:36 +0000 (21:55 +0900)]
nvenc: Remove unnecessary constraint from YUV420 10bits capability decision

YUV444 capability shouldn't be applied to YUV420 10 bits format

5 years agodecklinkvideosrc: Retrieve mode of the ancillary data from the frame
Sebastian Dröge [Wed, 7 Aug 2019 09:58:40 +0000 (12:58 +0300)]
decklinkvideosrc: Retrieve mode of the ancillary data from the frame

Instead of using the information we stored ourselves for the video frame
itself. Which was also the wrong one: it was the mode from the property,
not the autodetected one.

This fixes vanc extraction with mode=auto

5 years agodecklinkvideosrc: Also set the INTERLACED buffer flag on non-TFF buffers
Sebastian Dröge [Wed, 7 Aug 2019 09:58:03 +0000 (12:58 +0300)]
decklinkvideosrc: Also set the INTERLACED buffer flag on non-TFF buffers

5 years agomsdkdec: no need to cache output state info
Aaron Boxer [Mon, 22 Jul 2019 16:52:53 +0000 (12:52 -0400)]
msdkdec: no need to cache output state info

5 years agonvenc: Fix broken RGB format support
Seungha Yang [Wed, 7 Aug 2019 02:49:43 +0000 (11:49 +0900)]
nvenc: Fix broken RGB format support

Add missing format check introduced by the commit 7de4dbdeb27561c00be94f8666b39dc661c59f7b