Commit graph

3863 commits

Author SHA1 Message Date
Seungha Yang
2a3205b294 vulkan/window/win32: Don't post any WinProc message to parent window
Posting any message to parent seems to be pointless. That might break
parent window.
Regardless of the posting, parent window can catch mouse event
and also any keyboard events will be handled by parent window by default.
2019-12-22 09:16:42 +00:00
Yeongjin Jeong
3f2240498b h265parser: Add simple GstH265Profile/string public utilites
It makes more simplifies the conversion between GstH265Profile and string.
2019-12-20 15:43:55 +00:00
Stéphane Cerveau
6bc0e9527e remove various useless linefeed in logs 2019-12-11 10:51:29 +01: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
81d1e16b6b vulkan: move fullscreenquad object to library
It's useful and extensible enough to be used by us and other elements
2019-12-04 07:20:27 +00:00
Matthew Waters
dee29aa8e7 vulkan: fix up some gir annotations 2019-12-04 07:20:27 +00:00
Matthew Waters
c7526a6f68 vulkan: priviatise _invoke_on_main()
https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/1132
2019-12-03 10:17:29 +00:00
Matthew Waters
24d096597b vulkan: implement caching and reuse of a couple of vulkan resources
Includes a new GstVulkanHandlePool base class for pooling different
resources togther.  The descriptor cache object is ported to
GstVulkanHandlePool with the exact same functionality.

A new GstVulkanFenceCache is also implemented for caching fences
which is used internally by GstVulkanDevice for creating or reusing
fences.

The existing GstVulkanTrashFenceList object now caches trash objects.
2019-11-28 23:27:21 +00:00
Matthew Waters
5177c24a7e vulkan/trash: remove free functions covered by GstVulkanHandle 2019-11-28 23:27:21 +00:00
Matthew Waters
615022ad93 vulkan: split vkfullscreenrender into two
Part 1 is a base class (vkvideofilter) that handles instance, device,
queue retrieval and holding that has been moved to the library
Part 2 is a fullscreenrenderquad that is still in the plugin that
performs all of the previous vulkan-specific functionality.
2019-11-28 23:27:21 +00:00
Matthew Waters
960784af1f vulkan/handle: add some handle types 2019-11-28 23:27:21 +00:00
Matthew Waters
a7c2aa473f vulkan/image: don't rely on weak-ref notifies for views
Weak refs don't quite work here correctly as there is always a race with
taking the lock between find_view() and remove_view().  If find_view()
returns a view that is going to removed by remove_view() then we have an
interesting situation.

In theory, the number and type of views for an image are relatively
constant and should not change one they've been set up which means that
it is actually practical to perform pool-like reference counting here
where the image holds a pool of different views that it can give out
as necessary.
2019-11-28 23:27:21 +00:00
Matthew Waters
4f3051fd2d vulkan: add a couple of missing fence unrefs 2019-11-28 23:27:21 +00:00
Thiago Santos
3c5e5f8b85 adaptivedemux: fix 'utc now' gdatetime creation
It broke after removal of usage of GTimeVal that was deprecated,
it requires seconds in this unix-based creation instead of microseconds.

The downside here is that it will create an extra object just to be
discarded in order to add the microsecond part to it.

It would end up segfaulting as it would return a NULL value
2019-11-20 22:16:15 +00:00
Andrew Branson
8de7b41015 photography: Add additional settings relevant to Android
Exposure mode property, extra colour tone values (aqua, emboss, sketch, neon), extra scene modes (backlight, flowers, AR, HDR).
Missing vmethods for exposure mode, analog gain, lens focus, colour temperature, min & max exposure time

Contribs by Mohammed Sameer <msameer@foolab.org>, Adam Pigg <adam@piggz.co.uk>
2019-11-18 23:10:04 +00:00
Matthew Waters
9f4b043161 vulkan/queue: be sure to take a lock around command submission
This ensures that only one thread is submitting commands at a time as
required by the Vulkan specification.
2019-11-14 07:10:16 +00:00
Matthew Waters
0c3eec57f2 vulkan: make new trash objects ref the fence
Avoids gst_vulkan_fence_ref at each call site of the trash object
creation
2019-11-13 22:27:59 +00:00
Matthew Waters
4e467e0082 vulkan/wayland: advertise the current surface size
Avoids vkswapper from creating a 0x0 output VkSurface and failing
2019-11-13 22:27:59 +00:00
Jan Schmidt
c0561fb916 meson: Fix plugin symbol export for C++ sources/plugins
The symbol visibility=hidden flag was only being applied to C
compilation, so plugins implemented in C++ would leak extra symbols
than the 2 _get_desc() and _register().

