Commit graph

31 commits

Author SHA1 Message Date
Matthew Waters 640a65bf96 gst: don't use volatile to mean atomic
volatile is not sufficient to provide atomic guarantees and real atomics
should be used instead.  GCC 11 has started warning about using volatile
with atomic operations.

https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719

Discovered in https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/868

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2098>
2021-03-22 14:34:36 +11:00
Matthew Waters 526afac736 vtdec: add support for outputing vulkan images 2019-12-09 01:49:31 +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 956c4d0bde gl/format: use our own GL format enum's instead of gstvideo's
They can describe in more detail (such as component sizes) the requested format.
2017-03-13 21:10:58 +11:00
Alessandro Decina 7898bc5810 applemedia: changes to make GL memory mappable on CPU on iOS
This commit introduces IOSGLMemory which is a GLMemory that falls back to
GstAppleCoreVideoMemory for CPU access. This is a temporary solution until
IOSurface gets exposed as a public framework on iOS and so we can use
IOSurfaceMemory on both MacOS and iOS.

https://bugzilla.gnome.org/show_bug.cgi?id=769210
2016-08-26 17:44:48 +10:00
Philippe Normand c78819b26a applemedia: fix core_video_meta init registration 2016-05-10 19:22:33 +03:00
Sebastian Dröge 4ad32506c6 applemedia: GstCoreVideoMeta in the plugin using only public API has no ctx member 2016-04-13 13:10:12 +03:00
Sebastian Dröge ccc068576a meta: Initialize all GstMeta fields
During allocation they are not initialized to all zeroes.

https://bugzilla.gnome.org/show_bug.cgi?id=764902
2016-04-13 10:17:24 +03:00
Alessandro Decina f6154b4cc0 applemedia: always fill GstBuffers with GstMemory
Always fill buffers with our custom memory. The custom memory will avoid
mapping CV/CM buffers unless necessary.
2016-01-19 16:13:04 +11:00
Ilya Konstantinov 8577224c74 applemedia: implement copying of meta
Before this, buffers would lose their Core Video / Core Media meta
over intervideo* boundary.

https://bugzilla.gnome.org/show_bug.cgi?id=747216
2016-01-19 13:06:31 +11:00
Ilya Konstantinov 936b2fdfbc applemedia: implement GstAppleCoreVideoMemory
Implement a new memory type wrapping CVPixelBuffer.

There are two immediate advantages:
 a) Make the GstMemory itself retain the CVPixelBuffer. Previously,
    the containing GstBuffer was solely responsible for the lifetime of
    the backing CVPixelBuffer.

    With this change, we remove the GST_MEMORY_FLAG_NO_SHARE so that
    GstMemory objects be referenced by multiple GstBuffers (doing away
    with the need to copy.)

  b) Delay locking CVPixelBuffer into CPU memory until it's actually
     mapped -- possibly never.

The CVPixelBuffer object is shared among references, shares and
(in planar formats) planes, so a wrapper GstAppleCoreVideoPixelBuffer
structure was introduced to manage locking.

https://bugzilla.gnome.org/show_bug.cgi?id=747216
2016-01-19 12:58:43 +11:00
Alessandro Decina e91989136a applemedia: corevideobuffer: make mapping the CVPixelBuffer in CPU optional
Mapping is not necessary and impacts performance when doing texture sharing with
downstream
2015-01-30 00:34:08 +11:00
Sebastian Dröge bee1477f08 applemedia: We need to map the coremedia buffers in non-readonly mode
Our buffers claim to be writable so other elements expect to be able
to write there without losing their changes.
2014-09-19 14:47:04 +03:00
Alessandro Decina cd90748c5b applemedia: vtdec: set the correct stride in the video meta 2013-12-22 17:48:25 +01:00
Alessandro Decina cf2cf20cc3 applemedia: corevideobuffer: fix for planar formats 2013-12-19 08:59:39 +01:00
Alessandro Decina 7dffa2e1f2 applemedia: vtdec: set the correct video format in the video meta
Fixes all kinds of weird bugs when videoconvert is used with the decoder.
2013-12-10 11:12:56 +01:00
Alessandro Decina ffeb719d4c applemedia: corevideobuffer: set the correct stride for packed formats 2013-12-08 16:46:58 +01:00
Andoni Morales Alastruey 97bb1edf6c applemedia: don't use the dynamic API for public frameworks
Public frameworks don't need to build the API dynamically, we instead
use the framework directly.
The exception is for VideoToolbox which went public in the 10.8 SDK,
but it's still private in older version of the SDK and iOS. This allow
building the plugin against SDK's where it's not a public framework.
2013-05-20 13:31:02 +02:00
Ole André Vadla Ravnås 519cefdeee applemedia: update contact information 2013-02-16 02:51:52 +01:00
Tim-Philipp Müller 9e1b75fda3 Fix FSF address
https://bugzilla.gnome.org/show_bug.cgi?id=687520
2012-11-04 00:09:59 +00:00
Michael Smith 0c2159a220 meta info: register thread-safely. 2012-10-03 11:05:06 -07:00
Mark Nauwelaerts 9cb0cc216d applemedia: init videoinfo 2012-09-18 13:19:37 +02:00
Wim Taymans 1cbd31e3ee fix for video api update 2012-04-19 14:24:45 +02:00
Sebastian Dröge 7ff3293a44 video: Update for libgstvideo API changes 2012-04-19 12:31:39 +02:00
Alessandro Decina d36fe4593d applemedia: update corevideobuffer after buffer meta API change 2012-04-05 09:08:35 +02:00
Wim Taymans 48ba9063b0 update for buffer api change 2012-03-30 18:15:36 +02:00
Alessandro Decina 8546458617 applemedia: port vtdec 2012-03-03 19:04:36 +01:00
Alessandro Decina 7a4a3833c3 applemedia: port qtkitvideosrc 2012-02-28 08:14:00 +01:00
Ole André Vadla Ravnås b4654f537f applemedia: lock CVPixelBuffer read-only
As per Apple's docs, this may improve performance by avoiding redundant
invalidations of existing caches of the buffer contents.
2010-11-08 23:58:24 +01:00
Ole André Vadla Ravnås 0e4e351b83 applemedia: New plugin for Apple multimedia APIs
Provides the following elements:

qtkitvideosrc: OS X video source relying on the QTKit API. Comes with
hard-coded caps as the API does not provide any way of querying for
formats supported by the hardware. Hasn't been tested a lot, but seems
to work.

miovideosrc: OS X video source which uses the undocumented/private
CoreMediaIOServices API, which is also the one used by iChat.
Present on latest version of Leopard and all versions of Snow Leopard.
Has been tested extensively with built-in cameras and TANDBERG's
PrecisionHD USB camera.

vtenc, vtdec: Generic codec wrappers which make use of the undocumented/
private VideoToolbox API on OS X and iOS. List of codecs are currently
hard-coded to H.264 for vtenc, and H.264 + JPEG for vtdec. Can easily be
expanded by adding new entries to the lists, but haven't yet had time to
do that. Should probably also implement probing as available codecs depend
on the OS and its version, and there doesn't seem to be any way to
enumerate the available codecs.

vth264decbin, vth264encbin: Wrapper bins to make it easier to use
vtdec_h264/vtenc_h264 in live scenarios.

iphonecamerasrc: iPhone camera source relying on the undocumented/private
Celestial API. Tested on iOS 3.1 running on an iPhone 3GS. Stops working
after a few minutes, presumably because of a resource leak. Needs some
love.

Note that the iOS parts haven't yet been ported to iOS 4.x.
2010-10-28 15:08:08 +02:00