platform/upstream/gstreamer.git
4 years agoadaptivedemux: Don't ignore gst_segment_do_seek() return result
Jan Schmidt [Tue, 17 Mar 2020 08:31:22 +0000 (19:31 +1100)]
adaptivedemux: Don't ignore gst_segment_do_seek() return result

gst_segment_do_seek() can fail, so don't ignore the return result

4 years agotsdemux: Send instant-rate-change event if requested in the SEEK event
Jan Schmidt [Thu, 29 Nov 2018 18:18:42 +0000 (05:18 +1100)]
tsdemux: Send instant-rate-change event if requested in the SEEK event

Convert instant-rate-change seek events into a downstream
instant-rate-change event and skip any further local seek handling.

4 years agomsdkh264enc: Configure parser and SEI array only if it's required
Seungha Yang [Tue, 31 Mar 2020 11:51:15 +0000 (20:51 +0900)]
msdkh264enc: Configure parser and SEI array only if it's required

4 years agomsdkh265enc: Add support for CEA708 closed caption insertion
Seungha Yang [Tue, 31 Mar 2020 06:25:47 +0000 (15:25 +0900)]
msdkh265enc: Add support for CEA708 closed caption insertion

Functionally identical to that of msdkh264enc

4 years agoh265parser: Add a helper method to create SEI nal unit
Seungha Yang [Thu, 19 Mar 2020 09:25:18 +0000 (18:25 +0900)]
h265parser: Add a helper method to create SEI nal unit

Add an API to create raw SEI nal unit. This would be useful in case
an user want to create SEI nal data and inject the SEI nal data
into bitstream.

4 years agosrtpdec: reduce log level for replay cases
Miguel Paris [Wed, 1 Apr 2020 17:43:51 +0000 (19:43 +0200)]
srtpdec: reduce log level for replay cases

These are normal cases, so DEBUG level is enough.

4 years agosrtpdec: do not warning old replay errors
Miguel París Díaz [Tue, 11 Apr 2017 10:41:11 +0000 (12:41 +0200)]
srtpdec: do not warning old replay errors

Reordered packets producing decrypting errors are very normal,
so we should filter which errors are warning and which not.

4 years agosrtpdec: fix reseting RTP sequence number on ROC changes
Miguel Paris [Tue, 29 May 2018 13:00:43 +0000 (15:00 +0200)]
srtpdec: fix reseting RTP sequence number on ROC changes

Each srtp_stream_t is tied to an specific SSRC, so a
roc_changed flag should be kept per each SSRC in order to
properly reset RTP sequence number on ROC changes.

4 years agod3d11: Update for video-hdr struct change
Seungha Yang [Fri, 13 Mar 2020 07:50:16 +0000 (16:50 +0900)]
d3d11: Update for video-hdr struct change

See the change of -base https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/594

4 years agonvh265enc: Update for video-hdr struct change
Seungha Yang [Fri, 13 Mar 2020 07:45:12 +0000 (16:45 +0900)]
nvh265enc: Update for video-hdr struct change

See the change of -base https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/594

4 years agox265enc: Update for video-hdr struct change
Seungha Yang [Fri, 13 Mar 2020 07:34:01 +0000 (16:34 +0900)]
x265enc: Update for video-hdr struct change

See the change of -base https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/594

4 years agoh264parse,h265parse: Update for video-hdr struct change
Seungha Yang [Fri, 13 Mar 2020 07:17:07 +0000 (16:17 +0900)]
h264parse,h265parse: Update for video-hdr struct change

See the change of -base https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/594

4 years agoh265parse: Set duration on buffers base on framerate
Zeeshan Ali [Sat, 28 Jul 2018 12:54:42 +0000 (14:54 +0200)]
h265parse: Set duration on buffers base on framerate

4 years agoh265parse: Derive src fps from vui_time_scale & vui_num_units_in_tick
Zeeshan Ali [Thu, 14 Jun 2018 14:20:54 +0000 (16:20 +0200)]
h265parse: Derive src fps from vui_time_scale & vui_num_units_in_tick

4 years agoh265parse: Handle interlaced video
Zeeshan Ali [Wed, 13 Jun 2018 14:33:21 +0000 (16:33 +0200)]
h265parse: Handle interlaced video

