Commit 28895a6d authored by Sandrine Avakian's avatar Sandrine Avakian

Merge branch 'master' of git.linphone.org:mediastreamer2 into dev_codecbv16

parents 133e2f69 2512a468
......@@ -98,6 +98,7 @@ cmake_dependent_option(ENABLE_THEORA "Enable theora video codec support." YES "E
cmake_dependent_option(ENABLE_VPX "Build mediastreamer2 with VPX codec." YES "ENABLE_VIDEO" NO)
option(ENABLE_MKV "Enable support of MKV files reading and writing." YES)
cmake_dependent_option(ENABLE_QNX "Build medistreamer2 with BB10 filters." NO "ENABLE_VIDEO" NO)
cmake_dependent_option(ENABLE_VT_H264 "Build mediastreamer2 with H264 encoder/decoder based on VirtualToolbox (Apple only)" YES "ENABLE_VIDEO" NO)
macro(apply_compile_flags SOURCE_FILES)
......@@ -163,21 +164,6 @@ if(ENABLE_PCAP)
find_package(PCAP QUIET)
endif()
if(ENABLE_UNIT_TESTS)
find_package(CUnit)
if(CUNIT_FOUND)
cmake_push_check_state(RESET)
list(APPEND CMAKE_REQUIRED_INCLUDES ${CUNIT_INCLUDE_DIRS})
list(APPEND CMAKE_REQUIRED_LIBRARIES ${CUNIT_LIBRARIES})
check_symbol_exists("CU_get_suite" "CUnit/CUnit.h" HAVE_CU_GET_SUITE)
check_symbol_exists("CU_curses_run_tests" "CUnit/CUnit.h" HAVE_CU_CURSES)
cmake_pop_check_state()
else()
message(WARNING "Could not find the cunit library!")
set(ENABLE_UNIT_TESTS OFF CACHE BOOL "Enable compilation of unit tests." FORCE)
endif()
endif()
if(ENABLE_SRTP)
find_package(SRTP)
if(NOT SRTP_FOUND)
......@@ -464,10 +450,13 @@ endif()
set(LINK_FLAGS )
if(APPLE)
list(APPEND LINK_FLAGS "-framework CoreFoundation" "-framework AudioToolbox" "-framework CoreAudio")
if(IOS)
if(IOS) # Necessary for Mediastreamer's tools and testers
list(APPEND LINK_FLAGS "-framework Foundation" "-framework QuartzCore" "-framework OpenGLES" "-framework UIKit" "-framework AVFoundation")
if(ENABLE_VIDEO)
list(APPEND LINK_FLAGS "-framework CoreGraphics" "-framework CoreMedia" "-framework CoreVideo")
if(ENABLE_VT_H264) # Necessary on iOS for Mediastreamer's tools and testers
list(APPEND LINK_FLAGS "-framework VideoToolbox")
endif()
endif()
else()
list(APPEND LINK_FLAGS "-framework AppKit")
......@@ -476,6 +465,9 @@ if(APPLE)
endif()
if(ENABLE_VIDEO)
list(APPEND LINK_FLAGS "-framework Cocoa" "-framework OpenGL" "-framework QuartzCore" "-framework QTKit")
if(ENABLE_VT_H264)
list(APPEND LINK_FLAGS "-framework VideoToolbox -framework CoreMedia")
endif()
endif()
add_definitions("-DTARGET_OS_MAC=1")
endif()
......
......@@ -47,6 +47,8 @@ extern MSFilterDesc ms_aac_eld_enc_desc;
extern MSFilterDesc ms_aac_eld_dec_desc;
extern MSFilterDesc ms_opus_dec_desc;
extern MSFilterDesc ms_opus_enc_desc;
extern MSFilterDesc ms_vt_h264_enc;
extern MSFilterDesc ms_vt_h264_dec;
MSFilterDesc * ms_voip_filter_descs[]={
&ms_alaw_dec_desc,
......@@ -80,7 +82,9 @@ MSFilterDesc * ms_voip_filter_descs[]={
&ms_pix_conv_desc,
&ms_size_conv_desc,
&ms_static_image_desc,
&ms_h264_dec_desc,
&ms_vt_h264_enc,
&ms_vt_h264_dec,
//&ms_h264_dec_desc,
&ms_jpeg_writer_desc,
&ms_mire_desc,
&ms_ext_display_desc,
......
############################################################################
# FindCUnit.txt
# Copyright (C) 2015 Belledonne Communications, Grenoble France
#
############################################################################
#
# 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.
#
############################################################################
#
# - Find the CUnit include file and library
#
# CUNIT_FOUND - system has CUnit
# CUNIT_INCLUDE_DIRS - the CUnit include directory
# CUNIT_LIBRARIES - The libraries needed to use CUnit
include(CheckIncludeFile)
include(CheckLibraryExists)
set(_CUNIT_ROOT_PATHS
${CMAKE_INSTALL_PREFIX}
)
find_path(CUNIT_INCLUDE_DIRS
NAMES CUnit/CUnit.h
HINTS _CUNIT_ROOT_PATHS
PATH_SUFFIXES include
)
if(CUNIT_INCLUDE_DIRS)
set(HAVE_CUNIT_CUNIT_H 1)
endif()
find_library(CUNIT_LIBRARIES
NAMES cunit
HINTS ${_CUNIT_ROOT_PATHS}
PATH_SUFFIXES bin lib
)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(CUnit
DEFAULT_MSG
CUNIT_INCLUDE_DIRS CUNIT_LIBRARIES
)
mark_as_advanced(CUNIT_INCLUDE_DIRS CUNIT_LIBRARIES)
......@@ -147,6 +147,10 @@ typedef enum MSFilterId{
MS_VAD_DTX_ID,
MS_BB10_DISPLAY_ID,
MS_BB10_CAPTURE_ID,
MS_VT_H263_ENC_ID,
MS_VT_H263_DEC_ID,
MS_VT_H264_ENC_ID,
MS_VT_H264_DEC_ID,
MS_RTT_4103_SOURCE_ID,
MS_RTT_4103_SINK_ID,
MS_MEDIACODEC_H264_DEC_ID,
......@@ -155,5 +159,4 @@ typedef enum MSFilterId{
MS_BV16_ENC_ID
} MSFilterId;
#endif
......@@ -47,6 +47,11 @@ static MS2_INLINE void ms_queue_put(MSQueue *q, mblk_t *m){
return;
}
static MS2_INLINE void ms_queue_insert(MSQueue *q, mblk_t *em, mblk_t *m) {
insq(&q->q, em, m);
return;
}
static MS2_INLINE mblk_t * ms_queue_peek_last(MSQueue *q){
return qlast(&q->q);
}
......
......@@ -234,8 +234,8 @@ typedef enum{
typedef struct _MSPicture{
int w,h;
uint8_t *planes[4]; /*we usually use 3 planes, 4th is for compatibility */
int strides[4]; /*with ffmpeg's swscale.h */
uint8_t *planes[4]; /* we usually use 3 planes, 4th is for compatibility with ffmpeg's swscale.h */
int strides[4]; /* Bytes per row */
}MSPicture;
typedef struct _MSPicture YuvBuf; /*for backward compatibility*/
......
......@@ -147,6 +147,8 @@ set(VOIP_SOURCE_FILES_C
utils/g722.h
utils/g722_decode.c
utils/g722_encode.c
utils/h264utils.h
utils/h264utils.c
utils/kiss_fft.c
utils/kiss_fft.h
utils/kiss_fftr.c
......@@ -281,6 +283,9 @@ if(ENABLE_VIDEO)
)
endif()
endif()
if(ENABLE_VT_H264 AND APPLE)
list(APPEND VOIP_SOURCE_FILES_C videofilters/videotoolbox.c)
endif()
if (ENABLE_QNX)
list(APPEND VOIP_SOURCE_FILES_CXX
videofilters/bb10_display.cpp
......
......@@ -56,13 +56,17 @@ static void android_display_init(MSFilter *f){
}
ad->get_bitmap_id=(*jenv)->GetMethodID(jenv,wc,"getBitmap", "()Landroid/graphics/Bitmap;");
ad->update_id=(*jenv)->GetMethodID(jenv,wc,"update","()V");
ad->request_orientation_id=(*jenv)->GetMethodID(jenv,wc,"requestOrientation","(I)V");
//ad->request_orientation_id=(*jenv)->GetMethodID(jenv,wc,"requestOrientation","(I)V");
(*jenv)->DeleteLocalRef(jenv,wc);
f->data=ad;
}
static void android_display_uninit(MSFilter *f){
AndroidDisplay *ad=(AndroidDisplay*)f->data;
JNIEnv *jenv=ms_get_jni_env();
if (ad->jbitmap) {
(*jenv)->DeleteGlobalRef(jenv, ad->jbitmap);
}
if (ad->sws){
ms_scaler_context_free (ad->sws);
ad->sws=NULL;
......@@ -184,8 +188,11 @@ static int android_display_set_window(MSFilter *f, void *arg){
}
ad->orientation_change_pending=FALSE;
ms_filter_unlock(f);
if (ad->jbitmap!=NULL) ms_message("New java bitmap given with w=%i,h=%i,stride=%i,format=%i",
if (ad->jbitmap!=NULL) {
ms_message("New java bitmap given with w=%i,h=%i,stride=%i,format=%i",
ad->bmpinfo.width,ad->bmpinfo.height,ad->bmpinfo.stride,ad->bmpinfo.format);
ad->jbitmap = (*jenv)->NewGlobalRef(jenv, ad->jbitmap);
}
return 0;
}
......
/*
mediastreamer2 library - modular sound and video processing and streaming
Copyright (C) 2015 Belledonne Communications <info@belledonne-communications.com>
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 "h264utils.h"
#include <mediastreamer2/msqueue.h>
static void push_nalu(const uint8_t *begin, const uint8_t *end, MSQueue *nalus){
const uint8_t *src=begin;
size_t nalu_len = (end-begin);
uint8_t nalu_byte = *src++;
mblk_t *m=allocb(nalu_len,0);
// Removal of the 3 in a 003x sequence
// This emulation prevention byte is normally part of a NAL unit.
/* H.264 standard sys in par 7.4.1 page 58
emulation_prevention_three_byte is a byte equal to 0x03.
When an emulation_prevention_three_byte is present in a NAL unit, it shall be discarded by the decoding process.
Within the NAL unit, the following three-byte sequence shall not occur at any byte-aligned position: 0x000000, 0x000001, 0x00002
*/
*m->b_wptr++=nalu_byte;
unsigned ecount = 0;
while (src<end-3) {
if (src[0]==0 && src[1]==0 && src[2]==3){
*m->b_wptr++=0;
*m->b_wptr++=0;
// drop the emulation_prevention_three_byte
src+=3;
++ecount;
continue;
}
*m->b_wptr++=*src++;
}
*m->b_wptr++=*src++;
*m->b_wptr++=*src++;
*m->b_wptr++=*src++;
ms_queue_put(nalus, m);
}
void ms_h264_bitstream_to_nalus(const uint8_t *bitstream, size_t size, MSQueue *nalus){
int i;
const uint8_t *p,*begin=NULL;
int zeroes=0;
for(i=0,p=bitstream;i<size;++i){
if (*p==0){
++zeroes;
}else if (zeroes>=2 && *p==1 ){
if (begin){
push_nalu(begin, p-zeroes, nalus);
}
begin=p+1;
}else zeroes=0;
++p;
}
if (begin) push_nalu(begin, p, nalus);
}
MSH264NaluType ms_h264_nalu_get_type(const mblk_t *nalu) {
return (*nalu->b_rptr) & ((1<<5)-1);
}
void ms_h264_stream_to_nalus(const uint8_t *frame, size_t size, MSQueue *nalus, int *idr_count) {
const uint8_t *ptr = frame;
if(idr_count) *idr_count = 0;
while (ptr < frame + size) {
uint32_t nalu_size;
mblk_t *nalu;
MSH264NaluType nalu_type;
memcpy(&nalu_size, ptr, 4);
nalu_size = ntohl(nalu_size);
nalu = allocb(nalu_size, 0);
memcpy(nalu->b_wptr, ptr+4, nalu_size);
ptr+=nalu_size+4;
nalu->b_wptr+=nalu_size;
nalu_type = ms_h264_nalu_get_type(nalu);
if(idr_count && nalu_type == MSH264NaluTypeIDR) (*idr_count)++;
ms_queue_put(nalus, nalu);
}
}
/*
mediastreamer2 library - modular sound and video processing and streaming
Copyright (C) 2015 Belledonne Communications <info@belledonne-communications.com>
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 H264_UTILS_H
#define H264_UTILS_H
#include <mediastreamer2/msqueue.h>
/**
* Enumeration that lists the different type of NAL unit
*/
typedef enum {
MSH264NaluTypeIDR = 5,
MSH264NaluTypeSPS = 7,
MSH264NaluTypePPS = 8
} MSH264NaluType;
/**
* Get the type of a NAL unit
* @param nalu The NAL unit to analyse
* @return The nalu type
*/
MSH264NaluType ms_h264_nalu_get_type(const mblk_t *nalu);
/**
* Slices a bitstream buffer into several nal units.
*
* Nal units are stored in freshly allocated mblk_t buffers which are pushed into
* a queue. This function does not alter the buffer where the bitstream is contained in.
* @param bitstream Pointer on a memory segment that contains the bitstream to slice.
* @param size Size of the memory segment.
* @param nalus A queue where produced nal units will be pushed into.
*/
void ms_h264_bitstream_to_nalus(const uint8_t *bitstream, size_t size, MSQueue *nalus);
/**
* Slices a frame into several nal units.
*
* Same as ms_h264_bitstream_to_nalus() except that the stream must be in size-prefixed
* format i.e. each nalu in the stream must be prefixed by its size encoded on 4 bytes big-endian.
* @param frame Buffer containing the stream to slice
* @param size Size of the buffer
* @param nalus The queue where produced nal units will be pushed into
* @param idr_count If not NULL, use the pointer to store the number of IDR nalus found in the stream.
*/
void ms_h264_stream_to_nalus(const uint8_t *frame, size_t size, MSQueue *nalus, int *idr_count);
#endif /* defined(H264_UTILS_H) */
This diff is collapsed.
......@@ -700,7 +700,7 @@ bool_t ice_check_list_is_mismatch(const IceCheckList *cl)
IceCheckList * ice_session_check_list(const IceSession *session, int n)
{
if (n <0 || n >= ICE_SESSION_MAX_CHECK_LISTS) return NULL;
if (n >= ICE_SESSION_MAX_CHECK_LISTS) return NULL;
return session->streams[n];
}
......
......@@ -292,11 +292,7 @@ void ms_factory_init_voip(MSFactory *obj){
}
#endif
#if defined(VIDEO_ENABLED) && defined(MS2_FILTERS) && !defined(NO_FFMPEG) && defined(HAVE_LIBAVCODEC_AVCODEC_H)
ms_ffmpeg_check_init();
__register_ffmpeg_encoders_if_possible(obj);
__register_ffmpeg_h264_decoder_if_possible(obj);
#endif
#if defined(ANDROID) && defined (VIDEO_ENABLED)
if (1) {
......
......@@ -21,7 +21,6 @@
############################################################################
set(SOURCE_FILES_C
common/bc_tester_utils.c
mediastreamer2_adaptive_tester.c
mediastreamer2_audio_stream_tester.c
mediastreamer2_basic_audio_tester.c
......@@ -54,15 +53,14 @@ apply_compile_flags(SOURCE_FILES_OBJC "CPP" "OBJC")
if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
add_library(mediastreamer2_tester_static STATIC ${SOURCE_FILES_C})
target_include_directories(mediastreamer2_tester_static PUBLIC ${CUNIT_INCLUDE_DIRS} PRIVATE common)
target_link_libraries(mediastreamer2_tester_static mediastreamer_voip mediastreamer_base ${CUNIT_LIBRARIES})
target_include_directories(mediastreamer2_tester_static PUBLIC ${BCTOOLBOX_INCLUDE_DIRS})
target_link_libraries(mediastreamer2_tester_static mediastreamer_voip mediastreamer_base ${BCTOOLBOX_LIBRARIES})
set(RUNTIME_COMPONENT_SOURCES
mediastreamer2_tester_windows.cpp
mediastreamer2_tester_windows.h
)
add_library(mediastreamer2_tester_runtime MODULE ${RUNTIME_COMPONENT_SOURCES})
target_include_directories(mediastreamer2_tester_runtime PRIVATE common)
target_include_directories(mediastreamer2_tester_runtime PRIVATE "../../../mswinrtvid") # HACK!!
target_link_libraries(mediastreamer2_tester_runtime mediastreamer2_tester_static)
set_target_properties(mediastreamer2_tester_runtime PROPERTIES VS_WINRT_COMPONENT TRUE)
......@@ -86,8 +84,8 @@ if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
else()
add_executable(mediastreamer2_tester ${SOURCE_FILES_C} ${SOURCE_FILES_OBJC})
target_include_directories(mediastreamer2_tester PUBLIC ${CUNIT_INCLUDE_DIRS} PRIVATE common)
target_link_libraries(mediastreamer2_tester mediastreamer_voip mediastreamer_base ${CUNIT_LIBRARIES})
target_include_directories(mediastreamer2_tester PUBLIC ${BCTOOLBOX_INCLUDE_DIRS})
target_link_libraries(mediastreamer2_tester mediastreamer_voip mediastreamer_base ${BCTOOLBOX_LIBRARIES})
string(REPLACE ";" " " LINK_FLAGS_STR "${LINK_FLAGS}")
if(LINK_FLAGS_STR)
set_target_properties(mediastreamer2_tester PROPERTIES LINK_FLAGS "${LINK_FLAGS_STR}")
......
......@@ -18,8 +18,7 @@ mediastreamer2_tester_SOURCES= \
mediastreamer2_text_stream_tester.c \
mediastreamer2_framework_tester.c \
mediastreamer2_player_tester.c \
mediastreamer2_neon_tester.c \
common/bc_tester_utils.c common/bc_tester_utils.h
mediastreamer2_neon_tester.c
AM_CPPFLAGS=\
-DBC_CONFIG_FILE=\"mediastreamer-config.h\" \
......
# Copyright (C) 2012 Belledonne Comunications, Grenoble, France
#
# 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.
# Created by Gautier Pelloux-Prayer on 2014/10/24.
# This script adds auto-completion for liblinphone_tester binary for Bash and
# Zsh. To use it, just type: `source liblinphone_completion`, then for each
# supported exectuable (see end of file), you will get auto-completions.
# To use it permanently, source this file in your .rc file (.bashrc or .zshrc).
_liblinphone_complete() {
local completions command_requiring_argument prev_arg latest_arg available_tasks has_not_set_suite suite_name
if [ -n "$BASH_VERSION" ]; then
set -- "${COMP_WORDS[@]}" #convert them to arguments (eg $1,$#,$@,etc.)
elif [ -n "$ZSH_VERSION" ]; then
local args
read -cA args #read list of arguments user entered
set -- "${args[@]}" #convert them to arguments (eg $1,$#,$@,etc.)
fi
#skip program name
program=$1
shift
# if user required help, do not complete anything
if ! grep -q -- "--help" <<< "$@"; then
# retrieve the last argument
latest_arg=""
prev_arg=""
latest_is_empty=0
for arg in "$@"; do
if [ ! -z "$arg" ]; then
prev_arg="$latest_arg"
latest_arg="$arg"
else
latest_is_empty=1
fi
done
# get the tasks available, from --help
available_tasks="$($program 2>&1 --help | sed -nE "s/.*--([^ ]*).*/--\\1/p")"
# these commands expect an argument
command_requiring_argument="$($program 2>&1 --help | sed -nE "s/.*--(.*) <.*/--\\1/p")"
# remove all already provided tasks (it's useless to provide them twice)
if [[ ! -z "$@" ]]; then
current_tasks=$(echo $@ | grep -Eo -- "--([^ ])*" | tr '\n' '|' | sed 's/|/$|/g')--$
if [ ! -z "$current_tasks" ]; then
available_tasks=$(echo "$available_tasks" | grep -vE -- "(${current_tasks})")
fi
fi
# remove --test option if --suite is not provided yet!
has_not_set_suite=$(grep -q -- "--suite" <<< "$@"; echo $?)
if [ $has_not_set_suite = 1 ]; then
available_tasks=$(echo "$available_tasks" | grep -v -- --test)
fi
# if latest arg does not start with '--', it is a custom value
if [ $latest_is_empty = 0 ] && ! grep -q -- '^--' <<< "$latest_arg"; then
if [ "$prev_arg" = "--test" ] && [ $has_not_set_suite = 0 ]; then
suite_name=$(echo $@ | sed -nE 's/.*--suite ([^(--)]*) (--.*)$/\1/p' |sed "s@\\\\@@g")
completions="$($program --list-tests $suite_name)"
elif [ "$prev_arg" = "--suite" ] || [ "$prev_arg" = "--list-tests" ]; then
completions="$($program --list-suites)"
fi
elif [ "$latest_arg" = "--test" ]; then
# list available tests if --suite was provided
if [ $has_not_set_suite = 0 ]; then
suite_name=$(echo $@ | sed -nE 's/.*--suite ([^(--)]*) (--.*)/\1/p' |sed "s@\\\\@@g")
completions="$($program --list-tests $suite_name)"
fi
elif [ "$latest_arg" = "--suite" ] || [ "$latest_arg" = "--list-tests" ]; then
completions="$($program --list-suites)"
# we are waiting for a custom value, so do not hint anything
elif [[ ! -z "$latest_arg" ]] && grep -q -- "^$latest_arg$" <<< "$command_requiring_argument"; then
completions=""
else
completions="$available_tasks"
fi
fi
if [ ! -z "$completions" ]; then
if [ -n "$BASH_VERSION" ]; then
IFS=$'\n' #if that even necessary?
COMPREPLY=($(compgen -W "${completions}" -- ${COMP_WORDS[COMP_CWORD]}))
elif [ -n "$ZSH_VERSION" ]; then
reply=( "${(ps:\n:)completions}" )
fi
fi
}
for tester in liblinphone_tester mediastreamer2_tester belle_sip_tester pcap_playback \
bench mediastream msaudiocmp mtudiscover videodisplay linphone lpc2xml_test \
lp-gen-wrappers xml2lpc_test; do
if [ -n "$BASH_VERSION" ]; then
complete -F _liblinphone_complete $tester
elif [ -n "$ZSH_VERSION" ]; then
compctl -K _liblinphone_complete $tester
else
echo "Your shell might be not supported! Only bash and zsh tested."
fi
done
This diff is collapsed.
This diff is collapsed.
......@@ -46,7 +46,7 @@ static void log_handler(int lev, const char *fmt, va_list args) {
void mediastreamer2_tester_init(void(*ftester_printf)(int level, const char *fmt, va_list args)) {
if (ftester_printf == NULL) ftester_printf = log_handler;
bc_tester_init(ftester_printf, ORTP_MESSAGE, ORTP_ERROR);
bc_tester_init(ftester_printf, ORTP_MESSAGE, ORTP_ERROR, "sounds");
bc_tester_add_suite(&basic_audio_test_suite);
bc_tester_add_suite(&sound_card_test_suite);
......
......@@ -20,7 +20,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifndef _MEDIASTREAMER2_TESTER_H
#define _MEDIASTREAMER2_TESTER_H
#include "bc_tester_utils.h"
#include <bctoolbox/tester.h>
#include <mediastreamer2/mediastream.h>
......
......@@ -18,7 +18,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "mediastreamer2_tester_private.h"
#include "bc_tester_utils.h"
#include <bctoolbox/tester.h>
#include "mediastreamer2/dtmfgen.h"
#include "mediastreamer2/msfileplayer.h"
......@@ -103,7 +103,7 @@ void ms_tester_create_filters(unsigned int filter_mask, MSFactory * f) {
MSSndCard *captcard;
MSWebCam *camera;
CREATE_FILTER(FILTER_MASK_FILEPLAY, ms_tester_fileplay,f, MS_FILE_PLAYER_ID);
CREATE_FILTER(FILTER_MASK_FILEREC, ms_tester_filerec,f, MS_FILE_REC_ID);
......
......@@ -42,25 +42,27 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifdef __APPLE__
#include <CoreFoundation/CFRunLoop.h>
#endif
#if TARGET_OS_IPHONE || defined (ANDROID)
#if TARGET_OS_IPHONE
#import <UIKit/UIKit.h>
#include <AudioToolbox/AudioToolbox.h>
#endif
#if TARGET_OS_IPHONE || defined (ANDROID)
extern void ms_set_video_stream(VideoStream* video);
#ifdef HAVE_X264
#if TARGET_OS_IPHONE || defined(HAVE_X264)
extern void libmsx264_init();
#endif
#ifdef HAVE_OPENH264
#if TARGET_OS_IPHONE || defined(HAVE_OPENH264)
extern void libmsopenh264_init();
#endif
#ifdef HAVE_SILK
#if TARGET_OS_IPHONE || defined(HAVE_SILK)
extern void libmssilk_init();
#endif
#ifdef HAVE_WEBRTC
#if TARGET_OS_IPHONE || defined(HAVE_WEBRTC)
extern void libmswebrtc_init();
#endif
#endif
#endif // TARGET_OS_IPHONE || defined (ANDROID)
#ifdef ANDROID
#include <android/log.h>
......@@ -690,16 +692,16 @@ void setup_media_streams(MediastreamDatas* args) {
factory = ms_factory_new_with_voip();
#if TARGET_OS_IPHONE || defined(ANDROID)
#if defined (HAVE_X264) && defined (VIDEO_ENABLED)
#if TARGET_OS_IPHONE || (defined(HAVE_X264) && defined(VIDEO_ENABLED))
libmsx264_init(); /*no plugin on IOS/Android */
#endif
#if defined (HAVE_OPENH264) && defined (VIDEO_ENABLED)
#if TARGET_OS_IPHONE || (defined (HAVE_OPENH264) && defined (VIDEO_ENABLED))
libmsopenh264_init(); /*no plugin on IOS/Android */
#endif
#if defined (HAVE_SILK)
#if TARGET_OS_IPHONE || defined (HAVE_SILK)
libmssilk_init(); /*no plugin on IOS/Android */
#endif
#if defined (HAVE_WEBRTC)
#if TARGET_OS_IPHONE || defined (HAVE_WEBRTC)
libmswebrtc_init();
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment