platform/upstream/gstreamer.git
3 years agova: example: multiple-vpp: test direction change
Víctor Manuel Jáquez Leal [Fri, 12 Mar 2021 11:36:52 +0000 (12:36 +0100)]
va: example: multiple-vpp: test direction change

If the driver supports it (iHD, so far) and the parameter -d is set,
the direction of the video will be changed randomly.

In the code you can select, at compilation time, if the direction
change is done by element's property or by pipeline events.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2074>

3 years agova: postproc: update passthrough and reconfigure pads
Víctor Manuel Jáquez Leal [Thu, 11 Mar 2021 17:53:09 +0000 (18:53 +0100)]
va: postproc: update passthrough and reconfigure pads

Added helper function _update_passthrough() which will define and set
the pass-through mode of the filter, and it'll either reconfigure both
pads or it will just mark the src pad for renegotiation or nothing at
all.

There are cases where both pads have to be reconfigured (direction
changed, for example), other when just src pad has to (filters
updated) or none (changing to ready state).

The requirement of renegotiation depends on the need to enable/disable
its VA buffer pools.

This patch sets pass-through mode by default, so the buffer pools
aren't allocated if no filtering/direction operations are defined,
which is the correct behavior.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2074>

3 years agozxing: update to support version 1.1.1
Stéphane Cerveau [Thu, 25 Feb 2021 13:09:50 +0000 (14:09 +0100)]
zxing: update to support version 1.1.1

Support new API in 1.1.1
Update the supported input video format.
Update tests to use parse_launch

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2037>

3 years agompegvideoparse: do not clip the frame
Stéphane Cerveau [Wed, 10 Mar 2021 12:10:28 +0000 (13:10 +0100)]
mpegvideoparse: do not clip the frame

If the current buffer is delta unit such as P or B
frame, the buffer should not be clipped and need to
let the decoder handle the segment boundary situation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2070>

3 years agod3d11device: Fix wrong printf formatting
Seungha Yang [Wed, 10 Mar 2021 17:36:28 +0000 (02:36 +0900)]
d3d11device: Fix wrong printf formatting

Add missing '%' there

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2069>

3 years agotranscoder: Add state-changed signal
Philippe Normand [Sat, 20 Feb 2021 11:36:42 +0000 (11:36 +0000)]
transcoder: Add state-changed signal

Similar to GstPlayer, a new signal for state tracking is now emitted at runtime,
as a commodity for applications which then don't need to monitor the pipeline
GstBus for state changes anymore.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2028>

3 years agoplayer: Rewrite as GstPlay wrapper
Philippe Normand [Mon, 7 Dec 2020 10:47:30 +0000 (10:47 +0000)]
player: Rewrite as GstPlay wrapper

For the time being the GstPlayer library remains as a wrapper for GstPlay, in
order to keep existing applications working and give them time to port to
GstPlay. GstPlayer will remain in -bad for a couple cycles and the plan for
GstPlay is to move it to -base before 1.20.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2061>

3 years agoplay: Flush API bus before exiting main loop
Philippe Normand [Mon, 7 Dec 2020 09:56:26 +0000 (09:56 +0000)]
play: Flush API bus before exiting main loop

Otherwise the bus might attempt to dispatch queued messages after the thread
ended, causing runtime warnings.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2061>

3 years agoplay: tests: Switch user-agent test to a real HTTP server
Philippe Normand [Sun, 29 Nov 2020 18:55:48 +0000 (18:55 +0000)]
play: tests: Switch user-agent test to a real HTTP server

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2061>

3 years agoplay: tests: Refactor to use new Message bus API
Philippe Normand [Sat, 14 Nov 2020 10:56:51 +0000 (10:56 +0000)]
play: tests: Refactor to use new Message bus API

Instead of relying on an extra GMainLoop, the messages are poped from the player
bus and handled synchronously. This should avoid flaky behaviors.

Fixes #608

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2061>

3 years agoplay: Plug media_info leak
Philippe Normand [Sat, 14 Nov 2020 10:47:53 +0000 (10:47 +0000)]
play: Plug media_info leak

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2061>

3 years agoplay: Rename internal buffering field to buffering_percent
Stephan Hesse [Tue, 28 Apr 2020 19:09:40 +0000 (21:09 +0200)]
play: Rename internal buffering field to buffering_percent

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2061>

3 years agoplay: Introducing the new playback library
Stephan Hesse [Sat, 2 Nov 2019 15:14:13 +0000 (16:14 +0100)]
play: Introducing the new playback library

This aims to be a replacement for the GstPlayer library. In GstPlay, notifications are
sent as application messages through a dedicated GstBus. The GMainContext-based
signal dispatcher was replaced by a GObject signal adapter, now relying on the
bus to emit its signals. The signal dispatcher is now optional and fully
decoupled from the GstPlay object.

Co-authored with: Philippe Normand <philn@igalia.com>

Fixes #394

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2061>

3 years agoavwait: Don't post messages with the mutex locked
Sebastian Dröge [Tue, 9 Mar 2021 11:00:10 +0000 (13:00 +0200)]
avwait: Don't post messages with the mutex locked

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2063>

