platform/upstream/gstreamer.git
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

4 years agosmoothstreaming: fix H264 CodecPrivateData parsing
yychao [Tue, 10 Mar 2020 03:52:23 +0000 (11:52 +0800)]
smoothstreaming: fix H264 CodecPrivateData parsing

Do not pass SPS nal_unit_type (0x67) into gst_h264_parse_sps()

Fixes #648

4 years agoh265parse: In-band sps/pps update if only codec_data differs in src caps
Seungha Yang [Tue, 10 Mar 2020 08:40:28 +0000 (17:40 +0900)]
h265parse: In-band sps/pps update if only codec_data differs in src caps

Apply in-band sps/pps resending implementation to h265parse.

4 years agoh264parse: In-band sps/pps update if only codec_data differs in src caps
Seungha Yang [Tue, 10 Mar 2020 04:20:17 +0000 (13:20 +0900)]
h264parse: In-band sps/pps update if only codec_data differs in src caps

Initially the case "only codec_data is different" was addressed in
https://bugzilla.gnome.org/show_bug.cgi?id=705333 in order for
unusual bitstreams to be handled. That's the case where sps and pps
are placed in bitstream. When sps/pps are signalled only via caps
by upstream, however, the updated codec_data is mandatory for decoder
and therefore we shouldn't ignore them.

4 years agotsdemux: Add format_identifier for AC4 codec
Dong Il Park [Tue, 10 Mar 2020 07:32:59 +0000 (16:32 +0900)]
tsdemux: Add format_identifier for AC4 codec

According to following spec document, add format_identifier for AC4 in tsdemux.

ETSI TS 103 190-2 V1.2.1 : Annex D : AC-4 in MPEG-2 transport stream

4 years agotsdemux: Add support for AC4
yychao [Mon, 9 Mar 2020 09:00:01 +0000 (17:00 +0800)]
tsdemux: Add support for AC4

According to following two specs, add support for AC4 in tsdemux.

1. ETSI TS 103 190-2 V1.2.1 (2018-02) : Annex D (normative): AC-4 in MPEG-2 transport streams
2. ETSI EN 300 468 V1.16.1 (2019-08) : Annex D (normative):Service information implementation of AC-3, EnhancedAC-3, and AC-4 audio in DVB systems

4 years agowebrtcbin: Use GPtrArrays or store items inline instead of using GArrays of pointers
Sebastian Dröge [Mon, 9 Mar 2020 19:21:19 +0000 (21:21 +0200)]
webrtcbin: Use GPtrArrays or store items inline instead of using GArrays of pointers

4 years agowebrtcbin: Prevent ICE gathering state reaching complete early
Jan Schmidt [Mon, 9 Mar 2020 18:18:40 +0000 (05:18 +1100)]
webrtcbin: Prevent ICE gathering state reaching complete early

The ICE gathering state can transition to complete prematurely if the
underlying ICE components complete their gathering while the initial
ICE gathering state task is queued and still pending.

In that situation, the ice gathering state task will report complete
while there are still ICE candidates queued for emission.

Prevent that by storing ICE candidates in an array and checking if
there are any pending before reporting a completed ICE gathering
state.

4 years agowebrtc: Protect the pending ICE candidates array
Jan Schmidt [Mon, 9 Mar 2020 17:22:57 +0000 (04:22 +1100)]
webrtc: Protect the pending ICE candidates array

ICE candidates can be added to the array directly from the application
or from the webrtc main loop. Rename it to make it clear that it's
holding remote ICE candidates from the peer, and protect it with a
new mutex

4 years agod3d11vp9dec: Add support for internal frame resizing
Seungha Yang [Sat, 7 Mar 2020 10:41:53 +0000 (19:41 +0900)]
d3d11vp9dec: Add support for internal frame resizing

VP9 codec allows resizing reference frame by spec. Handling this case
is a bit tricky especially when the resizing happens on non-keyframe,
because pre-allocated decoder textures (i.e., dpb) have negotiated
resolution and to change resolution meanwhile decoding on non-keyframe,
each texture might need to be re-created, copied to new dpb somehow,
and re-negotiated with downstream.