For interlaced video:
* set the interlace mode in the src caps
* double the height from SPS in the caps.
* set field latency, instead of frame latency.

Fix #778

4 years agocodecs: h264dpb: Don't leak pic_list GArray
Nicolas Dufresne [Fri, 27 Mar 2020 17:05:41 +0000 (13:05 -0400)]
codecs: h264dpb: Don't leak pic_list GArray

The contents was cleared, but the array was never released.

4 years agov4l2codecs: Only build this plugin on Linux
Nicolas Dufresne [Thu, 26 Mar 2020 19:57:17 +0000 (15:57 -0400)]
v4l2codecs: Only build this plugin on Linux

This is not useful on any other OSs, it will also avoid potential build
failure as this code uses Linux specific calls.

4 years agov4l2codecs: Add plugin dependency
Nicolas Dufresne [Thu, 26 Mar 2020 19:38:47 +0000 (15:38 -0400)]
v4l2codecs: Add plugin dependency

This ensure that the registry cache get updated when a meaningful change is
made in /dev for files named media*.

4 years agov4l2codecs: Wait for buffers to come back
Nicolas Dufresne [Fri, 20 Mar 2020 16:37:41 +0000 (12:37 -0400)]
v4l2codecs: Wait for buffers to come back

This code add required mechanism to try and allocate (not implemented yet)
otherwise wait for more buffers. This also comes with mechanism to terminate
the wait on flush or PAUSED_TO_READY transitions.

4 years agov4l2codecs: Implement flushing sequence
Nicolas Dufresne [Fri, 20 Mar 2020 18:14:46 +0000 (14:14 -0400)]
v4l2codecs: Implement flushing sequence

This simply consit of cycling through STREAMOFF/STREAMON with stateless
decoders.

4 years agov4l2codecs: allocator: Add method to wait for more buffers
Nicolas Dufresne [Fri, 20 Mar 2020 16:35:03 +0000 (12:35 -0400)]
v4l2codecs: allocator: Add method to wait for more buffers

This add function to wait for buffers to get back into the pool along with a
set_flushing() method to allow unblocking this wait.

4 years agov4l2codecs: pool: Create new buffer when pool is empty
Nicolas Dufresne [Wed, 18 Mar 2020 21:03:51 +0000 (17:03 -0400)]
v4l2codecs: pool: Create new buffer when pool is empty

This simply create an empty GstBuffer when the pool is empty. This way it's up
to the allocator to grow or wait if we ran out of memory.

4 years agov4l2slh264dec: Improve end_picture() robustness
Nicolas Dufresne [Wed, 18 Mar 2020 21:00:37 +0000 (17:00 -0400)]
v4l2slh264dec: Improve end_picture() robustness

Use a goto to ensure that for all cases we cleanup the current picture state.
And move the src buffer allocation higher, so we don't queue a bitstream
buffer if we don't have a picture buffer to decode into.

4 years agocodecs: h264: Do not ignore end_picture() return value
Nicolas Dufresne [Wed, 18 Mar 2020 20:51:11 +0000 (16:51 -0400)]
codecs: h264: Do not ignore end_picture() return value

If decoding failed because end_picture() failed, set the picture to
nonexisting, this way output_picture() will be skipped. This avoids confusing
special cases in output_picture() implementation.

4 years agov4l2slh264dec: Add output format negotiation
Nicolas Dufresne [Mon, 17 Feb 2020 23:08:48 +0000 (18:08 -0500)]
v4l2slh264dec: Add output format negotiation

This allow negotiating the output format through caps. Some drivers can
pipeline the decoder buffer through an image processor. This only support
colorspace conversion for now.

4 years agov4l2format: Convert between V4L2 and GST video format
Nicolas Dufresne [Fri, 13 Mar 2020 20:51:27 +0000 (16:51 -0400)]
v4l2format: Convert between V4L2 and GST video format

This will be needed in the output format negotiation.

4 years agov4l2codecs: Read driver provided stride
Nicolas Dufresne [Fri, 13 Mar 2020 18:23:39 +0000 (14:23 -0400)]
v4l2codecs: Read driver provided stride

This implements driver stride support but only for single allocation buffers.
This code is imported from the original v4l2 plugin and adapted to the new
helper context.