3 years agowebrtc: don't generate duplicate rtx payloads when bundle-policy is set
Matthew Waters [Mon, 1 Mar 2021 09:53:53 +0000 (20:53 +1100)]
webrtc: don't generate duplicate rtx payloads when bundle-policy is set

It was possible to generate a SDP that had an RTX payload type
that matched one of the media payload types when providing caps via
codec_preferences without any sink pads.

Fixes

m=video 9 UDP/TLS/RTP/SAVPF 96
...
a=rtpmap:96 VP8/90000
a=rtcp-fb:96 nack pli
a=fmtp:96 apt=96

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2046>

3 years agotests: Add negotiation tests for the interlace elements
Vivia Nikolaidou [Mon, 8 Mar 2021 12:30:52 +0000 (14:30 +0200)]
tests: Add negotiation tests for the interlace elements

Many complicated cases exist. Would be good to have some checks.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2062>

3 years agointerlace: Discard stored_frame on EOS and PAUSED_TO_READY
Vivia Nikolaidou [Mon, 8 Mar 2021 18:59:14 +0000 (20:59 +0200)]
interlace: Discard stored_frame on EOS and PAUSED_TO_READY

Would otherwise leak it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2062>

3 years agointerlace: Specify interlace-modes in the sink pad template
Vivia Nikolaidou [Mon, 8 Mar 2021 14:16:25 +0000 (16:16 +0200)]
interlace: Specify interlace-modes in the sink pad template

Especially specify the field-order in the interleaved mode. Otherwise it
might cause the negotiation to fail, because
GST_PAD_SET_ACCEPT_INTERSECT is not set on the sinkpad, and the
field-order is missing in the sink template but can be present in the
outside caps.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2062>

3 years agonvh264sldec: Reopen decoder object if larger DPB size is required
Seungha Yang [Sun, 7 Mar 2021 07:47:07 +0000 (16:47 +0900)]
nvh264sldec: Reopen decoder object if larger DPB size is required

Equivalent to the d3d11h264dec fix
https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1839

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2059>

3 years agod3d11: Fix an HLSL compiler warning
Seungha Yang [Tue, 2 Mar 2021 16:23:20 +0000 (01:23 +0900)]
d3d11: Fix an HLSL compiler warning

warning X3578: Output value 'main' is not completely initialized

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2052>

3 years agotranscoder: handle SIGINT and SIGHUP
Bing Song [Wed, 27 Jan 2021 02:55:13 +0000 (10:55 +0800)]
transcoder: handle SIGINT and SIGHUP

Handle SIGINT and SIGHUP in transcoder. Or the output file maybe corrupt.

Fixes #1507

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1987>

3 years agod3d11h264dec: Keep track of actually configured DPB size
Seungha Yang [Thu, 4 Mar 2021 08:42:28 +0000 (17:42 +0900)]
d3d11h264dec: Keep track of actually configured DPB size

... instead of the largest we ever seen.
Note that d3d11h264dec element holds previously configured DPB size
for later decoder object re-open decision.

This is to fix below case:
1) Initial SPS, required DPB size is 6
  - decoder object is opened with DPB size 6
  - max_dpb_size is now 6
2) SPS update with resolution change, required DPB size is 1
  - decoder object is re-opened with DPB size 1
  - max_dpb_size should be updated to 1, but it didn't happen (BUG)
3) SPS update without resolution change, only required DPB size is updated to 6
  - decoder object should be re-opened but didn't happen
    because we didn't update max_dpb_size at 2).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2056>

3 years agointerlace: add more formats, esp 10-bit, 12-bit and 16-bit ones
Tim-Philipp Müller [Wed, 3 Mar 2021 16:19:39 +0000 (16:19 +0000)]
interlace: add more formats, esp 10-bit, 12-bit and 16-bit ones

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2054>

3 years agov4l2codecs: h264: retrieve interlaced information
Benjamin Gaignard [Tue, 16 Feb 2021 10:23:17 +0000 (11:23 +0100)]
v4l2codecs: h264: retrieve interlaced information

Lets the decoder knows if the frames are interlaced or not.
Provide this information to the driver while filling reference
pictures fields in slice params structure

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1624>

3 years agov4l2codecs: h264: Reduce controls for subsequent slices
Nicolas Dufresne [Fri, 27 Nov 2020 21:00:03 +0000 (16:00 -0500)]
v4l2codecs: h264: Reduce controls for subsequent slices

Only the SLICE_PARAMS and PRED_WEIGHTS are needed for the second and
following slices.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1624>

3 years agov4l2codecs: h264: Implement optional scaling matrix
Ezequiel Garcia [Fri, 14 Aug 2020 13:13:09 +0000 (10:13 -0300)]
v4l2codecs: h264: Implement optional scaling matrix

The new H.264 uAPI requires that all drivers support
scaling matrix only as an option, when a non-flat
scaling matrix is provided in the bitstream headers.

Take advantage of this and avoid passing the scaling
matrix if not needed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1624>

3 years agov4l2codecs: h264: Only set SPS control if needed
Ezequiel Garcia [Wed, 30 Sep 2020 17:34:15 +0000 (14:34 -0300)]
v4l2codecs: h264: Only set SPS control if needed