Due to the complicated requirement of negotiation driven
resizing handling, this commit adds shader into d3d11decoder object
to resize only corresponding frames. Note that if the resolution change
is detected on keyframe, decoder will re-negotiate with downstream.

4 years agod3d11decoder: Set GstVideoAlignment to downstream d3d11 buffer pool
Seungha Yang [Sat, 7 Mar 2020 10:38:30 +0000 (19:38 +0900)]
d3d11decoder: Set GstVideoAlignment to downstream d3d11 buffer pool

To copy decoder output texture to another d3d11 texture, the downstream
texture needs to be aligned too.

4 years agod3d11decoder: Use aligned resolution for staging texture
Seungha Yang [Sat, 7 Mar 2020 07:42:14 +0000 (16:42 +0900)]
d3d11decoder: Use aligned resolution for staging texture

Not only any textures for decoder output view, any destination texture
which would be copied from decoder output texture need to be aligned too.
Otherwise driver sometimes crashed/hung (not sure why).

4 years agod3d11colorconverter: Add support cropping
Seungha Yang [Sat, 7 Mar 2020 09:29:20 +0000 (18:29 +0900)]
d3d11colorconverter: Add support cropping

Vertex buffer will be updated if input texture resolution is different
from GstVideoInfo or when an user requests specific crop area.

4 years agod3d11bufferpool: Add padding space for semi-planar YUV formats
Seungha Yang [Sat, 7 Mar 2020 06:10:43 +0000 (15:10 +0900)]
d3d11bufferpool: Add padding space for semi-planar YUV formats

Resolution of NV12, P010, and P016 formats must be multiple of two.
Otherwise texture cannot be created. Instead of doing this alignment
per API consumer side, do this in buffer pool for simplicity.

4 years agoh265decoder: Pass max_dpb_size to new_sequence vfunc
Seungha Yang [Sun, 8 Mar 2020 07:10:41 +0000 (16:10 +0900)]
h265decoder: Pass max_dpb_size to new_sequence vfunc

same as we are doing in h264decoder

4 years agod3d11h264dec: Make use of max_dpb_size passed by baseclass
Seungha Yang [Sun, 8 Mar 2020 07:03:35 +0000 (16:03 +0900)]
d3d11h264dec: Make use of max_dpb_size passed by baseclass

Most likely this modification can save GPU memory.

4 years agod3d11h265dec: Fix scaling list parsing
Seungha Yang [Wed, 26 Feb 2020 11:24:14 +0000 (20:24 +0900)]
d3d11h265dec: Fix scaling list parsing

Scaling list can be signalled via sps or pps. Decoder should check
both of them.

4 years agod3d11h265dec: Properly signal the ucNumDeltaPocsOfRefRpsIdx
Seungha Yang [Wed, 26 Feb 2020 08:44:52 +0000 (17:44 +0900)]
d3d11h265dec: Properly signal the ucNumDeltaPocsOfRefRpsIdx

ucNumDeltaPocsOfRefRpsIdx should be the NumDeltaPocs[RefRpsIdx].

4 years agoh265parser: Store NumDeltaPocs of reference for hardware accelerators
Seungha Yang [Wed, 26 Feb 2020 08:33:59 +0000 (17:33 +0900)]
h265parser: Store NumDeltaPocs of reference for hardware accelerators

That's the value of NumDeltaPocs[RefRpsIdx] and we might be able to derive
the value from given sps and slice header.
Because well known hardware implementations refer to the value, however,
storing the value makes things easier.

Following is the list of hardware implementations
* DXVA2: ucNumDeltaPocsOfRefRpsIdx
* NVDEC/VDPAU: NumDeltaPocsOfRefRpsIdx

4 years agoh265decoder: Fix for output and removal picture from DPB
Seungha Yang [Mon, 24 Feb 2020 11:53:49 +0000 (20:53 +0900)]
h265decoder: Fix for output and removal picture from DPB

See C.5.2.2 Output and removal of pictures from the DPB.

If the number of pictures in the DPB is greater than or equal to
sps_max_dec_pic_buffering_minus1[HighestTid] + 1, then the picture
should be outputted.