4 years agov4l2h264dec: Copy frames when GstVideoMeta is not supported
Nicolas Dufresne [Thu, 12 Mar 2020 20:15:40 +0000 (16:15 -0400)]
v4l2h264dec: Copy frames when GstVideoMeta is not supported

In some case, when downstream does not support GstVideoMeta, we need to
normalize the stride and offset of the buffer so that downstream can render
properly with a GstVideoMeta. This code is not called when GstVideoMeta is
supported downstream.

4 years agov4l2codec: Add initial GstVideoMeta support
Nicolas Dufresne [Wed, 11 Mar 2020 21:45:17 +0000 (17:45 -0400)]
v4l2codec: Add initial GstVideoMeta support

In this patch we strictly set the GstVideoMeta width/height to the coded width
and height. Further patches will add stride support and frame copying when
downstream does not support GstVideoMeta.

4 years agov4l2slh264dec: Prevent spurious renegotiation
Nicolas Dufresne [Mon, 9 Mar 2020 20:44:19 +0000 (16:44 -0400)]
v4l2slh264dec: Prevent spurious renegotiation

Don't let downstream cause a renegotiation at random point in time. This would
lead to spurious renegotiation and the decoder state may not be recoverable.

4 years agov4l2slh264dec: Hold on picture buffers
Nicolas Dufresne [Wed, 4 Mar 2020 02:22:52 +0000 (21:22 -0500)]
v4l2slh264dec: Hold on picture buffers

These buffers should not be reused for decoding until they are no longer
referenced.

4 years agov4l2codecs: Fix bytesused value
Nicolas Dufresne [Sun, 16 Feb 2020 22:48:12 +0000 (17:48 -0500)]
v4l2codecs: Fix bytesused value

Pass the actual amount of bytes we have copied into the bitstream buffer. Also
unmap the memory before queuing.

4 years agov4l2codech264dec: Implement finish frame
Nicolas Dufresne [Sun, 16 Feb 2020 19:53:08 +0000 (14:53 -0500)]
v4l2codech264dec: Implement finish frame

This enables the request to be processed by the HW (STREAMON) and to be pushed
downstream for further processing.

4 years agov4l2codecdecoder: Add support for dequeuing buffers
Nicolas Dufresne [Sun, 16 Feb 2020 19:51:37 +0000 (14:51 -0500)]
v4l2codecdecoder: Add support for dequeuing buffers

This includings polling of the request and streamon/streamoff.

4 years agov4l2codech264dec: Implement queuing
Nicolas Dufresne [Sat, 15 Feb 2020 03:13:05 +0000 (22:13 -0500)]
v4l2codech264dec: Implement queuing

We now pass the controls, associated to a request, queue the bitstream, qeueue
a picture buffer to decode into and finally queue the request. This now runs
until the buffer pool is exhausted. The next step will be to dequeue.

4 years agov4l2decoder: Add helpers to queue buffer and requests
Nicolas Dufresne [Sat, 15 Feb 2020 03:03:17 +0000 (22:03 -0500)]
v4l2decoder: Add helpers to queue buffer and requests

4 years agov4l2codec: Add getter for buffer index in allocator and pool
Nicolas Dufresne [Sat, 15 Feb 2020 02:57:34 +0000 (21:57 -0500)]
v4l2codec: Add getter for buffer index in allocator and pool

4 years agov4l2h264codecdec: Copy bitstream parameter and data
Nicolas Dufresne [Thu, 13 Feb 2020 22:46:29 +0000 (17:46 -0500)]
v4l2h264codecdec: Copy bitstream parameter and data

In this patch we fill the control structure with the bitstream paramter and
copy the bitstream data into V4L2 memory. Slice paramters are only the subset
of what Hantro needs, without any support for interlaced content.

4 years agov4l2slh264dec: Use the newly introduced allocator / pool
Nicolas Dufresne [Thu, 13 Feb 2020 04:50:42 +0000 (23:50 -0500)]
v4l2slh264dec: Use the newly introduced allocator / pool

We now allocate and free the memory needed for streaming.

4 years agov4l2codec: Add allocator and pool implementation
Nicolas Dufresne [Thu, 13 Feb 2020 04:45:14 +0000 (23:45 -0500)]
v4l2codec: Add allocator and pool implementation