Given V4L2 controls are cached in V4L2, there is no need
to set them if they don't change. Set the SPS control
only if a new sequence was received by the parser.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1624>

3 years agov4l2codecs: h264: Only slice-based need SLICE_PARAMS and PRED_WEIGHTS
Ezequiel Garcia [Wed, 30 Sep 2020 17:22:14 +0000 (14:22 -0300)]
v4l2codecs: h264: Only slice-based need SLICE_PARAMS and PRED_WEIGHTS

Frame-based decoding mode doesn't require SLICE_PARAMS and
PRED_WEIGHTS controls.

Moreover, if the driver doesn't support these two controls, trying
to set them will fail. Fix this by only setting these on
slice-based decoding mode.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1624>

3 years agov4l2codecs: h264: Add API checks
Ezequiel Garcia [Wed, 30 Sep 2020 17:14:41 +0000 (14:14 -0300)]
v4l2codecs: h264: Add API checks

Check that the V4L2 H264 controls' sizes match
our expectation. If not, then probably there's an API
mismatch which will cause errors or decoding corruption.

Also, print a warning if the kernel version is too old.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1624>

3 years agov4l2codecs: h264: Update to the new uAPI
Ezequiel Garcia [Wed, 30 Sep 2020 13:40:51 +0000 (10:40 -0300)]
v4l2codecs: h264: Update to the new uAPI

Starting from Linux v5.11, the V4L2 stateless H.264 uAPI
is updated and stable.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1624>

3 years agov4l2codecs: h264: Set the scaling matrix present flag unconditionally
Ezequiel Garcia [Wed, 30 Sep 2020 13:33:59 +0000 (10:33 -0300)]
v4l2codecs: h264: Set the scaling matrix present flag unconditionally

We are currently always setting and passing a scaling matrix,
so need to set this flag accordingly. Passing a scaling matrix
optionally will be implemented in follow-up commit.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1624>

3 years agova: postproc: mention the possibility of color balance
Víctor Manuel Jáquez Leal [Tue, 2 Mar 2021 11:46:24 +0000 (12:46 +0100)]
va: postproc: mention the possibility of color balance

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2050>

3 years agodocs: plugins update VA elements
Víctor Manuel Jáquez Leal [Tue, 2 Mar 2021 11:46:06 +0000 (12:46 +0100)]
docs: plugins update VA elements

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2050>

3 years agova: vp8dec, vp9dec: only set NV12 color format for documentation
Víctor Manuel Jáquez Leal [Tue, 2 Mar 2021 11:44:12 +0000 (12:44 +0100)]
va: vp8dec, vp9dec: only set NV12 color format for documentation

Mention in documentation only the most used output format in VA-API.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2050>

3 years agod3d11convert: Forward colorimetry and chroma-site from upstream
Seungha Yang [Tue, 2 Mar 2021 13:01:26 +0000 (22:01 +0900)]
d3d11convert: Forward colorimetry and chroma-site from upstream

Adopt the improvement of https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1033
into d3d11.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2051>

3 years agod3d11convert: Add support for border drawing
Seungha Yang [Tue, 2 Mar 2021 08:47:03 +0000 (17:47 +0900)]
d3d11convert: Add support for border drawing

... and fix wrong resizing when downstream requested PAR value

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2051>

3 years agod3d11convert: Prefer video processor over shader
Seungha Yang [Tue, 2 Mar 2021 12:35:00 +0000 (21:35 +0900)]
d3d11convert: Prefer video processor over shader

... if video processor was used previously. Otherwise, switching
between video processor and shader would result in inconsistent
output image quality.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2051>

3 years agod3d11videoprocessor: Disable auto processing mode explicitly
Seungha Yang [Tue, 2 Mar 2021 09:07:36 +0000 (18:07 +0900)]
d3d11videoprocessor: Disable auto processing mode explicitly

Don't allow auto processing (e.g., denoising), as it might result
in unexpected output.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2051>

3 years agod3d11memory: Fix for wrong texture_array_size returns
Seungha Yang [Tue, 2 Mar 2021 12:10:24 +0000 (21:10 +0900)]
d3d11memory: Fix for wrong texture_array_size returns

Fix mismatched return values

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2051>

3 years agod3d11decoder: Add trace log for DPB pool size debugging
Seungha Yang [Tue, 2 Mar 2021 12:13:18 +0000 (21:13 +0900)]
d3d11decoder: Add trace log for DPB pool size debugging

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2051>

3 years agod3d11decoder: Always use render-target bind flag for downstream pool
Seungha Yang [Tue, 2 Mar 2021 11:45:22 +0000 (20:45 +0900)]
d3d11decoder: Always use render-target bind flag for downstream pool

To convert decoded texture into other format, downstream would use
video processor instead of shader. In order for downstream to
be able to use video processor even if we copied decoded texture
into downstream pool, we should set this bind flag. Otherwise,
downstream would keep switching video processor and shader
to convert format which would result in inconsistent image quality.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2051>

3 years agod3d11: Fix wrong preprocessing blocks
Seungha Yang [Tue, 2 Mar 2021 11:37:04 +0000 (20:37 +0900)]
d3d11: Fix wrong preprocessing blocks

