Commit graph

113094 commits

Author SHA1 Message Date
He Junyan
1029c84dbf vp9parse: Fix the subsampling_x/y to chroma format mapping.
The chroma format 4:4:4 needs both subsampling_x and subsampling_y
equal to 0.

Fixes: #1502
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1974>
2021-01-23 10:53:44 +00:00
Thibault Saunier
0d95d9258b uri-source: Respect stream-id even on streams muxed in raw
The issue is that we rely on `decodebin::autoplug-select` to `SKIP`
unwanted pads, that signal was first provided to select factories during
autoplugin, not totally thought to avoid exposing pads. For streams
muxed directly in raw, decodebin has nothing to plug after the demuxer
and the pad is exposed right away, meaning that we do not have any
chance to avoid that pad to be exposed. This patch takes that limitation
into account and checks the stream ID of the pads exposed by decodebin
before exposing them itself, so we end up using the right pad even if
more are uselessly exposed by decodebin.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/issues/126

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/222>
2021-01-23 04:27:07 +00:00
Branko Subasic
2894640cc5 rtsp-client: cleanup transports during TEARDOWN
When tunneling RTP over RTSP the stream transports are stored in a hash
table in the GstRTSPClientPrivate struct. They are used for, among other
things, mapping channel id to stream transports when receiving data from
the client. The stream tranports are created and added to the hash table
in handle_setup_request(), but unfortuately they are not removed in
handle_teardown_request(). This means that if the client sends data on
the RTSP connection after it has sent the TEARDOWN, which is often the
case when audio backchannel is enabled, handle_data() will still be able
to map the channel to a session transport and pass the data along to it.
Which eventually leads to a failing assert in gst_rtsp_stream_recv_rtp()
because the stream is no longer joined to a bin.
We avoid this by removing the stream transports from the hash table when
we handle the TEARDOWN request.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/-/merge_requests/184>
2021-01-22 16:42:00 +01:00
Matthew Waters
82a9e4630c vulkan: remove duplicated check
Checking the same value twice is pointless

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1977>
2021-01-22 12:38:09 +00:00
Matthew Waters
1a53dfbd64 ldac: also look for the ldac/ldacBT.h header.
Otherwise there will be a scenario where the library can be found but
not the header and a compilation build error will result

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1975>
2021-01-22 09:32:51 +00:00
Víctor Manuel Jáquez Leal
8a8688c639 va: filter: fix assignation to proper variable
Fix the result of a wrong copy&paste

Fixes: #1501
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1976>
2021-01-22 09:38:27 +01:00
Matthew Waters
4caab55109 gl/examples: fix recordgraphic example
Not ported to proper modern OpenGL though but that is the case for a lot
of the GL examples.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1016>
2021-01-22 14:04:39 +11:00
Seungha Yang
1f7681c385 mfvideoenc: Add support for P010 d3d11 texture
Add P010 Direct3D11 texture format support

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1970>
2021-01-21 18:53:27 +09:00
Seungha Yang
7b9debedc8 d3d11: Don't use hardcoded maximum resolution value
Maximum supported texture dimension is pre-defined based on
feature level and it couldn't be INT_MAX in any case.
See also https://docs.microsoft.com/en-us/windows/win32/direct3d11/overviews-direct3d-11-devices-downlevel-intro

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1964>
2021-01-20 19:31:27 +09:00
Rafał Dzięgiel
c4e76d6fc5 glx: Iterate over FBConfig and select 8 bit color size
Texture upload mechanism used by gstreamer-vaapi relies on 8 bpc.
In latest mesa versions the first fbconfig might not be 8 bit, so iterate
over it to find the correct config with supported values.

This also adds 8 bit alpha size to the framebuffer configuration which is
required to get it working properly.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/410>
2021-01-20 10:42:09 +01:00
Chris White
9d2825ccff structure: add tests of deserializing strings with escapes
Shows the issue described in
<https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/303#note_272629>

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/303>
2021-01-19 15:56:00 -03:00
Henry Wilkes
5eba2b83b7 gstvalue: preserve parse behaviour with warning
Preserve the previous behaviour where:
    name, val="5";
