Commit graph

878 commits

Author SHA1 Message Date
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
Carl-Anton Ingmarsson
629b6ff099 vdpaumpeg4dec: fix typo in default_non_intra_quant_matrix 2010-08-09 00:36:01 +02:00
Carl-Anton Ingmarsson
8612a936ec vdpau: add mpeg4 part2 decoder 2010-08-09 00:36:01 +02:00
Tim-Philipp Müller
e2571b9f46 dvbsrc: align actual default values for properties with defaults in param spec
https://bugzilla.gnome.org/show_bug.cgi?id=621404
2010-08-06 11:28:11 +01:00
Carl-Anton Ingmarsson
b6f22c519d vdpau: fix destruction of GstVdpDevice when it failed to open
only close display in finalize and check if vdp_decoder_destroy is available
before we use it
2010-08-06 12:14:30 +02:00
Carl-Anton Ingmarsson
8996b80d62 vdpausink: use separate mutex for device locking
we can't use GST_OBJECT_LOCK since that cause problems when we try to post
errors, due to gst_element_post_message also taking the GST_OBJECT_LOCK
2010-08-06 12:14:30 +02:00
Andoni Morales Alastruey
c2c32fe773 dshowvideosink: close our own window when changing the window id
If we created the window, it needs to be closed after setting a new
window id.

https://bugzilla.gnome.org/show_bug.cgi?id=574290
2010-08-06 10:21:48 +01:00
Raimo Jarvi
7ab007bafe dshowvideosink: allow changing window ID whilst in PLAYING state
https://bugzilla.gnome.org/show_bug.cgi?id=574290
2010-08-06 10:20:19 +01:00
Carl-Anton Ingmarsson
8f47c060d7 vdpau: set back plugin ranks to GST_RANK_NONE
the previous change was not meant to slip in
2010-08-02 18:33:46 +02:00
Carl-Anton Ingmarsson
008a049b20 vdpau: slightly fix GstBaseVideoDecoder timestamping
clear timestamps on flush and properly calculate the frame's end offset
2010-08-02 18:25:43 +02:00
Carl-Anton Ingmarsson
a07cee756a vdpau: init debug category in gst_vdp_video_buffer_get_type 2010-08-02 18:25:43 +02:00
Carl-Anton Ingmarsson
b37869c315 vdpau: add error reporting to device creation 2010-07-30 22:27:49 +02:00
Carl-Anton Ingmarsson
57e05fdc76 vdpau: fix small typo in GstBaseVideoDecoder 2010-07-30 16:54:40 +02:00
Carl-Anton Ingmarsson
2282e9f5df vdpau: use gst_vdp_yuv_to_video_caps in GstVdpVideoSrcPad to transform set caps
this way we'll keep other all other fields in the caps which we didn't take in
account when we manually created the "video/x-vdpau-video" caps
2010-07-30 14:47:43 +02:00
Carl-Anton Ingmarsson
472cdc4c61 vdpau: rename gst_vdp_video_buffer_parse_yuv_caps and move it to gstvdputils.h 2010-07-30 14:44:09 +02:00
Carl-Anton Ingmarsson
726290de21 vdpau: GstVdpOutputSrcPad use gst_pad_alloc when outputting video/x-raw-rgb
we implement "acceptcaps" to prevent us from getting a buffer with different
width and height from what we requested.
2010-07-30 14:07:22 +02:00
Carl-Anton Ingmarsson
ac8dfbea82 vdpau: properly remove "chroma-type" field from transformed caps 2010-07-30 11:33:13 +02:00
Carl-Anton Ingmarsson
aa193a7b43 vdpauvideopostprocess: use GstVdp[Video|Output]BufferPool to cache our buffers
This way we'll reuse the GstVdp[Video|Output]Buffers if they're of the same
size and chroma-type/rgba-format.

Also remove gst_vdp_output_src_pad_negotiate and set a "setcaps" function on
GstVdpOutputSrcPad instead, leaving negotiation to GstVdpVideoPostProcess.
2010-07-30 11:33:13 +02:00
Carl-Anton Ingmarsson
57175ece9e vdpausink: use GstVdpOutputBufferPool to alloc our buffers
This way we'll reuse our GstVdpOutputBuffers if they're of the same size and
rgba-format
2010-07-30 11:33:13 +02:00
Carl-Anton Ingmarsson
c0e1fba089 vdpau: use GstVdpVideoBufferPool in GstVdpVideoSrcPad
We also don't pad_alloc our GstVdpVideoBuffers anymore since we don't support
downstream negotation anyway.
2010-07-30 11:33:13 +02:00
Carl-Anton Ingmarsson
2d9132c590 vdpau: add GstVdpOutputBufferPool
GstVdpVideoOutputPool is a subclass of GstVdpBufferPool that caches
GstVdpOutputBuffers
2010-07-30 11:33:13 +02:00
Carl-Anton Ingmarsson
d82c4acd8a vdpau: add GstVdpVideoBufferPool
GstVdpVideoBufferPool is a subclass of GstVdpBuffer that caches
GstVdpVideoBuffers
2010-07-30 11:33:13 +02:00