Missed in https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/464

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2051>

3 years agova: vpp: fix a wrong caps logic in vpp_transform_caps().
He Junyan [Mon, 1 Mar 2021 05:44:09 +0000 (13:44 +0800)]
va: vpp: fix a wrong caps logic in vpp_transform_caps().

The current gst_va_vpp_transform_caps return such as:
  video/x-raw(memory:VAMemory), width=(int)[ 16, 16384 ], height=(int)[ 16, 16384 ],
  interlace-mode=(string)progressive, format=(string){ NV12, I420, YV12, YUY2, RGBA,
  BGRA, P010_10LE, ARGB, ABGR, VUYA }; video/x-raw(memory:DMABuf), width=(int)[ 16,
  16384 ], height=(int)[ 16, 16384 ], interlace-mode=(string)progressive, format=(string)
  { NV12, I420, YV12, YUY2, RGBA, BGRA, P010_10LE, ARGB, ABGR, VUYA }; video/x-raw,
  width=(int)[ 16, 16384 ], height=(int)[ 16, 16384 ], interlace-mode=(string)progressive,
  format=(string){ VUYA, GRAY8, NV12, NV21, YUY2, UYVY, YV12, I420, P010_10LE };
  video/x-raw(memory:VAMemory), width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ],
  interlace-mode=(string)progressive; video/x-raw(memory:DMABuf), width=(int)[ 1, 2147483647 ],
  height=(int)[ 1, 2147483647 ], interlace-mode=(string)progressive; video/x-raw, width=(int)
  [ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], interlace-mode=(string)progressive

Which is not correct. It mixes the template caps and the input query caps together.
The correct way should be: clip the template caps with the input caps(remove format
and rangify size). The correct answer should be:
  video/x-raw(memory:VAMemory), width=(int)[ 16, 16384 ], height=(int)[ 16, 16384 ], interlace
  -mode=(string)progressive, format=(string){ NV12, I420, YV12, YUY2, RGBA, BGRA, P010_10LE,
  ARGB, ABGR, VUYA }; video/x-raw(memory:DMABuf), width=(int)[ 16, 16384 ], height=(int)[ 16,
  16384 ], interlace-mode=(string)progressive, format=(string){ NV12, I420, YV12, YUY2, RGBA,
  BGRA, P010_10LE, ARGB, ABGR, VUYA }; video/x-raw, width=(int)[ 16, 16384 ], height=(int)[ 16,
  16384 ], interlace-mode=(string)progressive, format=(string){ VUYA, GRAY8, NV12, NV21, YUY2,
  UYVY, YV12, I420, P010_10LE }

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2045>

3 years agompegtsparse: Fix switched DTS/PTS when set-timestamps=false
Jan Alexander Steffens (heftig) [Mon, 1 Mar 2021 15:23:37 +0000 (16:23 +0100)]
mpegtsparse: Fix switched DTS/PTS when set-timestamps=false

Fixes 30ee21eae36e7279f63b77167ba1dcf5f70b8e83.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2047>

3 years agowebrtc ice: Add 'min/max-rtp-port' props for setting RTP port range
Ilya Kreymer [Thu, 15 Aug 2019 15:25:26 +0000 (08:25 -0700)]
webrtc ice: Add 'min/max-rtp-port' props for setting RTP port range

default min port == 0, max port == 65535 -- if min port == 0, uses existing random port selection (range ignored)
add 'gathering_started' flag to avoid changing ports after gathering has started
validity checks: min port <= max port enforced, error thrown otherwise
include tests to ensure port range is being utilized (by @hhardy)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/119>

3 years agowebrtc ice: Only ever request one component, it's always rtcpmux
Olivier Crête [Thu, 25 Feb 2021 16:58:57 +0000 (11:58 -0500)]
webrtc ice: Only ever request one component, it's always rtcpmux

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/119>

3 years agotranscoder: Add some missing API guards
Thibault Saunier [Fri, 26 Feb 2021 18:40:01 +0000 (15:40 -0300)]
transcoder: Add some missing API guards

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2044>

3 years agotranscoder: Fix potential use of uninitialized variables
Thibault Saunier [Fri, 26 Feb 2021 18:36:48 +0000 (15:36 -0300)]
transcoder: Fix potential use of uninitialized variables

gst_structure_get won't touch variables if the field is not present
leading to potential use of initialized vars

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2044>

3 years agotranscoder: Rework the API to create/get SignalAdapter
Thibault Saunier [Fri, 26 Feb 2021 18:31:29 +0000 (15:31 -0300)]
transcoder: Rework the API to create/get SignalAdapter

We can only have 1 single GstTranscoderSignalAdapter object for a
given GstTranscoder object, this enforces that by avoiding to expose
a constructor and instead add a method to GstTranscoder to get the
signal adapter (internally creating it when needed). We can still
cleanly ensure that the signal adapter is running for the requested
GMainContext and return NULL if it is not the case.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2044>

3 years agowebrtcbin: use regular ice nomination by default
Matthew Waters [Mon, 22 Feb 2021 05:59:25 +0000 (16:59 +1100)]
webrtcbin: use regular ice nomination by default

