Commit graph

3799 commits

Author SHA1 Message Date
Matthew Waters
96b2413616 vulkan: install public gstvkdebug.h header 2019-09-16 03:15:39 +00:00
Matthew Waters
08b53ca456 vulkan: fix build with older API headers
The protected memory flags were only added later as was the
multi-instance flag.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/1081
2019-09-11 23:59:53 +00:00
Matthew Waters
2b7050120e vulkan: dump most of the device information
Dump anything that can be queried using the physical device like features,
limits, queue properties, memory properties.
2019-09-11 20:22:56 +10:00
Askar Safin
c881e0a505 gst-player: fix bug with changing playback direction
Fix gst_event_new_seek call in gst-libs/gst/player/gstplayer.c

If rate >= 0.0, then previous code doesn't set end of segment. So, the end of segment
will be in place where previous seek put it. This is not neccesary end of media file
(in case of reverse playback). So if we play video backward for some time and then
switched to forward playing, we will get EOS somewhere in the middle of media file.
This commit always sets end of segment, thus fixing this bug
2019-09-04 15:19:39 +00:00
Wangfei
4bc46b902d h265parse lib: fix missing condition when parse PPS
Follow h265 spec(04/2015), log2_max_transform_skip_block_size_minus2
should get with condition when transform_skip_enabled_flag is 1.
2019-08-31 23:22:44 +00:00
Yeongjin Jeong
fdab54611b vulkan: Fix some confusing typos
Seems to have been copy pasted from around gl element
2019-08-29 11:19:37 +00:00
Yeongjin Jeong
94671be428 vulkan/xcb: Don't try to create xcb window with non-xcb display
Non-xcb display does not have a xcb_connection and trying
to create xcb window with wild pointer can cause segfault.
2019-08-29 11:19:37 +00:00
Saunier Thibault
7a66b16d97 Import GstTranscoder 2019-08-28 13:02:13 +00:00
Matthew Waters
87311d404e vulkan/swapper: add a couple of missing g_clear_error()'s 2019-08-28 10:34:39 +00:00
Matthew Waters
542af25eb1 vulkan/build: conditionally depend on Vulkan-1.0.gir
Vulkan-1.0.gir is new in gobject-introspection >= 1.61.1
2019-08-28 10:34:39 +00:00
Matthew Waters
c237c8de6a vulkandisplay: silence an unused but set error with no enable winsys implementations 2019-08-28 10:34:39 +00:00
Matthew Waters
09883b6a6b vulkan/swapper: check queue present return later
During resizes, the VkQueuePresent can return OUT_OF_DATE and if a buffer
is displayed returning OUT_OF_DATE it would error out and stop the pipeline.

We already have a explicit check for OUT_OF_DATE and the same general
error check in the statements following so just use that code.
2019-08-28 10:34:39 +00:00
Matthew Waters
d1f8f7436d vulkan/swapper: destroy the surface in finalize
Fixes a leak of the VkSurface object.
2019-08-28 10:34:39 +00:00
Matthew Waters
cac1487479 vulkan/swapper: set some values to NULL in error conditions
So that they are not double free()-ed.
2019-08-28 10:34:39 +00:00
Matthew Waters
be9c9e44f1 vulkan/error: add the error value in hex and decimal
Provides more information for what may be an 'Unknown' error.
2019-08-28 10:34:39 +00:00
Matthew Waters
5ab92e05d8 vulkanswapper: disconnect window signals before any internal resources
Otherwise, it's racy whether the necessary resources are available in
the signal callbacks on destruction.
2019-08-28 10:34:39 +00:00
Aaron Boxer
40212aaf00 h265parse: add support for SEI registered user data 2019-08-26 18:14:17 -04:00
Mathieu Duponchelle
42adb02a10 docstrings: port ulinks to markdown links 2019-08-23 20:14:12 +02:00
Matthew Waters
b43651cf99 vulkandisplay: Also free the GSource
NULL checking the main_context does not help as we've just destroyed the
GMainContext and set that field to NULL, not to mention it's unnecessary.

