diff options
author | Yuri Victorovich <yuri@FreeBSD.org> | 2019-04-27 14:24:18 +0800 |
---|---|---|
committer | Yuri Victorovich <yuri@FreeBSD.org> | 2019-04-27 14:24:18 +0800 |
commit | 7d63f2f30863246f5940ced6f805c8412a67696b (patch) | |
tree | 2251074ae7bbb742af9f7aac8aa9f18beb8744e5 | |
parent | c662f85a2ad6ae9635f7efcc82558030f8adf3dd (diff) | |
download | freebsd-ports-gnome-7d63f2f30863246f5940ced6f805c8412a67696b.tar.gz freebsd-ports-gnome-7d63f2f30863246f5940ced6f805c8412a67696b.tar.zst freebsd-ports-gnome-7d63f2f30863246f5940ced6f805c8412a67696b.zip |
New port: multimedia/ustreamer: Lightweight and fast MJPG-HTTP streamer
-rw-r--r-- | multimedia/Makefile | 1 | ||||
-rw-r--r-- | multimedia/ustreamer/Makefile | 24 | ||||
-rw-r--r-- | multimedia/ustreamer/distinfo | 3 | ||||
-rw-r--r-- | multimedia/ustreamer/files/patch-src_encoders_omx_formatters.h | 24 | ||||
-rw-r--r-- | multimedia/ustreamer/files/patch-src_tools.h | 26 | ||||
-rw-r--r-- | multimedia/ustreamer/pkg-descr | 7 |
6 files changed, 85 insertions, 0 deletions
diff --git a/multimedia/Makefile b/multimedia/Makefile index c7ad709af5a0..f48bc871a82c 100644 --- a/multimedia/Makefile +++ b/multimedia/Makefile @@ -406,6 +406,7 @@ SUBDIR += tvheadend SUBDIR += umph SUBDIR += umr + SUBDIR += ustreamer SUBDIR += v4l-utils SUBDIR += v4l_compat SUBDIR += vamps diff --git a/multimedia/ustreamer/Makefile b/multimedia/ustreamer/Makefile new file mode 100644 index 000000000000..4aece6be32d4 --- /dev/null +++ b/multimedia/ustreamer/Makefile @@ -0,0 +1,24 @@ +# $FreeBSD$ + +PORTNAME= ustreamer +DISTVERSIONPREFIX= v +DISTVERSION= 0.70 +CATEGORIES= multimedia ipv6 net + +MAINTAINER= yuri@FreeBSD.org +COMMENT= Lightweight and fast MJPG-HTTP streamer + +LICENSE= GPLv3 +LICENSE_FILE= ${WRKSRC}/LICENSE + +BUILD_DEPENDS= ${LOCALBASE}/include/linux/videodev2.h:multimedia/v4l_compat +LIB_DEPENDS= libevent.so:devel/libevent \ + libuuid.so:misc/e2fsprogs-libuuid + +USES= gmake jpeg localbase:ldflags +USE_GITHUB= yes +GH_ACCOUNT= pi-kvm + +PLIST_FILES= bin/ustreamer + +.include <bsd.port.mk> diff --git a/multimedia/ustreamer/distinfo b/multimedia/ustreamer/distinfo new file mode 100644 index 000000000000..c051a5e063f1 --- /dev/null +++ b/multimedia/ustreamer/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1556345422 +SHA256 (pi-kvm-ustreamer-v0.70_GH0.tar.gz) = 71cb25617feb115158182875142c8e55df3af672b4ebb5668dd8e09b195deadd +SIZE (pi-kvm-ustreamer-v0.70_GH0.tar.gz) = 85188 diff --git a/multimedia/ustreamer/files/patch-src_encoders_omx_formatters.h b/multimedia/ustreamer/files/patch-src_encoders_omx_formatters.h new file mode 100644 index 000000000000..16ad5c65b396 --- /dev/null +++ b/multimedia/ustreamer/files/patch-src_encoders_omx_formatters.h @@ -0,0 +1,24 @@ +--- src/encoders/omx/formatters.h.orig 2019-04-27 06:14:24 UTC ++++ src/encoders/omx/formatters.h +@@ -34,12 +34,21 @@ + #include "../../tools.h" + + ++#if defined(__FreeBSD__) ++#define LOG_OMX_ERROR(_error, _msg, ...) { \ ++ LOGGING_LOCK; \ ++ printf("-- ERROR [%.03Lf tid=%ld] -- " _msg ": %s\n", get_now_monotonic(), \ ++ pthread_getthreadid_np(), ##__VA_ARGS__, omx_error_to_string(_error)); \ ++ LOGGING_UNLOCK; \ ++ } ++#else + #define LOG_OMX_ERROR(_error, _msg, ...) { \ + LOGGING_LOCK; \ + printf("-- ERROR [%.03Lf tid=%ld] -- " _msg ": %s\n", get_now_monotonic(), \ + syscall(SYS_gettid), ##__VA_ARGS__, omx_error_to_string(_error)); \ + LOGGING_UNLOCK; \ + } ++#endif + + + const char *omx_error_to_string(OMX_ERRORTYPE error); diff --git a/multimedia/ustreamer/files/patch-src_tools.h b/multimedia/ustreamer/files/patch-src_tools.h new file mode 100644 index 000000000000..60a1b5d7b6ba --- /dev/null +++ b/multimedia/ustreamer/files/patch-src_tools.h @@ -0,0 +1,26 @@ +--- src/tools.h.orig 2019-04-27 06:12:11 UTC ++++ src/tools.h +@@ -36,6 +36,13 @@ + #include <sys/ioctl.h> + #include <sys/syscall.h> + ++#ifndef CLOCK_MONOTONIC_RAW ++# ifdef CLOCK_MONOTONIC_FAST ++# define CLOCK_MONOTONIC_RAW CLOCK_MONOTONIC_FAST ++# else ++# define CLOCK_MONOTONIC_RAW CLOCK_MONOTONIC ++# endif ++#endif + + #define A_THREAD_CREATE(_tid, _func, _arg) assert(!pthread_create(_tid, NULL, _func, _arg)) + #define A_THREAD_JOIN(_tid) assert(!pthread_join(_tid, NULL)) +@@ -106,5 +113,9 @@ INLINE long double get_now_real(void) { + } + + INLINE pid_t get_thread_id(void) { ++#if defined(__FreeBSD__) ++ return pthread_getthreadid_np(); ++#else + return syscall(SYS_gettid); ++#endif + } diff --git a/multimedia/ustreamer/pkg-descr b/multimedia/ustreamer/pkg-descr new file mode 100644 index 000000000000..7cb0a1f0a1f4 --- /dev/null +++ b/multimedia/ustreamer/pkg-descr @@ -0,0 +1,7 @@ +muStreamer is a lightweight and very quick server to broadcast MJPG video from +any V4L2 device to the net. All new browsers have native support of this video +format, as well as most video players such as mplayer, VLC etc. muStreamer is a +part of the Pi-KVM project designed to stream VGA and HDMI screencast hardware +data with the highest resolution and FPS possible. + +WWW: https://github.com/pi-kvm/ustreamer |