passed to gst_structure_from_string would have resulted in an int value,
rather than a string, despite the quote marks.

This will be changed to being interpreted as a string in the future, but
for the time being we will issue a warning about this to give users time
to fix their code to no longer rely on this bug.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/303>
2021-01-19 15:56:00 -03:00
He Junyan
44b7e9268c doc: Add the av1 parse element.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1614>
2021-01-19 18:38:03 +00:00
He Junyan
b93315fa6c codecparsers: Exclude the size of obu_size when identify OBU.
obu->obu_size does not contain the bytes of obu_size itself, we need
to exclude it when doing the saint check.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1614>
2021-01-19 18:38:03 +00:00
He Junyan
3e82c1f88e test: Add test cases for av1parse element.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1614>
2021-01-19 18:38:03 +00:00
He Junyan
fe19bc0a2e videoparsers: av1: Add the AV1 parse.
This AV1 parse implements the conversion between alignment of obu,
tu and frame, and the conversion between stream-format of obu-stream
and annexb.

TODO:
1. May need a property of operating_point to filter the OBUs
2. May add a property to disable deep parse.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1614>
2021-01-19 18:38:03 +00:00
Mathieu Duponchelle
c36c87e47f symbols: list gst_value_array_* and gst_value_list_*
Those existing symbols will be newly-documented by hotdoc
when updating to a more recent version

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-docs/-/merge_requests/136>
2021-01-19 19:25:24 +01:00
He Junyan
057fedd178 codecs: mpeg2decoder: Fix a typo in header file's comment.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1963>
2021-01-20 00:57:34 +08:00
Thibault Saunier
8e9e95b90a audio-track: Respect track restrictions in our gaps
Avoiding not negotiated errors in specific cases.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/225>
2021-01-19 11:08:32 -03:00
Henry Wilkes
445df0c799 gstvalue: make gst_string_unwrap less strict
Allow a string in gst_string_unwrap to include unescaped characters that
are not in GST_STRING_IS_ASCII. This extra leniency allows
gst_structure_from_string to, e.g., receive
    name, val=(string)"string with space";

Note that many gst tests, and potentially users, exploited this behaviour
by giving
    name, val="string with space";
i.e. without the (string) type specifier. This was allowed before
because, without a type specifier, the string was passed to
_priv_gst_value_parse_string with unescape set to TRUE, *rather* than
being sent to gst_string_unwrap. This caused a difference in behaviour
between strings that are or are not preceded by (string). E.g.
    name, val=(string)"string with space";
would fail, whilst
    name, val="string with space";
would not. And
    name, val=(string)"\316\261";
would produce a val="α", whereas
    name, val=(string)"\316\261";
would produce a val="316261" (a bug).

The current behaviour is to treat both of these cases the same, which is
desirable. But in order to not break potentially common usage of this
discrepancy (it was in our own tests), the best option is to make string
parsing less strict in general.

New behaviour would be for
    name, val=(string)"string with space";
to pass and give val="string with space", and
    name, val="\316\261";
would produce a val="α".

Also changed deserializing string test to expect successes where
previously a failure was expected.

In a similar way, this also effected the deserializing of GstStructure,
GstCaps, GstTagList and GstCapsFeatures. So, now
    name, val=(structure)"sub-name, sub-val=(string)\"a: \\316\\261\";";
will also pass and give sub-val="a: α". Note that the quote marks
and backslash still need to be escaped for the sub-structure, but other
characters need not be.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/303>
2021-01-19 13:25:07 +00:00
Henry Wilkes
454b121ff1 value: add serialize-deserialize tests
Added tests to ensure that the gst_value_deserialize reverses
gst_value_serialize.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/303>
2021-01-19 13:25:07 +00:00
Henry Wilkes
7f267395a6 structure: don't unescape values before deserializing
No longer call _priv_gst_value_parse_string with unescape set to TRUE
before passing a value to gst_value_deserialize in
_priv_gst_value_parse_value. This latter function is called by
gst_structure_from_string and gst_caps_from_string.