4 years agomeson: codecs: Don't install header
Seungha Yang [Fri, 6 Mar 2020 07:40:50 +0000 (16:40 +0900)]
meson: codecs: Don't install header

This library is not intended to be public. APIs are likely to
change over time and should not be disclosed to people yet.

4 years agoh264decoder: Rename some internals
Seungha Yang [Thu, 5 Mar 2020 05:40:28 +0000 (14:40 +0900)]
h264decoder: Rename some internals

No more a part of d3d11 implementation

4 years agovp9decoder: Update document
Seungha Yang [Thu, 5 Mar 2020 05:35:14 +0000 (14:35 +0900)]
vp9decoder: Update document

s/GstH264Picture/GstVp9Picture/g and minor update since this baseclass
is no more d3d11 specific one.

4 years agocodecs: Change output_picture() to mandatory implementation
Seungha Yang [Thu, 5 Mar 2020 05:29:22 +0000 (14:29 +0900)]
codecs: Change output_picture() to mandatory implementation

GstVideoCodecFrame is expected to be consumed by subclass
per output_picture(). So the implementation cannot be optional.

4 years agoh265decoder: Port to nal type classification macro
Seungha Yang [Thu, 5 Mar 2020 08:23:34 +0000 (17:23 +0900)]
h265decoder: Port to nal type classification macro

... and remove namespaceless macro methods from baseclass

4 years agoh265parser: Add helper macro for nal type classification
Seungha Yang [Thu, 5 Mar 2020 06:18:35 +0000 (15:18 +0900)]
h265parser: Add helper macro for nal type classification

Add some macros to remove code duplication and to make it more readable

4 years agotranscodebin: Avoid elements name duplication
Thibault Saunier [Thu, 5 Mar 2020 12:17:49 +0000 (09:17 -0300)]
transcodebin: Avoid elements name duplication

By just letting GStreamer choose a good name

4 years agod3d11: Use gst_video_decoder_get_frame()
Nicolas Dufresne [Tue, 3 Mar 2020 20:21:07 +0000 (15:21 -0500)]
d3d11: Use gst_video_decoder_get_frame()

Now that the system_frame_number is saved on the pictures we can use
gst_video_decoder_get_frame() helper instead of getting the full list
and looping over it.

4 years agoh264picture: Add system_frame_num
Nicolas Dufresne [Sat, 15 Feb 2020 02:50:15 +0000 (21:50 -0500)]
h264picture: Add system_frame_num

This allow cross-referencing GstH264Picture and GstVideoCodecFrame.

4 years agoh264parser: Add some fixmes
Nicolas Dufresne [Sat, 15 Feb 2020 02:49:12 +0000 (21:49 -0500)]
h264parser: Add some fixmes

Some of the syntax element do not use the spec name, which makes them harder
to find in the spec.

4 years agocodecs: Pass the max_dpb_size to new_segment virtual
Nicolas Dufresne [Thu, 13 Feb 2020 04:48:16 +0000 (23:48 -0500)]
codecs: Pass the max_dpb_size to new_segment virtual

On new_segment, the decoder is expected to negotiate. The decoder may want to
pre-allocate the needed buffers. Pass the max_dpb_size as this is needed to
determin how many buffers should be allocated.

4 years agocodecs: Add missing auto cleanup funcs
Nicolas Dufresne [Sun, 9 Feb 2020 16:20:16 +0000 (11:20 -0500)]
codecs: Add missing auto cleanup funcs

4 years agoMove CODEC base classes into it's own library
Nicolas Dufresne [Fri, 31 Jan 2020 22:54:57 +0000 (17:54 -0500)]
Move CODEC base classes into it's own library

This introduce a library which contains a set of base classes which
handles the parsing and the state tracking for the purpose of decoding
different CODECs. Currently H264, H265 and VP9 are supported. These
bases classes are used to decode with low level decoding API like DXVA,
NVDEC, VDPAU, VAAPI and V4L2 State Less decoders. The new library is
named gstreamer-codecs-1.0 / libgstcodecs.

