Commit graph

329 commits

Author SHA1 Message Date
Ole André Vadla Ravnås
2382f10b98 cvapi: add wrapper for IO surface access
To be used in a future video sink for zero-copy rendering.
2010-11-11 00:22:31 +01:00
Ole André Vadla Ravnås
420943972c celapi: add capture port type constants 2010-11-11 00:22:31 +01:00
Ole André Vadla Ravnås
d10e029f51 applemedia: biplanar is actually NV12, not I420
D'oh!
2010-11-08 23:58:25 +01:00
Ole André Vadla Ravnås
d865feca82 vtenc: remove keyframe enforcement workaround
Was only needed for old iOS where the H.264 encoder didn't support
kVTEncodeFrameOptionKey_ForceKeyFrame.
2010-11-08 23:58:25 +01:00
Ole André Vadla Ravnås
abba3a4126 cvapi: add a few extra bits of wrapping 2010-11-08 23:58:25 +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
6428d306ea celvideosrc: put planar first in template caps 2010-11-08 14:02:50 +01:00
Ole André Vadla Ravnås
c2672f71cd applemedia: improve vtenc/vtdec performance
Profiling of H.264 encode and decode revealed that conversions
between packed and planar were happening behind the scenes.

Hence we now choose I420 instead of YUY2.
2010-11-08 14:02:50 +01:00
Ole André Vadla Ravnås
1eb9190ad9 celvideosrc: measure fps when statistics is enabled
Also refactor timestamping slightly.
2010-11-05 16:52:58 +01:00
Ole André Vadla Ravnås
b7368c34fd celvideosrc: update to new Celestial and MediaToolbox APIs
This means celvideosrc is no longer compatible with iOS 3.x.
2010-11-05 15:32:37 +01:00
Ole André Vadla Ravnås
bf095e891f celvideosrc: fix debug category description 2010-11-05 15:32:37 +01:00
Ole André Vadla Ravnås
517f3a75c2 celapi: update to reflect new API on iOS 4.x
Also add remaining property constants for device and stream.
2010-11-05 15:32:37 +01:00
Ole André Vadla Ravnås
da5da05540 mtapi: update to reflect new API on iOS 4.x
Also add remaining property constants for device and stream.
2010-11-05 15:32:37 +01:00
Ole André Vadla Ravnås
8402211bac applemedia: make video source element details consistent
Inspired by the v4l2src element details.
2010-11-04 19:27:25 +01:00
Ole André Vadla Ravnås
445d7502c4 applemedia: consistently use gst_element_class_set_details_simple 2010-11-04 19:27:25 +01:00
Ole André Vadla Ravnås
5d71ad0d52 celvideosrc: update e-mail address 2010-11-04 19:27:25 +01:00
Ole André Vadla Ravnås
44df8abea8 applemedia: rename iphonecamerasrc to celvideosrc
This is in order to improve consistency with the other three sources.
2010-11-04 19:27:25 +01:00
Ole André Vadla Ravnås
8b22f855ec avfvideosrc: don't explicitly empty the buffer queue
We're holding the only reference to it so there's no need to explicitly
empty it right before letting go of our reference.
2010-11-04 17:58:59 +01:00
Ole André Vadla Ravnås
89e5b60130 avfvideosrc: make buffer offset start from zero 2010-11-04 17:52:05 +01:00
Ole André Vadla Ravnås
86e2539816 qtkitvideosrc: implement zero-copy by using buffer-factory
This means we'll wrap each CoreVideo buffer inside a GstBuffer instead of
making a copy.
2010-11-04 17:52:05 +01:00
Ole André Vadla Ravnås
835b2988b6 bufferfactory: add support for wrapping CVBuffer 2010-11-04 17:52:05 +01:00
Ole André Vadla Ravnås
3a44d4c1f9 qtkitvideosrc: fix up refcounting
Should keep a strong reference to the device, but we don't need to manage
the reference count of elements of an NSMutableArray as it takes care of
that for us.
2010-11-04 17:52:04 +01:00
Ole André Vadla Ravnås
b39609b405 qtkitvideosrc: simplify timestamping algorithm
Aligning timestamps on duration boundaries, skipping frames and so forth
are clearly things that fall outside the scope of a video source.
2010-11-04 17:52:04 +01:00
Ole André Vadla Ravnås
3ba76f825d applemedia: add new iOS video source based on AVFoundation
This element makes use of the documented AVFoundation framework made
available starting with iOS 4.0, and hence this means we can finally
capture video using a public API.
2010-11-04 14:32:10 +01:00
Ole André Vadla Ravnås
50c6e05924 applemedia: fix stream-format caps used for H.264
The stream-format's "avc-sample" member is now called just "avc".
2010-11-04 14:32:09 +01:00
Ole André Vadla Ravnås
b873920eaa applemedia: update e-mail addresses 2010-11-04 14:32:09 +01:00
Ole André Vadla Ravnås
c6b32b42de applemedia: switch vtapi to CFTypeRef style typedefs 2010-11-02 23:14:26 +01:00
Ole André Vadla Ravnås
2e349576eb applemedia: support public version of CoreMedia
Also rename the relevant API so we mirror the public API more closely, and
switch to CoreFoundation CFTypeRef style typedefs. We still support the old
private CoreMedia in order to not break OS X support.

This means that vtenc and vtdec are now compatible with iOS 4.x, and in
theory also future versions of OS X, where this API may turn public like
it has on iOS.
2010-11-02 23:14:26 +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