Commit graph

1270 commits

Author SHA1 Message Date
Víctor Manuel Jáquez Leal 96f0521155 vaencoder: Reset attribute index to one.
Further fix to 4ffb3663 where I forgot to reset the attribute index.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3285>
2022-10-27 20:32:15 +00:00
Thibault Saunier 4f991a55af adaptivedemux: Minor typo fix
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3159>
2022-10-27 19:45:44 +00:00
Thibault Saunier 8a9821e805 dash: Fix computing repeat_index when seeking in stream with a start !=0 on the first fragment
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3159>
2022-10-27 19:45:44 +00:00
He Junyan 2408ca2f18 h265bitwriter: Correct the all API to byte aligned.
In fact, all the h265 bit writer have byte aligned output. So we
change the API from bit size in unit to byte size, which is easy
to use.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3193>
2022-10-27 12:15:43 +00:00
He Junyan c294ba82e6 h264bitwriter: Correct the all API to byte aligned.
In fact, all the h264 bit writer have byte aligned output except
the slice header. So we change the API from bit size in unit to
byte size, which is easy to use. For slice header, we add a extra
"trail_bits_num" to return the unaligned bits number.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3193>
2022-10-27 12:15:43 +00:00
He Junyan 9dc76185fc bitwriter: Fix a nal conversion bug when input is not byte aligned.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3193>
2022-10-27 12:15:43 +00:00
Mengkejiergeli Ba 13be7cbe86 msdkvpp: Set va mem caps as higher priority
We use va pool as msdkvpp's bufferpool, which means both va memory
and dma memory will be allocated by va pool. Considering drm modifier
stuff is not ready, we use va memory with higher priortiry than
dma memory when deciding vpp caps.

Besides, this patch removes the specified "interlace-mode" in vpp caps.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3253>
2022-10-27 11:12:08 +00:00
Mengkejiergeli Ba c989d023fd msdkav1enc: Remove reorder TU workaround
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3225>
2022-10-27 07:07:38 +00:00
Mengkejiergeli Ba 78a7c6318a msdkav1enc: Remove pts workaround
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3225>
2022-10-27 07:07:38 +00:00
Seungha Yang 2c5a050ae7 codecparsers: {h264,h265}bitwriter: Don't install headers yet
Those APIs are quite early stage of development, and we might want to
change them in the near future

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3275>
2022-10-27 06:15:56 +00:00
Mengkejiergeli Ba 2c1315cae9 msdkvpp: Fix upper frc
Refact vpp commit 4c6b719445 broke the
upper FRC, here to fix this by using outbuf_new.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3223>
2022-10-27 05:17:12 +00:00
Mengkejiergeli Ba 27216d6f2e bad: Add msdkav1enc docs
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2971>
2022-10-27 04:02:10 +00:00
Nicolas Dufresne 8a8fe360a2 alphacombine: Add missing query handler for gaps
The gap handling was in place, but there was no event handler to trigger it.
Implement the alpha sink event handler for the gaps. This fixes handling of
valid streams which may not refresh the alpha frames for every video frames.
It will also allow a clean error if the stream was missing the initial
alpha frame, at least until we find a better way to handle these
invalid frames.

Related to #1518

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3264>
2022-10-26 14:51:40 +00:00
Ignacio Casal Quinteiro d44eb4b2fa avfdeviceprovider: do not leak the properties
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3268>
2022-10-26 10:29:25 +00:00
Víctor Manuel Jáquez Leal ba24191f2a vaencoder: Fix caps semantics.
When using gst_va_caps_from_profiles() the semantics of sink/src caps
depends if the element is an encoder or a decoder.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3063>
2022-10-26 08:19:32 +00:00
Víctor Manuel Jáquez Leal d32fdf975d va: Fix typos.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3063>
2022-10-26 08:19:32 +00:00
Víctor Manuel Jáquez Leal 4ffb3663a8 vah264enc: Fail if unsupported rate control.
Handle when encoder doesn't support rate control, which is set as
VA_RC_NONE, and if the set rate control mode is not supported by the
GStreamer element, the element configuration fails.

Also it logs out max and target bitrate.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3063>
2022-10-26 08:19:32 +00:00
Víctor Manuel Jáquez Leal 5e531c1a88 vah264enc: Add todo item.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3063>
2022-10-26 08:19:32 +00:00
Víctor Manuel Jáquez Leal d463feaa08 vaencoder: Honor entrypoint at constructor.
The entrypoint is set when the encoder helper is constructed,
nonetheless it was also passed as parameter when opening. That's
buggy.

