all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alexey Abramov <levenson@mmer.org>
To: Evan <evan.straw99@gmail.com>
Cc: 45707@debbugs.gnu.org
Subject: [bug#45707] [PATCH v2] gnu: Add obs-v4l2sink.
Date: Thu, 07 Jan 2021 09:19:16 +0100	[thread overview]
Message-ID: <87turt2m7v.fsf@delta.lan> (raw)
In-Reply-To: <cd43c295-5e37-4d9e-8baa-000c83d386ca@gmail.com> (Evan's message of "Thu, 7 Jan 2021 04:37:45 +0000 (UTC)")

Hi Evan,

You can make it work. 

In order to provide plugins for obs via $XDG_CONFIG_HOME (~/.config) you need to provide the following structure:

"$XDG_CONFIG_HOME/obs-studio/plugins/<module-name>/bin/<arch>/"

As it implemented in obs-studio (~/obs-studio/UI/window-basic-main.cpp)

--8<---------------cut here---------------start------------->8---
  static void AddExtraModulePaths()
  {
          char base_module_dir[512];
  #if defined(_WIN32) || defined(__APPLE__)
          int ret = GetProgramDataPath(base_module_dir, sizeof(base_module_dir),
                                       "obs-studio/plugins/%module%");
  #else
          int ret = GetConfigPath(base_module_dir, sizeof(base_module_dir),
                                  "obs-studio/plugins/%module%");
  #endif

          if (ret <= 0)
                  return;

          string path = base_module_dir;
  #if defined(__APPLE__)
          obs_add_module_path((path + "/bin").c_str(), (path + "/data").c_str());

          BPtr<char> config_bin =
                  os_get_config_path_ptr("obs-studio/plugins/%module%/bin");
          BPtr<char> config_data =
                  os_get_config_path_ptr("obs-studio/plugins/%module%/data");
          obs_add_module_path(config_bin, config_data);

  #elif ARCH_BITS == 64
          obs_add_module_path((path + "/bin/64bit").c_str(),
                              (path + "/data").c_str());
  #else
          obs_add_module_path((path + "/bin/32bit").c_str(),
                              (path + "/data").c_str());
  #endif
  }
--8<---------------cut here---------------end--------------->8---


So what I am currently have is this:

--8<---------------cut here---------------start------------->8---
  λ find ~/.config/obs-studio/plugins 
  /home/levenson/.config/obs-studio/plugins
  /home/levenson/.config/obs-studio/plugins/v4l2sink
  /home/levenson/.config/obs-studio/plugins/v4l2sink/bin
  /home/levenson/.config/obs-studio/plugins/v4l2sink/bin/64bit
  /home/levenson/.config/obs-studio/plugins/v4l2sink/bin/64bit/v4l2sink.so
--8<---------------cut here---------------end--------------->8---

where the library is a symlink

v4l2sink.so -> /home/levenson/.guix-profile/lib/obs-plugins/v4l2sink.so

-- 
Alexey




  reply	other threads:[~2021-01-07  9:11 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-06 23:36 [bug#45707] [PATCH] gnu: Add obs-v4l2sink Evan Straw
2021-01-06 23:42 ` Nicolò Balzarotti
2021-01-06 23:45   ` Evan Straw
2021-01-06 23:47 ` [bug#45707] [PATCH v2] " Evan Straw
2021-01-07  0:11   ` Nicolò Balzarotti
2021-01-07  4:37   ` Evan
2021-01-07  8:19     ` Alexey Abramov [this message]
2021-01-13 14:35       ` [bug#45707] [PATCH] " Ludovic Courtès
2021-01-15 16:47         ` Alexey Abramov
2021-01-16 21:47           ` Ludovic Courtès
2021-01-20  8:28             ` Alexey Abramov
2021-02-02  9:31               ` bug#45707: " Ludovic Courtès
2021-01-15 17:10   ` [bug#45707] [PATCH v2] " pelzflorian (Florian Pelz)
2021-01-15 19:25     ` Evan Straw
2021-02-02 20:00 ` [bug#45707] (no subject) Andrew Tropin
2021-02-03 14:40 ` [bug#45707] [PATCH] gnu: obs: Update obs to fb347c Andrew Tropin
2021-02-03 21:11   ` [bug#46113] " Ludovic Courtès
2021-02-04 10:45   ` guix-patches--- via
2021-02-04 12:49     ` bug#46113: " Andrew Tropin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87turt2m7v.fsf@delta.lan \
    --to=levenson@mmer.org \
    --cc=45707@debbugs.gnu.org \
    --cc=evan.straw99@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.