1. We don't currently deal with an a=ice-options in the SDP which means
   we currently violate https://tools.ietf.org/html/rfc5245#section-8.1.1
   which states: "If its peer is using ICE options (present in
   an ice-options attribute from the peer) that the agent does not
   understand, the agent MUST use a regular nomination algorithm."
2. The recommendation is default to regular nomination in both RFC5245
   and RFC8445.  libnice change for this is
   https://gitlab.freedesktop.org/libnice/libnice/-/merge_requests/125
   which requires an API break in libnice.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2031>

3 years agotranscoder: Remove un-needed gst_init call
Philippe Normand [Wed, 24 Feb 2021 18:43:07 +0000 (18:43 +0000)]
transcoder: Remove un-needed gst_init call

We can safely assume GStreamer is already initialized from here.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1840>

3 years agotranscoder: Port to a GstBus API instead
Thibault Saunier [Thu, 26 Nov 2020 01:25:28 +0000 (22:25 -0300)]
transcoder: Port to a GstBus API instead

Following the move made by GstPlayer in:

https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/35

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1840>

3 years agotranscoder: Automatically generate enums GTypes
Thibault Saunier [Thu, 26 Nov 2020 01:21:35 +0000 (22:21 -0300)]
transcoder: Automatically generate enums GTypes

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1840>

3 years agotranscoder: Port to G_DECLARE
Thibault Saunier [Thu, 26 Nov 2020 01:01:30 +0000 (22:01 -0300)]
transcoder: Port to G_DECLARE

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1840>

3 years agodecklinkvideosink: Use correct numerator for 29.97fps
Sebastian Dröge [Fri, 26 Feb 2021 14:36:58 +0000 (16:36 +0200)]
decklinkvideosink: Use correct numerator for 29.97fps

It's not 0.2997fps.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2042>

3 years agodecklinksrc: Use a more accurate capture time
Edward Hervey [Fri, 26 Feb 2021 10:39:10 +0000 (11:39 +0100)]
decklinksrc: Use a more accurate capture time

Use the hardware reference clock time when the frame was finished being captured
instead of a time much further down the road.

This improves the stability/accuracy of buffer times.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2040>

3 years agova: allocator: No need of fourcc to create surface.
Víctor Manuel Jáquez Leal [Wed, 24 Feb 2021 18:14:42 +0000 (19:14 +0100)]
va: allocator: No need of fourcc to create surface.

In commits 430aa327 and a119a940 there are a regression since it is
possible to create surfaces without fourcc, only chroma (rtformat) is
required.

This regression is shown on radeonsi driver with certain color
formats.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2035>

3 years agova: vpp: implement GstColorBalance interface
Víctor Manuel Jáquez Leal [Wed, 24 Feb 2021 12:06:51 +0000 (13:06 +0100)]
va: vpp: implement GstColorBalance interface

And modify multiple-vpp example to use it with -r parameter.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2033>

3 years agova: filter: add controllable and mutable playing to GParamFlags
Víctor Manuel Jáquez Leal [Tue, 23 Feb 2021 16:22:40 +0000 (17:22 +0100)]
va: filter: add controllable and mutable playing to GParamFlags

Add controllable and mutable playgin to common GParamFlags.

Also use this common flags to video-direction

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2033>

3 years agovulkan: Fix elements long name.
Víctor Manuel Jáquez Leal [Wed, 24 Feb 2021 15:57:06 +0000 (16:57 +0100)]
vulkan: Fix elements long name.

Fix vkcoloconvert and vkviewconvert long names.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2034>

3 years agomsdk: allow user specify a drm device via an env variable
Haihao Xiang [Tue, 12 Jan 2021 07:33:49 +0000 (15:33 +0800)]
msdk: allow user specify a drm device via an env variable

User may specify the required device via GST_MSDK_DRM_DEVICE

Example:
GST_MSDK_DRM_DEVICE=/dev/dri/card0 gst-launch-1.0 videotestsrc ! msdkh264enc
! fakesink

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1953>

3 years agoVA: Add the vaav1dec element as the av1 decoder.
He Junyan [Tue, 19 Jan 2021 07:36:29 +0000 (15:36 +0800)]
VA: Add the vaav1dec element as the av1 decoder.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1636>

3 years agoVA: Add the aux surface for gst buffer used by decoder.
He Junyan [Tue, 19 Jan 2021 07:17:58 +0000 (15:17 +0800)]
VA: Add the aux surface for gst buffer used by decoder.

The AV1 codec needs to support the film grain feature. When the film
grain feature is enabled, we need two surfaces as the output of the
decoded picture, one without film grain effect and the other one with
it. The first one acts as the reference and is needed for later pictures'
reconstruction, and the second one is the real display output.
So we need to attach another aux surface to the gst buffer/mem and make
that aux surface as the target of vaBeginPicture.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1636>

3 years agoVA: Add a helper function of decoder_add_slice_buffer_with_n_params.
He Junyan [Tue, 19 Jan 2021 07:07:38 +0000 (15:07 +0800)]
VA: Add a helper function of decoder_add_slice_buffer_with_n_params.

Some codecs such as AV1 needs several parameters associated with one
slice. It may have multi tiles within one slice and each tile needs
its description parameter.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1636>

