Commit graph

1465 commits

Author SHA1 Message Date
Havard Graff a2c25ccd09 rtprtxsend: if no rtx is present, don't expose a rtx-ssrc in caps
The point here is that rtpsession will create a new rtpsource when
the field "rtx-ssrc" is present, and when not doing rtx, that means
a random ssrc will create a new rtpsource that will be included in RTCP
messages for the current session.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1882>
2022-03-09 15:30:37 +00:00
Víctor Manuel Jáquez Leal 838fe24e78 vah264enc: Invert video codec frame dependency.
Instead of using GstMiniObject to hold H264 frame, now it uses a plain
structure. Besides, instead of holding a reference to
GstVideoCodecFrame, the H264 frame structure is set as a
GstVideoCodecFrame user data.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1856>
2022-03-09 12:57:30 +00:00
GuYanjie f39174fbc4 vaapih265dec: fixed st_rps_bits setting in h265 decoding.
According to va_dec_hevc.h, pic_param->st_rps_bits should be set
for accelorater to skip parsing the *short_term_ref_pic_set
(num_short_term_ref_pic_sets) structure.
Also modified fill_picture to get parser info as a parameter,
in order to get slide_hdr->short_term_ref_pic_set_size.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1886>
2022-03-09 10:38:36 +00:00
Havard Graff 2a8fa45ba8 rtprtxsend: don't process or warn if no map is set
This makes it more gentle when doing "pass-through"

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1879>
2022-03-09 12:01:22 +05:30
Seungha Yang 496b77e6aa cudamemorycopy: Fix GL resource leak
Clear GL resources on stop()

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1896>
2022-03-08 18:02:25 +00:00
Jan Schmidt 17f11c2cda playbin3: Add lock to protect buffering messages
Fix a small race where a group can receive stream-start
and post a pending buffering message just as another
thread posts a different buffering message, causing them
to be received by the application out of order. In the
worst case, this leads the application receiving a
stale 99% buffering message and going back to buffering
right after the 100% buffering message.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1840>
2022-03-08 16:56:16 +00:00
Jakub Adam 1f3ca43c51 gstreamer-sharp: Add test checking AppSrc and AppSink constructors work properly
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1885>
2022-03-08 12:01:13 +00:00
Jakub Adam 38a3af96d0 gstreamer-sharp: Fix App{Src,Sink} constructors
Apparently GtkSharp expects each object has only one ToggleRef at any
time. Assigning element.Handle into Raw has a consequence that second
ToggleRef attempts to get created but fails on g_object_unref () that
breaks a GObject assertion:

  toggle_refs_notify: assertion failed: (tstack.n_toggle_refs == 1)

This is because toggle references should be removed with
g_object_remove_toggle_ref(), not a simple unref().

In order to avoid duplicate toggle references, introduce
ElementFactory.MakeRaw(), which creates a GstElement without its
accompanying C# object. The returned raw pointer can be assigned into
another GLib.Object without trouble.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1885>
2022-03-08 12:01:13 +00:00
Jan Alexander Steffens (heftig) 95ff949eff mpegtsmux: Start last_ts with GST_CLOCK_TIME_NONE
And use the output segment position for the outgoing timestamp while it
is. This is needed to delay the calculation of `output_ts_offset` until
we actually have a usable timestamp, as tsmux will output a few initial
packets while `last_ts` is still unset.

Without this, the calculation would use the initial `0` value, which did
not have the intended effect of making VBR mode behave like CBR mode,
but always calculated an offset equal to the selected start time.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1884>
2022-03-08 10:57:44 +00:00
Jan Alexander Steffens (heftig) e5dbf86a54 mpegtsmux: Use GST_CLOCK_STIME_NONE for output_ts_offset
It's a GstClockTimeDiff, thus GST_CLOCK_TIME_NONE isn't appropriate.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1884>
2022-03-08 10:57:44 +00:00
Seungha Yang 34c6063769 decklink: Update SDK version to 12.2.2
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1883>
2022-03-08 10:16:29 +00:00
Mikhail Fludkov 815d279f2e rtprtxreceive: fix crash when RTX payload has zero length
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1875>
2022-03-08 09:07:41 +00:00
sergei.kovalev 4c7f3cc366 check: Fix valgrind suppression for debug function list
Fix suppression to support release and debug builds.

Here is the debug build call stack:
```
==10707==    by 0x48B5520: g_malloc (gmem.c:106)
==10707==    by 0x48D19DC: g_slice_alloc (gslice.c:1069)
==10707==    by 0x48D3947: g_slist_copy_deep (gslist.c:619)
==10707==    by 0x48D38B8: g_slist_copy (gslist.c:567)
==10707==    by 0x4ADC90B: gst_debug_remove_with_compare_func (gstinfo.c:1504)
```

In release build `g_slist_copy (gslist.c:567)` got inlined:
```
==15419==    by 0x48963E0: g_malloc (gmem.c:106)
==15419==    by 0x48AA382: g_slice_alloc (gslice.c:1069)
==15419==    by 0x48AB732: g_slist_copy_deep (gslist.c:619)
==15419==    by 0x4A39B8F: gst_debug_remove_with_compare_func (gstinfo.c:1504)
```

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1814>
2022-03-08 08:25:39 +00:00
Havard Graff 86c7231dae rtprtxreceive: allow passthrough and non-rtp buffers
To avoid mapping rtp buffers when RTX is not in use, and to not
do a full error on receiving a non-rtp buffer, since you have no control
of what a rouge sender might send you.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1874>
2022-03-07 23:43:49 +00:00
Havard Graff a475c93346 rtprtx: don't access type-system per buffer
When doing only a single stream of audio/video this hardly matters,
but when doing many at the same time, the fact that you have to get
a hold of the glib global type-system lock every time you process a buffer,
means that there is a limit to how many streams you can process in
parallel.

Luckily the fix is very simple, by doing a cast rather than a full
type-check.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1873>
2022-03-07 22:01:03 +00:00
Havard Graff 2a26daee46 rtprtx: signed/unsigned and style fixes
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1872>
2022-03-07 21:16:45 +00:00
Seungha Yang 4aa516f305 cudamemorycopy: Remove texture-target caps field
It's GL specific field, and we can remove it unconditionally

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1865>
2022-03-07 19:05:29 +00:00
Seungha Yang e5132a8508 cudaupload,cudadownload: Add support for dGPU NVMM
Implement NVMM <-> CUDA, GL, SYSTEM memory conversion. Jetson is
not supported yet. Note that NVMM <-> GL interop on Jetson platform
is supported by GstGL

Some example pipelines are:
- Convert NVMM to GstGL memory
  nvv4l2decoder ! "video/x-raw(memory:NVMM)" ! cudadownload ! "video/x-raw(memory:GLMemory)" ! glimagesink

- Upload system memory to NVMM and encode
  video/x-raw,format=NV12 ! cudaupload ! "video/x-raw(memory:NVMM)" ! nvv4l2h264enc

- Convert NVMM to GstCUDA memory and encode
  nvvideoconvert ! "video/x-raw(memory:NVMM)" ! cudaupload ! "video/x-raw(memory:CUDAMemory)" ! nvh264enc

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1865>
2022-03-07 19:05:29 +00:00
Xavier Claessens af96f34fd8 Update wrap files from latest wrapdb version
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1877>
2022-03-07 17:47:09 +00:00
Víctor Manuel Jáquez Leal 0c7fe80387 va: encoder: Don't preallocate reconstruct buffers.
It's not required by VA to register the reconstruct buffers at context
creation, just as in decoders.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1857>
2022-03-07 16:31:41 +00:00
Hou Qi fa6f34d595 v4l2bufferpool: Fix race condition between qbuf and pool streamoff
There is a chance that pool->buffers[index] sets BUFFER_STATE_QUEUED, but
it has not been queued yet which makes pool->buffers[index] still NULL.
At this time, if pool_streamff release all buffers with BUFFER_STATE_QUEUED
state regardless of whether the buffer is NULL or not, it will cause segfault.

To fix this, also check buffer when streamoff release buffer.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1842>
2022-03-07 15:14:15 +00:00
Branko Subasic 52c0763042 gst-rtsp-server: Plug a few memory leaks in tests
Found and fixed a few memory leaks in the gst_rtspserver, gst_onvif and
gst_stream tests by running the tests in valgrind.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1742>
2022-03-07 13:57:27 +00:00
Hou Qi b11084f729 flvmux: Add protection when unref GstFlvMuxPad
This is to avoid gst_object_unref: assertion 'object != NULL' failed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1843>
2022-03-07 13:03:16 +00:00
Philippe Normand 21f7889187 gstplay: tests: Keep track of errors/warnings
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1869>
2022-03-07 11:03:41 +00:00
Philippe Normand 84717c6d2a gstplay: Do not error out on message parsing failures
Specially when parsing errors and warnings, the details field can be NULL and
the gst_structure_get() call would return FALSE in such cases, triggering false
positive errors.

Follow-up for #1063

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1869>
2022-03-07 11:03:41 +00:00
Philippe Normand 027f4a56c0 gstplay: Fix warning parsing API
The GError is an out parameter, so should be a ** parameter, like the details
parameter.

See also #1063

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1869>
2022-03-07 11:03:41 +00:00
Seungha Yang a63d1cf4c4 cudamemorycopy: Fix build when gl is disabled
Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1707
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1868>
2022-03-07 10:22:21 +00:00
Branko Subasic 41d436e56e gst-rtsp-server: fix race in rtsp-client
When tunneling over HTTP, if connection on the second channel happens
before the control timer is created we may trigger an assert in
rtsp_ctrl_timeout_remove(). Avoid that by taking the priv->lock before
attaching the client thread to the context.

Fixes #1025

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1867>
2022-03-07 09:15:11 +00:00
Mengkejiergeli Ba c9aa529484 msdkdec: Fix to not trigger SFC scaling when vpp at downstream
When there is vpp scaling downstream, we need to make sure SFC is not
triggered because vpp may fall into passthrough mode which causes
the decoder negotiation to create src caps with vpp scaled width/height.

This patch includes bitstream's original size in first query with
downstream in gst_msdkdec_src_caps, which is the same for what we do for
color format in this query. This is to ensure SFC scaling starts to
work only when downstream directly asks for a different size instead of
through vpp.

Note that here SFC scaling follows the same behavior as msdkvpp:
if user only changes width or height, e.g. dec ! video/x-raw,width=xx !,
the height will be modified to the value which fits the original DAR.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1838>
2022-03-07 07:26:40 +00:00
Hou Qi 89a5cae89b encodebasebin: Use GST_DEBUG instead of GST_ERROR when skipping muxer
_get_muxer() skips the muxers that do not satisfy the requirement and select
the desired one. It should not print error log, so use debug log instead.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1830>
2022-03-06 18:15:04 +00:00
Seungha Yang 30ddb0cd97 nvcodec: Add missing null check in context sharing code
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1834>
2022-03-06 15:39:04 +00:00
Seungha Yang c31bf2db4d nvcodec: Refactor cudaupload/download and add support for GL memory
* Implement new baseclass GstCudaMemoryCopy to remove duplicated
  cudaupload/download code
