Commit graph

1583 commits

Author SHA1 Message Date
Nicolas Dufresne
0569178ca7 v4l2: Re-add colorimetry field for RGB formats
This time, check if it's an RGB format and sets the transformation
matrix to identity. The rest of the colorimetry information is
meaningfull and shall be kept.

https://bugzilla.gnome.org/show_bug.cgi?id=759624
2016-01-22 14:17:24 -05:00
Wim Taymans
710ab7f083 v4l2: fix sRGB colorspace definition
V4l2 can also use the sRGB colorspace for YUV formats and thus needs a
default matrix.
2016-01-22 10:05:01 +01:00
Wim Taymans
681bab62e5 v4l2: Add adobe colorspace support
Use the new primaries and transfer function for Adobe RGB.
Explicitly list the colorimetry instead of using the default GStreamer
ones. The defaults for BT2020, for example, do not match.
Explicitly set the matrix of SRGB to RGB.
2016-01-21 10:49:44 +01:00
Jan Schmidt
d34910bf30 v4l2: Don't free props structure twice.
gst_v4l2_device_provider_probe_device() frees the passed props
structure, don't free it again in the caller.
2016-01-20 18:23:37 +11:00
Nicolas Dufresne
496137854b v4l2object: Cleanup uneeded return statement 2016-01-19 15:17:50 -05:00
Nicolas Dufresne
fd32440609 v4l2object: Don't set colorimetry for non YUV formats
Setting colormetry in caps for RGB have no meaning, but worst it
confuses the converters downstream.

https://bugzilla.gnome.org/show_bug.cgi?id=759624
2016-01-19 15:17:50 -05:00
Nirbheek Chauhan
2706a35ebe osxaudio: break as soon as the device is found
No need to loop further if there's no side-effects for it
2016-01-14 22:32:09 +00:00
Nirbheek Chauhan
6b760ead2a osxaudio: Fix error handling when selecting/opening devices
Post an element error when the CoreAudio device cannot be selected or opened.
Also ensure that we post a GST_ERROR with more detail.
2016-01-14 22:32:09 +00:00
Pablo Anton
927ba9332f v4l2-*: Configuring output pool correctly for using drivers min_buffer if present.
Signed-off-by: Pablo Anton <pablo.anton@vodalys-labs.com>

https://bugzilla.gnome.org/show_bug.cgi?id=755736
2016-01-04 16:32:28 -05:00
Wim Taymans
5fe9a59842 v4l2deviceprovider: add properties to the device
Add properties to the device with exactly the same keys and sematics
as what pulseaudio uses as property keys.

Also handle the case when a device is probed manually and not through gudev.

https://bugzilla.gnome.org//show_bug.cgi?id=759780
2015-12-29 11:25:36 +00:00
Thomas Roos
51f94288ce directsoundsink: Fix sleep for buffer-time lower than 200000
https://bugzilla.gnome.org/show_bug.cgi?id=748680
2015-12-21 12:44:55 +01:00
Nicolas Dufresne
2538fee2fd v4l2object: Update formats table
This change add all the new RGB based format. Those format removes the
ambiguity with the ALPHA channel. Some other missing multiplanar format
has been added with some additional cleanup.
2015-12-18 15:58:01 -05:00
Thomas Roos
adb5efaf8a directsoundsink: Check device property and fail if device can't be found
Don't use default if a specific device is set but it can't be found.

https://bugzilla.gnome.org/show_bug.cgi?id=759452
2015-12-14 15:48:40 +01:00
Thomas Roos
fb5a5c069c directsoundsink: Fix handling of the mute property
- set mute value at startup
- correct set and get mute functions

https://bugzilla.gnome.org/show_bug.cgi?id=755106
2015-12-14 14:37:00 +01:00
Thomas Roos
4d72fd9884 directsoundsink: Check the return value of GetStatus() too to decide if there was an error
If GetStatus() fails, the status itself won't be very meaningful but we also
have to look at its return value. This fixes blocking pipelines when removing
sound devices or during other errors, where we wouldn't notice the error and
then wait forever.

https://bugzilla.gnome.org/show_bug.cgi?id=734098
2015-12-11 12:42:04 +02:00
Wim Taymans
b208ae72ee v4l2bufferpool: don't block when resurecting a buffer
When we are resurecting a buffer, don't block. instead let us copy a
buffer.
2015-12-01 18:22:11 +01:00
Philipp Zabel
c75a69d415 v4l2: videodec: choose format from caps
https://bugzilla.gnome.org/show_bug.cgi?id=733827
2015-11-25 14:32:28 -05:00
Philipp Zabel
cf29e6c0b7 v4l2: add gst_v4l2_object_probe_caps
Add a variant of gst_v4l2_object_get_caps that bypasses the probed_caps cache.

