summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--debian/changelog6
-rw-r--r--docs/ChangeLog53
-rw-r--r--include/baresip.h2
-rw-r--r--mk/Doxyfile2
-rw-r--r--mk/modules.mk14
-rw-r--r--modules/avcodec/decode.c10
-rw-r--r--modules/avcodec/encode.c2
-rw-r--r--modules/daala/daala.c3
-rw-r--r--modules/daala/decode.c2
-rw-r--r--modules/daala/encode.c17
-rw-r--r--modules/mpa/decode.c11
-rw-r--r--modules/v4l2_codec/v4l2_codec.c12
-rw-r--r--modules/zrtp/module.mk2
-rw-r--r--rpm/baresip.spec2
-rw-r--r--src/audio.c4
-rw-r--r--src/config.c1
17 files changed, 117 insertions, 28 deletions
diff --git a/Makefile b/Makefile
index d5b60bf..9d2b847 100644
--- a/Makefile
+++ b/Makefile
@@ -13,7 +13,7 @@
USE_VIDEO := 1
PROJECT := baresip
-VERSION := 0.4.18
+VERSION := 0.4.19
DESCR := "Baresip is a modular SIP User-Agent with audio and video support"
# Verbose and silent build modes
diff --git a/debian/changelog b/debian/changelog
index 102bfa4..4a87c69 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+baresip (0.4.19) unstable; urgency=medium
+
+ * version 0.4.19
+
+ -- Alfred E. Heggestad <aeh@db.org> Fri, 20 May 2016 20:00:00 +0100
+
baresip (0.4.18) unstable; urgency=medium
* version 0.4.18
diff --git a/docs/ChangeLog b/docs/ChangeLog
index 65c100e..a1fcaf2 100644
--- a/docs/ChangeLog
+++ b/docs/ChangeLog
@@ -1,3 +1,56 @@
+2016-05-20 Alfred E. Heggestad <aeh@db.org>
+
+ * Version 0.4.19
+
+ * GIT URL: https://github.com/alfredh/baresip.git
+ * GIT tag: v0.4.19
+ * NOTE: Requires libre v0.4.14 or later
+ Requires librem v0.4.7 or later
+
+ * new modules:
+ - mpa MPA Speech and Audio Codec (thanks Christian Hoene)
+
+ * baresip-core:
+ - audio: remove is_g722 exception
+ use aucodec's rtp clockrate for calculating RTP timestamp
+ plc: make sure sampc is exactly one ptime frame
+ - aucodec: split srate into DSP srate and RTP clockrate
+ (these are different for e.g. G.722 and MDA)
+ - mos: add mos_calculate() (thanks Lorenzo Mangani)
+ - net: use configured dns servers only, if specified
+ - ua: fix potential NULL-pointer crash for uag.cfg
+
+ * selftest:
+ - add test for SIP registration with DNS
+ - add test for SIP registration with authentication
+ - add test for MOS calculations
+ - added a mock DNS Server
+ - added a mock SIP Server
+
+ * Modules:
+
+ * aucodec: add support for NV12 and YUVJ420P pixel formats
+
+ * daala: update to libdaala version 0.0-1564-g79787c7
+
+ * gtk: fix autodetection of libgtk+ 2.0 (thanks Charles Lehner)
+
+ * h265: remove call to x265_cleanup, caused crash on OpenBSD
+
+ * mpa: new module that implements MPA Speech and Audio Codec
+ (this module was contributed by Christian Hoene)
+
+ * opus: added new configuration parameters:
+ opus_cbr {yes,no} # Constant Bitrate (inverse of VBR)
+ opus_inbandfec {yes,no} # Enable inband FEC
+ opus_dtx {yes,no} # Enable DTX
+
+ * presence: improved interoperability, allow white space before
+ xml element closing tags (thanks Juha Heinanen)
+
+ * x11: added borderless window (thanks Doug Blewett)
+
+
2016-03-12 Alfred E. Heggestad <aeh@db.org>
* Version 0.4.18
diff --git a/include/baresip.h b/include/baresip.h
index cb99946..201ecb5 100644
--- a/include/baresip.h
+++ b/include/baresip.h
@@ -13,7 +13,7 @@ extern "C" {
/** Defines the Baresip version string */
-#define BARESIP_VERSION "0.4.18"
+#define BARESIP_VERSION "0.4.19"
/* forward declarations */
diff --git a/mk/Doxyfile b/mk/Doxyfile
index 6ca882a..bc393ba 100644
--- a/mk/Doxyfile
+++ b/mk/Doxyfile
@@ -4,7 +4,7 @@
# Project related configuration options
#---------------------------------------------------------------------------
PROJECT_NAME = baresip
-PROJECT_NUMBER = 0.4.18
+PROJECT_NUMBER = 0.4.19
OUTPUT_DIRECTORY = ../baresip-dox
CREATE_SUBDIRS = NO
OUTPUT_LANGUAGE = English
diff --git a/mk/modules.mk b/mk/modules.mk
index e0faccd..b674a92 100644
--- a/mk/modules.mk
+++ b/mk/modules.mk
@@ -110,6 +110,8 @@ USE_GST_VIDEO := \
&& echo "yes")
USE_GST_VIDEO1 := $(shell pkg-config --exists gstreamer-1.0 gstreamer-app-1.0 \
&& echo "yes")
+USE_GTK := $(shell pkg-config 'gtk+-2.0 >= 2.22' && \
+ pkg-config 'glib-2.0 >= 2.32' && echo "yes")
ifneq ($(USE_AVCODEC),)
USE_H265 := $(shell [ -f $(SYSROOT)/include/x265.h ] || \
[ -f $(SYSROOT)/local/include/x265.h ] || \
@@ -200,9 +202,6 @@ USE_VPX := $(shell [ -f $(SYSROOT)/include/vpx/vp8.h ] \
|| [ -f $(SYSROOT)/local/include/vpx/vp8.h ] \
|| [ -f $(SYSROOT_ALT)/include/vpx/vp8.h ] \
&& echo "yes")
-USE_GTK := $(shell [ -f $(SYSROOT)/include/gtk-2.0/gtk/gtk.h ] || \
- [ -f $(SYSROOT)/local/include/gtk-2.0/gtk/gtk.h ] || \
- [ -f $(SYSROOT_ALT)/include/gtk-2.0/gtk/gtk.h ] && echo "yes")
else
# Windows.
# Accounts for mingw with Windows SDK (formerly known as Platform SDK)
@@ -342,6 +341,9 @@ endif
ifneq ($(USE_GST_VIDEO1),)
MODULES += gst_video1
endif
+ifneq ($(USE_GTK),)
+MODULES += gtk
+endif
ifneq ($(USE_H265),)
MODULES += h265
endif
@@ -409,7 +411,7 @@ ifneq ($(USE_V4L),)
MODULES += v4l
endif
ifneq ($(USE_V4L2),)
-MODULES += v4l2
+MODULES += v4l2 v4l2_codec
endif
ifneq ($(USE_VPX),)
MODULES += vpx
@@ -423,10 +425,6 @@ endif
ifneq ($(USE_ZRTP),)
MODULES += zrtp
endif
-ifneq ($(USE_GTK),)
-MODULES += gtk
-endif
-
ifneq ($(USE_DSHOW),)
MODULES += dshow
endif
diff --git a/modules/avcodec/decode.c b/modules/avcodec/decode.c
index affb855..c686a63 100644
--- a/modules/avcodec/decode.c
+++ b/modules/avcodec/decode.c
@@ -7,14 +7,18 @@
#include <rem.h>
#include <baresip.h>
#include <libavcodec/avcodec.h>
+#include <libavutil/avutil.h>
#include <libavutil/mem.h>
+#if LIBAVCODEC_VERSION_INT >= ((53<<16)+(5<<8)+0)
#include <libavutil/pixdesc.h>
+#endif
#include "h26x.h"
#include "avcodec.h"
#if LIBAVUTIL_VERSION_MAJOR < 52
#define AV_PIX_FMT_YUV420P PIX_FMT_YUV420P
+#define AV_PIX_FMT_YUVJ420P PIX_FMT_YUVJ420P
#define AV_PIX_FMT_NV12 PIX_FMT_NV12
#endif
@@ -175,9 +179,11 @@ static int ffdecode(struct viddec_state *st, struct vidframe *frame,
if (got_picture) {
+#if LIBAVCODEC_VERSION_INT >= ((53<<16)+(5<<8)+0)
switch (st->pict->format) {
case AV_PIX_FMT_YUV420P:
+ case AV_PIX_FMT_YUVJ420P:
frame->fmt = VID_FMT_YUV420P;
break;
@@ -188,7 +194,9 @@ static int ffdecode(struct viddec_state *st, struct vidframe *frame,
av_get_pix_fmt_name(st->pict->format));
goto out;
}
-
+#else
+ frame->fmt = VID_FMT_YUV420P;
+#endif
for (i=0; i<4; i++) {
frame->data[i] = st->pict->data[i];
diff --git a/modules/avcodec/encode.c b/modules/avcodec/encode.c
index 0ca635c..620b561 100644
--- a/modules/avcodec/encode.c
+++ b/modules/avcodec/encode.c
@@ -202,9 +202,11 @@ static int open_encoder(struct videnc_state *st,
}
#endif
+#if LIBAVCODEC_VERSION_INT >= ((53<<16)+(5<<8)+0)
st->pict->format = pix_fmt;
st->pict->width = size->w;
st->pict->height = size->h;
+#endif
out:
if (err) {
diff --git a/modules/daala/daala.c b/modules/daala/daala.c
index 130ca59..b5790fa 100644
--- a/modules/daala/daala.c
+++ b/modules/daala/daala.c
@@ -20,6 +20,9 @@
* - Define and implement fragmentation of large packets
* - Define an IETF RTP Payload type
*
+ * External libraries:
+ *
+ * daala version 0.0-1564-g79787c7 (or later)
*
* References:
*
diff --git a/modules/daala/decode.c b/modules/daala/decode.c
index e2217c8..cacd8b5 100644
--- a/modules/daala/decode.c
+++ b/modules/daala/decode.c
@@ -143,7 +143,7 @@ int daala_decode(struct viddec_state *vds, struct vidframe *frame,
}
}
else {
- od_img img;
+ daala_image img;
if (!vds->got_headers) {
warning("daala: decode: still waiting for headers\n");
diff --git a/modules/daala/encode.c b/modules/daala/encode.c
index 7770bd6..d8abe4d 100644
--- a/modules/daala/encode.c
+++ b/modules/daala/encode.c
@@ -130,10 +130,12 @@ static int open_encoder(struct videnc_state *ves, const struct vidsz *size)
daala_comment dc;
daala_packet dp;
int err = 0;
- int complexity = 0;
- int video_q = 10;
+ int complexity = 7;
+ int video_q = 30;
+ int bitrate = ves->bitrate;
- info("daala: open encoder (%d x %d)\n", size->w, size->h);
+ info("daala: open encoder (%d x %d, %d bps)\n",
+ size->w, size->h, bitrate);
if (ves->enc) {
debug("daala: re-opening encoder\n");
@@ -175,6 +177,9 @@ static int open_encoder(struct videnc_state *ves, const struct vidsz *size)
daala_encode_ctl(ves->enc, OD_SET_COMPLEXITY,
&complexity, sizeof(complexity));
+ daala_encode_ctl(ves->enc, OD_SET_BITRATE,
+ &bitrate, sizeof(bitrate));
+
for (;;) {
int r;
@@ -215,7 +220,8 @@ int daala_encode(struct videnc_state *ves, bool update,
const struct vidframe *frame)
{
int r, err = 0;
- od_img img;
+ daala_image img;
+ unsigned i;
(void)update; /* XXX: how to force a KEY-frame? */
if (!ves || !frame || frame->fmt != VID_FMT_YUV420P)
@@ -250,6 +256,9 @@ int daala_encode(struct videnc_state *ves, bool update,
img.planes[2].xstride = 1;
img.planes[2].ystride = frame->linesize[2];
+ for (i=0; i<3; i++)
+ img.planes[i].bitdepth = 8;
+
img.nplanes = 3;
img.width = frame->size.w;
diff --git a/modules/mpa/decode.c b/modules/mpa/decode.c
index 52f9304..8a92fbc 100644
--- a/modules/mpa/decode.c
+++ b/modules/mpa/decode.c
@@ -127,9 +127,9 @@ int mpa_decode_frm(struct audec_state *ads, int16_t *sampv, size_t *sampc,
if (!ads || !sampv || !sampc || !buf || len<=4)
return EINVAL;
- if (*(uint32_t*)buf != 0) {
+ if (*(uint32_t*)(void *)buf != 0) {
error("MPA dec header is not zero %08X, not supported yet\n",
- *(uint32_t*)buf);
+ *(uint32_t*)(void *)buf);
return EPROTO;
}
@@ -153,7 +153,8 @@ int mpa_decode_frm(struct audec_state *ads, int16_t *sampv, size_t *sampc,
speex_resampler_destroy(ads->resampler);
if (samplerate != MPA_IORATE) {
ads->resampler = speex_resampler_init(channels,
- (uint32_t)samplerate, MPA_IORATE, 3, &result);
+ (uint32_t)samplerate, MPA_IORATE,
+ 3, &result);
if (result!=RESAMPLER_ERR_SUCCESS
|| ads->resampler==NULL) {
error("MPA dec upsampler failed %d\n",result);
@@ -172,9 +173,9 @@ int mpa_decode_frm(struct audec_state *ads, int16_t *sampv, size_t *sampc,
}
if (ads->resampler) {
- intermediate_len = n / 2 / ads->channels;
+ intermediate_len = (uint32_t)(n / 2 / ads->channels);
/* intermediate_len counts samples per channel */
- out_len = *sampc / 2;
+ out_len = (uint32_t)(*sampc / 2);
result=speex_resampler_process_interleaved_int(
ads->resampler, ads->intermediate_buffer,
diff --git a/modules/v4l2_codec/v4l2_codec.c b/modules/v4l2_codec/v4l2_codec.c
index 08ec746..c32955b 100644
--- a/modules/v4l2_codec/v4l2_codec.c
+++ b/modules/v4l2_codec/v4l2_codec.c
@@ -119,12 +119,16 @@ static int print_caps(int fd, unsigned width, unsigned height)
info(" Formats:\n");
while (0 == xioctl(fd, VIDIOC_ENUM_FMT, &fmtdesc)) {
- bool selected = fmtdesc.pixelformat == V4L2_PIX_FMT_H264;
+ bool selected = false;
strncpy(fourcc, (char *)&fmtdesc.pixelformat, 4);
- if (fmtdesc.pixelformat == V4L2_PIX_FMT_H264)
- support_h264 = true;
+#ifdef V4L2_PIX_FMT_H264
+ if (fmtdesc.pixelformat == V4L2_PIX_FMT_H264) {
+ support_h264 = true;
+ selected = true;
+ }
+#endif
c = fmtdesc.flags & V4L2_FMT_FLAG_COMPRESSED ? 'C' : ' ';
@@ -145,7 +149,9 @@ static int print_caps(int fd, unsigned width, unsigned height)
fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
fmt.fmt.pix.width = width;
fmt.fmt.pix.height = height;
+#ifdef V4L2_PIX_FMT_H264
fmt.fmt.pix.pixelformat = V4L2_PIX_FMT_H264;
+#endif
fmt.fmt.pix.field = V4L2_FIELD_NONE;
if (-1 == xioctl(fd, VIDIOC_S_FMT, &fmt)) {
diff --git a/modules/zrtp/module.mk b/modules/zrtp/module.mk
index 6590571..5670b98 100644
--- a/modules/zrtp/module.mk
+++ b/modules/zrtp/module.mk
@@ -7,7 +7,7 @@
MOD := zrtp
$(MOD)_SRCS += zrtp.c
$(MOD)_LFLAGS += -lzrtp -lbn
-$(MOD)_CFLAGS += -I/usr/local/include/libzrtp
+$(MOD)_CFLAGS += -isystem /usr/local/include/libzrtp
$(MOD)_CFLAGS += -Wno-strict-prototypes
include mk/mod.mk
diff --git a/rpm/baresip.spec b/rpm/baresip.spec
index 3627032..7504ffa 100644
--- a/rpm/baresip.spec
+++ b/rpm/baresip.spec
@@ -1,5 +1,5 @@
%define name baresip
-%define ver 0.4.18
+%define ver 0.4.19
%define rel 1
Summary: Modular SIP useragent
diff --git a/src/audio.c b/src/audio.c
index f317bdf..c98e35c 100644
--- a/src/audio.c
+++ b/src/audio.c
@@ -53,7 +53,7 @@
*/
enum {
- AUDIO_SAMPSZ = 6*1152,
+ AUDIO_SAMPSZ = 3*1920 /* Max samples, 48000Hz 2ch at 60ms */
};
@@ -564,6 +564,8 @@ static int aurx_stream_decode(struct aurx *rx, struct mbuf *mb)
mbuf_buf(mb), mbuf_get_left(mb));
}
else if (rx->ac->plch) {
+ sampc = rx->ac->srate * rx->ac->ch * rx->ptime / 1000;
+
err = rx->ac->plch(rx->dec, rx->sampv, &sampc);
}
else {
diff --git a/src/config.c b/src/config.c
index 6fb2a99..344a7bd 100644
--- a/src/config.c
+++ b/src/config.c
@@ -567,6 +567,7 @@ int config_write_template(const char *file, const struct config *cfg)
(void)re_fprintf(f, "#module\t\t\t" MOD_PRE "l16" MOD_EXT "\n");
(void)re_fprintf(f, "#module\t\t\t" MOD_PRE "speex" MOD_EXT "\n");
(void)re_fprintf(f, "#module\t\t\t" MOD_PRE "bv32" MOD_EXT "\n");
+ (void)re_fprintf(f, "#module\t\t\t" MOD_PRE "mpa" MOD_EXT "\n");
(void)re_fprintf(f, "\n# Audio filter Modules (in encoding order)\n");
(void)re_fprintf(f, "module\t\t\t" MOD_PRE "vumeter" MOD_EXT "\n");