Commit graph

87151 commits

Author SHA1 Message Date
Víctor Manuel Jáquez Leal f20b3b8156 vapostproc: Inherit from GstVaBaseTransform.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2442>
2021-08-10 17:31:58 +00:00
Víctor Manuel Jáquez Leal 977a8f3b01 va: Add base transform class.
This base transform class is a derivable class for VA-based filters,
for example vapostproc right now, but it will be used also for
future elements such as vadeinterlace.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2442>
2021-08-10 17:31:58 +00:00
Víctor Manuel Jáquez Leal 2added54c3 va: pool: Add gst_va_pool_new_with_config().
It is a function helper.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2442>
2021-08-10 17:31:58 +00:00
Seungha Yang 1f6fd7550c d3d11window: Misc code cleanup
* Remove unnecessary upcasting. We are now dealing with C++ class objects
  and don't need explicit C-style casting in C++ world
* Use helper macro IID_PPV_ARGS() everywhere. It will make code
  a little short.
* Use ComPtr smart pointer instead of calling manual IUnknown::Release()

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2461>
2021-08-10 16:20:37 +00:00
Seungha Yang a1048ce110 d3d11compositor: Fix indent
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2461>
2021-08-10 16:20:37 +00:00
Tim-Philipp Müller bb48c4c9f6 plugin: load plugins with unknown license strings
We shouldn't fail to load plugins just because we don't
recognise the license string. It's not our job to validate
licenses, and the license list is outdated and ambiguous
anyway.

Also add MPL-2.0 to the list, and fix some defunct license
URLs in the code comments.

Get rid of the hard-coded skip index, doesn't really buy us
much versus just skipping with a few strlens, and is harder
to maintain.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/864>
2021-08-10 14:10:22 +01:00
Matthew Waters 04856a3828 glbuffer: support persistent buffer mappings
Requires OpenGL 4.4 or EXT_buffer_storage

Current mesa exposes GL_ARB_buffer_storage when retrieving the relevant
functions returns no-ops and causes failures.

Improves throughput of uploads by roughly 30%-60% and download throughput by
roughly 10-30% across depending on the exact scenario and hardware.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1191>
2021-08-10 08:34:46 +00:00
Thibault Saunier e4c82f450d openh264: Respect level set downstream
We were not specifying the requested level to openh264  meaning that
it was choosing anything and was not respecting what was specified\
downstream

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2289>
2021-08-09 20:17:54 +00:00
He Junyan c5fda68403 x265: Fix a deadlock when failing to create the x265enc.
The GST_ELEMENT_ERROR will call the gst_object_get_path_string and
use gst_object_get_parent to get the full object path name, which
needs to lock the object. But we are already in a locked context and
so this will cause a deadlock, the pipeline can not exit normally.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2451>
2021-08-09 10:28:11 +00:00
R S Nikhil Krishna 34c81d13b6 rtmpsrc: mention setting librtmp flags in docs
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2424>
2021-08-09 01:27:01 +05:30
Mathieu Duponchelle c5d725652d mpeg2enc: fix interlace-mode detection
Previously, the code was always assuming progressive input,
fix this by looking at the caps.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2455>
2021-08-05 23:12:32 +02:00
Tim-Philipp Müller a561b1bd86 Use g_memdup2() where available and add fallback for older GLib versions
g_memdup() is deprecated since GLib 2.68 and we want to avoid
deprecation warnings with recent versions of GLib.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2280>
2021-08-05 20:51:00 +05:30
Sebastian Dröge 7433870528 timecodestamper: Fix latency calculation
The LTC extra latency is in ms already and not in frames, so multiplying
with the framerate will end up with a wrong number.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2453>
2021-08-05 13:03:12 +03:00
Haihao Xiang c7be05cc38 msdk: make sure child context is destroyed first
The parent context shares some resources with child context, so the
child context should be destroyed first, otherwise the command below
will trigger a segmentation fault