4 years agowebrtc: Don't crash in ICE gathering
Jan Schmidt [Wed, 4 Mar 2020 17:18:03 +0000 (04:18 +1100)]
webrtc: Don't crash in ICE gathering

Fix a crash collating ICE gathering states if there are
unassociated transceivers in the list with no TransportStream

4 years agotranscodebin: add converters before filters
Guillaume Desmottes [Tue, 3 Mar 2020 09:26:47 +0000 (14:56 +0530)]
transcodebin: add converters before filters

User doesn't have any guarantee about the actual raw format decodebin will
produce so their filters may or may not fit.

Fix #1228

4 years agotranscodebin: fix logs when failing to link filter
Guillaume Desmottes [Tue, 3 Mar 2020 09:51:31 +0000 (15:21 +0530)]
transcodebin: fix logs when failing to link filter

- Display caps of the pad we actually tried to link.
- Use the template caps as the filter is likely to not have any caps set
  yet.
- Log pad name as well.

4 years agotimecodestamper: Add seeking support
Thibault Saunier [Fri, 21 Feb 2020 16:12:39 +0000 (13:12 -0300)]
timecodestamper: Add seeking support

The approach is quite simple and doesn't take all use cases into account,
it only implements support when we are using the internal timecode we
create ourself.

Also the way we compute the sought frame count is naive, but it works
for simple cases.

4 years agowebrtc: Unblock transportreceivebin for send-only bundled streams
Jan Schmidt [Mon, 2 Mar 2020 16:39:50 +0000 (03:39 +1100)]
webrtc: Unblock transportreceivebin for send-only bundled streams

If there is any active mline in a bundle, we need to unblock
the transportreceivebin for DTLS setup and RTCP reception,
otherwise no data can ever start flowing.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/1206

4 years agowebrtc: Remove RECEIVE_STATE_DROP from transportreceivebin
Jan Schmidt [Fri, 28 Feb 2020 14:47:52 +0000 (01:47 +1100)]
webrtc: Remove RECEIVE_STATE_DROP from transportreceivebin

As per discussion in the bug, remove the drop state from transportreceivebin.
Dropping data is necessary, but for bundled config, needs to happen
further downstream after mixed flows have been separated.

Also support switching back to BLOCK from PASS state.

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

4 years agobuild: Fix build on systems with wayland-client headers in non-default location
Dominique Leuenberger [Thu, 27 Feb 2020 13:54:13 +0000 (14:54 +0100)]
build: Fix build on systems with wayland-client headers in non-default location

Add a missing dependency to wl_client_dep for the wayland build. Some distros
have the wayland-client headers not installed in /usr/include (which is perfectly
valid, the pkg-config .pc file gives the right feedback).

4 years agod3d11vp9dec: Add support for reverse playback
Seungha Yang [Mon, 2 Mar 2020 06:22:49 +0000 (15:22 +0900)]
d3d11vp9dec: Add support for reverse playback

This commit moves parsing code for superframe and frame header into
handle_frame() method, and removes parse() implementation from vp9decoder
baseclass.

The combination of
- multiple frames are packed in a given input buffer (i.e., superframe)
- reverse playback
seems to be complicated and also it doesn't work as intended in some case

4 years agortmp2: Only grab stats on close when connection exists
Jan Alexander Steffens (heftig) [Tue, 3 Mar 2020 09:49:08 +0000 (10:49 +0100)]
rtmp2: Only grab stats on close when connection exists

If the connection attempt failed, self->connection is NULL.

4 years agoopenslessink: Allow openslessink to handle 48kHz streams.
Matthew Read [Sat, 29 Feb 2020 12:49:06 +0000 (12:49 +0000)]
openslessink: Allow openslessink to handle 48kHz streams.

The most common audio sample rate in AV streams is 48kHz, and the most
common device output sample rate is 48kHz. This allows handing of 48kHz
input streams without resampling.

Remove comments about avoiding the use of 48kHz.

4 years agodecklink: Add support for 2K DCI video modes
Heinrich Kruger [Thu, 27 Feb 2020 14:10:16 +0000 (14:10 +0000)]
decklink: Add support for 2K DCI video modes

Extend the video modes supported by the decklink plugin to include 2K
DCI video modes.

