summaryrefslogtreecommitdiff
path: root/multimedia/guvcview
diff options
context:
space:
mode:
Diffstat (limited to 'multimedia/guvcview')
-rw-r--r--multimedia/guvcview/Makefile39
-rw-r--r--multimedia/guvcview/distinfo3
-rw-r--r--multimedia/guvcview/files/patch-guvcview_guvcview.c31
-rw-r--r--multimedia/guvcview/files/patch-guvcview_video__capture.c71
-rw-r--r--multimedia/guvcview/files/patch-gview__audio_gviewaudio.h11
-rw-r--r--multimedia/guvcview/files/patch-gview__encoder_gviewencoder.h11
-rw-r--r--multimedia/guvcview/files/patch-gview__encoder_muxer.c11
-rw-r--r--multimedia/guvcview/files/patch-gview__render_gviewrender.h11
-rw-r--r--multimedia/guvcview/files/patch-gview__v4l2core_gviewv4l2core.h11
-rw-r--r--multimedia/guvcview/files/patch-gview__v4l2core_v4l2__core.c14
-rw-r--r--multimedia/guvcview/pkg-descr2
-rw-r--r--multimedia/guvcview/pkg-plist69
12 files changed, 284 insertions, 0 deletions
diff --git a/multimedia/guvcview/Makefile b/multimedia/guvcview/Makefile
new file mode 100644
index 000000000000..5c8d1726983e
--- /dev/null
+++ b/multimedia/guvcview/Makefile
@@ -0,0 +1,39 @@
+PORTNAME= guvcview
+DISTVERSION= 2.2.1
+CATEGORIES= multimedia
+MASTER_SITES= SOURCEFORGE/guvcview/source
+DISTNAME= ${PORTNAME}-src-${DISTVERSION}
+
+MAINTAINER= walker.thompson@urz.uni-heidelberg.de
+COMMENT= Simple v4l2 full-featured video grabber
+WWW= https://guvcview.sourceforge.net/
+
+LICENSE= GPLv2
+
+BUILD_DEPENDS= ${LOCALBASE}/include/linux/videodev.h:multimedia/v4l_compat \
+ vulkan-headers>0:graphics/vulkan-headers
+LIB_DEPENDS= libavcodec.so:multimedia/ffmpeg \
+ libgsl.so:math/gsl \
+ libpng.so:graphics/png \
+ libportaudio.so:audio/portaudio \
+ libudev.so:devel/libudev-devd \
+ libv4l2.so:multimedia/libv4l
+
+USES= cmake gl gettext-runtime gettext-tools localbase:ldflags ninja \
+ pkgconfig qt:6 sdl tar:bz2
+USE_GL= opengl
+USE_QT= base
+USE_SDL= sdl2
+
+CMAKE_ON= USE_QT6 USE_SDL2
+CMAKE_OFF= USE_GTK3 USE_SFML
+
+CFLAGS+= -DNAME_MAX=MAXNAMLEN
+LDFLAGS+= -lintl
+
+OPTIONS_DEFINE= PULSEAUDIO
+PULSEAUDIO_BROKEN= Doesn't show up as an audio backend at runtime
+PULSEAUDIO_LIB_DEPENDS= libpulse.so:audio/pulseaudio
+PULSEAUDIO_CMAKE_BOOL= USE_PULSE
+
+.include <bsd.port.mk>
diff --git a/multimedia/guvcview/distinfo b/multimedia/guvcview/distinfo
new file mode 100644
index 000000000000..890ef8dda756
--- /dev/null
+++ b/multimedia/guvcview/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1748610514
+SHA256 (guvcview-src-2.2.1.tar.bz2) = d2adc7ce762961e853c3e16b511bad61504492d12f3e2eb7e30da4a2f7ade5af
+SIZE (guvcview-src-2.2.1.tar.bz2) = 355747
diff --git a/multimedia/guvcview/files/patch-guvcview_guvcview.c b/multimedia/guvcview/files/patch-guvcview_guvcview.c
new file mode 100644
index 000000000000..6a77e654b7ae
--- /dev/null
+++ b/multimedia/guvcview/files/patch-guvcview_guvcview.c
@@ -0,0 +1,31 @@
+--- guvcview/guvcview.c.orig 2024-11-02 13:15:33 UTC
++++ guvcview/guvcview.c
+@@ -28,6 +28,7 @@
+ #include <sys/resource.h>
+ #include <sys/stat.h>
+ #include <sys/syscall.h>
++#include <pthread_np.h>
+ #include <unistd.h>
+
+ #include "config.h"
+@@ -226,8 +227,8 @@ int main(int argc, char *argv[]) {
+ #endif
+
+ if (debug_level > 1)
+- printf("GUVCVIEW: main thread (tid: %u)\n",
+- (unsigned int)syscall(SYS_gettid));
++ printf("GUVCVIEW: main thread (tid: %d)\n",
++ pthread_getthreadid_np());
+
+ /*set the v4l2 core verbosity*/
+ v4l2core_set_verbosity(debug_level);
+@@ -393,8 +394,7 @@ int main(int argc, char *argv[]) {
+ gui_error("Guvcview error", "could not start the video capture thread",
+ 1);
+ } else if (debug_level > 2)
+- printf("GUVCVIEW: created capture thread with tid: %u\n",
+- (unsigned int)capture_thread);
++ printf("GUVCVIEW: created capture thread\n");
+
+ struct timespec now;
+ clock_gettime(CLOCK_REALTIME, &now);
diff --git a/multimedia/guvcview/files/patch-guvcview_video__capture.c b/multimedia/guvcview/files/patch-guvcview_video__capture.c
new file mode 100644
index 000000000000..2effe5e75b70
--- /dev/null
+++ b/multimedia/guvcview/files/patch-guvcview_video__capture.c
@@ -0,0 +1,71 @@
+i+--- guvcview/video_capture.c.orig 2024-11-02 13:15:33 UTC
++++ guvcview/video_capture.c
+@@ -34,6 +34,7 @@
+ /* support for internationalization - i18n */
+ #include <libintl.h>
+ #include <locale.h>
++#include <pthread_np.h>
+
+ #include "config.h"
+ #include "core_io.h"
+@@ -82,6 +83,7 @@ static __THREAD_TYPE encoder_thread;
+ static v4l2_dev_t *my_vd = NULL;
+
+ static __THREAD_TYPE encoder_thread;
++static __THREAD_TYPE encoder_audio_thread;
+
+ static int my_encoder_status = 0;
+
+@@ -622,8 +624,8 @@ static void *audio_processing_loop(void *data) {
+ encoder_context_t *encoder_ctx = (encoder_context_t *)data;
+
+ if (debug_level > 1)
+- printf("GUVCVIEW: audio thread (tid: %u)\n",
+- (unsigned int)syscall(SYS_gettid));
++ printf("GUVCVIEW: audio thread (tid: %d)\n",
++ pthread_getthreadid_np());
+
+ audio_context_t *audio_ctx = get_audio_context();
+ if (!audio_ctx) {
+@@ -717,8 +719,8 @@ static void *encoder_loop(void *data) {
+ my_encoder_status = 1;
+
+ if (debug_level > 1)
+- printf("GUVCVIEW: encoder thread (tid: %u)\n",
+- (unsigned int)syscall(SYS_gettid));
++ printf("GUVCVIEW: encoder thread (tid: %d)\n",
++ pthread_getthreadid_np());
+
+ /*get the audio context*/
+ audio_context_t *audio_ctx = get_audio_context();
+@@ -830,8 +832,7 @@ static void *encoder_loop(void *data) {
+ fprintf(stderr, "GUVCVIEW: encoder audio thread creation failed (%i)\n",
+ ret);
+ else if (debug_level > 2)
+- printf("GUVCVIEW: created audio encoder thread with tid: %u\n",
+- (unsigned int)encoder_audio_thread);
++ printf("GUVCVIEW: created audio encoder thread\n");
+ }
+
+ while (video_capture_get_save_video()) {
+@@ -914,8 +915,8 @@ void *capture_loop(void *data) {
+ quit = 0;
+
+ if (debug_level > 1)
+- printf("GUVCVIEW: capture thread (tid: %u)\n",
+- (unsigned int)syscall(SYS_gettid));
++ printf("GUVCVIEW: capture thread (tid: %d)\n",
++ pthread_getthreadid_np());
+
+ int ret = 0;
+
+@@ -1210,8 +1211,7 @@ int start_encoder_thread() {
+ if (ret)
+ fprintf(stderr, "GUVCVIEW: encoder thread creation failed (%i)\n", ret);
+ else if (debug_level > 2)
+- printf("GUVCVIEW: created encoder thread with tid: %u\n",
+- (unsigned int)encoder_thread);
++ printf("GUVCVIEW: created encoder thread\n");
+
+ return ret;
+ }
diff --git a/multimedia/guvcview/files/patch-gview__audio_gviewaudio.h b/multimedia/guvcview/files/patch-gview__audio_gviewaudio.h
new file mode 100644
index 000000000000..c4832a643fbf
--- /dev/null
+++ b/multimedia/guvcview/files/patch-gview__audio_gviewaudio.h
@@ -0,0 +1,11 @@
+--- gview_audio/gviewaudio.h.orig 2025-05-30 18:37:32 UTC
++++ gview_audio/gviewaudio.h
+@@ -32,8 +32,6 @@
+ #ifndef GVIEWAUDIO_H
+ #define GVIEWAUDIO_H
+
+-#include <features.h>
+-
+ #include <inttypes.h>
+ #include <pthread.h>
+ #include <sys/types.h>
diff --git a/multimedia/guvcview/files/patch-gview__encoder_gviewencoder.h b/multimedia/guvcview/files/patch-gview__encoder_gviewencoder.h
new file mode 100644
index 000000000000..4539de241cd4
--- /dev/null
+++ b/multimedia/guvcview/files/patch-gview__encoder_gviewencoder.h
@@ -0,0 +1,11 @@
+--- gview_encoder/gviewencoder.h.orig 2025-05-30 18:38:22 UTC
++++ gview_encoder/gviewencoder.h
+@@ -32,8 +32,6 @@
+ #ifndef GVIEWENCODER_H
+ #define GVIEWENCODER_H
+
+-#include <features.h>
+-
+ #include <inttypes.h>
+ #include <sys/types.h>
+
diff --git a/multimedia/guvcview/files/patch-gview__encoder_muxer.c b/multimedia/guvcview/files/patch-gview__encoder_muxer.c
new file mode 100644
index 000000000000..ecb8e788bcb1
--- /dev/null
+++ b/multimedia/guvcview/files/patch-gview__encoder_muxer.c
@@ -0,0 +1,11 @@
+--- gview_encoder/muxer.c.orig 2024-11-02 13:15:33 UTC
++++ gview_encoder/muxer.c
+@@ -30,7 +30,7 @@ Inc., 59 Temple Place, Suite 330, Boston, MA 02111-13
+ #include <unistd.h>
+ // #include <errno.h>
+ #include <assert.h>
+-#include <sys/statfs.h>
++#include <sys/mount.h>
+ /* support for internationalization - i18n */
+ #include <libintl.h>
+ #include <locale.h>
diff --git a/multimedia/guvcview/files/patch-gview__render_gviewrender.h b/multimedia/guvcview/files/patch-gview__render_gviewrender.h
new file mode 100644
index 000000000000..7b740ffd3b57
--- /dev/null
+++ b/multimedia/guvcview/files/patch-gview__render_gviewrender.h
@@ -0,0 +1,11 @@
+--- gview_render/gviewrender.h.orig 2025-05-30 18:38:11 UTC
++++ gview_render/gviewrender.h
+@@ -32,8 +32,6 @@
+ #ifndef GVIEWRENDER_H
+ #define GVIEWRENDER_H
+
+-#include <features.h>
+-
+ #include <inttypes.h>
+ #include <sys/types.h>
+
diff --git a/multimedia/guvcview/files/patch-gview__v4l2core_gviewv4l2core.h b/multimedia/guvcview/files/patch-gview__v4l2core_gviewv4l2core.h
new file mode 100644
index 000000000000..92109f29a5e9
--- /dev/null
+++ b/multimedia/guvcview/files/patch-gview__v4l2core_gviewv4l2core.h
@@ -0,0 +1,11 @@
+--- gview_v4l2core/gviewv4l2core.h.orig 2025-05-30 18:37:59 UTC
++++ gview_v4l2core/gviewv4l2core.h
+@@ -22,8 +22,6 @@
+ #ifndef GVIEWV4L2CORE_H
+ #define GVIEWV4L2CORE_H
+
+-#include <features.h>
+-
+ #include <inttypes.h>
+ #include <libudev.h>
+ #include <linux/media.h>
diff --git a/multimedia/guvcview/files/patch-gview__v4l2core_v4l2__core.c b/multimedia/guvcview/files/patch-gview__v4l2core_v4l2__core.c
new file mode 100644
index 000000000000..dd263d52b42f
--- /dev/null
+++ b/multimedia/guvcview/files/patch-gview__v4l2core_v4l2__core.c
@@ -0,0 +1,14 @@
+--- gview_v4l2core/v4l2_core.c.orig 2024-11-02 13:15:33 UTC
++++ gview_v4l2core/v4l2_core.c
+@@ -96,9 +96,9 @@ int xioctl(int fd, int IOCTL_X, void *arg) {
+ int ret = 0;
+ int tries = IOCTL_RETRY;
+ do {
+- if (!disable_libv4l2)
++/* if (!disable_libv4l2)
+ ret = v4l2_ioctl(fd, IOCTL_X, arg);
+- else
++ else*/
+ ret = ioctl(fd, IOCTL_X, arg);
+ } while (ret && tries-- &&
+ ((errno == EINTR) || (errno == EAGAIN) || (errno == ETIMEDOUT)));
diff --git a/multimedia/guvcview/pkg-descr b/multimedia/guvcview/pkg-descr
new file mode 100644
index 000000000000..8cbd6240a078
--- /dev/null
+++ b/multimedia/guvcview/pkg-descr
@@ -0,0 +1,2 @@
+Guvcview is an application for capturing and viewing video from
+devices supported by the linux kernel video4linux2 interface.
diff --git a/multimedia/guvcview/pkg-plist b/multimedia/guvcview/pkg-plist
new file mode 100644
index 000000000000..0276e0166ecf
--- /dev/null
+++ b/multimedia/guvcview/pkg-plist
@@ -0,0 +1,69 @@
+bin/guvcview
+lib/libgviewaudio.so
+lib/libgviewaudio.so.2
+lib/libgviewaudio.so.2.2.0
+lib/libgviewencoder.so
+lib/libgviewencoder.so.2
+lib/libgviewencoder.so.2.2.1
+lib/libgviewrender.so
+lib/libgviewrender.so.2
+lib/libgviewrender.so.2.2.1
+lib/libgviewv4l2core.so
+lib/libgviewv4l2core.so.2
+lib/libgviewv4l2core.so.2.2.1
+share/appdata/guvcview.appdata.xml
+share/applications/guvcview.desktop
+share/locale/bg/LC_MESSAGES/guvcview.mo
+share/locale/bg/LC_MESSAGES/gview_v4l2core.mo
+share/locale/bs/LC_MESSAGES/guvcview.mo
+share/locale/bs/LC_MESSAGES/gview_v4l2core.mo
+share/locale/cs/LC_MESSAGES/guvcview.mo
+share/locale/cs/LC_MESSAGES/gview_v4l2core.mo
+share/locale/da/LC_MESSAGES/guvcview.mo
+share/locale/da/LC_MESSAGES/gview_v4l2core.mo
+share/locale/de/LC_MESSAGES/guvcview.mo
+share/locale/de/LC_MESSAGES/gview_v4l2core.mo
+share/locale/en_AU/LC_MESSAGES/guvcview.mo
+share/locale/en_AU/LC_MESSAGES/gview_v4l2core.mo
+share/locale/es/LC_MESSAGES/guvcview.mo
+share/locale/es/LC_MESSAGES/gview_v4l2core.mo
+share/locale/eu/LC_MESSAGES/guvcview.mo
+share/locale/eu/LC_MESSAGES/gview_v4l2core.mo
+share/locale/fo/LC_MESSAGES/guvcview.mo
+share/locale/fo/LC_MESSAGES/gview_v4l2core.mo
+share/locale/fr/LC_MESSAGES/guvcview.mo
+share/locale/fr/LC_MESSAGES/gview_v4l2core.mo
+share/locale/gl/LC_MESSAGES/guvcview.mo
+share/locale/gl/LC_MESSAGES/gview_v4l2core.mo
+share/locale/he/LC_MESSAGES/guvcview.mo
+share/locale/he/LC_MESSAGES/gview_v4l2core.mo
+share/locale/hr/LC_MESSAGES/guvcview.mo
+share/locale/hr/LC_MESSAGES/gview_v4l2core.mo
+share/locale/it/LC_MESSAGES/guvcview.mo
+share/locale/it/LC_MESSAGES/gview_v4l2core.mo
+share/locale/ja/LC_MESSAGES/guvcview.mo
+share/locale/ja/LC_MESSAGES/gview_v4l2core.mo
+share/locale/lv/LC_MESSAGES/guvcview.mo
+share/locale/lv/LC_MESSAGES/gview_v4l2core.mo
+share/locale/nl/LC_MESSAGES/guvcview.mo
+share/locale/nl/LC_MESSAGES/gview_v4l2core.mo
+share/locale/pl/LC_MESSAGES/guvcview.mo
+share/locale/pl/LC_MESSAGES/gview_v4l2core.mo
+share/locale/pt/LC_MESSAGES/guvcview.mo
+share/locale/pt/LC_MESSAGES/gview_v4l2core.mo
+share/locale/pt_BR/LC_MESSAGES/guvcview.mo
+share/locale/pt_BR/LC_MESSAGES/gview_v4l2core.mo
+share/locale/ru/LC_MESSAGES/guvcview.mo
+share/locale/ru/LC_MESSAGES/gview_v4l2core.mo
+share/locale/si/LC_MESSAGES/guvcview.mo
+share/locale/si/LC_MESSAGES/gview_v4l2core.mo
+share/locale/sr/LC_MESSAGES/guvcview.mo
+share/locale/sr/LC_MESSAGES/gview_v4l2core.mo
+share/locale/tr/LC_MESSAGES/guvcview.mo
+share/locale/tr/LC_MESSAGES/gview_v4l2core.mo
+share/locale/uk/LC_MESSAGES/guvcview.mo
+share/locale/uk/LC_MESSAGES/gview_v4l2core.mo
+share/locale/zh_TW/LC_MESSAGES/guvcview.mo
+share/locale/zh_TW/LC_MESSAGES/gview_v4l2core.mo
+share/man/man1/guvcview.1.gz
+share/pixmaps/guvcview.png