In order to simplify the code, the entrypoint at construction is
honored.

But gst_va_encoder_has_profile_and_entrypoint() now doesn't rely in
the internal list of profiles since it only contains those that
belongs to codec and entrypoint, thus it queries directly the VA
driver.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3063>
2022-10-26 08:19:32 +00:00
Víctor Manuel Jáquez Leal 79c47fbdb8 vabaseenc: Scope error bail out.
Though this is not enforced by the GStreamer code style, it's clearer
to add a nested scope for error handling using label/goto.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3063>
2022-10-26 08:19:32 +00:00
Víctor Manuel Jáquez Leal d608872ba3 vabaseenc: Use class entrypoint.
Add a macro to access to class entrypoint and use it instead of move
it to a variable.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3063>
2022-10-26 08:19:32 +00:00
Seungha Yang e68645c2d2 d3d11: Move format defines to private header
Those defines will be likely changed/deleted in the future, and we
don't need to expose them to public at the moment

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3265>
2022-10-26 02:55:34 +09:00
Sebastian Dröge 366893e9ac Fix various warnings from gobject-introspection
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3261>
2022-10-25 09:45:25 +03:00
Tim-Philipp Müller e703374ff8 fdkaac: add minimal unit test
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1785>
2022-10-25 00:13:05 +00:00
Tim-Philipp Müller d7e2aff994 fdkaacenc: fix output caps in case of implicit signaling and HE-AAC
Need to put the actual profile in the output caps otherwise any
capsfilter after the encoder that was used to force the output
profile will fail, such as

  fdkaacenc ! audio/mpeg,stream-format=adts,profile=he-aac-v1 ! ..

because we put profile=lc in there to match the profile signaled
in the ADTS header. This is expressed through the base-profile=lc
in the GStreamer caps though, the profile needs to carry the
'real' profile.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1785>
2022-10-25 00:13:04 +00:00
Tim-Philipp Müller 24645e35c5 fdkaacenc: don't set base-profile=lc for non-backwards compatible output
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1785>
2022-10-25 00:13:04 +00:00
Tim-Philipp Müller 31c04f87e3 fdkaacenc: rename profile=sbr|ps to profile=he-aac-v1|he-aac-v2
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1785>
2022-10-25 00:13:04 +00:00
Piotrek Brzeziński d8b1ff4668 fdkaacenc: add support for AAC-LD
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1785>
2022-10-25 00:13:04 +00:00
Piotrek Brzeziński 8cda666cb0 fdkaacenc: add support for HE-AACv1 and HE-AACv2
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1785>
2022-10-25 00:13:04 +00:00
Seungha Yang 4124c83e22 gst-plugins-bad: Update Windows plugins cache
Add/update d3d11, qsv, nvcodec, wic, directshow, and amfcodec plugins cache

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3250>
2022-10-24 12:42:52 +00:00
Seungha Yang 722f097b9d nvcodec: Update for documentation
* Use GST_PARAM_DOC_SHOW_DEFAULT flags for GPU ID related
  properties
* Fix some typos
* Add since markers

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3250>
2022-10-24 12:42:51 +00:00
Seungha Yang 7ce3fccf25 mediafoundation: Update for documentation
* Use GST_PARAM_DOC_SHOW_DEFAULT flags for GPU ID related
  properties
* Add doc caps
* Add since markers

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3250>
2022-10-24 12:42:51 +00:00
Seungha Yang 9d926ae8b1 mfvideoencoder: Document only hardware encoders
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3250>
2022-10-24 12:42:51 +00:00
Seungha Yang e9415aafb5 mfvideoencoder: Fix device enumeration
Although a GPU does not support the codec, the other GPU might
be able to support the codec

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3250>
2022-10-24 12:42:51 +00:00
Seungha Yang d92c43cb0f amfcodec: Update for documentation
* Use GST_PARAM_DOC_SHOW_DEFAULT flags for GPU ID related
  properties
* Add doc caps

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3250>
2022-10-24 12:42:51 +00:00
Seungha Yang 4038a486a0 qsv: Use GST_PARAM_DOC_SHOW_DEFAULT flag
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3250>
2022-10-24 12:42:51 +00:00
Seungha Yang 6974b6f6ff d3d11: Update for documentation
* Use GST_PARAM_DOC_SHOW_DEFAULT flags for GPU ID related
  properties