https://bugzilla.gnome.org/show_bug.cgi?id=733827
2015-11-25 14:32:28 -05:00
Nicolas Dufresne
1435974c2d v4l2-probe: Skip devices without supported formats 2015-11-25 14:31:29 -05:00
Nicolas Dufresne
3cdc700e3e v4l2: Track /dev/video* to triggered required probe
If something in /dev/video* get added, removed or replaced, we need to
probe the devices again in order to ensure the dynamic devices are up to
date.

https://bugzilla.gnome.org/show_bug.cgi?id=758085
2015-11-25 14:31:29 -05:00
Nicolas Dufresne
4ecd25d267 v4l2: Fix capture/output-io-mode properties
There was some miss-match in the implementation. This makes it
concistent, though functionally it worked, except the video decoder
output-io-mode getter.
2015-11-19 15:35:36 -05:00
Reynaldo H. Verdejo Pinochet
8ef6ecc244 v4l2/object: remove unnecessary NULL check before g_free() 2015-11-15 01:43:08 -08:00
Reynaldo H. Verdejo Pinochet
492e917a6d osssrc: remove unnecessary NULL check before g_free() 2015-11-15 01:43:08 -08:00
Reynaldo H. Verdejo Pinochet
e882989201 sunaudiosrc: remove unnecessary NULL checks before g_free() 2015-11-15 01:43:08 -08:00
Aurélien Zanelli
aaab7b6ab1 v4l2object: add support of NV16, NV61 and NV24 formats
Mapped respectively to V4L2_PIX_FMT_NV16/V4L2_PIX_FMT_NV16M,
V4L2_PIX_FMT_NV61,V4L2_PIX_FMT_NV61M and V4L2_PIX_FMT_NV24 v4l2 formats.

https://bugzilla.gnome.org/show_bug.cgi?id=758058
2015-11-13 10:29:01 -05:00
Arun Raghavan
7b17615da8 v4l2: Set O_CLOEXEC on the device fd
This is needed to make sure that child processes don't inherit the video
device fd which can cause problems with some drivers.
2015-11-03 22:02:38 +05:30
Nirbheek Chauhan
5f720cc3cb v4l2: fix double-unref in the v4l2 device provider 2015-10-28 19:09:28 +00:00
Jan Schmidt
040467d118 ximagesrc: Gather and coalesce all damaged areas before retrieving.
These days the xserver seems to give us the same damage regions
over and over for entire windows, and we retrieve them multiple
times, which gives time for more damage to appear. Instead, just
quickly gather all damaged areas into a region list and copy
out once.
2015-10-02 14:17:48 +10:00
Jean-Michel Hautbois
dd45e45e30 v4l2transform: fix pad closing
Signed-off-by: Jean-Michel Hautbois <jean-michel.hautbois@veo-labs.com>

https://bugzilla.gnome.org/show_bug.cgi?id=753875
2015-08-20 13:44:46 -07:00
Dustin Spicuzza
5c680333ba directsoundsink: allow specifying audio playback device
https://bugzilla.gnome.org/show_bug.cgi?id=753670
2015-08-17 13:57:56 +02:00
Dimitrios Katsaros
a55b9060f8 v4l2: Allow framerate to be large then 100pfs
This limit was arbitrary. We still fixate near 100pfs for compatibility.

https://bugzilla.gnome.org/show_bug.cgi?id=752825
2015-07-25 10:40:51 -04:00
Hyunjun Ko
afcd462918 v4l2bufferpool: set GST_BUFFER_COPY_FLAGS to copy flags also
https://bugzilla.gnome.org/show_bug.cgi?id=752618
2015-07-23 10:19:46 -04:00
Song Bing
c5950cd04a v4l2bufferpool: Set timestamp when queue buffer.
Should set timestamp when queue buffer.

https://bugzilla.gnome.org/show_bug.cgi?id=752618
2015-07-20 16:49:41 -04:00
Ilya Konstantinov
e9fbdc3682 osxaudiosrc: no resampling on OS X
Unlike Remote IO, AUHAL doesn't have built-in resampling
for sources -- confirmed by Core Audio engineer Doug Wyatt:
http://lists.apple.com/archives/coreaudio-api/2006/Sep/msg00088.html

https://bugzilla.gnome.org/show_bug.cgi?id=743758
2015-07-14 17:49:50 +05:30
Ilya Konstantinov
f33954ae1d osxaudiosrc: avoid get_channel_layout
This only produces a warning and serves no purpose.

https://bugzilla.gnome.org/show_bug.cgi?id=743758
2015-07-14 17:49:50 +05:30
Arun Raghavan
8f0f976375 osxaudio: Avoid making a duplicate structure in caps for mono/stereo case
For 1ch or 2ch devices, we just need to set the caps to allow both
options since CoreAudio will up/downmix appropriately.

