/* mediastreamer2 library - modular sound and video processing and streaming Copyright (C) 2006-2013 Belledonne Communications, Grenoble 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/mediastream.h" #include "mediastreamer2/dtmfgen.h" #include "mediastreamer2/msfileplayer.h" #include "mediastreamer2/msfilerec.h" #include "mediastreamer2/msrtp.h" #include "mediastreamer2/mstonedetector.h" #include "mediastreamer2_tester.h" #include "mediastreamer2_tester_private.h" static int tester_before_all(void) { /* ms_init(); ms_filter_enable_statistics(TRUE); ortp_init();*/ return 0; } static int tester_after_all(void) { /* ms_exit();*/ return 0; } static void filter_register_tester(void) { MSFilter* filter; MSFactory* factory = NULL; factory = ms_factory_new_with_voip(); BC_ASSERT_PTR_NOT_NULL(ms_factory_lookup_filter_by_name(factory, "MSVoidSource")); BC_ASSERT_PTR_NOT_NULL(ms_factory_lookup_filter_by_name(factory, "MSVoidSource")); filter= ms_factory_create_decoder(factory, "pcma"); BC_ASSERT_PTR_NOT_NULL(filter); ms_filter_destroy(filter); BC_ASSERT_PTR_NOT_NULL(ms_factory_lookup_filter_by_name(factory,"MSVoidSource")); filter= ms_factory_create_decoder(factory, "pcma"); BC_ASSERT_PTR_NOT_NULL(filter); ms_filter_destroy(filter); ms_factory_destroy(factory); } #ifdef VIDEO_ENABLED static void test_video_processing (void) { MSVideoSize src_size = { MS_VIDEO_SIZE_VGA_W, MS_VIDEO_SIZE_VGA_H }; MSVideoSize src_dest = { MS_VIDEO_SIZE_VGA_W, MS_VIDEO_SIZE_VGA_H }; mblk_t * yuv_block2; YuvBuf yuv; int y_bytes_per_row = src_size.width + src_size.width%32 ; uint8_t* y = (uint8_t*)ms_malloc(y_bytes_per_row*src_size.height); /*to allow bloc to work with multiple of 32*/ int crcb_bytes_per_row = src_size.width/2 + (src_size.width/2)%32 ; uint8_t* cbcr = (uint8_t*)ms_malloc(crcb_bytes_per_row*src_size.height); int i,j; MSYuvBufAllocator *yba = ms_yuv_buf_allocator_new(); for (i=0;i