Fixes a leak of display's GSource.
2019-08-22 17:28:19 +10:00
Matthew Waters
1b7e83c584 vulkandisplay: free the list of windows on destruction
They may not have had an explicit removal from the subclass.
2019-08-22 17:02:07 +10:00
Matthew Waters
fc9f047885 vulkandisplay: fix use-after-free with removal of window
g_list_delete_link() free()'s the list node so any access after that is
a use-after-free.
2019-08-22 14:55:40 +10:00
Matthew Waters
e83df1759d vulkan/xcb: display->windows is a list of allocated GWeakRef
Don't access them as plain GstVulkanWindow objects.
2019-08-22 14:54:30 +10:00
Wangfei
55db6413d7 h26[45]parser: Fix emulation prevention byte detection
Add a separate epb_cache variable to the codecparser NalReader to
detect Emulation Prevention Bytes separately from the main bit cache.

This fixes problems where the existing logic can mistakenly detect
multiple EPB with a sequence like: 0x00 0x00 0x03 0x00 0x03. In that
case, the 5th byte should not be regarded as an EPB.
2019-08-19 05:01:24 +00:00
Matthew Waters
db157428ee vulkan/ios: keep track of surface changes 2019-08-14 13:45:31 +10:00
Matthew Waters
c8614bf4da vulkan/ios: initialize the frame to the parent's 2019-08-14 13:45:31 +10:00
Sebastian Dröge
28b0be4036 rtptransceiver: Remove direction setter and vfunc and replace it by a property
It was changed from a function to a property in the latest WebRTC spec.
2019-08-06 12:22:21 +00:00
Yeongjin Jeong
68057cee98 vulkan: Fix GstMemory leaks
Allocated GstMemory should be freed with g_free()
2019-08-06 07:44:05 +00:00
Matthew Waters
d916cad886 vulkan: add a couple of headers to the install list 2019-08-05 11:32:59 +10:00
Jan Schmidt
18b54f8d34 h265parser: Skip unused SEI bits differently
3-byte emulation bytes can confuse the current code that skips
bits at the end of an SEI. Use a simpler method that's also
quicker because it skips all remaining bits in one go instead
of 1 bit at a time.
2019-07-30 17:37:49 +00:00
Seungha Yang
5e7dbdf585 h265parse: Add support for compatible profiles of extensions
From decoder's capability point of view as defined by the h265 specification,
accept peer profile caps.
2019-07-31 00:32:40 +09:00
Charlie Turner
659d76a633 adaptivedemux: remove some deadlocks using webkitwebsrc.
WebKit's websrc depends on the main-thread for download completion
rendezvous. This exposed a number of deadlocks in adaptivedemux due to
it holding the MANIFEST_LOCK during network requests, and also needing
to hold it to change_state and resolve queries, which frequently occur
during these download windows.

Make demux->running MT-safe so that it can be accessed without using the
MANIFEST_LOCK. In case a source is downloading and requires a MT-thread
notification for completion of the fragment download, a state change
during this download window will deadlock unless we cancel the downloads
and ensure they are not restarted before we finish the state-change.

Also make demux->priv->have_manifest MT-safe. A duration query happening
in the window described above can deadlock for the same reason. Other
src queries (like SEEKING) that happen in this window also could
deadlock, but I haven't hit this scenario.

Increase granularity of API_LOCK'ing in change_state as well. We need to
cancel downloads before trying to take this lock, since sink events
(EOS) will hold it before starting a fragment download.
2019-07-29 13:19:41 +01:00
Matthew Waters
58f203844d vulkan/window: add property for the parent display 2019-07-05 16:20:05 +10:00
Matthew Waters
fda9b57dbe vulkan/device: add property for the parent instance 2019-07-05 16:13:13 +10:00
Jan Schmidt
de115dac4e h264parser lib: Add more profile_idc to the recognised set
Update the list of profile_idc recognised during SPS parsing
based on H.264 201704
2019-07-05 00:17:59 +10:00
Jan Schmidt
8899a471e3 h264parse lib: Remove the SPS parse_vui_params flag
The SPS parsing functions take a parse_vui_param flag
to skip VUI parsing, but there's no indication in the output
SPS struct that the VUI was skipped.

