Commit graph

389 commits

Author SHA1 Message Date
Tim-Philipp Müller 80d66dfec8 Fix up package name and origin in some plugins 2017-05-18 10:58:20 +01:00
Sebastian Dröge 634cd87c76 gst: Clear floating flag in constructor of all GstObject subclasses that are not owned by any parent
https://bugzilla.gnome.org/show_bug.cgi?id=743062
2017-05-17 10:40:23 +03:00
Nicolas Dufresne 4261692187 Remove plugin specific static build option
Static and dynamic plugins now have the same interface. The standard
--enable-static/--enable-shared toggle are sufficient.
2017-05-16 14:05:52 -04:00
Josep Torra 367b4a353f qtkit: drop the qtkitvideosrc element
The QTKit framework had been deprecated for long in favour of AVFundation
framework and we already have avfvideosrc that provides the same
functionality.

https://bugzilla.gnome.org/show_bug.cgi?id=782078
2017-05-03 13:21:42 +02:00
Thibault Saunier 78022a6e0c docs: Port all docstring to gtk-doc markdown 2017-04-12 12:57:57 -03:00
Matthew Waters b01ae6e5e6 applemedia/iosurfacememory: Fix missing variable name change
956c4d0bde missed a variable name change.
Fix that.
2017-03-14 11:39:23 +11: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
Sebastian Dröge 2bcd155a6a avfvideosrc: Use AVCaptureDeviceTypeBuiltInDuoCamera instead of DualCamera for now
The former is deprecated in 10.2 but we don't require that SDK yet.
2017-03-09 10:10:37 +02:00
Nick Kallen 82c132aa50 applemedia/gl: Fix compile issues for OSX
https://bugzilla.gnome.org/show_bug.cgi?id=778333
2017-03-08 15:23:42 +02:00
Nick Kallen 0968bad8a4 applemedia: avfvideosrc supports position, device-type, and orientation
Avfvideosrc represents an iphone camera or, on mac, a screencapture session.
The old API allowed you to select an input device by device index only. The new
API adds the ability to select the position (front or back facing) and
device-type (wide angle, telephoto, etc.). Furthermore, you can now specify
the orientation (portrait, landscape, etc.) of the videostream.

https://bugzilla.gnome.org/show_bug.cgi?id=778333
2017-03-07 13:39:19 +02:00
Nick Kallen 46bbc60d24 applemedia/gl: Update code to use ARC
All code interacting with Objective-C objects should now use Automated
Reference Counting rather than manual memory management or Garbage
Collection. Because ARC prohibits C-structs from containing
references to Objective-C objects, all such fields are now typed
'gpointer'. Setting and gettings Objective-C fields on such a
struct now uses explicit __bridge_* calls to tell ARC about
object lifetimes.

https://bugzilla.gnome.org/show_bug.cgi?id=777847
2017-03-07 13:37:07 +02:00
Nick Kallen 6e4354600d applemedia: Fix video texture cache build issue on MacOS
https://bugzilla.gnome.org/show_bug.cgi?id=779247
2017-03-04 17:35:23 +02:00
Nick Kallen e557e93f3b applemedia: ensure all textures are released before texturecache is released
It was previously possible for videotexturecache to be finalized before all of
its textures. Finalizing outstanding textures in this circumstance leads
to a crash. This patch ensure resources are freed in the proper order.

https://bugzilla.gnome.org/show_bug.cgi?id=779247
2017-03-04 11:59:57 +02:00
Nick Kallen 2f676d61a7 Builds for MacOS
https://bugzilla.gnome.org/show_bug.cgi?id=778434
2017-02-14 14:50:34 +01:00
Nick Kallen 487e57f1b7 applemedia: free videotexturecache texture in gl thread
The cached texture was treated as user_data passed to GstGLBaseMemory
and freed with a GDestroyNotify function. However, this data must
be treated specially: it must be destroyed in the GL thread.

https://bugzilla.gnome.org/show_bug.cgi?id=778434
2017-02-14 12:25:55 +02:00
Sebastian Dröge 01c60e664d applemedia: Fix some compiler warnings on iOS 2017-01-27 18:11:15 +02:00
Sebastian Dröge 926c9a243d applemedia: Fail cleanly instead of crashing if obtaining a GL display failed
https://bugzilla.gnome.org/show_bug.cgi?id=777742
2017-01-26 15:35:53 +02:00
Matthew Waters 03b539bdfc gl: update sys dependants for function removals
4315a4b54d forgot to change the androidmedia/videotoolbox/caopengllayer
sources as required.
2017-01-13 13:01:28 +11:00
Garima Gaur 81b0a14d69 Fix some caps leaks in pad template creation code
gst_pad_template_new() does not take ownership of
the caps passed to it, so we need to unref the caps.