This is a pooling allocator and the buffer pool does nothing other then
reusing the GstBuffer structure. Note that the pool is an internal pool, so
the start/stop/set_config virtual functions are not implemented.

4 years agov4l2codec: decoder: Add allocation helper
Nicolas Dufresne [Thu, 13 Feb 2020 04:39:25 +0000 (23:39 -0500)]
v4l2codec: decoder: Add allocation helper

4 years agov4l2codecs: Implement H264 format negotiation
Nicolas Dufresne [Mon, 10 Feb 2020 23:05:39 +0000 (18:05 -0500)]
v4l2codecs: Implement H264 format negotiation

4 years agov4l2codecs: Add initial formats helpers
Nicolas Dufresne [Mon, 10 Feb 2020 23:02:37 +0000 (18:02 -0500)]
v4l2codecs: Add initial formats helpers

4 years agov4l2codecs: Add skeleton of H264 decoder
Nicolas Dufresne [Sun, 9 Feb 2020 16:31:11 +0000 (11:31 -0500)]
v4l2codecs: Add skeleton of H264 decoder

This introduces the skeleton of the H264 decoder. The plugin will list the
devices and register a subclass of the GstV4L2CodecH264Dec base class. The
subclass will pick the required specific information from the GstV4L2Device
stored in the subclass structure.

4 years agov4l2codec: Add GstV4L2Deocder helper object
Nicolas Dufresne [Thu, 6 Feb 2020 02:42:56 +0000 (21:42 -0500)]
v4l2codec: Add GstV4L2Deocder helper object

This is a GstObject which will be used to hold on media and video device file
descriptor and provide abstracted ioctl calls with these descriptor. At the
moment this helper contains just enough to enumerate the supported format.
This part will be used by the plugin to register the CODEC specific elements..

4 years agov4l2codecs: Copy all needed Linux kernel headers
Nicolas Dufresne [Thu, 6 Feb 2020 02:18:57 +0000 (21:18 -0500)]
v4l2codecs: Copy all needed Linux kernel headers

Most of the features we need are very early or not expose yet in the uAPI.
Using an internal copy ensure that we everything we need is defined avoiding
to add load of checks and conditionnal code.

4 years agov4l2codecs: Add device enumeration
Nicolas Dufresne [Tue, 4 Feb 2020 20:52:45 +0000 (15:52 -0500)]
v4l2codecs: Add device enumeration

This introduces a GstV4L2CodecDevice structure and helper to retrieve a
list of CODEC device drivers. In order to find the device driver we
enumerate all media devices with UDEV. We then get the media controller
topology and locate a entity with function encoder or decoder and make
sure it is linked to two V4L2 IO entity pointing to the same device
node.

4 years agov4l2codecs: Introdude a V4L2 CODECs Accelerator plugin
Nicolas Dufresne [Mon, 3 Feb 2020 15:06:46 +0000 (10:06 -0500)]
v4l2codecs: Introdude a V4L2 CODECs Accelerator plugin

This plugin will support new CODECs uAPI in the Linux kernel. These
consist of an accelerator interface similar to DXVA, NVDEC, VDPAU and
VAAPI.

4 years agomsdkh264enc: Port to h264parser API for frame packing SEI injection
Seungha Yang [Mon, 30 Mar 2020 11:21:37 +0000 (20:21 +0900)]
msdkh264enc: Port to h264parser API for frame packing SEI injection

Create frame packing SEI memory only once per set_format() and
reuse it if possible.

4 years agoh264parse: Print all the syntax elements of frame packing for debugging
Seungha Yang [Tue, 24 Mar 2020 10:23:46 +0000 (19:23 +0900)]
h264parse: Print all the syntax elements of frame packing for debugging

Other values might be useful for debugging

4 years agomsdkh265enc: support 8-bit 422 encoding
Haihao Xiang [Wed, 18 Mar 2020 02:11:19 +0000 (10:11 +0800)]
msdkh265enc: support 8-bit 422 encoding

The media driver can support HEVC 8-bit 422 encoding for non-lowpower
mode since ICL[1], so VPP is not needed for this case.

Sample pipeline:
gst-launch-1.0 videotestsrc ! video/x-raw,format=YUY2 ! msdkh265enc ! \
filesink location=output.h265

[1] https://github.com/intel/media-driver#decodingencoding-features

