Commit graph

899 commits

Author SHA1 Message Date
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
cc1c6ee9e3 winks: work around shutdown deadlock
GetOverlappedResult() might never return with some drivers. Time out
after 1000 ms. We cannot really fix this without either:
1) Controlling the streaming thread so we can do CancelIo() from that
   thread.
2) Switch to using IO completion ports.
2010-10-28 17:08:41 +02:00
Ole André Vadla Ravnås
a7a04fe601 winks: remove JPEG validation hack
This should clearly not be done in a video source.
2010-10-28 17:08:41 +02:00
Ole André Vadla Ravnås
35ed06fba2 winks: set PrioritySubClass to KSPRIORITY_NORMAL instead of 1
In order to match the reference implementation.
2010-10-28 17:08:41 +02:00
Ole André Vadla Ravnås
c1d16c4fee winks: retry when KsCreatePin fails with ERROR_NOT_READY
Turns out that the reference implementation does this, hence we need to
mirror this behaviour. This typically happens with hardware that takes
some time to initialize.
2010-10-28 17:08:41 +02:00
Ole André Vadla Ravnås
bb17394e76 winks: improve framerate fraction conversions
* For instance 7.5 fps should be represented as 15/2 instead of 7/1.
* Clamp AvgTimePerFrame and dwBitRate to account for rounding errors.
2010-10-28 17:08:41 +02:00
Ole André Vadla Ravnås
d282a1d380 winks: improve error-handling
Most important part here is special-casing "device busy" so the application
is able to provide better feedback when another application is using the
device.
2010-10-28 17:08:41 +02:00
Ole André Vadla Ravnås
cddfa50d92 winks: performance improvements
* Make the driver write directly into each GstBuffer to avoid memcpy().
* Don't memset() the buffer before reusing it.
* Recycle memory by keeping two spare buffers. Two because the sink
  downstream may keep a ref to the previous buffer.

Note that we align buffers on highest possible byte boundary (4096) so we
don't have to take into account what kind of alignment the driver requires.
2010-10-28 17:08:35 +02:00
Ole André Vadla Ravnås
f2b4d8990d winks: store priv pointer instead of looking it up 2010-10-28 17:08:35 +02:00
Ole André Vadla Ravnås
00bc7860ff winks: post error message on flow-unexpected 2010-10-28 17:08:35 +02:00
Andres Colubri
700f70e7a5 winks: add property probing support 2010-10-28 17:08:35 +02:00
Ole André Vadla Ravnås
2cf589b928 winks: sort devices that look like cameras first 2010-10-28 17:08:31 +02:00
Knut Inge Hvidsten
a54972f806 winks: provide guessed pixel-aspect-ratio in caps 2010-10-28 17:08:31 +02:00
Ole André Vadla Ravnås
a5beb0b8ff winks: only try to change state when actually open 2010-10-28 17:08:31 +02:00
Ole André Vadla Ravnås
1f6a6d2430 winks: ignore unsupported formats 2010-10-28 17:08:27 +02:00
Ole André Vadla Ravnås
b88b25ab9b winks: adjust a couple of logging severities
Should clearly not be considered warnings, as they're quite common.
2010-10-28 16:14:34 +02: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
Tim-Philipp Müller
ad0781a7d4 directdrawsink: port GstXOverlay bits to new API
Don't use deprecated API.
2010-10-12 16:17:54 +01:00
Damien Lespiau
2833cc4375 dvbsrc: Fix example usage, bandwidth=8 not 8MHz
The bandwidth property is enum that takes the values 8, 7, 6, AUTO not
8MHz.
2010-10-10 14:54:45 +01:00
Olivier Crête
b7143de618 shm: Add C++ protection
Add c++ protection in the relevant places
2010-10-08 17:01:29 -04:00
Sebastian Dröge
c5023baecf vdpau: Check return values of the bitreader functions 2010-10-03 15:55:22 +02:00
Edward Hervey
849d3ec371 vdpau: Use the new XOverlay API
Fixes #630254
2010-09-21 16:31:46 +02:00
Sebastian Dröge
51e083fe8d dshowdecwrapper: Don't use GST_FLOW_IS_FATAL()
And don't error out on UNEXPECTED
2010-09-21 12:29:06 +02:00
Carl-Anton Ingmarsson
b2ce3aab96 vdpauvideopostprocess: set new framerate on output caps instead of input caps
It's not allowed to change the caps provided by the setcaps function.

https://bugzilla.gnome.org/show_bug.cgi?id=628326
2010-09-06 12:25:48 +02:00
Carl-Anton Ingmarsson
709a65cddf vdpauh264dec: parse "pixel-aspect-ratio" from stream 2010-09-05 13:52:40 +02:00
Carl-Anton Ingmarsson
5c03466309 vdpau: remove non working unused code from GstBaseVideoDecoder 2010-09-05 13:52:40 +02:00
Carl-Anton Ingmarsson
f2fb66d376 vdpau: GstBaseVideoDecoder set default par to 1/1 2010-09-05 13:52:40 +02:00
Carl-Anton Ingmarsson
885845a678 vdpau: remove gst_base_video_decoder_get_current_frame
we now pass the current frame to GstBaseVideoDecoder::parse_data

also fixup some errors in vdpaumpeg4dec so that it now gives correct output
2010-09-05 13:52:40 +02:00
Carl-Anton Ingmarsson
08e6a65f08 vdpau: rework GstBaseVideoDecoder timestamping
timestamps are now chosen in the following order:
	upstream -> parsed by decoder -> calculated from timestamp offset

we also check the timestamps supplied from upstream/decoder to see if they
atleast is increasing.
2010-09-05 13:52:40 +02:00
Carl-Anton Ingmarsson
624c50bac6 vdpau: fix invalid unref 2010-09-05 13:52:40 +02:00