* Add doc caps
* Increase deinterlace max resolution

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3250>
2022-10-24 12:42:51 +00:00
Seungha Yang 31be056b6e d3d11: Run indent
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3250>
2022-10-24 12:42:51 +00:00
Seungha Yang 1ec4905e92 wic: Add since marker
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3250>
2022-10-24 12:42:51 +00:00
Seungha Yang 92fd435a25 directshow: Add since marker
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3250>
2022-10-24 12:42:51 +00:00
Seungha Yang 23261bccbb qsv: Enable MinGW toolchain support
Use PCRE regex method to work around (likely) GCC std::regex bug,
and enable building for non-MSVC

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3239>
2022-10-24 10:53:40 +00:00
Nirbheek Chauhan a083280a58 gl/vulkan: Fix static linking on macOS
duplicate symbol '__invoke_on_main' in:
    /Library/Frameworks/GStreamer.framework/Versions/1.0/lib/libgstvulkan-1.0.a(cocoa_gstvkwindow_cocoa.m.o)
    /Library/Frameworks/GStreamer.framework/Versions/1.0/lib/libgstgl-1.0.a(cocoa_gstglwindow_cocoa.m.o)
ld: 1 duplicate symbol for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Also make the same change in iOS for consistency.

Continuation of https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1132

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3242>
2022-10-24 00:48:08 +00:00
Matthew Waters 0077d13304 webrtcbin: configure rtpulpfecdec passthrough property
This allows downstream (payloaders mostly) to be able to correctly
detect actual packet loss from rtp sequence numbers.

See
https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/581
for background.

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1407

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3212>
2022-10-23 23:44:07 +00:00
Seungha Yang 426535f3a6 d3d11screencapture: Add WinRT API based capture mode
Add Windows Graphics Capture (WGC) API based screen capture mode.
The conditions where this mode is used:
* Explicitly requested by user (capture-api property)
* To capture specific window
* When DXGI desktop duplication API does not work on hybrid graphics systems
  (e.g., multi-gpu laptop)

Full features of this implementation require Windows 11. And Windows 11
SDK is required to build this feature.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3144>
2022-10-21 14:21:28 +00:00
Seungha Yang 087e335006 d3d11screencapture: Subclassing capture implementation
Preparation to use WinRT capture API

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3144>
2022-10-21 14:21:28 +00:00
Seungha Yang dcd3f210a0 qsv: Add plugin doc
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2738>
2022-10-21 21:29:25 +09:00
Seungha Yang 2b3f690355 qsv: Update SDK version to v2022.2.4
See release note
https://github.com/oneapi-src/oneVPL/releases/tag/v2022.2.0

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2738>
2022-10-21 21:29:25 +09:00
He Junyan 242401915f av1parse: Correct the pts for frames and OBUs inside a TU.
When the output alignment is smaller than the input alignment, for
example, When the output alignment is "FRAME" and the parse is likely
connecting to a decoder, the current PTS setting for AV1 frames inside
a TU is not very correct.

For example, a TU may begin with non-displayed frames and end with a
displayed frame. The current way will assign the PTS to the first
non-displayed frame, which is a decode-only frame and the PTS will be
discarded in the video decoder. While the last displayed frame has
invalid PTS, and so the video decoder needs to guess its PTS based on
the frame rate and previous frame's PTS. This is not a decent and
robust way. And more important, when the previous frames provide DTS,
the video decoder will also guess the PTS based on the previous frames'
DTS and trigger the warning like:

  gstvideodecoder.c:3147:gst_video_decoder_prepare_finish_frame: \
  <vavp9dec0> decreasing timestame

It sets the reordered_output and makes the decoder in free run mode.

We should correct the PTS for a TU, let the non-displayed frames have
no PTS while set the correct PTS to the displayed one. Also, when the
AV1 stream has multi spatial layers, there are more than one displayed
frames inside one TU with the same PTS.

Note: If the input alignment is not TU aligned, we can not know the
exact PTS of this TU, and so we just clear the PTS of the decode only
frame and leave others unchanged.

We also correct all the PTS if the output is OBU aligned. All their
PTS and DTS are set to the input buffer's PTS.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3182>
2022-10-21 11:16:13 +00:00
He Junyan a1f352196f av1parse: Only check the TU bound when the alignment is TU.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3182>
2022-10-21 11:16:13 +00:00
He Junyan ee5d7ce075 av1parse: push all data once when input alignment not smaller than output.
When the incoming data has big alignment than the output, we do not need to
call finish_frame() and exit the current handle_frame() for each splitted
frame. We can push them all at one shot with in one handle_frame(), whcih
may improve the performance and can help us to find the edge of TU.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3182>
2022-10-21 11:16:13 +00:00