mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 19:50:05 +02:00
opus_tools: add recipe for version 0.1.9
This commit is contained in:
59
media-libs/opus_tools/opus_tools-0.1.9.recipe
Normal file
59
media-libs/opus_tools/opus_tools-0.1.9.recipe
Normal file
@@ -0,0 +1,59 @@
|
||||
SUMMARY="Opus Interactive Audio Codec"
|
||||
DESCRIPTION="
|
||||
Opus is a totally open, royalty-free, highly versatile audio codec. Opus is \
|
||||
unmatched for interactive speech and music transmission over the Internet, but\
|
||||
is also intended for storage and streaming applications. It is standardized by\
|
||||
the Internet Engineering Task Force (IETF) as RFC 6716 which incorporated\
|
||||
technology from Skype's SILK codec and Xiph.Org's CELT codec.
|
||||
"
|
||||
HOMEPAGE="http://www.opus-codec.org"
|
||||
COPYRIGHT="2001-2014 Xiph.org"
|
||||
LICENSE="BSD (3-clause)"
|
||||
SRC_URI="http://downloads.xiph.org/releases/opus/opus-tools-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="b1873dd78c7fbc98cf65d6e10cfddb5c2c03b3af93f922139a2104baedb4643a"
|
||||
REVISION="1"
|
||||
ARCHITECTURES="x86_gcc2 x86 x86_64"
|
||||
|
||||
PATCHES="opus_tools-$portVersion.patchset"
|
||||
|
||||
PROVIDES="
|
||||
opus_tools$secondaryArchSuffix = $portVersion compat >= 1
|
||||
cmd:opusdec$secondaryArchSuffix
|
||||
cmd:opusenc$secondaryArchSuffix
|
||||
cmd:opusinfo$secondaryArchSuffix
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libflac$secondaryArchSuffix
|
||||
lib:libogg$secondaryArchSuffix
|
||||
lib:libopus$secondaryArchSuffix
|
||||
"
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libflac$secondaryArchSuffix
|
||||
devel:libogg$secondaryArchSuffix
|
||||
devel:libopus$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:aclocal
|
||||
cmd:autoconf
|
||||
cmd:automake
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:ld$secondaryArchSuffix
|
||||
cmd:make
|
||||
cmd:sed
|
||||
cmd:awk
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
"
|
||||
SOURCE_DIR="opus-tools-$portVersion"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
autoreconf -fi
|
||||
runConfigure ./configure
|
||||
make
|
||||
}
|
||||
INSTALL()
|
||||
{
|
||||
make install
|
||||
}
|
||||
71
media-libs/opus_tools/patches/opus_tools-0.1.9.patchset
Normal file
71
media-libs/opus_tools/patches/opus_tools-0.1.9.patchset
Normal file
@@ -0,0 +1,71 @@
|
||||
From 981f9cb15d3b6517fa75652843d6af09914c5f3f Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Fri, 15 May 2015 09:12:37 +0000
|
||||
Subject: Haiku patch
|
||||
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index edff53f..37563cd 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -106,6 +106,7 @@ fi
|
||||
|
||||
LT_LIB_M
|
||||
AC_CHECK_LIB([winmm], [main])
|
||||
+AC_CHECK_LIB([network], [socket])
|
||||
|
||||
dnl check for pkg-config itself so we don't try the m4 macro without pkg-config
|
||||
AC_CHECK_PROG(HAVE_PKG_CONFIG, pkg-config, yes)
|
||||
diff --git a/src/opusrtp.c b/src/opusrtp.c
|
||||
index 8ee793d..df7d3c9 100644
|
||||
--- a/src/opusrtp.c
|
||||
+++ b/src/opusrtp.c
|
||||
@@ -494,9 +494,10 @@ int update_rtp_header(rtp_header *rtp)
|
||||
int send_rtp_packet(int fd, struct sockaddr *sin,
|
||||
rtp_header *rtp, const unsigned char *opus)
|
||||
{
|
||||
- update_rtp_header(rtp);
|
||||
- unsigned char *packet = malloc(rtp->header_size + rtp->payload_size);
|
||||
int ret;
|
||||
+ unsigned char *packet;
|
||||
+ update_rtp_header(rtp);
|
||||
+ packet = malloc(rtp->header_size + rtp->payload_size);
|
||||
|
||||
if (!packet) {
|
||||
fprintf(stderr, "Couldn't allocate packet buffer\n");
|
||||
@@ -521,6 +522,15 @@ int rtp_send_file(const char *filename, const char *dest, int port)
|
||||
struct sockaddr_in sin;
|
||||
int optval = 0;
|
||||
int ret;
|
||||
+ FILE *in;
|
||||
+ ogg_sync_state oy;
|
||||
+ ogg_stream_state os;
|
||||
+ ogg_page og;
|
||||
+ ogg_packet op;
|
||||
+ int headers = 0;
|
||||
+ char *in_data;
|
||||
+ const long in_size = 8192;
|
||||
+ size_t in_read;
|
||||
|
||||
if (fd < 0) {
|
||||
fprintf(stderr, "Couldn't create socket\n");
|
||||
@@ -553,15 +563,7 @@ int rtp_send_file(const char *filename, const char *dest, int port)
|
||||
rtp.payload_size = 0;
|
||||
|
||||
fprintf(stderr, "Sending %s...\n", filename);
|
||||
- FILE *in = fopen(filename, "rb");
|
||||
- ogg_sync_state oy;
|
||||
- ogg_stream_state os;
|
||||
- ogg_page og;
|
||||
- ogg_packet op;
|
||||
- int headers = 0;
|
||||
- char *in_data;
|
||||
- const long in_size = 8192;
|
||||
- size_t in_read;
|
||||
+ in = fopen(filename, "rb");
|
||||
|
||||
if (!in) {
|
||||
fprintf(stderr, "Couldn't open input file '%s'\n", filename);
|
||||
--
|
||||
2.2.2
|
||||
|
||||
Reference in New Issue
Block a user