https://bugzilla.gnome.org/show_bug.cgi?id=776790
https://bugzilla.gnome.org/show_bug.cgi?id=776787
2017-01-03 10:02:58 +00:00
Sebastian Dröge 279fb3d99f vtdec: Mark pad as needing reconfiguration again if it failed
And return FLUSHING instead of NOT_NEGOTIATED on flushing pads.

https://bugzilla.gnome.org/show_bug.cgi?id=774623
2016-11-18 12:22:44 +02:00
Matthew Waters ba805938e3 applemedia: error out if the uri property is not set
Fixes:

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** +[NSString stringWithUTF8String:]: NULL cString

in the state change test.
2016-11-17 17:30:54 +11:00
Matthew Waters 41a6448918 gl: GST_GL_TYPE -> GST_TYPE_GL
Some deprecated symbols are kept for backwards compatibility
2016-11-03 16:16:12 +11:00
Sebastian Dröge 807b0322c5 applemedia: Conditionally compile qtkitvideosrc
The API was deprecated in 10.9 and apparently does not exist in the SDK for
macOS Sierra anymore.

https://bugzilla.gnome.org/show_bug.cgi?id=770587
2016-08-31 10:03:15 +03:00
Thibault Saunier 2fb716409c Use the new API to post flow ERROR messages on the bus
https://bugzilla.gnome.org/show_bug.cgi?id=770158
2016-08-26 19:23:31 -03:00
Alessandro Decina 8a05102747 applemedia: fix compiler warning 2016-08-26 22:52:41 +10: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
Matej Knopp 26c7ca4c24 vtdec: fix MPEG-2 video caps
Add systemstream=false to caps, otherwise the decoder
may be picked for MPEG-PS files. Also parsed=true,
as video toolbox expects entire frame in
VTDecompressionSessionDecodeFrame.

https://bugzilla.gnome.org/show_bug.cgi?id=770049
2016-08-22 20:25:03 +01:00
Florian Zwoch 6de83e0515 avfvideosrc: account for retina displays when capturing screens
Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=770030
2016-08-19 19:46:41 +10:00
Sergei Saveliev fc6b17b6d2 avfassetsrc: Don't escape the URI another time in another location too
One location was forgotten in a913a0b967

https://bugzilla.gnome.org/show_bug.cgi?id=767492
2016-08-16 18:47:58 +03:00
Matthew Waters 19a00b17ab vtdec: use L/LA textures on GLES2 as well 2016-06-29 20:39:26 +10:00
Matthew Waters 9a325f4a09 vtdec: add support for zerocopy decoding with GLES 3.x
It seems that Red/RG textures aren't supported anymore for zerocopy decoding
with GLES 3.x.  Instead use Luminance/Luminance Alpha textures which are.
2016-06-29 18:04:28 +10:00
Matthew Waters 989200820d glmemory: add the texture type to allocate to parameters
Rather than assuming something.  e.g. zerocopy on iOS with GLES3 requires
the use of Luminance/Luminance Alpha formats and does not work with
Red/RG textures.
2016-06-29 18:04:28 +10:00
Alessandro Decina 9a026799f0 vtdec: minimize renegotiation to make hw decoding more reliable
The hardware decoder can become (temporarily) unavailable across
VTDecompressionSessionCreate/Destroy calls. During negotiation if the currently
configured caps are still accepted by downstream we keep using them so we don't
have to destroy and recreate the decoding session.

This indirectly fixes https://bugzilla.gnome.org/show_bug.cgi?id=767429, by
making vtdec stick to GLMemory.
2016-06-23 11:45:27 +10:00
Sebastian Dröge a913a0b967 avfassetsrc: Don't escape the URI before passing it to NSURL
The URI must already be escaped by the caller, we don't support passing around
invalid (unescaped) URIs via the GstURIHandler interface.

Also it will escape too much of the URI in this case, e.g.
  ipod-library://item/item.m4a?id=3143338395173862951
becomes
  ipod-library://item/item.m4a%3Fid%3D3143338395173862951