3 years agocodecs: AV1decoder: Add the AV1 decoder base class.
He Junyan [Tue, 19 Jan 2021 06:59:45 +0000 (14:59 +0800)]
codecs: AV1decoder: Add the AV1 decoder base class.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1636>

3 years agova: allocator: replace assert with error log in va alloc.
He Junyan [Tue, 23 Feb 2021 05:47:29 +0000 (13:47 +0800)]
va: allocator: replace assert with error log in va alloc.

We should print error log rather than assert when the forcc or
the rt_format of va allocator is unrecognized.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1636>

3 years agod3d11: Documentation update
Seungha Yang [Sun, 21 Feb 2021 08:38:38 +0000 (17:38 +0900)]
d3d11: Documentation update

* Update class metadata
  * for wrapper bin elements to be distinguishable from internal element.
  * D3D11 -> Direct3D11 for consistency
* Add missing Since mark everywhere
* Update plugin cache

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2029>

3 years agod3d11: Reorganize class hierarchy of convert elements
Seungha Yang [Sun, 21 Feb 2021 11:38:37 +0000 (20:38 +0900)]
d3d11: Reorganize class hierarchy of convert elements

AS-IS:
D3D11Convert class is baseclass of D3D11ColorConvert and D3D11Scale
* GstD3D11Convert
  |_ GstD3D11ColorConvert
  |_ GstD3D11Scale

TO-BE:
Introducing a new base class for color conversion and/or rescale elements
* GstD3D11BaseConvert
  |_ GstD3D11Convert
  |_ GstD3D11ColorConvert
  |_ GstD3D11Scale

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2029>

3 years agod3d11deinterlace: Add missing system memory caps features on templates
Seungha Yang [Sun, 21 Feb 2021 08:35:40 +0000 (17:35 +0900)]
d3d11deinterlace: Add missing system memory caps features on templates

This element can support system memory

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2029>

3 years agova: filter, vpp: process colorimetry
Víctor Manuel Jáquez Leal [Thu, 18 Feb 2021 08:53:09 +0000 (09:53 +0100)]
va: filter, vpp: process colorimetry

A new filter method were added: gst_va_filter_set_formats(). In this
way the input & output GstVideoInfo are processed only once per stream
negotiation, and not per frame.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2023>

3 years agova: filter: check if filter is open on set_orientation()
Víctor Manuel Jáquez Leal [Thu, 18 Feb 2021 04:58:25 +0000 (05:58 +0100)]
va: filter: check if filter is open on set_orientation()

Because the method requires pipeline_caps is filled.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2023>

3 years agova: filter: human readable background color
Víctor Manuel Jáquez Leal [Wed, 17 Feb 2021 17:56:29 +0000 (18:56 +0100)]
va: filter: human readable background color

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2023>

3 years agova: filter: fail immediately if vaBeginPicture() fails
Víctor Manuel Jáquez Leal [Wed, 17 Feb 2021 17:55:14 +0000 (18:55 +0100)]
va: filter: fail immediately if vaBeginPicture() fails

There's no need to try vaRenderPicture() if vaBeginPicture() failed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2023>

3 years agova: filter: destroy pipeline buffer after destroying filters
Víctor Manuel Jáquez Leal [Wed, 17 Feb 2021 17:30:10 +0000 (18:30 +0100)]
va: filter: destroy pipeline buffer after destroying filters

In 6ae24948 the pipeline buffer destroy were removing assuming it
wasn't required. Nonetheless, debugging the code it looks like a
buffer leak in iHD driver since the ID of the buffer kept increasing.

The difference now is that first the filter buffers are destroy first
and later the pipeline buffer.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2023>

3 years agova: vpp: Add raw buffer copy when needed.
He Junyan [Fri, 19 Feb 2021 06:27:39 +0000 (14:27 +0800)]
va: vpp: Add raw buffer copy when needed.

Just like the decoder, the vapostproc also needs to copy the output
buffer to raw buffer if downstream elements only supports raw caps
and does not support the video meta.

The pipeline like:
  gst-launch-1.0 filesrc location=xxxx ! h264parse ! vah264dec ! \
  vapostproc ! capsfilter caps=video/x-raw,width=55,height=128 ! \
  filesink location=xxx
needs this logic to dump the data correctly.

fixes: #1523

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2026>

3 years agosdpsrc: fix double free if sdp is provided as string via the property
Tim-Philipp Müller [Fri, 19 Feb 2021 00:03:00 +0000 (00:03 +0000)]
sdpsrc: fix double free if sdp is provided as string via the property

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2025>

3 years agowasapi2device: Make wasapi2 device distinguishable from wasapi device
Seungha Yang [Thu, 18 Feb 2021 12:38:37 +0000 (21:38 +0900)]
wasapi2device: Make wasapi2 device distinguishable from wasapi device

Both wasapi2 and wasapi plugins use WASAPI API. So "device.api=wasapi"
would make sense for the wasapi2 plugin as well. But people would be
confused by the identical "device.api=wasapi" property if intended
plugin is wasapi, not wasapi2. This change will make them distinguishable
by using "device.api" device property.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2024>