Also fixes the condition for the 2ch case to be exact, rather than at
least 2 channels since the downmix will not take place in the >stereo
case.
2015-07-14 17:49:50 +05:30
Arun Raghavan
691ecebe22 osxaudio: Don't set the format on an initialized AudioUnit
We need to initialize the AudioUnit early to be able to probe the
underlying device, but according to the AudioUnitInitialize() and
AudioUnitUninitialize() documentation, format changes should be done
while the AudioUnit is uninitialized. So we explicitly uninitialize the
AudioUnit during a format change and reinitialize it when we're done.
2015-07-14 17:49:50 +05:30
Arun Raghavan
22f6d62796 osxaudio: Minor spelling fix (unitialize -> uninitialize) 2015-07-14 17:49:50 +05:30
Ilya Konstantinov
f107f7306b osxaudio: Fix lockup in _audio_unit_property_listener
_audio_unit_property_listener is called either from a Core Audio thread
or as a result of a Core Audio API (e.g. AudioUnitInitialize)
from our own thread. In the latter case, osxbuf can be already locked
(GStreamer's mutex is not recursive).

We introduce the flag cached_caps_valid and use it instead of nullifying
cached_caps when we cannot lock on osxbuf.

https://bugzilla.gnome.org/show_bug.cgi?id=743758
2015-07-14 17:49:50 +05:30
Ilya Konstantinov
a8b2666aa7 osxaudio: Invalidate cached caps on format change
Listen for changes in hardware stream format and channel layout, and
invalidate cached caps (since they contain the preferred caps).

https://bugzilla.gnome.org/show_bug.cgi?id=743758
2015-07-14 17:49:50 +05:30
Ilya Konstantinov
0e5d698c6f osxaudio: Overhaul of probing caps
- Probing caps is unified between source and sink
- Hardware stream format is now reported as preferred capabilities
  (dynamically updated when hardware configuration changes)
- Get hardware channel layout from Remote IO just like from HAL
- More comprehensive mapping between AudioChannelLabel and
  GstAudioChannelPosition
- Support for unpositioned channel layouts
- Announce stereo-mono upmixing/downmixing in caps

https://bugzilla.gnome.org/show_bug.cgi?id=743758
2015-07-14 17:49:50 +05:30
Ilya Konstantinov
8a8884e150 osxaudio: AudioUnitInitialize on open
Call AudioUnitInitialize upon open. Otherwise, we cannot get
(hardware) stream format nor channel layout from the outer scope.
2015-07-14 17:49:50 +05:30
Hyunjun Ko
c5c7e7e084 ximagesrc: add meta transform function
ximage metadata can't be transformed or copied, but provide an empty
transformation function instead of NULL to allow unconditional calling
of metas' transform functions.

https://bugzilla.gnome.org/show_bug.cgi?id=751778
2015-07-06 14:49:50 +03:00
Luis de Bethencourt
911f7b38b9 v4l2transform: fix memory leak
tmp needs to be freed before going out of scope in 'done'.

CID #1308954
2015-07-02 14:37:41 +01:00
Luis de Bethencourt
600942788d v4l2: document fallthrough cases
Pacify coverity and document fallthrough cases in switch statements.

CID #1308948, #1308947, #1308946
2015-06-29 16:05:48 +01:00
Ilya Konstantinov
f676079e95 osxaudio: fix latency property query on RemoteIO
AudioUnitGetProperty would fail with kParamErr (-50) every time,
simply because size wasn't initialized.

Now it returns zero latency, but at least it doesn't fail.

https://bugzilla.gnome.org/show_bug.cgi?id=750868
2015-06-12 22:43:59 +02:00
Philipp Zabel
95bab88225 gstv4l2bufferpool: handle -EPIPE from DQBUF to signal EOS
The V4L2 decoder signals EOS by returning -EPIPE from DQBUF after the
last buffer.

https://bugzilla.gnome.org/show_bug.cgi?id=743338
2015-06-09 21:56:40 -04:00
Enrico Jorns
3067a60d8e v4l2: Allow scaling in the v4l2*convert element
This is inspired of videoscale and videoconvert elements.

https://bugzilla.gnome.org/show_bug.cgi?id=742917
2015-06-09 18:50:25 -04:00
Nicolas Dufresne
0f81b2e99c v4l2: Also set colorimetry on output devices
This completes the code that set the colorimetry on output
device.
2015-06-08 19:14:41 -04:00
Nicolas Dufresne
87a4884acd v4l2: Add missing SMTP240M matrix
This is missing in the doc, but was in the header.
2015-06-08 19:14:41 -04:00