Commit graph

25121 commits

Author SHA1 Message Date
Aaron Boxer
eff0117b5a d3dvideosink: use thread pool to handle events from hidden window event queue
window event queue now does not lock on the class lock, so we can now shut
it down without releasing the class lock, thus avoiding a potential race when
stopping the sink.
2019-12-18 13:15:06 -05:00
Aaron Boxer
027eb5ef20 d3dvideosink: improve concurrency on internal window create/destroy
Remove timeout and rely on condition variable instead to indicate thread
start.
2019-12-18 13:15:06 -05:00
Aaron Boxer
adfbce336a d3dvideosink: only warn about HWND already set if new HWND is not NULL 2019-12-18 13:15:06 -05:00
Aaron Boxer
84403dbae3 d3dvideosink: add more null checks 2019-12-18 13:15:05 -05:00
Aaron Boxer
06862d7ff5 d3dvideosink: check ref count and device before resetting display 2019-12-18 13:15:05 -05:00
Aaron Boxer
85c1550b92 d3dvideosink: use class lock when checking d3d formats, and cache format list 2019-12-18 13:15:05 -05:00
Aaron Boxer
d7af30bab9 d3dvideosink: destroy device just before final d3d release call
and free overlays after swap chain is released
2019-12-18 13:15:05 -05:00
Aaron Boxer
5e3520a302 d3dvideosink: add two forward declarations 2019-12-18 13:15:05 -05:00
Aaron Boxer
49211bdf74 d3dvideosink: use class lock when setting pool config 2019-12-18 13:15:05 -05:00
Aaron Boxer
fb6c2e8533 d3dvideosink: use class lock when allocating pool buffer 2019-12-18 13:15:05 -05:00
Aaron Boxer
52254ad31c d3dvideosink: use class lock when creating overlay textures 2019-12-18 13:15:05 -05:00
Aaron Boxer
51f823c98a d3dvideosinnk: check d3d device exists before creating overlay vertex buffer 2019-12-18 13:15:05 -05:00
Aaron Boxer
8710eb0656 d3dvideosink: pass hidden window hwnd to GST_DEBUG, rather than NULL 2019-12-18 13:15:05 -05:00
Aaron Boxer
54ce3d5011 d3dvideosink: fix typo 2019-12-18 13:15:05 -05:00
Stéphane Cerveau
c6eb17be6e h264parse: Align GST_H264_PROFILE_HIGH_422 to H264 standards
According to H264 ITU standards from 06/19, GST_H264_PROFILE_HIGH_422
(profile_idc = 122) with constraint_set1_flag = 0 and
constraint_set3_flag = 0 can be mapped to high-4:2:2 or high-4:4:4.
GST_H264_PROFILE_HIGH_422 with constraint_set1_flag = 0 and
constraint_set3_flag = 1 can be mapped to high-4:2:2, high-4:4:4,
high-4:2:2-intra or high-4:4:4-intra.
2019-12-18 03:03:40 +00:00
Olivier Crête
1f766a7145 Revert "videoparseutils: support two new EIA 608 closed caption formats"
This reverts commit f5c1c90122.
2019-12-17 16:44:10 -05:00
Olivier Crête
fad9096647 Revert "ccextractor: support new CEA 608 formats"
This reverts commit 80dd7b2d3d.
2019-12-17 16:43:54 -05:00
Aaron Boxer
80dd7b2d3d ccextractor: support new CEA 608 formats 2019-12-17 18:26:35 +00:00
Aaron Boxer
f5c1c90122 videoparseutils: support two new EIA 608 closed caption formats 2019-12-17 18:26:35 +00:00
Wonchul Lee
8e79e53c6e wlvideoformat: clean up video formats
It cleans up videoFormat by combining the wl_shm_formats and
drm_formats into a single table that represents the same format.
In addition, it adds NV61 format to the waylandsink.
2019-12-17 17:12:03 +00:00
Seungha Yang
64eb1d46b5 d3d11window: Always draw to internal window
... and use SetParent() WIN32 API when external window is used.
Depending on DXGI swap effect, the external window might not be
reusable by another backend. To preserve the external window's property
and setting, drawing to internal window seems to be safer way.
2019-12-16 22:24:29 +09:00
Seungha Yang
638c6d6931 d3d11window: Always set error reason to GError object 2019-12-16 18:21:02 +09:00
Julien Isorce
93bc74284f msdkdec: call finalize on the parent class
Otherwise GstVideoDecoder is not finalized and
resources are leaked.

Somehow GST_TRACERS="leaks" GST_DEBUG="GST_TRACER:7" did not catch it.

Valgrind output:

==31645== 22,480 (1,400 direct, 21,080 indirect) bytes in 5 blocks are definitely lost in loss record 5,042 of 5,049
==31645==    at 0x4C2FB0F: malloc
==31645==    by 0x51D9E88: g_malloc
==31645==    by 0x51FA7B5: g_slice_alloc
==31645==    by 0x51FAC68: g_slice_alloc0
==31645==    by 0x58D9984: g_type_create_instance
==31645==    by 0x58BA344: g_object_new_with_properties
==31645==    by 0x58BADA0: g_object_new
==31645==    by 0x8ECA966: gst_video_decoder_init
==31645==    by 0x58D99E7: g_type_create_instance
==31645==    by 0x58BA344: g_object_new_with_properties
2019-12-13 15:36:26 -08:00
Roman Shpuntov
5da2938244 avfvideosrc: element requests camera permissions even with capture-screen property is true
https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/1137