3 years agowasapi2: Always build if Windows 10 SDK is available
Seungha Yang [Tue, 12 Jan 2021 15:27:40 +0000 (00:27 +0900)]
wasapi2: Always build if Windows 10 SDK is available

Add support for building wasapi2 plugin if Windows 10 SDK is
available on system

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1951>

3 years agodtls: use GST_WARNING instead of g_warning
Stéphane Cerveau [Mon, 8 Feb 2021 11:24:58 +0000 (12:24 +0100)]
dtls: use GST_WARNING instead of g_warning

No need a g_warning which is failing always
with gst-inspect -a

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2010>

3 years agoh264parse: don't invalidate the last PPS when parsing a new SPS
Michael Olbrich [Thu, 28 Jan 2021 11:28:03 +0000 (12:28 +0100)]
h264parse: don't invalidate the last PPS when parsing a new SPS

When a SPS is received then any previous PPS remains valid. So don't clear
the PPS flag from the parser state.

This is important because there are encoders that don't generated a PPS after
every SPS.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2019>

3 years agoh265parse: Detect height change on field-based interlaced files
Vivia Nikolaidou [Wed, 17 Feb 2021 13:15:09 +0000 (15:15 +0200)]
h265parse: Detect height change on field-based interlaced files

The first time update_src_caps is called, there's no frame parsed yet,
therefore we don't know whether the file has alternate-field interlacing
mode. If we run it again after we have a frame, it might be that now we
have the SEI pic_struct parsed, and therefore we know that it's
field-based interlaced, and therefore the height must be multiplied by
two. Earlier on this was not detected as a change.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2022>

3 years agova: add multiple-vpp example
Víctor Manuel Jáquez Leal [Sat, 19 Sep 2020 19:39:06 +0000 (21:39 +0200)]
va: add multiple-vpp example

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2015>

3 years agova: allocator: set workaround only for i965 driver
Víctor Manuel Jáquez Leal [Mon, 15 Feb 2021 14:54:11 +0000 (15:54 +0100)]
va: allocator: set workaround only for i965 driver

In commit 117453b9 a i965 driver workaround was added for all drivers, because
at that time we didn't have a driver implementation API.

Now there's one. This patch set the workaround only for the i965 driver.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2021>

3 years agoh265parse: Fix FPS/duration for interlaced files
Vivia Nikolaidou [Wed, 17 Feb 2021 11:46:03 +0000 (13:46 +0200)]
h265parse: Fix FPS/duration for interlaced files

There can be h265 files with frame-based, not field-based, interlacing.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2020>

3 years agova: allocator: MT-safe queue & dequeue dmabuf-based memories
Víctor Manuel Jáquez Leal [Fri, 12 Feb 2021 17:43:00 +0000 (18:43 +0100)]
va: allocator: MT-safe queue & dequeue dmabuf-based memories

One problem that va dmabuf allocator had is when preparing a buffer from
dmabuf memories in the allocator pool, specially when a buffer is composed by
several memories. This memories have to be by certain number and in certain
order.

This patch stores the number of memories and their address in order when a
dmabuf-based buffer is created and when preparing a buffer, it is reconstructed
with this info.

Finally, instead of pushing the memories as soon as they are unrefed, they are
hold until GstVaBufferSurface's ref_mems_count reaches zero (all the memories
related with that buffer/surface are unrefed). Until that happen, all the
memories are pushed back into the queue, locked, assuring that all the memories
related with a single buffer (with the same surface) remain contiguous, so the
buffer reconstruction is assured.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2013>

3 years agova: pool, allocator: free memories at bufferpool's stop()
Víctor Manuel Jáquez Leal [Mon, 15 Feb 2021 14:34:56 +0000 (15:34 +0100)]
va: pool, allocator: free memories at bufferpool's stop()

This patch frees the memories in the allocator's pool after the bufferpool frees
all its buffers, sync'ing them at stop() vmethod.

By doing it, the current logic in flush_start() is not valid, so the vmethod is removed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2013>

3 years agova: allocator: remove unused public functions
Víctor Manuel Jáquez Leal [Fri, 12 Feb 2021 14:40:33 +0000 (15:40 +0100)]
va: allocator: remove unused public functions

Deleted the public functions:

gst_va_dmabuf_allocator_wait_for_memory()
gst_va_allocator_wait_for_memory()

And all the support for wait, cond in allocator's pool.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2013>

3 years agova: pool: simplify the logic
Víctor Manuel Jáquez Leal [Fri, 12 Feb 2021 12:26:24 +0000 (13:26 +0100)]
va: pool: simplify the logic

Instead of removing memories from buffers at reset_buffer()/release_buffer() the
bufferpool operation is kept as originally designed, still the allocator pool is
used too. Thus, this patch restores the buffer size configuration while removing
release_buffer(), reset_buffer() and acquire_buffer() vmethods overloads.

Then, when the bufferpool base class decides to discard a buffer, the VA
surface-based memory is returned to the allocator pool when its last reference
is freed, and later reused if a new buffer is allocated again.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2013>

3 years agova: pool: use allocator pool at alloc()
Víctor Manuel Jáquez Leal [Sun, 7 Feb 2021 15:12:56 +0000 (16:12 +0100)]
va: pool: use allocator pool at alloc()