4 years agomsdkh265enc: add support for Y210 in sink pad
Haihao Xiang [Tue, 17 Mar 2020 07:18:37 +0000 (15:18 +0800)]
msdkh265enc: add support for Y210 in sink pad

Sample pipeline:
gst-launch-1.0 videotestsrc ! video/x-raw,format=Y210 !
msdkh265enc ! filesink location=output.h265

4 years agomsdk: add a helper function to get codename of the platform
Haihao Xiang [Fri, 20 Mar 2020 01:53:28 +0000 (09:53 +0800)]
msdk: add a helper function to get codename of the platform

The features supported in MSDK vary from platform to platform. We may
support some features based on the codename of the platform in future.

4 years agomsdkenc: Try to find corresponding codec frame for encoded output buffer
Seungha Yang [Tue, 24 Mar 2020 07:00:30 +0000 (16:00 +0900)]
msdkenc: Try to find corresponding codec frame for encoded output buffer

The input and output buffers should be matched as much as possible
so that various metadata and its ordering to be preserved.

4 years agomsdkh264enc: Add support for CEA708 closed caption insertion
Seungha Yang [Sun, 22 Mar 2020 11:15:42 +0000 (20:15 +0900)]
msdkh264enc: Add support for CEA708 closed caption insertion

Currently supported caption format is CEA708_RAW

4 years agoh264parser: Add a helper method to create and inject raw SEI data
Seungha Yang [Wed, 25 Mar 2020 08:20:13 +0000 (17:20 +0900)]
h264parser: Add a helper method to create and inject raw SEI data

Add an API to create raw SEI nal unit. This would be useful in case
an user want to create SEI nal data and inject the SEI nal data
into bitstream.

4 years agonalutils: Introduce NAL writer helper methods
Seungha Yang [Thu, 19 Mar 2020 09:25:18 +0000 (18:25 +0900)]
nalutils: Introduce NAL writer helper methods

Add helper methods for writing h264 and h265 NAL

4 years agoh264parser: Expose SEI clear function to public
Seungha Yang [Sun, 22 Mar 2020 04:59:52 +0000 (13:59 +0900)]
h264parser: Expose SEI clear function to public

gsth265parser does it already. Although corresponding API of h265parser is
gst_h265_sei_free, _clear suffix is more consistent naming for h264parser
since there are gst_h264_{sps,pps}_clear().

4 years agod3d11decoder: Add support for array of texture DPB
Seungha Yang [Sun, 29 Mar 2020 08:34:48 +0000 (17:34 +0900)]
d3d11decoder: Add support for array of texture DPB

DXVA supports two kinds of texture structure for DPB, one is
"1) texture array" and the other is "2) array of texture".
1) is a type of texture which is single ID3D11Texture2D object having
ArraySize greater than one. So the ID3D11Texture2D itself is a set of texture.
Each sub texture of this type mush have identical resolution, format and so on,
and the number of sub texture in a texture array is fixed.

2) is an array of usual ID3D11Texture2D object. That means each
ID3D11Texture2D is independent each other and might have different resolution as well.
Moreover, we can modify the number of frames of the array dynamically.
This type is more flexible than "1) texture array" in terms of dynamic
behavior and also this type of texture can be used for shader resource view
but "1) texture array" couldn't be.

If "2) array of texture" is supported by driver, DXVA spec is saying that
it's preferred format over "1) texture array" in terms of performance.

4 years agomsdkh265enc: slice size control
Haihao Xiang [Tue, 26 Nov 2019 07:42:03 +0000 (15:42 +0800)]
msdkh265enc: slice size control

Add max-slice-size property to set the maximum slice size

4 years agoRevert "d3d11decoder: Check decoder status report"
Seungha Yang [Fri, 27 Mar 2020 09:05:55 +0000 (18:05 +0900)]
Revert "d3d11decoder: Check decoder status report"

This reverts commit 418e6991c19ab5ae6bcf1890f9b947c748ca834d.

Not all drivers seem to be friendly to this API.
Revert to avoid incomprehensible crash with Nvidia.

4 years agod3d11window: Always reuse swapchain
Seungha Yang [Thu, 26 Mar 2020 12:20:20 +0000 (21:20 +0900)]
d3d11window: Always reuse swapchain

DXGI format can be updated via ResizeBuffers()