When gst_structure_to_string and gst_caps_to_string are called, no
escaping is performed after calling gst_value_serialize. Therefore, by
unescaping the value string, we were introducing an additional operation
that was not performed by the original *_to_string functions. In
particular, this has meant that the derialization functions for many
non-basic types are incomplete reverses of the corresponding
serialization function (i.e., if you pipe the output of the
serialization function into the deserialization function it could fail)
because they have to compensate for this additional escaping operation,
when really this should be the domain of the deserialization functions
instead.

Correspondingly changed a few deserialization functions.

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/issues/452

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/303>
2021-01-19 13:25:07 +00:00
Seungha Yang
fd76521c24 d3d11videosink: Fix ugly thread name for Win32 window impl.
Don't need to put Win32 twice

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1962>
2021-01-19 11:23:56 +00:00
Seungha Yang
96923c4fa2 d3d11videosink: Fix MSVC build warnings around UWP code
gstd3d11window_corewindow.cpp(408): warning C4189:
  'storage': local variable is initialized but not referenced
gstd3d11window_corewindow.cpp(490): warning C4189:
  'self': local variable is initialized but not referenced
gstd3d11window_swapchainpanel.cpp(481): warning C4189:
  'self': local variable is initialized but not referenced

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1962>
2021-01-19 11:23:56 +00:00
Seungha Yang
d16b5b7f7f d3d11: Allow building UWP features with Desktop features if possible
WINAPI_PARTITION_DESKTOP and WINAPI_PARTITION_APP can coexist.
Although UWP only binaries should be used for production stage,
this change will be useful for development stage

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1962>
2021-01-19 11:23:56 +00:00
Seungha Yang
46c577222d d3d11decoder: Do more retry for ID3D11VideoContext::DecoderBeginFrame failure
Some GPUs (especially NVIDIA) are complaining that GPU is still busy
even we did 50 times of retry with 1ms sleep per failure.
Because DXVA/D3D11 doesn't provide API for "GPU-IS-READY-TO-DECODE"
like signal, there seems to be still no better solution other than sleep.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1913>
2021-01-18 12:04:53 +00:00
Seungha Yang
3f43fef3ce d3d11videosink: Fix build error on UWP
gstd3d11videosink.c(662): error C2065: 'sink': undeclared identifier

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1961>
2021-01-18 19:48:12 +09:00
Bing Song
b87db31fbe v4l2object: Need keep same transfer as input caps.
GST_VIDEO_TRANSFER_BT2020_12 and GST_VIDEO_TRANSFER_BT2020_10 will
be mapped to V4L2_XFER_FUNC_709. Need check input caps when map
V4L2_XFER_FUNC_709 back to GST_VIDEO_TRANSFER_BT2020_12 and
GST_VIDEO_TRANSFER_BT2020_10

Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/816
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/841>
2021-01-18 04:26:04 +00:00
He Junyan
0158849145 va: Fix some gst_object_unref error because the pointer is NULL.
!1957 introduces some error of gst_object_unref for NULL pointer.
Fixes all of them.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1959>
2021-01-17 14:00:50 +08:00
He Junyan
82c0f90197 va: Make the caps pointer operation atomic in vadecoder.
The vadecoder's srcpad_caps and sinkpad_caps pointers are outside of the
mutex protection. Just make all operation for them atomic.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1957>
2021-01-15 20:40:21 +08:00
He Junyan
6b1e1924fd va: Fix a latent race condition in vabasedec.
The vabasedec's display and decoder are created/destroyed between
the gst_va_base_dec_open/close pair. All the data and event handling
functions are between this pair and so the accessing to these pointers
are safe. But the query function can be called anytime. So we need to:
1. Make these pointers operation in open/close and query atomic.
2. Hold an extra ref during query function to avoid it destroyed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1957>
2021-01-15 20:40:10 +08:00
Matthew Waters
08cdfca671 gitlab: update macos/ios tags for newer vm image
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-ci/-/merge_requests/389>
2021-01-15 23:29:33 +11:00
Tobias Ronge
706d91371c rtspsrc: Do not wait for response while flushing
Due to the may_cancel flag in GstRTSPConnection, receiving might not get
cancelled when supposed to. In this case, gst_rtsp_src_receive_response
will have to wait until timeout instead but if busy receiving RTP
data, this timeout will never occur.