* Add support for CUDA <-> GL memory conversion via cudaupload/download

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1834>
2022-03-06 15:39:04 +00:00
Seungha Yang 111b2c3f53 nvcodec: Refactor GstCudaMemory abstraction
* Hide GstCudaMemory member variables
* Make GstCudaAllocator object GstCudaContext independent
* Set offset/stride of memory correctly via video meta
* Drop GST_BUFFER_POOL_OPTION_VIDEO_ALIGNMENT support.
  This implementation actually does not support custom alignment
  because we allocate device memory via cuMemAllocPitch
  of which alignment is almost uncontrollable

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1834>
2022-03-06 15:39:04 +00:00
Seungha Yang ad0e7fca14 nvcodec: Refactor basetransform subclasses
* cudaupload/download
  - Specify only formats actually we can deal with
    nvcodec elements, not all video formats
  - Supports CUDA output for download and input for upload in order
    to make passthrough possible, like other upload/download elements.
* cudabasetransform
  - Reset conversion element if upstream CUDA memory
    holds different CUDA context and the element can accept it.
    This is the same behavior as corresponding d3d11 filter elements.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1834>
2022-03-06 15:39:04 +00:00
Seungha Yang 89bbcf0061 cudabufferpool: Move GstCudaContext object to public member
... so that plugins can understand assosicated cuda context with the
pool.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1834>
2022-03-06 15:39:04 +00:00
Seungha Yang c8a1c953d8 cudacontext: Require explicit gpu id instead of auto (-1)
Sync up with GstD3D11Device implementation. The auto stuff should
be handled in context sharing step, not device creation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1834>
2022-03-06 15:39:04 +00:00
Seungha Yang 1b9274307a nvcodec: Indent update
... to prevent gnu indent version dependent diffs.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1834>
2022-03-06 15:39:04 +00:00
Seungha Yang cec7ac2a1b cudacontext: Remove unnecessary cuInit() call
It's already called at plugin init time

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1834>
2022-03-06 15:39:04 +00:00
He Junyan 2d624a1d6b av1parse: Add a comment when the detection of TU fails.
Also update the print message.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1863>
2022-03-05 11:45:15 +08:00
Nicolas Dufresne 576b074dde camerabin: Remove drain query
This was to support very old V4L2 kernel. As we moved to DMABuf and can now
detach buffers on renegotiation, the buffer it tries to fix no longer exist.
The risk to blocking indefinitly the application does still exist though.

Fixes #1070

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1861>
2022-03-04 22:45:58 +00:00
Nicolas Dufresne 0b7e8efe61 doc: AV1 demuxers now expose their alignment
Update the chache accordingly.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1837>
2022-03-04 21:58:15 +00:00
He Junyan 9c4adf5a64 av1parse: check the error return when parse_alignment_from_caps()
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1837>
2022-03-04 21:58:15 +00:00
He Junyan 81bae87079 av1parse: Use the intersected caps to decide the alignment.
When we negotiate with downstream, We should use the intersected
caps of input and output to decide the alignment and stream format.
The current code just uses the input caps which may lack the stream
format.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1837>
2022-03-04 21:58:15 +00:00
He Junyan ccd1ed9cbc ivfparse: Set the alignment to tu for AV1 stream.
Just do the same as other demux.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1837>
2022-03-04 21:58:15 +00:00
He Junyan 4c8777667a av1parse: Only detect the stream format when input alignment is tu.
The demux now outputs the AV1 stream in "tu" alignment, so we do not need
to detect the input alignment. But the annex b stream format is not recognized
by the demux, we still need to detect that stream format for the first input.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1837>
2022-03-04 21:58:15 +00:00
Nicolas Dufresne 0f15580853 matroska: Fix AV1 alignment to TU
Matroska stores AV1 in temporal unit, so that all OBU sharing the same
timestamp are put together. This was previously just assumed, which isn't
safe now that we have more alignments.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1837>
2022-03-04 21:58:15 +00:00
Nicolas Dufresne f6c070fbff isomp4: Fix AV1 default alignment
ISOMP4 store TU (temporal units) worth of AV1. Expose this in the
caps to reduce overhead in the parser, and in the muxer to avoid
storing frames split in the wrong way.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1837>
2022-03-04 21:58:15 +00:00
Nicolas Dufresne 29826aa80e av1parse: Save the default alignment
Otherwise the transformation is not applied and decoders may not
get the appropriate format despite the caps being negotiated
correctly.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1837>
2022-03-04 21:58:15 +00:00
Nicolas Dufresne f627d6aafc av1parse: Remove duplicated check
The case of both strings being empty is already checked in the
helper function. No functional changes.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1837>
2022-03-04 21:58:15 +00:00
Nicolas Dufresne 57c2adeeb2 vp9parse: Fix auto-plugging of HW frame decoder
Decoders that required frame aligmment and didn't have an associated
alpha decoder were skipped. This is because the parser was constructing
caps based on the software alpha decoder, which specify super-frame
alignment.

Iterate over the caps to filter the one that have a matching codec-alpha, with
the semantic the no codec-alpha field means codec-alpha=false. Then if
everything was removed, callback to the original, so that the first non-alpha
decoder will be picked.

Fixes #820

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1855>
2022-03-04 21:24:17 +00:00
Tristan Matthews 9d0d001d19 matroskamux: allow width+height caps changes for VP8/9
For VP8 and VP9, width+height changes are signalled inband.

Refs https://github.com/Kurento/bugtracker/issues/535 and
https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1047/diffs?commit

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1657>
2022-03-04 14:17:20 -05:00
Tristan Matthews c6ba57eb8e matroskamux: allow width + height changes for avc3|hev1
For avc3 and hev1, the intent was to allow more flexibility for caps changes
(see https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1047/diffs?commit_id=9bd8d608d5bae27ec5ff09e733f76ca32b17420c)
however width and resolution were previously omitted.

avc3 and hev1 specifically support changing stream-parameters on the fly, whereas avc1/hvc1 disallow in-band SPS.

This commit allows for changes to width and height for these which is in line with matroskamux's behaviour prior to 1.14.0.

Practically speaking, one use case where this is commonly seen is when capturing a WebRTC stream, as the browser will adapt the resolution live.

Suggested-by: Mathieu Duponchelle "<mathieu@centricular.com>"
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1657>
2022-03-04 14:17:20 -05:00
Jan Alexander Steffens (heftig) ce503d0645 deinterlace: Prevent race between _set_method and latency query
It's possible that the method is being manipulated while downstream
queries our latency, leading to crashes.

Prevent that from happening.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1854>
2022-03-04 16:14:46 +00:00
Edward Hervey 03b1790e0d tsdemux: Handle PES headers bigger than a mpeg-ts packet
While the actual PES header parser could notify us that it needed more data, we
would never actually act on it.

This commit will accumulate incoming packets in such situation and re-attempt
the header parsing.

Fixes #1027

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1852>
2022-03-04 15:14:31 +00:00
Víctor Manuel Jáquez Leal e42d10431d va: basetransform: Add device-path read-only property.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1844>
2022-03-04 14:34:32 +00:00
Víctor Manuel Jáquez Leal 47a95dfd65 va: basedec: Add device-path read-only property.
And elements will notify the used device-path if display is DRM.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1844>
2022-03-04 14:34:32 +00:00
Seungha Yang 16f37f8b9c gldisplay: Reorder GST_GL_WINDOW check for egl-device
"egl-device" should be checked before the "egl", otherwise unexpected egl will be picked

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1853>
2022-03-04 13:34:34 +00:00
Víctor Manuel Jáquez Leal 72c6a3b95a vah264enc: Remove GST_PARAM_CONDITIONALLY_AVAILABLE.
Since it's used only when the property is conditionally installed, and
these parameters are always installed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1845>
2022-03-04 12:41:37 +00:00
He Junyan be24cdb150 va: encoder: Clean dead code.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1845>
2022-03-04 12:41:37 +00:00
Víctor Manuel Jáquez Leal 7aa597d6df va: encoder: Fix error code path when open.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1845>
2022-03-04 12:41:37 +00:00
Víctor Manuel Jáquez Leal 81c00664a2 vah264enc: Remove preferred_output_delay.
In the current state of the encoder it's just dead code.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1845>
2022-03-04 12:41:37 +00:00
Víctor Manuel Jáquez Leal 1a19a835a9 vah264enc: Avoid mapping coded buffer twice.
Currently for copying the coded buffer onto a GStreamer buffer, the
coded buffer is mapped two times: one for getting the size, and later
for do the actual copy. We can avoid this by doing directly in the
element rather than in the general encoder object.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1845>
2022-03-04 12:41:37 +00:00
Víctor Manuel Jáquez Leal 81b99c37d8 vah264enc: Single parameter array per picture.
There's no need, at least in H.264, to hold a global parameter array,
since there's no need to submit SPS, trellis, hdr or quality in every
buffer, but only on IDR ones.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1845>
2022-03-04 12:41:37 +00:00
Víctor Manuel Jáquez Leal 72b0f8ab17 va: Fix log message
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1845>
2022-03-04 12:41:37 +00:00
Philippe Normand 7a7daf0f37 play: Fix error parsing API
The GError is an out parameter, so should be a ** parameter, like the details
parameter.

Fixes #1063

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1849>
2022-03-04 10:00:30 +00:00
Matthew Waters b7d0ddd1a4 webrtc: support renegotiating adding/removing RTX
We need to always add the RTX/RED/ULPFEC elements as rtpbin will only
call us once to request aux/fec senders/receivers.

We also need to regenerate the media section of the SDP instead of
blindly copying from the previous offer.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1762>
2022-03-04 19:21:59 +11:00
Mengkejiergeli Ba 8a598deef2 msdkenc: Change default ref frames number as 0
When user does not set ref-frames in pipeline, we should let MediaSDK
decide the reference frame number via setting default value as 0 at
gstreamer side.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1839>
2022-03-04 01:05:30 +00:00
Seungha Yang 8e0ce6b125 meson: wic: Fix typo
Should check WIC build option, not MediaFoundation

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1847>
2022-03-04 04:18:06 +09:00
Nirbheek Chauhan f42f65a993 soup: Fix static build with MSVC
../ext/soup/gstsouploader.c(818): error C4098: '_soup_session_send_async': 'void' function returning a value

It's technically a false warning, but that's how MSVC works, so fix
it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1805>
2022-03-03 23:07:35 +05:30
Nirbheek Chauhan 7f04ee970b soup: Fix pkgconfig generation and documentation
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1805>
2022-03-03 16:59:16 +00:00
Nirbheek Chauhan 2e3a575533 soup: Fix static build when default_library=both
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1007

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1805>
2022-03-03 16:59:16 +00:00
Nirbheek Chauhan 845402e6db soup: Don't error out in static build unless option is enabled
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1805>
2022-03-03 16:59:16 +00:00
Philippe Normand c28b9b6245 soup: Lookup libsoup dylib files on Apple platforms
Fixes #1007

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1805>
2022-03-03 16:59:16 +00:00
Damian Hobson-Garcia 2f410f26bf v4l2src: Reset the compose window to the default after setting format
When the size of V4L2 capture or output is changes with VIDIOC_S_FMT,
the device is only required to update the compisition window to fit
inside the new frame size.  This can result in captured data only being
updated on a portion of the frame after a resize.

Update the composition window to the default value determined by the
V4L2 device driver whenever the format is changed to make sure that
all image data is composed to its full size.