That also showed that the gst-libs opencv C++ lib was not marking
symbols for export correctly because the BUILDING_GST_OPENCV define
wasn't in the C++ args, so fix that too.
2019-11-12 13:00:42 +00:00
Fuwei Tang
c810b73472 vc1parser : fix a miswrite 2019-11-11 02:12:34 +00:00
Matthew Waters
0d57c1817b vkhandle: expose a printf format specifier for a vulkan handle 2019-11-11 11:04:59 +11:00
Matthew Waters
4b491182ae vkdescriptor: set the GError on the 'too many allocations' case 2019-11-11 11:04:59 +11:00
Matthew Waters
982e06ef87 vkswapper: add inherit support
Used on android
2019-11-11 11:04:59 +11:00
Matthew Waters
332f1742d2 vkswapper: output specific values when swapchain flags fail 2019-11-11 11:04:59 +11:00
Matthew Waters
08928541c6 vulkan: add android WSI integration 2019-11-11 11:04:59 +11:00
Nirbheek Chauhan
e0a70d1a0a vulkan: Fix build on ios
These little bits were missed during the refactor in
https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/merge_requests/821
2019-11-10 19:27:06 +05:30
Seungha Yang
0a2d24d010 vulkan: Fix build on Windows
gstvkwindow_win32.c(166): error C2065: 'msg_source': undeclared identifier
2019-11-08 23:42:08 +09:00
Edward Hervey
7bceb6c3ff bad: Avoid using deprecated API
GTimeval is deprecated
2019-11-08 10:43:08 +00:00
Matthew Waters
670d0a8e88 vulkan: remove the private struct from the public struct
Remove any references to CamelTypePrivate from the public CamelType
struct.  They can be accessed as needed using
camel_type_get_instance_private().
2019-11-07 20:01:57 +00:00
Matthew Waters
32b3387ae6 vulkan: implement proper descriptor set handling
The major functionality gain this provides is proper reference counting
for a descriptor set.  Overall this allows us to create descriptor sets
when they are needed (or reused from a cache) without violating any of
vulkan's object synchronisation requirements.

As there are a fixed number of sets available in a pool, the number of
descriptors in elements is currently hardcoded to 32.  This can be extended
in a future change to create pools on the fly if that limit is ever overrun.
2019-11-07 20:01:57 +00:00
Matthew Waters
1c89096b4f vulkan/fence: add always-signalled fence type
Allows a cleaner control flow when there is no fence available for use
with the trash list.  An always signalled fence type will always return
TRUE for gst_vulkan_fence_is_signalled.
2019-11-07 20:01:57 +00:00
Matthew Waters
212b313e29 vulkan: add handle type for arbitrary vulkan handles
Serve two purposes:
1. refcounting of vulkan handles with associated destruction.  When
   combined with the trash list, the user can ensure destruction at
   the correct time according to the vulkan rules.
2. avoids polluting our API with 32-bit vs 64-bit integer/pointers
   differences as exposed through the vulkan API.  on 32-bit, vulkan
   non-dispatchable handles are 64-bit integers and on 64-bit, they
   are pointers.
2019-11-07 20:01:57 +00:00
Matthew Waters
f738c1f138 vulkan: fix non-dispatchable handles on 32-bit platforms
non-dispatchable handles are 64-bit integers on 32-bit platforms
2019-11-07 20:01:57 +00:00
Matthew Waters
7a1bb3001a vulkan: use VK_NULL_HANDLE in more places
Fixes compiler warnings on 32-bit platforms assigning a void * to a
64-bit integer value.
2019-11-07 20:01:57 +00:00
Matthew Waters
116549b561 vulkan: use the provided VKAPI_ATTR for the debug callback
Ensures that we get the calling convention correct for the platform we
are using.
2019-11-07 20:01:57 +00:00
Matthew Waters
a2aa17278a vulkan: dump surface information 2019-11-07 20:01:57 +00:00
Matthew Waters
b55134a4dd vulkan: print criticals/warnings for vulkan errors/warnings
Simplifies finding the erronous cases in using the Vulkan API
incorrectly.
2019-11-07 20:01:57 +00:00
Matthew Waters
475a2b0acd vulkan/image: use the full video info for returning vulkan formats
We may need some colorspace information for returning sRGB vs no sRGB.
2019-11-07 20:01:57 +00:00
Niels De Graef
d8f61515d8 Don't pass default GLib marshallers for signals
By passing NULL to `g_signal_new` instead of a marshaller, GLib will
actually internally optimize the signal (if the marshaller is available
in GLib itself) by also setting the valist marshaller. This makes the
signal emission a bit more performant than the regular marshalling,
which still needs to box into `GValue` and call libffi in case of a
generic marshaller.

