summaryrefslogtreecommitdiff
path: root/sys
AgeCommit message (Collapse)AuthorFilesLines
2016-12-08v4l2object: Don't set empty interlace-mode listArun Raghavan1-1/+6
If for some reason we fail to probe formats (all try_fmt calls fail, for example), this is not a critical error, but we end up with an empty list of interlace modes. This causes all subsequent negotiation to fail. This patch fixes interlace-mode setting to be skipped if we failed to detect any. https://bugzilla.gnome.org/show_bug.cgi?id=775702
2016-11-24gstv4l2bufferpool: lock flush_stop against regular qbufPhilipp Zabel1-8/+13
These can be called from different threads and both manipulate the pool->buffers array. Lock them properly and let flush_stop move the array contents into a temporary array on the stack to avoid having to call release_buffer under the object lock. https://bugzilla.gnome.org/show_bug.cgi?id=775015
2016-11-24gstv4l2bufferpool: remove critical error message when process is called on ↵Philipp Zabel1-2/+0
an inactive pool If the pool is inactive, it is guaranteed to also be flushing, so the following check will return GST_FLOW_FLUSHING anyway. This can happen if a v4l2src is blocking on DQBUF in create and is sent an EOS event on another thread. In that case the pool is set to flushing/inactive without locking, the v4l2src is unblocked, and may call pool_process with a valid buffer on the already inactive pool. https://bugzilla.gnome.org/show_bug.cgi?id=775014
2016-11-24v4l2src: release buffer if create failsPhilipp Zabel1-0/+1
gst_base_src_get_range does not expect a buffer to be returned in the error case, so we are leaking a reference here if create fails. https://bugzilla.gnome.org/show_bug.cgi?id=775014
2016-11-01v4l2: Warn, don't assert if v4l gives us a buffer with a too large sizeWilliam Manley1-1/+10
I've seen problems where the `bytesused` field of `v4l2_buffer` would be a silly number causing the later call to: gst_memory_resize (group->mem[i], 0, group->planes[i].bytesused); to result in this error to be printed: (pulsevideo:11): GStreamer-CRITICAL **: gst_memory_resize: assertion 'size + mem->offset + offset <= mem->maxsize' failed besides causing who-knows what other problems. We make the assumption that this buffer has still been dequeued correctly so just clamp to a valid size so downstream elements won't end up in undefined behaviour. The invalid `v4l2_buffer` I saw from my capture device was: buffer = { index = 0, type = 1, bytesused = 534748928, // <- Invalid flags = 8260, // V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC | V4L2_BUF_FLAG_ERROR | V4L2_BUF_FLAG_DONE field = 01330, // <- Invalid timestamp = { tv_sec = 0, tv_usec = 0 }, timecode = { type = 0, flags = 0, frames = 0 '\000', seconds = 0 '\000', minutes = 0 '\000', hours = 0 '\000', userbits = "\000\000\000" }, sequence = 0, memory = 2, m = { offset = 3537219584, userptr = 140706665836544, // Could be nonsense, not sure planes = 0x7ff8d2d5b000, fd = -757747712 }, length = 2764800, reserved2 = 0, reserved = 0 } This is from gdb with my own annotations added. This was with gst-plugins-good 1.8.1, a Magewell XI100DUSB-HDMI video capture device and kernel 3.13 using a dodgy HDMI cable which is great at breaking HDMI capture devices. I'm using io-mode=userptr and have built gst-plugins-good without libv4l. https://bugzilla.gnome.org/show_bug.cgi?id=769765
2016-10-31v4l2object: fix extra-controls leakTobias Schneider1-0/+4
Gst struct v4l2object->extra_controls is created if user sets appropriate option but it is not freed on destruction of v4l2object. https://bugzilla.gnome.org/show_bug.cgi?id=773580
2016-10-21meson: directsound: Add ole32 library dependencyScott D Phillips1-1/+1
https://bugzilla.gnome.org/show_bug.cgi?id=773114
2016-10-20waveformsink: Fix Memory leak using GST_PTR_FORMATGaurav Gupta1-2/+2
https://bugzilla.gnome.org/show_bug.cgi?id=772497
2016-09-07osxaudio: Distribute device provider filesNicolas Dufresne1-10/+10
Those where missing the the dev release tarballs for 1.9.2 which prevented building from tarball on OSX platform
2016-08-31osxvideo: Remove QuickTime references.Jan Schmidt3-3/+1
QuickTime.h is no longer available on OS X 10.12 (Sierra), and both the header and the framework seem unnecessary for compilation - at least as of 10.11 (El Capitan). https://bugzilla.gnome.org/show_bug.cgi?id=770526
2016-08-20Add support for Meson as alternative/parallel build systemNirbheek Chauhan4-0/+105
https://github.com/mesonbuild/meson With contributions from: Tim-Philipp Müller <tim@centricular.com> Jussi Pakkanen <jpakkane@gmail.com> (original port) Highlights of the features provided are: * Faster builds on Linux (~40-50% faster) * The ability to build with MSVC on Windows * Generate Visual Studio project files * Generate XCode project files * Much faster builds on Windows (on-par with Linux) * Seriously fast configure and building on embedded ... and many more. For more details see: http://blog.nirbheek.in/2016/05/gstreamer-and-meson-new-hope.html http://blog.nirbheek.in/2016/07/building-and-developing-gstreamer-using.html Building with Meson should work on both Linux and Windows, but may need a few more tweaks on other operating systems.
2016-08-18v4l2: consistently check #ifdef HAVE_GUDEV instead of #ifNirbheek Chauhan2-6/+6
Both work with autotools but they definitely don't mean the same thing, cause problems with other build systems, and are bad form. Existence should always be checked with #ifdef or #if defined.
2016-08-18directsound: port away from old DirectX APINirbheek Chauhan2-11/+52
D3DX has been deprecated for the last 4 years and latest versions of Windows no longer ship headers for it. This is fine as long as you're building with Cerbero's Wine-based DirectX headers, but sucks if you want to build against the actual Windows SDK. We were just using it to get error strings anyway, so just use the generic error string API.
2016-07-11v4l2provider: Fix device type detectionNicolas Dufresne1-10/+18
The type detection would lead to assertion as it would try to create a device without having found any type for it. It also didn't detect MPLANE devices properly.
2016-07-11v4l2object: Don't assert when used by the monitorNicolas Dufresne1-1/+6
The monitor sets the object->element object as a GstObject. This works for debug traces, but will assert for ELEMENT_ERROR. This was the only case where that could happen. Add a check for that.
2016-07-11v4l2object: Indent very long lineNicolas Dufresne1-1/+4
2016-07-10v4l2: Also copy device_caps in gst_v4l2_dupNicolas Dufresne1-0/+1
This fixes regression where M2M error out saying they have no output format (the V4L2 CAPTURE side). https://bugzilla.gnome.org/show_bug.cgi?id=768195
2016-07-08v4l2: fix multiplanar captureLuis de Bethencourt1-4/+4
After switching to using V4L2_CAP_DEVICE_CAPS we lost support for multiplanar device types. After some research, it looks like vcap.capabilities treated the multiplanar flag of output and capture devices equally, but not the new device_caps. https://bugzilla.gnome.org/show_bug.cgi?id=768195
2016-07-07v4l2: fix v4l2 probe build errorLuis de Bethencourt1-1/+1
A typo in gst_v4l2_probe_and_register() caused a build error when building with --enable-v4l2-probe. Fixing it. gstv4l2.c: In function 'gst_v4l2_probe_and_register': gstv4l2.c:150:25: error: 'struct v4l2_capability' has no member named 'capabilitites' device_caps = vcap.capabilitites;
2016-07-07v4l2src: use gst_caps_intersect_full in negotiate()Reynaldo H. Verdejo Pinochet1-17/+4
Instead of reimplementing the GST_CAPS_INTERSECT_FIRST interection mode. https://bugzilla.gnome.org/show_bug.cgi?id=768195
2016-07-07v4l2: use opened device caps instead of physical device onesReynaldo H. Verdejo Pinochet8-32/+52
The same physical device can export multiple devices. In this case, the capabilities field now contains a union of all caps available from all exported V4L2 devices alongside a V4L2_CAP_DEVICE_CAPS flag that should be used to decide what capabilities to consider. In our case, we need the ones from the exported device we are using. https://bugzilla.gnome.org/show_bug.cgi?id=768195
2016-07-01v4l2: fix potential double-free of error debug stringTim-Philipp Müller1-0/+1
gst_v4l2_clear_error() doesn't work like g_clear_error(), it doesn't NULLify the pointer, so set freed debug string to NULL so it doesn't get freed again if gst_v4l2_clear_error() is called twice on the error. CID 1362901
2016-06-07v4l2videodec: Keep part of the input bufferNicolas Dufresne1-6/+13
Instead of completely getting rid of the input buffer, copy the metadata, the flags and the timestamp into an empty buffer. This way the decoder base class can copy that information again to the output buffer. https://bugzilla.gnome.org/show_bug.cgi?id=758424
2016-06-07v4l2videodec: Coding style fixesNicolas Dufresne1-5/+5
2016-06-07v4l2object: Coding style fixesNicolas Dufresne1-4/+5
2016-06-07v4l2: Add an error return to _try/_set_formatNicolas Dufresne6-25/+46
This way one can easily ignore errors. Previously, error were always posted ont he bus. https://bugzilla.gnome.org/show_bug.cgi?id=766172
2016-06-07v4l2-util: Introduce GstV4l2ErrorNicolas Dufresne2-0/+63
This is to allow returning an error that can easily be sent as message to the application if the element needs it. Using this also allow ignoring errors. https://bugzilla.gnome.org/show_bug.cgi?id=766172
2016-06-07v4l2src: Avoid decide allocation on active poolNicolas Dufresne1-0/+28
v4l2src will renegotiate only if the format have changed. As of now, it's not possible to change the allocationw without resetting the camera. To avoid unwanted side effect, simply keep the old allocation if no renegotiation is taking place. This fixes assertion and possible failures in USERPTR or DMABUF import mode (when using downstream pools). https://bugzilla.gnome.org/show_bug.cgi?id=754042
2016-06-07v4l2videodec: use decoder stop command instead of queueing empty buffersPhilipp Zabel1-8/+21
Only if the decoder stop command fails, keep queueing empty buffers to signal end of stream as before. https://bugzilla.gnome.org/show_bug.cgi?id=733864
2016-06-07v4l2videodec: add gst_v4l2_decoder_cmd helperPeter Seiderer1-0/+31
https://bugzilla.gnome.org/show_bug.cgi?id=733864
2016-06-06v4l2transform: Use looser caps for upstreamNicolas Dufresne1-0/+6
When we fixate for upstream, try to not introduce new fields when not needed. This was imported from videoconvert element.
2016-06-06gstv4l2transform: format fixation for preferring passthroughEnrico Jorns1-0/+14
* If outgoing format is unfixated, try to set it to input format. * Call gst_caps_fixate () at end of fixation routine https://bugzilla.gnome.org/show_bug.cgi?id=766719
2016-06-06v4l2transform: allow to change pixel aspect ratioPhilipp Zabel1-1/+1
Scalers may change width and height independently, allow to change pixel aspect ratio. https://bugzilla.gnome.org/show_bug.cgi?id=766712
2016-06-06v4l2transform: fix scaling in case of fixed pixel aspect ratioPhilipp Zabel1-2/+4
To change pixel aspect ratio from DAR to PAR, the necessary scaling factor is DAR/PAR, not DAR*PAR. For good measure, add debug output similar to the fixed-width and fixed-height cases. https://bugzilla.gnome.org/show_bug.cgi?id=766711
2016-06-06v4l2object: fill colorimetry in gst_v4l2_object_acquire_formatPhilipp Zabel1-0/+2
Instead of relying on the default colorimetry chosen by gst_video_info_set_format(), set info.colorimetry from the values returned by G_FMT. This allows decoders to propagate their input colorimetry downstream. https://bugzilla.gnome.org/show_bug.cgi?id=766383
2016-06-06v4l2object: refactor gst_v4l2_object_get_colorspace to take a v4l2_format ↵Philipp Zabel1-51/+29
parameter Move the extraction of colorimetry parameters from struct v4l2_format and the setting of the identity matrix for RGB formats into the function to avoid code duplication. https://bugzilla.gnome.org/show_bug.cgi?id=766383
2016-06-06v4l2videodec: use visible size, not coded size, for downstream negotiation ↵Philipp Zabel1-2/+42
filter gst_v4l2_probe_caps() returns the coded size, not the visible size. Subtract the known padding from probed caps with the coded size before using them as filter for caps negotiation with downstream elements. https://bugzilla.gnome.org/show_bug.cgi?id=766382
2016-06-06v4l2object: use G_SELECTION instead of G_CROP in gst_v4l2_object_acquire_formatPhilipp Zabel1-9/+22
The gst_v4l2_object_acquire_format() function is used by v4l2videodec to obtain the currently set capture format. Since G_FMT returns the coded size, the visible size needs to be obtained from the compose rectangle in order to negotiate it with downstream elements. The G_CROP call hasn't worked on mem2mem capture queues for a long time. Instead use the G_SELECTION call to obtain the compose rectangle and only fall back to G_CROP for ancient kernels. https://bugzilla.gnome.org/show_bug.cgi?id=766381
2016-06-06v4l2sink: Use V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY if driver advertises it.Andreas Naumann1-1/+4
On modern kernels, the G/S_FMT ioctls will always fail using V4L2_BUF_TYPE_VIDEO_OVERLAY with VFL_DIR_TX (e.g. real overlay out drivers) since this is not the intented use (rather rx, according to v4l2 API doc). Probably this is why the Video Output Overlay interface was created, so if the driver advertises it we might as well use. For old kernels (pre 2012) the old way might still work so keeping this for compatibility. https://bugzilla.gnome.org/show_bug.cgi?id=761165
2016-06-06v4l2object: Use non-deprecated V4L2 type for RGB15Kieran Bingham1-0/+1
Support for the updated V4L2_PIX_FMT_XRGB555 was added in commit 2538fee2fd8fdb74b05f0a511281bc4707e7cc44 however, when setting the format for use in v4l2 ioctls, the old deprecated format is still used. Convert this to the new accepted format type, as the preferred format. https://bugzilla.gnome.org/show_bug.cgi?id=767300
2016-06-01v4l2src: check for valid size on raw video buffersJosep Torra1-1/+10
Discard buffers that doesn't contain enough data when dealing with raw video inputs. https://bugzilla.gnome.org/show_bug.cgi?id=767086
2016-05-25v4l2object: fix caps leakGuillaume Desmottes1-2/+4
gst_v4l2_object_probe_caps() was taking an extra ref on the returned caps for no reason. https://bugzilla.gnome.org/show_bug.cgi?id=766610
2016-05-02osxaudio: Support audio device provider on osxHyunjun Ko8-11/+495
https://bugzilla.gnome.org/show_bug.cgi?id=753265
2016-04-29ximageutil: shouldn't implement transform if don't support itSong Bing1-10/+1
shouldn't implement transform if don't support it. Or gst_buffer_copy_into() will print ERROR log. https://bugzilla.gnome.org/show_bug.cgi?id=765583
2016-04-16v4l2: Change warning handling to break infinite message loopDimitrios Katsaros1-6/+6
v4l2src can cause an "infinite message loop" when a base control exposed as a property is not provided by the device. In these cases, if in the warning message handling for the bus, the GST_DEBUG_BIN_TO_DOT_FILE* category of functions are used, the src lookup causes a new warning to be posted on the bus, causing a loop. This patch changes the warning for these controls so they are not posted on the bus. https://bugzilla.gnome.org/show_bug.cgi?id=758703
2016-04-13ximage: Initialize all fields in the meta explicitlySebastian Dröge1-1/+19
The meta is not allocated with all fields initialized to zeroes. https://bugzilla.gnome.org/show_bug.cgi?id=764902
2016-04-12v4l2: avoid leaking GValuesWim Taymans1-8/+12
unset the GValue if we don't use it any more to avoid leaks.
2016-04-04v4l2: Don't leak v4l2 objects and props on probe errorsNirbheek Chauhan1-4/+5
2016-03-24v4l2object: probe all colorspace supported by deviceAurélien Zanelli1-6/+89
A device can support more than one colorspace for a given image dimension and pixel format. So we have to probe all the supported colorspace and not only rely on the default one. Otherwise we could end up with negotiation failure if the caps colorimetry field don't match the v4l2 device default one even if the v4l2 could support such colorimetry. This patch enable probing if colorspace for both capture and output device. It really makes sense for output device since the colorspace shall be set by the application and a little less for capture device which, at the moment, shall provide the colorspace; ie: the v4l2 specification seems to not take into account the fact that a capture device could do colorspace conversion. As a side effet, probing takes some times and so sligthly delay v4l2 initialization. Note that this patch only probe colorspace and not all colorspace, matrix, transfer and range combination to avoid taking too much time, especially with low-speed devices as full probing do 1782 ioctl. https://bugzilla.gnome.org/show_bug.cgi?id=755937
2016-03-24good: use new gst_element_class_add_static_pad_template()Vineeth TM10-23/+18
https://bugzilla.gnome.org/show_bug.cgi?id=763076