Commit graph

1556 commits

Author SHA1 Message Date
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
Nicolas Dufresne
b5d66d68ce v4l2object: Fully implement colorimetry support
This fixes wrong mapping for sRGB as in GStreamer sRGB correctly
apply to RGB formats, while in V4L2 it's an alias for sYCC. Also
add support for the new quantization (range), ycbcr_encoding (matrix)
and xfer_func (transfer) enumeration.
2015-06-08 17:56:48 -04:00
Nicolas Dufresne
70e98a1a68 v4l2: Update kernel headers to latest from media tree
This is the latest from media tree. This should enable more development
of the v4l2 elements. This includes new flags requires to fix draining
path in decoder, colorimetry and much more.
2015-06-08 17:56:48 -04:00
Nicolas Dufresne
0196fdb5ec v4l2: Don't warn when optional CID are not implement
gst_v4l2_get_attributre() shall only be used when the CID is expected
to be supported. Otherwise, we get unwanted warning posted to the bus.
2015-06-05 15:34:12 -04:00
Wim Taymans
8c116cfcd8 v4l2: don't add the same interlace mode twice
Some drivers modify the interlace mode to progressive, no matter what
input you give them, make sure that we don't add the same interlace mode
twice.
2015-04-22 18:05:24 +02:00
Luis de Bethencourt
dad26043c3 v4l2: cast unused return to void
Quell unchecked return value defect by casting the return value to void and
making it explicit it is going to be ignored.

CID #206031
2015-04-21 15:21:37 +01:00
Ilya Konstantinov
36decd3b39 osxaudio: fix spelling in debug message
https://bugzilla.gnome.org//show_bug.cgi?id=747936
2015-04-17 00:36:04 +01:00
Peter Seiderer
f160625ea6 v4l2src: device sequence/offset correction in case of renegotiation
The v4l2 device restarts the sequence counter in case of streamoff/streamon,
the GST offset values are supposed to increment strictly monotonic, so
adjust the sequence counter/offset values in case of caps
renegotiation.

https://bugzilla.gnome.org/show_bug.cgi?id=745441
2015-04-02 17:40:20 -04:00
Peter Seiderer
866d97fa2c v4l2src: add frame loss detection
In case of v4l2 driver filled offset/sequence values add frame
loss detection (and write a warning message).

Move offset meta data setting and frame loss checking after the
timestamp adjustment code to get proper timestamps for the
warning message.

https://bugzilla.gnome.org/show_bug.cgi?id=745441
2015-04-02 17:40:19 -04:00
Peter Seiderer
f16fe891fb v4l2: use v4l2 capture device sequence counter
Use the v4l2 capture device sequence counter for
setting the GstBuffer offset/offset_end values.

https://bugzilla.gnome.org/show_bug.cgi?id=745441
2015-04-02 17:40:19 -04:00
Tobias Modschiedler
8390288a6e v4l2: Ask the driver about its requirements for min_buffers before initiating buffer pool.
If propose_allocation() had not been called yet, it was possible that the driver was not asked at all.
In buffer pool: Consider minimum number of buffers requested by driver when setting config.

https://bugzilla.gnome.org/show_bug.cgi?id=746834
2015-04-02 17:29:19 -04:00
Julien Isorce
d63c163335 osxvideosink: check for deprecated constants prior to OSX 10.10
cocoawindow.m:339:5: error: 'NSOpenGLPFAWindow'
is deprecated: first deprecated in OS X 10.9

cocoawindow.m:576:7: error: 'NSOpenGLPFAFullScreen'
is deprecated: first deprecated in OS X 10.6

cocoawindow.m:605:24: error: 'setFullScreen'
is deprecated: first deprecated in OS X 10.7
2015-03-24 23:16:26 +00:00
Ilya Konstantinov
6af516b21f osxaudio: Fix string format warning on 32-bit
UInt32 (Darwin, not C99's uint32_t) is 'unsigned long' on 32-bit
platforms.
2015-03-23 19:48:43 +05:30
Thiago Santos
0a945e7099 v4l2src: delay renegotiation until it is likely buffers were reclaimed
Allow renegotiation to happen when buffers have returned after an allocation
query. As the allocation query is serialized, all buffers from the pool
should have returned and we can stop it to create a new one for the
new format

https://bugzilla.gnome.org/show_bug.cgi?id=682770
2015-03-13 18:48:03 +00:00
Thiago Santos
6cfa6c0da8 v4l2object: add gst_v4l2_object_try_format
Similar to set_format but it uses TRY_FMT instead of S_FMT

https://bugzilla.gnome.org/show_bug.cgi?id=682770
2015-03-13 18:47:55 +00:00
Jan Schmidt
c809bcd394 Remove a couple of superfluous trailing semi-colons 2015-03-12 01:37:08 +11:00
Tim-Philipp Müller
c4fa54da17 Fix double semicolons 2015-03-10 09:31:20 +00:00
Ilya Konstantinov
b528c527b7 osxaudio: stream format is an SPDIF-only field 2015-03-10 09:14:57 +05:30
Ilya Konstantinov
7b365042f0 osxaudio: fix spaces 2015-03-10 09:14:57 +05:30
Ilya Konstantinov
8f62f50a98 osxaudio: add type check macro 2015-03-10 09:14:57 +05:30
Ilya Konstantinov
d450b1cac1 osxaudio: rename gst_core_audio_set_channels_layout()
to gst_core_audio_get_channel_layout().
2015-03-10 09:14:57 +05:30
Ilya Konstantinov
4637b3eb82 osxaudio: remove unused finalize 2015-03-10 09:14:57 +05:30
Nicolas Dufresne
eeb4d2e8b1 v4l2bufferpool: Don't update buffer for OUTPUT
For output device, we should not update the buffer with flags and
timestamp when we dequeue. The information in the v4l2_buffer is not
meaningful and it breaks the case where the buffer is rendered at
multiple places.

https://bugzilla.gnome.org/show_bug.cgi?id=745438
2015-03-08 21:15:53 +00:00
Thiago Santos
c194f2de12 directsoundsink: fix modulo math with ringbuffer parameters
To get a multiple of bpf use a subtraction and not an addition

https://bugzilla.gnome.org/show_bug.cgi?id=745684
2015-03-06 11:27:41 -03:00
Arun Raghavan
995ba701b7 osxaudiosrc: Allow caps renegotiation
The ringbuffer does allow renegotiation, so we do not have to report
fixed caps once it is acquired (based on a similar patch for the sink
side by Ilya Konstantinov <ilya.konstantinov@gmail.com>).
2015-03-03 23:26:58 +05:30
Ilya Konstantinov
fd25ef137e osxaudiosink: Allow renegotiating caps
Once osxaudiosink's device is open, it fixates on the initial caps and
refuses to accept new caps. This is erroneous since the Audio Unit is
can accept a new ASBD, and GstAudioRingBuffer supports reconfiguration
as well.

https://bugzilla.gnome.org/show_bug.cgi?id=743925
2015-03-03 23:26:58 +05:30
Gwenole Beauchesne
8cd40e77b7 v4l2allocator: fix fd leak in DMABUF import mode.
Ensure gst_v4l2_buffer_pool_release_buffer() releases the associated
GstV4l2MemoryGroup. In particular, this allows for closing the DMABUF
handles prior to instantiating new ones.

https://bugzilla.gnome.org/show_bug.cgi?id=745443
2015-03-02 15:10:51 -05:00
Nicolas Dufresne
8e75acc7b7 v4l2bufferpool: Add missing break
This is cosmetic change.
2015-03-01 14:03:04 -05:00