Fixes #765

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1806>
2022-03-03 13:28:31 +00:00
Jan Schmidt dde9e4e288 gst-play: Allow switching to previous tracks
Implement case sensitive key-press handling,
and make 'V', 'A', 'S' switch to the previous
video, audio, or subtitle track. The lower-case
keypress cycles to the next track, as before

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1841>
2022-03-03 12:11:40 +00:00
Seungha Yang 00f773bd10 qsv: Remove strcpy for DRM device path
Simplify code. It's just one-time allocation, so don't need to worry
about leaking.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1835>
2022-03-03 11:29:33 +00:00
Seungha Yang 799616aea9 msdk: Don't print error log for missing DRM device path
It's expected in case that such DRM device is unavailable for some reasons,
specifically non-Intel platform or so

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1836>
2022-03-03 06:29:11 +00:00
Matthew Waters 207769edbb sdp: support multiple rid parameters
As specified formally in RFC8851

Each rid description is placed in its own caps field in the structure.
This is very similar to the already existing extmap-$id sdp<->caps
transformations that already exists.

The mapping is as follows:

  a=rid:0 direction ';'-separated params

where direction is either 'send' or 'recv'

gets put into a caps structure like so:

   rid-0=(string)<"direction","param1","param2",etc>

If there are no rid parameters then the caps structure is generated to
only contain the direction as a single string like:

   rid-0=(string)direction

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1760>
2022-03-03 03:34:38 +00:00
Seungha Yang f8016687a4 wic: Add support for JPEG and PNG decoding
Adding Windows Imaging Component (WIC) plugin with JPEG/PNG decoding
support.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1605>
2022-03-03 00:00:54 +00:00
Seungha Yang df6624bf1c directshow: Fix for division by zero
The AvgTimePerFrame value may be unknown. Use arbitrary
value (30 fps) instead of crashing.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1828>
2022-03-02 19:35:49 +00:00
Sebastian Dröge 9f798776e5 matroska-mux: Handle pixel-aspect-ratio caps field correctly when checking caps equality
Not having this field is equivalent with it being 1/1 so consider
it like that. The generic caps functions are not aware of these
semantics and would consider the caps different, causing a negotiation
failure when caps are changing from caps with to caps without or the
other way around.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1826>
2022-03-02 10:27:47 +00:00
Sebastian Dröge 1b851ae23f matroska-mux: Handle multiview-mode/flags caps fields correctly when checking caps equality
Not having these fields is equivalent with them being mono/0 so consider
them like that. The generic caps functions are not aware of these
semantics and would consider the caps different, causing a negotiation
failure when caps are changing from caps with to caps without or the
other way around.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1826>
2022-03-02 10:27:47 +00:00
Seungha Yang c4ac657364 qsv: Add H.264 decoder
Initial decoder implementation with baseclass

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1786>
2022-03-01 21:24:07 +00:00
Nirbheek Chauhan 4de365b31c webrtc_sendrecv.py: Sync element props with C version
Also add indentation to make it easier to read

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1821>
2022-03-01 16:33:28 +00:00
Nirbheek Chauhan 5ca5a83e75 webrtc_sendrecv.py: Ensure that gst-python overrides are installed
Otherwise fetching of the offer will fail with a cryptic error:

```
Traceback (most recent call last):
  File "/../gstreamer/subprojects/gst-examples/webrtc/sendrecv/gst/webrtc_sendrecv.py", line 56, in on_offer_created
    offer = reply['offer']
TypeError: 'Structure' object is not subscriptable
```

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1821>
2022-03-01 16:33:28 +00:00
Nirbheek Chauhan e9a02a7380 webrtc_sendrecv.py: Don't try to set state on a None pipe
```
ERROR peer '5762' not found
Traceback (most recent call last):
  File "/../gstreamer/subprojects/gst-examples/webrtc/sendrecv/gst/webrtc_sendrecv.py", line 190, in <module>
    res = loop.run_until_complete(c.loop())
  File "/usr/lib64/python3.10/asyncio/base_events.py", line 641, in run_until_complete
    return future.result()
  File "/../gstreamer/subprojects/gst-examples/webrtc/sendrecv/gst/webrtc_sendrecv.py", line 155, in loop
    self.close_pipeline()
  File "/../gstreamer/subprojects/gst-examples/webrtc/sendrecv/gst/webrtc_sendrecv.py", line 142, in close_pipeline
    self.pipe.set_state(Gst.State.NULL)
AttributeError: 'NoneType' object has no attribute 'set_state'
```

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1821>
2022-03-01 16:33:28 +00:00
Nirbheek Chauhan 78f8505b9a webrtc_sendrecv.py: Fix SSLError when connecting to websocket server
```
  File "/../gstreamer/subprojects/gst-examples/webrtc/sendrecv/gst/webrtc_sendrecv.py", line 189, in <module>
    loop.run_until_complete(c.connect())
  File "/usr/lib64/python3.10/asyncio/base_events.py", line 641, in run_until_complete
    return future.result()
  File "/../gstreamer/subprojects/gst-examples/webrtc/sendrecv/gst/webrtc_sendrecv.py", line 40, in connect
    self.conn = await websockets.connect(self.server, ssl=sslctx)
  File "/home/nirbheek/.local/lib/python3.10/site-packages/websockets/legacy/client.py", line 650, in __await_impl_timeout__
    return await asyncio.wait_for(self.__await_impl__(), self.open_timeout)
  File "/usr/lib64/python3.10/asyncio/tasks.py", line 445, in wait_for
    return fut.result()
  File "/home/nirbheek/.local/lib/python3.10/site-packages/websockets/legacy/client.py", line 654, in __await_impl__
    transport, protocol = await self._create_connection()
  File "/usr/lib64/python3.10/asyncio/base_events.py", line 1080, in create_connection
    transport, protocol = await self._create_connection_transport(
  File "/usr/lib64/python3.10/asyncio/base_events.py", line 1110, in _create_connection_transport
    await waiter
  File "/usr/lib64/python3.10/asyncio/sslproto.py", line 631, in _on_handshake_complete
    raise handshake_exc
  File "/usr/lib64/python3.10/asyncio/sslproto.py", line 676, in _process_write_backlog
    ssldata = self._sslpipe.do_handshake(
  File "/usr/lib64/python3.10/asyncio/sslproto.py", line 116, in do_handshake
    self._sslobj = self._context.wrap_bio(
  File "/usr/lib64/python3.10/ssl.py", line 526, in wrap_bio
    return self.sslobject_class._create(
  File "/usr/lib64/python3.10/ssl.py", line 865, in _create
    sslobj = context._wrap_bio(
ssl.SSLError: Cannot create a client socket with a PROTOCOL_TLS_SERVER context (_ssl.c:801)
```

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1821>
2022-03-01 16:33:28 +00:00
Nirbheek Chauhan e453e43e5a webrtc_sendrecv.py: Fix deprecation warning with Python 3.10
asyncio.get_event_loop() will not implicitly create a new event loop
in a future version of Python, so we need to do that explicitly.

```
webrtc_sendrecv.py:188: DeprecationWarning: There is no current event loop
  loop = asyncio.get_event_loop()
```

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1821>
2022-03-01 16:33:28 +00:00
Nirbheek Chauhan 4c2fd7f104 webrtc_sendrecv.py: Fix styling errors
These are now enforced by the pre-commit python style hook.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1821>
2022-03-01 16:33:28 +00:00
Nirbheek Chauhan d6799b069a webrtc: Update Makefile for building webrtc-sendrecv
This now needs the RTP library.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1821>
2022-03-01 16:33:28 +00:00
Jan Schmidt cad9f8fb36 uridecodebin3: Remove dead variables
Leftover junk from original port

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1820>
2022-03-01 14:21:43 +00:00
Jan Schmidt cebf769725 matroska-mux: If a stream has a TITLE tag, use it for the name.
If a title tag is pushed to a pad, store it as the Track name.
This means that players will use it as the human readable
description of the track, instead of something generic like 'Video'
or 'Subtitle'

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1798>
2022-03-01 13:17:40 +00:00
Jan Schmidt 7efdc9c7f5 matroskademux: Don't parse Tracks element twice
If the tracks element was parsed from the SeekEntry, don't
parse it a second time and recreate tracks, as this
loses any tags that were read using the seek table.

If a genuinely new Tracks element is found, do read that
as it is needed for MSE support.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1798>
2022-03-01 13:17:40 +00:00
Sebastian Fricke 7063aa1471 docs: Fix typos in documentation
In building-from-source-using-meson.md:
s/implicitely/implicitly/

In README.md:
s/uncompatible/incompatible/

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1743>
2022-03-01 11:33:10 +00:00
Sebastian Fricke 5a421886b4 docs: Extend documentation for the GStreamer development environment
Add more extensive documentation for the development environment.
Document how the tool works, how to use it and common use cases.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1743>
2022-03-01 11:33:10 +00:00
Sebastian Fricke 0b6bbce012 Remove the uninstalled term
Remove the symbolic link `gst-uninstalled` which points to `gst-env`.
The `uninstalled` is the old name and the project should stick to a
single name for the procedure.
Remove the term from all the files, exceptions are variables from
dependencies like `uninstalled_variables` from pkgconfig and
`meson-uninstalled`.
Adjust mentions of the script in the documentation and README.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1743>
2022-03-01 11:33:10 +00:00
Sebastian Fricke c999d2c3a9 Maintain build instructions at a single location
Do not maintain similar build instructions within each gst-plugins-*
subproject and the subproject/gstreamer subproject. Use the build
instructions from the mono-repository and link to them via hyperlink.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1743>
2022-03-01 11:33:10 +00:00
Sebastian Fricke 7702072a6f Add documentation for GST_VALIDATE_APPS_DIR
Add documentation for the environment variable, explaining what it is
used for and the default search locations.

Fixes: 4d569b51ed add a way to specify an application directory.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1743>
2022-03-01 11:33:10 +00:00
Sebastian Fricke 278f4a6418 Improve environment variable documentation
At GST_VALIDATE_FILE:
s/will be outputed/are output/

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1743>
2022-03-01 11:33:10 +00:00
Sebastian Fricke 0a65c87e8c Add documentation for GST_VALIDATE_PLUGIN_PATH
Add documentation for the environment variable, explaining what it is
used for and the default search locations.

Fixes: 83d6978f80 Implement fault_injection as a Gs(tValidate)Plugin
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1743>
2022-03-01 11:33:10 +00:00
Víctor Manuel Jáquez Leal c769a089ea docs: Add vah264enc metadata.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1051>
2022-03-01 10:53:50 +01:00
He Junyan 1f2f135cdb va: enable the H264 encoder.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1051>
2022-03-01 10:53:50 +01:00
He Junyan f17357f759 va: Add H264 encoder.
This a new VA-API implementation of a H264 encoder.

It can control the GOP and parameter settings, while the MV searching,
VCL and the rate control algorithm are implemented by VA drivers and HW.
It supports most of the common usage options in H264, but still lacks
of look ahead, field, B frame weighted prediction, etc.

Co-authored-by: Victor Jaquez <vjaquez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1051>
2022-03-01 10:53:50 +01:00
He Junyan 736a0ac9b0 va: Add a common encoder object.
As the counterpart of the va decoder, this class handles all the
common logic for the encoding routine and miscellaneous queries about
encoding.

