oosndrtp.hGo to the documentation of this file.00001 /* 00002 * Copyright (C) 2004-2005 by Objective Systems, Inc. 00003 * 00004 * This software is furnished under an open source license and may be 00005 * used and copied only in accordance with the terms of this license. 00006 * The text of the license may generally be found in the root 00007 * directory of this installation in the COPYING file. It 00008 * can also be viewed online at the following URL: 00009 * 00010 * http://www.obj-sys.com/open/license.html 00011 * 00012 * Any redistributions of this file including modified versions must 00013 * maintain this copyright notice. 00014 * 00015 *****************************************************************************/ 00016 00024 #ifndef _OO_SNDRTP_H_ 00025 #define _OO_SNDRTP_H_ 00026 00027 00028 #include <stdlib.h> 00029 #include "ootypes.h" 00030 00031 00032 #ifndef _WIN32 00033 #include <dlfcn.h> 00034 #endif 00035 00036 #ifdef __cplusplus 00037 extern "C" { 00038 #endif 00039 00040 #ifndef EXTERN 00041 #ifdef _WIN32 00042 #define EXTERN __declspec(dllexport) 00043 #else 00044 #define EXTERN 00045 #endif /* _WIN32 */ 00046 #endif 00047 00053 typedef int (*MediaAPI_CreateTxRTPChan)(int* channelId, char * destip, int port); 00055 typedef int (*MediaAPI_CloseTxRTPChan)(int); 00057 typedef int (*MediaAPI_CreateRecvRTPChan)(int* channelId, char* localip, int localport); 00059 typedef int (*MediaAPI_CloseRecvRTPChan)(int); 00061 typedef int (*MediaAPI_StartTxWaveFile)(int channelId, char * filename); 00063 typedef int (*MediaAPI_StopTxWaveFile)(int channelId); 00067 typedef int (*MediaAPI_StartTxMic)(int channelId); 00069 typedef int (*MediaAPI_StopTxMic)(int channelId); 00071 typedef int (*MediaAPI_StartRecvAndPlayback)(int channelId); 00073 typedef int (*MediaAPI_StopRecvAndPlayback)(int channelId); 00075 typedef int (*MediaAPI_InitializePlugin)(); 00085 /* Media API */ 00086 #ifdef _WIN32 00087 HMODULE media; 00088 #else 00089 void * media; 00090 #endif 00091 00092 static MediaAPI_CreateTxRTPChan FuncPtr_CreateTxRTPChan = 0; 00093 static MediaAPI_CloseTxRTPChan FuncPtr_CloseTxRTPChan = 0; 00094 static MediaAPI_CreateRecvRTPChan FuncPtr_CreateRecvRTPChan = 0; 00095 static MediaAPI_CloseRecvRTPChan FuncPtr_CloseRecvRTPChan = 0; 00096 static MediaAPI_StartTxWaveFile FuncPtr_StartTxWaveFile = 0; 00097 static MediaAPI_StopTxWaveFile FuncPtr_StopTxWaveFile = 0; 00098 static MediaAPI_StartTxMic FuncPtr_StartTxMic = 0; 00099 static MediaAPI_StopTxMic FuncPtr_StopTxMic = 0; 00100 static MediaAPI_StartRecvAndPlayback FuncPtr_StartRecvAndPlayback = 0; 00101 static MediaAPI_StopRecvAndPlayback FuncPtr_StopRecvAndPlayback = 0; 00102 static MediaAPI_InitializePlugin FuncPtr_InitializePlugin = 0; 00103 00104 00111 EXTERN int ooLoadSndRTPPlugin(char * name); 00112 00118 EXTERN int ooReleaseSndRTPPlugin(); 00119 00128 EXTERN int ooCreateTransmitRTPChannel 00129 ( char * destip, int port); 00130 00137 EXTERN int ooCloseTransmitRTPChannel 00138 (); 00139 00148 EXTERN int ooCreateReceiveRTPChannel 00149 (char* localip, int localport); 00150 00157 EXTERN int ooCloseReceiveRTPChannel 00158 (); 00159 00167 EXTERN int ooStartTransmitWaveFile 00168 (char * filename); 00169 00176 EXTERN int ooStopTransmitWaveFile 00177 (); 00178 00185 EXTERN int ooStartTransmitMic 00186 (); 00187 00194 EXTERN int ooStopTransmitMic 00195 (); 00196 00203 EXTERN int ooStartReceiveAudioAndPlayback 00204 (); 00205 00212 EXTERN int ooStopReceiveAudioAndPlayback 00213 (); 00214 00216 EXTERN int ooStartReceiveAudioAndRecord 00217 (); 00219 EXTERN int ooStopReceiveAudioAndRecord 00220 (); 00221 00228 EXTERN int ooSetLocalRTPAndRTCPAddrs(); 00229 00236 EXTERN int ooRTPShutDown(); 00240 #ifdef __cplusplus 00241 } 00242 #endif 00243 #endif |