Freeswitch-svn
Threads by month
- ----- 2026 -----
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
April 2007
- 5 participants
- 221 discussions
Author: anthm
Date: Fri Apr 20 10:39:21 2007
New Revision: 4986
Modified:
freeswitch/trunk/src/mod/codecs/mod_g729/mod_g729.c
Log:
add more codec sizes to g729 passthru
Modified: freeswitch/trunk/src/mod/codecs/mod_g729/mod_g729.c
==============================================================================
--- freeswitch/trunk/src/mod/codecs/mod_g729/mod_g729.c (original)
+++ freeswitch/trunk/src/mod/codecs/mod_g729/mod_g729.c Fri Apr 20 10:39:21 2007
@@ -212,6 +212,47 @@
/* Registration */
+static const switch_codec_implementation_t g729_40ms_8k_implementation = {
+ /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
+ /*.ianacode */ 18,
+ /*.iananame */ "G729",
+ /*.fmtp */ NULL,
+ /*.samples_per_second */ 8000,
+ /*.bits_per_second */ 128000,
+ /*.microseconds_per_frame */ 40000,
+ /*.samples_per_frame */ 320,
+ /*.bytes_per_frame */ 640,
+ /*.encoded_bytes_per_frame */ 40,
+ /*.number_of_channels */ 1,
+ /*.pref_frames_per_packet */ 1,
+ /*.max_frames_per_packet */ 1,
+ /*.init */ switch_g729_init,
+ /*.encode */ switch_g729_encode,
+ /*.decode */ switch_g729_decode,
+ /*.destroy */ switch_g729_destroy,
+};
+
+static const switch_codec_implementation_t g729_30ms_8k_implementation = {
+ /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
+ /*.ianacode */ 18,
+ /*.iananame */ "G729",
+ /*.fmtp */ NULL,
+ /*.samples_per_second */ 8000,
+ /*.bits_per_second */ 96000,
+ /*.microseconds_per_frame */ 30000,
+ /*.samples_per_frame */ 240,
+ /*.bytes_per_frame */ 480,
+ /*.encoded_bytes_per_frame */ 30,
+ /*.number_of_channels */ 1,
+ /*.pref_frames_per_packet */ 1,
+ /*.max_frames_per_packet */ 1,
+ /*.init */ switch_g729_init,
+ /*.encode */ switch_g729_encode,
+ /*.decode */ switch_g729_decode,
+ /*.destroy */ switch_g729_destroy,
+ &g729_40ms_8k_implementation
+};
+
static const switch_codec_implementation_t g729_10ms_8k_implementation = {
/*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
/*.ianacode */ 18,
@@ -230,6 +271,7 @@
/*.encode */ switch_g729_encode,
/*.decode */ switch_g729_decode,
/*.destroy */ switch_g729_destroy,
+ &g729_30ms_8k_implementation
};
static const switch_codec_implementation_t g729_8k_implementation = {
1
0
Author: mikej
Date: Fri Apr 20 00:00:25 2007
New Revision: 4985
Modified:
freeswitch/trunk/libs/xmlrpc-c/GNUmakefile
Log:
fix solaris build
Modified: freeswitch/trunk/libs/xmlrpc-c/GNUmakefile
==============================================================================
--- freeswitch/trunk/libs/xmlrpc-c/GNUmakefile (original)
+++ freeswitch/trunk/libs/xmlrpc-c/GNUmakefile Fri Apr 20 00:00:25 2007
@@ -7,7 +7,7 @@
include $(SRCDIR)/Makefile.config
-SUBDIRS = include src lib tools examples
+SUBDIRS = include src lib tools
PROGRAMS_TO_INSTALL = xmlrpc-c-config
1
0
[commit] r4984 - in freeswitch/trunk/libs: codec/gsm js/nsprpub/lib/ds js/nsprpub/lib/libc/src js/nsprpub/pr/src udns
by Freeswitch SVN 20 Apr '07
by Freeswitch SVN 20 Apr '07
20 Apr '07
Author: mikej
Date: Thu Apr 19 23:51:00 2007
New Revision: 4984
Modified:
freeswitch/trunk/libs/codec/gsm/Makefile.am
freeswitch/trunk/libs/js/nsprpub/lib/ds/plarena.c
freeswitch/trunk/libs/js/nsprpub/lib/ds/plds.def
freeswitch/trunk/libs/js/nsprpub/lib/ds/plhash.c
freeswitch/trunk/libs/js/nsprpub/lib/libc/src/plc.def
freeswitch/trunk/libs/js/nsprpub/lib/libc/src/plerror.c
freeswitch/trunk/libs/js/nsprpub/pr/src/nspr.def
freeswitch/trunk/libs/udns/udns.h
freeswitch/trunk/libs/udns/udns_resolver.c
Log:
solaris porting
Modified: freeswitch/trunk/libs/codec/gsm/Makefile.am
==============================================================================
--- freeswitch/trunk/libs/codec/gsm/Makefile.am (original)
+++ freeswitch/trunk/libs/codec/gsm/Makefile.am Thu Apr 19 23:51:00 2007
@@ -4,7 +4,7 @@
NAME=libgsm
AM_CC=gcc
-AM_CFLAGS = -I./inc -DNeedFunctionPrototypes=1 -funroll-loops -fPIC -DSASR -DNDEBUG -DWAV49
+AM_CFLAGS = -I./inc -DNeedFunctionPrototypes=1 -fPIC -DSASR -DNDEBUG -DWAV49
AM_CPPFLAGS = $(AM_CFLAGS)
lib_LTLIBRARIES = libgsm.la
Modified: freeswitch/trunk/libs/js/nsprpub/lib/ds/plarena.c
==============================================================================
--- freeswitch/trunk/libs/js/nsprpub/lib/ds/plarena.c (original)
+++ freeswitch/trunk/libs/js/nsprpub/lib/ds/plarena.c Thu Apr 19 23:51:00 2007
@@ -103,7 +103,7 @@
PR_Unlock( arenaLock );
return;
} /* end UnlockArena() */
-
+#if 0
PR_IMPLEMENT(void) PL_InitArenaPool(
PLArenaPool *pool, const char *name, PRUint32 size, PRUint32 align)
{
@@ -126,7 +126,7 @@
arena_stats_list = &pool->stats;
#endif
}
-
+#endif
/*
** PL_ArenaAllocate() -- allocate space from an arena pool
Modified: freeswitch/trunk/libs/js/nsprpub/lib/ds/plds.def
==============================================================================
--- freeswitch/trunk/libs/js/nsprpub/lib/ds/plds.def (original)
+++ freeswitch/trunk/libs/js/nsprpub/lib/ds/plds.def Thu Apr 19 23:51:00 2007
@@ -70,8 +70,6 @@
PL_HashTableRawLookup;
PL_HashTableRawRemove;
PL_HashTableRemove;
-PL_InitArenaPool;
-PL_NewHashTable;
libVersionPoint;
;+ local: *;
;+};
Modified: freeswitch/trunk/libs/js/nsprpub/lib/ds/plhash.c
==============================================================================
--- freeswitch/trunk/libs/js/nsprpub/lib/ds/plhash.c (original)
+++ freeswitch/trunk/libs/js/nsprpub/lib/ds/plhash.c Thu Apr 19 23:51:00 2007
@@ -107,7 +107,7 @@
DefaultAllocTable, DefaultFreeTable,
DefaultAllocEntry, DefaultFreeEntry
};
-
+#if 0
PR_IMPLEMENT(PLHashTable *)
PL_NewHashTable(PRUint32 n, PLHashFunction keyHash,
PLHashComparator keyCompare, PLHashComparator valueCompare,
@@ -153,7 +153,7 @@
ht->allocPriv = allocPriv;
return ht;
}
-
+#endif
PR_IMPLEMENT(void)
PL_HashTableDestroy(PLHashTable *ht)
{
Modified: freeswitch/trunk/libs/js/nsprpub/lib/libc/src/plc.def
==============================================================================
--- freeswitch/trunk/libs/js/nsprpub/lib/libc/src/plc.def (original)
+++ freeswitch/trunk/libs/js/nsprpub/lib/libc/src/plc.def Thu Apr 19 23:51:00 2007
@@ -55,9 +55,7 @@
PL_Base64Encode;
PL_CreateOptState;
PL_DestroyOptState;
-PL_FPrintError;
PL_GetNextOpt;
-PL_PrintError;
PL_strcasecmp;
PL_strcaserstr;
PL_strcasestr;
Modified: freeswitch/trunk/libs/js/nsprpub/lib/libc/src/plerror.c
==============================================================================
--- freeswitch/trunk/libs/js/nsprpub/lib/libc/src/plerror.c (original)
+++ freeswitch/trunk/libs/js/nsprpub/lib/libc/src/plerror.c Thu Apr 19 23:51:00 2007
@@ -46,6 +46,7 @@
#include "prprf.h"
#include "prerror.h"
+#if 0
PR_IMPLEMENT(void) PL_FPrintError(PRFileDesc *fd, const char *msg)
{
static const char *tags[] =
@@ -148,7 +149,7 @@
if (NULL == fd) fd = PR_GetSpecialFD(PR_StandardError);
PL_FPrintError(fd, msg);
} /* PL_PrintError */
-
+#endif
#if defined(WIN16)
/*
** libmain() is a required function for win16
Modified: freeswitch/trunk/libs/js/nsprpub/pr/src/nspr.def
==============================================================================
--- freeswitch/trunk/libs/js/nsprpub/pr/src/nspr.def (original)
+++ freeswitch/trunk/libs/js/nsprpub/pr/src/nspr.def Thu Apr 19 23:51:00 2007
@@ -52,11 +52,7 @@
;+ global:
LIBRARY nspr4 ;-
EXPORTS ;-
- LL_MaxInt;
- LL_MinInt;
- LL_Zero;
PR_Abort;
- PR_AddToCounter;
PR_Accept;
PR_AcceptRead;
PR_Access;
@@ -67,25 +63,16 @@
PR_AtomicDecrement;
PR_AtomicIncrement;
PR_AtomicSet;
- PR_AttachSharedMemory;
PR_AttachThread;
PR_Available;
PR_Available64;
PR_Bind;
PR_BlockClockInterrupts;
PR_BlockInterrupt;
- PR_CEnterMonitor;
- PR_CExitMonitor;
- PR_CNotify;
- PR_CNotifyAll;
- PR_CSetOnMonitorRecycle;
- PR_CWait;
PR_CallOnce;
PR_Calloc;
- PR_CancelJob;
PR_CancelWaitFileDesc;
PR_CancelWaitGroup;
- PR_CeilingLog2;
PR_ChangeFileDescNativeHandle;
PR_Cleanup;
PR_ClearInterrupt;
@@ -94,11 +81,8 @@
PR_CloseDir;
PR_CloseFileMap;
PR_CloseSemaphore;
- PR_CloseSharedMemory;
PR_Connect;
- PR_CreateCounter;
PR_ConvertIPv4AddrToIPv6;
- PR_CreateAlarm;
PR_CreateFileMap;
PR_CreateIOLayerStub;
PR_CreateOrderedLock;
@@ -110,30 +94,20 @@
PR_CreateStack;
PR_CreateThread;
PR_CreateThreadGCAble;
- PR_CreateTrace;
- PR_CreateThreadPool;
- PR_DecrementCounter;
PR_CreateWaitGroup;
PR_Delete;
PR_DeleteSemaphore;
- PR_DeleteSharedMemory;
- PR_DestroyAlarm;
- PR_DestroyCounter;
PR_DestroyCondVar;
PR_DestroyLock;
PR_DestroyMWaitEnumerator;
PR_DestroyOrderedLock;
PR_DestroyMonitor;
- PR_DestroyPollableEvent;
PR_DestroyProcessAttr;
- PR_DestroyRWLock;
PR_DestroySem;
PR_DestroySocketPollFd;
- PR_DestroyTrace;
PR_DestroyStack;
PR_DestroyWaitGroup;
PR_DetachProcess;
- PR_DetachSharedMemory;
PR_DetachThread;
PR_DisableClockInterrupts;
PR_EnableClockInterrupts;
@@ -141,14 +115,8 @@
PR_EnumerateHostEnt;
PR_EnumerateThreads;
PR_EnumerateWaitGroup;
- PR_ErrorInstallCallback;
- PR_ErrorInstallTable;
- PR_ErrorLanguages;
- PR_ErrorToName;
- PR_ErrorToString;
PR_ExitMonitor;
PR_ExplodeTime;
- PR_ExportFileMapAsString;
PR_FD_CLR;
PR_FD_ISSET;
PR_FD_NCLR;
@@ -157,44 +125,25 @@
PR_FD_SET;
PR_FD_ZERO;
PR_FileDesc2NativeHandle;
- PR_FindSymbol;
- PR_FindSymbolAndLibrary;
- PR_FloorLog2;
PR_FormatTime;
- PR_FindNextCounterQname;
- PR_FindNextCounterRname;
- PR_FindNextTraceQname;
- PR_FindNextTraceRname;
PR_FormatTimeUSEnglish;
PR_Free;
- PR_FreeLibraryName;
PR_GMTParameters;
PR_GetConnectStatus;
PR_GetCurrentThread;
PR_GetDefaultIOMethods;
PR_GetDescType;
- PR_GetDirectorySeparator;
- PR_GetCounter;
- PR_GetCounterHandleFromName;
- PR_GetCounterNameFromHandle;
- PR_GetDirectorySepartor;
- PR_GetEnv;
PR_GetError;
PR_GetErrorText;
PR_GetErrorTextLength;
PR_GetFileInfo;
PR_GetFileInfo64;
PR_GetFileMethods;
- PR_GetGCRegisters;
PR_GetHostByAddr;
PR_GetHostByName;
PR_GetIPNodeByName;
PR_GetIdentitiesLayer;
- PR_GetInheritedFD;
- PR_GetInheritedFileMap;
PR_GetLayersIdentity;
- PR_GetLibraryName;
- PR_GetLibraryPath;
PR_GetMonitorEntryCount;
PR_GetNameForIdentity;
PR_GetOSError;
@@ -206,14 +155,11 @@
PR_GetPipeMethods;
PR_GetProtoByName;
PR_GetProtoByNumber;
- PR_GetRandomNoise;
PR_GetSP;
PR_GetSockName;
PR_GetSocketOption;
PR_GetSpecialFD;
- PR_GetStackSpaceLeft;
PR_GetSysfdTableMax;
- PR_GetSystemInfo;
PR_GetTCPMethods;
PR_GetThreadAffinityMask;
PR_GetThreadID;
@@ -226,13 +172,8 @@
PR_GetUniqueIdentity;
PR_ImplodeTime;
PR_ImportFile;
- PR_ImportFileMapFromString;
PR_ImportTCPSocket;
PR_ImportUDPSocket;
- PR_GetTraceEntries;
- PR_GetTraceHandleFromName;
- PR_GetTraceNameFromHandle;
- PR_GetTraceOption;
PR_Init;
PR_Initialize;
PR_InitializeNetAddr;
@@ -241,17 +182,11 @@
PR_IntervalNow;
PR_IntervalToMicroseconds;
PR_IntervalToMilliseconds;
- PR_IncrementCounter;
PR_IntervalToSeconds;
PR_IsNetAddrType;
- PR_JoinJob;
PR_JoinThread;
- PR_JoinThreadPool;
PR_KillProcess;
PR_Listen;
- PR_LoadLibrary;
- PR_LoadLibraryWithFlags;
- PR_LoadStaticLibrary;
PR_LocalTimeParameters;
PR_Lock;
PR_LockFile;
@@ -271,14 +206,10 @@
PR_NewLogModule;
PR_NewMonitor;
PR_NewNamedMonitor;
- PR_NewPollableEvent;
PR_NewProcessAttr;
- PR_NewRWLock;
PR_NewSem;
- PR_NewTCPSocket;
PR_NewTCPSocketPair;
PR_NewThreadPrivateIndex;
- PR_NewUDPSocket;
PR_NormalizeTime;
PR_Notify;
PR_NotifyAll;
@@ -286,13 +217,9 @@
PR_NotifyCondVar;
PR_Now;
PR_Open;
- PR_OpenAnonFileMap;
PR_OpenDir;
PR_OpenFile;
PR_OpenSemaphore;
- PR_OpenSharedMemory;
- PR_OpenTCPSocket;
- PR_OpenUDPSocket;
PR_ParseTimeString;
PR_Poll;
PR_PopIOLayer;
@@ -300,31 +227,18 @@
PR_PostSemaphore;
PR_ProcessAttrSetCurrentDirectory;
PR_ProcessAttrSetInheritableFD;
- PR_ProcessAttrSetInheritableFileMap;
PR_ProcessAttrSetStdioRedirect;
PR_ProcessExit;
PR_PushIOLayer;
- PR_QueueJob;
- PR_QueueJob_Accept;
- PR_QueueJob_Connect;
- PR_QueueJob_Read;
- PR_QueueJob_Timer;
- PR_QueueJob_Write;
- PR_RWLock_Rlock;
- PR_RWLock_Unlock;
- PR_RWLock_Wlock;
PR_Read;
PR_ReadDir;
PR_Realloc;
PR_Recv;
PR_RecvFrom;
PR_Rename;
- PR_ResetAlarm;
PR_ResetProcessAttr;
PR_ResumeAll;
PR_RmDir;
- PR_ScanStackPointers;
- PR_RecordTraceEntries;
PR_SecondsToInterval;
PR_Seek;
PR_Seek64;
@@ -332,20 +246,15 @@
PR_Send;
PR_SendFile;
PR_SendTo;
- PR_SetAlarm;
PR_SetConcurrency;
PR_SetError;
PR_SetErrorText;
PR_SetFDCacheSize;
PR_SetFDInheritable;
- PR_SetLibraryPath;
PR_SetLogBuffering;
PR_SetLogFile;
PR_SetNetAddr;
- PR_SetPollableEvent;
PR_SetSocketOption;
- PR_SetCounter;
- PR_SetStdioRedirect;
PR_SetSysfdTableSize;
PR_SetThreadAffinityMask;
PR_SetThreadDumpProc;
@@ -354,9 +263,7 @@
PR_SetThreadPrivate;
PR_SetThreadRecycleMode;
PR_Shutdown;
- PR_ShutdownThreadPool;
PR_Sleep;
- PR_Socket;
PR_StackPop;
PR_StackPush;
PR_Stat;
@@ -364,22 +271,16 @@
PR_SuspendAll;
PR_Sync;
PR_TLockFile;
- PR_ThreadScanStackPointers;
- PR_SetTraceOption;
PR_TicksPerSecond;
PR_TransmitFile;
PR_USPacificTimeParameters;
PR_UnblockClockInterrupts;
PR_UnblockInterrupt;
- PR_UnloadLibrary;
- PR_SubtractFromCounter;
PR_Unlock;
PR_UnlockFile;
PR_VersionCheck;
PR_Wait;
PR_WaitCondVar;
- PR_WaitForPollableEvent;
- PR_Trace;
PR_WaitProcess;
PR_WaitRecvReady;
PR_WaitSem;
@@ -388,9 +289,6 @@
PR_Writev;
PR_Yield;
PR_UnlockOrderedLock;
- PR_cnvtf;
- PR_dtoa;
- PR_fprintf;
PR_htonl;
PR_htonll;
PR_htons;
@@ -401,10 +299,7 @@
PR_smprintf_free;
PR_snprintf;
PR_sprintf_append;
- PR_sscanf;
- PR_strtod;
PR_sxprintf;
- PR_vfprintf;
PR_vsmprintf;
PR_vsnprintf;
PR_vsprintf_append;
@@ -433,35 +328,19 @@
PR_CreateIOLayer;
PR_EmulateAcceptRead;
PR_EmulateSendFile;
- PR_FindFunctionSymbol;
- PR_FindFunctionSymbolAndLibrary;
PR_GetMemMapAlignment;
- PR_GetNumberOfProcessors;
PR_ImportPipe;
- PR_SetEnv;
;+} NSPR_4.0;
;+
;+NSPR_4.3 {
;+ global:
- LL_MaxUint;
PR_CallOnceWithArg;
- PR_GetLibraryFilePathname;
;+} NSPR_4.1;
;+
-;+NSPR_4.4 {
-;+ global:
- PR_GetPathSeparator;
-;+} NSPR_4.3;
-;+
;+NSPR_4.5 {
;+ global:
PR_EnumerateAddrInfo;
PR_FreeAddrInfo;
PR_GetAddrInfoByName;
PR_GetCanonNameFromAddrInfo;
-;+} NSPR_4.4;
-;+
-;+NSPR_4.6 {
-;+ global:
- PR_GetPhysicalMemorySize;
-;+} NSPR_4.5;
+;+} NSPR_4.3;
Modified: freeswitch/trunk/libs/udns/udns.h
==============================================================================
--- freeswitch/trunk/libs/udns/udns.h (original)
+++ freeswitch/trunk/libs/udns/udns.h Thu Apr 19 23:51:00 2007
@@ -236,17 +236,17 @@
DNS_R_BADTIME = 18
};
-static __inline unsigned dns_get16(dnscc_t *s) {
+static inline unsigned dns_get16(dnscc_t *s) {
return ((unsigned)s[0]<<8) | s[1];
}
-static __inline unsigned dns_get32(dnscc_t *s) {
+static inline unsigned dns_get32(dnscc_t *s) {
return ((unsigned)s[0]<<24) | ((unsigned)s[1]<<16)
| ((unsigned)s[2]<<8) | s[3];
}
-static __inline dnsc_t *dns_put16(dnsc_t *d, unsigned n) {
+static inline dnsc_t *dns_put16(dnsc_t *d, unsigned n) {
*d++ = (dnsc_t)((n >> 8) & 255); *d++ = (dnsc_t)(n & 255); return d;
}
-static __inline dnsc_t *dns_put32(dnsc_t *d, unsigned n) {
+static inline dnsc_t *dns_put32(dnsc_t *d, unsigned n) {
*d++ = (dnsc_t)((n >> 24) & 255); *d++ = (dnsc_t)((n >> 16) & 255);
*d++ = (dnsc_t)((n >> 8) & 255); *d++ = (dnsc_t)(n & 255);
return d;
Modified: freeswitch/trunk/libs/udns/udns_resolver.c
==============================================================================
--- freeswitch/trunk/libs/udns/udns_resolver.c (original)
+++ freeswitch/trunk/libs/udns/udns_resolver.c Thu Apr 19 23:51:00 2007
@@ -111,24 +111,24 @@
/* working with dns_query lists */
-static __inline void qlist_init(struct dns_qlink *list) {
+static inline void qlist_init(struct dns_qlink *list) {
list->next = list->prev = (struct dns_query *)list;
}
-static __inline int qlist_empty(const struct dns_qlink *list) {
+static inline int qlist_empty(const struct dns_qlink *list) {
return list->next == (const struct dns_query *)list ? 1 : 0;
}
-static __inline struct dns_query *qlist_first(struct dns_qlink *list) {
+static inline struct dns_query *qlist_first(struct dns_qlink *list) {
return list->next == (struct dns_query *)list ? 0 : list->next;
}
-static __inline void qlist_remove(struct dns_query *q) {
+static inline void qlist_remove(struct dns_query *q) {
q->dnsq_link.next->dnsq_link.prev = q->dnsq_link.prev;
q->dnsq_link.prev->dnsq_link.next = q->dnsq_link.next;
}
-static __inline struct dns_query *qlist_pop(struct dns_qlink *list) {
+static inline struct dns_query *qlist_pop(struct dns_qlink *list) {
struct dns_query *q = list->next;
if (q == (struct dns_query *)list)
return NULL;
@@ -137,7 +137,7 @@
}
/* insert q between prev and next */
-static __inline void
+static inline void
qlist_insert(struct dns_query *q,
struct dns_query *prev, struct dns_query *next) {
q->dnsq_link.next = next;
@@ -145,22 +145,22 @@
prev->dnsq_link.next = next->dnsq_link.prev = q;
}
-static __inline void
+static inline void
qlist_insert_after(struct dns_query *q, struct dns_query *prev) {
qlist_insert(q, prev, prev->dnsq_link.next);
}
-static __inline void
+static inline void
qlist_insert_before(struct dns_query *q, struct dns_query *next) {
qlist_insert(q, next->dnsq_link.prev, next);
}
-static __inline void
+static inline void
qlist_add_tail(struct dns_query *q, struct dns_qlink *top) {
qlist_insert_before(q, (struct dns_query *)top);
}
-static __inline void
+static inline void
qlist_add_head(struct dns_query *q, struct dns_qlink *top) {
qlist_insert_after(q, (struct dns_query *)top);
}
1
0
Author: mikej
Date: Thu Apr 19 21:57:56 2007
New Revision: 4983
Modified:
freeswitch/trunk/libs/codec/ilbc/src/iLBC_decode.h
freeswitch/trunk/libs/codec/ilbc/src/iLBC_define.h
freeswitch/trunk/libs/codec/ilbc/src/iLBC_encode.h
Log:
formatting to quiet up some warnings
Modified: freeswitch/trunk/libs/codec/ilbc/src/iLBC_decode.h
==============================================================================
--- freeswitch/trunk/libs/codec/ilbc/src/iLBC_decode.h (original)
+++ freeswitch/trunk/libs/codec/ilbc/src/iLBC_decode.h Thu Apr 19 21:57:56 2007
@@ -1,40 +1,30 @@
-
- /******************************************************************
-
- iLBC Speech Coder ANSI-C Source Code
-
- iLBC_decode.h
-
- Copyright (C) The Internet Society (2004).
- All Rights Reserved.
-
- ******************************************************************/
-
- #ifndef __iLBC_ILBCDECODE_H
- #define __iLBC_ILBCDECODE_H
-
- #include "iLBC_define.h"
-
- short initDecode( /* (o) Number of decoded
- samples */
- iLBC_Dec_Inst_t *iLBCdec_inst, /* (i/o) Decoder instance */
- int mode, /* (i) frame size mode */
- int use_enhancer /* (i) 1 to use enhancer
- 0 to run without
- enhancer */
- );
-
- void iLBC_decode(
- float *decblock, /* (o) decoded signal block */
- unsigned char *bytes, /* (i) encoded signal bits */
- iLBC_Dec_Inst_t *iLBCdec_inst, /* (i/o) the decoder state
- structure */
- int mode /* (i) 0: bad packet, PLC,
- 1: normal */
- );
-
-
-
- #endif
-
-
+/******************************************************************
+
+iLBC Speech Coder ANSI-C Source Code
+
+iLBC_decode.h
+
+Copyright (C) The Internet Society (2004).
+All Rights Reserved.
+
+******************************************************************/
+
+#ifndef __iLBC_ILBCDECODE_H
+#define __iLBC_ILBCDECODE_H
+
+#include "iLBC_define.h"
+
+short initDecode( /* (o) Number of decoded samples */
+ iLBC_Dec_Inst_t *iLBCdec_inst, /* (i/o) Decoder instance */
+ int mode, /* (i) frame size mode */
+ int use_enhancer /* (i) 1 to use enhancer 0 to run without enhancer */
+ );
+
+void iLBC_decode(
+ float *decblock, /* (o) decoded signal block */
+ unsigned char *bytes, /* (i) encoded signal bits */
+ iLBC_Dec_Inst_t *iLBCdec_inst, /* (i/o) the decoder state structure */
+ int mode /* (i) 0: bad packet, PLC, 1: normal */
+ );
+
+#endif
Modified: freeswitch/trunk/libs/codec/ilbc/src/iLBC_define.h
==============================================================================
--- freeswitch/trunk/libs/codec/ilbc/src/iLBC_define.h (original)
+++ freeswitch/trunk/libs/codec/ilbc/src/iLBC_define.h Thu Apr 19 21:57:56 2007
@@ -1,204 +1,204 @@
-
- /******************************************************************
-
- iLBC Speech Coder ANSI-C Source Code
-
- iLBC_define.h
-
- Copyright (C) The Internet Society (2004).
- All Rights Reserved.
-
- ******************************************************************/
- #include <string.h>
-
- #ifndef __iLBC_ILBCDEFINE_H
- #define __iLBC_ILBCDEFINE_H
-
- /* general codec settings */
-
- #define FS (float)8000.0
- #define BLOCKL_20MS 160
- #define BLOCKL_30MS 240
- #define BLOCKL_MAX 240
- #define NSUB_20MS 4
- #define NSUB_30MS 6
- #define NSUB_MAX 6
- #define NASUB_20MS 2
- #define NASUB_30MS 4
- #define NASUB_MAX 4
- #define SUBL 40
- #define STATE_LEN 80
- #define STATE_SHORT_LEN_30MS 58
- #define STATE_SHORT_LEN_20MS 57
-
- /* LPC settings */
-
- #define LPC_FILTERORDER 10
- #define LPC_CHIRP_SYNTDENUM (float)0.9025
- #define LPC_CHIRP_WEIGHTDENUM (float)0.4222
- #define LPC_LOOKBACK 60
- #define LPC_N_20MS 1
- #define LPC_N_30MS 2
- #define LPC_N_MAX 2
- #define LPC_ASYMDIFF 20
- #define LPC_BW (float)60.0
- #define LPC_WN (float)1.0001
- #define LSF_NSPLIT 3
-
-
- #define LSF_NUMBER_OF_STEPS 4
- #define LPC_HALFORDER (LPC_FILTERORDER/2)
-
- /* cb settings */
-
- #define CB_NSTAGES 3
- #define CB_EXPAND 2
- #define CB_MEML 147
- #define CB_FILTERLEN 2*4
- #define CB_HALFFILTERLEN 4
- #define CB_RESRANGE 34
- #define CB_MAXGAIN (float)1.3
-
- /* enhancer */
-
- #define ENH_BLOCKL 80 /* block length */
- #define ENH_BLOCKL_HALF (ENH_BLOCKL/2)
- #define ENH_HL 3 /* 2*ENH_HL+1 is number blocks
- in said second sequence */
- #define ENH_SLOP 2 /* max difference estimated and
- correct pitch period */
- #define ENH_PLOCSL 20 /* pitch-estimates and pitch-
- locations buffer length */
- #define ENH_OVERHANG 2
- #define ENH_UPS0 4 /* upsampling rate */
- #define ENH_FL0 3 /* 2*FLO+1 is the length of
- each filter */
- #define ENH_VECTL (ENH_BLOCKL+2*ENH_FL0)
- #define ENH_CORRDIM (2*ENH_SLOP+1)
- #define ENH_NBLOCKS (BLOCKL_MAX/ENH_BLOCKL)
- #define ENH_NBLOCKS_EXTRA 5
- #define ENH_NBLOCKS_TOT 8 /* ENH_NBLOCKS +
- ENH_NBLOCKS_EXTRA */
- #define ENH_BUFL (ENH_NBLOCKS_TOT)*ENH_BLOCKL
- #define ENH_ALPHA0 (float)0.05
-
- /* Down sampling */
-
- #define FILTERORDER_DS 7
- #define DELAY_DS 3
- #define FACTOR_DS 2
-
- /* bit stream defs */
-
- #define NO_OF_BYTES_20MS 38
- #define NO_OF_BYTES_30MS 50
- #define NO_OF_WORDS_20MS 19
- #define NO_OF_WORDS_30MS 25
- #define STATE_BITS 3
- #define BYTE_LEN 8
- #define ULP_CLASSES 3
-
- /* help parameters */
-
-
-
- #define FLOAT_MAX (float)1.0e37
- #define EPS (float)2.220446049250313e-016
- #define PI (float)3.14159265358979323846
- #define MIN_SAMPLE -32768
- #define MAX_SAMPLE 32767
- #define TWO_PI (float)6.283185307
- #define PI2 (float)0.159154943
-
- /* type definition encoder instance */
- typedef struct iLBC_ULP_Inst_t_ {
- int lsf_bits[6][ULP_CLASSES+2];
- int start_bits[ULP_CLASSES+2];
- int startfirst_bits[ULP_CLASSES+2];
- int scale_bits[ULP_CLASSES+2];
- int state_bits[ULP_CLASSES+2];
- int extra_cb_index[CB_NSTAGES][ULP_CLASSES+2];
- int extra_cb_gain[CB_NSTAGES][ULP_CLASSES+2];
- int cb_index[NSUB_MAX][CB_NSTAGES][ULP_CLASSES+2];
- int cb_gain[NSUB_MAX][CB_NSTAGES][ULP_CLASSES+2];
- } iLBC_ULP_Inst_t;
-
- /* type definition encoder instance */
- typedef struct iLBC_Enc_Inst_t_ {
-
- /* flag for frame size mode */
- int mode;
-
- /* basic parameters for different frame sizes */
- int blockl;
- int nsub;
- int nasub;
- int no_of_bytes, no_of_words;
- int lpc_n;
- int state_short_len;
- const iLBC_ULP_Inst_t *ULP_inst;
-
- /* analysis filter state */
- float anaMem[LPC_FILTERORDER];
-
- /* old lsf parameters for interpolation */
- float lsfold[LPC_FILTERORDER];
- float lsfdeqold[LPC_FILTERORDER];
-
- /* signal buffer for LP analysis */
- float lpc_buffer[LPC_LOOKBACK + BLOCKL_MAX];
-
- /* state of input HP filter */
- float hpimem[4];
-
- } iLBC_Enc_Inst_t;
-
- /* type definition decoder instance */
- typedef struct iLBC_Dec_Inst_t_ {
-
-
-
- /* flag for frame size mode */
- int mode;
-
- /* basic parameters for different frame sizes */
- int blockl;
- int nsub;
- int nasub;
- int no_of_bytes, no_of_words;
- int lpc_n;
- int state_short_len;
- const iLBC_ULP_Inst_t *ULP_inst;
-
- /* synthesis filter state */
- float syntMem[LPC_FILTERORDER];
-
- /* old LSF for interpolation */
- float lsfdeqold[LPC_FILTERORDER];
-
- /* pitch lag estimated in enhancer and used in PLC */
- int last_lag;
-
- /* PLC state information */
- int prevLag, consPLICount, prevPLI, prev_enh_pl;
- float prevLpc[LPC_FILTERORDER+1];
- float prevResidual[NSUB_MAX*SUBL];
- float per;
- unsigned long seed;
-
- /* previous synthesis filter parameters */
- float old_syntdenum[(LPC_FILTERORDER + 1)*NSUB_MAX];
-
- /* state of output HP filter */
- float hpomem[4];
-
- /* enhancer state information */
- int use_enhancer;
- float enh_buf[ENH_BUFL];
- float enh_period[ENH_NBLOCKS_TOT];
-
- } iLBC_Dec_Inst_t;
-
- #endif
-
-
+
+/******************************************************************
+
+iLBC Speech Coder ANSI-C Source Code
+
+iLBC_define.h
+
+Copyright (C) The Internet Society (2004).
+All Rights Reserved.
+
+******************************************************************/
+#include <string.h>
+
+#ifndef __iLBC_ILBCDEFINE_H
+#define __iLBC_ILBCDEFINE_H
+
+/* general codec settings */
+
+#define FS (float)8000.0
+#define BLOCKL_20MS 160
+#define BLOCKL_30MS 240
+#define BLOCKL_MAX 240
+#define NSUB_20MS 4
+#define NSUB_30MS 6
+#define NSUB_MAX 6
+#define NASUB_20MS 2
+#define NASUB_30MS 4
+#define NASUB_MAX 4
+#define SUBL 40
+#define STATE_LEN 80
+#define STATE_SHORT_LEN_30MS 58
+#define STATE_SHORT_LEN_20MS 57
+
+/* LPC settings */
+
+#define LPC_FILTERORDER 10
+#define LPC_CHIRP_SYNTDENUM (float)0.9025
+#define LPC_CHIRP_WEIGHTDENUM (float)0.4222
+#define LPC_LOOKBACK 60
+#define LPC_N_20MS 1
+#define LPC_N_30MS 2
+#define LPC_N_MAX 2
+#define LPC_ASYMDIFF 20
+#define LPC_BW (float)60.0
+#define LPC_WN (float)1.0001
+#define LSF_NSPLIT 3
+
+
+#define LSF_NUMBER_OF_STEPS 4
+#define LPC_HALFORDER (LPC_FILTERORDER/2)
+
+/* cb settings */
+
+#define CB_NSTAGES 3
+#define CB_EXPAND 2
+#define CB_MEML 147
+#define CB_FILTERLEN 2*4
+#define CB_HALFFILTERLEN 4
+#define CB_RESRANGE 34
+#define CB_MAXGAIN (float)1.3
+
+/* enhancer */
+
+#define ENH_BLOCKL 80 /* block length */
+#define ENH_BLOCKL_HALF (ENH_BLOCKL/2)
+#define ENH_HL 3 /* 2*ENH_HL+1 is number blocks
+in said second sequence */
+#define ENH_SLOP 2 /* max difference estimated and
+correct pitch period */
+#define ENH_PLOCSL 20 /* pitch-estimates and pitch-
+locations buffer length */
+#define ENH_OVERHANG 2
+#define ENH_UPS0 4 /* upsampling rate */
+#define ENH_FL0 3 /* 2*FLO+1 is the length of
+each filter */
+#define ENH_VECTL (ENH_BLOCKL+2*ENH_FL0)
+#define ENH_CORRDIM (2*ENH_SLOP+1)
+#define ENH_NBLOCKS (BLOCKL_MAX/ENH_BLOCKL)
+#define ENH_NBLOCKS_EXTRA 5
+#define ENH_NBLOCKS_TOT 8 /* ENH_NBLOCKS +
+ENH_NBLOCKS_EXTRA */
+#define ENH_BUFL (ENH_NBLOCKS_TOT)*ENH_BLOCKL
+#define ENH_ALPHA0 (float)0.05
+
+/* Down sampling */
+
+#define FILTERORDER_DS 7
+#define DELAY_DS 3
+#define FACTOR_DS 2
+
+/* bit stream defs */
+
+#define NO_OF_BYTES_20MS 38
+#define NO_OF_BYTES_30MS 50
+#define NO_OF_WORDS_20MS 19
+#define NO_OF_WORDS_30MS 25
+#define STATE_BITS 3
+#define BYTE_LEN 8
+#define ULP_CLASSES 3
+
+/* help parameters */
+
+
+
+#define FLOAT_MAX (float)1.0e37
+#define EPS (float)2.220446049250313e-016
+#define PI (float)3.14159265358979323846
+#define MIN_SAMPLE -32768
+#define MAX_SAMPLE 32767
+#define TWO_PI (float)6.283185307
+#define PI2 (float)0.159154943
+
+/* type definition encoder instance */
+typedef struct iLBC_ULP_Inst_t_ {
+ int lsf_bits[6][ULP_CLASSES+2];
+ int start_bits[ULP_CLASSES+2];
+ int startfirst_bits[ULP_CLASSES+2];
+ int scale_bits[ULP_CLASSES+2];
+ int state_bits[ULP_CLASSES+2];
+ int extra_cb_index[CB_NSTAGES][ULP_CLASSES+2];
+ int extra_cb_gain[CB_NSTAGES][ULP_CLASSES+2];
+ int cb_index[NSUB_MAX][CB_NSTAGES][ULP_CLASSES+2];
+ int cb_gain[NSUB_MAX][CB_NSTAGES][ULP_CLASSES+2];
+} iLBC_ULP_Inst_t;
+
+/* type definition encoder instance */
+typedef struct iLBC_Enc_Inst_t_ {
+
+ /* flag for frame size mode */
+ int mode;
+
+ /* basic parameters for different frame sizes */
+ int blockl;
+ int nsub;
+ int nasub;
+ int no_of_bytes, no_of_words;
+ int lpc_n;
+ int state_short_len;
+ const iLBC_ULP_Inst_t *ULP_inst;
+
+ /* analysis filter state */
+ float anaMem[LPC_FILTERORDER];
+
+ /* old lsf parameters for interpolation */
+ float lsfold[LPC_FILTERORDER];
+ float lsfdeqold[LPC_FILTERORDER];
+
+ /* signal buffer for LP analysis */
+ float lpc_buffer[LPC_LOOKBACK + BLOCKL_MAX];
+
+ /* state of input HP filter */
+ float hpimem[4];
+
+} iLBC_Enc_Inst_t;
+
+/* type definition decoder instance */
+typedef struct iLBC_Dec_Inst_t_ {
+
+
+
+ /* flag for frame size mode */
+ int mode;
+
+ /* basic parameters for different frame sizes */
+ int blockl;
+ int nsub;
+ int nasub;
+ int no_of_bytes, no_of_words;
+ int lpc_n;
+ int state_short_len;
+ const iLBC_ULP_Inst_t *ULP_inst;
+
+ /* synthesis filter state */
+ float syntMem[LPC_FILTERORDER];
+
+ /* old LSF for interpolation */
+ float lsfdeqold[LPC_FILTERORDER];
+
+ /* pitch lag estimated in enhancer and used in PLC */
+ int last_lag;
+
+ /* PLC state information */
+ int prevLag, consPLICount, prevPLI, prev_enh_pl;
+ float prevLpc[LPC_FILTERORDER+1];
+ float prevResidual[NSUB_MAX*SUBL];
+ float per;
+ unsigned long seed;
+
+ /* previous synthesis filter parameters */
+ float old_syntdenum[(LPC_FILTERORDER + 1)*NSUB_MAX];
+
+ /* state of output HP filter */
+ float hpomem[4];
+
+ /* enhancer state information */
+ int use_enhancer;
+ float enh_buf[ENH_BUFL];
+ float enh_period[ENH_NBLOCKS_TOT];
+
+} iLBC_Dec_Inst_t;
+
+#endif
+
+
Modified: freeswitch/trunk/libs/codec/ilbc/src/iLBC_encode.h
==============================================================================
--- freeswitch/trunk/libs/codec/ilbc/src/iLBC_encode.h (original)
+++ freeswitch/trunk/libs/codec/ilbc/src/iLBC_encode.h Thu Apr 19 21:57:56 2007
@@ -1,37 +1,32 @@
-
- /******************************************************************
-
- iLBC Speech Coder ANSI-C Source Code
-
- iLBC_encode.h
-
- Copyright (C) The Internet Society (2004).
- All Rights Reserved.
-
- ******************************************************************/
-
- #ifndef __iLBC_ILBCENCODE_H
- #define __iLBC_ILBCENCODE_H
-
- #include "iLBC_define.h"
-
- short initEncode( /* (o) Number of bytes
- encoded */
- iLBC_Enc_Inst_t *iLBCenc_inst, /* (i/o) Encoder instance */
- int mode /* (i) frame size mode */
- );
-
- void iLBC_encode(
-
-
- unsigned char *bytes, /* (o) encoded data bits iLBC */
- float *block, /* (o) speech vector to
- encode */
- iLBC_Enc_Inst_t *iLBCenc_inst /* (i/o) the general encoder
- state */
- );
-
- #endif
-
+
+/******************************************************************
+
+iLBC Speech Coder ANSI-C Source Code
+
+iLBC_encode.h
+
+Copyright (C) The Internet Society (2004).
+All Rights Reserved.
+
+******************************************************************/
+
+#ifndef __iLBC_ILBCENCODE_H
+#define __iLBC_ILBCENCODE_H
+
+#include "iLBC_define.h"
+
+short initEncode( /* (o) Number of bytes encoded */
+ iLBC_Enc_Inst_t *iLBCenc_inst, /* (i/o) Encoder instance */
+ int mode /* (i) frame size mode */
+ );
+
+void iLBC_encode(
+ unsigned char *bytes, /* (o) encoded data bits iLBC */
+ float *block, /* (o) speech vector to encode */
+ iLBC_Enc_Inst_t *iLBCenc_inst /* (i/o) the general encoder state */
+ );
+
+#endif
+
1
0
[commit] r4982 - in freeswitch/trunk/libs/sofia-sip: . libsofia-sip-ua/nua libsofia-sip-ua/nua/sofia-sip
by Freeswitch SVN 20 Apr '07
by Freeswitch SVN 20 Apr '07
20 Apr '07
Author: mikej
Date: Thu Apr 19 20:48:51 2007
New Revision: 4982
Modified:
freeswitch/trunk/libs/sofia-sip/Makefile.am
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_extension.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_stack.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/sofia-sip/nua.h
Log:
sync with sofia-sip darcs tree. Fix nua_respond docs and silence doxygen warnings so they don't affect the build
Modified: freeswitch/trunk/libs/sofia-sip/Makefile.am
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/Makefile.am (original)
+++ freeswitch/trunk/libs/sofia-sip/Makefile.am Thu Apr 19 20:48:51 2007
@@ -40,7 +40,10 @@
manpages: built-sources
-mkdir -p man man/man1 2> /dev/null
if HAVE_DOXYGEN
- cd utils && $(DOXYGEN) Doxyfile.build
+ @echo 'cd utils && $(DOXYGEN)'
+ @cd utils && \
+ { exec 3>&1 1>&2; { $(DOXYGEN) 2>&1; echo $$? >& 3 ;} | \
+ fgrep -v 'Warning:' ;} | { read x; exit $$x ;}
@rm -f man/man1/_*.1
else
-touch $(dist_man_MANS)
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_extension.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_extension.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_extension.c Thu Apr 19 20:48:51 2007
@@ -45,9 +45,10 @@
#include "nua_stack.h"
-/** Send an extension request.
+/**Send a request message with an extension method.
*
- * Send an entension request message.
+ * Send a request message with the request method specified with
+ * NUTAG_METHOD().
*
* @param nh Pointer to operation handle
* @param tag, value, ... List of tagged parameters
@@ -55,6 +56,9 @@
* @return
* nothing
*
+ * Note that it is possible to send a request with any method (except
+ * perhaps @b INVITE, @b ACK or @b CANCEL) using this function.
+ *
* @par Related Tags:
* NUTAG_METHOD() \n
* NUTAG_URL() \n
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_stack.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_stack.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_stack.c Thu Apr 19 20:48:51 2007
@@ -1276,23 +1276,42 @@
}
}
-/** Respond to a request with given status.
+/**@fn void nua_respond(nua_handle_t *nh, int status, char const *phrase, tag_type_t tag, tag_value_t value, ...);
+ *
+ * Respond to a request with given status code and phrase.
*
- * When nua protocol engine receives an incoming SIP request, it can either
- * respond to the request automatically or let it up to application to
- * respond to the request. The automatic response is returned to the client
- * if the request fails syntax check, or the method, SIP extension or
- * content negotiation fails.
+ * The stack returns a SIP response message with given status code and
+ * phrase to the client. The tagged parameter list can specify extra headers
+ * to include with the response message and other stack parameters. The SIP
+ * session or other protocol state associated with the handle is updated
+ * accordingly (for instance, if an initial INVITE is responded with 200, a
+ * SIP session is established.)
*
* When responding to an incoming INVITE request, the nua_respond() can be
- * called without NUTAG_WITH() (or NUTAG_WITH_THIS() or
+ * called without NUTAG_WITH() (or NUTAG_WITH_CURRENT() or
* NUTAG_WITH_SAVED()). Otherwise, NUTAG_WITH() will contain an indication
* of the request being responded.
*
- * In order to simplify the simple applications, most requests are responded
- * automatically. The BYE and CANCEL requests are always responded by the
- * stack. Likewise, the NOTIFY requests associated with an event
- * subscription are responded by the stack.
+ * @param nh Pointer to operation handle
+ * @param status SIP response status code (see RFCs of SIP)
+ * @param phrase free text (default response phrase is used if NULL)
+ * @param tag, value, ... List of tagged parameters
+ *
+ * @return
+ * nothing
+ *
+ * @par Responses by Protocol Engine
+ *
+ * When nua protocol engine receives an incoming SIP request, it can either
+ * respond to the request automatically or let application to respond to the
+ * request. The automatic response is returned to the client if the request
+ * fails syntax check, or the method, SIP extension or content negotiation
+ * fails.
+ *
+ * When the @ref nua_handlingevents "request event" is delivered to the
+ * application, the application should examine the @a status parameter. The
+ * @a status parameter is 200 or greater if the request has been already
+ * responded automatically by the stack.
*
* The application can add methods that it likes to handle by itself with
* NUTAG_APPL_METHOD(). The default set of NUTAG_APPL_METHOD() includes
@@ -1300,18 +1319,15 @@
* also included in the set of allowed methods with NUTAG_ALLOW(), the stack
* will respond to the incoming methods with <i>405 Not Allowed</i>.
*
+ * In order to simplify the simple applications, most requests are responded
+ * automatically. The BYE and CANCEL requests are always responded by the
+ * stack. Likewise, the NOTIFY requests associated with an event
+ * subscription are responded by the stack.
+ *
* Note that certain methods are rejected outside a SIP session (created
* with INVITE transaction). They include BYE, UPDATE, PRACK and INFO. Also
- * the auxiliary methods ACK and CANCEL are rejected by stack if there is no
- * ongoing INVITE transaction corresponding to them.
- *
- * @param nh Pointer to operation handle
- * @param status SIP response status (see RFCs of SIP)
- * @param phrase free text (default response phrase used if NULL)
- * @param tag, value, ... List of tagged parameters
- *
- * @return
- * nothing
+ * the auxiliary methods ACK and CANCEL are rejected by the stack if there
+ * is no ongoing INVITE transaction corresponding to them.
*
* @par Related Tags:
* NUTAG_WITH(), NUTAG_WITH_THIS(), NUTAG_WITH_SAVED() \n
@@ -1319,6 +1335,7 @@
* SOATAG_ADDRESS() \n
* SOATAG_AF() \n
* SOATAG_HOLD() \n
+ * Tags used with nua_set_hparams() \n
* Tags in <sip_tag.h>.
*
* @par Events:
@@ -1330,6 +1347,7 @@
*
* @sa #nua_i_invite, #nua_i_register, #nua_i_subscribe, #nua_i_publish
*/
+
void
nua_stack_respond(nua_t *nua, nua_handle_t *nh,
int status, char const *phrase, tagi_t const *tags)
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/sofia-sip/nua.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/sofia-sip/nua.h (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/sofia-sip/nua.h Thu Apr 19 20:48:51 2007
@@ -337,10 +337,10 @@
/*# Redirect an operation. @deprecated */
SOFIAPUBFUN void nua_redirect(nua_handle_t *, tag_type_t, tag_value_t, ...);
-/** Extension request method. */
+/** Send a request message with an extension method. */
SOFIAPUBFUN void nua_method(nua_handle_t *, tag_type_t, tag_value_t, ...);
-/** Respond with given status. */
+/** Respond to a request with given status code and phrase. */
SOFIAPUBFUN void nua_respond(nua_handle_t *nh,
int status, char const *phrase,
tag_type_t, tag_value_t,
1
0
Author: anthm
Date: Thu Apr 19 20:29:18 2007
New Revision: 4981
Modified:
freeswitch/trunk/src/switch_rtp.c
Log:
silly socket test
Modified: freeswitch/trunk/src/switch_rtp.c
==============================================================================
--- freeswitch/trunk/src/switch_rtp.c (original)
+++ freeswitch/trunk/src/switch_rtp.c Thu Apr 19 20:29:18 2007
@@ -323,6 +323,8 @@
switch_socket_t *new_sock = NULL, *old_sock = NULL;
switch_status_t status = SWITCH_STATUS_FALSE;
*err = NULL;
+ char o[5] = "TEST", i[5] = "";
+ switch_size_t len;
if (switch_sockaddr_info_get(&rtp_session->local_addr, host, SWITCH_UNSPEC, port, 0, rtp_session->pool) != SWITCH_STATUS_SUCCESS) {
*err = "Local Address Error!";
@@ -348,6 +350,14 @@
goto done;
}
+ len = sizeof(i);
+ switch_socket_sendto(new_sock, rtp_session->local_addr, 0, (void *) o, &len);
+ switch_socket_recvfrom(rtp_session->from_addr, new_sock, 0, (void *) i, &len);
+
+ if (!len) {
+ goto done;
+ }
+
old_sock = rtp_session->sock;
rtp_session->sock = new_sock;
new_sock = NULL;
1
0
19 Apr '07
Author: anthm
Date: Thu Apr 19 18:49:01 2007
New Revision: 4980
Modified:
freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.h
freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c
Log:
update
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.h
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.h (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.h Thu Apr 19 18:49:01 2007
@@ -312,6 +312,8 @@
nua_handle_t *nh;
nua_handle_t *nh2;
sip_contact_t *contact;
+ uint32_t owner_id;
+ uint32_t session_id;
/** VIDEO **/
switch_frame_t video_read_frame;
switch_codec_t video_read_codec;
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c Thu Apr 19 18:49:01 2007
@@ -40,7 +40,6 @@
void sofia_glue_set_local_sdp(private_object_t *tech_pvt, char *ip, uint32_t port, char *sr, int force)
{
char buf[2048];
- switch_time_t now = switch_time_now();
int ptime = 0;
int rate = 0;
uint32_t v_port;
@@ -65,14 +64,24 @@
sr = "sendrecv";
}
+ if (!tech_pvt->owner_id) {
+ tech_pvt->owner_id = (uint32_t) time(NULL) - port;
+ }
+
+ if (!tech_pvt->session_id) {
+ tech_pvt->session_id = tech_pvt->owner_id ;
+ }
+
+ tech_pvt->session_id++;
+
snprintf(buf, sizeof(buf),
"v=0\n"
- "o=FreeSWITCH %d%" SWITCH_TIME_T_FMT " %d%" SWITCH_TIME_T_FMT " IN IP4 %s\n"
+ "o=FreeSWITCH %010u %010u IN IP4 %s\n"
"s=FreeSWITCH\n"
"c=IN IP4 %s\n" "t=0 0\n"
"a=%s\n"
- "m=audio %d RTP/AVP", port, now, port, now, ip, ip, sr, port);
-
+ "m=audio %d RTP/AVP", tech_pvt->owner_id, tech_pvt->session_id, ip, ip, sr, port);
+
if (tech_pvt->rm_encoding) {
snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), " %d", tech_pvt->pt);
} else if (tech_pvt->num_codecs) {
@@ -277,7 +286,7 @@
{
if (tech_pvt->num_codecs && !switch_test_flag(tech_pvt, TFLAG_VIDEO)) {
int i;
-
+ tech_pvt->video_count = 0;
for (i = 0; i < tech_pvt->num_codecs; i++) {
if (tech_pvt->codecs[i]->codec_type == SWITCH_CODEC_TYPE_VIDEO) {
tech_pvt->video_count++;
1
0
Author: mikej
Date: Thu Apr 19 18:28:01 2007
New Revision: 4979
Added:
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua-glib/su-glib/Doxyfile.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/bnf/Doxyfile.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/docs/Doxyfile.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/features/Doxyfile.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/Doxyfile.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ipt/Doxyfile.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/Doxyfile.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/Doxyfile.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nea/Doxyfile.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/Doxyfile.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nth/Doxyfile.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/Doxyfile.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/Doxyfile.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/Doxyfile.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/soa/Doxyfile.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/Doxyfile.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/stun/Doxyfile.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/Doxyfile.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/Doxyfile.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/url/Doxyfile.in
freeswitch/trunk/libs/sofia-sip/utils/Doxyfile.in
Removed:
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua-glib/su-glib/Doxyfile
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/bnf/Doxyfile
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/docs/Doxyfile
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/features/Doxyfile
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/Doxyfile
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ipt/Doxyfile
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/Doxyfile
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/Doxyfile
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nea/Doxyfile
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/Doxyfile
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nth/Doxyfile
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/Doxyfile
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/Doxyfile
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/Doxyfile
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/soa/Doxyfile
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/Doxyfile
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/stun/Doxyfile
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/Doxyfile
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/Doxyfile
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/url/Doxyfile
freeswitch/trunk/libs/sofia-sip/utils/Doxyfile
freeswitch/trunk/libs/sofia-sip/utils/Doxyfile.build.in
Modified:
freeswitch/trunk/libs/sofia-sip/configure.ac
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua-glib/Makefile.am
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/Makefile.am
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/bnf/Makefile.am
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/docs/Doxyfile.conf
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/docs/Doxyfile.version.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/docs/Makefile.am
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/docs/hide_emails.sh
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/features/Makefile.am
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/Makefile.am
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ipt/Makefile.am
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/Makefile.am
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/sofia-sip/auth_client_plugin.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/Makefile.am
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nea/Makefile.am
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/Makefile.am
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nth/Makefile.am
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/Makefile.am
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/Makefile.am
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/Makefile.am
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/soa/Makefile.am
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/Makefile.am
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/stun/Makefile.am
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/stun/stunc.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/Makefile.am
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_log.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_timer.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/Makefile.am
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/url/Makefile.am
freeswitch/trunk/libs/sofia-sip/utils/Makefile.am
freeswitch/trunk/libs/sofia-sip/utils/sip-dig.c
freeswitch/trunk/libs/sofia-sip/utils/sip-options.c
Log:
switch doxygen generation in sofia-sip around to use configure generated files. This should avoid some problems with warnings and errors when builing the manpages. You will probably need to autoreconf and configure sofia-sip for this
Modified: freeswitch/trunk/libs/sofia-sip/configure.ac
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/configure.ac (original)
+++ freeswitch/trunk/libs/sofia-sip/configure.ac Thu Apr 19 18:28:01 2007
@@ -249,31 +249,51 @@
packages/sofia-sip-ua-glib.pc
libsofia-sip-ua/Makefile
libsofia-sip-ua/bnf/Makefile
+libsofia-sip-ua/bnf/Doxyfile
libsofia-sip-ua/docs/Makefile
+libsofia-sip-ua/docs/Doxyfile
libsofia-sip-ua/docs/Doxyfile.version
libsofia-sip-ua/docs/sofia-footer.html
+libsofia-sip-ua/features/Doxyfile
libsofia-sip-ua/features/Makefile
+libsofia-sip-ua/http/Doxyfile
libsofia-sip-ua/http/Makefile
+libsofia-sip-ua/ipt/Doxyfile
libsofia-sip-ua/ipt/Makefile
+libsofia-sip-ua/iptsec/Doxyfile
libsofia-sip-ua/iptsec/Makefile
+libsofia-sip-ua/msg/Doxyfile
libsofia-sip-ua/msg/Makefile
+libsofia-sip-ua/nea/Doxyfile
libsofia-sip-ua/nea/Makefile
+libsofia-sip-ua/nta/Doxyfile
libsofia-sip-ua/nta/Makefile
+libsofia-sip-ua/nth/Doxyfile
libsofia-sip-ua/nth/Makefile
+libsofia-sip-ua/nua/Doxyfile
libsofia-sip-ua/nua/Makefile
+libsofia-sip-ua/sdp/Doxyfile
libsofia-sip-ua/sdp/Makefile
+libsofia-sip-ua/sip/Doxyfile
libsofia-sip-ua/sip/Makefile
+libsofia-sip-ua/soa/Doxyfile
libsofia-sip-ua/soa/Makefile
+libsofia-sip-ua/sresolv/Doxyfile
libsofia-sip-ua/sresolv/Makefile
+libsofia-sip-ua/stun/Doxyfile
libsofia-sip-ua/stun/Makefile
+libsofia-sip-ua/su/Doxyfile
libsofia-sip-ua/su/Makefile
+libsofia-sip-ua/tport/Doxyfile
libsofia-sip-ua/tport/Makefile
+libsofia-sip-ua/url/Doxyfile
libsofia-sip-ua/url/Makefile
libsofia-sip-ua/features/sofia-sip/sofia_features.h
libsofia-sip-ua-glib/Makefile
libsofia-sip-ua-glib/su-glib/Makefile
+libsofia-sip-ua-glib/su-glib/Doxyfile
utils/Makefile
-utils/Doxyfile.build
+utils/Doxyfile
win32/Makefile
win32/config.h
])
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua-glib/Makefile.am
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua-glib/Makefile.am (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua-glib/Makefile.am Thu Apr 19 18:28:01 2007
@@ -32,8 +32,7 @@
docs/Doxyfile.version
doxygen: built-sources
- @cd ${srcdir} ;\
- mkdir -p docs docs/html &&\
+ @mkdir -p docs docs/html &&\
for d in $(DIST_SUBDIRS) $(DIST_SUBDIRS); do \
test -r $$d/Doxyfile \
&& pushd $$d > /dev/null \
@@ -41,7 +40,7 @@
&& ${DOXYGEN} \
&& popd > /dev/null ; \
done
- cd ${srcdir}/docs/html && ../../${top_srcdir}/libsofia-sip-ua/docs/hide_emails.sh
+ ${top_srcdir}/libsofia-sip-ua/docs/hide_emails.sh docs/html
include $(top_srcdir)/rules/recursive.am
Added: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua-glib/su-glib/Doxyfile.in
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua-glib/su-glib/Doxyfile.in Thu Apr 19 18:28:01 2007
@@ -0,0 +1,12 @@
+PROJECT_NAME = "sofia-sip/su-glib"
+
+OUTPUT_DIRECTORY = ../docs/html/su-glib
+
+INPUT = @srcdir@/su_glib.docs @srcdir@ . @srcdir@/sofia-sip
+
+@INCLUDE_PATH = @srcdir@ .
+@INCLUDE = ../docs/Doxyfile.conf
+
+GENERATE_TAGFILE = ../docs/su_glib.doxytags
+
+ALIASES +=
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/Makefile.am
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/Makefile.am (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/Makefile.am Thu Apr 19 18:28:01 2007
@@ -59,7 +59,6 @@
doxygen: built-sources
@echo Generating empty doxytags
- cd ${srcdir}; \
mkdir -p docs/html ; \
for d in $(DIST_SUBDIRS); do \
test -r $$d/Doxyfile || continue ; \
@@ -71,20 +70,18 @@
mv -f docs/$$d.doxytags.tmp docs/$$d.doxytags ; \
fi ; \
done
- @cd ${srcdir} ;\
for d in $(DIST_SUBDIRS); do \
test -r $$d/Doxyfile \
&& pushd $$d > /dev/null \
&& echo running ${DOXYGEN} first time in $$d \
&& ${DOXYGEN} 2>&1 \
- | egrep -v -i -e 'Warning: (unsupported (xml/)?html tag|unable to resolve reference|could not be resolved)' \
+ | egrep -v -i -e 'Warning: (unsupported (xml/)?html tag|unable to resolve reference|explicit link.*could not be resolved)' \
; popd > /dev/null ; \
test -r docs/$$d.doxytags && \
sed '2,10s!<name>index</name>!<name>'$$d'_index</name>!' \
docs/$$d.doxytags > docs/$$d.doxytags.tmp && \
mv -f docs/$$d.doxytags.tmp docs/$$d.doxytags ; \
done
- @cd ${srcdir} ;\
for d in $(DIST_SUBDIRS); do \
test -r $$d/Doxyfile \
&& pushd $$d > /dev/null \
@@ -97,6 +94,6 @@
docs/$$d.doxytags > docs/$$d.doxytags.tmp && \
mv -f docs/$$d.doxytags.tmp docs/$$d.doxytags ; \
done
- cd ${srcdir}/docs/html && ../hide_emails.sh
+ ${srcdir}/docs/hide_emails.sh docs/html
.PHONY: built-sources built-sources-am empty-doxytags doxygen
Added: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/bnf/Doxyfile.in
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/bnf/Doxyfile.in Thu Apr 19 18:28:01 2007
@@ -0,0 +1,15 @@
+PROJECT_NAME = "bnf"
+OUTPUT_DIRECTORY = ../docs/html/bnf
+
+INPUT = @srcdir@/bnf.docs @srcdir@/sofia-sip @srcdir@ .
+
+@INCLUDE_PATH = . @srcdir@
+@INCLUDE = ../docs/Doxyfile.conf
+
+TAGFILES += ../docs/su.doxytags=../su
+
+GENERATE_TAGFILE = ../docs/bnf.doxytags
+
+PREDEFINED += "static="
+
+MAX_INITIALIZER_LINES = 2
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/bnf/Makefile.am
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/bnf/Makefile.am (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/bnf/Makefile.am Thu Apr 19 18:28:01 2007
@@ -33,7 +33,7 @@
# ----------------------------------------------------------------------
# Install and distribution rules
-EXTRA_DIST = Doxyfile bnf.docs
+EXTRA_DIST = bnf.docs
# ----------------------------------------------------------------------
# Tests
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/docs/Doxyfile.conf
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/docs/Doxyfile.conf (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/docs/Doxyfile.conf Thu Apr 19 18:28:01 2007
@@ -62,5 +62,3 @@
EXCLUDE_PATTERNS = acconfig.h config.h confdefs.h \
test*.h test*.c torture*.c *test.c *torture.c \
*_tag_dll.c *_tag_ref.c
-
-IMAGE_PATH = ../../libsofia-sip-ua/docs/pictures
Added: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/docs/Doxyfile.in
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/docs/Doxyfile.in Thu Apr 19 18:28:01 2007
@@ -0,0 +1,31 @@
+PROJECT_NAME = "libsofia-sip-ua"
+OUTPUT_DIRECTORY = ../docs/html
+
+INPUT = @srcdir@/mainpage.docs @srcdir@/docguide.docs @srcdir@/conformance.docs
+
+# release.docs
+
+@INCLUDE_PATH = . @srcdir@
+@INCLUDE = ../docs/Doxyfile.conf
+
+GENERATE_TAGFILE = docs.doxytags
+
+TAGFILES =
+TAGFILES += su.doxytags=su
+TAGFILES += ipt.doxytags=ipt
+TAGFILES += bnf.doxytags=bnf
+TAGFILES += url.doxytags=url
+TAGFILES += msg.doxytags=msg
+TAGFILES += sip.doxytags=sip
+TAGFILES += sresolv.doxytags=sresolv
+TAGFILES += stun.doxytags=stun
+TAGFILES += tport.doxytags=tport
+TAGFILES += nta.doxytags=nta
+TAGFILES += iptsec.doxytags=iptsec
+TAGFILES += sdp.doxytags=sdp
+TAGFILES += soa.doxytags=soa
+TAGFILES += nea.doxytags=nea
+TAGFILES += nua.doxytags=nua
+TAGFILES += features.doxytags=features
+
+EXAMPLE_PATH = @srcdir@/../sip
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/docs/Doxyfile.version.in
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/docs/Doxyfile.version.in (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/docs/Doxyfile.version.in Thu Apr 19 18:28:01 2007
@@ -1 +1,3 @@
PROJECT_NUMBER = @VERSION@
+
+IMAGE_PATH = @top_srcdir@/libsofia-sip-ua/docs/pictures
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/docs/Makefile.am
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/docs/Makefile.am (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/docs/Makefile.am Thu Apr 19 18:28:01 2007
@@ -1,9 +1,7 @@
-EXTRA_DIST = Doxyfile Doxyfile.aliases Doxyfile.conf \
+EXTRA_DIST = Doxyfile.aliases Doxyfile.conf \
docguide.docs \
mainpage.docs \
conformance.docs \
- Doxyfile.version.in \
- sofia-footer.html.in \
hide_emails.sh \
ChangeLog \
pictures/SIP_basic_incoming_operation.eps \
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/docs/hide_emails.sh
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/docs/hide_emails.sh (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/docs/hide_emails.sh Thu Apr 19 18:28:01 2007
@@ -29,9 +29,9 @@
#
# --------------------------------------------------------------------
-find . -name '*.html' -print | while read i ; do
- (
- echo "Hiding email addresses in ${i}."
- sed -r -i 's/([:>;][a-z][-a-z.]*)((a)[a-z][a-z]*)\.[a-z][a-z]*(["<\&])/\1\2-email.address.hidden\3/gi' $i
- )
-done
+echo "Hiding email addresses in ${1:-.}"
+
+find ${1:-.} -name '*.html' -print0 |
+xargs -0 \
+sed -r -i 's/([:>;][a-z][-a-z.]*)((a)[a-z][a-z]*)\.[a-z][a-z]*(["<\&])/\1\2-email.address.hidden\3/gi'
+
Added: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/features/Doxyfile.in
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/features/Doxyfile.in Thu Apr 19 18:28:01 2007
@@ -0,0 +1,23 @@
+PROJECT_NAME = "features"
+OUTPUT_DIRECTORY = ../docs/html/features
+
+INPUT = @srcdir@/features.docs @srcdir@/sofia-sip sofia-sip @srcdir@ .
+
+@INCLUDE_PATH = . @srcdir@
+@INCLUDE = ../docs/Doxyfile.conf
+
+TAGFILES += ../docs/docs.doxytags=..
+TAGFILES += ../docs/su.doxytags=../su
+TAGFILES += ../docs/ipt.doxytags=../ipt
+TAGFILES += ../docs/bnf.doxytags=../bnf
+TAGFILES += ../docs/url.doxytags=../url
+TAGFILES += ../docs/msg.doxytags=../msg
+TAGFILES += ../docs/sip.doxytags=../sip
+TAGFILES += ../docs/sresolv.doxytags=../sresolv
+TAGFILES += ../docs/tport.doxytags=../tport
+TAGFILES += ../docs/nta.doxytags=../nta
+TAGFILES += ../docs/sdp.doxytags=../sdp
+
+GENERATE_TAGFILE = ../docs/features.doxytags
+
+ALIASES +=
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/features/Makefile.am
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/features/Makefile.am (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/features/Makefile.am Thu Apr 19 18:28:01 2007
@@ -26,7 +26,7 @@
# ----------------------------------------------------------------------
# Install and distribution rules
-EXTRA_DIST = Doxyfile features.docs
+EXTRA_DIST = features.docs
# ----------------------------------------------------------------------
# Sofia specific rules
Added: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/Doxyfile.in
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/Doxyfile.in Thu Apr 19 18:28:01 2007
@@ -0,0 +1,19 @@
+PROJECT_NAME = "http"
+OUTPUT_DIRECTORY = ../docs/html/http
+
+INPUT = @srcdir@/http.docs @srcdir@/sofia-sip sofia-sip @srcdir@ .
+
+@INCLUDE_PATH = . @srcdir@
+@INCLUDE = ../docs/Doxyfile.conf
+
+TAGFILES += \
+ ../docs/su.doxytags=../su \
+ ../docs/ipt.doxytags=../ipt \
+ ../docs/bnf.doxytags=../bnf \
+ ../docs/url.doxytags=../url \
+ ../docs/msg.doxytags=../msg
+
+GENERATE_TAGFILE = ../docs/http.doxytags
+
+ALIASES += \
+ "HTTP_HEADER=@ingroup http_headers\n@defgroup" \
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/Makefile.am
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/Makefile.am (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/Makefile.am Thu Apr 19 18:28:01 2007
@@ -56,7 +56,7 @@
# ----------------------------------------------------------------------
# Install and distribution rules
-EXTRA_DIST = Doxyfile http.docs \
+EXTRA_DIST = http.docs \
sofia-sip/http_protos.h.in \
sofia-sip/http_tag.h.in \
http_parser_table.c.in \
Added: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ipt/Doxyfile.in
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ipt/Doxyfile.in Thu Apr 19 18:28:01 2007
@@ -0,0 +1,13 @@
+PROJECT_NAME = "ipt"
+OUTPUT_DIRECTORY = ../docs/html/ips
+
+INPUT = @srcdir@/ipt.docs @srcdir@/sofia-sip @srcdir@ .
+
+@INCLUDE_PATH = . @srcdir@
+@INCLUDE = ../docs/Doxyfile.conf
+
+TAGFILES += ../docs/su.doxytags=../su
+GENERATE_TAGFILE = ../docs/ipt.doxytags
+
+ALIASES +=
+
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ipt/Makefile.am
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ipt/Makefile.am (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ipt/Makefile.am Thu Apr 19 18:28:01 2007
@@ -46,7 +46,7 @@
# ----------------------------------------------------------------------
# Install and distribution rules
-EXTRA_DIST += Doxyfile ipt.docs
+EXTRA_DIST += ipt.docs
# ----------------------------------------------------------------------
# Sofia specific rules
Added: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/Doxyfile.in
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/Doxyfile.in Thu Apr 19 18:28:01 2007
@@ -0,0 +1,26 @@
+PROJECT_NAME = "iptsec"
+OUTPUT_DIRECTORY = ../docs/html/iptsec
+
+INPUT = @srcdir@/iptsec.docs @srcdir@/sofia-sip @srcdir@ .
+
+@INCLUDE_PATH = . @srcdir@
+@INCLUDE = ../docs/Doxyfile.conf
+@INCLUDE = ../sip/sip.doxyaliases
+
+TAGFILES += ../docs/su.doxytags=../su
+TAGFILES += ../docs/ipt.doxytags=../ipt
+TAGFILES += ../docs/bnf.doxytags=../bnf
+TAGFILES += ../docs/url.doxytags=../url
+TAGFILES += ../docs/msg.doxytags=../msg
+TAGFILES += ../docs/sip.doxytags=../sip
+TAGFILES += ../docs/http.doxytags=../http
+TAGFILES += ../docs/sresolv.doxytags=../sresolv
+TAGFILES += ../docs/tport.doxytags=../tport
+TAGFILES += ../docs/nta.doxytags=../nta
+
+GENERATE_TAGFILE = ../docs/iptsec.doxytags
+
+ALIASES +=
+
+PREDEFINED += SOFIA_EXTEND_AUTH_CLIENT=1
+
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/Makefile.am
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/Makefile.am (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/Makefile.am Thu Apr 19 18:28:01 2007
@@ -78,7 +78,7 @@
# ----------------------------------------------------------------------
# Install and distribution rules
-EXTRA_DIST = Doxyfile iptsec.docs testpasswd $(BUILT_SOURCES)
+EXTRA_DIST = iptsec.docs testpasswd $(BUILT_SOURCES)
# ----------------------------------------------------------------------
# Sofia specific rules
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/sofia-sip/auth_client_plugin.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/sofia-sip/auth_client_plugin.h (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/sofia-sip/auth_client_plugin.h Thu Apr 19 18:28:01 2007
@@ -30,7 +30,8 @@
* @brief Client-side plugin interface for authentication
*
* @note For extensions in 1.12.6 or later,
- * you have to #define SOFIA_EXTEND_AUTH_CLIENT to 1.
+ * you have to define SOFIA_EXTEND_AUTH_CLIENT to 1
+ * before including this file.
*
* @author Pekka Pessi <Pekka.Pessi(a)nokia.com>
*
Added: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/Doxyfile.in
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/Doxyfile.in Thu Apr 19 18:28:01 2007
@@ -0,0 +1,18 @@
+PROJECT_NAME = "msg"
+OUTPUT_DIRECTORY = ../docs/html/msg
+
+INPUT = @srcdir@/msg.docs @srcdir@/sofia-sip sofia-sip @srcdir@ .
+
+@INCLUDE_PATH = . @srcdir@
+@INCLUDE = ../docs/Doxyfile.conf
+@INCLUDE = ../sip/sip.doxyaliases
+
+TAGFILES += ../docs/ipt.doxytags=../ipt \
+ ../docs/su.doxytags=../su \
+ ../docs/sip.doxytags=../sip \
+ ../docs/nta.doxytags=../nta \
+ ../docs/http.doxytags=../http
+
+GENERATE_TAGFILE = ../docs/msg.doxytags
+
+IMAGE_PATH += @srcdir@/../sip/images
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/Makefile.am
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/Makefile.am (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/Makefile.am Thu Apr 19 18:28:01 2007
@@ -66,7 +66,7 @@
dist_pkgdata_SCRIPTS = msg_parser.awk
-EXTRA_DIST = Doxyfile msg.docs \
+EXTRA_DIST = msg.docs \
sofia-sip/msg_mime_protos.h.in \
sofia-sip/msg_protos.h.in \
msg_mime_table.c.in \
Added: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nea/Doxyfile.in
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nea/Doxyfile.in Thu Apr 19 18:28:01 2007
@@ -0,0 +1,22 @@
+PROJECT_NAME = "nea"
+OUTPUT_DIRECTORY = ../docs/html/nea
+
+INPUT = @srcdir@/nea.docs @srcdir@/sofia-sip @srcdir@ .
+
+@INCLUDE_PATH = . @srcdir@
+@INCLUDE = ../docs/Doxyfile.conf
+
+EXCLUDE_PATTERNS = test*.c torture*.c
+
+TAGFILES += \
+ "../docs/su.doxytags=../su" \
+ "../docs/ipt.doxytags=../ipt" \
+ "../docs/bnf.doxytags=../bnf" \
+ "../docs/url.doxytags=../url" \
+ "../docs/msg.doxytags=../msg" \
+ "../docs/sip.doxytags=../sip" \
+ "../docs/nta.doxytags=../nta"
+
+GENERATE_TAGFILE = ../docs/nea.doxytags
+
+ALIASES +=
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nea/Makefile.am
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nea/Makefile.am (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nea/Makefile.am Thu Apr 19 18:28:01 2007
@@ -54,7 +54,7 @@
# ----------------------------------------------------------------------
# Install and distribution rules
-EXTRA_DIST = Doxyfile nea.docs $(BUILT_SOURCES)
+EXTRA_DIST = nea.docs $(BUILT_SOURCES)
# ----------------------------------------------------------------------
# Sofia specific rules
Added: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/Doxyfile.in
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/Doxyfile.in Thu Apr 19 18:28:01 2007
@@ -0,0 +1,25 @@
+PROJECT_NAME = "nta"
+OUTPUT_DIRECTORY = ../docs/html/nta
+
+INPUT = @srcdir@/nta.docs @srcdir@/sofia-sip @srcdir@ .
+
+@INCLUDE_PATH = . @srcdir@
+@INCLUDE = ../docs/Doxyfile.conf
+
+TAGFILES += ../docs/su.doxytags=../su
+TAGFILES += ../docs/ipt.doxytags=../ipt
+TAGFILES += ../docs/bnf.doxytags=../bnf
+TAGFILES += ../docs/url.doxytags=../url
+TAGFILES += ../docs/msg.doxytags=../msg
+TAGFILES += ../docs/sip.doxytags=../sip
+TAGFILES += ../docs/sresolv.doxytags=../sresolv
+TAGFILES += ../docs/tport.doxytags=../tport
+
+GENERATE_TAGFILE = ../docs/nta.doxytags
+
+EXCLUDE_PATTERNS += sl_*.h sl_*.c nta_compat.*
+
+ALIASES +=
+
+@INCLUDE_PATH = . @srcdir@
+@INCLUDE = ../sip/sip.doxyaliases
\ No newline at end of file
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/Makefile.am
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/Makefile.am (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/Makefile.am Thu Apr 19 18:28:01 2007
@@ -66,7 +66,7 @@
# ----------------------------------------------------------------------
# Install and distribution rules
-EXTRA_DIST = Doxyfile nta.docs sl_utils.docs \
+EXTRA_DIST = nta.docs sl_utils.docs \
agent.pem cafile.pem \
invite.msc $(BUILT_SOURCES)
Added: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nth/Doxyfile.in
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nth/Doxyfile.in Thu Apr 19 18:28:01 2007
@@ -0,0 +1,19 @@
+PROJECT_NAME = "nth"
+OUTPUT_DIRECTORY = ../docs/html/nth
+
+INPUT = @srcdir@/nth.docs @srcdir@/sofia-sip @srcdir@ .
+
+@INCLUDE_PATH = . @srcdir@
+@INCLUDE = ../docs/Doxyfile.conf
+
+TAGFILES += \
+ "../docs/su.doxytags=../su" \
+ "../docs/ipt.doxytags=../ipt" \
+ "../docs/bnf.doxytags=../bnf" \
+ "../docs/url.doxytags=../url" \
+ "../docs/msg.doxytags=../msg" \
+ "../docs/http.doxytags=../http" \
+
+GENERATE_TAGFILE = ../docs/nth.doxytags
+
+ALIASES +=
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nth/Makefile.am
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nth/Makefile.am (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nth/Makefile.am Thu Apr 19 18:28:01 2007
@@ -57,7 +57,7 @@
# ----------------------------------------------------------------------
# Install and distribution rules
-EXTRA_DIST = Doxyfile nth.docs $(BUILT_SOURCES) \
+EXTRA_DIST = nth.docs $(BUILT_SOURCES) \
agent.pem cafile.pem
# ----------------------------------------------------------------------
Added: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/Doxyfile.in
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/Doxyfile.in Thu Apr 19 18:28:01 2007
@@ -0,0 +1,39 @@
+PROJECT_NAME = "nua"
+OUTPUT_DIRECTORY = ../docs/html/nua
+
+INPUT = @srcdir@/nua.docs @srcdir@/sofia-sip @srcdir@ .
+
+@INCLUDE_PATH = . @srcdir@
+@INCLUDE = ../docs/Doxyfile.conf
+
+TAGFILES += ../docs/docs.doxytags=../docs
+TAGFILES += ../docs/su.doxytags=../su
+TAGFILES += ../docs/ipt.doxytags=../ipt
+TAGFILES += ../docs/bnf.doxytags=../bnf
+TAGFILES += ../docs/url.doxytags=../url
+TAGFILES += ../docs/msg.doxytags=../msg
+TAGFILES += ../docs/sip.doxytags=../sip
+TAGFILES += ../docs/sresolv.doxytags=../sresolv
+TAGFILES += ../docs/tport.doxytags=../tport
+TAGFILES += ../docs/nta.doxytags=../nta
+TAGFILES += ../docs/soa.doxytags=../soa
+TAGFILES += ../docs/nea.doxytags=../nea
+TAGFILES += ../docs/sdp.doxytags=../sdp
+
+GENERATE_TAGFILE = ../docs/nua.doxytags
+
+ALIASES += CFILE="@internal @file" IFILE="@internal @file"
+
+ALIASES += nua="@ref index \"nua\""
+# When GENERATE_TAGFILE=YES, we should use \ref main
+#ALIASES += nua="@ref main \"nua\""
+
+ALIASES += NUA_EVENT="@var nua_event_e::"
+ALIASES += END_NUA_EVENT="@par "
+
+ALIASES += \
+ NUA_HPARAM_CALLS="nua_invite(), nua_respond(), nua_ack(), nua_prack(), nua_update(), nua_info(), nua_bye(), nua_options(), nua_message(), nua_register(), nua_publish(), nua_refer(),nua_subscribe(), nua_notify(), nua_refer(), nua_notifier()"
+
+VERBATIM_HEADERS = NO
+
+@INCLUDE = ../sip/sip.doxyaliases
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/Makefile.am
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/Makefile.am (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/Makefile.am Thu Apr 19 18:28:01 2007
@@ -92,7 +92,7 @@
# ----------------------------------------------------------------------
# Install and distribution rules
-EXTRA_DIST = Doxyfile nua.docs $(BUILT_SOURCES)
+EXTRA_DIST = nua.docs $(BUILT_SOURCES)
# ----------------------------------------------------------------------
# Sofia specific rules
Added: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/Doxyfile.in
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/Doxyfile.in Thu Apr 19 18:28:01 2007
@@ -0,0 +1,12 @@
+PROJECT_NAME = "sdp"
+OUTPUT_DIRECTORY = ../docs/html/sdp
+
+INPUT = @srcdir@/sdp.docs @srcdir@/sofia-sip @srcdir@ .
+
+@INCLUDE_PATH = . @srcdir@
+@INCLUDE = ../docs/Doxyfile.conf
+
+TAGFILES += ../docs/su.doxytags=../su
+GENERATE_TAGFILE = ../docs/sdp.doxytags
+
+ALIASES +=
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/Makefile.am
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/Makefile.am (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/Makefile.am Thu Apr 19 18:28:01 2007
@@ -43,7 +43,7 @@
# ----------------------------------------------------------------------
# Install and distribution rules
-EXTRA_DIST = Doxyfile sdp.docs $(BUILT_SOURCES) \
+EXTRA_DIST = sdp.docs $(BUILT_SOURCES) \
tests/message-1.sdp \
tests/message-2.sdp \
tests/message-3.sdp \
Added: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/Doxyfile.in
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/Doxyfile.in Thu Apr 19 18:28:01 2007
@@ -0,0 +1,31 @@
+PROJECT_NAME = "sip"
+OUTPUT_DIRECTORY = ../docs/html/sip
+
+INPUT = @srcdir@/sofia-sip sofia-sip @srcdir@/sip.docs @srcdir@/sip_parser.docs @srcdir@ .
+
+@INCLUDE_PATH = . @srcdir@
+@INCLUDE = ../docs/Doxyfile.conf
+
+TAGFILES += \
+ ../docs/su.doxytags=../su \
+ ../docs/ipt.doxytags=../ipt \
+ ../docs/bnf.doxytags=../bnf \
+ ../docs/url.doxytags=../url \
+ ../docs/msg.doxytags=../msg \
+ ../docs/sdp.doxytags=../sdp \
+ ../docs/iptsec.doxytags=../iptsec \
+ ../docs/nta.doxytags=../nta \
+ ../docs/nua.doxytags=../nua
+
+GENERATE_TAGFILE = ../docs/sip.doxytags
+
+ALIASES += \
+ "SIP_TAG=@ingroup sip_tag\n" \
+ "SIP_HEADER=@ingroup sip_headers\n@defgroup" \
+ "SIP_PARSER=\n"
+
+@INCLUDE = sip.doxyaliases
+
+PREDEFINED += SU_HAVE_EXPERIMENTAL=1
+
+IMAGE_PATH += @srcdir@/images
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/Makefile.am
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/Makefile.am (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/Makefile.am Thu Apr 19 18:28:01 2007
@@ -69,7 +69,7 @@
# note: srcdir needs to be specified, otherwise
# breaks make distcheck target
-EXTRA_DIST = Doxyfile sip.docs sip_parser.docs sip.doxyaliases \
+EXTRA_DIST = sip.docs sip_parser.docs sip.doxyaliases \
ADD-A-HEADER GRAMMAR sip_bad_mask \
sip_parser_table.c.in sip_tag.c.in \
sip_extra_headers.txt \
Added: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/soa/Doxyfile.in
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/soa/Doxyfile.in Thu Apr 19 18:28:01 2007
@@ -0,0 +1,30 @@
+PROJECT_NAME = "soa"
+OUTPUT_DIRECTORY = ../docs/html/soa
+
+INPUT = @srcdir@/soa.docs @srcdir@/sofia-sip/soa.h
+INPUT += @srcdir@/sofia-sip/soa_add.h @srcdir@/soa.c
+INPUT += @srcdir@/sofia-sip/soa_tag.h @srcdir@/soa_tag.c
+
+@INCLUDE_PATH = . @srcdir@
+@INCLUDE = ../docs/Doxyfile.conf
+
+TAGFILES += ../docs/docs.doxytags=../docs
+TAGFILES += ../docs/su.doxytags=../su
+TAGFILES += ../docs/ipt.doxytags=../ipt
+TAGFILES += ../docs/bnf.doxytags=../bnf
+TAGFILES += ../docs/url.doxytags=../url
+TAGFILES += ../docs/msg.doxytags=../msg
+TAGFILES += ../docs/sip.doxytags=../sip
+TAGFILES += ../docs/sresolv.doxytags=../sresolv
+TAGFILES += ../docs/tport.doxytags=../tport
+TAGFILES += ../docs/nta.doxytags=../nta
+TAGFILES += ../docs/sdp.doxytags=../sdp
+TAGFILES += ../docs/nua.doxytags=../nua
+
+GENERATE_TAGFILE = ../docs/soa.doxytags
+
+ALIASES += soa="@ref index \"soa\""
+# When GENERATE_TAGFILE=YES, we should use \ref main
+#ALIASES += soa="@ref main \"soa\""
+
+@INCLUDE = ../sip/sip.doxyaliases
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/soa/Makefile.am
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/soa/Makefile.am (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/soa/Makefile.am Thu Apr 19 18:28:01 2007
@@ -53,7 +53,7 @@
# ----------------------------------------------------------------------
# Install and distribution rules
-EXTRA_DIST = Doxyfile soa.docs $(BUILT_SOURCES)
+EXTRA_DIST = soa.docs $(BUILT_SOURCES)
# ----------------------------------------------------------------------
# Sofia specific rules
Added: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/Doxyfile.in
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/Doxyfile.in Thu Apr 19 18:28:01 2007
@@ -0,0 +1,16 @@
+PROJECT_NAME = "sresolv"
+OUTPUT_DIRECTORY = ../docs/html/sresolv
+
+INPUT = @srcdir@/sofia-sip @srcdir@/sofia-resolv @srcdir@/sresolv.docs @srcdir@
+
+EXCLUDE = resolve_sip.c
+
+@INCLUDE_PATH = . @srcdir@
+@INCLUDE = ../docs/Doxyfile.conf
+
+ALIASES += CFILE="@internal @file" IFILE="@internal @file"
+
+TAGFILES += ../docs/su.doxytags=../su
+GENERATE_TAGFILE = ../docs/sresolv.doxytags
+
+PREDEFINED += SRES_CONTEXT_T="struct sres_context_s"
\ No newline at end of file
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/Makefile.am
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/Makefile.am (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/Makefile.am Thu Apr 19 18:28:01 2007
@@ -51,7 +51,7 @@
# ----------------------------------------------------------------------
# Distribution
-EXTRA_DIST = Doxyfile sresolv.docs
+EXTRA_DIST = sresolv.docs
dist_noinst_DATA = run_test_sresolv \
root.zone rndc.conf \
Added: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/stun/Doxyfile.in
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/stun/Doxyfile.in Thu Apr 19 18:28:01 2007
@@ -0,0 +1,11 @@
+PROJECT_NAME = "stun"
+OUTPUT_DIRECTORY = ../docs/html/stun
+
+INPUT = @srcdir@/stun.docs @srcdir@/sofia-sip @srcdir@ .
+
+@INCLUDE_PATH = . @srcdir@
+@INCLUDE = ../docs/Doxyfile.conf
+
+TAGFILES += ../docs/su.doxytags=../su
+
+GENERATE_TAGFILE = ../docs/stun.doxytags
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/stun/Makefile.am
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/stun/Makefile.am (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/stun/Makefile.am Thu Apr 19 18:28:01 2007
@@ -46,7 +46,7 @@
# ----------------------------------------------------------------------
# Install and distribution rules
-EXTRA_DIST = Doxyfile stun.docs cert.pem key.pem
+EXTRA_DIST = stun.docs cert.pem key.pem
# ----------------------------------------------------------------------
# Sofia specific rules
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/stun/stunc.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/stun/stunc.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/stun/stunc.c Thu Apr 19 18:28:01 2007
@@ -98,7 +98,7 @@
* @endcode
*
* @section stunc_environment Environment
- * STUN_DEBUG
+ * #STUN_DEBUG
*
* @section stunc_bugs Reporting Bugs
* Report bugs to <sofia-sip-devel(a)lists.sourceforge.net>.
Added: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/Doxyfile.in
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/Doxyfile.in Thu Apr 19 18:28:01 2007
@@ -0,0 +1,25 @@
+PROJECT_NAME = "su"
+OUTPUT_DIRECTORY = ../docs/html/su
+
+INPUT = @srcdir@/su.docs @srcdir@/sofia-sip sofia-sip @srcdir@ .
+
+@INCLUDE_PATH = . @srcdir@
+@INCLUDE = ../docs/Doxyfile.conf
+
+TAGFILES += ../docs/msg.doxytags=../msg
+TAGFILES += ../docs/sip.doxytags=../sip
+TAGFILES += ../docs/docs.doxytags=..
+
+GENERATE_TAGFILE = ../docs/su.doxytags
+
+ALIASES += "SU_TAG=@ingroup su_tag\n"
+
+PREDEFINED += \
+ TSTFLAGS=1 \
+ SU_HAVE_BSDSOCK=0 \
+ su_root_s=su_root_t \
+ _su_task_r=su_task_r
+
+EXCLUDE_PATTERNS += localinfo.c addrinfo.c
+
+@INCLUDE = ../sip/sip.doxyaliases
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/Makefile.am
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/Makefile.am (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/Makefile.am Thu Apr 19 18:28:01 2007
@@ -105,7 +105,7 @@
# ----------------------------------------------------------------------
# Install and distribution rules
-EXTRA_DIST = Doxyfile su.docs \
+EXTRA_DIST = su.docs \
run_addrinfo run_localinfo run_test_su
dist_pkgdata_SCRIPTS = tag_dll.awk
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_log.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_log.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_log.c Thu Apr 19 18:28:01 2007
@@ -63,7 +63,7 @@
* messages based on message priority.
*
* @sa @ref debug_logs, <sofia-sip/su_log.h>,
- * su_llog(), su_vllog(), #su_log_t, #SU_LOG,
+ * su_llog(), su_vllog(), #su_log_t, #SU_DEBUG,
* SU_DEBUG_0(), SU_DEBUG_1(), SU_DEBUG_2(), SU_DEBUG_3(), SU_DEBUG_5(),
* SU_DEBUG_7(), SU_DEBUG_9()
*/
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_timer.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_timer.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_timer.c Thu Apr 19 18:28:01 2007
@@ -157,7 +157,7 @@
unsigned char sut_set; /**< Timer is set (inserted in tree) */
};
-/** @internal Timer running status */
+/** Timer running status */
enum sut_running {
reset = 0, /**< Timer is not running */
run_at_intervals = 1, /**< Compensate missed wakeup calls */
Added: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/Doxyfile.in
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/Doxyfile.in Thu Apr 19 18:28:01 2007
@@ -0,0 +1,20 @@
+PROJECT_NAME = "tport"
+OUTPUT_DIRECTORY = ../docs/html/tport
+
+INPUT = @srcdir@/tport.docs @srcdir@/sofia-sip @srcdir@ .
+
+@INCLUDE_PATH = . @srcdir@
+@INCLUDE = ../docs/Doxyfile.conf
+
+TAGFILES += \
+ ../docs/su.doxytags=../su \
+ ../docs/msg.doxytags=../msg \
+ ../docs/nth.doxytags=../nth \
+ ../docs/nta.doxytags=../nta \
+ ../docs/nua.doxytags=../nua \
+
+GENERATE_TAGFILE = ../docs/tport.doxytags
+
+EXCLUDE_PATTERNS += test_*.[hc] torture_*.[hc]
+
+ALIASES +=
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/Makefile.am
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/Makefile.am (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/Makefile.am Thu Apr 19 18:28:01 2007
@@ -80,7 +80,7 @@
# ----------------------------------------------------------------------
# Install and distribution rules
-EXTRA_DIST = Doxyfile tport.docs \
+EXTRA_DIST = tport.docs \
certificates.html agent.pem cafile.pem
# ----------------------------------------------------------------------
Added: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/url/Doxyfile.in
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/url/Doxyfile.in Thu Apr 19 18:28:01 2007
@@ -0,0 +1,13 @@
+PROJECT_NAME = "url"
+OUTPUT_DIRECTORY = ../docs/html/url
+
+INPUT = @srcdir@/url.docs @srcdir@/sofia-sip @srcdir@ .
+
+@INCLUDE_PATH = . @srcdir@
+@INCLUDE = ../docs/Doxyfile.conf
+
+TAGFILES += ../docs/su.doxytags=../su
+
+GENERATE_TAGFILE = ../docs/url.doxytags
+
+PREDEFINED += "URL_DLL"
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/url/Makefile.am
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/url/Makefile.am (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/url/Makefile.am Thu Apr 19 18:28:01 2007
@@ -43,7 +43,7 @@
# ----------------------------------------------------------------------
# Install and distribution rules
-EXTRA_DIST = Doxyfile url.docs $(BUILT_SOURCES)
+EXTRA_DIST = url.docs $(BUILT_SOURCES)
# ----------------------------------------------------------------------
# Tests
Added: freeswitch/trunk/libs/sofia-sip/utils/Doxyfile.in
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/sofia-sip/utils/Doxyfile.in Thu Apr 19 18:28:01 2007
@@ -0,0 +1,67 @@
+#
+# Template for Doxyfile.
+# @configure_input@
+#
+# Copyright (C) 2006 Nokia Corporation
+# Contact: Pekka Pessi <pekka.pessi(a)nokia.com>
+# Licensed under LGPL. See file COPYING.
+#
+
+PROJECT_NAME = "sofia-sip"
+
+PROJECT_NUMBER = @VERSION@
+
+INPUT = @srcdir@
+INPUT += @top_srcdir@/libsofia-sip-ua/su/localinfo.c
+INPUT += @top_srcdir@/libsofia-sip-ua/su/addrinfo.c
+INPUT += @top_srcdir@/libsofia-sip-ua/stun/stunc.c
+
+OUTPUT_DIRECTORY = ../man
+
+@INCLUDE_PATH = . @srcdir@
+
+@INCLUDE = ../libsofia-sip-ua/docs/Doxyfile.aliases
+@INCLUDE = ../libsofia-sip-ua/docs/Doxyfile.rfc
+
+FILE_PATTERNS = *.h *.c
+
+EXCLUDE_PATTERNS = acconfig.h config.h confdefs.h \
+ test*.h test*.c torture*.c *test.c *torture.c \
+ *_tag_dll.c *_tag_ref.c
+
+TAGFILES =
+
+OUTPUT_LANGUAGE = English
+
+DETAILS_AT_TOP = YES
+OPTIMIZE_OUTPUT_FOR_C = YES
+SHOW_USED_FILES = NO
+
+QUIET = YES
+WARNINGS = YES
+DISABLE_INDEX = NO
+
+HAVE_DOT = YES
+INCLUDE_GRAPH = NO
+INCLUDED_BY_GRAPH = NO
+
+EXTRACT_ALL = NO
+EXTRACT_PRIVATE = NO
+HIDE_UNDOC_MEMBERS = YES
+HIDE_UNDOC_CLASSES = YES
+HIDE_SCOPE_NAMES = YES
+BRIEF_MEMBER_DESC = YES
+REPEAT_BRIEF = YES
+JAVADOC_AUTOBRIEF = YES
+MAX_INITIALIZER_LINES = 0
+ENUM_VALUES_PER_LINE = 1
+
+ENABLE_PREPROCESSING = NO
+
+GENERATE_MAN = YES
+MAN_OUTPUT = .
+MAN_EXTENSION = .1
+MAN_LINKS = NO
+
+GENERATE_HTML = NO
+GENERATE_LATEX = NO
Modified: freeswitch/trunk/libs/sofia-sip/utils/Makefile.am
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/utils/Makefile.am (original)
+++ freeswitch/trunk/libs/sofia-sip/utils/Makefile.am Thu Apr 19 18:28:01 2007
@@ -44,5 +44,3 @@
bin_PROGRAMS = sip-options sip-date sip-dig
LDADD = ../libsofia-sip-ua/libsofia-sip-ua.la $(GLIB_LIBS)
-
-EXTRA_DIST = Doxyfile
Modified: freeswitch/trunk/libs/sofia-sip/utils/sip-dig.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/utils/sip-dig.c (original)
+++ freeswitch/trunk/libs/sofia-sip/utils/sip-dig.c Thu Apr 19 18:28:01 2007
@@ -116,7 +116,7 @@
* @endcode
*
* @section sip_dig_environment Environment
- * SRESOLV_DEBUG, SRESOLV_CONF
+ * #SRESOLV_DEBUG, SRESOLV_CONF
*
* @section sip_dig_bugs Reporting Bugs
* Report bugs to <sofia-sip-devel(a)lists.sourceforge.net>.
Modified: freeswitch/trunk/libs/sofia-sip/utils/sip-options.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/utils/sip-options.c (original)
+++ freeswitch/trunk/libs/sofia-sip/utils/sip-options.c Thu Apr 19 18:28:01 2007
@@ -77,7 +77,7 @@
* @endcode
*
* @section environment Environment
- * SIPADDRESS, sip_proxy, NTA_DEBUG, TPORT_DEBUG, TPORT_LOG.
+ * #SIPADDRESS, #sip_proxy, #NTA_DEBUG, #TPORT_DEBUG, #TPORT_LOG.
*
* @section bugs Reporting Bugs
* Report bugs to <sofia-sip-devel(a)lists.sourceforge.net>.
1
0
[commit] r4978 - in freeswitch/trunk: . src src/include src/mod/codecs/mod_h26x
by Freeswitch SVN 19 Apr '07
by Freeswitch SVN 19 Apr '07
19 Apr '07
Author: mikej
Date: Thu Apr 19 18:04:03 2007
New Revision: 4978
Modified:
freeswitch/trunk/Freeswitch.sln
freeswitch/trunk/src/include/switch_rtp.h
freeswitch/trunk/src/mod/codecs/mod_h26x/mod_h26x.vcproj
freeswitch/trunk/src/switch_rtp.c
Log:
video stuff windows build.
Modified: freeswitch/trunk/Freeswitch.sln
==============================================================================
--- freeswitch/trunk/Freeswitch.sln (original)
+++ freeswitch/trunk/Freeswitch.sln Thu Apr 19 18:04:03 2007
@@ -600,6 +600,8 @@
build\config\ax_compiler_vendor.m4 = build\config\ax_compiler_vendor.m4
EndProjectSection
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_h26x", "src\mod\codecs\mod_h26x\mod_h26x.vcproj", "{2C3C2423-234B-4772-8899-D3B137E5CA35}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
@@ -1122,6 +1124,12 @@
{8DEB383C-4091-4F42-A56F-C9E46D552D79}.Release|Win32.ActiveCfg = Release Passthrough|Win32
{8DEB383C-4091-4F42-A56F-C9E46D552D79}.Release|Win32.Build.0 = Release Passthrough|Win32
{8DEB383C-4091-4F42-A56F-C9E46D552D79}.Release|x64.ActiveCfg = Release|Win32
+ {2C3C2423-234B-4772-8899-D3B137E5CA35}.Debug|Win32.ActiveCfg = Debug|Win32
+ {2C3C2423-234B-4772-8899-D3B137E5CA35}.Debug|Win32.Build.0 = Debug|Win32
+ {2C3C2423-234B-4772-8899-D3B137E5CA35}.Debug|x64.ActiveCfg = Debug|Win32
+ {2C3C2423-234B-4772-8899-D3B137E5CA35}.Release|Win32.ActiveCfg = Release|Win32
+ {2C3C2423-234B-4772-8899-D3B137E5CA35}.Release|Win32.Build.0 = Release|Win32
+ {2C3C2423-234B-4772-8899-D3B137E5CA35}.Release|x64.ActiveCfg = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -1137,6 +1145,7 @@
{D42518CC-7475-454D-B392-0E132C07D761} = {F881ADA2-2F1A-4046-9FEB-191D9422D781}
{FEA1EEF7-876F-48DE-88BF-C0E3E606D758} = {F881ADA2-2F1A-4046-9FEB-191D9422D781}
{8DEB383C-4091-4F42-A56F-C9E46D552D79} = {F881ADA2-2F1A-4046-9FEB-191D9422D781}
+ {2C3C2423-234B-4772-8899-D3B137E5CA35} = {F881ADA2-2F1A-4046-9FEB-191D9422D781}
{3A2A7795-C216-4FFF-B8EF-4D17A84BACCC} = {9ADF1E48-2F5C-4ED7-A893-596259FABFE0}
{F10BE67C-A8FF-4CB2-AF29-D46D2590DC59} = {9ADF1E48-2F5C-4ED7-A893-596259FABFE0}
{C7705DC4-2088-493E-AF8D-65BC6D65C125} = {9ADF1E48-2F5C-4ED7-A893-596259FABFE0}
Modified: freeswitch/trunk/src/include/switch_rtp.h
==============================================================================
--- freeswitch/trunk/src/include/switch_rtp.h (original)
+++ freeswitch/trunk/src/include/switch_rtp.h Thu Apr 19 18:04:03 2007
@@ -348,7 +348,7 @@
*/
SWITCH_DECLARE(int) switch_rtp_write_manual(switch_rtp_t *rtp_session,
void *data,
- uint16_t datalen,
+ uint32_t datalen,
uint8_t m, switch_payload_t payload, uint32_t ts, uint16_t mseq, uint32_t ssrc, switch_frame_flag_t *flags);
/*!
Modified: freeswitch/trunk/src/mod/codecs/mod_h26x/mod_h26x.vcproj
==============================================================================
--- freeswitch/trunk/src/mod/codecs/mod_h26x/mod_h26x.vcproj (original)
+++ freeswitch/trunk/src/mod/codecs/mod_h26x/mod_h26x.vcproj Thu Apr 19 18:04:03 2007
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="mod_h26x"
- ProjectGUID="{5844AFE1-AA3E-4BDB-A9EF-119AEF19DF88}"
+ ProjectGUID="{2C3C2423-234B-4772-8899-D3B137E5CA35}"
RootNamespace="mod_h26x"
Keyword="Win32Proj"
>
Modified: freeswitch/trunk/src/switch_rtp.c
==============================================================================
--- freeswitch/trunk/src/switch_rtp.c (original)
+++ freeswitch/trunk/src/switch_rtp.c Thu Apr 19 18:04:03 2007
@@ -1146,7 +1146,7 @@
frame->source = __FILE__;
frame->flags |= SFF_RAW_RTP;
frame->timestamp = ntohl(rtp_session->recv_msg.header.ts);
- frame->seq = ntohs(rtp_session->recv_msg.header.seq);
+ frame->seq = (uint16_t)ntohs((u_short)rtp_session->recv_msg.header.seq);
frame->ssrc = ntohl(rtp_session->recv_msg.header.ssrc);
frame->m = rtp_session->recv_msg.header.m ? SWITCH_TRUE : SWITCH_FALSE;
@@ -1488,7 +1488,7 @@
if (switch_test_flag(frame, SFF_RTP_HEADER)) {
return switch_rtp_write_manual(rtp_session, frame->data, frame->datalen, frame->m, frame->payload,
- frame->timestamp, frame->seq, frame->ssrc, &frame->flags);
+ (uint32_t)(frame->timestamp), frame->seq, frame->ssrc, &frame->flags);
}
@@ -1521,7 +1521,7 @@
SWITCH_DECLARE(int) switch_rtp_write_manual(switch_rtp_t *rtp_session,
void *data,
- uint16_t datalen,
+ uint32_t datalen,
uint8_t m, switch_payload_t payload, uint32_t ts, uint16_t mseq, uint32_t ssrc, switch_frame_flag_t *flags)
{
rtp_msg_t send_msg = { {0} };
1
0
[commit] r4977 - in freeswitch/trunk/src: . include mod/codecs/mod_h26x mod/endpoints/mod_sofia
by Freeswitch SVN 19 Apr '07
by Freeswitch SVN 19 Apr '07
19 Apr '07
Author: anthm
Date: Thu Apr 19 17:40:50 2007
New Revision: 4977
Added:
freeswitch/trunk/src/mod/codecs/mod_h26x/
freeswitch/trunk/src/mod/codecs/mod_h26x/Makefile
freeswitch/trunk/src/mod/codecs/mod_h26x/mod_h26x.c
freeswitch/trunk/src/mod/codecs/mod_h26x/mod_h26x.vcproj
Modified:
freeswitch/trunk/src/include/switch_core.h
freeswitch/trunk/src/include/switch_core_event_hook.h
freeswitch/trunk/src/include/switch_frame.h
freeswitch/trunk/src/include/switch_ivr.h
freeswitch/trunk/src/include/switch_module_interfaces.h
freeswitch/trunk/src/include/switch_types.h
freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.h
freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c
freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c
freeswitch/trunk/src/switch_core_event_hook.c
freeswitch/trunk/src/switch_core_io.c
freeswitch/trunk/src/switch_core_state_machine.c
freeswitch/trunk/src/switch_ivr_async.c
freeswitch/trunk/src/switch_rtp.c
Log:
modest core framework for video stuff
Modified: freeswitch/trunk/src/include/switch_core.h
==============================================================================
--- freeswitch/trunk/src/include/switch_core.h (original)
+++ freeswitch/trunk/src/include/switch_core.h Thu Apr 19 17:40:50 2007
@@ -714,6 +714,9 @@
*/
SWITCH_DECLARE(switch_status_t) switch_core_session_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout, int stream_id);
+SWITCH_DECLARE(switch_status_t) switch_core_session_read_video_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout, int stream_id);
+SWITCH_DECLARE(switch_status_t) switch_core_session_write_video_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout, int stream_id);
+
/*!
\brief Reset the buffers and resampler on a session
\param session the session to reset
Modified: freeswitch/trunk/src/include/switch_core_event_hook.h
==============================================================================
--- freeswitch/trunk/src/include/switch_core_event_hook.h (original)
+++ freeswitch/trunk/src/include/switch_core_event_hook.h Thu Apr 19 17:40:50 2007
@@ -38,7 +38,9 @@
typedef struct switch_io_event_hook_receive_message switch_io_event_hook_receive_message_t;
typedef struct switch_io_event_hook_receive_event switch_io_event_hook_receive_event_t;
typedef struct switch_io_event_hook_read_frame switch_io_event_hook_read_frame_t;
+typedef struct switch_io_event_hook_video_read_frame switch_io_event_hook_video_read_frame_t;
typedef struct switch_io_event_hook_write_frame switch_io_event_hook_write_frame_t;
+typedef struct switch_io_event_hook_video_write_frame switch_io_event_hook_video_write_frame_t;
typedef struct switch_io_event_hook_kill_channel switch_io_event_hook_kill_channel_t;
typedef struct switch_io_event_hook_waitfor_read switch_io_event_hook_waitfor_read_t;
typedef struct switch_io_event_hook_waitfor_write switch_io_event_hook_waitfor_write_t;
@@ -50,7 +52,9 @@
typedef switch_status_t (*switch_receive_message_hook_t) (switch_core_session_t *, switch_core_session_message_t *);
typedef switch_status_t (*switch_receive_event_hook_t) (switch_core_session_t *, switch_event_t *);
typedef switch_status_t (*switch_read_frame_hook_t) (switch_core_session_t *, switch_frame_t **, int, switch_io_flag_t, int);
+typedef switch_status_t (*switch_video_read_frame_hook_t) (switch_core_session_t *, switch_frame_t **, int, switch_io_flag_t, int);
typedef switch_status_t (*switch_write_frame_hook_t) (switch_core_session_t *, switch_frame_t *, int, switch_io_flag_t, int);
+typedef switch_status_t (*switch_video_write_frame_hook_t) (switch_core_session_t *, switch_frame_t *, int, switch_io_flag_t, int);
typedef switch_status_t (*switch_kill_channel_hook_t) (switch_core_session_t *, int);
typedef switch_status_t (*switch_waitfor_read_hook_t) (switch_core_session_t *, int, int);
typedef switch_status_t (*switch_waitfor_write_hook_t) (switch_core_session_t *, int, int);
@@ -86,6 +90,13 @@
struct switch_io_event_hook_read_frame *next;
};
+/*! \brief Node in which to store custom read frame channel callback hooks */
+struct switch_io_event_hook_video_read_frame {
+ /*! the read frame channel callback hook */
+ switch_read_frame_hook_t video_read_frame;
+ struct switch_io_event_hook_video_read_frame *next;
+};
+
/*! \brief Node in which to store custom write_frame channel callback hooks */
struct switch_io_event_hook_write_frame {
/*! the write_frame channel callback hook */
@@ -93,6 +104,13 @@
struct switch_io_event_hook_write_frame *next;
};
+/*! \brief Node in which to store custom video_write_frame channel callback hooks */
+struct switch_io_event_hook_video_write_frame {
+ /*! the video_write_frame channel callback hook */
+ switch_video_write_frame_hook_t video_write_frame;
+ struct switch_io_event_hook_video_write_frame *next;
+};
+
/*! \brief Node in which to store custom kill channel callback hooks */
struct switch_io_event_hook_kill_channel {
/*! the kill channel callback hook */
@@ -138,8 +156,12 @@
switch_io_event_hook_receive_event_t *receive_event;
/*! a list of read frame hooks */
switch_io_event_hook_read_frame_t *read_frame;
+ /*! a list of video read frame hooks */
+ switch_io_event_hook_video_read_frame_t *video_read_frame;
/*! a list of write frame hooks */
switch_io_event_hook_write_frame_t *write_frame;
+ /*! a list of video write frame hooks */
+ switch_io_event_hook_video_write_frame_t *video_write_frame;
/*! a list of kill channel hooks */
switch_io_event_hook_kill_channel_t *kill_channel;
/*! a list of wait for read hooks */
@@ -186,6 +208,14 @@
SWITCH_DECLARE(switch_status_t) switch_core_event_hook_add_read_frame(switch_core_session_t *session, switch_read_frame_hook_t read_frame);
/*!
+ \brief Add an event hook to be executed when a session reads a frame
+ \param session session to bind hook to
+ \param video_read_frame hook to bind
+ \return SWITCH_STATUS_SUCCESS on suceess
+*/
+SWITCH_DECLARE(switch_status_t) switch_core_event_hook_add_video_read_frame(switch_core_session_t *session, switch_read_frame_hook_t video_read_frame);
+
+/*!
\brief Add an event hook to be executed when a session writes a frame
\param session session to bind hook to
\param write_frame hook to bind
@@ -194,6 +224,14 @@
SWITCH_DECLARE(switch_status_t) switch_core_event_hook_add_write_frame(switch_core_session_t *session, switch_write_frame_hook_t write_frame);
/*!
+ \brief Add an event hook to be executed when a session writes a video frame
+ \param session session to bind hook to
+ \param write_frame hook to bind
+ \return SWITCH_STATUS_SUCCESS on suceess
+*/
+SWITCH_DECLARE(switch_status_t) switch_core_event_hook_add_video_write_frame(switch_core_session_t *session, switch_video_write_frame_hook_t video_write_frame);
+
+/*!
\brief Add an event hook to be executed when a session kills a channel
\param session session to bind hook to
\param kill_channel hook to bind
Modified: freeswitch/trunk/src/include/switch_frame.h
==============================================================================
--- freeswitch/trunk/src/include/switch_frame.h (original)
+++ freeswitch/trunk/src/include/switch_frame.h Thu Apr 19 17:40:50 2007
@@ -30,7 +30,7 @@
*
*/
/*! \file switch_frame.h
- \brief Media Frame Structure
+ \brief Media Frame Structure
*/
#ifndef SWITCH_FRAME_H
@@ -40,7 +40,7 @@
SWITCH_BEGIN_EXTERN_C
/*! \brief An abstraction of a data frame */
- struct switch_frame {
+struct switch_frame {
/*! a pointer to the codec information */
switch_codec_t *codec;
/*! the originating source of the frame */
@@ -63,6 +63,9 @@
switch_payload_t payload;
/*! the timestamp of the frame */
switch_size_t timestamp;
+ uint16_t seq;
+ uint32_t ssrc;
+ switch_bool_t m;
/*! frame flags */
switch_frame_flag_t flags;
};
Modified: freeswitch/trunk/src/include/switch_ivr.h
==============================================================================
--- freeswitch/trunk/src/include/switch_ivr.h (original)
+++ freeswitch/trunk/src/include/switch_ivr.h Thu Apr 19 17:40:50 2007
@@ -203,6 +203,7 @@
SWITCH_DECLARE(switch_status_t) switch_ivr_inband_dtmf_session(switch_core_session_t *session);
SWITCH_DECLARE(switch_status_t) switch_ivr_stop_inband_dtmf_session(switch_core_session_t *session);
+SWITCH_DECLARE(void) switch_ivr_session_echo(switch_core_session_t *session);
/*!
\brief play a file from the disk to the session
Modified: freeswitch/trunk/src/include/switch_module_interfaces.h
==============================================================================
--- freeswitch/trunk/src/include/switch_module_interfaces.h (original)
+++ freeswitch/trunk/src/include/switch_module_interfaces.h Thu Apr 19 17:40:50 2007
@@ -99,6 +99,10 @@
switch_status_t (*receive_event) (switch_core_session_t *, switch_event_t *);
/*! change a sessions channel state */
switch_status_t (*state_change) (switch_core_session_t *);
+ /*! read a video frame from a session */
+ switch_status_t (*read_video_frame) (switch_core_session_t *, switch_frame_t **, int, switch_io_flag_t, int);
+ /*! write a video frame to a session */
+ switch_status_t (*write_video_frame) (switch_core_session_t *, switch_frame_t *, int, switch_io_flag_t, int);
};
/*! \brief Abstraction of an module endpoint interface
Modified: freeswitch/trunk/src/include/switch_types.h
==============================================================================
--- freeswitch/trunk/src/include/switch_types.h (original)
+++ freeswitch/trunk/src/include/switch_types.h Thu Apr 19 17:40:50 2007
@@ -110,6 +110,10 @@
#define SWITCH_LOCAL_MEDIA_PORT_VARIABLE "local_media_port"
#define SWITCH_REMOTE_MEDIA_IP_VARIABLE "remote_media_ip"
#define SWITCH_REMOTE_MEDIA_PORT_VARIABLE "remote_media_port"
+#define SWITCH_REMOTE_VIDEO_IP_VARIABLE "remote_video_ip"
+#define SWITCH_REMOTE_VIDEO_PORT_VARIABLE "remote_video_port"
+#define SWITCH_LOCAL_VIDEO_IP_VARIABLE "local_video_ip"
+#define SWITCH_LOCAL_VIDEO_PORT_VARIABLE "local_video_port"
#define SWITCH_HANGUP_AFTER_BRIDGE_VARIABLE "hangup_after_bridge"
#define SWITCH_MAX_FORWARDS_VARIABLE "max_forwards"
#define SWITCH_SPEECH_KEY "speech"
@@ -542,6 +546,7 @@
CF_BREAK = (1 << 19) - Channel should stop what it's doing
CF_BROADCAST = (1 << 20) - Channel is broadcasting
CF_UNICAST = (1 << 21) - Channel has a unicast connection
+CF_VIDEO = (1 << 22) - Channel has video
</pre>
*/
@@ -567,7 +572,8 @@
CF_RING_READY = (1 << 18),
CF_BREAK = (1 << 19),
CF_BROADCAST = (1 << 20),
- CF_UNICAST = (1 << 21)
+ CF_UNICAST = (1 << 21),
+ CF_VIDEO = (1 << 22)
} switch_channel_flag_t;
@@ -578,12 +584,14 @@
<pre>
SFF_CNG = (1 << 0) - Frame represents comfort noise
SFF_RAW_RTP = (1 << 1) - Frame has raw rtp accessible
+SFF_RTP_HEADER = (1 << 2) - Get the rtp header from the frame header
</pre>
*/
typedef enum {
SFF_NONE = 0,
SFF_CNG = (1 << 0),
- SFF_RAW_RTP = (1 << 1)
+ SFF_RAW_RTP = (1 << 1),
+ SFF_RTP_HEADER = (1 << 2)
} switch_frame_flag_t;
Added: freeswitch/trunk/src/mod/codecs/mod_h26x/Makefile
==============================================================================
--- (empty file)
+++ freeswitch/trunk/src/mod/codecs/mod_h26x/Makefile Thu Apr 19 17:40:50 2007
@@ -0,0 +1,2 @@
+BASE=../../../..
+include /usr/src/freeswitch.trunk/build/modmake.rules
Added: freeswitch/trunk/src/mod/codecs/mod_h26x/mod_h26x.c
==============================================================================
--- (empty file)
+++ freeswitch/trunk/src/mod/codecs/mod_h26x/mod_h26x.c Thu Apr 19 17:40:50 2007
@@ -0,0 +1,154 @@
+/*
+ * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
+ * Copyright (C) 2005/2006, Anthony Minessale II <anthmct(a)yahoo.com>
+ *
+ * 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 <anthmct(a)yahoo.com>
+ * Portions created by the Initial Developer are Copyright (C)
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * Anthony Minessale II <anthmct(a)yahoo.com>
+ *
+ *
+ * mod_h26x.c -- H26X Signed Linear Codec
+ *
+ */
+#include <switch.h>
+
+static const char modname[] = "mod_h26x";
+
+
+static switch_status_t switch_h26x_init(switch_codec_t *codec, switch_codec_flag_t flags, const switch_codec_settings_t *codec_settings)
+{
+ int encoding, decoding;
+
+ encoding = (flags & SWITCH_CODEC_FLAG_ENCODE);
+ decoding = (flags & SWITCH_CODEC_FLAG_DECODE);
+
+ if (!(encoding || decoding)) {
+ return SWITCH_STATUS_FALSE;
+ } else {
+ return SWITCH_STATUS_SUCCESS;
+ }
+}
+
+static switch_status_t switch_h26x_encode(switch_codec_t *codec,
+ switch_codec_t *other_codec,
+ void *decoded_data,
+ uint32_t decoded_data_len,
+ uint32_t decoded_rate, void *encoded_data, uint32_t * encoded_data_len, uint32_t * encoded_rate,
+ unsigned int *flag)
+{
+ return SWITCH_STATUS_FALSE;
+}
+
+static switch_status_t switch_h26x_decode(switch_codec_t *codec,
+ switch_codec_t *other_codec,
+ void *encoded_data,
+ uint32_t encoded_data_len,
+ uint32_t encoded_rate, void *decoded_data, uint32_t * decoded_data_len, uint32_t * decoded_rate,
+ unsigned int *flag)
+{
+ return SWITCH_STATUS_FALSE;
+}
+
+
+static switch_status_t switch_h26x_destroy(switch_codec_t *codec)
+{
+
+ return SWITCH_STATUS_SUCCESS;
+}
+
+static const switch_codec_implementation_t h264_90000_implementation = {
+ /*.codec_type */ SWITCH_CODEC_TYPE_VIDEO,
+ /*.ianacode */ 99,
+ /*.iananame */ "H264",
+ /*.fmtp */ NULL,
+ /*.samples_per_second = */ 90000,
+ /*.bits_per_second = */ 0,
+ /*.microseconds_per_frame = */ 0,
+ /*.samples_per_frame = */ 0,
+ /*.bytes_per_frame = */ 0,
+ /*.encoded_bytes_per_frame = */ 0,
+ /*.number_of_channels = */ 1,
+ /*.pref_frames_per_packet = */ 1,
+ /*.max_frames_per_packet = */ 1,
+ /*.init = */ switch_h26x_init,
+ /*.encode = */ switch_h26x_encode,
+ /*.decode = */ switch_h26x_decode,
+ /*.destroy = */ switch_h26x_destroy
+ /*.next = */
+};
+
+static const switch_codec_implementation_t h263_90000_implementation = {
+ /*.codec_type */ SWITCH_CODEC_TYPE_VIDEO,
+ /*.ianacode */ 34,
+ /*.iananame */ "H263",
+ /*.fmtp */ NULL,
+ /*.samples_per_second = */ 90000,
+ /*.bits_per_second = */ 0,
+ /*.microseconds_per_frame = */ 0,
+ /*.samples_per_frame = */ 0,
+ /*.bytes_per_frame = */ 0,
+ /*.encoded_bytes_per_frame = */ 0,
+ /*.number_of_channels = */ 1,
+ /*.pref_frames_per_packet = */ 1,
+ /*.max_frames_per_packet = */ 1,
+ /*.init = */ switch_h26x_init,
+ /*.encode = */ switch_h26x_encode,
+ /*.decode = */ switch_h26x_decode,
+ /*.destroy = */ switch_h26x_destroy,
+ /*.next = */&h264_90000_implementation
+};
+
+static const switch_codec_interface_t h26x_codec_interface = {
+ /*.interface_name */ "h26x video (passthru)",
+ /*.implementations */ &h263_90000_implementation
+};
+
+static switch_loadable_module_interface_t h26x_module_interface = {
+ /*.module_name */ modname,
+ /*.endpoint_interface */ NULL,
+ /*.timer_interface */ NULL,
+ /*.dialplan_interface */ NULL,
+ /*.codec_interface */ &h26x_codec_interface,
+ /*.application_interface */ NULL,
+ /*.api_interface */ NULL,
+};
+
+
+SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **module_interface, char *filename)
+{
+ /* connect my internal structure to the blank pointer passed to me */
+ *module_interface = &h26x_module_interface;
+
+ /* indicate that the module should continue to be loaded */
+ return SWITCH_STATUS_SUCCESS;
+}
+
+/* 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 expandtab:
+ */
Added: freeswitch/trunk/src/mod/codecs/mod_h26x/mod_h26x.vcproj
==============================================================================
--- (empty file)
+++ freeswitch/trunk/src/mod/codecs/mod_h26x/mod_h26x.vcproj Thu Apr 19 17:40:50 2007
@@ -0,0 +1,211 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="mod_h26x"
+ ProjectGUID="{5844AFE1-AA3E-4BDB-A9EF-119AEF19DF88}"
+ RootNamespace="mod_h26x"
+ Keyword="Win32Proj"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ CommandLine=""
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""$(InputDir)..\..\..\include";"$(InputDir)include";"$(InputDir)..\..\..\..\libs\include";"$(InputDir)..\..\..\..\libs\libresample\include""
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;MOD_EXPORTS"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+ WarnAsError="true"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories=""$(InputDir)..\..\..\..\libs\libresample\win";..\..\..\..\w32\vsnet\$(OutDir)"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
+ SubSystem="2"
+ ImportLibrary="$(OutDir)/mod_h26x.lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ CommandLine=""
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""$(InputDir)..\..\..\include";"$(InputDir)include";"$(InputDir)..\..\..\..\libs\include";"$(InputDir)..\..\..\..\libs\libresample\include""
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;MOD_EXPORTS"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories=""$(InputDir)..\..\..\..\libs\libresample\win";..\..\..\..\w32\vsnet\$(OutDir)"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
+ SubSystem="2"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ ImportLibrary="$(OutDir)/mod_h26x.lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\mod_h26x.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c Thu Apr 19 17:40:50 2007
@@ -58,6 +58,8 @@
switch_memory_pool_t **pool);
static switch_status_t sofia_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout, switch_io_flag_t flags, int stream_id);
static switch_status_t sofia_write_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout, switch_io_flag_t flags, int stream_id);
+static switch_status_t sofia_read_video_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout, switch_io_flag_t flags, int stream_id);
+static switch_status_t sofia_write_video_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout, switch_io_flag_t flags, int stream_id);
static switch_status_t sofia_kill_channel(switch_core_session_t *session, int sig);
@@ -321,12 +323,13 @@
}
-static switch_status_t sofia_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout, switch_io_flag_t flags, int stream_id)
+
+static switch_status_t sofia_read_video_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout, switch_io_flag_t flags, int stream_id)
{
private_object_t *tech_pvt = NULL;
switch_channel_t *channel = NULL;
int payload = 0;
-
+
channel = switch_core_session_get_channel(session);
assert(channel != NULL);
@@ -337,7 +340,7 @@
return SWITCH_STATUS_FALSE;
}
- while (!(tech_pvt->read_codec.implementation && switch_rtp_ready(tech_pvt->rtp_session))) {
+ while (!(tech_pvt->video_read_codec.implementation && switch_rtp_ready(tech_pvt->video_rtp_session))) {
if (switch_channel_ready(channel)) {
switch_yield(10000);
} else {
@@ -346,18 +349,112 @@
}
- tech_pvt->read_frame.datalen = 0;
- switch_set_flag_locked(tech_pvt, TFLAG_READING);
+ tech_pvt->video_read_frame.datalen = 0;
-#if 0
- if (tech_pvt->last_read) {
- elapsed = (unsigned int) ((switch_time_now() - tech_pvt->last_read) / 1000);
- if (elapsed > 60000) {
- return SWITCH_STATUS_TIMEOUT;
+
+ if (switch_test_flag(tech_pvt, TFLAG_IO)) {
+ switch_status_t status;
+
+ if (!switch_test_flag(tech_pvt, TFLAG_RTP)) {
+ return SWITCH_STATUS_GENERR;
+ }
+
+ assert(tech_pvt->rtp_session != NULL);
+ tech_pvt->video_read_frame.datalen = 0;
+
+ while (switch_test_flag(tech_pvt, TFLAG_IO) && tech_pvt->video_read_frame.datalen == 0) {
+ tech_pvt->video_read_frame.flags = SFF_NONE;
+
+ status = switch_rtp_zerocopy_read_frame(tech_pvt->video_rtp_session, &tech_pvt->video_read_frame);
+ if (status != SWITCH_STATUS_SUCCESS && status != SWITCH_STATUS_BREAK) {
+ return SWITCH_STATUS_FALSE;
+ }
+
+ payload = tech_pvt->video_read_frame.payload;
+
+ if (tech_pvt->video_read_frame.datalen > 0) {
+ break;
+ }
}
}
-#endif
+ if (tech_pvt->video_read_frame.datalen == 0) {
+ *frame = NULL;
+ return SWITCH_STATUS_GENERR;
+ }
+
+ *frame = &tech_pvt->video_read_frame;
+
+ return SWITCH_STATUS_SUCCESS;
+}
+
+static switch_status_t sofia_write_video_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout, switch_io_flag_t flags, int stream_id)
+{
+ private_object_t *tech_pvt;
+ switch_channel_t *channel = NULL;
+ switch_status_t status = SWITCH_STATUS_SUCCESS;
+
+ channel = switch_core_session_get_channel(session);
+ assert(channel != NULL);
+
+ tech_pvt = (private_object_t *) switch_core_session_get_private(session);
+ assert(tech_pvt != NULL);
+
+ while (!(tech_pvt->video_read_codec.implementation && switch_rtp_ready(tech_pvt->video_rtp_session))) {
+ if (switch_channel_ready(channel)) {
+ switch_yield(10000);
+ } else {
+ return SWITCH_STATUS_GENERR;
+ }
+ }
+
+ if (switch_test_flag(tech_pvt, TFLAG_HUP)) {
+ return SWITCH_STATUS_FALSE;
+ }
+
+ if (!switch_test_flag(tech_pvt, TFLAG_RTP)) {
+ return SWITCH_STATUS_GENERR;
+ }
+
+ if (!switch_test_flag(tech_pvt, TFLAG_IO)) {
+ return SWITCH_STATUS_SUCCESS;
+ }
+
+ if (!switch_test_flag(frame, SFF_CNG)) {
+ switch_rtp_write_frame(tech_pvt->video_rtp_session, frame, 0);
+ }
+
+ return status;
+}
+
+
+static switch_status_t sofia_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout, switch_io_flag_t flags, int stream_id)
+{
+ private_object_t *tech_pvt = NULL;
+ switch_channel_t *channel = NULL;
+ int payload = 0;
+
+ channel = switch_core_session_get_channel(session);
+ assert(channel != NULL);
+
+ tech_pvt = (private_object_t *) switch_core_session_get_private(session);
+ assert(tech_pvt != NULL);
+
+ if (switch_test_flag(tech_pvt, TFLAG_HUP)) {
+ return SWITCH_STATUS_FALSE;
+ }
+
+ while (!(tech_pvt->read_codec.implementation && switch_rtp_ready(tech_pvt->rtp_session))) {
+ if (switch_channel_ready(channel)) {
+ switch_yield(10000);
+ } else {
+ return SWITCH_STATUS_GENERR;
+ }
+ }
+
+
+ tech_pvt->read_frame.datalen = 0;
+ switch_set_flag_locked(tech_pvt, TFLAG_READING);
if (switch_test_flag(tech_pvt, TFLAG_IO)) {
switch_status_t status;
@@ -382,20 +479,6 @@
payload = tech_pvt->read_frame.payload;
-#if 0
- elapsed = (unsigned int) ((switch_time_now() - started) / 1000);
-
- if (timeout > -1) {
- if (elapsed >= (unsigned int) timeout) {
- return SWITCH_STATUS_BREAK;
- }
- }
-
- elapsed = (unsigned int) ((switch_time_now() - last_act) / 1000);
- if (elapsed >= hard_timeout) {
- return SWITCH_STATUS_BREAK;
- }
-#endif
if (switch_rtp_has_dtmf(tech_pvt->rtp_session)) {
char dtmf[128];
switch_rtp_dequeue_dtmf(tech_pvt->rtp_session, dtmf, sizeof(dtmf));
@@ -508,6 +591,9 @@
if (switch_rtp_ready(tech_pvt->rtp_session)) {
switch_rtp_set_flag(tech_pvt->rtp_session, SWITCH_RTP_FLAG_BREAK);
}
+ if (switch_rtp_ready(tech_pvt->video_rtp_session)) {
+ switch_rtp_set_flag(tech_pvt->video_rtp_session, SWITCH_RTP_FLAG_BREAK);
+ }
break;
case SWITCH_SIG_KILL:
default:
@@ -517,6 +603,9 @@
if (switch_rtp_ready(tech_pvt->rtp_session)) {
switch_rtp_kill_socket(tech_pvt->rtp_session);
}
+ if (switch_rtp_ready(tech_pvt->video_rtp_session)) {
+ switch_rtp_kill_socket(tech_pvt->video_rtp_session);
+ }
break;
}
@@ -774,7 +863,10 @@
/*.waitfor_read */ sofia_waitfor_write,
/*.send_dtmf */ sofia_send_dtmf,
/*.receive_message */ sofia_receive_message,
- /*.receive_event */ sofia_receive_event
+ /*.receive_event */ sofia_receive_event,
+ /*.state_change*/ NULL,
+ /*.read_video_frame*/ sofia_read_video_frame,
+ /*.write_video_frame*/ sofia_write_video_frame
};
static const switch_state_handler_table_t sofia_event_handlers = {
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.h
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.h (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.h Thu Apr 19 17:40:50 2007
@@ -137,7 +137,9 @@
TFLAG_BUGGY_2833 = (1 << 21),
TFLAG_SIP_HOLD = (1 << 22),
TFLAG_INB_NOMEDIA = (1 << 23),
- TFLAG_LATE_NEGOTIATION = (1 << 24)
+ TFLAG_LATE_NEGOTIATION = (1 << 24),
+ TFLAG_SDP = (1 << 25),
+ TFLAG_VIDEO = (1 << 26)
} TFLAGS;
struct mod_sofia_globals {
@@ -310,7 +312,23 @@
nua_handle_t *nh;
nua_handle_t *nh2;
sip_contact_t *contact;
- int hangup_status;
+ /** VIDEO **/
+ switch_frame_t video_read_frame;
+ switch_codec_t video_read_codec;
+ switch_codec_t video_write_codec;
+ switch_rtp_t *video_rtp_session;
+ switch_port_t adv_sdp_video_port;
+ switch_port_t local_sdp_video_port;
+ char *video_rm_encoding;
+ switch_payload_t video_pt;
+ unsigned long video_rm_rate;
+ uint32_t video_codec_ms;
+ char *remote_sdp_video_ip;
+ switch_port_t remote_sdp_video_port;
+ char *video_rm_fmtp;
+ switch_payload_t video_agreed_pt;
+ char *video_fmtp_out;
+ uint32_t video_count;
};
struct callback_t {
@@ -428,3 +446,4 @@
switch_core_db_callback_func_t callback,
void *pdata);
char *sofia_glue_execute_sql2str(sofia_profile_t *profile, switch_mutex_t *mutex, char *sql, char *resbuf, size_t len);
+void sofia_glue_check_video_codecs(private_object_t *tech_pvt);
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c Thu Apr 19 17:40:50 2007
@@ -924,14 +924,8 @@
nua_ack(nh, TAG_END());
break;
case nua_callstate_received:
-
- if (session && switch_core_session_running(session)) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Re-Entering Call State Received!\n");
- goto done;
- }
-
- if (channel) {
- if (r_sdp) {
+ if (tech_pvt && !switch_test_flag(tech_pvt, TFLAG_SDP)) {
+ if (r_sdp && !switch_test_flag(tech_pvt, TFLAG_SDP)) {
if (switch_test_flag(tech_pvt, TFLAG_NOMEDIA)) {
switch_channel_set_variable(channel, SWITCH_ENDPOINT_DISPOSITION_VARIABLE, "RECEIVED_NOMEDIA");
switch_set_flag_locked(tech_pvt, TFLAG_READY);
@@ -1015,7 +1009,7 @@
break;
case nua_callstate_completed:
if (tech_pvt && r_sdp) {
- if (r_sdp) {
+ if (r_sdp) { // && !switch_test_flag(tech_pvt, TFLAG_SDP)) {
if (switch_test_flag(tech_pvt, TFLAG_NOMEDIA)) {
goto done;
} else {
@@ -1078,10 +1072,10 @@
goto done;
}
- if (!r_sdp) {
+ if (!r_sdp && !switch_test_flag(tech_pvt, TFLAG_SDP)) {
r_sdp = (const char *) switch_channel_get_variable(channel, SWITCH_R_SDP_VARIABLE);
}
- if (r_sdp) {
+ if (r_sdp && !switch_test_flag(tech_pvt, TFLAG_SDP)) {
if (switch_test_flag(tech_pvt, TFLAG_NOMEDIA)) {
switch_set_flag_locked(tech_pvt, TFLAG_ANS);
switch_channel_mark_answered(channel);
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c Thu Apr 19 17:40:50 2007
@@ -34,6 +34,8 @@
*/
#include "mod_sofia.h"
+switch_status_t sofia_glue_tech_choose_video_port(private_object_t *tech_pvt);
+switch_status_t sofia_glue_tech_set_video_codec(private_object_t *tech_pvt, int force);
void sofia_glue_set_local_sdp(private_object_t *tech_pvt, char *ip, uint32_t port, char *sr, int force)
{
@@ -41,6 +43,7 @@
switch_time_t now = switch_time_now();
int ptime = 0;
int rate = 0;
+ uint32_t v_port;
if (!force && !ip && !sr && switch_test_flag(tech_pvt, TFLAG_NOMEDIA)) {
return;
@@ -56,6 +59,8 @@
port = tech_pvt->proxy_sdp_audio_port;
}
}
+
+
if (!sr) {
sr = "sendrecv";
}
@@ -63,7 +68,10 @@
snprintf(buf, sizeof(buf),
"v=0\n"
"o=FreeSWITCH %d%" SWITCH_TIME_T_FMT " %d%" SWITCH_TIME_T_FMT " IN IP4 %s\n"
- "s=FreeSWITCH\n" "c=IN IP4 %s\n" "t=0 0\n" "a=%s\n" "m=audio %d RTP/AVP", port, now, port, now, ip, ip, sr, port);
+ "s=FreeSWITCH\n"
+ "c=IN IP4 %s\n" "t=0 0\n"
+ "a=%s\n"
+ "m=audio %d RTP/AVP", port, now, port, now, ip, ip, sr, port);
if (tech_pvt->rm_encoding) {
snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), " %d", tech_pvt->pt);
@@ -72,6 +80,10 @@
for (i = 0; i < tech_pvt->num_codecs; i++) {
const switch_codec_implementation_t *imp = tech_pvt->codecs[i];
+ if (imp->codec_type != SWITCH_CODEC_TYPE_AUDIO) {
+ continue;
+ }
+
snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), " %d", imp->ianacode);
if (!ptime) {
ptime = imp->microseconds_per_frame / 1000;
@@ -105,6 +117,10 @@
const switch_codec_implementation_t *imp = tech_pvt->codecs[i];
uint32_t rfc_3551_sucks = imp->samples_per_second;
+ if (imp->codec_type != SWITCH_CODEC_TYPE_AUDIO) {
+ continue;
+ }
+
if (!rate) {
rate = imp->samples_per_second;
}
@@ -136,6 +152,65 @@
snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "a=ptime:%d\n", ptime);
}
+
+ if (switch_test_flag(tech_pvt, TFLAG_VIDEO)) {
+ sofia_glue_tech_choose_video_port(tech_pvt);
+ if ((v_port = tech_pvt->adv_sdp_video_port)) {
+ snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "m=video %d RTP/AVP", v_port);
+ sofia_glue_tech_set_video_codec(tech_pvt, 0);
+
+
+ /*****************************/
+ if (tech_pvt->video_rm_encoding) {
+ snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), " %d", tech_pvt->video_pt);
+ } else if (tech_pvt->num_codecs) {
+ int i;
+ for (i = 0; i < tech_pvt->num_codecs; i++) {
+ const switch_codec_implementation_t *imp = tech_pvt->codecs[i];
+
+ if (imp->codec_type != SWITCH_CODEC_TYPE_VIDEO) {
+ continue;
+ }
+
+ snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), " %d", imp->ianacode);
+ if (!ptime) {
+ ptime = imp->microseconds_per_frame / 1000;
+ }
+ }
+ }
+
+ snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "\n");
+
+ if (tech_pvt->rm_encoding) {
+ rate = tech_pvt->video_rm_rate;
+ snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "a=rtpmap:%d %s/%ld\n", tech_pvt->video_pt, tech_pvt->video_rm_encoding, tech_pvt->video_rm_rate);
+ if (tech_pvt->video_fmtp_out) {
+ snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "a=fmtp:%d %s\n", tech_pvt->video_pt, tech_pvt->video_fmtp_out);
+ }
+ } else if (tech_pvt->num_codecs) {
+ int i;
+ for (i = 0; i < tech_pvt->num_codecs; i++) {
+ const switch_codec_implementation_t *imp = tech_pvt->codecs[i];
+
+ if (imp->codec_type != SWITCH_CODEC_TYPE_VIDEO) {
+ continue;
+ }
+
+ if (!rate) {
+ rate = imp->samples_per_second;
+ }
+
+
+ snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "a=rtpmap:%d %s/%d\n", imp->ianacode, imp->iananame, imp->samples_per_second);
+ if (imp->fmtp) {
+ snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "a=fmtp:%d %s\n", imp->ianacode, imp->fmtp);
+ }
+ }
+ }
+ }
+ }
+ /*****************************/
+
tech_pvt->local_sdp_str = switch_core_session_strdup(tech_pvt->session, buf);
}
@@ -146,11 +221,11 @@
char *ocodec = NULL;
if (switch_test_flag(tech_pvt, TFLAG_NOMEDIA)) {
- return;
+ goto end;
}
if (tech_pvt->num_codecs) {
- return;
+ goto end;
}
assert(tech_pvt->session != NULL);
@@ -192,6 +267,26 @@
sizeof(tech_pvt->codecs) / sizeof(tech_pvt->codecs[0]));
}
+ end:
+
+ sofia_glue_check_video_codecs(tech_pvt);
+
+}
+
+void sofia_glue_check_video_codecs(private_object_t *tech_pvt)
+{
+ if (tech_pvt->num_codecs && !switch_test_flag(tech_pvt, TFLAG_VIDEO)) {
+ int i;
+
+ for (i = 0; i < tech_pvt->num_codecs; i++) {
+ if (tech_pvt->codecs[i]->codec_type == SWITCH_CODEC_TYPE_VIDEO) {
+ tech_pvt->video_count++;
+ }
+ }
+ if (tech_pvt->video_count) {
+ switch_set_flag_locked(tech_pvt, TFLAG_VIDEO);
+ }
+ }
}
@@ -297,6 +392,42 @@
return SWITCH_STATUS_SUCCESS;
}
+
+
+switch_status_t sofia_glue_tech_choose_video_port(private_object_t *tech_pvt)
+{
+ char *ip = tech_pvt->profile->rtpip;
+ switch_channel_t *channel;
+ switch_port_t sdp_port;
+ char tmp[50];
+
+ channel = switch_core_session_get_channel(tech_pvt->session);
+
+ if (switch_test_flag(tech_pvt, TFLAG_NOMEDIA) || tech_pvt->adv_sdp_video_port) {
+ return SWITCH_STATUS_SUCCESS;
+ }
+
+
+ tech_pvt->local_sdp_video_port = switch_rtp_request_port();
+ sdp_port = tech_pvt->local_sdp_video_port;
+
+ if (tech_pvt->profile->extrtpip) {
+ if (sofia_glue_ext_address_lookup(&ip, &sdp_port, tech_pvt->profile->extrtpip, switch_core_session_get_pool(tech_pvt->session)) !=
+ SWITCH_STATUS_SUCCESS) {
+ return SWITCH_STATUS_FALSE;
+ }
+ }
+
+ tech_pvt->adv_sdp_video_port = sdp_port;
+
+ snprintf(tmp, sizeof(tmp), "%d", sdp_port);
+ switch_channel_set_variable(channel, SWITCH_LOCAL_VIDEO_IP_VARIABLE, tech_pvt->adv_sdp_audio_ip);
+ switch_channel_set_variable(channel, SWITCH_LOCAL_VIDEO_PORT_VARIABLE, tmp);
+
+
+ return SWITCH_STATUS_SUCCESS;
+}
+
switch_status_t sofia_glue_do_invite(switch_core_session_t *session)
{
char rpid[1024] = { 0 };
@@ -555,6 +686,77 @@
}
switch_rtp_destroy(&tech_pvt->rtp_session);
}
+ if (switch_rtp_ready(tech_pvt->video_rtp_session)) {
+ switch_rtp_destroy(&tech_pvt->video_rtp_session);
+ }
+}
+
+switch_status_t sofia_glue_tech_set_video_codec(private_object_t *tech_pvt, int force)
+{
+ switch_channel_t *channel;
+
+ if (tech_pvt->video_read_codec.implementation) {
+ if (!force) {
+ return SWITCH_STATUS_SUCCESS;
+ }
+ if (strcasecmp(tech_pvt->video_read_codec.implementation->iananame, tech_pvt->video_rm_encoding) ||
+ tech_pvt->video_read_codec.implementation->samples_per_second != tech_pvt->video_rm_rate) {
+
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Changing Codec from %s to %s\n",
+ tech_pvt->video_read_codec.implementation->iananame, tech_pvt->video_rm_encoding);
+ switch_core_codec_destroy(&tech_pvt->video_read_codec);
+ switch_core_codec_destroy(&tech_pvt->video_write_codec);
+ //switch_core_session_reset(tech_pvt->session);
+ } else {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Already using %s\n", tech_pvt->video_read_codec.implementation->iananame);
+ return SWITCH_STATUS_SUCCESS;
+ }
+ }
+
+ channel = switch_core_session_get_channel(tech_pvt->session);
+ assert(channel != NULL);
+
+ if (!tech_pvt->video_rm_encoding) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Can't load codec with no name?\n");
+ return SWITCH_STATUS_FALSE;
+ }
+
+ if (switch_core_codec_init(&tech_pvt->video_read_codec,
+ tech_pvt->video_rm_encoding,
+ tech_pvt->video_rm_fmtp,
+ tech_pvt->video_rm_rate,
+ 0,
+ //tech_pvt->video_codec_ms,
+ 1,
+ SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE,
+ NULL, switch_core_session_get_pool(tech_pvt->session)) != SWITCH_STATUS_SUCCESS) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Can't load codec?\n");
+ return SWITCH_STATUS_FALSE;
+ } else {
+ if (switch_core_codec_init(&tech_pvt->video_write_codec,
+ tech_pvt->video_rm_encoding,
+ tech_pvt->video_rm_fmtp,
+ tech_pvt->video_rm_rate,
+ 0,//tech_pvt->video_codec_ms,
+ 1,
+ SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE,
+ NULL, switch_core_session_get_pool(tech_pvt->session)) != SWITCH_STATUS_SUCCESS) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Can't load codec?\n");
+ return SWITCH_STATUS_FALSE;
+ } else {
+ int ms;
+ tech_pvt->video_read_frame.rate = tech_pvt->video_rm_rate;
+ ms = tech_pvt->video_write_codec.implementation->microseconds_per_frame / 1000;
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Set VIDEO Codec %s %s/%ld %d ms\n",
+ switch_channel_get_name(channel), tech_pvt->video_rm_encoding, tech_pvt->video_rm_rate, tech_pvt->video_codec_ms);
+ tech_pvt->video_read_frame.codec = &tech_pvt->video_read_codec;
+
+ //switch_core_session_set_read_codec(tech_pvt->session, &tech_pvt->read_codec);
+ //switch_core_session_set_write_codec(tech_pvt->session, &tech_pvt->write_codec);
+ tech_pvt->fmtp_out = switch_core_session_strdup(tech_pvt->session, tech_pvt->video_write_codec.fmtp_out);
+ }
+ }
+ return SWITCH_STATUS_SUCCESS;
}
switch_status_t sofia_glue_tech_set_codec(private_object_t *tech_pvt, int force)
@@ -625,6 +827,9 @@
}
+
+
+
switch_status_t sofia_glue_activate_rtp(private_object_t *tech_pvt)
{
int bw, ms;
@@ -674,7 +879,7 @@
flags |= SWITCH_RTP_FLAG_AUTO_CNG;
}
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "RTP [%s] %s:%d->%s:%d codec: %u ms: %d\n",
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "AUDIO RTP [%s] %s:%d->%s:%d codec: %u ms: %d\n",
switch_channel_get_name(channel),
tech_pvt->local_sdp_audio_ip,
tech_pvt->local_sdp_audio_port,
@@ -690,9 +895,9 @@
if (switch_rtp_set_remote_address(tech_pvt->rtp_session, tech_pvt->remote_sdp_audio_ip, tech_pvt->remote_sdp_audio_port, &err) !=
SWITCH_STATUS_SUCCESS) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "RTP REPORTS ERROR: [%s]\n", err);
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "AUDIO RTP REPORTS ERROR: [%s]\n", err);
} else {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "RTP CHANGING DEST TO: [%s:%d]\n",
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "AUDIO RTP CHANGING DEST TO: [%s:%d]\n",
tech_pvt->remote_sdp_audio_ip, tech_pvt->remote_sdp_audio_port);
/* Reactivate the NAT buster flag. */
switch_rtp_set_flag(tech_pvt->rtp_session, SWITCH_RTP_FLAG_AUTOADJ);
@@ -722,7 +927,7 @@
if ((vad_in && inb) || (vad_out && !inb)) {
switch_rtp_enable_vad(tech_pvt->rtp_session, tech_pvt->session, &tech_pvt->read_codec, SWITCH_VAD_FLAG_TALKING);
switch_set_flag_locked(tech_pvt, TFLAG_VAD);
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "RTP Engage VAD for %s ( %s %s )\n",
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "AUDIO RTP Engage VAD for %s ( %s %s )\n",
switch_channel_get_name(switch_core_session_get_channel(tech_pvt->session)), vad_in ? "in" : "", vad_out ? "out" : "");
}
@@ -732,6 +937,41 @@
if (tech_pvt->cng_pt) {
switch_rtp_set_cng_pt(tech_pvt->rtp_session, tech_pvt->cng_pt);
}
+
+ sofia_glue_check_video_codecs(tech_pvt);
+
+ if (switch_test_flag(tech_pvt, TFLAG_VIDEO) && tech_pvt->video_rm_encoding) {
+ flags = (switch_rtp_flag_t) (SWITCH_RTP_FLAG_AUTOADJ | SWITCH_RTP_FLAG_DATAWAIT | SWITCH_RTP_FLAG_NOBLOCK | SWITCH_RTP_FLAG_RAW_WRITE);
+
+ sofia_glue_tech_set_video_codec(tech_pvt, 0);
+
+ tech_pvt->video_rtp_session = switch_rtp_new(tech_pvt->local_sdp_audio_ip,
+ tech_pvt->local_sdp_video_port,
+ tech_pvt->remote_sdp_video_ip,
+ tech_pvt->remote_sdp_video_port,
+ tech_pvt->video_agreed_pt,
+ tech_pvt->video_read_codec.implementation->samples_per_frame,
+ 0,//tech_pvt->video_codec_ms * 1000,
+ (switch_rtp_flag_t) flags,
+ NULL,
+ NULL,//tech_pvt->profile->timer_name,
+ &err, switch_core_session_get_pool(tech_pvt->session));
+
+
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "VIDEO RTP [%s] %s:%d->%s:%d codec: %u ms: %d [%s]\n",
+ switch_channel_get_name(channel),
+ tech_pvt->local_sdp_audio_ip,
+ tech_pvt->local_sdp_video_port,
+ tech_pvt->remote_sdp_video_ip,
+ tech_pvt->remote_sdp_video_port, tech_pvt->video_agreed_pt,
+ 0,//tech_pvt->video_read_codec.implementation->microseconds_per_frame / 1000,
+ switch_rtp_ready(tech_pvt->video_rtp_session) ? "SUCCESS" : err);
+
+
+ if (switch_rtp_ready(tech_pvt->video_rtp_session)) {
+ switch_channel_set_flag(channel, CF_VIDEO);
+ }
+ }
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "RTP REPORTS ERROR: [%s]\n", err);
@@ -783,8 +1023,6 @@
return SWITCH_STATUS_FALSE;
}
-
-
uint8_t sofia_glue_negotiate_sdp(switch_core_session_t *session, sdp_session_t *sdp)
{
uint8_t match = 0;
@@ -811,6 +1049,7 @@
if (switch_strlen_zero(a->a_name)) {
continue;
}
+
if (!strcasecmp(a->a_name, "sendonly")) {
if (!switch_test_flag(tech_pvt, TFLAG_SIP_HOLD)) {
char *stream;
@@ -840,15 +1079,17 @@
sdp_connection_t *connection;
ptime = dptime;
- for (a = m->m_attributes; a; a = a->a_next) {
- if (!strcasecmp(a->a_name, "ptime") && a->a_value) {
- ptime = atoi(a->a_value);
- }
- }
+
if (m->m_type == sdp_media_audio) {
sdp_rtpmap_t *map;
+ for (a = m->m_attributes; a; a = a->a_next) {
+ if (!strcasecmp(a->a_name, "ptime") && a->a_value) {
+ ptime = atoi(a->a_value);
+ }
+ }
+
connection = sdp->sdp_connection;
if (m->m_connections) {
connection = m->m_connections;
@@ -896,14 +1137,18 @@
for (i = 0; i < tech_pvt->num_codecs; i++) {
const switch_codec_implementation_t *imp = tech_pvt->codecs[i];
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Codec Compare [%s:%d]/[%s:%d]\n",
+
+ if (imp->codec_type != SWITCH_CODEC_TYPE_AUDIO) {
+ continue;
+ }
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Audio Codec Compare [%s:%d]/[%s:%d]\n",
rm_encoding, map->rm_pt, imp->iananame, imp->ianacode);
if (map->rm_pt < 96) {
match = (map->rm_pt == imp->ianacode) ? 1 : 0;
} else {
match = strcasecmp(rm_encoding, imp->iananame) ? 0 : 1;
}
-
+
if (match && (map->rm_rate == imp->samples_per_second)) {
if (ptime && ptime * 1000 != imp->microseconds_per_frame) {
near_match = imp;
@@ -963,9 +1208,83 @@
}
}
}
+ } else if (m->m_type == sdp_media_video) {
+ sdp_rtpmap_t *map;
+ const char *rm_encoding;
+ int framerate = 0;
+ const switch_codec_implementation_t *mimp = NULL;
+ int vmatch = 0, i;
+
+ connection = sdp->sdp_connection;
+ if (m->m_connections) {
+ connection = m->m_connections;
+ }
+
+ if (!connection) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot find a c= line in the sdp at media or session level!\n");
+ match = 0;
+ break;
+ }
+
+ for (map = m->m_rtpmaps; map; map = map->rm_next) {
+
+ for (a = m->m_attributes; a; a = a->a_next) {
+ if (!strcasecmp(a->a_name, "framerate") && a->a_value) {
+ framerate = atoi(a->a_value);
+ }
+ }
+ if (!(rm_encoding = map->rm_encoding)) {
+ rm_encoding = "";
+ }
+
+ for (i = 0; i < tech_pvt->num_codecs; i++) {
+ const switch_codec_implementation_t *imp = tech_pvt->codecs[i];
+
+ if (imp->codec_type != SWITCH_CODEC_TYPE_VIDEO) {
+ continue;
+ }
+
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Video Codec Compare [%s:%d]/[%s:%d]\n",
+ rm_encoding, map->rm_pt, imp->iananame, imp->ianacode);
+ if (map->rm_pt < 96) {
+ vmatch = (map->rm_pt == imp->ianacode) ? 1 : 0;
+ } else {
+ vmatch = strcasecmp(rm_encoding, imp->iananame) ? 0 : 1;
+ }
+
+
+ if (vmatch && (map->rm_rate == imp->samples_per_second)) {
+ mimp = imp;
+ break;
+ } else {
+ vmatch = 0;
+ }
+ }
+
+ if (mimp) {
+ if ((tech_pvt->video_rm_encoding = switch_core_session_strdup(session, (char *) rm_encoding))) {
+ char tmp[50];
+ tech_pvt->video_pt = (switch_payload_t) map->rm_pt;
+ tech_pvt->video_rm_rate = map->rm_rate;
+ tech_pvt->video_codec_ms = mimp->microseconds_per_frame / 1000;
+ tech_pvt->remote_sdp_video_ip = switch_core_session_strdup(session, (char *) connection->c_address);
+ tech_pvt->video_rm_fmtp = switch_core_session_strdup(session, (char *) map->rm_fmtp);
+ tech_pvt->remote_sdp_video_port = (switch_port_t) m->m_port;
+ tech_pvt->video_agreed_pt = (switch_payload_t) map->rm_pt;
+ snprintf(tmp, sizeof(tmp), "%d", tech_pvt->remote_sdp_video_port);
+ switch_channel_set_variable(channel, SWITCH_REMOTE_VIDEO_IP_VARIABLE, tech_pvt->remote_sdp_audio_ip);
+ switch_channel_set_variable(channel, SWITCH_REMOTE_VIDEO_PORT_VARIABLE, tmp);
+ } else {
+ vmatch = 0;
+ }
+ }
+ }
}
+
}
+ switch_set_flag_locked(tech_pvt, TFLAG_SDP);
+
return match;
}
Modified: freeswitch/trunk/src/switch_core_event_hook.c
==============================================================================
--- freeswitch/trunk/src/switch_core_event_hook.c (original)
+++ freeswitch/trunk/src/switch_core_event_hook.c Thu Apr 19 17:40:50 2007
@@ -118,6 +118,50 @@
}
+SWITCH_DECLARE(switch_status_t) switch_core_event_hook_add_video_read_frame(switch_core_session_t *session, switch_video_read_frame_hook_t video_read_frame)
+{
+ switch_io_event_hook_video_read_frame_t *hook, *ptr;
+
+ assert(video_read_frame != NULL);
+ if ((hook = switch_core_session_alloc(session, sizeof(*hook))) != 0) {
+ hook->video_read_frame = video_read_frame;
+ if (!session->event_hooks.video_read_frame) {
+ session->event_hooks.video_read_frame = hook;
+ } else {
+ for (ptr = session->event_hooks.video_read_frame; ptr && ptr->next; ptr = ptr->next);
+ ptr->next = hook;
+
+ }
+
+ return SWITCH_STATUS_SUCCESS;
+ }
+
+ return SWITCH_STATUS_MEMERR;
+
+}
+
+SWITCH_DECLARE(switch_status_t) switch_core_event_hook_add_video_write_frame(switch_core_session_t *session, switch_video_write_frame_hook_t video_write_frame)
+{
+ switch_io_event_hook_video_write_frame_t *hook, *ptr;
+
+ assert(video_write_frame != NULL);
+ if ((hook = switch_core_session_alloc(session, sizeof(*hook))) != 0) {
+ hook->video_write_frame = video_write_frame;
+ if (!session->event_hooks.video_write_frame) {
+ session->event_hooks.video_write_frame = hook;
+ } else {
+ for (ptr = session->event_hooks.video_write_frame; ptr && ptr->next; ptr = ptr->next);
+ ptr->next = hook;
+
+ }
+
+ return SWITCH_STATUS_SUCCESS;
+ }
+
+ return SWITCH_STATUS_MEMERR;
+
+}
+
SWITCH_DECLARE(switch_status_t) switch_core_event_hook_add_kill_channel(switch_core_session_t *session, switch_kill_channel_hook_t kill_channel)
{
switch_io_event_hook_kill_channel_t *hook, *ptr;
Modified: freeswitch/trunk/src/switch_core_io.c
==============================================================================
--- freeswitch/trunk/src/switch_core_io.c (original)
+++ freeswitch/trunk/src/switch_core_io.c Thu Apr 19 17:40:50 2007
@@ -35,6 +35,61 @@
#include "private/switch_core.h"
+SWITCH_DECLARE(switch_status_t) switch_core_session_write_video_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout, int stream_id)
+{
+ switch_io_event_hook_video_write_frame_t *ptr;
+ switch_status_t status = SWITCH_STATUS_FALSE;
+ switch_io_flag_t flags = 0;
+ if (session->endpoint_interface->io_routines->write_video_frame) {
+ if ((status = session->endpoint_interface->io_routines->write_video_frame(session, frame, timeout, flags, stream_id)) == SWITCH_STATUS_SUCCESS) {
+ for (ptr = session->event_hooks.video_write_frame; ptr; ptr = ptr->next) {
+ if ((status = ptr->video_write_frame(session, frame, timeout, flags, stream_id)) != SWITCH_STATUS_SUCCESS) {
+ break;
+ }
+ }
+ }
+ }
+ return status;
+}
+
+SWITCH_DECLARE(switch_status_t) switch_core_session_read_video_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout, int stream_id)
+{
+ switch_status_t status = SWITCH_STATUS_FALSE;
+ switch_io_event_hook_video_read_frame_t *ptr;
+
+ if (session->endpoint_interface->io_routines->read_video_frame) {
+ if ((status =
+ session->endpoint_interface->io_routines->read_video_frame(session, frame, timeout, SWITCH_IO_FLAG_NOOP, stream_id)) == SWITCH_STATUS_SUCCESS) {
+ for (ptr = session->event_hooks.video_read_frame; ptr; ptr = ptr->next) {
+ if ((status = ptr->video_read_frame(session, frame, timeout, SWITCH_IO_FLAG_NOOP, stream_id)) != SWITCH_STATUS_SUCCESS) {
+ break;
+ }
+ }
+ }
+ }
+
+ if (status != SWITCH_STATUS_SUCCESS) {
+ goto done;
+ }
+
+ if (!(*frame)) {
+ goto done;
+ }
+
+ assert(session != NULL);
+ assert(*frame != NULL);
+
+ if (switch_test_flag(*frame, SFF_CNG)) {
+ status = SWITCH_STATUS_SUCCESS;
+ goto done;
+ }
+
+ done:
+
+ return status;
+}
+
+
SWITCH_DECLARE(switch_status_t) switch_core_session_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout, int stream_id)
{
switch_io_event_hook_read_frame_t *ptr;
@@ -128,6 +183,10 @@
session->raw_read_frame.samples = session->raw_read_frame.datalen / sizeof(int16_t);
session->raw_read_frame.rate = read_frame->rate;
session->raw_read_frame.timestamp = read_frame->timestamp;
+ session->raw_read_frame.ssrc = read_frame->ssrc;
+ session->raw_read_frame.seq = read_frame->seq;
+ session->raw_read_frame.m = read_frame->m;
+ session->raw_read_frame.payload = read_frame->payload;
read_frame = &session->raw_read_frame;
break;
case SWITCH_STATUS_NOOP:
@@ -139,6 +198,10 @@
session->raw_read_frame.samples = session->raw_read_frame.datalen / sizeof(int16_t);
session->raw_read_frame.timestamp = read_frame->timestamp;
session->raw_read_frame.rate = read_frame->rate;
+ session->raw_read_frame.ssrc = read_frame->ssrc;
+ session->raw_read_frame.seq = read_frame->seq;
+ session->raw_read_frame.m = read_frame->m;
+ session->raw_read_frame.payload = read_frame->payload;
read_frame = &session->raw_read_frame;
status = SWITCH_STATUS_SUCCESS;
break;
@@ -244,6 +307,10 @@
session->enc_read_frame.codec = session->read_codec;
session->enc_read_frame.samples = session->read_codec->implementation->bytes_per_frame / sizeof(int16_t);
session->enc_read_frame.timestamp = read_frame->timestamp;
+ session->enc_read_frame.rate = read_frame->rate;
+ session->enc_read_frame.ssrc = read_frame->ssrc;
+ session->enc_read_frame.seq = read_frame->seq;
+ session->enc_read_frame.m = read_frame->m;
session->enc_read_frame.payload = session->read_codec->implementation->ianacode;
*frame = &session->enc_read_frame;
break;
@@ -252,6 +319,9 @@
session->raw_read_frame.samples = enc_frame->codec->implementation->samples_per_frame;
session->raw_read_frame.timestamp = read_frame->timestamp;
session->raw_read_frame.payload = enc_frame->codec->implementation->ianacode;
+ session->raw_read_frame.m = read_frame->m;
+ session->raw_read_frame.ssrc = read_frame->ssrc;
+ session->raw_read_frame.seq = read_frame->seq;
*frame = &session->raw_read_frame;
status = SWITCH_STATUS_SUCCESS;
break;
@@ -371,6 +441,10 @@
session->raw_write_frame.samples = session->raw_write_frame.datalen / sizeof(int16_t);
session->raw_write_frame.timestamp = frame->timestamp;
session->raw_write_frame.rate = frame->rate;
+ session->raw_write_frame.m = frame->m;
+ session->raw_write_frame.ssrc = frame->ssrc;
+ session->raw_write_frame.seq = frame->seq;
+ session->raw_write_frame.payload = frame->payload;
write_frame = &session->raw_write_frame;
break;
case SWITCH_STATUS_BREAK:
@@ -500,12 +574,18 @@
session->enc_write_frame.samples = enc_frame->datalen / sizeof(int16_t);
session->enc_write_frame.timestamp = frame->timestamp;
session->enc_write_frame.payload = session->write_codec->implementation->ianacode;
+ session->enc_write_frame.m = frame->m;
+ session->enc_write_frame.ssrc = frame->ssrc;
+ session->enc_write_frame.seq = frame->seq;
write_frame = &session->enc_write_frame;
break;
case SWITCH_STATUS_NOOP:
enc_frame->codec = session->write_codec;
enc_frame->samples = enc_frame->datalen / sizeof(int16_t);
enc_frame->timestamp = frame->timestamp;
+ enc_frame->m = frame->m;
+ enc_frame->seq = frame->seq;
+ enc_frame->ssrc = frame->ssrc;
enc_frame->payload = enc_frame->codec->implementation->ianacode;
write_frame = enc_frame;
status = SWITCH_STATUS_SUCCESS;
@@ -553,6 +633,9 @@
session->enc_write_frame.codec = session->write_codec;
session->enc_write_frame.samples = enc_frame->datalen / sizeof(int16_t);
session->enc_write_frame.timestamp = frame->timestamp;
+ session->enc_write_frame.m = frame->m;
+ session->enc_write_frame.ssrc = frame->ssrc;
+ session->enc_write_frame.seq = frame->seq;
session->enc_write_frame.payload = session->write_codec->implementation->ianacode;
write_frame = &session->enc_write_frame;
if (!session->read_resampler) {
@@ -571,6 +654,9 @@
session->enc_write_frame.codec = session->write_codec;
session->enc_write_frame.samples = enc_frame->datalen / sizeof(int16_t);
session->enc_write_frame.timestamp = frame->timestamp;
+ session->enc_write_frame.m = frame->m;
+ session->enc_write_frame.ssrc = frame->ssrc;
+ session->enc_write_frame.seq = frame->seq;
session->enc_write_frame.payload = session->write_codec->implementation->ianacode;
write_frame = &session->enc_write_frame;
break;
@@ -578,6 +664,9 @@
enc_frame->codec = session->write_codec;
enc_frame->samples = enc_frame->datalen / sizeof(int16_t);
enc_frame->timestamp = frame->timestamp;
+ enc_frame->m = frame->m;
+ enc_frame->ssrc = frame->ssrc;
+ enc_frame->seq = frame->seq;
enc_frame->payload = enc_frame->codec->implementation->ianacode;
write_frame = enc_frame;
status = SWITCH_STATUS_SUCCESS;
Modified: freeswitch/trunk/src/switch_core_state_machine.c
==============================================================================
--- freeswitch/trunk/src/switch_core_state_machine.c (original)
+++ freeswitch/trunk/src/switch_core_state_machine.c Thu Apr 19 17:40:50 2007
@@ -181,18 +181,9 @@
static void switch_core_standard_on_loopback(switch_core_session_t *session)
{
- switch_frame_t *frame;
- int stream_id;
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Standard LOOPBACK\n");
-
- while (switch_channel_get_state(session->channel) == CS_LOOPBACK) {
- for (stream_id = 0; stream_id < session->stream_count; stream_id++) {
- if (switch_core_session_read_frame(session, &frame, -1, stream_id) == SWITCH_STATUS_SUCCESS) {
- switch_core_session_write_frame(session, frame, -1, stream_id);
- }
- }
- }
+ switch_ivr_session_echo(session);
}
static void switch_core_standard_on_transmit(switch_core_session_t *session)
Modified: freeswitch/trunk/src/switch_ivr_async.c
==============================================================================
--- freeswitch/trunk/src/switch_ivr_async.c (original)
+++ freeswitch/trunk/src/switch_ivr_async.c Thu Apr 19 17:40:50 2007
@@ -31,6 +31,71 @@
*/
#include <switch.h>
+struct echo_helper {
+ switch_core_session_t *session;
+ int up;
+};
+
+static void *SWITCH_THREAD_FUNC echo_video_thread(switch_thread_t *thread, void *obj)
+{
+ struct echo_helper *eh = obj;
+ switch_core_session_t *session = eh->session;
+ switch_channel_t *channel = switch_core_session_get_channel(session);
+ switch_status_t status;
+ switch_frame_t *read_frame;
+
+ eh->up = 1;
+ while(switch_channel_ready(channel) && switch_channel_get_state(channel) == CS_LOOPBACK) {
+ status = switch_core_session_read_video_frame(session, &read_frame, -1, 0);
+
+ if (!SWITCH_READ_ACCEPTABLE(status)) {
+ break;
+ }
+
+ switch_core_session_write_video_frame(session, read_frame, -1, 0);
+
+ }
+ eh->up = 0;
+ return NULL;
+}
+
+SWITCH_DECLARE(void) switch_ivr_session_echo(switch_core_session_t *session)
+{
+ switch_status_t status;
+ switch_frame_t *read_frame;
+ struct echo_helper eh = {0};
+ switch_channel_t *channel = switch_core_session_get_channel(session);
+ switch_thread_t *thread;
+ switch_threadattr_t *thd_attr = NULL;
+
+
+ switch_channel_answer(channel);
+
+ if (switch_channel_test_flag(channel, CF_VIDEO)) {
+ eh.session = session;
+ switch_threadattr_create(&thd_attr, switch_core_session_get_pool(session));
+ switch_threadattr_detach_set(thd_attr, 1);
+ switch_threadattr_stacksize_set(thd_attr, SWITCH_THREAD_STACKSIZE);
+ switch_thread_create(&thread, thd_attr, echo_video_thread, &eh, switch_core_session_get_pool(session));
+ }
+
+ while(switch_channel_ready(channel) && switch_channel_get_state(channel) == CS_LOOPBACK) {
+ status = switch_core_session_read_frame(session, &read_frame, -1, 0);
+ if (!SWITCH_READ_ACCEPTABLE(status)) {
+ break;
+ }
+ switch_core_session_write_frame(session, read_frame, -1, 0);
+ }
+
+ if (eh.up) {
+ while(eh.up) {
+ switch_yield(1000);
+ }
+ }
+}
+
+
+
static switch_bool_t record_callback(switch_media_bug_t *bug, void *user_data, switch_abc_type_t type)
{
switch_file_handle_t *fh = (switch_file_handle_t *) user_data;
Modified: freeswitch/trunk/src/switch_rtp.c
==============================================================================
--- freeswitch/trunk/src/switch_rtp.c (original)
+++ freeswitch/trunk/src/switch_rtp.c Thu Apr 19 17:40:50 2007
@@ -352,8 +352,7 @@
rtp_session->sock = new_sock;
new_sock = NULL;
- if (switch_test_flag(rtp_session, SWITCH_RTP_FLAG_USE_TIMER)
- || switch_test_flag(rtp_session, SWITCH_RTP_FLAG_NOBLOCK)) {
+ if (switch_test_flag(rtp_session, SWITCH_RTP_FLAG_USE_TIMER) || switch_test_flag(rtp_session, SWITCH_RTP_FLAG_NOBLOCK)) {
switch_socket_opt_set(rtp_session->sock, SWITCH_SO_NONBLOCK, TRUE);
switch_set_flag_locked(rtp_session, SWITCH_RTP_FLAG_NOBLOCK);
}
@@ -803,7 +802,7 @@
while (switch_rtp_ready(rtp_session)) {
bytes = sizeof(rtp_msg_t);
status = switch_socket_recvfrom(rtp_session->from_addr, rtp_session->sock, 0, (void *) &rtp_session->recv_msg, &bytes);
-
+
if (!SWITCH_STATUS_IS_BREAK(status) && rtp_session->timer.interval) {
switch_core_timer_step(&rtp_session->timer);
}
@@ -900,7 +899,11 @@
if (status == SWITCH_STATUS_BREAK || bytes == 0) {
if (switch_test_flag(rtp_session, SWITCH_RTP_FLAG_DATAWAIT)) {
- switch_yield((rtp_session->ms_per_packet / 1000) * 750);
+ if (rtp_session->ms_per_packet) {
+ switch_yield((rtp_session->ms_per_packet / 1000) * 750);
+ } else {
+ switch_yield(1000);
+ }
continue;
}
return 0;
@@ -1136,13 +1139,16 @@
}
bytes = rtp_common_read(rtp_session, &frame->payload, &frame->flags);
-
+
frame->data = rtp_session->recv_msg.body;
frame->packet = &rtp_session->recv_msg;
frame->packetlen = bytes;
frame->source = __FILE__;
frame->flags |= SFF_RAW_RTP;
frame->timestamp = ntohl(rtp_session->recv_msg.header.ts);
+ frame->seq = ntohs(rtp_session->recv_msg.header.seq);
+ frame->ssrc = ntohl(rtp_session->recv_msg.header.ssrc);
+ frame->m = rtp_session->recv_msg.header.m ? SWITCH_TRUE : SWITCH_FALSE;
if (bytes < 0) {
frame->datalen = 0;
@@ -1153,8 +1159,11 @@
} else {
bytes -= rtp_header_len;
}
-
+
frame->datalen = bytes;
+
+
+
return SWITCH_STATUS_SUCCESS;
}
@@ -1350,7 +1359,6 @@
switch_core_timer_check(&rtp_session->timer);
rtp_session->last_write_samplecount = rtp_session->timer.samplecount;
}
-
switch_socket_sendto(rtp_session->sock, rtp_session->remote_addr, 0, (void *) send_msg, &bytes);
}
@@ -1478,6 +1486,12 @@
payload = rtp_session->payload;
}
+ if (switch_test_flag(frame, SFF_RTP_HEADER)) {
+ return switch_rtp_write_manual(rtp_session, frame->data, frame->datalen, frame->m, frame->payload,
+ frame->timestamp, frame->seq, frame->ssrc, &frame->flags);
+ }
+
+
if (fwd) {
data = frame->packet;
len = frame->packetlen;
@@ -1551,7 +1565,7 @@
}
return (int) bytes;
- //return rtp_common_write(rtp_session, (void *) &send_msg, rtp_header_len + datalen, m, payload, NULL);
+ //return rtp_common_write(rtp_session, (void *) &send_msg, rtp_header_len + datalen, m, payload);
}
SWITCH_DECLARE(uint32_t) switch_rtp_get_ssrc(switch_rtp_t *rtp_session)
1
0