The only caller that ever passed FALSE seems to be the
important gst_h264_parser_parse_nal() function, meaning - so the
cached SPS were always silently invalid. That needs changing
anyway, meaning noone ever passes FALSE.

I don't see any use for saving a few microseconds in
order to silently produce garbage, and since this is still
unstable API, let's remove the parse_vui_param.
2019-07-05 00:17:59 +10:00
Jan Schmidt
81c20cadea h264parser lib: Warn on invalid pic_timing SEI
The spec calls for pic_timing SEI to be absent unless
there's either a CpbDpbDelaysPresentFlag or
pic_struct_present_flag in the SPS VUI data. If
both those flags are missing, warn.
2019-07-05 00:17:59 +10:00
Jan Schmidt
75ce024b1e h264parser lib: Always consume all SEI bits
If parsing an SEI errors out, it might not consume
all bits, leaving extra unparsed data in the reader
that the outer loop then tries to parse as a new
appended SEI.

Skip all the bits if any are left over to avoid
'finding' extra garbage SEI in the parsing.
2019-07-05 00:17:59 +10:00
Jan Schmidt
a978bd2cab h264parser: Return BROKEN_LINK for missing SPS
When parsing SEI that require an SPS, return
GST_H264_PARSER_BROKEN_LINK instead of a generic
parsing error to let callers distinguish
bitstream errors from (expected) missing packets
when resuming decode.
2019-07-05 00:17:59 +10:00
Jan Schmidt
34b0eb4953 h264parser: Improve documentation
Improve some docs around the NALU structure contents
2019-07-05 00:17:58 +10:00
Jan Schmidt
44d16fc00d gstmpegvideoparser: Documentation fixes
Fix some spelling mistakes and improve documentation in
the MPEG video parser
2019-07-05 00:17:58 +10:00
Matthew Waters
69af8a9360 vulkan: move swapper object to the gstvulkan library
Allows other sinks and/or user code to display to a VkSurface
2019-07-04 14:18:15 +10:00
Matthew Waters
b5256d94fc vulkan: move trash list to library 2019-07-04 14:18:15 +10:00
Matthew Waters
0cb416db11 vkbuffermemory: report requested size of the memory
Rather than using Vulkan's much larger aligned sizes. Fixes multi-planer
video with the GstVideoFrame API.
2019-06-20 01:41:56 +10:00
Matthew Waters
bbdb2f3f17 vulkan: add some information on vulkan formats 2019-06-20 01:41:56 +10:00
Matthew Waters
2dcdaaf7cb vulkan: ensure initialization of a couple of debug categories
Needed when some of the context querying functions can be called before
an instance has been created.
2019-06-20 01:41:56 +10:00
Seungha Yang
567258be29 h265parser: Add more profiles to known type
"High Throughput", "Multiview", "Scalable", "3D", "Screen Content Coding",
and "Scalable format range extensions" profiles can be supported
via h265parser APIs now.
2019-06-13 23:05:09 -04:00
Dong Il Park
1af22f3561 h265parser: Use vps_timing_info when not present in vui
The same timing_info will be present at vps or vui.
When the timeing_info is present in the VPS, vui_timing_info
, when present, shall be equal to vps_timing_info, and when
not present, is inferred to be equal to vps_timing_info.
2019-06-14 02:15:46 +00:00
Seungha Yang
7b1b3327a0 vulkan: Add support WIN32 for Windows
It's almost a fork of glwindow_win32 implementation.
To build on Windows, Vulkan SDK (at https://vulkan.lunarg.com/sdk/home)
and VK_SDK_PATH environment are required. Note that VK_SDK_PATH environment
setting is a part of the SDK installation.
2019-06-13 04:55:15 +00:00
Niels De Graef
7af1a4566f Use G_DEFINE_AUTOPTR_CLEANUP_FUNC unconditionally
Since we started depending on GLib 2.44, we can be sure this macro is
defined (it will be a no-op on compilers that don't support it).
2019-06-05 08:12:10 +02:00
Matthew Waters
ac09f88eb9 vulkan: implement the correct memory barriers necessary
Vulkan validation layers are finally silent!
2019-06-04 09:03:44 +00:00