macOS has different dialogs for camera capture and screen capture.
No need to request screen capture permissions, the system detect
screen capture automatically and create request dialog.
2019-12-11 17:31:03 +00:00
Seungha Yang
a400126889 d3d11window: Initialize surface rect with given external window handle
Unlike internal window, resize event might not happen with external window.
2019-12-11 23:04:55 +09:00
Seungha Yang
a8ec409b84 d3d11device: Report alive d3d11 objects at the end
It would be useful for debugging d3d11 object leak.
2019-12-11 23:04:49 +09:00
Seungha Yang
59295b4271 d3d11: Fix ID3D11SamplerState leak 2019-12-11 12:57:46 +00:00
Stéphane Cerveau
6bc0e9527e remove various useless linefeed in logs 2019-12-11 10:51:29 +01:00
Haihao Xiang
b18be3562c msdk: ignore MFX_ERR_UNDEFINED_BEHAVIOR when loading a plugin
An issue can be seen when using msdkh265enc with bitrate change in
playing state. The root cause is the corresponding plugin is loaded
again.

Returning MFX_ERR_UNDEFINED_BEHAVIOR from MSDK just means the plugin has
been loaded, so we may ignore this error when doing configuation again
in the sub class, otherwise the pipeline will be interrupted
2019-12-10 17:23:53 +00:00
Seungha Yang
d963d442c5 d3d11videosink: Fix broken fallback rendering
Make fallback rendering work
2019-12-10 04:06:28 +00:00
Seungha Yang
abc1443cf0 d3d11videosink: Add debug message for fallback reason 2019-12-10 04:06:28 +00:00
Seungha Yang
9835289239 d3d11window: Do not check shader resource view if not doing conversion
If d3d11window does not convert format internally, shader resource view
is not required. Note that shader resource view is used for
color conversion using shader but when conversion is not required,
we just copy input input texture to backbuffer.
2019-12-10 04:06:28 +00:00
Julien Isorce
b681d6f62e msdkvpp: check mfx surface nullity for the input buffer
In theory it should not happen but it happened to me
in some cases where it failed to allocate some video
buffers so this was a consequence of a corner case.
Better to be safe than sorry.
2019-12-10 03:00:13 +00:00
Seungha Yang
8154b22a88 d3d11window: Clear old swapchain per prepare
_prepare() might be called multiple times for given window, so clear
old swapchain if any.

Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/1138
2019-12-10 10:58:28 +09:00
Olivier Crête
411bde315c srtp: Remove %z as it doesn't work on Windows 2019-12-09 15:41:13 -05:00
Alicia Boya García
f816903e65 gsttestsrcbin: Avoid not-linked errors when switching tracks
The previous implementation had a very high reproducibility race where
if after a track switch, the ex-active track pad completed a buffer
chain (now returning not-linked) the flow combiner had all their pads in
non-linked state, propagating it as an error and stopping the pipeline.

By resetting the flow combiner in response to RECONFIGURE events that
race is made impossible.
2019-12-09 18:12:29 +01:00
Julien Isorce
3bae199863 msdkdec: fix assertion 'frame->ref_count > 0' failed
Can happen if the oldest frame is the current frame
and if gst_video_decoder_finish_frame failed in which
case the current is unref and then drop instead of
just drop.
This patch also removes some assumptions, it was strange
to call unref and finish_frame in gst_msdkdec_finish_task.
In principle when owning a frame, the code should either
unref, or drop or finish.
2019-12-09 16:10:51 +00:00
Seungha Yang
5bf10d8781 d3d11window: Always set dxgi colorspace if possible
Not only for the 10 bits RGB case with HDR metadata, set proper color space
to swapchain in order to make color representaion correct
2019-12-09 12:22:15 +00:00
Matthew Waters
526afac736 vtdec: add support for outputing vulkan images 2019-12-09 01:49:31 +00:00
Matthew Waters
52ff97d085 vulkan/image: expose initialization function for subclasses 2019-12-09 01:49:30 +00:00
Matthew Waters
1c6f3e4b84 vulkan/macos: link directly to MoltenVK
It's currently the only sane way we can use MoltenVK functions to
integrate with Metal API.

It also removes the need to specify the VK_ICD_FILENAMES environment
variable pointing to MoltenVK_icd.json.
2019-12-09 01:49:30 +00:00
Matthew Waters
acac78c1ce applemedia: rename IOSurfaceMemory -> IOSurfaceGLMemory 2019-12-09 01:49:30 +00:00
Matthew Waters
0560946c82 videotexturecache: implement GL specifics as a subclass 2019-12-09 01:49:30 +00:00
Matthew Waters
ff5ba2f126 applemedia/videocache: make a GObject subclass 2019-12-09 01:49:30 +00:00
Matthew Waters
27f4fb060d avfvideosrc: don't leak texture caches
If decide_allocation is called multiple times, then we would continually
overwrite the previous cache without freeing
2019-12-09 01:49:30 +00:00
Aaron Boxer
e9891dfe14 d3d11: translate windows error codes to human readable strings
This will help with debugging.
2019-12-07 16:09:03 -06:00
Xavier Claessens
da584995f6 mlaudiosink: Fix crash when stopping pipeline
This is a bug in LuminOS 0.97.0.
2019-12-06 15:29:29 +00:00
Xavier Claessens
380ab8123b Add mlaudiosink element 2019-12-06 15:29:29 +00:00
Stéphane Cerveau
1711369526 openh264enc: keep the headers
be able to resend the headers on demand after a key-unit request
2019-12-06 08:35:00 +00:00
Sebastian Dröge
f776e2df96 decklink: Return new references to the devices from get_devices()
Otherwise the caller will free the devices we store internally.
2019-12-05 21:22:18 +02:00