4 years agodecklink: Update Decklink SDK to 10.11.4
Heinrich Kruger [Thu, 27 Feb 2020 11:32:17 +0000 (11:32 +0000)]
decklink: Update Decklink SDK to 10.11.4

This change is needed to support 2K DCI video modes.

Version 10.8 of the Decklink SDK supported DCI video modes for output
only. This updated version drops that restriction.

The current latest version of the Decklink SDK is 11.5, however
the gstreamer decklink plugin is not compatible with API changes
introduced in version 11 of the SDK. Therefore I have opted to upgrade
to the latest 10.x version instead.

4 years agodash: add build-dep on pbutils
Matthew Waters [Tue, 3 Mar 2020 03:27:32 +0000 (14:27 +1100)]
dash: add build-dep on pbutils

Fixes dependency issues:

FAILED: subprojects/gst-plugins-bad/ext/dash/8bd0b95@@gstdash@sha/gstdashsink.c.obj
cl @subprojects/gst-plugins-bad/ext/dash/8bd0b95@@gstdash@sha/gstdashsink.c.obj.rsp
C:\builds\ystreet\gst-plugins-base\gst-build\subprojects\gst-plugins-base\gst-libs\gst/pbutils/pbutils.h(30): fatal error C1083: Cannot open include file: 'gst/pbutils/pbutils-enumtypes.h': No such file or directory

4 years agovulkan/window/xcb: implement keyboard support
Matthew Waters [Tue, 18 Feb 2020 03:02:14 +0000 (14:02 +1100)]
vulkan/window/xcb: implement keyboard support

4 years agovulkan/window/xcb: implement mouse event support
Matthew Waters [Mon, 17 Feb 2020 04:09:58 +0000 (15:09 +1100)]
vulkan/window/xcb: implement mouse event support

4 years agovulkan/sink: implement GstNavigation support
Matthew Waters [Mon, 17 Feb 2020 04:08:47 +0000 (15:08 +1100)]
vulkan/sink: implement GstNavigation support

4 years agovulkan/swapper: add get_surface_rectangles
Matthew Waters [Mon, 17 Feb 2020 04:07:10 +0000 (15:07 +1100)]
vulkan/swapper: add get_surface_rectangles

Retrieve the input, output and covered rectangles.

4 years agovulkan/display: implement thread-safe find_window()
Matthew Waters [Mon, 17 Feb 2020 04:05:49 +0000 (15:05 +1100)]
vulkan/display: implement thread-safe find_window()

4 years agovulkan/window: add support for mouse/keyboard events
Matthew Waters [Mon, 17 Feb 2020 04:03:34 +0000 (15:03 +1100)]
vulkan/window: add support for mouse/keyboard events

4 years agod3d11videosink: Clarify the meaning of various width and height variables
Seungha Yang [Mon, 2 Mar 2020 11:55:29 +0000 (20:55 +0900)]
d3d11videosink: Clarify the meaning of various width and height variables

* Remove redundant variables for width/height and par from GstD3D11Window.
  GstVideoInfo holds all the values.
* Don't need to pass par to gst_d3d11_window_prepare().
  It will be parsed from caps again
* Remove duplicated math

Fixing regression of the commit 9dada901083fec3276cb2df58785db14b87e8f22

4 years agod3d11vp9dec: Port to GstVP9SuperframeInfo
Yeongjin Jeong [Thu, 27 Feb 2020 18:08:23 +0000 (03:08 +0900)]
d3d11vp9dec: Port to GstVP9SuperframeInfo

The vp9parser is now exposed new API for parsing superframe info.

4 years agotests: vp9parser: Add test parsing superframe
Yeongjin Jeong [Sun, 1 Mar 2020 15:43:45 +0000 (00:43 +0900)]
tests: vp9parser: Add test parsing superframe

4 years agovp9parser: Add new API for parsing superframe info
Yeongjin Jeong [Thu, 27 Feb 2020 18:06:47 +0000 (03:06 +0900)]
vp9parser: Add new API for parsing superframe info

Some elements are using their own implementations for superframe parsing.
To reduce redundant code, we need to add API to the parser.