https://bugzilla.gnome.org/show_bug.cgi?id=767492
2016-06-13 09:21:50 +03:00
Sebastian Dröge 0275007107 iosassetsrc: Print the correct URI if it was rejected
We were printing the previously set URI instead of the new one.
2016-06-13 09:21:50 +03:00
Alessandro Decina a037f13271 vtdec: always drain in ::negotiate
Move calling gst_vtdec_push_frames_if_needed from ::set_format to ::negotiate so
that we always drain even when renegotiation is triggered by downstream.
2016-06-07 17:22:01 +10:00
Alessandro Decina 7fea17a476 vtdec: try to preserve downstream caps order
vtdec specifies sysmem; GLMemory as template caps. When negotiating, we used to
call gst_pad_peer_query_caps (..., filter) with our template caps as filter. The
query does gst_caps_intersect (filter, peercaps) internally which gives
precedence to the order of the filter caps. While we want to output sysmem by
default, when negotiating with glimagesink which returns GLMemory; sysmem; we
do want to do GL, so we now query using a NULL filter and intersect the result
with our template caps giving precedence to downstream's caps.

tl;dr: make sure we end up negotiating GLMemory with glimagesink
2016-06-07 17:13:12 +10:00
Edward Hervey 09e3bd0fb3 applemedia: Only use the OpenGL framework on OSX
It's not available on ios (uses OpenGLES already)

https://bugzilla.gnome.org/show_bug.cgi?id=766973
2016-06-03 07:11:55 +02:00
Havard Graff f615a84646 applemedia: CGLTexImageIOSurface2D needs the OpenGL framework on OSX
https://bugzilla.gnome.org/show_bug.cgi?id=766973
2016-06-02 22:42:22 +01:00
Havard Graff ba06fc96b7 avsamplevideosink: check we are compiling for 10.1 up to 10.4
This API was deprecated in 10.4, so don't use it for 10.5 and onwards.

https://bugzilla.gnome.org/show_bug.cgi?id=766973
2016-06-02 22:41:54 +01:00
Heinrich Fink ab70d79c43 applemedia: vtenc: Register a hardware-only vtenc_h264_hw element on OSX
Similar to vtdec_hw, this commit adds a vtenc_h264_hw element that fails
caps negotiation unless a hardware encoder could actually be acquired.
This is useful in situations where a fallback to a software encoder
other than the vtenc_h264 software encoder is desired (e.g. to x264enc).

https://bugzilla.gnome.org/show_bug.cgi?id=767104
2016-06-02 11:22:09 +03:00
Alessandro Decina 3d8d60baa8 vtdec: make vtdec_hw fallback to software on renegotiation
When renegotiating mid stream - for example with variable bitrate
streams - and therefore destroying and recreating VTSessions, the
hw decoder might become temporarily unavailable.

To deal with this and avoid erroring out on bitrate changes,
vtdec_hw now falls back to using the software decoder if the hw
one was available at some point but isn't anymore. At
renegotiation/bitrate change time, it will still retry to open
the hardware one.
2016-06-02 16:30:02 +10:00
Alessandro Decina 4a83686a57 vtdec: fix switching from GLMemory to Sysmem
When renegotiating from GLMemory to Sysmem do teardown the texture_cache.

Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=766190
2016-06-02 13:15:05 +10:00
Alessandro Decina bf444301f9 vtdec: optimize renegotiation
::negotiate can be called several times before the CAPS event is sent downstream
so use the currently configured output state caps instead of the pad current
caps when deciding whether to recreate the VTSession or not.

This leads to creating/destroying less VTSessions which makes renegotiation more
reliable especially when using hw decoding.
2016-06-02 13:15:05 +10:00
Philippe Normand c78819b26a applemedia: fix core_video_meta init registration 2016-05-10 19:22:33 +03:00
Sebastian Dröge 43487482e5 applemedia: Ship all headers in tarballs
Some were missing from noinst_HEADERS.

https://bugzilla.gnome.org/show_bug.cgi?id=766163
2016-05-09 12:50:47 +03:00
Alessandro Decina 5228238715 applemedia: vtdec: output sysmem by default 2016-05-04 11:33:16 +10:00
Hyunjun Ko 45b258127c applemedia: vtenc: fix build break on iOS
Fix 'conflicting types' error
https://bugzilla.gnome.org/show_bug.cgi?id=765292
2016-04-21 09:28:01 +03:00
Hyunjun Ko 5023a7c85d applemedia: vtenc: Fix a warning by weak-link symbol
Fix this warning
address of function 'VTCompressionSessionPrepareToEncodeFrames' will always evaluate to 'true' [-Wpointer-bool-conversion]

https://bugzilla.gnome.org/show_bug.cgi?id=765292
2016-04-20 17:16:02 +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