Commit 89a29efe authored by Simon Morlat's avatar Simon Morlat

Add test suite for oRTP-1.0.0 new jitter buffer.

parent 2de7d15c
......@@ -828,7 +828,7 @@ if test "$ortp_enabled" = 'true'; then
fi
fi
if test "$external_ortp" = 'true'; then
PKG_CHECK_MODULES(ORTP, ortp >= 0.24.1, ,
PKG_CHECK_MODULES(ORTP, ortp >= 1.0.0, ,
[ AC_MSG_ERROR([Couldn't find ortp library]) ] )
fi
else
......@@ -981,29 +981,32 @@ fi
AM_CONDITIONAL(BUILD_V4L1, test x$found_v4l1 = xyes )
AM_CONDITIONAL(BUILD_V4L2, test x$found_v4l2 = xyes )
AC_PATH_PROG(PCAP,pcap-config,false)
AM_CONDITIONAL(HAVE_PCAP, test $PCAP != false)
AC_ARG_ENABLE(pcap,
[AS_HELP_STRING([--enable-pcap], [Enable pcap library (default=no)])],
[AS_HELP_STRING([--enable-pcap], [Enable pcap library (default=auto)])],
[case "${enableval}" in
yes) enable_pcap=yes ;;
no) enable_pcap=no ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-pcap) ;;
esac],
[enable_pcap=no]
[enable_pcap=auto]
)
AM_CONDITIONAL(ENABLE_PCAP, test x$enable_pcap = xyes)
if test x$enable_pcap == xyes ; then
if test x$enable_pcap != xno ; then
AC_PATH_PROG(PCAP,pcap-config,false)
if test $PCAP != false ; then
PCAP_LIBS=`pcap-config --libs`
PCAP_CFLAGS=`pcap-config --cflags`
AC_SUBST(PCAP_LIBS)
AC_SUBST(PCAP_CFLAGS)
AC_DEFINE(HAVE_PCAP,1,[whether we compile with libpcap support])
enable_pcap=yes
else
enable_pcap=no
fi
fi
AM_CONDITIONAL(ENABLE_PCAP, test x$enable_pcap = xyes)
dnl ##################################################
......@@ -1307,4 +1310,5 @@ printf "* %-30s %s\n" "Video support" $video
printf "* %-30s %s\n" "sRTP encryption" $have_srtp
printf "* %-30s %s\n" "zRTP encryption" $zrtp
printf "* %-30s %s\n" "Non-free codecs" $non_free_codecs
printf "* %-30s %s\n" "pcap support" $enable_pcap
......@@ -73,6 +73,8 @@ set(HEADER_FILES
zrtp.h
msrtt4103.h
msasync.h
msudp.h
mspcapfileplayer.h
)
set(MEDIASTREAMER2_HEADER_FILES )
......
......@@ -52,7 +52,9 @@ mediastreamer2_include_HEADERS=allfilters.h \
upnp_igd.h \
x11_helper.h \
zrtp.h \
msasync.h
msasync.h \
mspcapfileplayer.h \
msudp.h
EXTRA_DIST=$(mediastreamer2_include_HEADERS)
......@@ -156,7 +156,9 @@ typedef enum MSFilterId{
MS_MEDIACODEC_H264_DEC_ID,
MS_MEDIACODEC_H264_ENC_ID,
MS_BV16_DEC_ID,
MS_BV16_ENC_ID
MS_BV16_ENC_ID,
MS_UDP_SEND_ID,
MS_PCAP_FILE_PLAYER_ID
} MSFilterId;
#endif
/*
mediastreamer2 library - modular sound and video processing and streaming
Copyright (C) 2006 Simon MORLAT (simon.morlat@linphone.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef mspcapfileplayer_h
#define mspcapfileplayer_h
#include <mediastreamer2/msfilter.h>
/**
* This enum provides two differents outputs of the filter depending on your use case.
* If you want to plug this filter directly to a decoder, you may want to skip RTP header
* and directly get payload data using @MSPCAPFilePlayerLayerPayload. If you want to
* send these packet over the network, you may want to keep the RTP header using
* @MSPCAPFilePlayerLayerRTP.
**/
typedef enum _MSPCAPFilePlayerLayer {
MSPCAPFilePlayerLayerRTP, /* skip IP, UDP, but keeps RTP header + underlying layers */
MSPCAPFilePlayerLayerPayload, /* skip IP, UDP, RTP, but keeps RTP content */
} MSPCAPFilePlayerLayer;
/**
* This enum provides two differents way of incrementing time depending on your use case.
* If you want to play packets at the rate they were encoded, you should use @MSPCAPFilePlayerTimeRefRTP
* which contains timestamps value written by the encoder.
* Instead, if you want to replay a receiver-based PCAP stream as it was heard by the receiver,
* you should use @MSPCAPFilePlayerTimeRefCapture.
*/
typedef enum _MSPCAPFilePlayerTimeRef {
MSPCAPFilePlayerTimeRefRTP, /* use timestamps contained in RTP header to replay packets, written by the encoder */
MSPCAPFilePlayerTimeRefCapture, /* use time of packet capture to replay them, specially useful in case of receiver-based capture */
} MSPCAPFilePlayerTimeRef;
/*methods*/
#define MS_PCAP_FILE_PLAYER_SET_LAYER MS_FILTER_METHOD(MS_PCAP_FILE_PLAYER_ID,0,MSPCAPFilePlayerLayer)
#define MS_PCAP_FILE_PLAYER_SET_TIMEREF MS_FILTER_METHOD(MS_PCAP_FILE_PLAYER_ID,1,MSPCAPFilePlayerTimeRef)
#define MS_PCAP_FILE_PLAYER_SET_TO_PORT MS_FILTER_METHOD(MS_PCAP_FILE_PLAYER_ID,2,unsigned)
#endif
/*
mediastreamer2 library - modular sound and video processing and streaming
Copyright (C) 2006 Simon MORLAT (simon.morlat@linphone.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef msudp_hh
#define msudp_hh
#include <mediastreamer2/msfilter.h>
typedef struct _MSIPPort {
char *ip;
int port;
} MSIPPort;
#define MS_UDP_SEND_SET_DESTINATION MS_FILTER_METHOD(MS_UDP_SEND_ID,1,const MSIPPort*)
extern MSFilterDesc ms_udp_send_desc;
#endif
......@@ -45,4 +45,5 @@ src/videofilters/x11video.c
src/videofilters/msdscap.cc
src/voip/ice.c
src/audiofilters/msgenericplc.c
src/otherfilters/mspcapfileplayer.c
......@@ -168,6 +168,8 @@ set(VOIP_SOURCE_FILES_C
utils/kiss_fft.h
utils/kiss_fftr.c
utils/kiss_fftr.h
utils/pcap_sender.c
utils/pcap_sender.h
utils/stream_regulator.c
voip/audioconference.c
voip/audiostream.c
......@@ -184,6 +186,7 @@ set(VOIP_SOURCE_FILES_C
voip/qualityindicator.c
otherfilters/rfc4103_source.c
otherfilters/rfc4103_sink.c
otherfilters/msudp.c
voip/rfc4103_textstream.c
voip/ringstream.c
voip/stun.c
......@@ -428,6 +431,10 @@ if(MATROSKA2_FOUND)
)
endif()
if(PCAP_FOUND)
list(APPEND VOIP_SOURCE_FILES_C src/otherfilters/mspcapfileplayer.c)
endif()
set(VOIP_SOURCE_FILES_ALL ${VOIP_SOURCE_FILES_C} ${VOIP_SOURCE_FILES_CXX} ${VOIP_SOURCE_FILES_OBJC})
add_custom_target(ms2-voipdescs-header
......
......@@ -91,6 +91,10 @@ libmediastreamer_voip_la_SOURCES=
nodist_EXTRA_libmediastreamer_base_la_SOURCES = dummy.cxx
if ENABLE_PCAP
libmediastreamer_voip_la_SOURCES += otherfilters/mspcapfileplayer.c
endif
if ORTP_ENABLED
BUILT_SOURCES+=voipdescs.h
libmediastreamer_voip_la_SOURCES+= voip/private.h \
......@@ -104,6 +108,7 @@ libmediastreamer_voip_la_SOURCES+= voip/private.h \
voip/msmediaplayer.c \
voip/ice.c \
otherfilters/msrtp.c \
otherfilters/msudp.c \
voip/qualityindicator.c \
voip/audioconference.c \
voip/bitratedriver.c \
......@@ -113,7 +118,8 @@ libmediastreamer_voip_la_SOURCES+= voip/private.h \
voip/stun.c \
crypto/ms_srtp.c \
crypto/dtls_srtp.c \
voip/msiframerequestslimiter.c
voip/msiframerequestslimiter.c \
utils/pcap_sender.c utils/pcap_sender.h
else
libmediastreamer_base_la_SOURCES+= ortp-deps/logging.c \
ortp-deps/port.c \
......
......@@ -26,6 +26,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "mediastreamer2/msutils.h"
#include "mediastreamer2/msvaddtx.h"
#include "ortp/utils.h"
#ifdef HAVE_G729B
#include "bcg729/encoder.h"
#endif
......@@ -40,7 +42,7 @@ typedef struct _VadDtxContext{
int silence_mode;/*set to 1 if a silence period is running*/
#ifndef HAVE_G729B
float energy;
ortp_extremum max;
OrtpExtremum max;
#else
bcg729EncoderChannelContextStruct *encoderChannelContext;
MSBufferizer *bufferizer;
......
......@@ -24,6 +24,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "mediastreamer2/msvolume.h"
#include "mediastreamer2/msticker.h"
#include "mediastreamer2/msutils.h"
#include "ortp/utils.h"
#include <math.h>
#ifdef HAVE_SPEEXDSP
......@@ -72,8 +73,8 @@ typedef struct Volume{
float ng_floorgain;
float ng_gain;
MSBufferizer *buffer;
ortp_extremum min;
ortp_extremum max;
OrtpExtremum min;
OrtpExtremum max;
bool_t agc_enabled;
bool_t noise_gate_enabled;
bool_t remove_dc;
......
This diff is collapsed.
/*
mediastreamer2 library - modular sound and video processing and streaming
Copyright (C) 2006 Simon MORLAT (simon.morlat@linphone.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "mediastreamer2/mscommon.h"
#include "mediastreamer2/msticker.h"
#include "mediastreamer2/msudp.h"
#include "mediastreamer2/msfileplayer.h"
#if defined(__cplusplus)
#define B64_NO_NAMESPACE
#endif
#include "ortp/b64.h"
struct SenderData {
// Contains both destination ip and port
struct addrinfo *dst_info;
ortp_socket_t sockfd;
};
typedef struct SenderData SenderData;
static void sender_init(MSFilter * f)
{
f->data = ms_new0(SenderData, 1);
}
static void sender_uninit(MSFilter * f)
{
SenderData *d = (SenderData *) f->data;
if (d->sockfd != (ortp_socket_t)-1) {
close_socket(d->sockfd);
}
if (d->dst_info != NULL) {
freeaddrinfo(d->dst_info);
}
ms_free(d);
}
static void sender_process(MSFilter * f)
{
SenderData *d = (SenderData *) f->data;
mblk_t *im;
ms_filter_lock(f);
while ((im = ms_queue_get(f->inputs[0])) != NULL) {
int error;
msgpullup(im, -1);
error = sendto(
d->sockfd,
im->b_rptr,
(int) (im->b_wptr - im->b_rptr),
0,
d->dst_info->ai_addr,
d->dst_info->ai_addrlen
);
if (error == -1) {
ms_error("Failed to send UDP packet: errno=%d", errno);
}
}
ms_filter_unlock(f);
}
static int sender_set_destination(MSFilter *f, void *arg) {
SenderData *d = (SenderData *) f->data;
const MSIPPort * destination = (const MSIPPort*)arg;
int err;
char port[10];
struct addrinfo hints;
int family = PF_INET;
/* Try to get the address family of the host (PF_INET or PF_INET6). */
memset(&hints, 0, sizeof(hints));
hints.ai_family = PF_UNSPEC;
hints.ai_flags = AI_NUMERICHOST;
err = getaddrinfo(destination->ip, NULL, &hints, &d->dst_info);
memset(&hints,0,sizeof(hints));
hints.ai_socktype = SOCK_DGRAM;
if (err == 0) {
hints.ai_family = d->dst_info->ai_family;
freeaddrinfo(d->dst_info);
}
snprintf(port,sizeof(port),"%i",destination->port);
err=getaddrinfo(destination->ip,port,&hints,&d->dst_info);
if (err!=0){
ms_error("getaddrinfo() failed: %s\n",gai_strerror(err));
return -1;
}
d->sockfd = socket(family,SOCK_DGRAM,0);
if (d->sockfd==-1){
ms_error("socket() failed: %d\n",errno);
return -1;
}
return 0;
}
static MSFilterMethod sender_methods[] = {
{MS_UDP_SEND_SET_DESTINATION, sender_set_destination},
{0, NULL}
};
MSFilterDesc ms_udp_send_desc = {
MS_UDP_SEND_ID,
"MSUdpSend",
"UDP output filter",
MS_FILTER_OTHER,
NULL,
1,
0,
sender_init,
NULL,
sender_process,
NULL,
sender_uninit,
sender_methods,
MS_FILTER_IS_PUMP
};
MS_FILTER_DESC_EXPORT(ms_udp_send_desc)
/*
mediastreamer2 library - modular sound and video processing and streaming
Copyright (C) 2006 Simon MORLAT (simon.morlat@linphone.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "pcap_sender.h"
#include "mediastreamer2/msudp.h"
#include "mediastreamer2/mspcapfileplayer.h"
#include "mediastreamer2/msfileplayer.h"
static void ms_pcap_stop(MSPCAPSender *s) {
MSConnectionHelper h;
// notify user callback
if (s->pcap_ended_cb != NULL) {
s->pcap_ended_cb(s, s->pcap_ended_user_data);
}
//then delete and free the graph
ms_ticker_detach(s->ticker, s->file_player);
ms_connection_helper_unlink(&h,s->file_player,-1,0);
ms_connection_helper_unlink(&h,s->udp_send,0,-1);
ms_filter_destroy(s->file_player);
ms_filter_destroy(s->udp_send);
ms_ticker_destroy(s->ticker);
ms_free(s);
}
static void reader_notify_cb(void *user_data, MSFilter *f, unsigned int event, void *eventdata)
{
if (event == MS_FILE_PLAYER_EOF) {
ms_message("Reached end of file, stopping PCAP Sender");
ms_pcap_stop((MSPCAPSender*)user_data);
}
}
MSPCAPSender* ms_pcap_sendto(MSFactory *factory, const char* filepath, unsigned to_port, const MSIPPort *dest,
int sample_rate, MSPCAPFileEnded cb, void* user_data) {
MSTickerParams params;
MSConnectionHelper h;
MSPCAPSender * s;
MSFilter *udp_sender;
MSFilter *file_player;
int pcap_filter_property = MSPCAPFilePlayerLayerRTP;
if (sample_rate < 0 || dest == NULL || dest->ip == NULL || dest->port < 0) {
return NULL;
}
/*First try to set the destination*/
udp_sender = ms_factory_create_filter(factory, MS_UDP_SEND_ID);
if (ms_filter_call_method(udp_sender, MS_UDP_SEND_SET_DESTINATION, (void*)dest) != 0) {
ms_error("Failed to set destination, aborting");
ms_filter_destroy(udp_sender);
return NULL;
}
/*Secondly try to open the PCAP file*/
file_player = ms_factory_create_filter(factory,MS_PCAP_FILE_PLAYER_ID);
if (ms_filter_call_method(file_player, MS_PLAYER_OPEN, (void*)filepath) != 0) {
ms_error("Failed to open file %s, aborting", filepath);
ms_filter_destroy(file_player);
ms_filter_destroy(udp_sender);
return NULL;
}
if (ms_filter_call_method(file_player, MS_PCAP_FILE_PLAYER_SET_TO_PORT, (void*)&to_port) != 0) {
ms_error("Failed to set to port, aborting");
ms_filter_destroy(file_player);
ms_filter_destroy(udp_sender);
return NULL;
}
s = ms_new0(MSPCAPSender, 1);
s->udp_send = udp_sender;
s->file_player = file_player;
s->pcap_ended_cb = cb;
s->pcap_ended_user_data = user_data;
ms_filter_call_method(s->file_player, MS_PCAP_FILE_PLAYER_SET_LAYER, &pcap_filter_property);
pcap_filter_property = MSPCAPFilePlayerTimeRefCapture;
ms_filter_call_method(s->file_player, MS_PCAP_FILE_PLAYER_SET_TIMEREF, &pcap_filter_property);
ms_filter_call_method(s->file_player, MS_FILTER_SET_SAMPLE_RATE, &sample_rate);
ms_filter_add_notify_callback(s->file_player, reader_notify_cb, s, FALSE);
ms_filter_call_method_noarg(s->file_player, MS_PLAYER_START);
params.name = "MSUDP ticker";
params.prio = MS_TICKER_PRIO_REALTIME;
s->ticker = ms_ticker_new_with_params(&params);
ms_connection_helper_start(&h);
ms_connection_helper_link(&h, s->file_player, -1, 0);
ms_connection_helper_link(&h, s->udp_send, 0, -1);
ms_ticker_attach(s->ticker, s->file_player);
return s;
}
/*
mediastreamer2 library - modular sound and video processing and streaming
Copyright (C) 2006 Simon MORLAT (simon.morlat@linphone.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef PCAP_SENDER_H
#define PCAP_SENDER_H
#include "mediastreamer2/mscommon.h"
#include "mediastreamer2/msticker.h"
#include "mediastreamer2/msudp.h"
struct _MSPCAPSender;
/**
* User callback which will be called when PCAP sender has
* reached end of file or has been stopped
*/
typedef void (*MSPCAPFileEnded)(struct _MSPCAPSender*,void * user_data);
typedef struct _MSPCAPSender {
MSFilter *file_player;
MSFilter *udp_send;
MSTicker *ticker;
MSPCAPFileEnded pcap_ended_cb;
void* pcap_ended_user_data;
} MSPCAPSender;
/**
* @brief Send a PCAP file over UDP network to a given destination.
* @details The given PCAP file must contain RTP packets which
* will not be modified when sent. Only UDP/IP headers will be
* recreated to send them to the given destination. It is user
* role to ensure that the PCAP file given is valid.
* To generate a valid pcap file, you should record some real traffic
* and then filter it using something like: "rtp && !rtpevent && udp.dstport = some_port"
* @param factory the MSFactory
* @param filepath Path to a valid PCAP
* @param from_port only send packets with the given source port value in the PCAP file. Set to 0 to send all packets.
* @param dest IP/port destination of the RTP packets
* @param sample_rate The rate to which file must be read. It should be the payload rate
* @param cb User callback which will be called when the file has been played entirely or when stop method was called.
* @return the created PCAP sender or NULL if parameters are invalid
*/
MSPCAPSender* ms_pcap_sendto(MSFactory *factory, const char* filepath, unsigned from_port, const MSIPPort* dest,
int sample_rate, MSPCAPFileEnded cb, void* user_data);
#endif
......@@ -798,8 +798,7 @@ int audio_stream_start_from_io(AudioStream *stream, RtpProfile *profile, const c
}
rtp_session_set_payload_type(rtps,payload);
if (rem_rtp_port>0)
ms_filter_call_method(stream->ms.rtpsend,MS_RTP_SEND_SET_SESSION,rtps);
ms_filter_call_method(stream->ms.rtpsend,MS_RTP_SEND_SET_SESSION,rtps);
stream->ms.rtprecv=ms_factory_create_filter(stream->ms.factory,MS_RTP_RECV_ID);
ms_filter_call_method(stream->ms.rtprecv,MS_RTP_RECV_SET_SESSION,rtps);
stream->ms.sessions.rtp_session=rtps;
......
......@@ -51,7 +51,24 @@ set(SOUND_FILES
)
set(SCENARIO_FILES
scenarios/congestion/video-160-120-0f20c60.pcapng
scenarios/congestion/audio-80-75-0c60.pcapng
scenarios/congestion/audio-80-75-0f35c95f120.pcapng
scenarios/congestion/video-160-0-0a5f30.pcapng
scenarios/congestion/video-160-90-0a5c30.pcapng
scenarios/pcmu_8k_no_jitter.pcap
scenarios/rtp-60late-500total.pcapng
scenarios/firstvalid.pcapng
scenarios/opus-edge-congestion20_60_40.pcapng
scenarios/h264_one_nalu_per_frame.pcap
scenarios/poor_jitter_quality_22_filter.pcapng
scenarios/rtp-120late-1000total.pcapng
scenarios/rtp-240late-2000total.pcapng
scenarios/h264_missing_pps_in_second_i_frame.pcap
scenarios/rtp-534late-24loss-7000total.pcapng
scenarios/secondvalid.pcapng
scenarios/opus-poor-quality.pcapng
scenarios/poor_jitter_quality_22.pcapng
)
set(IOS_RESOURCES_FILES
......@@ -70,6 +87,7 @@ set(SOURCE_FILES_C
mediastreamer2_tester.c
mediastreamer2_tester_private.c
mediastreamer2_text_stream_tester.c
mediastreamer2_jitterbuffer_tester.c
)
set(SOURCE_FILES_OBJC )
......
......@@ -18,7 +18,12 @@ mediastreamer2_tester_SOURCES= \
mediastreamer2_text_stream_tester.c \
mediastreamer2_framework_tester.c \
mediastreamer2_player_tester.c \
mediastreamer2_neon_tester.c
mediastreamer2_neon_tester.c \
mediastreamer2_jitterbuffer_tester.c
if ENABLE_PCAP
mediastreamer2_tester_SOURCES += mediastreamer2_codec_impl_testers.c
endif
AM_CPPFLAGS=\
-DBC_CONFIG_FILE=\"mediastreamer-config.h\" \
......
......@@ -31,14 +31,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
static RtpProfile rtp_profile;
#define OPUS_PAYLOAD_TYPE 121
#define SPEEX_PAYLOAD_TYPE 122
#define SILK16_PAYLOAD_TYPE 123
#define PCMA8_PAYLOAD_TYPE 8
#define BV16_PAYLOAD_TYPE 127
#define H263_PAYLOAD_TYPE 34
#define H264_PAYLOAD_TYPE 102
#define VP8_PAYLOAD_TYPE 103
#define EDGE_BW 10
#define THIRDGENERATION_BW 200
......
......@@ -29,10 +29,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
static RtpProfile rtp_profile;
static MSFactory *_factory= NULL;
#define OPUS_PAYLOAD_TYPE 121
#define SPEEX16_PAYLOAD_TYPE 122
#define SILK16_PAYLOAD_TYPE 123
#define PCMA8_PAYLOAD_TYPE 8
static int tester_before_all(void) {
//ms_init();
......@@ -106,7 +102,7 @@ static void event_queue_cb(MediaStream *ms, void *user_pointer) {
while ((ev = ortp_ev_queue_get(st->q)) != NULL) {
OrtpEventType evt = ortp_event_get_type(ev);
OrtpEventData *d = ortp_event_get_data(ev);
if (evt == ORTP_EVENT_TMMBR_RECEIVED) {
if (evt == ORTP_EVENT_RTCP_PACKET_RECEIVED) {
do {
if (rtcp_is_RTPFB(d->packet)) {
switch (rtcp_RTPFB_get_type(d->packet)) {
......
This diff is collapsed.
......@@ -63,6 +63,7 @@ void mediastreamer2_tester_init(void(*ftester_printf)(int level, const char *fmt
bc_tester_add_suite(&text_stream_test_suite);
#ifdef HAVE_PCAP
bc_tester_add_suite(&codec_impl_test_suite);
bc_tester_add_suite(&jitterbuffer_test_suite);
#endif
}
......
......@@ -28,12 +28,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "mediastreamer-config.h"
#endif
#include <mediastreamer2/mediastream.h>
#ifdef HAVE_CONFIG_H
#include "mediastreamer-config.h"
#endif
#ifdef __cplusplus
extern "C" {
#endif
......@@ -48,6 +42,7 @@ extern test_suite_t player_test_suite;
extern test_suite_t text_stream_test_suite;
#ifdef HAVE_PCAP
extern test_suite_t codec_impl_test_suite;
extern test_suite_t jitterbuffer_test_suite;
#endif
#ifdef __ARM_NEON__
extern test_suite_t neon_test_suite;
......@@ -58,6 +53,7 @@ extern test_suite_t neon_test_suite;
#endif
MSWebCam* mediastreamer2_tester_get_mire_webcam(MSWebCamManager *mgr);
MSWebCam * mediastreamer2_tester_get_mire(MSFactory *factory);
void mediastreamer2_tester_init(void(*ftester_printf)(int level, const char *fmt, va_list args));
void mediastreamer2_tester_uninit(void);
int mediastreamer2_tester_set_log_file(const char *filename);
......
......@@ -215,6 +215,21 @@ void ms_tester_tone_generation_and_detection_loop(void) {
}
}
RtpProfile *ms_tester_create_rtp_profile(void) {