added community/mediastreamer

This commit is contained in:
Kevin Mihelich 2016-12-08 02:00:14 +00:00
parent f160736baf
commit c369fb1874
3 changed files with 244 additions and 0 deletions

View file

@ -0,0 +1,39 @@
From 3d2797630cd0ad1b0dc3efdc13c94033bb327a6c Mon Sep 17 00:00:00 2001
From: Simon Morlat <simon.morlat@linphone.org>
Date: Thu, 29 Sep 2016 15:26:18 +0200
Subject: [PATCH 1/2] fix compilation issue with latest bctoobox
---
configure.ac | 2 +-
src/crypto/dtls_srtp.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index edcd4b0..1dda877 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1105,7 +1105,7 @@ fi
dnl check bctoolbox library
-PKG_CHECK_MODULES(BCTOOLBOX, bctoolbox >= 0.0.0, found_bctoolbox=true, found_bctoolbox=false)
+PKG_CHECK_MODULES(BCTOOLBOX, bctoolbox >= 0.4.0, found_bctoolbox=true, found_bctoolbox=false)
if test "$found_bctoolbox" = "true" ; then
LIBS="$LIBS $BCTOOLBOX_LIBS"
CFLAGS="$CFLAGS $BCTOOLBOX_CFLAGS"
diff --git a/src/crypto/dtls_srtp.c b/src/crypto/dtls_srtp.c
index ce0506c..b50d4d2 100644
--- a/src/crypto/dtls_srtp.c
+++ b/src/crypto/dtls_srtp.c
@@ -705,7 +705,7 @@ static int ms_dtls_srtp_initialise_bctbx_dtls_context(DtlsBcToolBoxContext *dtls
bctbx_ssl_config_set_authmode(dtlsContext->ssl_config, BCTBX_SSL_VERIFY_OPTIONAL);
bctbx_ssl_config_set_own_cert( dtlsContext->ssl_config, dtlsContext->crt, dtlsContext->pkey );
/* This is useless as peer would certainly be a self signed certificate and we won't verify it but avoid runtime warnings */
- bctbx_ssl_config_set_ca_chain(dtlsContext->ssl_config, dtlsContext->crt, NULL);
+ bctbx_ssl_config_set_ca_chain(dtlsContext->ssl_config, dtlsContext->crt);
/* we are not ready yet to actually start the ssl context, this will be done by calling bctbx_ssl_setup when stream starts */
return 0;
--
2.10.2

View file

@ -0,0 +1,157 @@
From 9870e3974a9bb3c9e2960cf2fdce31ac7fcf7ed1 Mon Sep 17 00:00:00 2001
From: Simon Morlat <simon.morlat@linphone.org>
Date: Thu, 22 Sep 2016 22:07:40 +0200
Subject: [PATCH 2/2] Fix confusion between delete_link() and remove_link()
---
src/base/eventqueue.c | 2 +-
src/base/mscommon.c | 2 +-
src/base/msticker.c | 2 +-
src/voip/ice.c | 20 ++++++++++----------
tools/bench.c | 2 +-
5 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/src/base/eventqueue.c b/src/base/eventqueue.c
index 7add8da..2b49e5e 100644
--- a/src/base/eventqueue.c
+++ b/src/base/eventqueue.c
@@ -244,7 +244,7 @@ void ms_filter_remove_notify_callback(MSFilter *f, MSFilterNotifyFunc fn, void *
}
if (found){
ms_notify_context_destroy((MSNotifyContext*)found->data);
- f->notify_callbacks=bctbx_list_remove_link(f->notify_callbacks,found);
+ f->notify_callbacks=bctbx_list_erase_link(f->notify_callbacks,found);
}else ms_warning("ms_filter_remove_notify_callback(filter=%p): no registered callback with fn=%p and ud=%p",f,fn,ud);
}
diff --git a/src/base/mscommon.c b/src/base/mscommon.c
index 52d686c..ba2b3b5 100644
--- a/src/base/mscommon.c
+++ b/src/base/mscommon.c
@@ -112,7 +112,7 @@ void ms_list_for_each3(const MSList *list, void (*func)(void *, void *, void*),
}
MSList *ms_list_remove_link(MSList *list, MSList *elem){
- return bctbx_list_remove_link(list, elem);
+ return bctbx_list_unlink(list, elem);
}
MSList *ms_list_find(MSList *list, void *data){
diff --git a/src/base/msticker.c b/src/base/msticker.c
index f1e8b4a..045f7eb 100644
--- a/src/base/msticker.c
+++ b/src/base/msticker.c
@@ -292,7 +292,7 @@ static void remove_tasks_for_filter(MSTicker *ticker, MSFilter *f){
MSFilterTask *t=(MSFilterTask*)elem->data;
nextelem=elem->next;
if (t->f==f){
- ticker->task_list=bctbx_list_remove_link(ticker->task_list,elem);
+ ticker->task_list=bctbx_list_erase_link(ticker->task_list,elem);
ms_free(t);
}
}
diff --git a/src/voip/ice.c b/src/voip/ice.c
index 91f4e7b..d00b39d 100644
--- a/src/voip/ice.c
+++ b/src/voip/ice.c
@@ -357,7 +357,7 @@ static void ice_free_candidate_pair(IceCandidatePair *pair, IceCheckList *cl)
}
while ((elem = bctbx_list_find_custom(cl->valid_list, (bctbx_compare_func)ice_find_pair_in_valid_list, pair)) != NULL) {
ice_free_valid_pair(elem->data);
- cl->valid_list = bctbx_list_remove_link(cl->valid_list, elem);
+ cl->valid_list = bctbx_list_erase_link(cl->valid_list, elem);
}
ms_free(pair);
}
@@ -666,7 +666,7 @@ static IceCandidatePair * ice_check_list_pop_triggered_check(IceCheckList *cl)
pair = bctbx_list_nth_data(cl->triggered_checks_queue, 0);
if (pair != NULL) {
/* Remove the first element in the triggered checks queue. */
- cl->triggered_checks_queue = bctbx_list_remove_link(cl->triggered_checks_queue, cl->triggered_checks_queue);
+ cl->triggered_checks_queue = bctbx_list_erase_link(cl->triggered_checks_queue, cl->triggered_checks_queue);
}
return pair;
}
@@ -2153,7 +2153,7 @@ static IceCandidatePair * ice_construct_valid_pair(IceCheckList *cl, RtpSession
local_addr_str, candidate_type_values[pair->local->type], remote_addr_str, candidate_type_values[pair->remote->type]);
elem = bctbx_list_find_custom(cl->losing_pairs, (bctbx_compare_func)ice_find_pair_from_candidates, &candidates);
if (elem != NULL) {
- cl->losing_pairs = bctbx_list_remove_link(cl->losing_pairs, elem);
+ cl->losing_pairs = bctbx_list_erase_link(cl->losing_pairs, elem);
/* Select the losing pair that has just become a valid pair. */
valid_pair->selected = TRUE;
if (ice_session_nb_losing_pairs(cl->session) == 0) {
@@ -2561,7 +2561,7 @@ static void ice_check_list_remove_stun_server_request(IceCheckList *cl, UInt96 *
if (elem != NULL) {
IceStunServerRequest *request = (IceStunServerRequest *)elem->data;
ice_stun_server_request_free(request);
- cl->stun_server_requests = bctbx_list_remove_link(cl->stun_server_requests, elem);
+ cl->stun_server_requests = bctbx_list_erase_link(cl->stun_server_requests, elem);
}
}
}
@@ -3024,10 +3024,10 @@ static void ice_check_list_eliminate_redundant_candidates(IceCheckList *cl)
other_candidate = (IceCandidate *)other_elem->data;
if (other_candidate->priority < candidate->priority) {
ice_free_candidate(other_candidate);
- cl->local_candidates = bctbx_list_remove_link(cl->local_candidates, other_elem);
+ cl->local_candidates = bctbx_list_erase_link(cl->local_candidates, other_elem);
} else {
ice_free_candidate(candidate);
- cl->local_candidates = bctbx_list_remove_link(cl->local_candidates, elem);
+ cl->local_candidates = bctbx_list_erase_link(cl->local_candidates, elem);
}
elem_removed = TRUE;
break;
@@ -3229,7 +3229,7 @@ static void ice_prune_candidate_pairs(IceCheckList *cl)
cl->pairs = bctbx_list_remove(cl->pairs, list->data);
ice_free_candidate_pair(list->data, cl);
prev = list->prev;
- cl->check_list = bctbx_list_remove_link(cl->check_list, list);
+ cl->check_list = bctbx_list_erase_link(cl->check_list, list);
list = prev;
}
}
@@ -3370,7 +3370,7 @@ static void ice_remove_waiting_and_frozen_pairs_from_list(bctbx_list_t **list, u
pair = (IceCandidatePair *)elem->data;
if (((pair->state == ICP_Waiting) || (pair->state == ICP_Frozen)) && (pair->local->componentID == componentID)) {
next = elem->next;
- *list = bctbx_list_remove_link(*list, elem);
+ *list = bctbx_list_erase_link(*list, elem);
if (next && next->prev) elem = next->prev;
else break; /* The end of the list has been reached, prevent accessing a wrong list->next */
}
@@ -3442,7 +3442,7 @@ static void ice_pair_stop_retransmissions(IceCandidatePair *pair, IceCheckList *
ice_pair_set_state(pair, ICP_Failed);
elem = bctbx_list_find(cl->triggered_checks_queue, pair);
if (elem != NULL) {
- cl->triggered_checks_queue = bctbx_list_remove_link(cl->triggered_checks_queue, elem);
+ cl->triggered_checks_queue = bctbx_list_erase_link(cl->triggered_checks_queue, elem);
}
}
}
@@ -3696,7 +3696,7 @@ static void ice_remove_gathering_stun_server_requests(IceCheckList *cl) {
if (elem != NULL) {
IceStunServerRequest *request = (IceStunServerRequest *)elem->data;
ice_stun_server_request_free(request);
- cl->stun_server_requests = bctbx_list_remove_link(cl->stun_server_requests, elem);
+ cl->stun_server_requests = bctbx_list_erase_link(cl->stun_server_requests, elem);
}
}
}
diff --git a/tools/bench.c b/tools/bench.c
index 5ea3c2f..6d8493d 100644
--- a/tools/bench.c
+++ b/tools/bench.c
@@ -298,7 +298,7 @@ static int uninit_bench(struct bench_config *bench)
bctbx_list_t *it;
for(it=bench->tsessions;it!=NULL;it=bench->tsessions){
struct test_session *ts = (struct test_session *)it->data;
- bench->tsessions = bctbx_list_remove_link(bench->tsessions, it);
+ bench->tsessions = bctbx_list_erase_link(bench->tsessions, it);
ms_ticker_detach(bench->ticker,ts->fplayer);
ms_ticker_detach(bench->ticker,ts->rtprecv);
--
2.10.2

View file

@ -0,0 +1,48 @@
# $Id$
# Maintainer:
# Contributor: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Adrià Arrufat <swiftscythe@gmail.com>
# Contributor: Mark Lee <mark@markelee.com>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - upstream patches to fix build against latest bctoolbox
pkgname=mediastreamer
pkgver=2.14.0
pkgrel=1.1
pkgdesc="A library written in C that allows you to create and run audio and video streams"
arch=('i686' 'x86_64')
url="http://www.linphone.org/"
license=('GPL')
depends=('ortp' 'ffmpeg' 'libxv' 'libupnp' 'bzrtp' 'glew' 'libsrtp' 'mbedtls' 'bctoolbox')
# xxd from Vim is needed to build
makedepends=('intltool' 'vim' 'cunit')
#source=("http://download-mirror.savannah.gnu.org/releases/linphone/${pkgname}/${pkgname}-${pkgver}.tar.gz"{,.sig})
source=("$pkgname-$pkgver.tar.gz::https://github.com/BelledonneCommunications/mediastreamer2/archive/$pkgver.tar.gz"
'0001-fix-compilation-issue-with-latest-bctoobox.patch'
'0002-Fix-confusion-between-delete_link-and-remove_link.patch')
validpgpkeys=('9774BC1725758EB16D639F8B3ECD52DEE2F56985')
md5sums=('ba7c44433b10e924036c01fdbee44040'
'3bdfff76c65a2862dd282c6cdaca2f2d'
'1e3f01ac639bae2874de59fd0c47acea')
prepare() {
cd ${pkgname}2-$pkgver
patch -p1 -i ../0001-fix-compilation-issue-with-latest-bctoobox.patch
patch -p1 -i ../0002-Fix-confusion-between-delete_link-and-remove_link.patch
}
build() {
cd ${pkgname}2-$pkgver
[ -x ./configure ] || ./autogen.sh
./configure --prefix=/usr \
--enable-glx --enable-xv --enable-zrtp --enable-external-ortp \
--disable-strict
make
}
package() {
cd ${pkgname}2-$pkgver
make DESTDIR="${pkgdir}" install
}