With this patch, gst_rtsp_src_receive_response returns GST_RTSP_EINTR
if flushing is set to TRUE instead of continuing to receive.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/831>
2021-01-15 09:24:51 +00:00
Tim-Philipp Müller
d3c4043db3 .gitignore: add more subproject checkouts
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/231>
2021-01-14 19:18:55 +00:00
Tim-Philipp Müller
334fdf5c3a subprojects: add libdv wrap
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/231>
2021-01-14 19:16:01 +00:00
Tim-Philipp Müller
c854e6bd39 meson: allow libdv subproject fallback
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/854>
2021-01-14 19:13:03 +00:00
Seungha Yang
f0d003205c task: Use SetThreadDescription Win32 API for setting thread name
Since Windows 10 1607, we can make use of SetThreadDescription() API
for setting thread name. Unlike previously used exception based
method, this API will preserve configured thread name on dump file.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/735>
2021-01-14 18:33:42 +00:00
Jan Alexander Steffens (heftig)
3a380558bd tests: systemclock: Stop all stress threads before joining them
This reduces the chance of the main thread getting starved while trying
to shut down the test, potentially causing a timeout.

Even on an idle 96-processor system this reduces the duration of the
systemclock tests from ~8s to ~3s.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/734>
2021-01-14 15:50:05 +01:00
Sebastian Dröge
4d07974b10 decklinkaudiosrc: Allow disabling audio sample alignment code by setting the alignment-threshold to 0
And handle setting it to GST_CLOCK_TIME_NONE as always aligning without
ever detecting a discont.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1956>
2021-01-14 14:37:32 +02:00
Marijn Suijten
abb026ec6a gl,video: Make ptrs to VideoInfo and (GL)AllocationParams immutable
These parameters are incorrectly regarded as mutable in G-IR making them
"incompatible" with languages that are explicit about mutability like
Rust. In order to clean up the code and expected API there, update the
signatures here, right at the source (instead of overriding them in
Gir.toml and hoping for the best).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1005>
2021-01-14 11:53:10 +00:00
Marijn Suijten
fa8b5b9a6d audio/audio-buffer: @buffer in audio_buffer_map is out caller-allocates
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1005>
2021-01-14 11:53:10 +00:00
Marijn Suijten
c70d263e48 video/video-frame: @frame in video_frame_map is out caller-allocates
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1005>
2021-01-14 11:53:10 +00:00
Marijn Suijten
a263919f06 audio,video: Add out caller-allocates to init and from_caps
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1005>
2021-01-14 11:53:10 +00:00
Sebastian Dröge
7e16eed522 videosink: Add new GstVideoSink::set_info() virtual method
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/986>
2021-01-14 11:15:40 +00:00
Sebastian Dröge
198434e71a videosink: Implement more complete BaseSink::get_times() based on the framerate
This will only make use of the framerate if the subclass is chaining up
BaseSink::set_caps(). Otherwise it will have the same behaviour as the
basesink default.

Doing so is useful if video buffers don't contain a duration to
calculate a default duration, and various video sinks already implement
a custom version of this.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/986>
2021-01-14 11:15:40 +00:00
Marijn Suijten
b95941db55 gstmemory: Mark memory_map @info as caller-allocates
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/730>
2021-01-14 11:46:07 +02:00
Marijn Suijten
ab920e57eb gstbuffer: Mark buffer_map* @info as caller-allocates
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/730>
2021-01-14 10:21:10 +01:00
Marijn Suijten
c77136d63f gst,base: Take GstAllocationParams parameter by const ptr
This parameter is only informational and should not be modified. Enforce
this at compile-time and to get the right signature in G-IR.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/730>
2021-01-14 10:17:34 +01:00
Xabier Rodriguez Calvar
c5ebaadf9d qtdemux: Allow streams with no specified protection system ID
This is necessary in cases like CMAF where there won't be any events
passing thru.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/852>
2021-01-14 10:11:10 +01:00
Marijn Suijten
1f06cf60e7 video: Convert info_to_caps to take self as const ptr
This requires a slight modification to the function itself because it
was overwriting a member locally.

However, now this side-effect cannot be observed outside the function
anymore.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1008>
2021-01-14 08:14:36 +00:00