guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#45707] [PATCH] gnu: Add obs-v4l2sink.


From: Alexey Abramov
Subject: [bug#45707] [PATCH] gnu: Add obs-v4l2sink.
Date: Wed, 20 Jan 2021 09:28:00 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)

Ludovic Courtès <ludo@gnu.org> writes:

> Hi,
>
> Alexey Abramov <levenson@mmer.org> skribis:
>
>> Thanks Ludo. With this patch, obs will check OBS_PLUGINS_PATH environment 
>> variable for a *default* location of modules. 
>
> OK.
>
>> Plugins might also have some data. I am not sure if it is safe to
>> use relative path thought. Would it be better to use
>> OBS_PLUGINS_DATA_PATH var?
>
> I don’t know, how does this patch change the situation wrt. finding a
> plugin’s data?

They have locals in their data directory at least. And probably something else, 
yes.

>
>> From 9ade5607aab510cc88561efb7c0b08567b5e19fe Mon Sep 17 00:00:00 2001
>> From: Alexey Abramov <levenson@mmer.org>
>> Date: Fri, 15 Jan 2021 17:26:37 +0100
>> Subject: [PATCH] gnu: obs: Use an environment variable for plugins location.
>>
>> * gnu/local.mk (dist_patch_DATA): Add it.
>> * gnu/packages/video.scm (obs): Use it.
>> * gnu/packages/patches/obs-override-default-modules-location.patch: Patch it.
>
> Some minor issues:
>
>> +++ b/gnu/packages/patches/obs-override-default-modules-location.patch
>
> ‘guix lint’ might complain about the file name length.  :-)
> Perhaps remove ‘override-default-’ from the file name.
>

Done. Passed.