4 years agod3d11window: Reorganize display colorspace selection
Seungha Yang [Mon, 9 Mar 2020 11:29:17 +0000 (20:29 +0900)]
d3d11window: Reorganize display colorspace selection

The set of supported color space by DXGI is not full combination of
our colorimetry. That means we should convert color space to one
of supported color space by DXGI. This commit modifies the color space
selection step so that d3d11window can find the best matching DXGI color space
first and then the selected input/output color space will be referenced
by shader and/or d3d11videoprocessor.

4 years agortmp2src: Add idle-timeout property
Seungha Yang [Fri, 27 Mar 2020 06:40:00 +0000 (15:40 +0900)]
rtmp2src: Add idle-timeout property

Add new property to signalling that there is no incoming data
from peer. This can be useful if users want to stop the streaming
when the connection is alive but no packet is arriving.

4 years agodtls/connection: fix EOF handling with openssl 1.1.1e
Matthew Waters [Thu, 26 Mar 2020 23:34:25 +0000 (10:34 +1100)]
dtls/connection: fix EOF handling with openssl 1.1.1e

openssl 1.1.1e does some stricker EOF handling and will throw an error
if the EOF is unexpected (like in the middle of a record).  As we are
streaming data into openssl here, it is entirely possible that we push
data from multiple buffers/packets into openssl separately.

From the openssl changelog:

 Changes between 1.1.1d and 1.1.1e [17 Mar 2020]
  *) Properly detect EOF while reading in libssl. Previously if we hit an EOF
     while reading in libssl then we would report an error back to the
     application (SSL_ERROR_SYSCALL) but errno would be 0. We now add
     an error to the stack (which means we instead return SSL_ERROR_SSL) and
     therefore give a hint as to what went wrong.
     [Matt Caswell]

We can relax the EOF signalling to only return TRUE when we have stopped
for any reason (EOS, error).

Will also remove a spurious EOF error from previous openssl version.

4 years agowebrtc: mark streams as active on renegotiation as well.
Matthew Waters [Wed, 25 Mar 2020 03:46:15 +0000 (14:46 +1100)]
webrtc: mark streams as active on renegotiation as well.

Otherwise when bundling, only the changed streams would be considered as
to whether the bundled transport needs to be blocked as all streams are
inactive.

Scenario is one transceiver changes direction to inactive and as that is
the only change in transciever direction, the entire bundled transport would
be blocked even if there are other active transceivers inside the same bundled
transport that are still active.

Fix by always checking the activeness of a stream regardless of if the
transceiverr has changed direction.

4 years agointerlace: add alternate support
Guillaume Desmottes [Mon, 13 Jan 2020 08:20:26 +0000 (13:50 +0530)]
interlace: add alternate support

Allow downstream elements to negotiate the alternate interlace mode,
splitting each input buffer in two fields, each having their own buffer.

4 years agointerlace: factor out interlace_mode_from_pattern()
Guillaume Desmottes [Fri, 28 Feb 2020 07:01:46 +0000 (12:31 +0530)]
interlace: factor out interlace_mode_from_pattern()

4 years agointerlace: factor out gst_interlace_push_buffer()
Guillaume Desmottes [Thu, 23 Jan 2020 09:47:45 +0000 (15:17 +0530)]
interlace: factor out gst_interlace_push_buffer()

4 years agointerlace: factor out gst_interlace_decorate_buffer_ts()
Guillaume Desmottes [Thu, 23 Jan 2020 09:40:36 +0000 (15:10 +0530)]
interlace: factor out gst_interlace_decorate_buffer_ts()

4 years agointerlace: rename copy_field()
Guillaume Desmottes [Thu, 23 Jan 2020 09:01:02 +0000 (14:31 +0530)]
interlace: rename copy_field()

It is actually copying both fields (to a single frame/buffer).

4 years agotests: h265parser: Add test for registered user data SEI
Seungha Yang [Sat, 21 Mar 2020 11:16:04 +0000 (20:16 +0900)]
tests: h265parser: Add test for registered user data SEI

4 years agoh265parser: Fix registered user data SEI leak
Seungha Yang [Sat, 21 Mar 2020 10:41:28 +0000 (19:41 +0900)]
h265parser: Fix registered user data SEI leak

