summaryrefslogtreecommitdiff
path: root/sys
AgeCommit message (Collapse)AuthorFilesLines
2015-04-02v4l2src: device sequence/offset correction in case of renegotiationPeter Seiderer2-2/+11
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-02v4l2src: add frame loss detectionPeter Seiderer1-7/+23
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-02v4l2: use v4l2 capture device sequence counterPeter Seiderer2-2/+9
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-02v4l2: Ask the driver about its requirements for min_buffers before ↵Tobias Modschiedler2-22/+36
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-03-24osxvideosink: check for deprecated constants prior to OSX 10.10Julien Isorce1-0/+6
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-23osxaudio: Fix string format warning on 32-bitIlya Konstantinov1-1/+1
UInt32 (Darwin, not C99's uint32_t) is 'unsigned long' on 32-bit platforms.
2015-03-13v4l2src: delay renegotiation until it is likely buffers were reclaimedThiago Santos2-21/+55
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-13v4l2object: add gst_v4l2_object_try_formatThiago Santos2-24/+63
Similar to set_format but it uses TRY_FMT instead of S_FMT https://bugzilla.gnome.org/show_bug.cgi?id=682770
2015-03-12Remove a couple of superfluous trailing semi-colonsJan Schmidt1-2/+2
2015-03-10Fix double semicolonsTim-Philipp Müller2-2/+2
2015-03-10osxaudio: stream format is an SPDIF-only fieldIlya Konstantinov1-2/+1
2015-03-10osxaudio: fix spacesIlya Konstantinov1-1/+1
2015-03-10osxaudio: add type check macroIlya Konstantinov1-0/+2
2015-03-10osxaudio: rename gst_core_audio_set_channels_layout()Ilya Konstantinov3-3/+3
to gst_core_audio_get_channel_layout().
2015-03-10osxaudio: remove unused finalizeIlya Konstantinov1-8/+0
2015-03-08v4l2bufferpool: Don't update buffer for OUTPUTNicolas Dufresne1-0/+5
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-06directsoundsink: fix modulo math with ringbuffer parametersThiago Santos1-2/+2
To get a multiple of bpf use a subtraction and not an addition https://bugzilla.gnome.org/show_bug.cgi?id=745684
2015-03-03osxaudiosrc: Allow caps renegotiationArun Raghavan1-7/+4
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-03osxaudiosink: Allow renegotiating capsIlya Konstantinov1-8/+6
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-02v4l2allocator: fix fd leak in DMABUF import mode.Gwenole Beauchesne1-1/+3
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-01v4l2bufferpool: Add missing breakNicolas Dufresne1-0/+1
This is cosmetic change.
2015-03-01v4l2: Workaround driver not setting field correctlyNicolas Dufresne2-0/+31
As it's very common, handle driver not setting field in buffers by using the field value from the format. This workaround a long time bug in UVC driver. For even buggier driver, we simply assume progressive as before. We also only warn once, to avoid spamming.
2015-02-26v4l2: query crop configuration after each call of S_CROPAurélien Zanelli2-0/+10
S_CROP ioctl is write-only and the device can adjust crop rectangle so we query back the crop configuration after each S_CROP to know what has been done. https://bugzilla.gnome.org/show_bug.cgi?id=736133
2015-02-25v4l2bufferpool: Check corruption flag on the right bufferAleix Conchillo Flaqué1-1/+4
We where checking the buffer we are copying to instead of the buffer we are copying from. https://bugzilla.gnome.org/show_bug.cgi?id=740040
2015-02-25v4l2object: set colorspace in caps for capture devicesAurélien Zanelli1-0/+68
This information is set by the driver for a capture device, and so could be forwarded to pipeline by setting the colorimetry in caps. https://bugzilla.gnome.org/show_bug.cgi?id=743186
2015-02-25v4l2bufferpool: fix import_userptr() in single-planar API when n_planes > 1Aurélien Zanelli4-19/+60
In the V4L2 single-planar API, when format is semi-planar/planar, drivers expect the planes to be contiguous in memory. So this commit change the way we handle semi-planar/planar format (n_planes > 1) when we use the single-planar API (group->n_mem == 1). To check that planes are contiguous and have expected size, ie: no padding. We test the fact that plane 'i' start address + plane 'i' expected size equals to plane 'i + 1' start address. If not, we return in error. Math are done in bufferpool rather than in allocator because the former is aware of video info. https://bugzilla.gnome.org/show_bug.cgi?id=738013
2015-02-25v4l2allocator: let bufferpool calculate image size when importing userptrAurélien Zanelli3-17/+33
Offset are relative to the buffer and there is no guarantee substracting them will give us the plane size. So we let bufferpool make the math as it is more aware of video info than allocator and pass a size array to allocator import function. Pointed out by Nicolas Dufresne <nicolas.dufresne@collabora.com> https://bugzilla.gnome.org/show_bug.cgi?id=738013
2015-02-25v4l2object: recognize and distinguish all bayer arrangementsPhilippe De Muyter1-1/+14
Up to now, v4l2src recognized only "bggr" amongst the bayer arrangements. Recognize now also the "rggb", "gbrg" and "grbg" arrangements. https://bugzilla.gnome.org/show_bug.cgi?id=742363
2015-02-25v4l2bufferpool: set v4l2_buffer.field when queuing buffer in an output deviceAurélien Zanelli1-0/+23
According to the current specification, application must set this field for an output device. https://bugzilla.gnome.org/show_bug.cgi?id=743013
2015-02-24osxaudiosrc: iOS resampling causes stutteringIlya Konstantinov5-25/+40
Fixes stuttering audio when iOS AU is resampling. To make AU resample, one has to request a rate that differs from AVAudioSession's sampleRate. The resampling itself is not the culprit, but rather our API misuse. AudioUnitRender modifies the mDataByteSize members with the actual read bytes count. Therefore, they must be reinitialized before each AudioUnitRender. (The buffers themselves can be preallocated.) The "stutter" was caused by one AudioUnitRender making the buffer too small for other AudioUnitRender invocations, making them fail with -50 (paramErr). By way of luck, when AU didn't resample, all AudioUnitRender invocations read the same number of bytes. (This patch addresses some non-interleaved audio concerns, but at this moment the elements do not support non-interleaved audio and non-interleaved is untested.) https://bugzilla.gnome.org/show_bug.cgi?id=744922
2015-02-23ximagesrc: remove pointless g_return_val_if_fail()Tim-Philipp Müller1-2/+0
ximage won't ever be NULL here because the dispose function is called via ximage->dispose().
2015-02-19v4l2: Enable copy when no known allocation paramsNicolas Dufresne3-7/+26
When there is no allocation parameters in the query, enable copy threshold. When this threshold is reached, the buffer pool will start copying when the pool reaches a critical level. If the driver supports CREATE_BUFS, this will be used instead.
2015-02-19v4l2bufferpool: Update allocator flagsNicolas Dufresne1-0/+4
When we hit emulated formats, we disable CREATE_BUFS since libv4l2 cope very badly with it. Also clear the allocator flags so we will never try to allocate more buffers. This fixes failure when the copy threshold is reached as we where calling CREATE_BUFS, which lead to libv4l2 instability.
2015-02-19v4l2bufferpool: Use specific debug categoryNicolas Dufresne1-2/+5
The pool has grown enough that it is now handy to seperate v4l2object trace from v4l2bufferpool trace.
2015-02-18Revert "v4l2: fraction is reversed"Luis de Bethencourt1-5/+5
This reverts commit b91fe36644b15ae070d72b9e8a9c7087e82aef12.
2015-02-18v4l2: fraction is reversedLuis de Bethencourt1-5/+5
In the fraction 1 / 2. 1 is the numerator and 2 is the denominator. The arguments of fraction gst_value_set_fractions() are value, numerator and denominator. Also, gst_value_set_fraction() fails if denominator is 0 for obvious reasons.
2015-02-18v4l2pool: Deactivate other poolNicolas Dufresne1-0/+1
When importing buffers from a downstream pool, we need to deactivate that pool to ensure it will be usable again later. Relying on the refcount to reach zero does not work, since elements like xvimagesink keeps a reference on their proposed pool.
2015-02-15v4l2allocator: Fix freeing of shared memoryNicolas Dufresne1-21/+12
When memory (that has been shared using gst_memory_share()) are freed, the memory (or the DMABUF FD) should not bee freed. These memories have a parent. This also removes the extra _v4l2mem_free function and avoid calling close twice on the DMABUF FD. https://bugzilla.gnome.org/show_bug.cgi?id=744573
2015-01-22v4l2object: reuse caps framerate if not overwritten by v4l2 devicePeter Seiderer1-6/+14
Enables duration setting in v4l2src. https://bugzilla.gnome.org/show_bug.cgi?id=740403
2015-01-13v4l2videodec: Proxy getcapsNicolas Dufresne1-34/+9
Replace the sink_query with new getcaps() virtual and use the proxy helper with the probed caps. This allow upstream element taking decision base on what is supported downstream.
2015-01-10osxvideosink: Disable hack for NSApp iteration with a special #defineSebastian Dröge4-3/+22
The hack causes deadlocks and other interesting problems and it really can only be fixed properly inside GLib. We will include a patch for GLib in our builds for now that handles this, and hopefully at some point GLib will also merge a proper solution. A proper solution would first require to refactor the polling in GMainContext to only provide a single fd, e.g. via epoll/kqueue or a thread like the one added by our patch. Then this single fd could be retrieved from the GMainContext and directly integrated into a NSRunLoop. https://bugzilla.gnome.org/show_bug.cgi?id=741450 https://bugzilla.gnome.org/show_bug.cgi?id=704374
2015-01-09v4l2videodec: Prevent renegotiationNicolas Dufresne1-0/+7
Renegotiation isn't supported, simply prevent it the way we do in v4l2src.
2015-01-09v4l2videodec: Don't unlock the stream lock twiceNicolas Dufresne1-1/+1
2015-01-08v4l2allocator: Add protection against driver bugNicolas Dufresne1-0/+7
v4l2loopback driver has a this nasty bug that if the queue is larger then 2 buffers, it returns random index on dqbuf. So far we assumed that the index was always right, which would lead to memory being unref twice, and eventually crash.
2015-01-08v4l2: Don't use allocator size to iterateNicolas Dufresne3-21/+1
As the buffer array is fixed size and small, it's safer to simply use this static size to cleanup the buffers. This is also more consistent with the rest. The associated method is no longer required and can be dropped.
2015-01-08v4l2bufferpool: Don't clean buffer array in disposeNicolas Dufresne1-6/+0
This should already have been done, plus this code is incorrect and may lead to crash. https://bugzilla.gnome.org/show_bug.cgi?id=742074
2015-01-08v4l2bufferpool: Don't ref queued output bufferNicolas Dufresne1-10/+14
This partly revert to the old 1.2 behavior. Instead of keeping a reference to the output buffer queued, we simply release them but don't forward it to GstBufferPool. This way, the buffer pool don't need to be flushed to be stopped. https://bugzilla.gnome.org/show_bug.cgi?id=742074
2015-01-08v4l2bufferpool: Never fail on streamoffNicolas Dufresne1-33/+8
Failing streamoff prevents allocator from being disposed hence lead to device FD leak. There is no known cases where streamoff may fails for which we'd still be streaming. streamoff is known to fail when a device is being unplugged (in which case errno 19/ENODEV is set). https://bugzilla.gnome.org/show_bug.cgi?id=732734
2014-12-22osxaudio: Directly return the ringbuffer's caps if it is acquiredSebastian Dröge2-14/+8
2014-12-22osxaudio: Put all audio formats into the template capsSebastian Dröge2-14/+2
We report the proper caps later from the get_caps() vfunc implementation after probing the selected device.