summaryrefslogtreecommitdiff
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
* wasapi: Fix possible deadlock while downwards state changeSeungha Yang2020-09-284-7/+62
| | | | | | | IAudioClient::Stop() doesn't seem to wake up the event handle, then read() or write() could be blocked forever by WaitForSingleObject. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1610>
* wasapi: added missing lock release in case of error in gst_wasapi_xxx_resetSilvio Lazzeretti2020-09-252-4/+6
| | | | Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1606>
* amcvideodec: fix sync meta copying not taking a referenceMatthew Waters2020-09-251-1/+1
| | | | | | | | Fixup for 9b9e39be248389370e80b429da5a528418733483: amc: Fix crash when a sync_meta survives its sink https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/603 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1604>
* openslessink: Allow openslessink to handle 48kHz streams.Matthew Read2020-06-071-4/+1
| | | | | | | | The most common audio sample rate in AV streams is 48kHz, and the most common device output sample rate is 48kHz. This allows handing of 48kHz input streams without resampling. Remove comments about avoiding the use of 48kHz.
* msdkdec: Fix GstMsdkContext leakSeungha Yang2020-02-151-0/+2
|
* msdk: Clear reference counted object in dispose() methodSeungha Yang2020-02-153-8/+17
| | | | Follow GObject's memory management model
* msdkdec: Do not use video memory on WindowsSeungha Yang2020-01-201-0/+7
| | | | Like msdkenc, do not use video memory by default on Windows.
* msdk: Fix increasing memory usage in dynamic pipelinesNirbheek Chauhan2020-01-207-0/+42
| | | | | | | | | | | | | | | | | | | | | | | Our context is non-persistent, and we propagate it throughout the pipeline. This means that if we try to reuse any gstmsdk element by removing it from the pipeline and then re-adding it, we'll clone the mfxSession and create a new gstmsdk context as a child of the old one inside `gst_msdk_context_new_with_parent()`. Normally this only allocates a few KB inside the driver, but on Windows it seems to allocate tens of MBs which leads to linearly increasing memory usage for each PLAYING->NULL->PLAYING state cycle for the process. The contexts will only be freed when the pipeline itself goes to `NULL`, which would defeat the purpose of dynamic pipelines. Essentially, we need to optimize the case in which the element is removed from the pipeline and re-added and the same context is re-set on it. To detect that case, we set the context on `old_context`, and compare it to the new one when preparing the context. If they're the same, we don't need to do anything. Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/946
* msdk: Reorganize context preparation codeNirbheek Chauhan2020-01-205-71/+129
| | | | | | Split it out into a separate function with early exits to make the flow clearer, and document what the function is doing clearly. No functional changes.
* msdk: Fix warning about unused variable on WindowsNirbheek Chauhan2020-01-202-0/+4
|
* msdk: Use gst_clear_object()Nirbheek Chauhan2020-01-173-20/+15
| | | | | `gst_object_replace()` is not supposed to be used for unreffing and NULLing objects.
* ipcpipeline: Minimal fixes that allow building with MSVCNirbheek Chauhan2020-01-152-4/+11
|
* ipcpipeline: Rework compiler checksNirbheek Chauhan2020-01-151-25/+9
| | | | | | | | | `pipe()` isn't used since 15927b6511bc8304ae144a45c9fbfca88e5dd641, and `socketpair()` from `#include <sys/socket.h>` is used only in the examples. In practice, you can use probably also use anything that allows you to create fd pairs, such as named pipes or anonymous pipes. We use the cross-platform GstPollFD API in the plugin.
* avfvideosrc: element requests camera permissions even with capture-screen ↵Roman Shpuntov2019-12-111-0/+4
| | | | | | | | | | property is true https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/1137 macOS has different dialogs for camera capture and screen capture. No need to request screen capture permissions, the system detect screen capture automatically and create request dialog.
* avfvideosrc: Explicitly request device video permissions for macOS 10.14+o0Ignition0o2019-12-021-0/+39
| | | | | | | Since macOS Mojave (10.14), video permissions have to be explicitly granted by a user in order to open a video device such as a camera. This commit adds a check for the current permission status, and tries to request for permission if applicable.
* wasapisrc: Correctly handle BUFFERFLAGS_SILENTNirbheek Chauhan2019-11-281-5/+6
| | | | | | | We need to ignore the data we get from WASAPI in this case and write out silence (zeroes). Initially reported at https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/808
* wasapisrc: Try harder to avoid debug output in the hot loopNirbheek Chauhan2019-11-281-5/+7
| | | | | | | | | | | | The whole `src_read()` function is a hot loop since the ringbuffer thread is waiting on us, and printing to the console from inside it can easily cause us to miss our deadline. F.ex., if you had GST_DEBUG=3 and we accidentally missed a device period, we'd trigger the "reported glitch" warning, which would cause us to miss another device period, and so on. Let's reduce the log level so that GST_DEBUG=3 is more usable, and only print buffer flag info when it's actually relevant.
* wasapisrc: Fix capturing from some buggy audio driversNirbheek Chauhan2019-11-282-18/+40
| | | | | | | | | | | | | | | | | Some audio drivers return varying amounts of data per ::GetBuffer call, instead of following the device period that they've told us about in `src_prepare()`. Previously, we would just drop those extra buffers hoping that the extra buffers were temporary (f.ex., a startup 'burst' of audio data). However, it seems that some audio drivers, particularly on older Windows versions (such as Windows 10 1703 and older) consistently return varying amounts of data. Use GstAdapter to smooth that out, and hope that the audio driver is locally varying but globally periodic. Initially reported in https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/808
* wasapisrc: Clarify that nBlockAlign is actually bpfNirbheek Chauhan2019-11-281-8/+8
| | | | bpf = bytes per frame.
* wasapisrc: Fix glitching and clock skew issuesNirbheek Chauhan2019-11-281-1/+3
| | | | | | | | | | | | | | | | | | We were miscalculating the device period, i.e. the number of frames we'll get from WASAPI in each IAudioClient::GetBuffer call, due to a calculation mistake (truncate instead of round). For example, on my machine when the aux input is set to 44.1KHz, the reported device period is 101587, which comes out to 447.998 frames per ::GetBuffer call. In reality we will, of course, get 448 frames per call, but we were truncating, so we expected 447 and were discarding one frame every time. This led to glitching, and skew over time. Interestingly, I can only see this with 44.1Khz. 48Khz/96Khz are fine, because the device period is a more 'even' number. Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/806
* wasapi: Move to CoInitializeEx for COM initializationNirbheek Chauhan2019-11-263-5/+5
| | | | | CoInitialize is not allowed when targeting UWP and causes a Windows Application Certification Kit (WACK) error.
* msdkdec: fix surface leak in msdkdec_handle_frameJulien Isorce2019-11-201-1/+8
| | | | | | | | | | | Can be reproduced with: videotestsrc ! x264enc key-int-max=$N ! \ h264parse ! msdkh264dec ! fakesink sync=1 It happens with any gop size but the smaller is the distance N between key frames, the quicker it is leaking. Fixes #1023
* wasapi: Fix build warningsSeungha Yang2019-10-171-0/+4
| | | | | gstwasapiutil.c(173) : warning C4715: 'gst_wasapi_device_role_to_erole': not all control paths return a value gstwasapiutil.c(188) : warning C4715: 'gst_wasapi_erole_to_device_role': not all control paths return a value
* wasapi: Don't cast GstDeviceProvider to GstElementSeungha Yang2019-10-173-5/+5
| | | | | | | The GstDeviceProvider isn't subclass of GstElement. (gst-device-monitor-1.0:49356): GLib-GObject-WARNING **: 20:21:18.651: invalid cast from 'GstWasapiDeviceProvider' to 'GstElement'
* decklinkaudiosink: Drop late buffersMatthew Waters2019-09-021-7/+28
| | | | | | | Asking decklink to render audio data seems to be based entirely on the sample counts which completely disregards the timestamps we pass to decklink. As a result, we need to explicitly check for late buffers and drop them ourselves.
* decklink: Allow VANC to be used for all modesSebastian Dröge2019-09-023-6/+5
|
* decklinkvideosrc: Also set the INTERLACED buffer flag on non-TFF buffersSebastian Dröge2019-09-021-0/+2
|
* decklinkvideosrc: Retrieve mode of the ancillary data from the frameSebastian Dröge2019-09-022-5/+15
| | | | | | | | Instead of using the information we stored ourselves for the video frame itself. Which was also the wrong one: it was the mode from the property, not the autodetected one. This fixes vanc extraction with mode=auto
* dshowsrcwrapper: fix regression on device selectiongla2019-08-231-2/+2
| | | | Do not take device_name if a device has been specified. Do not take device_index into account if a device or a device name has been specified.
* d3dvideosink: Fix crash on WinProc handlerSeungha Yang2019-08-161-0/+5
| | | | | ... caused by null pointer dereference. The d3dvideosink object might not available yet on the handler.
* amc: Fix crash when a sync_meta survives its sinkXavier Claessens2019-08-141-1/+2
| | | | | _amc_gl_free() could be called after the GstAmcVideoDec has been finalized, in the case downstream still has a ref to a buffer.
* decklinkaudiosrc/decklinkvideosrc: Do nothing in BaseSrc::negotiate() and ↵Sebastian Dröge2019-08-122-131/+65
| | | | | | | | | | | | | always set caps in ::create() We don't support negotiation with downstream but simply set caps based on the buffers we receive. This prevents renegotiation to other formats, and negotiation to NTSC in mode=auto in the beginning until the first buffer is received. As side-effect of this, also remove various other caps handling code that was working around the behaviour of the default BaseSrc::negotiate().
* wasapi: fix symbol redefinition build errorIgnacio Casal Quinteiro2019-08-122-3/+8
|
* Fixed segtotal value being always 2 due to an unused variableMarcos Kintschner2019-08-112-3/+1
| | | | | The 'MAX' expression used to set segtotal always returned 2 because the unused and uninitialized variable buffer_frame_count was always 0
* kmssink: Fix implicit declaration build errorSeungha Yang2019-08-101-0/+1
| | | | | | | | | | | | ffs() and strcmp() require string.h gstkmssink.c:255:28: error: implicit declaration of function ‘ffs’ [-Werror=implicit-function-declaration] crtc_id = res->crtcs[ffs (crtcs_for_connector) - 1]; ^~~ gstkmssink.c:590:10: error: implicit declaration of function ‘strcmp’ [-Werror=implicit-function-declaration] if (!strcmp (property->name, prop_name)) { ^~~~~~
* nvdec: Fix possible frame drop on EOSSeungha Yang2019-08-091-0/+10
| | | | On eos, baseclass videoencoder call finish() vfunc instead of drain()
* meson: bluez: Early terminate configure on WindowsSeungha Yang2019-08-091-0/+4
| | | | | This plugin is for linux bluetooth stack. So the early termination can save configure time on Windows (i.e., we can avoid glib subproject fallback)
* decklink: Correctly ensure >=16 byte alignment for the buffers we allocateSebastian Dröge2019-08-091-7/+30
| | | | | | | We'll ensure at least 64 byte alignment for AVX2 but 16 byte alignment is what is required by the decklink SDK. Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/986
* uvch264src: Make sure we set our segmentThibault Saunier2019-08-091-1/+10
| | | | | | We were not setting self->segment and we are using it when notifying downstream that we handled a REQUEST_KEY_UNIT event, leading to all sort of criticals.
* msdk: fix the typo for gst_msdkvp9dec_debugHaihao Xiang2019-08-081-1/+1
|
* meson: Allow CUDA_PATH fallback on linuxSeungha Yang2019-08-082-49/+55
| | | | | | That's what we've supported via autotools build Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/966
* nvenc/nvdec: Add NVIDIA SDK headers to noinst_HEADERSNiels De Graef2019-08-072-5/+5
| | | | | The tarballs that were being spun for 1.16 don't contain these headers due to this small oversight, so let's add them.
* msdk: fix the build error with libva 2.4.0Haihao Xiang2019-04-173-3/+18
| | | | This fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/949
* msdkdec: fix error handling in case of unsupported hardwarePeter Seiderer2019-04-101-2/+3
| | | | | | | Check the return value of gst_msdk_context_ensure_context and abort in case of failure. https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/945
* msdkenc: fix error handling in case of unsupported hardwarePeter Seiderer2019-04-101-3/+3
| | | | | | | Check the return value of gst_msdk_context_ensure_context and abort in case of failure. https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/945
* msdk: fix error handling in case of unsupported hardwarePeter Seiderer2019-04-101-1/+0
| | | | | | Fix double gst_object_unref for GstMsdkContext. https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/945
* msdkvpp: add BGR10A2_LE format in the src padHaihao Xiang2019-04-091-2/+2
| | | | | | example pipeline: gst-launch-1.0 videotestsrc ! video/x-raw,format=P010_10LE ! msdkvpp ! \ video/x-raw,format=BGR10A2_LE ! fakesink
* msdk: set some parameters in mfxFrameData for a MFX_FOURCC_A2RGB10 frameHaihao Xiang2019-04-092-2/+14
|
* msdk: map MFX_FOURCC_A2RGB10 to VA_FOURCC_A2R10G10B10Haihao Xiang2019-04-092-0/+4
|
* msdk: map GST_VIDEO_FORMAT_BGR10A2_LE to VA_FOURCC_A2R10G10B10Haihao Xiang2019-04-091-1/+4
|