Co-authored-by: Victor Jaquez <vjaquez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1051>
2022-03-01 10:53:50 +01:00
He Junyan fb644e84fa va: Add vacompat.h to wrap glib functions.
The g_queue_clear_full() and g_array_copy() functions in the glib
may not be available for the current glib version check, so we add
helper functions to wrap it.
This should be deleted after the glib version bumps.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1051>
2022-03-01 10:53:50 +01:00
He Junyan 57d50a941f va: Add the profile string name into the profile_map.
We also add a helper function of gst_va_profile_from_name to get
the VA profile value by its profile string name.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1051>
2022-03-01 10:53:50 +01:00
He Junyan e0b6c6678b va: Change the H264 profile string order in the profile_map.
The first one should be the one that matches the VA profile's name
most precisely.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1051>
2022-03-01 10:53:50 +01:00
He Junyan 83408cfdc8 va: caps: Expose gst_va_create_coded_caps as helper function.
And allow free indentation for array declaration.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1051>
2022-03-01 10:53:50 +01:00
He Junyan 1defc9ce6b test: Add test cases for the H264 bitwriter.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1051>
2022-03-01 10:53:49 +01:00
He Junyan d68d3b9a0d codecparsers: bitwriter: Add the common bit writer functions for H264.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1051>
2022-03-01 10:53:49 +01:00
He Junyan ca914f4ac2 codecparsers: nalutils: Add nal_writer_reset_and_get_data help function.
We not only want to create a NAL gstmemory, but also need to create and
get the raw data of a NAL writer for the later usage.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1051>
2022-03-01 10:53:49 +01:00
Guillaume Desmottes 1f02f24828 gs: look for google_cloud_cpp_storage.pc
storage_client.pc was legacy and has been removed:
df6fa3611c (diff-bc35ad7c2fe631fd5578a06092412dba81c7ddd27bb25df7e17bb13771799afcL743)

No need to keep looking for storage_client.pc as a fallback as 1.25.0,
our minimum version, already ships google_cloud_cpp_storage.pc

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1815>
2022-03-01 08:10:39 +00:00
Vivia Nikolaidou b699feefee yadif.asm: Fix improper usage of LOAD macro
LOAD macro relies in m7 being zero for interleaving purposes. Using LOAD
on the m7 register makes it interleave with its new content instead of
with 0.

The effect of this bug was bobbing on some static lines that appeared
over fast-moving content.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1816>
2022-03-01 07:22:10 +00:00
Vivia Nikolaidou d499342f0d yadif.asm: Typo fixes in comments
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1816>
2022-03-01 07:22:10 +00:00
Vivia Nikolaidou 087ca88213 yadif: Fix bug in C implementation of CHECK
It was different compared to the corresponding part in both ffmpeg and
the asm implementation. Fixing this makes videotestsrc pattern=spokes
not jump at all when not using the asm optimisations.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1816>
2022-03-01 07:22:10 +00:00
jinsl00000 ef4cc9e637 ipcpipeline: fix crash and error on windows with SOCKET or _pipe()
The fd was in different meanings on windows:
POSIX read and write use the fd as a file descriptor.
The gst_poll use the fd as a WSASocket.

This patch use WSASocket as default on windows. This is a temporary measure, because IPC has many different implement. There may be a better way in the future.

See #1044

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1791>
2022-03-01 06:31:51 +00:00
Ming Qian 24eb35f113 v4l2videodec : enable resolution change
The dynamic resolution changes when
the sequence starts when the decoder detects a coded frame with one or
more of the following parameters different from those previously
established (and reflected by corresponding queries):
1.coded resolution (OUTPUT width and height),
2.visible resolution (selection rectangles),
3.the minimum number of buffers needed for decoding,
4.bit-depth of the bitstream has been changed.

Although gstreamer parser has parsed the stream resolution.
but there are some case that we need to handle resolution change event.
1. bit-depth is different from the negotiated format.
2. the capture buffer count can meet the demand
3. there are some hardware limitations that the decoded resolution may
be larger than the display size. For example, the stream size is
1920x1080, but some vpu may decode it to 1920x1088.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1381>
2022-03-01 00:00:50 +00:00
Ming Qian fe56af607b v4l2videodec : refactor the setup process of capture
v4l2videodec do some refactoring so that it can support
dynamic resolution change event.

1.wrap the setup process of capture as a function,
as decoder need setup the capture again when
dynamic resolution change event is received.