Check if the allocator pool has memories available before creating a
new one, but only iif pool is not starting.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2013>

3 years agova: allocator: log buffer at dmabuf setup and prepare
Víctor Manuel Jáquez Leal [Mon, 8 Feb 2021 11:25:07 +0000 (12:25 +0100)]
va: allocator: log buffer at dmabuf setup and prepare

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2013>

3 years agod3d11: Add support for deinterlacing by using ID3D11VideoProcessor interface
Seungha Yang [Thu, 21 Jan 2021 15:10:28 +0000 (00:10 +0900)]
d3d11: Add support for deinterlacing by using ID3D11VideoProcessor interface

Add a new element d3d11deinterlace to support deinterlacing.
Similar to d3d11videosink and d3d11compositor, this element is
a wrapper bin of set of child elements including helpful
conversion elements (upload/download and color convert)
to make this element configurable between non-d3d11 elements.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2016>

3 years agod3d11: Add a method for conversion from DXGI format to GstVideoFormat
Seungha Yang [Sat, 13 Feb 2021 21:23:55 +0000 (06:23 +0900)]
d3d11: Add a method for conversion from DXGI format to GstVideoFormat

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2016>

3 years agoh264parse: fix timestamping of interlaced fields in output
Mathieu Duponchelle [Fri, 22 Jan 2021 02:26:29 +0000 (03:26 +0100)]
h264parse: fix timestamping of interlaced fields in output

Instead of relying on GstBaseParse default behaviour of computing
the duration of a parsed buffer based on the framerate passed
to gst_base_parse_set_framerate(), we instead compute the duration
ourselves, as we have more information available.

In particular, this means we now output buffers with a duration
that matches that of raw interlaced buffers when each field is
output in a separate buffer.

This fixes DTS interpolation performed by GstBaseParse, as the
previous behaviour of outputting each field with the duration of
a full frame was messing up the base class calculations.

When not enough information is available, h264parse simply falls
back to calculating the duration based on the framerate and hope
for the best as was the case previously.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1973>

3 years agod3d11decoder: Take account of min buffers of downstream buffer pool
Seungha Yang [Sun, 14 Feb 2021 12:01:32 +0000 (21:01 +0900)]
d3d11decoder: Take account of min buffers of downstream buffer pool

Since our decoder DPB texture pool cannot be grown once it's
configured, we should pre-allocate sufficient number of textures
for zero-copy playback (but not too many).
The "min buffers" allocation query parameter can be a hint for
the number of required textures in addition to DPB size.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2017>

3 years agoopenh264enc: Add support for main and high profiles
Thibault Saunier [Thu, 29 Oct 2020 13:54:45 +0000 (10:54 -0300)]
openh264enc: Add support for main and high profiles

Those are supported (to a certain extent) so we should not limit
ourself to baseline

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1789>

3 years agocodecs: mpeg2decoder: Move frame_unref to handle_frame.
He Junyan [Thu, 11 Feb 2021 08:04:12 +0000 (16:04 +0800)]
codecs: mpeg2decoder: Move frame_unref to handle_frame.

In the current code, we call frame_unref only when the frame is
outputted. This is OK for normal playback, but when seek happens,
the frames stored in DPB is not outputted and causes some memory
leak.
The correct way is that we should call frame_unref every time we
finish the handle_frame(), which is also the behaviour of H264/H265
decoder.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2014>

3 years agod3d11h265dec: Add support for interlaced stream
Seungha Yang [Sat, 6 Feb 2021 17:26:02 +0000 (02:26 +0900)]
d3d11h265dec: Add support for interlaced stream

Note that we have no D3D11 deinterlace element yet.

If downstream is not support format:Interlaced caps feature including all
D3D11 the other elements, aspect-ratio will be adjusted as an
alternative approach.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2008>

3 years agocodecs: h265decoder: Add support for interlaced stream
Seungha Yang [Sat, 6 Feb 2021 15:21:06 +0000 (00:21 +0900)]
codecs: h265decoder: Add support for interlaced stream

* Invoke GstH265DecoderClass::new_sequence() method per interlaced
  stream status update so that subclass can update caps.
* Parse picture timing SEI and set buffer flags on GstH265Picture
  object. Subclass can refer to it like that of our h264decoder
  implementation.
* Remove pointless GstH265PictureField enum

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2008>

3 years agovah265dec: Don't need to pass picture structure to VA
Seungha Yang [Tue, 9 Feb 2021 15:59:05 +0000 (00:59 +0900)]
vah265dec: Don't need to pass picture structure to VA

This code came from gstvaapidecoder_h265 implementation
but picture structure is always GST_VAAPI_PICTURE_STRUCTURE_FRAME.
Moreover, in theory, VA doesn't need to know picture structure for
decoding HEVC stream.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2008>

3 years agonvh265sldec: Remove pointless field picture parameter setup
Seungha Yang [Sat, 6 Feb 2021 13:02:59 +0000 (22:02 +0900)]
nvh265sldec: Remove pointless field picture parameter setup

HEVC has no decoding flow for interlaced, field picture referencing.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2008>