mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 01:39:16 -04:00
A software and GPU emulated HD output device plugin for VDR.
Video decoder CPU / VA-API / VDPAU Video output VA-API / VDPAU Audio FFMpeg / Alsa / Analog Audio FFMpeg / Alsa / Digital Audio FFMpeg / OSS / Analog HDMI/SPDIF pass-through YaepgHD support Software deinterlacer Bob (VA-API only) Autocrop Grab image (VDPAU only) Suspend Letterbox, Stretch and Center cut-out video display modes Note: currently doesn't support XV, only VDPAU or (optionally) VAAPI WWW: http://projects.vdr-developer.org/projects/plg-softhddevice
This commit is contained in:
parent
2a6dfb7ae6
commit
10b10c33d0
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=296442
9 changed files with 232 additions and 0 deletions
|
@ -345,6 +345,7 @@
|
|||
SUBDIR += vdr-plugin-skinenigmang
|
||||
SUBDIR += vdr-plugin-sleeptimer
|
||||
SUBDIR += vdr-plugin-softdevice
|
||||
SUBDIR += vdr-plugin-softhddevice
|
||||
SUBDIR += vdr-plugin-streamdev
|
||||
SUBDIR += vdr-plugin-ttxtsubs
|
||||
SUBDIR += vdr-plugin-upnp
|
||||
|
|
56
multimedia/vdr-plugin-softhddevice/Makefile
Normal file
56
multimedia/vdr-plugin-softhddevice/Makefile
Normal file
|
@ -0,0 +1,56 @@
|
|||
# New ports collection makefile for: vdr-plugin-softhddevie
|
||||
# Date created: Sun Apr 29 17:00:02 CEST 2012
|
||||
# Whom: Juergen Lock <nox@freebsd.org>
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
PORTNAME= vdr-plugin-softhddevice
|
||||
PORTVERSION= 0.5.0
|
||||
CATEGORIES= multimedia
|
||||
MASTER_SITES= http://projects.vdr-developer.org/attachments/download/919/
|
||||
DISTNAME= ${PORTNAME:S/-plugin-/-/}-${DISTVERSIONPREFIX}${DISTVERSION}${DISTVERSIONSUFFIX}
|
||||
EXTRACT_SUFX= .tgz
|
||||
|
||||
MAINTAINER= nox@FreeBSD.org
|
||||
COMMENT= Video Disk Recorder - softhddevice plugin
|
||||
|
||||
LIB_DEPENDS+= avcodec.1:${PORTSDIR}/multimedia/ffmpeg \
|
||||
vdpau.1:${PORTSDIR}/multimedia/libvdpau \
|
||||
xcb.2:${PORTSDIR}/x11/libxcb \
|
||||
xcb-keysyms.1:${PORTSDIR}/x11/xcb-util-keysyms \
|
||||
asound.2:${PORTSDIR}/audio/alsa-lib
|
||||
|
||||
USE_GNOME+= pkgconfig
|
||||
USE_XORG+= xv x11 xinerama
|
||||
USE_GL+= gl glu
|
||||
PATCH_STRIP= -p1
|
||||
HAVE_CONFIGURE= yes
|
||||
PORTDOCS= AGPL-3.0.txt ChangeLog README.txt
|
||||
CONFIG+= -DLOCALBASE=\\\"${LOCALBASE}\\\"
|
||||
CONFIG+= -DUSE_VDPAU
|
||||
CONFIG+= -DUSE_OSS
|
||||
MAKE_ARGS+= CONFIG="${CONFIG}"
|
||||
MAKE_JOBS_SAFE= yes
|
||||
WRKSRC= ${WRKDIR}/${PLUGIN}-${PORTVERSION}
|
||||
|
||||
.include "${.CURDIR}/../vdr/Makefile.plugins"
|
||||
|
||||
OPTIONS= VAAPI "Enable vaapi support (experimental)" off
|
||||
|
||||
.include <bsd.port.options.mk>
|
||||
|
||||
.if defined(WITH_VAAPI)
|
||||
LIB_DEPENDS+= va.1:${PORTSDIR}/multimedia/libva
|
||||
CONFIG+= -DUSE_VAAPI
|
||||
.endif
|
||||
|
||||
post-patch: post-patch-plugin
|
||||
|
||||
post-install: post-install-pluginlocales
|
||||
.if !defined(NOPORTDOCS)
|
||||
${MKDIR} ${DOCSDIR}
|
||||
(cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR})
|
||||
.endif
|
||||
|
||||
.include <bsd.port.mk>
|
2
multimedia/vdr-plugin-softhddevice/distinfo
Normal file
2
multimedia/vdr-plugin-softhddevice/distinfo
Normal file
|
@ -0,0 +1,2 @@
|
|||
SHA256 (vdr/vdr-softhddevice-0.5.0.tgz) = e2fac582ac22a628f360f90657579367c88f2c4af78df9b6ce0739928cdb3f97
|
||||
SIZE (vdr/vdr-softhddevice-0.5.0.tgz) = 142044
|
79
multimedia/vdr-plugin-softhddevice/files/patch-Makefile
Normal file
79
multimedia/vdr-plugin-softhddevice/files/patch-Makefile
Normal file
|
@ -0,0 +1,79 @@
|
|||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -41,8 +41,8 @@ CXXFLAGS ?= -g -O2 -W -Wall -Wextra -Wer
|
||||
|
||||
### The directory environment:
|
||||
|
||||
-VDRDIR ?= ../../..
|
||||
-LIBDIR ?= ../../lib
|
||||
+VDRDIR = /usr/local/include/vdr
|
||||
+LIBDIR = ../lib
|
||||
TMPDIR ?= /tmp
|
||||
|
||||
### Make sure that necessary options are included:
|
||||
@@ -72,7 +72,7 @@ DEFINES += $(CONFIG) -D_GNU_SOURCE -DPLU
|
||||
_CFLAGS = $(DEFINES) $(INCLUDES) \
|
||||
$(shell pkg-config --cflags libavcodec) \
|
||||
`pkg-config --cflags x11 x11-xcb xcb xcb-xv xcb-shm xcb-dpms xcb-atom\
|
||||
- xcb-screensaver xcb-randr xcb-glx xcb-icccm xcb-keysyms`\
|
||||
+ xcb-screensaver xcb-randr xcb-glx xcb-keysyms`\
|
||||
`pkg-config --cflags gl glu` \
|
||||
$(if $(findstring USE_VDPAU,$(CONFIG)), \
|
||||
`pkg-config --cflags vdpau`) \
|
||||
@@ -88,7 +88,7 @@ override CFLAGS += $(_CFLAGS)
|
||||
LIBS += -lrt \
|
||||
$(shell pkg-config --libs libavcodec) \
|
||||
`pkg-config --libs x11 x11-xcb xcb xcb-xv xcb-shm xcb-dpms xcb-atom\
|
||||
- xcb-screensaver xcb-randr xcb-glx xcb-icccm xcb-keysyms`\
|
||||
+ xcb-screensaver xcb-randr xcb-glx xcb-keysyms`\
|
||||
`pkg-config --libs gl glu` \
|
||||
$(if $(findstring USE_VDPAU,$(CONFIG)), \
|
||||
`pkg-config --libs vdpau`) \
|
||||
@@ -113,7 +113,7 @@ all: libvdr-$(PLUGIN).so i18n
|
||||
|
||||
### Dependencies:
|
||||
|
||||
-MAKEDEP = $(CC) -MM -MG
|
||||
+MAKEDEP = $(CC) -MM # # # -MG
|
||||
DEPFILE = .dependencies
|
||||
$(DEPFILE): Makefile
|
||||
@$(MAKEDEP) $(DEFINES) $(INCLUDES) $(SRCS) >$@
|
||||
@@ -125,7 +125,7 @@ $(OBJS): Makefile
|
||||
### Internationalization (I18N):
|
||||
|
||||
PODIR = po
|
||||
-LOCALEDIR = $(VDRDIR)/locale
|
||||
+LOCALEDIR = ../locale
|
||||
I18Npo = $(wildcard $(PODIR)/*.po)
|
||||
I18Nmsgs = $(addprefix $(LOCALEDIR)/, $(addsuffix /LC_MESSAGES/vdr-$(PLUGIN).mo, $(notdir $(foreach file, $(I18Npo), $(basename $(file))))))
|
||||
I18Npot = $(PODIR)/$(PLUGIN).pot
|
||||
@@ -153,7 +153,11 @@ i18n: $(I18Nmsgs) $(I18Npot)
|
||||
|
||||
libvdr-$(PLUGIN).so: $(OBJS) Makefile
|
||||
$(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -fPIC $(OBJS) -o $@ $(LIBS)
|
||||
+ifdef FREEBSD
|
||||
+ @cp -f $@ $(LIBDIR)/$@.$(APIVERSION)
|
||||
+else
|
||||
@cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION)
|
||||
+endif
|
||||
|
||||
dist: $(I18Npo) clean
|
||||
@-rm -rf $(TMPDIR)/$(ARCHIVE)
|
||||
@@ -166,9 +170,17 @@ dist: $(I18Npo) clean
|
||||
clean:
|
||||
@-rm -f $(OBJS) $(DEPFILE) *.so *.tgz core* *~ $(PODIR)/*.mo $(PODIR)/*.pot
|
||||
|
||||
+#install: libvdr-$(PLUGIN).so
|
||||
+# cp --remove-destination libvdr-$(PLUGIN).so \
|
||||
+# /usr/lib/vdr/plugins/libvdr-$(PLUGIN).so.$(APIVERSION)
|
||||
+
|
||||
install: libvdr-$(PLUGIN).so
|
||||
+ifdef FREEBSD
|
||||
+ ${INSTALL_PROGRAM} libvdr-$(PLUGIN).so $(PREFIX)/lib/vdr/libvdr-$(PLUGIN).so.$(APIVERSION)
|
||||
+else
|
||||
cp --remove-destination libvdr-$(PLUGIN).so \
|
||||
/usr/lib/vdr/plugins/libvdr-$(PLUGIN).so.$(APIVERSION)
|
||||
+endif
|
||||
|
||||
HDRS= $(wildcard *.h)
|
||||
|
14
multimedia/vdr-plugin-softhddevice/files/patch-codec.c
Normal file
14
multimedia/vdr-plugin-softhddevice/files/patch-codec.c
Normal file
|
@ -0,0 +1,14 @@
|
|||
--- a/codec.c
|
||||
+++ b/codec.c
|
||||
@@ -37,7 +37,11 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
+#ifdef __FreeBSD__
|
||||
+#include <sys/endian.h>
|
||||
+#else
|
||||
#include <endian.h>
|
||||
+#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
49
multimedia/vdr-plugin-softhddevice/files/patch-softhddev.c
Normal file
49
multimedia/vdr-plugin-softhddevice/files/patch-softhddev.c
Normal file
|
@ -0,0 +1,49 @@
|
|||
--- a/softhddev.c
|
||||
+++ b/softhddev.c
|
||||
@@ -22,6 +22,9 @@
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
+#ifdef __FreeBSD__
|
||||
+#include <signal.h>
|
||||
+#endif
|
||||
#include <fcntl.h>
|
||||
|
||||
#include <stdio.h>
|
||||
@@ -2212,6 +2215,11 @@ int ProcessArgs(int argc, char *const ar
|
||||
//
|
||||
// Parse arguments.
|
||||
//
|
||||
+#ifdef __FreeBSD__
|
||||
+ if (!strcmp(*argv, "softhddevice"))
|
||||
+ ++argv, --argc;
|
||||
+#endif
|
||||
+
|
||||
for (;;) {
|
||||
switch (getopt(argc, argv, "-a:c:d:fg:p:sv:w:x")) {
|
||||
case 'a': // audio device for pcm
|
||||
@@ -2294,7 +2302,11 @@ int ProcessArgs(int argc, char *const ar
|
||||
|
||||
#define XSERVER_MAX_ARGS 512 ///< how many arguments support
|
||||
|
||||
+#ifndef __FreeBSD__
|
||||
static const char *X11Server = "/usr/bin/X"; ///< default x11 server
|
||||
+#else
|
||||
+static const char *X11Server = LOCALBASE "/bin/X"; ///< default x11 server
|
||||
+#endif
|
||||
static const char *X11ServerArguments; ///< default command arguments
|
||||
static pid_t X11ServerPid; ///< x11 server pid
|
||||
|
||||
@@ -2338,7 +2350,12 @@ static void StartXServer(void)
|
||||
if ((sval = X11ServerArguments)) {
|
||||
char *s;
|
||||
|
||||
+#ifndef __FreeBSD__
|
||||
s = buf = strdupa(sval);
|
||||
+#else
|
||||
+ s = buf = alloca(strlen(sval) + 1);
|
||||
+ strcpy(buf, sval);
|
||||
+#endif
|
||||
while ((sval = strsep(&s, " \t"))) {
|
||||
args[argn++] = sval;
|
||||
|
12
multimedia/vdr-plugin-softhddevice/files/patch-video.c
Normal file
12
multimedia/vdr-plugin-softhddevice/files/patch-video.c
Normal file
|
@ -0,0 +1,12 @@
|
|||
--- a/video.c
|
||||
+++ b/video.c
|
||||
@@ -101,7 +101,9 @@
|
||||
//#include <xcb/xcb_image.h>
|
||||
//#include <xcb/xcb_event.h>
|
||||
#include <xcb/xcb_atom.h>
|
||||
+#if 0
|
||||
#include <xcb/xcb_icccm.h>
|
||||
+#endif
|
||||
#ifdef XCB_ICCCM_NUM_WM_SIZE_HINTS_ELEMENTS
|
||||
#include <xcb/xcb_ewmh.h>
|
||||
#else // compatibility hack for old xcb-util
|
18
multimedia/vdr-plugin-softhddevice/pkg-descr
Normal file
18
multimedia/vdr-plugin-softhddevice/pkg-descr
Normal file
|
@ -0,0 +1,18 @@
|
|||
A software and GPU emulated HD output device plugin for VDR.
|
||||
|
||||
Video decoder CPU / VA-API / VDPAU
|
||||
Video output VA-API / VDPAU
|
||||
Audio FFMpeg / Alsa / Analog
|
||||
Audio FFMpeg / Alsa / Digital
|
||||
Audio FFMpeg / OSS / Analog
|
||||
HDMI/SPDIF pass-through
|
||||
YaepgHD support
|
||||
Software deinterlacer Bob (VA-API only)
|
||||
Autocrop
|
||||
Grab image (VDPAU only)
|
||||
Suspend
|
||||
Letterbox, Stretch and Center cut-out video display modes
|
||||
|
||||
Note: currently doesn't support XV, only VDPAU or (optionally) VAAPI
|
||||
|
||||
WWW: http://projects.vdr-developer.org/projects/plg-softhddevice
|
1
multimedia/vdr-plugin-softhddevice/pkg-plist
Normal file
1
multimedia/vdr-plugin-softhddevice/pkg-plist
Normal file
|
@ -0,0 +1 @@
|
|||
lib/vdr/libvdr-softhddevice.so.%%APIVERSION%%
|
Loading…
Add table
Reference in a new issue