... and add fix for the SEI data in gst_h265_sei_copy()

4 years agoh265parser: Do not allocate too large size of memory for registered user data SEI
Seungha Yang [Sat, 21 Mar 2020 09:25:25 +0000 (18:25 +0900)]
h265parser: Do not allocate too large size of memory for registered user data SEI

Don't be confused by the unit of payload size (i.e., bits and bytes)
Also this need a documentation with Since mark

4 years agoh264parser: Do not allocate too large size of memory for registered user data SEI
Seungha Yang [Sat, 21 Mar 2020 09:39:42 +0000 (18:39 +0900)]
h264parser: Do not allocate too large size of memory for registered user data SEI

Don't be confused by the unit of payload size (i.e., bits and bytes)
Also this need a documentation with Since mark

4 years agowpe: Enable SHM support for new stable WPEBackend-FDO release
Philippe Normand [Mon, 23 Mar 2020 12:55:13 +0000 (12:55 +0000)]
wpe: Enable SHM support for new stable WPEBackend-FDO release

1.5.0 was the development version.

4 years agowpe: Mouse scroll events support
Philippe Normand [Mon, 10 Feb 2020 18:28:05 +0000 (18:28 +0000)]
wpe: Mouse scroll events support

4 years agoapplemedia: Add some properties to GstAvfDevice
James Westman [Sun, 1 Mar 2020 04:19:57 +0000 (22:19 -0600)]
applemedia: Add some properties to GstAvfDevice

Adds properties to the devices listed in GstDeviceMonitor by the
applemedia plugin.

These properties are:
- device.api (always set to "avf")
- avf.unique_id
- avf.model_id
- avf.manufacturer (except on iOS)
- avf.has_flash
- avf.has_torch

Everything except device.api is taken directly from the AVCaptureDevice object
provided by AVFoundation.

4 years agotsdemux: Set mpegversion for AAC ADTS stream based on parsed ADTS header
Seungha Yang [Fri, 20 Mar 2020 11:27:05 +0000 (20:27 +0900)]
tsdemux: Set mpegversion for AAC ADTS stream based on parsed ADTS header

Both 2 and 4 are supported version of AAC ADTS format stream.
So we need to set correct version to help negotiation
especially for non-autopluggable pipeline.

4 years agomsdkh265dec: add support for main-12, main-12-intra profiles
Haihao Xiang [Tue, 10 Mar 2020 07:42:48 +0000 (15:42 +0800)]
msdkh265dec: add support for main-12, main-12-intra profiles

The video format is P012_LE

4 years agomsdk: map P012_LE to VA_FOURCC_P016
Haihao Xiang [Tue, 10 Mar 2020 08:03:55 +0000 (16:03 +0800)]
msdk: map P012_LE to VA_FOURCC_P016

In media driver, VA_FOURCC_P016 is used for semi-planar 12 bits YUV
format, the corresponding RT format is VA_RT_FORMAT_YUV420_12

4 years agomsdk: map MFX_FOURCC_P016 to VA_FOURCC_P016
Haihao Xiang [Tue, 10 Mar 2020 07:41:50 +0000 (15:41 +0800)]
msdk: map MFX_FOURCC_P016 to VA_FOURCC_P016

P016 is used for semi-planar 12 bits format in the media driver, so the
RT format is VA_RT_FORMAT_YUV420_12

4 years agomsdk: map P012_LE to MFX_FOURCC_P016
Haihao Xiang [Tue, 10 Mar 2020 07:32:43 +0000 (15:32 +0800)]
msdk: map P012_LE to MFX_FOURCC_P016

MFX_FOURCC_P016 is used for semi planar 12 bits YUV format in MediaSDK

4 years agomsdkvp9enc: add support for 10 bits 444 input
Haihao Xiang [Fri, 20 Mar 2020 06:53:40 +0000 (14:53 +0800)]
msdkvp9enc: add support for 10 bits 444 input

The input format is Y410 in sink pad and the corresponding profile in
src pad is profile 3

4 years agomsdkvp9enc: add support for 8 bits 444 input
Haihao Xiang [Fri, 20 Mar 2020 06:38:12 +0000 (14:38 +0800)]
msdkvp9enc: add support for 8 bits 444 input

The input format is VUYA in sink pad and the corresponding profile in
src pad is profile 1

