forked from Mirrors/freeswitch
[Core] Fix use of private headers.
This commit is contained in:
parent
78da062bd9
commit
fbf2da44d9
|
@ -310,6 +310,7 @@ library_include_HEADERS = \
|
|||
src/include/switch_jitterbuffer.h \
|
||||
src/include/switch_estimators.h \
|
||||
src/include/switch_rtcp_frame.h \
|
||||
src/include/switch_spandsp.h \
|
||||
src/include/switch_stun.h \
|
||||
src/include/switch_nat.h \
|
||||
src/include/switch_log.h \
|
||||
|
@ -385,6 +386,7 @@ libfreeswitch_la_SOURCES = \
|
|||
src/switch_ivr_say.c \
|
||||
src/switch_ivr_menu.c \
|
||||
src/switch_ivr.c \
|
||||
src/switch_spandsp.c \
|
||||
src/switch_stun.c \
|
||||
src/switch_nat.c \
|
||||
src/switch_log.c \
|
||||
|
|
|
@ -188,7 +188,7 @@ $(MODNAME).o: $(MODDIR)/$(SOURCEFILE) \
|
|||
$(switch_srcdir)/src/include/switch_event.h $(switch_srcdir)/src/include/switch_resample.h \
|
||||
$(switch_srcdir)/src/include/switch_ivr.h $(switch_srcdir)/src/include/switch_rtp.h \
|
||||
$(switch_srcdir)/src/include/switch_stun.h $(switch_srcdir)/src/include/switch_log.h \
|
||||
$(switch_srcdir)/src/include/switch_xml.h
|
||||
$(switch_srcdir)/src/include/switch_xml.h $(switch_srcdir)/src/include/switch_spandsp.h
|
||||
@echo Compiling $<...
|
||||
if test -f "$(CSOURCEFILE)" -o -f "$(MODDIR)/$(CSOURCEFILE)"; then \
|
||||
if test ! -z $(VERBOSE) ; then echo $(COMPILE) -c -o $@ `test -f '$<' || echo '$(MODDIR)/'`$< ; fi ;\
|
||||
|
@ -211,7 +211,7 @@ $(MODNAME).lo: $(MODDIR)/$(SOURCEFILE) \
|
|||
$(switch_srcdir)/src/include/switch_event.h $(switch_srcdir)/src/include/switch_resample.h \
|
||||
$(switch_srcdir)/src/include/switch_ivr.h $(switch_srcdir)/src/include/switch_rtp.h \
|
||||
$(switch_srcdir)/src/include/switch_stun.h $(switch_srcdir)/src/include/switch_log.h \
|
||||
$(switch_srcdir)/src/include/switch_xml.h
|
||||
$(switch_srcdir)/src/include/switch_xml.h $(switch_srcdir)/src/include/switch_spandsp.h
|
||||
@echo Compiling $<...
|
||||
if test -f "$(CSOURCEFILE)" -o -f "$(MODDIR)/$(CSOURCEFILE)"; then \
|
||||
if test ! -z $(VERBOSE) ; then echo $(LTCOMPILE) -c -o $@ `test -f '$<' || echo '$(MODDIR)/'`$< ; fi ;\
|
||||
|
@ -261,6 +261,8 @@ $(switch_srcdir)/src/include/switch_ivr.h:
|
|||
|
||||
$(switch_srcdir)/src/include/switch_rtp.h:
|
||||
|
||||
$(switch_srcdir)/src/include/switch_spandsp.h:
|
||||
|
||||
$(switch_srcdir)/src/include/switch_stun.h:
|
||||
|
||||
$(switch_srcdir)/src/include/switch_log.h:
|
||||
|
|
|
@ -794,3 +794,4 @@ mariadb-connector-c-*
|
|||
/spandsp*/
|
||||
/spandsp*
|
||||
win32/spandsp/spandsp.h
|
||||
win32/spandsp/win32
|
|
@ -0,0 +1,66 @@
|
|||
/*
|
||||
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
* Copyright (C) 2005-2021, Anthony Minessale II <anthm@freeswitch.org>
|
||||
*
|
||||
* Version: MPL 1.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Anthony Minessale II <anthm@freeswitch.org>
|
||||
* Portions created by the Initial Developer are Copyright (C)
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Anthony Minessale II <anthm@freeswitch.org>
|
||||
* Andrey Volk <andywolk@gmail.com>
|
||||
*
|
||||
*
|
||||
* switch_apr_pvt.h - APR
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __SWITCH_APR_PVT_H__
|
||||
#define __SWITCH_APR_PVT_H__
|
||||
|
||||
/* for apr_pool_create and apr_pool_destroy */
|
||||
/* functions only used in this file so not exposed */
|
||||
#include <apr_pools.h>
|
||||
|
||||
/* for apr_hash_make, apr_hash_pool_get, apr_hash_set */
|
||||
/* functions only used in this file so not exposed */
|
||||
#include <apr_hash.h>
|
||||
|
||||
/* for apr_pvsprintf */
|
||||
/* function only used in this file so not exposed */
|
||||
#include <apr_strings.h>
|
||||
|
||||
/* for apr_initialize and apr_terminate */
|
||||
/* function only used in this file so not exposed */
|
||||
#include <apr_general.h>
|
||||
|
||||
#include <apr_portable.h>
|
||||
|
||||
#endif // __SWITCH_APR_PVT_H__
|
||||
|
||||
/* For Emacs:
|
||||
* Local Variables:
|
||||
* mode:c
|
||||
* indent-tabs-mode:t
|
||||
* tab-width:4
|
||||
* c-basic-offset:4
|
||||
* End:
|
||||
* For VIM:
|
||||
* vim:set softtabstop=4 shiftwidth=4 tabstop=4 noet:
|
||||
*/
|
|
@ -32,32 +32,12 @@
|
|||
* this file does not exist!!!!
|
||||
*
|
||||
*/
|
||||
#define SPANDSP_NO_TIFF 1
|
||||
#include "spandsp.h"
|
||||
#include "switch_profile.h"
|
||||
|
||||
#ifndef WIN32
|
||||
#include <switch_private.h>
|
||||
#endif
|
||||
|
||||
/* for apr_pool_create and apr_pool_destroy */
|
||||
/* functions only used in this file so not exposed */
|
||||
#include <apr_pools.h>
|
||||
|
||||
/* for apr_hash_make, apr_hash_pool_get, apr_hash_set */
|
||||
/* functions only used in this file so not exposed */
|
||||
#include <apr_hash.h>
|
||||
|
||||
/* for apr_pvsprintf */
|
||||
/* function only used in this file so not exposed */
|
||||
#include <apr_strings.h>
|
||||
|
||||
/* for apr_initialize and apr_terminate */
|
||||
/* function only used in this file so not exposed */
|
||||
#include <apr_general.h>
|
||||
|
||||
#include <apr_portable.h>
|
||||
|
||||
#ifdef HAVE_MLOCKALL
|
||||
#include <sys/mman.h>
|
||||
#endif
|
||||
|
@ -175,7 +155,7 @@ struct switch_core_session {
|
|||
switch_log_level_t loglevel;
|
||||
uint32_t soft_lock;
|
||||
switch_ivr_dmachine_t *dmachine[2];
|
||||
plc_state_t *plc;
|
||||
switch_plc_state_t *plc;
|
||||
|
||||
switch_media_handle_t *media_handle;
|
||||
uint32_t decoder_errors;
|
||||
|
|
|
@ -112,6 +112,7 @@
|
|||
#include "switch_platform.h"
|
||||
#include "switch_types.h"
|
||||
#include "switch_apr.h"
|
||||
#include "switch_spandsp.h"
|
||||
#include "switch_mprintf.h"
|
||||
#include "switch_core_db.h"
|
||||
#include "switch_dso.h"
|
||||
|
|
|
@ -0,0 +1,54 @@
|
|||
/*
|
||||
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
* Copyright (C) 2005-2014, Anthony Minessale II <anthm@freeswitch.org>
|
||||
*
|
||||
* Version: MPL 1.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Anthony Minessale II <anthm@freeswitch.org>
|
||||
* Portions created by the Initial Developer are Copyright (C)
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Anthony Minessale II <anthm@freeswitch.org>
|
||||
* Andrey Volk <andrey@signalwire.com>
|
||||
*
|
||||
* switch_spandsp.h -- SpanDSP includes header
|
||||
*
|
||||
*/
|
||||
#ifndef SWITCH_SPANDSP_H
|
||||
#define SWITCH_SPANDSP_H
|
||||
|
||||
SWITCH_BEGIN_EXTERN_C
|
||||
|
||||
SWITCH_DECLARE(switch_plc_state_t *) switch_plc_init(switch_plc_state_t *s);
|
||||
SWITCH_DECLARE(int) switch_plc_free(switch_plc_state_t *s);
|
||||
SWITCH_DECLARE(int) switch_plc_rx(switch_plc_state_t *s, int16_t amp[], int len);
|
||||
SWITCH_DECLARE(int) switch_plc_fillin(switch_plc_state_t *s, int16_t amp[], int len);
|
||||
|
||||
SWITCH_END_EXTERN_C
|
||||
#endif
|
||||
|
||||
/* For Emacs:
|
||||
* Local Variables:
|
||||
* mode:c
|
||||
* indent-tabs-mode:t
|
||||
* tab-width:4
|
||||
* c-basic-offset:4
|
||||
* End:
|
||||
* For VIM:
|
||||
* vim:set softtabstop=4 shiftwidth=4 tabstop=4 noet:
|
||||
*/
|
|
@ -2324,6 +2324,7 @@ typedef int switch_os_socket_t;
|
|||
#endif
|
||||
|
||||
typedef struct apr_pool_t switch_memory_pool_t;
|
||||
typedef void* switch_plc_state_t;
|
||||
typedef uint16_t switch_port_t;
|
||||
typedef uint8_t switch_payload_t;
|
||||
typedef struct switch_app_log switch_app_log_t;
|
||||
|
|
|
@ -49,6 +49,7 @@
|
|||
#endif
|
||||
|
||||
#include <switch.h>
|
||||
#include "private/switch_apr_pvt.h"
|
||||
#include "private/switch_core_pvt.h"
|
||||
|
||||
/* pid filename: Stores the process id of the freeswitch process */
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
#include <switch_ssl.h>
|
||||
#include <switch_stun.h>
|
||||
#include <switch_nat.h>
|
||||
#include "private/switch_apr_pvt.h"
|
||||
#include "private/switch_core_pvt.h"
|
||||
#include <switch_curl.h>
|
||||
#include <switch_msrp.h>
|
||||
|
|
|
@ -422,7 +422,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_read_frame(switch_core_sessi
|
|||
|
||||
if (is_cng) {
|
||||
if (session->plc) {
|
||||
plc_fillin(session->plc, session->raw_read_frame.data, read_frame->codec->implementation->decoded_bytes_per_packet / 2);
|
||||
switch_plc_fillin(session->plc, session->raw_read_frame.data, read_frame->codec->implementation->decoded_bytes_per_packet / 2);
|
||||
is_cng = 0;
|
||||
flag &= ~SFF_CNG;
|
||||
} else {
|
||||
|
@ -470,7 +470,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_read_frame(switch_core_sessi
|
|||
if (!switch_test_flag(read_frame->codec, SWITCH_CODEC_FLAG_HAS_PLC) &&
|
||||
(switch_channel_test_flag(session->channel, CF_JITTERBUFFER_PLC) ||
|
||||
switch_channel_test_flag(session->channel, CF_CNG_PLC)) && !session->plc) {
|
||||
session->plc = plc_init(NULL);
|
||||
session->plc = switch_plc_init(NULL);
|
||||
}
|
||||
|
||||
if (!switch_test_flag(read_frame->codec, SWITCH_CODEC_FLAG_HAS_PLC) && session->plc && switch_test_flag(read_frame, SFF_PLC)) {
|
||||
|
@ -519,10 +519,10 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_read_frame(switch_core_sessi
|
|||
if (status == SWITCH_STATUS_SUCCESS && session->read_impl.number_of_channels == 1) {
|
||||
if (session->plc) {
|
||||
if (switch_test_flag(read_frame, SFF_PLC)) {
|
||||
plc_fillin(session->plc, session->raw_read_frame.data, session->raw_read_frame.datalen / 2);
|
||||
switch_plc_fillin(session->plc, session->raw_read_frame.data, session->raw_read_frame.datalen / 2);
|
||||
switch_clear_flag(read_frame, SFF_PLC);
|
||||
} else {
|
||||
plc_rx(session->plc, session->raw_read_frame.data, session->raw_read_frame.datalen / 2);
|
||||
switch_plc_rx(session->plc, session->raw_read_frame.data, session->raw_read_frame.datalen / 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -40,6 +40,8 @@
|
|||
#include <sofia-sip/sdp.h>
|
||||
#include <sofia-sip/su.h>
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
static switch_t38_options_t * switch_core_media_process_udptl(switch_core_session_t *session, sdp_session_t *sdp, sdp_media_t *m);
|
||||
static void switch_core_media_find_zrtp_hash(switch_core_session_t *session, sdp_session_t *sdp);
|
||||
static void switch_core_media_set_r_sdp_codec_string(switch_core_session_t *session, const char *codec_string, sdp_session_t *sdp, switch_sdp_type_t sdp_type);
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
*/
|
||||
|
||||
#include <switch.h>
|
||||
#include "private/switch_apr_pvt.h"
|
||||
#include "private/switch_core_pvt.h"
|
||||
|
||||
//#define DEBUG_ALLOC
|
||||
|
|
|
@ -1585,7 +1585,7 @@ SWITCH_DECLARE(void) switch_core_session_perform_destroy(switch_core_session_t *
|
|||
switch_mutex_unlock(runtime.session_hash_mutex);
|
||||
|
||||
if ((*session)->plc) {
|
||||
plc_free((*session)->plc);
|
||||
switch_plc_free((*session)->plc);
|
||||
(*session)->plc = NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,65 @@
|
|||
/*
|
||||
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
* Copyright (C) 2005-2015, Anthony Minessale II <anthm@freeswitch.org>
|
||||
*
|
||||
* Version: MPL 1.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/F
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Michael Jerris <mike@jerris.com>
|
||||
* Portions created by the Initial Developer are Copyright (C)
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Michael Jerris <mike@jerris.com>
|
||||
* Andrey Volk <andrey@signalwrie.com>
|
||||
*
|
||||
* switch_spandsp.c -- spandsp wrappers and extensions
|
||||
*
|
||||
*/
|
||||
|
||||
#include <switch.h>
|
||||
|
||||
#define SPANDSP_NO_TIFF 1
|
||||
#include "spandsp.h"
|
||||
|
||||
SWITCH_DECLARE(switch_plc_state_t *) switch_plc_init(switch_plc_state_t *s) {
|
||||
return (switch_plc_state_t *)plc_init((plc_state_t *)s);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(int) switch_plc_free(switch_plc_state_t *s) {
|
||||
return plc_free((plc_state_t *)s);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(int) switch_plc_fillin(switch_plc_state_t *s, int16_t amp[], int len) {
|
||||
return plc_fillin((plc_state_t *)s, amp, len);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(int) switch_plc_rx(switch_plc_state_t* s, int16_t amp[], int len)
|
||||
{
|
||||
return plc_rx((plc_state_t*)s, amp, len);
|
||||
}
|
||||
|
||||
|
||||
/* For Emacs:
|
||||
* Local Variables:
|
||||
* mode:c
|
||||
* indent-tabs-mode:t
|
||||
* tab-width:4
|
||||
* c-basic-offset:4
|
||||
* End:
|
||||
* For VIM:
|
||||
* vim:set softtabstop=4 shiftwidth=4 tabstop=4 noet:
|
||||
*/
|
|
@ -33,6 +33,7 @@
|
|||
|
||||
#include <switch.h>
|
||||
#include <stdio.h>
|
||||
#include "private/switch_apr_pvt.h"
|
||||
#include "private/switch_core_pvt.h"
|
||||
|
||||
#ifdef HAVE_TIMERFD_CREATE
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
*/
|
||||
|
||||
#include <switch.h>
|
||||
#include "private/switch_apr_pvt.h"
|
||||
#ifndef WIN32
|
||||
#include <arpa/inet.h>
|
||||
#if defined(HAVE_SYS_TIME_H) && defined(HAVE_SYS_RESOURCE_H)
|
||||
|
|
|
@ -48,3 +48,6 @@ Makefile
|
|||
conf/*/
|
||||
conf_playsay/*/
|
||||
conf_async/*/
|
||||
x64
|
||||
win32
|
||||
*.vcxproj.user
|
|
@ -407,6 +407,7 @@ if not exist "$(OutDir)fonts" xcopy "$(SolutionDir)fonts\*.*" "$(OutDir)fonts\"
|
|||
<ClCompile Include="..\..\src\switch_rtp.c" />
|
||||
<ClCompile Include="..\..\src\switch_scheduler.c" />
|
||||
<ClCompile Include="..\..\src\switch_sdp.c" />
|
||||
<ClCompile Include="..\..\src\switch_spandsp.c" />
|
||||
<ClCompile Include="..\..\src\switch_stun.c" />
|
||||
<ClCompile Include="..\..\src\switch_time.c" />
|
||||
<ClCompile Include="..\..\src\switch_utils.c" />
|
||||
|
@ -742,6 +743,7 @@ if not exist "$(OutDir)fonts" xcopy "$(SolutionDir)fonts\*.*" "$(OutDir)fonts\"
|
|||
<ClInclude Include="..\..\src\include\switch_resample.h" />
|
||||
<ClInclude Include="..\..\src\include\switch_rtp.h" />
|
||||
<ClInclude Include="..\..\src\include\switch_scheduler.h" />
|
||||
<ClInclude Include="..\..\src\include\switch_spandsp.h" />
|
||||
<ClInclude Include="..\..\src\include\switch_stun.h" />
|
||||
<ClInclude Include="..\..\src\include\switch_types.h" />
|
||||
<ClInclude Include="..\..\src\include\switch_utils.h" />
|
||||
|
|
Loading…
Reference in New Issue