v4l2-relayd
This commit is contained in:
4 files changed
+2
No files matched your search
@@ -1,17 +0,0 @@
|
||||
pkgbase = v4l2-relayd
|
||||
pkgdesc = Plays gstreamer sources into v4l2loopback devices.
|
||||
pkgver = 0.2.0
|
||||
pkgrel = 1
|
||||
url = https://gitlab.com/vicamo/v4l2-relayd
|
||||
arch = x86_64
|
||||
license = GPL
|
||||
makedepends = git
|
||||
depends = glib2
|
||||
depends = gstreamer
|
||||
depends = gst-plugins-base-libs
|
||||
depends = gst-plugins-good
|
||||
depends = v4l2loopback-dkms
|
||||
source = https://gitlab.com/vicamo/v4l2-relayd/-/archive/upstream/0.2.0/v4l2-relayd-upstream-0.2.0.tar.gz
|
||||
sha256sums = 0c063edf18dcc6edcdef46e695128cfc2b2d60964ea8538c7e79a2454310c53d
|
||||
|
||||
pkgname = v4l2-relayd
|
||||
@@ -1,4 +0,0 @@
|
||||
pkg
|
||||
src
|
||||
*.pkg.tar.zst
|
||||
*.tar.gz
|
||||
@@ -1,37 +0,0 @@
|
||||
--- src/v4l2-relayd.c.orig 2026-03-30 09:59:14.804751921 -0700
|
||||
+++ src/v4l2-relayd.c 2026-03-30 09:59:14.827617699 -0700
|
||||
@@ -58,6 +58,7 @@
|
||||
static GstElement *input_pipeline = NULL;
|
||||
static GstElement *output_pipeline = NULL;
|
||||
static GstElement *splash_pipeline = NULL;
|
||||
+static GTimer *input_timer = NULL;
|
||||
|
||||
static gboolean backend_pipeline_bus_call (GstBus *bus,
|
||||
GstMessage *msg,
|
||||
@@ -278,6 +279,10 @@
|
||||
{
|
||||
gst_element_set_state (splash_pipeline_get (), GST_STATE_NULL);
|
||||
gst_element_set_state (input_pipeline_get (), GST_STATE_PLAYING);
|
||||
+ if (input_timer == NULL)
|
||||
+ input_timer = g_timer_new ();
|
||||
+ else
|
||||
+ g_timer_start (input_timer);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -285,6 +290,15 @@
|
||||
{
|
||||
if (input_pipeline != NULL)
|
||||
gst_element_set_state (input_pipeline, GST_STATE_NULL);
|
||||
+ /* After a real streaming session (>3s), reset the output pipeline
|
||||
+ * to clear stale v4l2loopback state that causes format negotiation
|
||||
+ * failures when switching between camera apps. Brief probes from
|
||||
+ * PipeWire/WirePlumber (<1s) are skipped. */
|
||||
+ if (input_timer != NULL && g_timer_elapsed (input_timer, NULL) > 3.0
|
||||
+ && output_pipeline != NULL) {
|
||||
+ gst_element_set_state (output_pipeline, GST_STATE_READY);
|
||||
+ gst_element_set_state (output_pipeline, GST_STATE_PLAYING);
|
||||
+ }
|
||||
if (input_pipeline != NULL)
|
||||
gst_element_set_state (splash_pipeline, GST_STATE_PLAYING);
|
||||
}
|
||||
@@ -1,49 +0,0 @@
|
||||
# Maintainer: Ayla Ounce <ayla@ounce.email>
|
||||
|
||||
pkgname=v4l2-relayd
|
||||
pkgver=0.2.0
|
||||
pkgrel=2
|
||||
pkgdesc="Plays gstreamer sources into v4l2loopback devices."
|
||||
arch=('x86_64')
|
||||
url="https://gitlab.com/vicamo/v4l2-relayd"
|
||||
license=('GPL')
|
||||
depends=(
|
||||
'glib2'
|
||||
'gstreamer'
|
||||
'gst-plugins-base-libs'
|
||||
'gst-plugins-good'
|
||||
'v4l2loopback-dkms'
|
||||
)
|
||||
makedepends=('git')
|
||||
source=("https://gitlab.com/vicamo/v4l2-relayd/-/archive/upstream/${pkgver}/v4l2-relayd-upstream-${pkgver}.tar.gz"
|
||||
"0001-reset-output-on-idle.patch")
|
||||
sha256sums=('0c063edf18dcc6edcdef46e695128cfc2b2d60964ea8538c7e79a2454310c53d'
|
||||
'SKIP')
|
||||
|
||||
prepare() {
|
||||
cd "$srcdir/${pkgname}-upstream-${pkgver}"
|
||||
patch -p0 <"$srcdir/0001-reset-output-on-idle.patch"
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "$srcdir/${pkgname}-upstream-${pkgver}"
|
||||
./autogen.sh
|
||||
./configure --prefix=/usr --sysconfdir=/etc
|
||||
make
|
||||
}
|
||||
|
||||
check() {
|
||||
cd "$srcdir/${pkgname}-upstream-${pkgver}"
|
||||
make -k check
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$srcdir/${pkgname}-upstream-${pkgver}"
|
||||
make DESTDIR="$pkgdir/" install
|
||||
|
||||
# The module supports configuring multiple loopback devices; since we
|
||||
# don't know whether the user might be using some for other purposes,
|
||||
# we should not override its options unilaterally.
|
||||
rm "$pkgdir/etc/modprobe.d/v4l2-relayd.conf"
|
||||
rmdir "$pkgdir/etc/modprobe.d/"
|
||||
}
|
||||
Reference in new issue
Block a user