$> gst-launch-1.0 videotestsrc num-buffers=100 ! msdkh264enc ! \
msdkh264dec ! fakesink videotestsrc num-buffers=50 ! \
msdkh264enc ! msdkh264dec ! fakesink

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2435>
2021-08-04 04:50:08 +00:00
Seungha Yang db7d14db5a jpeg: Add support for meson fallback
Allow building jpeg plugin by using meson fallback

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1041>
2021-08-04 01:43:29 +09:00
Stéphane Cerveau 77ffed293f identity: provide a log to check the buffers
In order to not rely only on app to display the
message from identity, display the message in the logs
too.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/863>
2021-08-03 09:47:12 +00:00
Hou Qi 6858c8222c v4l2: Keep decoder capture fps same as output fps if it's not set
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1035>
2021-08-02 17:37:52 +08:00
Seungha Yang 8593e1517e examples: win32-videooverlay: Add support for testing gst_video_overlay_set_render_rectangle
Add keyboard handler to test gst_video_overlay_set_render_rectangle()
API for Windows video elements

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1235>
2021-08-02 18:32:22 +09:00
Seungha Yang a096207f85 d3d11videosink: Fix warning around GstVideoOverlay::expose()
When expose() is called, d3d11videosink needs to redraw using
cached buffer, so gst_d3d11_window_render() should allow null buffer.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2450>
2021-08-02 18:27:46 +09:00
Seungha Yang 185d8d1951 d3d11videosink: Forward navigation event without modification
Current implementation for translating native coordinate and
video coordinate is very wrong because d3d11videosink doesn't
understand native HWND's coordinate. That should be handled
by GstD3D11Window implementation as an enhancement.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2450>
2021-08-02 16:40:19 +09:00
Seungha Yang 2a7ecf17f9 d3d11videosink: Add support for GstVideoOverlay::set_render_rectangle
Inspired by an MR https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2382

The idea is that we can make use of MoveWindow() in WIN32 d3d11window
implementation safely because WIN32 d3d11window implementation creates
internal HWND even when external HWND is set and then subclassing is used to
draw on internal HWND in any case. So the coordinates passed to MoveWindow()
will be relative to parent HWND, and it meets well to the concept of
set_render_rectangle().

On MoveWindow() event, WM_SIZE event will be generated by OS and then
GstD3D11WindowWin32 implementation will update render area including swapchain
correspondingly, as if it's normal window move/resize case.

But in case of UWP (CoreWindow or SwapChainPanel), we need more research to
meet expected behavior of set_render_rectangle()

Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1416
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2450>
2021-08-02 16:40:14 +09:00
Seungha Yang 00e1a36c4f examples: controller-graph: Fix build with MSVC
To use macros in math.h, one needs to define _USE_MATH_DEFINES
before including the math.h file. Use glib's math define instead.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/862>
2021-08-01 03:42:18 +09:00
Seungha Yang abe7bbf1d3 examples: win32-videooverlay: Use d3d11videosink by default
d3d11videosink was promoted to have primary rank and
it's recommended videosink element on Windows

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1235>
2021-07-30 23:04:57 +09:00
Seungha Yang 1da78d82c8 tests: appsink: Add reverse stepping test case
To demonstrate reverse stepping issue of
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/848

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1223>
2021-07-30 06:59:58 +00:00
Seungha Yang 4a5197dc27 jack: Add port-names property to select ports explicitly
By this new property, user can select physical port to connect,
and element will pick requested port instead of random ones.
User should provide full port name including "client_name:" prefix.
An example is
jackaudiosrc port-names="system:capture_1,system:capture_3" ! ...
   jackaudiosink port-names="system:playback_2"

In addition to "port-names" property, a new connect type "explicit"
is added so that element can post error message if requested
"port-names" contains invalid port(s).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1037>
2021-07-30 15:58:20 +09:00
He Junyan 42ed4c85fc va: vp8: fix the overflow in _fill_quant_matrix().
The gint8 of qi and qi_base may overflow when calculation the matrix
parameters and change the decoding result.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2447>
2021-07-29 20:28:20 +00:00
Seungha Yang f886766a6b examples: win32-videooverlay: Add test option for threading scenario
Add an option to test the case where window thread and pipeline handling
thread are different. Mainly to test the HWND leak fixed by
https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2302

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1188>
2021-07-30 02:01:13 +09:00
Seungha Yang 554855f87f d3d11: Disable packed and subsampled YUV formats
Direct3D11 sampler doesn't support them very well, and conversion
outputs usually result in poor visual quality with our shader code.
Should disable support for such formats for now

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2344>
2021-07-29 22:33:30 +09:00
Jan Alexander Steffens (heftig) 0f8631c476 tsdemux: Notify when ignore_pcr is set
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2437>
2021-07-28 13:38:30 +00:00
Mathieu Duponchelle af7138ebc4 cccombiner: fix CDP padding detection
While a cc_data_pkt with cc_valid 0 should be considered padding,
it might be followed up by valid DTVCC packets, and should not
cause the whole CDP packet to get discarded.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2440>
2021-07-28 11:53:12 +00:00
Kai Uwe Broulik 4ed342db5d qt: Support RGB format
In GstQSGTexture::hasAlphaChannel return value based on
whether the video format has alpha channel.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1040>
2021-07-28 11:42:12 +00:00
Seungha Yang 110edbc8bd gst-launch: Enable Windows high-resolution clock
Default timer precision of Windows is dependent on system, but
usually it's known to be about 15ms in worst case.
That's not an enough precision for multimedia application.

Enable high-resolution clock in gst-launch to demonstrate
the usage of Windows high-precision clock for application developers.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/817>
2021-07-28 20:19:10 +09:00
He Junyan 704689ec4a codecs: h264dec: Improve the find_first_field_picture().
We need to consider the first field of the last picture when the
last picture can not enter the DPB.