>> @@ -0,0 +1,32 @@
>> +From 96e3c05043eb6b682b105e9080b45efeee33dcd0 Mon Sep 17 00:00:00 2001
>> +From: Alexey Abramov <levenson@mmer.org>
>> +Date: Fri, 15 Jan 2021 17:07:17 +0100
>> +Subject: [PATCH] Use an environment variable for a default modules location
>> +
>> +---
>> + libobs/obs-nix.c | 10 ++++++++--
>
> If it comes from another distro, please indicate it clearly at the top
> of the file.
>
>> ++   char *obs_plugins_path = getenv("OBS_PLUGINS_PATH");
>> ++   if (obs_plugins_path) {
>> ++           struct dstr obs_plugins_data_path;
>> ++           dstr_init_copy(&obs_plugins_data_path, obs_plugins_path);
>> ++           dstr_cat(&obs_plugins_data_path, 
>> "/../../share/obs/obs-plugins/%module%");
>
> Shouldn’t it be lib/obs-plugins, as your ‘search-path-specification’
> indicates?

That is a data directory. With the new patch it will be taken from
OBS_PLUGINS_DATA_DIRECTORY. %module% part is required for data.

>
>> +    (native-search-paths
>> +     (list (search-path-specification
>> +            (variable "OBS_PLUGINS_PATH")
>> +            (separator #f)                         ;single entry
>> +            (files '("lib/obs-plugins")))))
>
> How about renaming the variable to ‘OBS_PLUGINS_DIRECTORY’ given that
> it designates a single directory rather than a search path?

Done.

>
> Could you send an updated patch?

Attached. I also tested the obs patch with this [1] and this [2] and
haven't seen any erros. obs loads plugins successfully.

--8<---------------cut here---------------start------------->8---
info: ---------------------------------
info:   Loaded Modules:
info:     v4l2sink.so     <------ this
info:     text-freetype2.so  
info:     spectralizer.so    <------ this
info:     rtmp-services.so
info:     obs-x264.so
info:     obs-transitions.so
info:     obs-outputs.so
info:     obs-filters.so
info:     obs-ffmpeg.so
info:     linux-v4l2.so
info:     linux-pulseaudio.so
info:     linux-jack.so
info:     linux-decklink.so
info:     linux-capture.so
info:     linux-alsa.so
info:     libwlrobs.so     <------ this
info:     image-source.so
info:     frontend-tools.so
info:     decklink-ouput-ui.so
info:     decklink-captions.so
info: ---------------------------------


~ master* ⇡
λ find /gnu/store/3s84wmh9pqcryfzx0rrri8sqff7fqlqn-obs-wlrobs-1.0/
/gnu/store/3s84wmh9pqcryfzx0rrri8sqff7fqlqn-obs-wlrobs-1.0/
/gnu/store/3s84wmh9pqcryfzx0rrri8sqff7fqlqn-obs-wlrobs-1.0/lib
/gnu/store/3s84wmh9pqcryfzx0rrri8sqff7fqlqn-obs-wlrobs-1.0/lib/obs-plugins
/gnu/store/3s84wmh9pqcryfzx0rrri8sqff7fqlqn-obs-wlrobs-1.0/lib/obs-plugins/libwlrobs.so

~ master* ⇡
λ find /gnu/store/rmz58nv5qcwr1pm38nx7aicyfq4jbp4a-obs-spectralizer-1.3.3/      
                         
/gnu/store/rmz58nv5qcwr1pm38nx7aicyfq4jbp4a-obs-spectralizer-1.3.3/
/gnu/store/rmz58nv5qcwr1pm38nx7aicyfq4jbp4a-obs-spectralizer-1.3.3/share
/gnu/store/rmz58nv5qcwr1pm38nx7aicyfq4jbp4a-obs-spectralizer-1.3.3/share/doc
/gnu/store/rmz58nv5qcwr1pm38nx7aicyfq4jbp4a-obs-spectralizer-1.3.3/share/doc/obs-spectralizer-1.3.3
/gnu/store/rmz58nv5qcwr1pm38nx7aicyfq4jbp4a-obs-spectralizer-1.3.3/share/doc/obs-spectralizer-1.3.3/COPYING.txt
/gnu/store/rmz58nv5qcwr1pm38nx7aicyfq4jbp4a-obs-spectralizer-1.3.3/share/obs
/gnu/store/rmz58nv5qcwr1pm38nx7aicyfq4jbp4a-obs-spectralizer-1.3.3/share/obs/obs-plugins
/gnu/store/rmz58nv5qcwr1pm38nx7aicyfq4jbp4a-obs-spectralizer-1.3.3/share/obs/obs-plugins/spectralizer
/gnu/store/rmz58nv5qcwr1pm38nx7aicyfq4jbp4a-obs-spectralizer-1.3.3/share/obs/obs-plugins/spectralizer/locale
/gnu/store/rmz58nv5qcwr1pm38nx7aicyfq4jbp4a-obs-spectralizer-1.3.3/share/obs/obs-plugins/spectralizer/locale/ko-KR.ini
/gnu/store/rmz58nv5qcwr1pm38nx7aicyfq4jbp4a-obs-spectralizer-1.3.3/share/obs/obs-plugins/spectralizer/locale/ru-RU.ini
/gnu/store/rmz58nv5qcwr1pm38nx7aicyfq4jbp4a-obs-spectralizer-1.3.3/share/obs/obs-plugins/spectralizer/locale/en-US.ini
/gnu/store/rmz58nv5qcwr1pm38nx7aicyfq4jbp4a-obs-spectralizer-1.3.3/lib
/gnu/store/rmz58nv5qcwr1pm38nx7aicyfq4jbp4a-obs-spectralizer-1.3.3/lib/obs-plugins
/gnu/store/rmz58nv5qcwr1pm38nx7aicyfq4jbp4a-obs-spectralizer-1.3.3/lib/obs-plugins/spectralizer.so
--8<---------------cut here---------------end--------------->8---


Footnotes:
[1]  https://issues.guix.gnu.org/45960
[2]  https://issues.guix.gnu.org/45961

-- 
Alexey

Attachment: 0001-gnu-obs-Use-an-environment-variable-for-plugins-loca.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]