Note that for custom marshallers, one would use
`g_signal_set_va_marshaller()` with the valist marshaller instead.
2019-11-06 14:27:46 +00:00
Aaron Boxer
6d3429af34 documentation: fixed a heap o' typos 2019-11-05 09:11:25 -05:00
Edward Hervey
ef16d7558f mpegtsmux: Add SCTE-35 support
This adds two properties:
* scte-35-pid: If not 0, enables the SCTE-35 support for the current
  program. This will write the proper PMT and send SCTE-35 NULL
  commands (i.e. heartbeats) at a regular interval
* scte-35-null-interval: This specifies the interval at which the
  NULL commands should be sent

Sending SCTE-35 commands is done by creating the appropriate SCTE-35
GstMpegtsSection and then sending them on the muxer. See the
associated example
2019-10-31 12:31:27 +00:00
Edward Hervey
6a9108884c mpegts: Add support for SCTE-35 sections
Not all commands are supported, but the most common ones are.
Both parsing and packetizing is supported
2019-10-31 12:31:27 +00:00
Ratchanan Srirattanamet
b91ff666f8 camerabin2: preview: remove redundant property setting on appsink
Commit 8a56a7de6d (camerabin2: preview:
Appsink doesn't need to sync) add a line that set the "sync" property on
the appsink. However, the author seems to forget that there's another
property setting on appsink a few lines below.

It's very likely that the added line is required because the original
line doesn't take effect (maybe because it's too late). But for whatever
reason, the original line is now redundant. So, I remove it in this
commit.
2019-10-20 20:07:04 +00:00
Alistair Buxton
8ba1b8146f meson: use gir_init_section in GstTranscoder
GstTranscoder adds extra_args for gir which call gst_init() during
introspection. These extra arguments are the same as the standard
ones defined in the top level meson.build as "git_init_section",
However, the top level definition also ensures an empty plugin
repository is used.

Because GstTranscoder does not use the standard args, plugins get
loaded when it is introspected. Since some of the plugins fail
without specific hardware, this causes #1100.

This patch makes it use gir_init_section.

Fixes #1100.
2019-10-19 13:58:50 +01:00
Tim-Philipp Müller
f218ec2794 Remove autotools build system 2019-10-14 13:54:27 +01:00
Philipp Zabel
0cc7d6f093 codecparsers: h264: record pic_order_cnt elements size
Some hardware decoders, for example Hantro G1, have to be told the
size of the pic_order_cnt related syntax elements pic_order_cnt_lsb,
delta_pic_order_cnt_bottom, delta_pic_order_cnt[0], and
delta_pic_order_cnt[1] in bits.
2019-10-12 06:21:20 +02:00
Philipp Zabel
d0d65fa875 codecparsers: h264: record dec_ref_pic_marking() size
Some hardware decoders, for example Hantro G1, have to be told the size
of the dec_ref_pic_marking() syntax element in bits. Record the size so
it can be passed on to the hardware.
2019-10-12 06:21:20 +02:00
Seungha Yang
6f2ab31d10 h265parser: Calculate short term RPS size in slice header
The calculated size of short_term_ref_pic_set is not a part of
HEVC syntax but the value is used by some stateless decoders
(e.g., vaapi, dxva, vdpau and nvdec) for the purpose of skipping
parsing the syntax by the accelerator.
2019-10-12 02:44:35 +00:00
Seungha Yang
29d4db0f8f h265parser: Add H265 slice segment header documentation
Adding brief description for each value.
2019-10-12 02:44:35 +00:00