4 years agomsdkbufferpool: Fix build warning on Windows
Seungha Yang [Sun, 22 Mar 2020 13:30:15 +0000 (22:30 +0900)]
msdkbufferpool: Fix build warning on Windows

gstmsdkbufferpool.c(274): warning C4101: 'fd': unreferenced local variable

4 years agoexamples/wayland: unref GstContext after use
Guillermo Rodríguez [Wed, 22 Jan 2020 11:29:03 +0000 (11:29 +0000)]
examples/wayland: unref GstContext after use

4 years agomsdkvpp: add YV12 format to src pad
U. Artie Eoff [Thu, 19 Mar 2020 16:28:28 +0000 (09:28 -0700)]
msdkvpp: add YV12 format to src pad

VPP YV12 output format support added since
MFX_VERSION 1032.

https://github.com/Intel-Media-SDK/MediaSDK/pull/2027

4 years agonvdec: Add fallback for CUDA/OpenGL interop failure
Seungha Yang [Sun, 15 Mar 2020 10:20:47 +0000 (19:20 +0900)]
nvdec: Add fallback for CUDA/OpenGL interop failure

It happens when local OpenGL context belongs to non-nvidia GPU.

4 years agolibs: codecparser: add missing unstable api warning
Victor Manuel Jaquez Leal [Mon, 16 Mar 2020 16:19:04 +0000 (17:19 +0100)]
libs: codecparser: add missing unstable api warning

mpeg4 and vp8 parsers didn't show that compilation warning as the
others parsers.

4 years agowebrtcdsp: Fix documentation markup
Philippe Normand [Sun, 15 Mar 2020 12:44:31 +0000 (12:44 +0000)]
webrtcdsp: Fix documentation markup

4 years agoopenni2: Remove spurious gtk-doc markers
Philippe Normand [Sun, 15 Mar 2020 10:46:24 +0000 (10:46 +0000)]
openni2: Remove spurious gtk-doc markers

4 years agodecklink: Remove spurious gtk-doc marker
Philippe Normand [Sun, 15 Mar 2020 10:45:25 +0000 (10:45 +0000)]
decklink: Remove spurious gtk-doc marker

4 years agodocs: Scan C++ files too
Philippe Normand [Fri, 13 Mar 2020 17:47:46 +0000 (17:47 +0000)]
docs: Scan C++ files too

4 years agomsdk: meson: check whether mfxExtVP9Param is defined
Haihao Xiang [Wed, 12 Feb 2020 03:23:18 +0000 (11:23 +0800)]
msdk: meson: check whether mfxExtVP9Param is defined

User reported MFX_VERSION is 1026 however the build is broken[1], so add
the check for mfxExtVP9Param to make sure it can be build without
compiler error.

In addtion, it fixes a stupid typo (#endif') introduced by me.

[1] https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/merge_requests/988#note_408093

4 years agoasfmux: Fix typo in property description
rubenrua [Thu, 12 Mar 2020 11:13:10 +0000 (12:13 +0100)]
asfmux: Fix typo in property description

s/milisecs/milliseconds/g

4 years agotimecodestamper: Plug a leak
Thibault Saunier [Thu, 12 Mar 2020 00:37:27 +0000 (21:37 -0300)]
timecodestamper: Plug a leak

4 years agompegts: Add a property to ignore broken PCR streams
Edward Hervey [Sat, 1 Feb 2020 10:52:04 +0000 (11:52 +0100)]
mpegts: Add a property to ignore broken PCR streams

Some mpeg-ts (HLS, DVB, ...) streams out there have completely broken
PCR streams on which we can't reliably recover correct timestamps.

For those, provide a property that will ignore the program PCR stream
(by faking that it's not present (0x1fff)).

4 years agompegdemux: Add ignore-scr property to ignore broken SCR
Seungha Yang [Wed, 11 Mar 2020 08:18:56 +0000 (17:18 +0900)]
mpegdemux: Add ignore-scr property to ignore broken SCR

Some MPEG-PS streams might not be compliant but the SCR can be ignored
if PTS/DTS in PES header is consistently increased.

4 years agompegdemux: Remove whitespace
Seungha Yang [Wed, 11 Mar 2020 08:42:18 +0000 (17:42 +0900)]
mpegdemux: Remove whitespace