1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-24 00:45:52 +00:00

OpenH264 is a codec library which supports H.264 encoding and decoding.

It is suitable for use in real time applications such as WebRTC.

WWW: http://www.openh264.org/

PR:		194356
Submitted by:	Jan Beich
This commit is contained in:
Beat Gaetzi 2014-10-15 12:01:03 +00:00
parent 63e32fcfc2
commit 04b9f3319e
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=370910
7 changed files with 109 additions and 0 deletions

View File

@ -257,6 +257,7 @@
SUBDIR += ogmrip
SUBDIR += ogmtools
SUBDIR += opencinematools
SUBDIR += openh264
SUBDIR += openquicktime
SUBDIR += openshot
SUBDIR += oqtencoder

View File

@ -0,0 +1,66 @@
# $FreeBSD$
PORTNAME= openh264
PORTVERSION= 1.1
CATEGORIES= multimedia
MAINTAINER= gecko@FreeBSD.org
COMMENT= Cisco implementation of H.264 codec
LICENSE= BSD2CLAUSE
USE_GITHUB= yes
GH_ACCOUNT= cisco
GH_PROJECT= ${PORTNAME}
GH_TAGNAME= ${GH_COMMIT} # v${PORTVERSION}
GH_COMMIT= c79be44 # v1.1-Firefox33
USES= gmake
USE_LDCONFIG= yes
MAKE_ARGS= OS=freebsd ARCH="${ARCH:S/amd64/x86_64/}" \
CFLAGS_OPT="" SHAREDLIBSUFFIX=so.0 \
PREFIX="${STAGEDIR}${PREFIX}"
ALL_TARGET= all
OPTIONS_DEFINE= PLUGINS TEST
OPTIONS_DEFAULT=PLUGINS
OPTIONS_SUB= yes
PLUGINS_BUILD_DEPENDS=gmp-api>=33.0:${PORTSDIR}/multimedia/gmp-api \
gmp-api<34.0:${PORTSDIR}/multimedia/gmp-api
PLUGINS_CFLAGS= -I${LOCALBASE}/include/gmp-api
PLUGINS_MAKE_ARGS=HAVE_GMP_API=Yes
PLUGINS_ALL_TARGET=plugin
PLUGINS_USES= webplugin:gecko
WEBPLUGIN_NAME= gmp-gmp${PORTNAME}
WEBPLUGIN_FILES=gmp${PORTNAME}.info libgmp${PORTNAME}.so
SUB_FILES+= gmp${PORTNAME}.js
SUB_LIST+= PORTVERSION=${PORTVERSION} WEBPLUGIN_DIR="${WEBPLUGIN_DIR}"
TEST_BUILD_DEPENDS=googletest>=1.6.0:${PORTSDIR}/devel/googletest
TEST_CFLAGS= -I${LOCALBASE}/include
TEST_MAKE_ARGS= HAVE_GTEST=Yes
TEST_ALL_TARGET=test
.include <bsd.port.options.mk>
.if ${ARCH} == amd64 || ${ARCH} == arm || ${ARCH} == i386
BUILD_DEPENDS+= nasm:${PORTSDIR}/devel/nasm
.endif
pre-build:
${LN} -sf ${LOCALBASE}/lib/libgtest.so ${WRKSRC}/libgtest.a
post-install:
${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/lib${PORTNAME}.so.0
cd ${STAGEDIR}${PREFIX}/lib && \
${LN} -sf lib${PORTNAME}.so.0 lib${PORTNAME}.so
.if ${PORT_OPTIONS:MPLUGINS}
${MKDIR} ${STAGEDIR}${WEBPLUGIN_DIR}
${INSTALL_DATA} ${WRKSRC}/gmp${PORTNAME}.info ${STAGEDIR}${WEBPLUGIN_DIR}
${INSTALL_LIB} ${WRKSRC}/libgmp${PORTNAME}.so.0 \
${STAGEDIR}${WEBPLUGIN_DIR}/libgmp${PORTNAME}.so
${INSTALL_DATA} ${WRKDIR}/gmp${PORTNAME}.js ${STAGEDIR}${WEBPLUGIN_DIR}
.endif
.include <bsd.port.mk>

View File

@ -0,0 +1,2 @@
SHA256 (openh264-1.1.tar.gz) = 447502018fea40ef47a1fcc0ef7f4aeca3364ad42db63840ab1bb0bd2910a44e
SIZE (openh264-1.1.tar.gz) = 13193769

View File

@ -0,0 +1,2 @@
pref("media.gmp-gmpopenh264.path", "%%WEBPLUGIN_DIR%%");
pref("media.gmp-gmpopenh264.version", "%%PORTVERSION%%");

View File

@ -0,0 +1,19 @@
--- Makefile~
+++ Makefile
@@ -184,7 +184,7 @@ plugin:
@echo "You do not have gmp-api. Run make gmp-bootstrap to get the gmp-api headers."
endif
-$(LIBPREFIX)$(MODULE_NAME).$(SHAREDLIBSUFFIX): $(MODULE_OBJS) $(ENCODER_OBJS) $(DECODER_OBJS) $(PROCESSING_OBJS) $(COMMON_OBJS)
+$(LIBPREFIX)$(MODULE_NAME).$(SHAREDLIBSUFFIX): $(MODULE_OBJS) $(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIX)
$(QUIET)rm -f $@
$(QUIET_CXX)$(CXX) $(SHARED) $(LDFLAGS) $(CXX_LINK_O) $+ $(SHLDFLAGS) $(MODULE_LDFLAGS)
@@ -207,7 +207,6 @@ install: install-static install-shared
@:
ifeq ($(HAVE_GTEST),Yes)
-include build/gtest-targets.mk
include test/api/targets.mk
include test/decoder/targets.mk
include test/encoder/targets.mk

View File

@ -0,0 +1,4 @@
OpenH264 is a codec library which supports H.264 encoding and decoding.
It is suitable for use in real time applications such as WebRTC.
WWW: http://www.openh264.org/

View File

@ -0,0 +1,15 @@
include/wels/codec_api.h
include/wels/codec_app_def.h
include/wels/codec_def.h
%%PLUGINS%%%%WEBPLUGIN_DIR%%/gmpopenh264.info
%%PLUGINS%%@rmtry lib/firefox-nightly/defaults/pref/gmpopenh264.js
%%PLUGINS%%@rmtry lib/firefox/defaults/pref/gmpopenh264.js
%%PLUGINS%%@rmtry lib/seamonkey/defaults/pref/gmpopenh264.js
%%PLUGINS%%%%WEBPLUGIN_DIR%%/gmpopenh264.js
%%PLUGINS%%@exec ln -sf %D/%%WEBPLUGIN_DIR%%/gmpopenh264.js %D/lib/firefox-nightly/defaults/pref/ 2>/dev/null || true
%%PLUGINS%%@exec ln -sf %D/%%WEBPLUGIN_DIR%%/gmpopenh264.js %D/lib/firefox/defaults/pref/ 2>/dev/null || true
%%PLUGINS%%@exec ln -sf %D/%%WEBPLUGIN_DIR%%/gmpopenh264.js %D/lib/seamonkey/defaults/pref/ 2>/dev/null || true
%%PLUGINS%%%%WEBPLUGIN_DIR%%/libgmpopenh264.so
lib/libopenh264.a
lib/libopenh264.so
lib/libopenh264.so.0