2.move the function "remove_padding"

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1381>
2022-03-01 00:00:50 +00:00
Célestin Marot cabff7a20f video-info: encoded format can have RGB color-matrix (Fixes #1435)
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1435>
2022-02-28 16:05:43 +00:00
Wu Tong c60ac7a04b MSDK: Add _context_query() and avoid compile error on Windows
To avoid compile error on Windows, macro definitions are added to suppress va
variables. In the meantime, add function _context_query() to query
context on Windows.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1693>
2022-02-28 12:54:23 +00:00
Sebastian Dröge 5849570fe8 buffer: Clarify that the MARKER flag maps to the corresponding RTP header flag
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1776>
2022-02-28 10:13:11 +00:00
Sebastian Dröge b0afaffc5d rtp: In payloaders map the RTP marker flag to the corresponding buffer flag
This allows downstream of a payloader to know the RTP header's marker
flag without first having to map the buffer and parse the RTP header.

Especially inside RTP header extension implementations this can be
useful to decide which packet corresponds to e.g. the last packet of a
video frame.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1776>
2022-02-28 10:13:11 +00:00
Joseph Donofry 630dbea94c osxaudiosrc: Support a device as both input and output
osxaudiodeviceprovider now probes devices more than once to determine
if the device can function as both an input AND and output device.

Previously, if the device provider detected that a device had any output
capabilities, it was treated solely as an Audio/Sink.  This causes issues
that have both input and output capabilities (for example, USB interfaces
for professional audio have both input and output channels).  Such devices
are now listed as both an Audio/Sink as well as an Audio/Source.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1385>
2022-02-28 06:51:21 +00:00
Sebastian Dröge 2fc91717cb registry: Fix multi-line #warning compiler warning
subprojects/gstreamer/gst/gstregistry.c:1593: unexpected character `"'

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1802>
2022-02-28 06:01:24 +00:00
Sebastian Dröge 6c3642da49 video-format-info: Use correct parameter name in gst_video_format_info_extrapolate_stride() docs
../subprojects/gst-plugins-base/gst-libs/gst/video/video-format.c:7570: Warning: GstVideo: gst_video_format_info_extrapolate_stride: unknown parameter 'info' in documentation comment, should be 'finfo'

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1803>
2022-02-27 13:19:49 +02:00
Sanchayan Maity cc3419daf6 rtp: ldac: Set frame count information in payload
The RTP payload seems to be required as it carries the frame count
information. Also, gst_rtp_base_payload_allocate_output_buffer had
the second argument incorrect.

Strangely some devices like Shanling MP4 and Sony XM3 would still
work without this while some like the Sony XM4 do not.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1797>
2022-02-26 21:09:57 +05:30
Sanchayan Maity 7c9a315578 ldac: Set eqmid in caps
We set the eqmid in caps to be usable downstream by rtpldacpay for
knowing the frame count.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1797>
2022-02-26 17:05:22 +05:30
Vivia Nikolaidou 7cebd5b359 tsmux: Skip empty buffers
They can be created e.g. by aggregator when there is a gap. Such buffers
should not be muxed at all.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1611>
2022-02-25 21:29:43 +00:00
Xavier Claessens 3d8372cc50 devenv: Add some missing GStreamer specific env variables
This should make "meson devenv" closer to what "gst-env.py" sets.

- GST_VALIDATE_SCENARIOS_PATH
- GST_VALIDATE_APPS_DIR
- GST_OMX_CONFIG_DIR
- GST_ENCODING_TARGET_PATH
- GST_PRESET_PATH
- GST_PLUGIN_SCANNER
- GST_PTP_HELPER
- _GI_OVERRIDES_PATH

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1768>
2022-02-25 20:35:26 +00:00
Sebastian Dröge 3941eb7dbd audioconvert: Add dithering-threshold property
By default, no dithering is applied if the target bit depth is above 20
bits. This new property allows to apply dithering nonetheless in these
cases.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1730>
2022-02-25 19:32:28 +00:00
Jan Alexander Steffens (heftig) e10bd02e1d fdkaacdec: Support arbitrary channel configs
Try to match the config to GStreamer positions. If something doesn't
fit, fall back to a set of unpositioned channels.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1561>
2022-02-25 18:20:52 +00:00
Jan Alexander Steffens (heftig) d4b4ffc944 fdkaacdec: Use predefined channel layouts
This limits the decoder to the layouts predefined for the encoder
(including the MPEG standard layouts) but greatly simplifies the
implementation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1561>
2022-02-25 18:20:52 +00:00
Vivia Nikolaidou e0d5e022a1 tsmux: Lock mux->tsmux, the programs hash table, and pad streams
They contain implementations that are not thread-safe (e.g. GList, GHashTable).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1616>
2022-02-25 17:42:52 +00:00
Sebastian Dröge e119cdee3b audio-quantize: Switch dither PRNG from LCG to xorshift
While this is slightly more expensive (~48% slower per random number) it
does not cause any measurable difference when running through a complete
audio conversion pipeline.

On the other hand its random numbers are of much higher quality and on
spectrograms for 32 bit to 24 bit conversion the difference is clearly
visible.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1729>
2022-02-25 12:41:18 +00:00
Jan Alexander Steffens (heftig) d6ec88c775 deinterlace: greedyh: Stop adding 2 to cur_field_idx
Just a simplification.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1790>
2022-02-25 12:06:56 +00:00
Jan Alexander Steffens (heftig) dc1ae0aaa0 deinterlace: greedyh: Use _plane in _packed, fix planar formats
This greatly reduces code duplication. It also exposed the cause for
planar formats not being properly deinterlaced:

The planar path was missing the initial offset adjustment that the
packed path did to `L2` and `L2P` in the case of an even field, which
caused it to select the wrong weave lines every other field.

Add those offsets in `_plane`.

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1047
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1790>
2022-02-25 12:06:55 +00:00
Jan Alexander Steffens (heftig) 625cbcf70a deinterlace: greedyh: Rename _planar_plane to _plane
As well as `i` to `plane`.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1790>
2022-02-25 12:06:55 +00:00
Jan Alexander Steffens (heftig) 7e16955e4d deinterlace: greedyh: Move code from _planar into _planar_plane
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1790>
2022-02-25 12:06:55 +00:00
Jan Alexander Steffens (heftig) 19ca706fe8 deinterlace: greedyh: Move _planar_plane upwards
In preparation of refactoring. No functional change.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1790>
2022-02-25 12:06:55 +00:00
Jan Schmidt 1726361622 gst-play: Fix trick-mode handling.
The instant-rate value in the TrickMode enum is a
flag, but the other values are not. Move instant-rate
to the end of the enum and give it a value large enough
for it to be used without modifying the trick-mode
setting.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1788>
2022-02-25 08:07:25 +00:00
Sebastian Dröge 19b638debe appsrc: Store strong references to the expected buffers in the tests
Otherwise the buffers might already be freed as they were only owned by
the GstSample / appsrc and potentially don't survive until the pad
probe, as observed in some CI runs of the tests.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1787>
2022-02-25 07:26:59 +00:00
Mengkejiergeli Ba b41c70aed5 msdkdec: Fix uninitialized variables
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1731>
2022-02-25 03:11:29 +00:00
Mengkejiergeli Ba e1090c152c msdk: Fix unchecked return values
There are several calls of gst_video_info_from_caps and gst_video_frame_copy
without checks for the returned values. This patch adds all necessary
function return checks.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1738>
2022-02-25 02:04:20 +00:00
Jan Alexander Steffens (heftig) 4567d569ca videoaggregator: Correct use of start_time/end_time
When 29713c5d changed most uses of `start_time` and `end_time` to
`start_running_time` and `end_running_time`, it missed two.

Fixes: 29713c5d40
Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1038
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1779>
2022-02-22 16:00:54 +00:00
Ruben Gonzalez 302628a4bb x264enc: Update long-name and description
Update x264enc long-name to be more than just the name. Then the
description also was updated to be longer than the long-name, and
similar to the plugin description.

Finally, as I am here, H264 was replaced by H.264 and x264 is only a
plugin (not plugins).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1771>
2022-02-22 15:28:21 +00:00
Seungha Yang ad73f73356 qsvencoder: Fix caps leak in Linux build
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1769>
2022-02-22 12:55:26 +00:00
Seungha Yang 20328914dc qsv: Fix debug category name of qsvallocator
Remove gst prefix to make $env:GST_DEBUG="qsv*:6" work for qsvallocator
as well

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1769>
2022-02-22 12:55:26 +00:00
Mengkejiergeli Ba 108846ed97 bad:docs: Add vaav1dec in documentation
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1773>
2022-02-22 11:03:28 +00:00
Guillaume Desmottes 8bbdd9addb rtpsource: fix rtp_source_get_nack_deadlines doc
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1775>
2022-02-22 09:40:35 +00:00
Sebastian Dröge 2d134c0432 rtpbasepayload: Copy all buffer metadata instead of just GstMetas for the input meta buffer
This gives RTP header extensions some more metadata to work from.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1774>
2022-02-22 10:54:23 +02:00
Sebastian Dröge a10b35c011 gl: Mark GL memory GType functions as deprecated
They can't be used in any useful way. The type of every GstMemory is
always GST_TYPE_MEMORY and the subtyping relationship has to be
implemented on top of that via the associated allocator and mem_type
string.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1764>
2022-02-21 21:26:43 +00:00
Sebastian Dröge bd867aea4f gl: Add #ifndef GST_REMOVE_DEPRECATED for existing deprecated API
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1764>
2022-02-21 21:26:43 +00:00
Sebastian Dröge 5acb8ac559 gl: Add versioned Deprecated marker to gst_gl_display_find_window
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1764>
2022-02-21 21:26:43 +00:00
Sebastian Dröge 5d8705437d gl: Replace existing G_DEPRECATED_FOR usage with GST_GL_DEPRECATED_FOR
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1764>
2022-02-21 21:26:43 +00:00
Sebastian Dröge 6d83665d7a gl: Add GST_GL_DEPRECATED
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1764>
2022-02-21 21:26:43 +00:00
Sebastian Dröge 8ab1c5791b d3d11: Remove non-existing gst_d3d11_memory_get_type() API from header
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1764>
2022-02-21 21:26:43 +00:00
Dmitry Osipenko 248f143fa3 v4l2codecs: Support YUV420M format
YUV420M format of V4L essentially is I420 with separate memory planes.
It's used by NVIDIA Tegra V4L decoder. Support this format by v4l2codecs.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1727>
2022-02-21 21:58:19 +03:00
Matthew Waters b0f72ed788 ulpfecenc: slightly safer dispose impl
Technically dispose can be called more than once (even if gstelement is
not actually set up to do that) so need to protect against that.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1761>
2022-02-21 09:43:33 +00:00
Matthew Waters 629b427a13 ulpfecenc: fix unmatched free() call
One must always match a g_slice_new with a g_slice_free and a g_new with
a g_free.  This was not the case for the internal ctx struct.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1761>
2022-02-21 09:43:33 +00:00
Matthew Waters acc9024039 rtpulpfecenc: add some debug logging
Like, what configuration we are using or whether a fec packet is
generated.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1761>
2022-02-21 09:43:33 +00:00
Nirbheek Chauhan 4e22ef5bd2 matroska-demux: Emit a warning when no codec data found
It is bad if an mkv file does not have codec data for the ProRes
variant, so we should emit a warning. ffmpeg does the same thing.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1739>
2022-02-21 08:49:28 +00:00
Sebastian Groß 6372aaa608 audiovisualizer: shader: Fix dframe out of bound write
shader_fade_and_move_horiz_out writes a complete stride at the end of its
dframe data

This led to SIGSEGV since the stride reached into sframe->map[0]->memory
which could not be umpapped later on.

This is due to `d` is increased twice. Once at the end of the upper loop
and at the start of the lower loop.
The corresponding dframe stride is therefore skipped.

Rewind `d` and start at the correct position.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1751>
2022-02-21 08:20:44 +01:00
Matthew Waters 6a7f2ca819 tests/clock: avoid a race cranking
Scenario:
- Source 1 requesting and waiting a clock id
- Source 2 requesting and waiting on a clock id
- Test attempting to crank both sources in the same GstHarness

gst_test_clock_crank() originally dropped locks between the retrieving
of the next clock id and advancing to the next clock id.  This would
mean that both sources would race each other attempting to complete
their clock waits.  Sometimes the operations would be performed in the
correct order, other times they would not and a FALSE return value would
be produced.

This would lead to an assertion in gst_harness_push_from_src() expecting
that all clock cranks to succeed.

Fix by ensuring that the clock wait produced is dealt with before
processing the next by not dropping the relevant locks after retrieving
the next clock id.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1299>
2022-02-21 03:23:23 +00:00
Seungha Yang 8ff5f10a40 d3d11screencapturesrc: Use staging buffer pool for performance
By using staging pool/buffer, we can avoid per frame
staging texture -> system memory copy.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1756>
2022-02-20 23:43:18 +00:00
Nicolas Dufresne 3d2eb5a04c doc: Add NV12_16L32S into the cache
Autogenerated by CI

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1567>
2022-02-20 22:32:56 +00:00
Nicolas Dufresne d87161b80e tests: video: Add a unit test for stride extrapolation
This is a minimal unit test the show that the stride extrapolation can work
with all pixel format we support. This minimal verify that the extrapolation
match the stride we set into GstVideoInfo with 320x240 for all the pixel
format we support. The tiles formats are skipped, since their stride is
set as two 16bit integers, and we also skip over palette planes.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1567>
2022-02-20 22:32:55 +00:00
Nicolas Dufresne 8883809ef9 v4l2codecs: Enable MediaTek MM21 (NV12_16L32S)
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1567>
2022-02-20 22:32:55 +00:00
Nicolas Dufresne 3005dbc55a v4l2codecs: Add support for multi planar buffers
V4L2 have some pixel formats that produces 2 dmabuf, this add
support for these format.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1567>
2022-02-20 22:32:55 +00:00
Nicolas Dufresne e2b2ff26c9 v4l2transform: Handle caps changes
As this element is single threaded, we only need to stop the objects to
allow changing the format again. Fixes assertion notably on shutdown and
on some other situation where the format may be set twice without
actually activating the element.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1567>
2022-02-20 22:32:55 +00:00
Nicolas Dufresne d394b8b4bd v4l2object: Avoid crash on early failure
This happens while an external error lead to an early shutdown.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1567>
2022-02-20 22:32:55 +00:00
Nicolas Dufresne ec9585d148 video4linux2: Add MM21 support
This enables mtk-vcodec and MDP driver from mainline Linux kernel.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1567>
2022-02-20 22:32:55 +00:00
Nicolas Dufresne bab9041c4b Port plugins to gst_video_format_info_extrapolate_stride()
This reduces code duplication and simplify addition of new
pixel formats into related plugins.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1567>
2022-02-20 22:32:55 +00:00
Nicolas Dufresne fa1f042d1d video: Add an helper to extrapolate strides
Many of the legacy APIs, specifically in the Linux Kernel, have a
single stride for the pictures. In this context, it is common
to extrapolate the other strides based on the selected pixel
format. Such function have been copy pasted from video4linux2
plugin into wayland, kms and v4l2codecs plugins.

This patch implements a generalized from of that function and
make it available to everyone through the video library.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1567>
2022-02-20 22:32:55 +00:00
Nicolas Dufresne c9b127dae3 video: Add NV12_16L32S aka Mediatek MM21 support
Unlike other simple tiled formats, the Mediatek HW use different tile size
per-plane. The tile size is scaled according to the subsampling. Effectively,
using the name 16L32S to represent linearly layout tiles of size 16x32 bytes
in the Y plane, and 16x16 in the UV plane. In order to make this specificity
discoverable, a new SUBTILES flags have been added.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1567>
2022-02-20 22:32:55 +00:00
Rouven Czerwinski 748c5f3579 gstv4l2tuner: return NULL if no norm set
If the video4linux device supports norms but has no norm set, norm is
returned as an uninitialized variable after the ioctl call, leading to
gst_v4l2_tuner_get_norm_by_std_id() returning a random norm from the
supported norms. Catch this case and instead return NULL to indicate
that no norm is setup.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1625>
2022-02-20 21:38:40 +00:00
Seungha Yang d49454123e winscreencap: Remove dxgiscreencapsrc element
We have the d3d11screencapturesrc element in d3d11 plugin
which is obviously better than this element in terms of performance
and design, so we don't need to make people be confused by two separate elements.

Let's pick the better implementation and remove unnecessary one.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1750>
2022-02-20 20:04:05 +00:00
Jan Alexander Steffens (heftig) 10904e5580 wpe: Clean up build script
Use feature.require to check for gstgl and exit early if 'wpe' is
disabled (don't even check for wpe-webkit-1.1).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1668>
2022-02-20 14:34:12 +00:00
Seungha Yang c19d0db454 directshow: Fix build warnings
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1744>
2022-02-19 19:54:52 +00:00
Seungha Yang 7eedd52510 directshow: Merge plugins into single directshow plugin
... and lower rank of dshowvideosink and dshowdeviceprovider
to GST_RANK_MARGINAL since we don't prefer this plugin
by default

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1744>
2022-02-19 19:54:52 +00:00
Seungha Yang d94d338bd5 directshow: Remove white spaces
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1744>
2022-02-19 19:54:52 +00:00
Martin Reboredo 717009f8f5 vulkanshaderspv: SPIRV based filter
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1197>
2022-02-19 13:55:32 -03:00
Seungha Yang e86b5b28f7 scenarios: Update for videoaggregator rounding behavior change
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1747>
2022-02-19 06:53:02 +00:00
Seungha Yang a0dc29841c videoaggregator: Use floor() to calculate current position
... instead of round(). Depending on framerate, calculated position
may not be clearly represented by using uint64, 30000/1001 for example.
Then the result of round() can be sliglhtly larger (1ns) than
buffer timestamp. And that will cause unnecessary frame delay.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1747>
2022-02-19 06:53:02 +00:00
Nicolas Dufresne cf3d64129b v4l2codecs: vp9: Fix reset_frame_context parameter
It was assumed that the kernel parameters would match with the bitstream value
but instead the author when with another set of value. Surprisingly, this
makes no difference with the resulting fluster score.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1748>
2022-02-18 23:55:59 +00:00
Nicolas Dufresne 5a9df9e850 v4l2codecs: vp9: Only fill compressed headers if needed
Fixes: 13944cf3ee ("v4l2codecs: vp9: Make compressed hdr control optional")
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1748>
2022-02-18 23:55:59 +00:00
Tim Mooney 54a1f60077 v4l2: include <sys/ioccom.h> on Illumos
Needed for _IOR/_IORW

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1524>
2022-02-18 21:34:49 +00:00
Nicolas Dufresne a5c9e2d6aa doc: Fix doc comment for GstChildProxy
This removes warning like:

../subprojects/gstreamer/gst/gstchildproxy.h:57: Error: Gst: identifier not found on the first line:
   * #GstChildProxyInterface::get_child_by_name:
     ^

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1297>
2022-02-18 20:32:19 +00:00
Nicolas Dufresne 6bd1f2753a base: audioencoder: Keep serialize event behind buffers
If a serialized event arrives behind a buffer, it should not be send before
it. This fixes the pending event handling so that only early pending events,
the one that arrrived or was generated while the adapter was empty get send
before pushing buffer. All other events are not pushed after.

This issue lead the latency tracer to think our audio encoder did not have any
latency. This was testing with opusenc in a live pipeline.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1266>
2022-02-18 14:40:29 -05:00
Loic Le Page e1c0628bb9 Add build files and fix build for gst-plugins-bad dshowsinkwrapper plugin
dshowsinkwrapper plugin is the old dshowvideosink plugin that has been
renamed to be compliant with the actuel plugin name in the source code.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1577>
2022-02-18 14:59:25 +01:00
Loic Le Page b355345ef5 Add build files and fix build for gst-plugins-bad dshowsrcwrapper plugin
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1577>
2022-02-18 14:59:25 +01:00
Loic Le Page 587b2e6bcb Add build files and fix build for gst-plugins-bad dshowdecwrapper plugin
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1577>
2022-02-18 14:59:25 +01:00
Loic Le Page 42bdeaf52c Add directshow strmbase library source code from Microsoft repo
Original repo is here:
https://github.com/microsoft/Windows-classic-samples

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1577>
2022-02-18 14:59:25 +01:00
Loïc Le Page 42c6a26aea Move all directshow plugins to the same sub-folder
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1577>
2022-02-18 14:59:24 +01:00
Sebastian Wick e61e069189 matroska: default prores fourcc apcn
If there is no codec private data for prores it should default to Apple
ProRes 422 Standard Definition (apcn). Can be tested with
strobe_scientist.mkv from
https://developers.google.com/media/vp9/hdr-encoding

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1734>
2022-02-18 08:38:31 +00:00
Seungha Yang 53ed876002 qtdemux: Do not send unnecessary GAP events
Each stream may have its own segment timeline
(i.g., different segment.start or segment.base)
depending on edit-list and composition-to-decode atom.

Make sure whether time position of a stream has been actually
far behind than that of current target stream.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1352>
2022-02-17 19:39:53 +00:00
Tim Mooney 97720dabe0 meson: check for libsocket and libnsl
If present, add '-lsocket' and '-lnsl' to network_deps.

ext/curl/meson.build: add network_deps to dependencies
gst/festival/meson.build: same
sys/shm/meson.build: same

Fixes linking issues on Illumos distros.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1525>
2022-02-17 18:44:49 +00:00
Haihao Xiang 55ceddff91 vaapioverlay: inline sinkpad scaling support
Often, users will need to scale inputs (e.g.
with vaapipostproc) before they are submitted
to the vaapioverlay.  However, this results in
multiple VPP passes/operations in the pipeline
which creates unnecessary process overhead.

This change allows for inputs to be submitted
at original scale to vaapioverlay with per-sinkpad
scale dimensions specified so they can be scaled
and blended/composited in a single VPP pass/operation
to avoid the unnecessary process overhead.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1380>
2022-02-16 19:19:56 -08:00
U. Artie Eoff 48b6404f8e vaapioverlay: use vpp blend state iif using alpha
Don't set VAAPI vpp blend flags if alpha == 1.0,
i.e. fully opaque.  This can avoid extra processing
overhead on some drivers that apply blending
unconditionally when flags are present, even if the
end result is the same without blend flags (i.e. all
opaque alpha channels).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1380>
2022-02-16 19:19:56 -08:00
Seungha Yang 04b8dfa391 d3d11: Add support for AYUV, AYUV64, and RGBA64_LE formats
Note that AYUV and AYUV64 formats will be used to expand format
support, especially some packed YUV formats (e.g., Y410, YUY2)
are common DXGI formats used for hardware decoder/encoder on Windows
but those formats cannot be used as a render target. We need to handle
them differently without pixel shader help, using compute shader
for example.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1699>
2022-02-16 18:41:05 +00:00
Seungha Yang cb7e454b53 d3d11: Reorganize format mapping table
... and handle GST <-> D3D11 format mapping in a single place to
make adding format easier

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1699>
2022-02-16 18:41:05 +00:00
Seungha Yang dd906f9610 d3d11: Store device format in struct
Holding pointer to struct was unsafe approach because
the pointer to d3d11 format will be invalidated once d3d11 device
object is released

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1699>
2022-02-16 18:41:05 +00:00
Seungha Yang 04f3a2bd22 gstinfo,ptpclock,libcheck: Use GetCurrentProcessId() instead of getpid() on Windows
getpid() shouldn't be used in case of UWP. Use GetCurrentProcessId()
instead which provides exactly the same functionality and can be
used with UWP as well.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1006>
2022-02-16 17:03:29 +00:00
Seungha Yang ec8b293999 check: Disable some tests if pipe() is unavailable for UWP build
pipe() and _pipe() are not allowed on UWP

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1006>
2022-02-16 17:03:29 +00:00
Seungha Yang e1f0687b09 meson: Do hard build error for some MSVC warnings
Handle various MSVC warnings as errors for development version.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1006>
2022-02-16 17:03:29 +00:00
Seungha Yang 2d969f8ad4 Remove some trailing white spaces
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1006>
2022-02-16 17:03:29 +00:00
Dmitry Osipenko b757d12cff v4l2codecs: h264: Correct scaling matrix ABI check
Scaling matrix V4L UAPI control not presents on NVIDIA Tegra, the default
matrix should be used in this case. Mark scaling matrix presence optional.

Fixes: 47bfa71530 ("v4l2codecs: h264: Improve ABI check ")
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1726>
2022-02-16 13:16:17 +00:00
Mengkejiergeli Ba 586dfab9bd msdkdec: Enable SFC scaling for AVC and HEVC
Decoder SFC only supports down-scaling at most to 1/8.
For example, given a 4K bistream, SFC can scale it to 1080p via:
"msdkh265dec ! video/x-raw,width=1920,height=1080 ! glimagesink"

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1444>
2022-02-16 08:26:46 +00:00
Mengkejiergeli Ba c5f0e075e2 msdkdec: Enable SFC csc for AVC and HEVC
Decoder SFC will be triggered when default output format is not accept at
downstream. One use case below can work without using msdkvpp:
"! msdkh265dec ! "video/x-raw,format=BGRA" ! glimagesink",

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1444>
2022-02-16 08:26:46 +00:00
Mengkejiergeli Ba eb742c8ed0 msdkdec: Add SFC codes
SFC refers to Scaler Format Converter, more details here:
https://01.org/sites/default/files/documentation/intel-gfx-prm-osrc-kbl-vol15-sfc.pdf
By attaching mfxExtDecVideoProcessing buffer to mfxVideoParam, decoder
can do SFC for csc and scaling.

MSDK will check if surface bitdepth equals to input when no SFC is
triggered, which means in the case of SFC, there is no need to update
surface bitdepth via gst_msdk_update_mfx_frame_info_from_mfx_video_param.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1444>
2022-02-16 08:26:46 +00:00
Sebastian Dröge 36c4c58ee8 subprojects: Switch gst-plugins-rs.wrap to the main branch
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1725>
2022-02-16 09:54:07 +02:00
Seungha Yang dbda4cf409 d3d11converter: Fix for missing GRAY conversion
Add missing Y410 -> GRAY and GRAY -> semi-planar conversion

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1724>
2022-02-16 02:30:01 +09:00
Seungha Yang 98345a141a d3d11converter: Don't use FIXME_OBJECT for non-GstObject
... and print ERROR messages for unexpected input/output formats

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1724>
2022-02-16 02:27:53 +09:00
Sebastian Dröge 8bda2ef474 qtmux: Don't post an error message if pushing a sample failed with FLUSHING
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1711>
2022-02-15 13:43:41 +02:00
He Junyan 24c3e0fcfa va: Delete the display lock/unlock when we call VA-API.
According to the VA-API's description, they are MT-safe, we do not
need to care about that in our middleware layer. The lock/unlock
operations have overhead and make the performance lower.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1333>
2022-02-15 10:02:08 +00:00
Jan Alexander Steffens (heftig) acd0300485 openaptx: Support libfreeaptx
[libfreeaptx][1] is a fork of libopenapt 0.2.0, used by pipewire.

[1]: https://github.com/iamthehorker/libfreeaptx

Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1642
Closes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1589
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1667>
2022-02-15 08:18:44 +00:00
Heiko Becker d03971dac7 meson: Don't build lame plugin with -Dlame=disabled
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1686>
2022-02-15 04:05:08 +05:30
Seungha Yang e3e23a2c84 d3d11converter: Fix RGB to GRAY conversion
Fix typo in shader code

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1697>
2022-02-14 17:49:54 +00:00
Stéphane Cerveau a4b83810fe tsdemux: unlock mutex on -1 start_offfset
Closing #1013

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1694>
2022-02-14 12:58:33 +00:00
Seungha Yang 27246ebeb0 d3d11download: Fix decide_allocation
Caps should be parsed in any cases.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1691>
2022-02-14 10:48:31 +00:00
Víctor Manuel Jáquez Leal 3c713cc16e vaapi: Use meson's features for option selection.
Modernize option selection, so if a required dependency is missing,
produce a meaningful error message.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1676>
2022-02-14 09:46:01 +00:00
He Junyan fa4dc3470f meson: va: Add va option check into plugin's build.
Because the liblibgstva is built unconditionally, we now move the
va option check into va plugin's build.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1685>
2022-02-14 06:30:56 +00:00
He Junyan 58d594df44 meson: va: Remove va option check from gst-libs
Building libgstva-1.0 unconditionally for the va implementation can be
 used by non-va plugins such as MSDK even when va plugin is disabled

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1685>
2022-02-14 06:30:56 +00:00
Philippe Normand 5a2e1ecb4d dtlstransport: Notify ICE transport property changes
The application might track the underlying ICE transport, so not notifying
changes might lead to use-after-free issues.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1688>
2022-02-14 03:24:26 +00:00
Marek Vasut c9e108378a jpegdec: Pull row_stride from GST_VIDEO_FRAME_PLANE_STRIDE()
The libjpeg-turbo internal state might not be correctly initialized for
the first frame in a stream, pull the frame stride from gstreamer frame
metadata instead, which is correct even for the first frame, and which
makes this code consistent with the surrounding lines.

Fixes: e6d83d8f96 ("jpegdec: Support libjpeg-turbo colorspace conversion")
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1687>
2022-02-13 14:46:31 +01:00
Marek Vasut d277002186 jpegdec: Call gst_jpeg_turbo_parse_ext_fmt_convert() before jpeg_start_decompress()
It is imperative that the libjpeg-turbo state is properly initialized
before jpeg_start_decompress() is called. Make sure cinfo.out_color_space
and cinfo.raw_data_out are set to their final values matching their peer
caps before calling jpeg_start_decompress().

Fixes: e6d83d8f96 ("jpegdec: Support libjpeg-turbo colorspace conversion")
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1687>
2022-02-13 14:46:31 +01:00
Marek Vasut 4ee4a9bff9 jpegdec: Factor out gst_jpeg_turbo_parse_ext_fmt_convert()
Pull out peer caps checking code into gst_jpeg_turbo_parse_ext_fmt_convert().
This code is used by libjpeg-turbo extras to determine whether peer is capable
of handling buffers into which libjpeg-turbo can directly decode data. This
kind of check must be performed before jpeg_start_decompress() is called in
gst_jpeg_dec_prepare_decode() as well as in gst_jpeg_dec_negotiate(), hence
the common code.

This commit does modify the code a little to make it easier to call from both
call sites without much duplication, hence the extra `if (*clrspc)` test.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1687>
2022-02-13 14:46:31 +01:00
Marek Vasut 9a029f016d Revert "jpegdec: only allow conversions from RGB"
This reverts commit 2aa2477208.
The commit is completely wrong, libjpeg-turbo is perfectly capable
of decoding I420 (YUV) to RGB. The test case provided alongside the
aforementioned commit passes without this revert because it decodes
image of JCS_YCrCb color space, so the new `if (clrspc == JCS_RGB)`
condition is false on that image, and the libjpeg-turbo decoding
does not get used. The real bug is hidden by that commit.

The real problem is in the call order of gst_jpeg_dec_prepare_decode()
and gst_jpeg_dec_negotiate(). The gst_jpeg_dec_prepare_decode() calls
jpeg_start_decompress() which sets up internal state of the libjpeg,
however, neither cinfo.out_color_space nor cinfo.raw_data_out are
set correctly yet. Those two are set up in gst_jpeg_dec_negotiate()
which is called a bit later. Therefore, the real fix is the set up
cinfo.out_color_space and cinfo.raw_data_out before calling
jpeg_start_decompress(). This is however a separate patch.

Fixes: 2aa2477208 ("jpegdec: only allow conversions from RGB")
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1687>
2022-02-13 14:46:31 +01:00
He Junyan 1eed9de0bb vavpp: Fix the caps leak in the transform_caps() function.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1689>
2022-02-12 20:11:46 +08:00
Seungha Yang 644e18d029 meson: d3d11: Remove d3d11 option check from gst-libs
Build gstd3d11-1.0 unconditionally for d3d11 implementation can be used
by non-d3d11 plugins even when d3d11 plugin is disabled

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1684>
2022-02-11 20:01:52 +00:00
Seungha Yang e96687d88d d3d11: Update build-time dependency
Remove all the d3d11 and dxgi header version dependent ifdef
and bump the minimum requirement to d3d11_4.h and dxgi1_6.h.
We are already failing support old Visual Studio (Windows SDK actually)
such as Visual Studio 2015. Note that our MinGW toolchain satisfies
the requirement.

From runtime point of view, this change should be fine since
we are checking OS version with IUnknown::QueryInterface()
everywhere in order to check API availability

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1684>
2022-02-11 20:01:52 +00:00
Seungha Yang 61d2a9ffde videoaggregator: Fix for unhandled negative rate
Nagative rates have been considered only in
gst_video_aggregator_advance_on_timeout(). Update other places
to fix broken reverse playback.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1500>
2022-02-11 16:05:51 +00:00
Seungha Yang 21dd2076f6 typefindfunctions: Fix WebVTT format detection
If WebVTT file consists of "WebVTT" header without body,
the file size can be smaller than 10 bytes.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1359>
2022-02-11 13:48:45 +00:00
Vivienne Watermeier c38afa2070 navigation: add more constructors for navigation events
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1610>
2022-02-11 12:51:11 +00:00
He Junyan 248baef400 MSDK: Import VA surface as encoder's input.
We make all MSDK encoders declare "memory:VAMemory" feature. Then
the pipeline such as:
  gst-launch-1.0 -vf filesrc location=xxx.h264 ! h264parse ! \
       vah264dec ! msdkh265enc ! fakesink
will choose VA memory caps between the VA decoder and MSDK encoder.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1087>
2022-02-11 07:13:45 +00:00
He Junyan ef5f6ab5d9 MSDK: Add helper function to peek VA surface of VA kind gstbuffer.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1087>
2022-02-11 07:13:45 +00:00
He Junyan 26172123e5 MSDK: Handle context query into the encoder's query function.
The MSDK encoder's query function is not set and it just forwards
all query to its base class. We now need to answer the context
query correctly. Other VA plugins need to query the VA display.

By the way, the current query of "gst.msdk.Context" is also missing.
The other MSDK elements must depend on the bin's context message(
sent in context_propagate()) to set their MsdkContext correctly.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1087>
2022-02-11 07:13:45 +00:00
He Junyan 2928b14b69 MSDK: Handle context query into the VPP's query function.
The MSDK VPP's query function is not set and it just forwards
all query to its base class. We now need to answer the context
query correctly. Other VA plugins need to query the VA display.

By the way, the current query of "gst.msdk.Context" is also missing.
The other MSDK elements must depend on the bin's context message(
sent in context_propagate()) to set their MsdkContext correctly.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1087>
2022-02-11 07:13:45 +00:00
He Junyan db5be289c7 MSDK: Handle context query into the decoder's query function.
The MSDK decoder's query function is not set and it just forwards
all query to its base class. We now need to answer the context
query correctly. Other VA plugins need to query the VA display.

By the way, the current query of "gst.msdk.Context" is also missing.
The other MSDK elements must depend on the bin's context message(
sent in context_propagate()) to set their MsdkContext correctly.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1087>
2022-02-11 07:13:45 +00:00
He Junyan 6635852c40 MSDK: Add a handle_context_query() helper function.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1087>
2022-02-11 07:13:45 +00:00
He Junyan 85664b5af6 MSDK: Improve the GstContext setting logic.
We now can use the gst va lib's display to create our MSDK context,
and use its helper functions to simplify our code. The improved logic
is like this:
1. Every MSDK element should use gst_msdk_context_find() to find a MSDK
context from neighbour. If valid, reuse it.
2. Use gst_msdk_ensure_new_context(). It will first query neighbours
about the GstVaDisplay, if found(e.g. some VA element is connected),
use gst_msdk_context_from_external_display() to create a MSDK context.
3. Then, creating the MSDK context from scratch. It creates both the
display and MSDK context.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1087>
2022-02-11 07:13:45 +00:00
He Junyan a905e7474b MSDK: Add new_with_va_display() helper function to create context.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1087>
2022-02-11 07:13:45 +00:00
He Junyan a9aa522e26 MSDK: Use the VA display object to replace the raw display handle.
The VA display object from VA lib is a common defined object. which
contain the whole display things. It is easier to use, and more important,
we can share it with the other VA plugins and keep all the VA related
plugins working on the same GPU device.
We also delete the useless gst_msdk_context_get_fd() API.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1087>
2022-02-11 07:13:45 +00:00
He Junyan c7e3c8e9f6 MSDK: Add the gst va lib into MSDK's dependency.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1087>
2022-02-11 07:13:45 +00:00
He Junyan 90cea4fadf av1parse: Add temporal unit check when TD is absent.
The current manner for deciding the new temporal unit is based on
temporal delimiter(TD) OBU. We only start a new temporal unit when
the TD comes.
But some streams do not have TD at all, which makes the output "TU"
alignment fail to work. We now add check based on the relationship
between the different layers and it can successfully judge the TU edge.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1634>
2022-02-11 14:34:04 +08:00
He Junyan a7ca0b2079 av1parse: let the parse continue when MISSING_OBU_REFERENCE error.
Some streams may have verbose OBUs before a valid sequence header. We
should let the parse continue rather than return a error.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1634>
2022-02-11 14:21:34 +08:00
He Junyan 348658dd0a av1parse: Continue when we fail to detect the alignment.
Some streams may have problematic OBUs at the beginning, which causes
the parse fail to detect the alignment and return error. For example,
there may be verbose OBUs before a valid sequence, which should be
discarded until we meet a valid sequence. We should let the parse
continue when we meet such cases, rather than just return error.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1634>
2022-02-11 14:20:13 +08:00
Bastien Nocera 32633a9a14 gtk: Fix rotation not being applied when paused
The video wouldn't be redrawn immediately when a rotation was applied
but the pipeline was paused, as no new buffers were scheduled to be
displayed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1618>
2022-02-10 23:33:02 +00:00
Bastien Nocera ec77a1aac8 gtk: Add a way to queue redrawing the base GTK widget
This will be used to request a redraw of the GTK widget should the
display be changed using properties not directly handled by the base GTK
widget, but by one of its descendants.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1618>
2022-02-10 23:33:02 +00:00
Seungha Yang 66b176322c ivfparse: Don't set zero resolution on caps
It could be zero if the information is not available at ivfparse
side, or not implemented. In that case, simply don't set
width/height on caps, otherwise downstream would be confused

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1649>
2022-02-10 20:30:40 +00:00
Seungha Yang 2c93afd8bb mediafoundation: Add support for MP3 decoding
See also
https://docs.microsoft.com/en-us/windows/win32/medfound/windows-media-mp3-decoder

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1596>
2022-02-11 04:16:23 +09:00
Seungha Yang be957f6c61 mediafoundation: Add support for AAC decoding
See also
https://docs.microsoft.com/en-us/windows/win32/medfound/aac-decoder

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1596>
2022-02-11 04:16:22 +09:00
Seungha Yang 0b26254a6a mediafoundation: Cosmetic changes
Rename baseclass to be consistent with other Windows plugins

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1596>
2022-02-11 04:16:22 +09:00
Seungha Yang ce4875ccde mediafoundation: Use & operator instead of GetAddressOf()
Use shorter expression

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1596>
2022-02-11 04:16:22 +09:00
Seungha Yang 36020c7549 mediafoundation: Port to C++
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1596>
2022-02-11 04:16:15 +09:00
Seungha Yang c7a9b5c458 d3d11decoder: Promote rank to primary except for mpeg2
Our D3D11/DXVA codecs implementation has been verified
during 1.18 and 1.20 development cycle and also via the Fluster
test framework. Similar to the case of nvdec and vtdec,
we can prefer hardware over software in most cases

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1672>
2022-02-10 17:16:18 +00:00
Stéphane Cerveau 5fe2c327e9 ges: add missing plugin summary
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1682>
2022-02-10 16:26:28 +00:00
David Svensson Fors b3d300bc26 codec-utils: Avoid out-of-bounds error
For artificial input (in unit tests), all six bytes of
constraint_indicator_flags in hevc_caps_get_mime_codec() can be
zero. Add a guard against an out-of-bounds error that occurred in that
case. Change variables to signed int so comparison with -1 works.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1677>
2022-02-10 07:58:36 +00:00
Nicolas Dufresne 7a9e11ae1b v4l2codecs: vp9: Fix duplicating a duplicated picture
Duplicating a picture what was already a dup was leading to a crash. Rename
the custom picture flags as HOLDS_BUFFER to make its meaning clear. Then save
then ref and store the picture as userdata, so it can be obtained when
duplicating. Finally, mark the doplicated as HOLDS_BUFFER to avoid thinking it
holds a request.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1681>
2022-02-09 22:37:55 +00:00
Seungha Yang 090b50e549 mfaudioenc: Handle empty IMFMediaBuffer
IMFMediaBuffer may not hold encoded data, which seems to happen
while draining.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1679>
2022-02-10 01:49:55 +09:00
Jan Schmidt 1b22ffdfbd videotestsrc: Don't re-render every frame when it's not needed.
When the pattern being rendered by videotestsrc doesn't have motion,
cache a rendered buffer and output it repeatedly with updated
metadata.

Based on a patch by Edward Hervey <edward@centricular.com>

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/10

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1293>
2022-02-09 14:03:01 +00:00
Víctor Manuel Jáquez Leal b3c71584e0 va: decoder: Log profile name.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1675>
2022-02-09 12:25:24 +01:00
Víctor Manuel Jáquez Leal df6c985474 va: filter: Log the added filter name.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1675>
2022-02-09 11:07:47 +00:00
Víctor Manuel Jáquez Leal 4be3413fec vapostproc: Process HDR caps
This patch adds a new parameter: hdr-tone-mapping (same as
vaapipostproc), if the HDR capabilites are availabe in driver, and
it's disabled by default.

If hdr-tone-mapping is enabled then HDR fields in sink caps are
processed in frames from HDR to SDR, removing those hdr fields in
source pad caps too.

hdr-tone-mapping is not enabled if a color conversion is also
requested, since it fails to process in the iHD driver, so far.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1258>
2022-02-09 10:26:02 +00:00
Víctor Manuel Jáquez Leal 0e7dade55a build: Add libva dependency fallback.
Then libva can be subproject and used by either gstreamer-vaapi,
va and msdk in gst-plugins-bad.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1397>
2022-02-09 09:45:04 +00:00
Sangchul Lee dcff37722d webrtcice: Fix memory leaks in gst_webrtc_ice_add_candidate()
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1646>
2022-02-09 09:00:25 +00:00
Nicolas Dufresne 13944cf3ee v4l2codecs: vp9: Make compressed hdr control optional
This is to supported by Mediatek VP9 driver. Mediatek handles
the forward probabilities in hardware hence does not need and
does not implement support for
V4L2_CID_STATELESS_VP9_COMPRESSED_HDR.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1600>
2022-02-08 16:46:09 -05:00
Krystian Wojtas 7bebb2ea38 tutorials: vdpau is ababdoned
https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/828

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1671>
2022-02-08 19:54:24 +00:00
Tim-Philipp Müller f2375383e5 tutorials: proper links description
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1670>
2022-02-08 19:44:59 +00:00
Krystian Wojtas 70c933ac6a tutorials: links to monorepo
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1670>
2022-02-08 19:44:59 +00:00
Krystian Wojtas e1ac843ffb tutorials: fixed described log level number to correspond with code
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1669>
2022-02-08 19:34:37 +00:00
Krystian Wojtas 82a9ec9429 tutorials: fix typos
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1669>
2022-02-08 19:34:37 +00:00
Krystian Wojtas 1973334699 tutorials: word hardware instead of h character
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1669>
2022-02-08 19:34:37 +00:00
Thibault Saunier e193eec8eb navigation: Fix Since marker for mouse scroll
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1665>
2022-02-08 18:26:53 +00:00
Matthew Waters 102a342a01 registry: enable relocatable builds for anywhere with dladdr()
Such as Linux/BSD's.

Matches the Windows/macOS behaviour.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1662>
2022-02-08 17:35:24 +00:00
Víctor Manuel Jáquez Leal 4455d908eb va: Fix and simplify build recipe.
1. Use api_version variable rather than static string.
2. Remove pkgconfig generation since currently the library
   is not installed, only used internally.
3. Rely on dependency "required" to abort compilation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1650>
2022-02-08 16:22:42 +00:00
Víctor Manuel Jáquez Leal 5e4c152de4 va: Remove libgudev crumbs in library.
In commit e699aaeb we moved linking of libgudev to the plugin rather
the library, because it's only used in the plugin. But the dependency
check is still done in library.

This patch removes the dependency check in library, and updates the
dependency check in plugin.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1650>
2022-02-08 16:22:42 +00:00
Jose Quaresma 6676b1e75c gstpluginloader: show the reason when spawning of gst-plugin-scanner fail
This fix helps in cross compiling when the meson tests runs using a qemu wraper

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1578>
2022-02-08 14:46:53 +00:00
Seungha Yang 334e29ebbd video-color: Fix for missing clipping in PQ EOTF function
* Add missing clipping in EOTF
* Use pre-calculated values
* Update variable names to specification's defined ones

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1629>
2022-02-08 14:08:18 +00:00
Robert Rosengren 265878c4ba rtpbin: Safer ts-offset-smoothing-factor calculation
Protect the ts-offset-smoothing-factor calculation from overflow. Output
warning and fallback to ts-offset if it is detected.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1409>
2022-02-08 11:11:35 +00:00
Robert Rosengren 31dd9226ce rtpbin: add ts-offset-smoothing-factor property
Add property to set the TS offset smoothing factor and set default value
to not use it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1409>
2022-02-08 11:11:35 +00:00
Danny Smith bc964141c8 rtpbin: applied smoothing to jittery sender time-stamps
Applying a moving average filter to the timestamp offsets
for smoothing jittery and preventing aggressive skew handling.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1409>
2022-02-08 11:11:34 +00:00
Danny Smith d5e257afd1 rtpbin: added option for setting min_ts_offset in ntp-sync mode
Constantly updating the ts_offset results in audiable glitches
when streaming audio using ntp-sync=true. By requiring a minimum
offset before updating ts_offset this can be mitigated. Added a
parameter which can be used to set min_ts_offset in ntp-sync mode.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1409>
2022-02-08 11:11:34 +00:00
Seungha Yang 8773ba1104 msdk: Fix for MFXUnload symbol re-definition build error
Fix for libgstreamer-full build

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1408>
2022-02-08 10:05:35 +00:00
Seungha Yang 278908ce96 qsv: Add support for HEVC encoding
main and main-10 profiles are supported for now

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1408>
2022-02-08 10:05:35 +00:00
Seungha Yang 3a7e4635bb qsv: Add support for VP9 encoding and more video formats
Add VP9 encoder with 4:2:0 8 bits and 4:4:4 8/10 bits formats support

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1408>
2022-02-08 10:05:35 +00:00
Seungha Yang 64ed6075b7 qsv: Introduce H.264 Intel Quick Sync Video Encoder
A new implementation of Intel Quick Sync Video plugin.
This plugin supports both Windows and Linux but optimization for
VA/DMABuf is not implemented yet.

This new plugin has some notable differences compared with existing
MSDK plugin.

* Encoder will expose formats which can be natively supported
without internal conversion. This will make encoder
control/negotiation flow much simpler and cleaner than
that of MSDK plugin.

* This plugin includes QSV specific library loading helper,
called dispatcher, with QSV SDK headers as a part of this plugin.
So, there will be no more SDK version dependent #ifdef in the code
and also there will be no more build-time MSDK/oneVPL SDK
dependency.

* Memory allocator interop between GStreamer and QSV is re-designed
and decoupled. Instead of implementing QSV specific allocator/bufferpool,
this plugin will make use of generic GStreamer memory
allocator/bufferpool (e.g., GstD3D11Allocator and GstD3D11BufferPool).
Specifically, GstQsvAllocator object will help interop between
GstMemory and mfxFrameAllocator memory abstraction layers.

Note that because of the design decision, VA/DMABuf support is not made
as a part of this initial commit. We can add the optimization for Linux
later once GstVA library exposes allocator/bufferpool implementation as
an API like GstD3D11.

* Initial encoder implementation supports interop with GstD3D11
infrastructure, including zero-copy encoding with upstream D3D11 element.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1408>
2022-02-08 10:05:35 +00:00
Seungha Yang c80132e4a3 qsv: Remove unnecessary pargma message
We know what we are doing, just remove noisy build warnings

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1408>
2022-02-08 10:05:35 +00:00
Seungha Yang 81d63948d1 qsv: Import libmfx API and dispatch code from oneVPL project
Copied from oneVPL project (https://github.com/oneapi-src/oneVPL)
v2022.0.3 tag at the commit of efc259f8b7ee5c334bca1a904a503186038bbbdd

This is corresponding to MFX API version 2.6

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1408>
2022-02-08 10:05:35 +00:00
Seungha Yang af9b9be76d d3d11memory: Inform subresource index via GstMapInfo::user_data
By using this way, caller does not need to call another method
gst_d3d11_memory_get_subresource_index()

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1408>
2022-02-08 10:05:35 +00:00
Seungha Yang a37da515f4 d3d11memory: Add support for ID3D11Buffer
Allow wrap ID3D11Buffer via GstD3D11Memory object
At the moment, only staging ID3D11Buffer is supported.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1408>
2022-02-08 10:05:35 +00:00
Martin Reboredo ece4ca5952 gstvalue: De/Serialization of GBytes
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1232>
2022-02-08 09:05:40 +00:00
Sebastian Mueller fbbeee1dc4 context: fix transfer annotation
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1663>
2022-02-08 16:24:13 +11:00
Zebediah Figura cc835c0722 baseparse: Don't truncate the duration to milliseconds in gst_base_parse_convert_default().
There's no need to do this, and it can make seeking far less accurate.

For a specific use case: I am working with a long (45-minute) MPEG-1 layer 3 file, which has a constant bit rate but no seeking tables. Trying to seek the pipeline immediately after pausing it, without the ACCURATE flag, to a location 41 minutes in, yields a location that is potentially over ten seconds ahead of where it should be. This patch improves that drastically.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/374>
2022-02-07 20:13:01 -06:00
Zebediah Figura 334c347de2 baseparse: Trace time with GST_TIME_FORAMT in gst_base_parse_convert_default().
Be consistent with how we trace time in general.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/374>
2022-02-07 19:33:31 -06:00
Sebastian Dröge be23dbb417 bufferpool: Deactivate pool and get rid of references to other objects from dispose instead of finalize
During dispose the pool will still have a reference count of 1 and all
API on it can still be safely called.

Subclasses will have already freed their own data before finalize is
called but would nonetheless be called into again via the pool
deactivation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1645>
2022-02-07 21:45:44 +00:00
Seungha Yang 28eeba3e18 nvh265sldec: Fix for decoding 12bits stream
We've been exposing main-444-12 profile as a supported profile
in its sinkpad template but not actaully. Adding code to
covert 12 and 16 bits as well.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1612>
2022-02-07 18:27:48 +00:00
Seungha Yang 80bbc71ec0 nvdecoder: Fix for HEVC 4:4:4 format decoding
Map chroma_format_idc == 3 (which means 4:4:4 subsampling) correctly,
also pass coded bitdepth for decoder initialization instead of
inferring it from output format since they can be different.

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/949
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1612>
2022-02-07 18:27:48 +00:00
Seungha Yang 187dfce793 d3d11stagingbufferpool: Fix typo in texture description
Fixing typo, it should be height

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1652>
2022-02-07 22:38:02 +09:00
He Junyan ea9b350240 va: Add a gstva.h to include all va lib header files.
And replacing all va lib headers with this new header files
when including.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1256>
2022-02-07 10:12:36 +00:00
He Junyan d5c535744b va: Move the vautils into the gst va lib.
The context query and handle are common logic for all va related
elements. So we move it from va plugins to the common gst va lib.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1256>
2022-02-07 10:12:36 +00:00