Another change is, when prev field's frame_num is not equal to the
current field's frame_num, we should also return FASLE because it
is also a case of losing some field.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2430>
2021-07-28 10:54:21 +00:00
He Junyan f95aa0a374 codecs: h264dec: consider the last field when add picture to DPB.
There are cases that the first field of the last picture is not a
ref but the second field is a ref. We need to add both of them
because the bumping always needs a complete frame in the DPB.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2430>
2021-07-28 10:54:21 +00:00
He Junyan 055ded53e9 codecs: h264dec: Consider the field case when directly output.
For interlaced streams, it is also possible that the last frame is
not able to be inserted into DPB when the DPB is full and the last
frame is a non ref. For this case, we need to hold a extra ref for
the first field of the last frame and wait for the complete frame
with both top and bottom fields. For the progressive stream, the
behaviour is unchanged.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2430>
2021-07-28 10:54:21 +00:00
He Junyan 04974015ec codecs: h264dec: Fix a error print of dpb_add.
When the dpb is interlaced, the max size should be 2*dpb->max_num_frames,
correcting the error print info for that.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2430>
2021-07-28 10:54:21 +00:00
Seungha Yang 2f9fa71ab3 jack: Add low-latency property for automatic latency-optimized setting
Similar to wasapi/wasapi2 plugins on Windows, adding low-latency
option so that jack element can optimize GstAudioRingBufferSpec
setting for low latency.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1034>
2021-07-28 10:53:48 +00:00
Seungha Yang ca9576deca jack: Remove trailing whitespace
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1034>
2021-07-28 10:53:48 +00:00
Jan Alexander Steffens (heftig) 97601e49cb input-selector: Use proper segments when cleaning cached buffers
We need to use the segment associated with the cached buffer, not the
current segment of the pad, otherwise we miscalculate the running time
of cached buffers from before a segment change.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/859>
2021-07-28 09:47:03 +00:00
Víctor Manuel Jáquez Leal 9e1919c040 videocrop: Resurrect any caps feature negotiation.
Commit e31cbce4 brought a regression to negotiate featured caps. But
only by removing the entry in the caps template. This commit brings it
back.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1039>
2021-07-28 08:47:21 +00:00
Seungha Yang 9c9ad0c8d6 jack: Fix assertion fail when device supports only mono channel
MAX should be larger than MIN for GST_TYPE_INT_RANGE.

GStreamer-CRITICAL **: 18:26:27.912:
gst_value_collect_int_range: assertion 'collect_values[0].v_int < collect_values[1].v_int' failed

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1033>
2021-07-28 08:16:15 +00:00
Seungha Yang e8882c3a1d decklink: Don't print error for dlopen failure
This is not a fatal error on systems without decklink

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2441>
2021-07-28 17:13:06 +09:00
Imanol Fernandez eea28504fa player: Add static keyword to _config_quark_table
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2439>
2021-07-28 06:05:30 +00:00
Matthew Waters 32170aa6c2 rtpbasedepayload: remove object locking an extension
Doing that is fraught with danger of deadlocks and is not conceptually
part of the API contract.  The object lock is generally intended for
internal-object-use only.

If another lock is needed, that should be added separately.

This lock was erronously added as part of:
https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1118

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1233>
2021-07-28 04:16:58 +00:00
Matthew Waters 0e120ca5aa applemedia: silence a couple of MoltenVK warnings
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2433>
2021-07-28 02:12:32 +00:00
Matthew Waters b1fb787859 qmlglsrc: fix operation without any qmlglsink
E.g. a pipeline like qmlglsrc ! gldownload ! ... would currently fail to
run because the OpenGL context are not created in the correct order.

The QtWindow also needs to know the OpenGL context used by downstream
elements in order to set optimize for the correct GstGLSyncMeta for
synchonisation purposes.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1036>
2021-07-28 02:11:44 +00:00
Nicolas Dufresne 03041842de debugutils: Only proxy the properties once
The needed once call was removed accidently during porting. This was catch by
the CI as memory leaks.

Related to !2426

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2438>
2021-07-27 13:22:35 -04:00
Edward Hervey b3504a0192 mxf: Handle D10 "picture only" variant
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/80

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2436>
2021-07-27 12:18:31 +02:00
Víctor Manuel Jáquez Leal c27a01233d va: filter: refactor convert_surface() to process()
The idea of this change is to add, in the future,
process_with_generator(), when multiple input surfaces are processed,
for blending.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2431>
2021-07-27 09:13:39 +00:00
Víctor Manuel Jáquez Leal 9abeea49a0 va: filter: Refactor set_formats() to set_video_info().
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2431>
2021-07-27 09:13:39 +00:00