- Timestamp:
- Jan 18, 2006 11:12:57 PM (19 years ago)
- Location:
- pjproject/trunk/pjmedia
- Files:
-
- 2 added
- 4 deleted
- 16 edited
- 12 moved
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/build
-
Property
svn:ignore
set to
*.ncb
*.opt
-
Property
svn:ignore
set to
-
pjproject/trunk/pjmedia/build/output
-
Property
svn:ignore
set to
*
-
Property
svn:ignore
set to
-
pjproject/trunk/pjmedia/build/pjaut.dsp
r112 r121 1 # Microsoft Developer Studio Project File - Name="pj media_audio_tool" - Package Owner=<4>1 # Microsoft Developer Studio Project File - Name="pjaut" - Package Owner=<4> 2 2 # Microsoft Developer Studio Generated Build File, Format Version 6.00 3 3 # ** DO NOT EDIT ** … … 5 5 # TARGTYPE "Win32 (x86) Console Application" 0x0103 6 6 7 CFG=pj media_audio_tool- Win32 Debug7 CFG=pjaut - Win32 Debug 8 8 !MESSAGE This is not a valid makefile. To build this project using NMAKE, 9 9 !MESSAGE use the Export Makefile command and run 10 10 !MESSAGE 11 !MESSAGE NMAKE /f "pj media_audio_tool.mak".11 !MESSAGE NMAKE /f "pjaut.mak". 12 12 !MESSAGE 13 13 !MESSAGE You can specify a configuration when running NMAKE 14 14 !MESSAGE by defining the macro CFG on the command line. For example: 15 15 !MESSAGE 16 !MESSAGE NMAKE /f "pj media_audio_tool.mak" CFG="pjmedia_audio_tool- Win32 Debug"16 !MESSAGE NMAKE /f "pjaut.mak" CFG="pjaut - Win32 Debug" 17 17 !MESSAGE 18 18 !MESSAGE Possible choices for configuration are: 19 19 !MESSAGE 20 !MESSAGE "pj media_audio_tool- Win32 Release" (based on "Win32 (x86) Console Application")21 !MESSAGE "pj media_audio_tool- Win32 Debug" (based on "Win32 (x86) Console Application")20 !MESSAGE "pjaut - Win32 Release" (based on "Win32 (x86) Console Application") 21 !MESSAGE "pjaut - Win32 Debug" (based on "Win32 (x86) Console Application") 22 22 !MESSAGE 23 23 … … 29 29 RSC=rc.exe 30 30 31 !IF "$(CFG)" == "pj media_audio_tool- Win32 Release"31 !IF "$(CFG)" == "pjaut - Win32 Release" 32 32 33 33 # PROP BASE Use_MFC 0 34 34 # PROP BASE Use_Debug_Libraries 0 35 # PROP BASE Output_Dir ".\output\pj media_audio_tool_vc6_Release"36 # PROP BASE Intermediate_Dir ".\output\pj media_audio_tool_vc6_Release"35 # PROP BASE Output_Dir ".\output\pjaut_i386_win32_vc6_release" 36 # PROP BASE Intermediate_Dir ".\output\pjaut_i386_win32_vc6_release" 37 37 # PROP BASE Target_Dir "" 38 38 # PROP Use_MFC 0 39 39 # PROP Use_Debug_Libraries 0 40 # PROP Output_Dir ".\output\pj media_audio_tool_vc6_Release"41 # PROP Intermediate_Dir ".\output\pj media_audio_tool_vc6_Release"40 # PROP Output_Dir ".\output\pjaut_i386_win32_vc6_release" 41 # PROP Intermediate_Dir ".\output\pjaut_i386_win32_vc6_release" 42 42 # PROP Ignore_Export_Lib 0 43 43 # PROP Target_Dir "" … … 53 53 # ADD LINK32 dsound.lib dxguid.lib netapi32.lib mswsock.lib ws2_32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /out:"../bin/pjaut_vc6.exe" 54 54 55 !ELSEIF "$(CFG)" == "pj media_audio_tool- Win32 Debug"55 !ELSEIF "$(CFG)" == "pjaut - Win32 Debug" 56 56 57 57 # PROP BASE Use_MFC 0 58 58 # PROP BASE Use_Debug_Libraries 1 59 # PROP BASE Output_Dir ".\output\pj media_audio_tool_vc6_Debug"60 # PROP BASE Intermediate_Dir ".\output\pj media_audio_tool_vc6_Debug"59 # PROP BASE Output_Dir ".\output\pjaut_i386_win32_vc6_debug" 60 # PROP BASE Intermediate_Dir ".\output\pjaut_i386_win32_vc6_debug" 61 61 # PROP BASE Target_Dir "" 62 62 # PROP Use_MFC 0 63 63 # PROP Use_Debug_Libraries 1 64 # PROP Output_Dir ".\output\pj media_audio_tool_vc6_Debug"65 # PROP Intermediate_Dir ".\output\pj media_audio_tool_vc6_Debug"64 # PROP Output_Dir ".\output\pjaut_i386_win32_vc6_debug" 65 # PROP Intermediate_Dir ".\output\pjaut_i386_win32_vc6_debug" 66 66 # PROP Ignore_Export_Lib 0 67 67 # PROP Target_Dir "" … … 81 81 # Begin Target 82 82 83 # Name "pj media_audio_tool- Win32 Release"84 # Name "pj media_audio_tool- Win32 Debug"83 # Name "pjaut - Win32 Release" 84 # Name "pjaut - Win32 Debug" 85 85 # Begin Group "Source Files" 86 86 -
pjproject/trunk/pjmedia/build/pjmedia.dsp
r65 r121 33 33 # PROP BASE Use_MFC 0 34 34 # PROP BASE Use_Debug_Libraries 0 35 # PROP BASE Output_Dir ".\output\pjmedia_ vc6_Release"36 # PROP BASE Intermediate_Dir ".\output\pjmedia_ vc6_Release"35 # PROP BASE Output_Dir ".\output\pjmedia_i386_win32_vc6_release" 36 # PROP BASE Intermediate_Dir ".\output\pjmedia_i386_win32_vc6_release" 37 37 # PROP BASE Target_Dir "" 38 38 # PROP Use_MFC 0 39 39 # PROP Use_Debug_Libraries 0 40 # PROP Output_Dir ".\output\pjmedia_ vc6_Release"41 # PROP Intermediate_Dir ".\output\pjmedia_ vc6_Release"40 # PROP Output_Dir ".\output\pjmedia_i386_win32_vc6_release" 41 # PROP Intermediate_Dir ".\output\pjmedia_i386_win32_vc6_release" 42 42 # PROP Target_Dir "" 43 43 # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c 44 # ADD CPP /nologo /MD /W4 /GX /O2 /I "../ ../pjlib/src" /I "../src" /I "../../pjsdp/src" /I "../src/pjmedia/portaudio" /D "NDEBUG" /D "PA_NO_ASIO" /D "WIN32" /D "_MBCS" /D "_LIB"/FD /c44 # ADD CPP /nologo /MD /W4 /GX /O2 /I "../include" /I "../../pjlib/include" /I "../../pjlib-util/include" /I "../src/pjmedia/portaudio" /D "NDEBUG" /D "PA_NO_ASIO" /D "WIN32" /D "_MBCS" /D "_LIB" /D PJ_WIN32=1 /D PJ_M_I386=1 /FD /c 45 45 # SUBTRACT CPP /YX 46 46 # ADD BASE RSC /l 0x409 /d "NDEBUG" … … 57 57 # PROP BASE Use_MFC 0 58 58 # PROP BASE Use_Debug_Libraries 1 59 # PROP BASE Output_Dir ".\output\pjmedia_ vc6_Debug"60 # PROP BASE Intermediate_Dir ".\output\pjmedia_ vc6_Debug"59 # PROP BASE Output_Dir ".\output\pjmedia_i386_win32_vc6_debug" 60 # PROP BASE Intermediate_Dir ".\output\pjmedia_i386_win32_vc6_debug" 61 61 # PROP BASE Target_Dir "" 62 62 # PROP Use_MFC 0 63 63 # PROP Use_Debug_Libraries 1 64 # PROP Output_Dir ".\output\pjmedia_ vc6_Debug"65 # PROP Intermediate_Dir ".\output\pjmedia_ vc6_Debug"64 # PROP Output_Dir ".\output\pjmedia_i386_win32_vc6_debug" 65 # PROP Intermediate_Dir ".\output\pjmedia_i386_win32_vc6_debug" 66 66 # PROP Target_Dir "" 67 67 # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c 68 # ADD CPP /nologo /MTd /W4 /Gm /GX /ZI /Od /I "../ ../pjlib/src" /I "../src" /I "../../pjsdp/src" /I "../src/pjmedia/portaudio" /D "_DEBUG" /D "PA_NO_ASIO" /D "WIN32" /D "_MBCS" /D "_LIB"/FR /FD /GZ /c68 # ADD CPP /nologo /MTd /W4 /Gm /GX /ZI /Od /I "../include" /I "../../pjlib/include" /I "../../pjlib-util/include" /I "../src/pjmedia/portaudio" /D "_DEBUG" /D "PA_NO_ASIO" /D "WIN32" /D "_MBCS" /D "_LIB" /D PJ_WIN32=1 /D PJ_M_I386=1 /FR /FD /GZ /c 69 69 # SUBTRACT CPP /YX 70 70 # ADD BASE RSC /l 0x409 /d "_DEBUG" … … 142 142 # Begin Source File 143 143 144 SOURCE=..\ src\pjmedia\codec.h145 # End Source File 146 # Begin Source File 147 148 SOURCE=..\ src\pjmedia\config.h149 # End Source File 150 # Begin Source File 151 152 SOURCE=..\ src\pjmedia\jbuf.h153 # End Source File 154 # Begin Source File 155 156 SOURCE=..\ src\pjmedia\mediamgr.h157 # End Source File 158 # Begin Source File 159 160 SOURCE=..\ src\pjmedia.h161 # End Source File 162 # Begin Source File 163 164 SOURCE=..\ src\pjmedia\rtcp.h165 # End Source File 166 # Begin Source File 167 168 SOURCE=..\ src\pjmedia\rtp.h169 # End Source File 170 # Begin Source File 171 172 SOURCE=..\ src\pjmedia\sdp.h173 # End Source File 174 # Begin Source File 175 176 SOURCE=..\ src\pjmedia\session.h177 # End Source File 178 # Begin Source File 179 180 SOURCE=..\ src\pjmedia\sound.h181 # End Source File 182 # Begin Source File 183 184 SOURCE=..\ src\pjmedia\stream.h144 SOURCE=..\include\pjmedia\codec.h 145 # End Source File 146 # Begin Source File 147 148 SOURCE=..\include\pjmedia\config.h 149 # End Source File 150 # Begin Source File 151 152 SOURCE=..\include\pjmedia\jbuf.h 153 # End Source File 154 # Begin Source File 155 156 SOURCE=..\include\pjmedia\mediamgr.h 157 # End Source File 158 # Begin Source File 159 160 SOURCE=..\include\pjmedia.h 161 # End Source File 162 # Begin Source File 163 164 SOURCE=..\include\pjmedia\rtcp.h 165 # End Source File 166 # Begin Source File 167 168 SOURCE=..\include\pjmedia\rtp.h 169 # End Source File 170 # Begin Source File 171 172 SOURCE=..\include\pjmedia\sdp.h 173 # End Source File 174 # Begin Source File 175 176 SOURCE=..\include\pjmedia\session.h 177 # End Source File 178 # Begin Source File 179 180 SOURCE=..\include\pjmedia\sound.h 181 # End Source File 182 # Begin Source File 183 184 SOURCE=..\include\pjmedia\stream.h 185 185 # End Source File 186 186 # End Group -
pjproject/trunk/pjmedia/build/pjmedia.dsw
r65 r121 4 4 ############################################################################### 5 5 6 Project: "pjau dio_tool"=.\pjaudio_tool.dsp - Package Owner=<4>6 Project: "pjaut"=.\pjaut.dsp - Package Owner=<4> 7 7 8 8 Package=<5> 9 9 {{{ 10 begin source code control11 "$/pjproject/pjmedia/build", TKAAAAAA12 .13 end source code control14 10 }}} 15 11 … … 30 26 Package=<5> 31 27 {{{ 32 begin source code control 33 "$/pjproject/pjmedia/build", TKAAAAAA 34 . 35 end source code control 28 }}} 29 30 Package=<4> 31 {{{ 32 }}} 33 34 ############################################################################### 35 36 Project: "pjlib_util"="..\..\pjlib-util\build\pjlib_util.dsp" - Package Owner=<4> 37 38 Package=<5> 39 {{{ 36 40 }}} 37 41 … … 46 50 Package=<5> 47 51 {{{ 48 begin source code control49 "$/pjproject/pjmedia/build", TKAAAAAA50 .51 end source code control52 52 }}} 53 53 … … 65 65 Package=<5> 66 66 {{{ 67 begin source code control68 "$/pjproject/pjmedia/build", TKAAAAAA69 .70 end source code control71 67 }}} 72 68 … … 90 86 Package=<5> 91 87 {{{ 92 begin source code control93 "$/pjproject/pjmedia/build", TKAAAAAA94 .95 end source code control96 88 }}} 97 89 -
pjproject/trunk/pjmedia/include/pjmedia.h
- Property svn:keywords set to Id
r112 r121 1 /* $Id$ 1 /* $Id$ */ 2 /* 3 * Copyright (C) 2003-2006 Benny Prijono <benny@prijono.org> 2 4 * 3 * /4 /* 5 * PJMEDIA - Multimedia over IP Stack6 * ( C)2003-2005 Benny Prijono <bennylp@bulukucing.org>5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation; either version 2 of the License, or 8 * (at your option) any later version. 7 9 * 8 * Author: 9 * Benny Prijono <bennylp@bulukucing.org> 10 * This program is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU General Public License for more details. 10 14 * 11 * This library is free software; you can redistribute it and/or 12 * modify it under the terms of the GNU Lesser General Public 13 * License as published by the Free Software Foundation; either 14 * version 2.1 of the License, or (at your option) any later version. 15 * 16 * This library is distributed in the hope that it will be useful, 17 * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 19 * Lesser General Public License for more details. 20 * 21 * You should have received a copy of the GNU Lesser General Public 22 * License along with this library; if not, write to the Free Software 23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 15 * You should have received a copy of the GNU General Public License 16 * along with this program; if not, write to the Free Software 17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 24 18 */ 25 19 #ifndef __PJMEDIA_H__ -
pjproject/trunk/pjmedia/include/pjmedia/codec.h
- Property svn:keywords set to Id
r112 r121 215 215 { 216 216 /** Entries to put this codec instance in codec factory's list. */ 217 PJ_DECL_LIST_MEMBER(struct pj_codec) 217 PJ_DECL_LIST_MEMBER(struct pj_codec); 218 218 219 219 /** Codec's private data. */ … … 283 283 { 284 284 /** Entries to put this structure in the codec manager list. */ 285 PJ_DECL_LIST_MEMBER(struct pj_codec_factory) 285 PJ_DECL_LIST_MEMBER(struct pj_codec_factory); 286 286 287 287 /** The factory's private data. */ -
pjproject/trunk/pjmedia/include/pjmedia/config.h
- Property svn:keywords set to Id
-
pjproject/trunk/pjmedia/include/pjmedia/jbuf.h
- Property svn:keywords set to Id
-
pjproject/trunk/pjmedia/include/pjmedia/mediamgr.h
- Property svn:keywords set to Id
-
pjproject/trunk/pjmedia/include/pjmedia/rtcp.h
- Property svn:keywords set to Id
-
pjproject/trunk/pjmedia/include/pjmedia/rtp.h
- Property svn:keywords set to Id
-
pjproject/trunk/pjmedia/include/pjmedia/sdp.h
- Property svn:keywords set to Id
-
pjproject/trunk/pjmedia/include/pjmedia/session.h
- Property svn:keywords set to Id
-
pjproject/trunk/pjmedia/include/pjmedia/sound.h
- Property svn:keywords set to Id
-
pjproject/trunk/pjmedia/include/pjmedia/stream.h
- Property svn:keywords set to Id
-
pjproject/trunk/pjmedia/src/pjmedia/codec.c
- Property svn:keywords set to Id
r65 r121 20 20 #include <pj/pool.h> 21 21 #include <pj/string.h> 22 #include <pj/assert.h> 22 23 #include <pj/log.h> 23 24 … … 66 67 PJ_DEF(void) pj_codec_mgr_unregister_factory (pj_codec_mgr *mgr, pj_codec_factory *factory) 67 68 { 68 PJ_UNUSED_ARG(mgr) 69 PJ_UNUSED_ARG(mgr); 69 70 pj_list_erase(factory); 70 71 enum_all_codecs (mgr); … … 101 102 PJ_DEF(void) pj_codec_mgr_dealloc_codec (pj_codec_mgr *mgr, pj_codec *codec) 102 103 { 103 PJ_UNUSED_ARG(mgr) 104 PJ_UNUSED_ARG(mgr); 104 105 (*codec->factory->op->dealloc_codec)(codec->factory, codec); 105 106 } -
pjproject/trunk/pjmedia/src/pjmedia/dsound.c
- Property svn:keywords set to Id
-
pjproject/trunk/pjmedia/src/pjmedia/g711.c
- Property svn:keywords set to Id
r65 r121 23 23 #include <pj/pool.h> 24 24 #include <pj/string.h> 25 #include <string.h> /* memset */ 25 #include <pj/assert.h> 26 26 27 27 28 #define G711_BPS 64000 … … 129 130 static pj_status_t g711_match_id( pj_codec_factory *factory, const pj_codec_id *id ) 130 131 { 131 PJ_UNUSED_ARG(factory) 132 PJ_UNUSED_ARG(factory); 132 133 133 134 /* It's sufficient to check payload type only. */ … … 139 140 pj_codec_attr *attr ) 140 141 { 141 PJ_UNUSED_ARG(factory) 142 PJ_UNUSED_ARG(factory); 142 143 143 144 memset(attr, 0, sizeof(pj_codec_attr)); … … 156 157 unsigned count, pj_codec_id codecs[]) 157 158 { 158 PJ_UNUSED_ARG(factory) 159 PJ_UNUSED_ARG(factory); 159 160 160 161 if (count > 0) { … … 230 231 { 231 232 /* There's nothing to do here really */ 232 PJ_UNUSED_ARG(codec) 233 PJ_UNUSED_ARG(pool) 233 PJ_UNUSED_ARG(codec); 234 PJ_UNUSED_ARG(pool); 234 235 235 236 return PJ_SUCCESS; -
pjproject/trunk/pjmedia/src/pjmedia/jbuf.c
- Property svn:keywords set to Id
r65 r121 20 20 #include <pj/log.h> 21 21 #include <pj/pool.h> 22 #include <string.h> /* memset() */ 22 #include <pj/assert.h> 23 #include <pj/string.h> 24 23 25 24 26 /* … … 68 70 PJ_LOG(5, (THIS_FILE, "..pj_frame_list_init [lst=%p], maxcount=%d", lst, maxcount)); 69 71 70 memset(lst, 0, sizeof(*lst));72 pj_memset(lst, 0, sizeof(*lst)); 71 73 lst->maxcount = maxcount; 72 74 lst->frames = pj_pool_calloc( pool, maxcount, sizeof(*lst->frames) ); -
pjproject/trunk/pjmedia/src/pjmedia/mediamgr.c
- Property svn:keywords set to Id
-
pjproject/trunk/pjmedia/src/pjmedia/nullsound.c
- Property svn:keywords set to Id
r65 r121 18 18 */ 19 19 #include <pjmedia/sound.h> 20 #include <pj/assert.h> 20 21 21 /* 22 * Null Factory Operations 23 */ 24 static pj_status_t null_sound_init(void); 25 static const char *null_sound_get_name(void); 26 static pj_status_t null_sound_destroy(void); 27 static pj_status_t null_sound_enum_devices(int *count, char *dev_names[]); 28 static pj_status_t null_sound_create_dev(const char *dev_name, pj_snd_dev *dev); 29 static pj_status_t null_sound_destroy_dev(pj_snd_dev *dev); 22 static pj_snd_dev_info null_info = 23 { 24 "Null Device", 25 1, 26 1, 27 8000 28 }; 30 29 31 30 32 /* 33 * Null Device Operations 34 */ 35 static pj_status_t null_sound_dev_open( pj_snd_dev *dev, pj_snd_role_t role ); 36 static pj_status_t null_sound_dev_close( pj_snd_dev *dev ); 37 static pj_status_t null_sound_dev_play( pj_snd_dev *dev ); 38 static pj_status_t null_sound_dev_record( pj_snd_dev *dev ); 39 40 41 static pj_snd_dev_factory null_sound_factory = 31 PJ_DEF(pj_status_t) pj_snd_init(pj_pool_factory *factory) 42 32 { 43 &null_sound_init, 44 &null_sound_get_name, 45 &null_sound_destroy, 46 &null_sound_enum_devices, 47 &null_sound_create_dev, 48 &null_sound_destroy_dev 49 }; 50 51 static struct pj_snd_dev_op null_sound_dev_op = 52 { 53 &null_sound_dev_open, 54 &null_sound_dev_close, 55 &null_sound_dev_play, 56 &null_sound_dev_record 57 }; 58 59 PJ_DEF(pj_snd_dev_factory*) pj_nullsound_get_factory() 60 { 61 return &null_sound_factory; 33 PJ_UNUSED_ARG(factory); 34 return PJ_SUCCESS; 62 35 } 63 36 64 static pj_status_t null_sound_init(void)37 PJ_DEF(int) pj_snd_get_dev_count(void) 65 38 { 66 return 0;39 return 1; 67 40 } 68 41 69 static const char *null_sound_get_name(void)42 PJ_DEF(const pj_snd_dev_info*) pj_snd_get_dev_info(unsigned index) 70 43 { 71 return "nullsound"; 44 PJ_ASSERT_RETURN(index==0, NULL); 45 return &null_info; 72 46 } 73 47 74 static pj_status_t null_sound_destroy(void) 48 PJ_DEF(pj_snd_stream*) pj_snd_open_recorder( int index, 49 const pj_snd_stream_info *param, 50 pj_snd_rec_cb rec_cb, 51 void *user_data) 75 52 { 76 return 0; 53 PJ_UNUSED_ARG(index); 54 PJ_UNUSED_ARG(param); 55 PJ_UNUSED_ARG(rec_cb); 56 PJ_UNUSED_ARG(user_data); 57 return (void*)1; 77 58 } 78 59 79 static pj_status_t null_sound_enum_devices(int *count, char *dev_names[]) 60 PJ_DEF(pj_snd_stream*) pj_snd_open_player( int index, 61 const pj_snd_stream_info *param, 62 pj_snd_play_cb play_cb, 63 void *user_data) 80 64 { 81 *count = 1; 82 dev_names[0] = "nullsound"; 83 return 0; 65 PJ_UNUSED_ARG(index); 66 PJ_UNUSED_ARG(param); 67 PJ_UNUSED_ARG(play_cb); 68 PJ_UNUSED_ARG(user_data); 69 return (void*)1; 84 70 } 85 71 86 static pj_status_t null_sound_create_dev(const char *dev_name, pj_snd_dev *dev)72 PJ_DEF(pj_status_t) pj_snd_stream_start(pj_snd_stream *stream) 87 73 { 88 PJ_UNUSED_ARG(dev_name); 89 dev->op = &null_sound_dev_op; 90 return 0; 74 PJ_UNUSED_ARG(stream); 75 return PJ_SUCCESS; 91 76 } 92 77 93 static pj_status_t null_sound_destroy_dev(pj_snd_dev *dev)78 PJ_DEF(pj_status_t) pj_snd_stream_stop(pj_snd_stream *stream) 94 79 { 95 PJ_UNUSED_ARG( dev);96 return 0;80 PJ_UNUSED_ARG(stream); 81 return PJ_SUCCESS; 97 82 } 98 83 99 100 /* 101 * Null Device Operations 102 */ 103 static pj_status_t null_sound_dev_open( pj_snd_dev *dev, pj_snd_role_t role ) 84 PJ_DEF(pj_status_t) pj_snd_stream_close(pj_snd_stream *stream) 104 85 { 105 PJ_UNUSED_ARG(dev); 106 PJ_UNUSED_ARG(role); 107 return 0; 86 PJ_UNUSED_ARG(stream); 87 return PJ_SUCCESS; 108 88 } 109 89 110 static pj_status_t null_sound_dev_close( pj_snd_dev *dev)90 PJ_DEF(pj_status_t) pj_snd_deinit(void) 111 91 { 112 PJ_UNUSED_ARG(dev); 113 return 0; 92 return PJ_SUCCESS; 114 93 } 115 116 static pj_status_t null_sound_dev_play( pj_snd_dev *dev )117 {118 PJ_UNUSED_ARG(dev);119 return 0;120 }121 122 static pj_status_t null_sound_dev_record( pj_snd_dev *dev )123 {124 PJ_UNUSED_ARG(dev);125 return 0;126 }127 -
pjproject/trunk/pjmedia/src/pjmedia/pasound.c
- Property svn:keywords set to Id
r65 r121 61 61 pj_status_t status; 62 62 63 PJ_UNUSED_ARG(output) 64 PJ_UNUSED_ARG(timeInfo) 63 PJ_UNUSED_ARG(output); 64 PJ_UNUSED_ARG(timeInfo); 65 65 66 66 if (stream->quit_flag) … … 68 68 69 69 if (stream->thread_initialized == 0) { 70 st ream->thread = pj_thread_register("pa_rec", stream->thread_desc);70 status = pj_thread_register("pa_rec", stream->thread_desc, &stream->thread); 71 71 stream->thread_initialized = 1; 72 72 } … … 101 101 unsigned size = frameCount * stream->bytes_per_sample; 102 102 103 PJ_UNUSED_ARG(input) 104 PJ_UNUSED_ARG(timeInfo) 103 PJ_UNUSED_ARG(input); 104 PJ_UNUSED_ARG(timeInfo); 105 105 106 106 if (stream->quit_flag) … … 108 108 109 109 if (stream->thread_initialized == 0) { 110 st ream->thread = pj_thread_register("pa_rec", stream->thread_desc);110 status = pj_thread_register("pa_rec", stream->thread_desc, &stream->thread); 111 111 stream->thread_initialized = 1; 112 112 } -
pjproject/trunk/pjmedia/src/pjmedia/rtcp.c
r66 r121 20 20 #include <pj/os.h> /* pj_gettimeofday */ 21 21 #include <pj/sock.h> /* pj_htonx, pj_ntohx */ 22 #include <string.h> /* memset */ 22 #include <pj/string.h> /* pj_memset */ 23 23 24 24 25 #define RTCP_SR 200 … … 47 48 pj_rtcp_pkt *rtcp_pkt = &s->rtcp_pkt; 48 49 49 memset(rtcp_pkt, 0, sizeof(pj_rtcp_pkt));50 pj_memset(rtcp_pkt, 0, sizeof(pj_rtcp_pkt)); 50 51 51 52 /* Init time */ … … 68 69 { 69 70 /* Nothing to do. */ 70 PJ_UNUSED_ARG(session) 71 PJ_UNUSED_ARG(session); 71 72 } 72 73 -
pjproject/trunk/pjmedia/src/pjmedia/rtp.c
r66 r121 21 21 #include <pj/os.h> /* pj_gettimeofday() */ 22 22 #include <pj/sock.h> /* pj_htonx, pj_htonx */ 23 #include <string.h> /* memset() */ 23 #include <pj/assert.h> 24 #include <pj/string.h> 25 24 26 25 27 #define THIS_FILE "rtp.c" … … 62 64 63 65 /* Build default header for outgoing RTP packet. */ 64 memset(ses, 0, sizeof(*ses));66 pj_memset(ses, 0, sizeof(*ses)); 65 67 ses->out_hdr.v = RTP_VERSION; 66 68 ses->out_hdr.p = 0; -
pjproject/trunk/pjmedia/src/pjmedia/sdp.c
r66 r121 18 18 */ 19 19 #include <pjmedia/sdp.h> 20 #include <pj /scanner.h>20 #include <pjlib-util/scanner.h> 21 21 #include <pj/except.h> 22 22 #include <pj/log.h> … … 24 24 #include <pj/string.h> 25 25 #include <pj/pool.h> 26 #include <pj/assert.h> 26 27 27 28 enum { … … 124 125 */ 125 126 static int is_initialized; 126 static pj_char_spec cs_token; 127 static pj_cis_buf_t cis_buf; 128 static pj_cis_t cs_token; 127 129 128 130 static void init_sdp_parser(void) … … 134 136 } 135 137 } 136 pj_cs_add_alpha(cs_token); 137 pj_cs_add_num(cs_token); 138 pj_cs_add_str( cs_token, TOKEN); 138 139 pj_cis_buf_init(&cis_buf); 140 pj_cis_init(&cis_buf, &cs_token); 141 pj_cis_add_alpha(&cs_token); 142 pj_cis_add_num(&cs_token); 143 pj_cis_add_str(&cs_token, TOKEN); 139 144 } 140 145 … … 203 208 static int print_name_only_attr(const pjsdp_attr *attr, char *buf, int len) 204 209 { 205 PJ_UNUSED_ARG(attr) 206 PJ_UNUSED_ARG(buf) 207 PJ_UNUSED_ARG(len) 210 PJ_UNUSED_ARG(attr); 211 PJ_UNUSED_ARG(buf); 212 PJ_UNUSED_ARG(len); 208 213 return 0; 209 214 } … … 707 712 708 713 /* port */ 709 pj_scan_get(scanner, cs_token, &str);714 pj_scan_get(scanner, &cs_token, &str); 710 715 med->desc.port = (unsigned short)pj_strtoul(&str); 711 if (*scanner->cur rent== '/') {716 if (*scanner->curptr == '/') { 712 717 /* port count */ 713 718 pj_scan_get_char(scanner); 714 pj_scan_get(scanner, cs_token, &str);719 pj_scan_get(scanner, &cs_token, &str); 715 720 med->desc.port_count = pj_strtoul(&str); 716 721 … … 728 733 /* format list */ 729 734 med->desc.fmt_count = 0; 730 while (*scanner->cur rent== ' ') {735 while (*scanner->curptr == ' ') { 731 736 pj_scan_get_char(scanner); 732 pj_scan_get(scanner, cs_token, &med->desc.fmt[med->desc.fmt_count++]);737 pj_scan_get(scanner, &cs_token, &med->desc.fmt[med->desc.fmt_count++]); 733 738 } 734 739 … … 752 757 pj_scan_get_until_ch(scanner, '/', &rtpmap->encoding_name); 753 758 pj_scan_get_char(scanner); 754 pj_scan_get(scanner, cs_token, &str);759 pj_scan_get(scanner, &cs_token, &str); 755 760 rtpmap->clock_rate = pj_strtoul(&str); 756 761 757 if (*scanner->cur rent== '/') {762 if (*scanner->curptr == '/') { 758 763 pj_scan_get_char(scanner); 759 764 pj_scan_get_until_ch(scanner, '\r', &rtpmap->parameter); … … 794 799 pjsdp_attr *attr; 795 800 796 PJ_UNUSED_ARG(scanner) 801 PJ_UNUSED_ARG(scanner); 797 802 attr = pj_pool_calloc(pool, 1, sizeof(*attr)); 798 803 return attr; … … 825 830 826 831 /* get attr name. */ 827 pj_scan_get(scanner, cs_token, &attrname);832 pj_scan_get(scanner, &cs_token, &attrname); 828 833 829 834 /* find entry to handle attrname */ … … 852 857 static void on_scanner_error(pj_scanner *scanner) 853 858 { 854 PJ_UNUSED_ARG(scanner) 859 PJ_UNUSED_ARG(scanner); 855 860 856 861 PJ_THROW(SYNTAX_ERROR); … … 879 884 PJ_TRY { 880 885 while (!pj_scan_is_eof(&scanner)) { 881 cur_name = *scanner.cur rent;886 cur_name = *scanner.curptr; 882 887 switch (cur_name) { 883 888 case 'a': … … 925 930 PJ_CATCH(SYNTAX_ERROR) { 926 931 PJ_LOG(2, (LOG_THIS, "Syntax error in SDP parser '%c' line %d col %d", 927 cur_name, scanner.line, scanner.col));932 cur_name, scanner.line, pj_scan_get_col(&scanner))); 928 933 if (!pj_scan_is_eof(&scanner)) { 929 if (*scanner.cur rent!= '\r') {934 if (*scanner.curptr != '\r') { 930 935 pj_scan_get_until_ch(&scanner, '\r', &dummy); 931 936 } -
pjproject/trunk/pjmedia/src/pjmedia/session.c
r66 r121 22 22 #include <pj/pool.h> 23 23 #include <pj/string.h> 24 #include <pj/assert.h> 25 24 26 25 27 typedef struct pj_media_stream_desc … … 772 774 scp.rtcp_sock = sd->info.sock_info.rtcp_sock; 773 775 scp.remote_addr = pj_pool_calloc (session->pool, 1, sizeof(pj_sockaddr_in)); 774 pj_sockaddr_in it(scp.remote_addr, &sd->info.rem_addr, sd->info.rem_port);776 pj_sockaddr_in_init(scp.remote_addr, &sd->info.rem_addr, sd->info.rem_port); 775 777 scp.ssrc = tv.sec; 776 778 scp.jb_min = 1; -
pjproject/trunk/pjmedia/src/pjmedia/stream.c
r66 r121 25 25 #include <pj/string.h> /* memcpy() */ 26 26 #include <pj/pool.h> 27 #include <pj/assert.h> 28 #include <pj/compat/socket.h> 29 #include <pj/sock_select.h> 30 #include <pj/errno.h> 27 31 #include <stdlib.h> 32 28 33 29 34 #define THISFILE "stream.c" … … 92 97 struct pj_audio_frame frame_in, frame_out; 93 98 94 PJ_UNUSED_ARG(timestamp) 99 PJ_UNUSED_ARG(timestamp); 95 100 96 101 /* Lock mutex */ … … 153 158 void *rtphdr; 154 159 int rtphdrlen; 155 int sent;160 pj_ssize_t sent; 156 161 #if 0 157 162 static FILE *fhnd = NULL; 158 163 #endif 159 164 160 PJ_UNUSED_ARG(timestamp) 165 PJ_UNUSED_ARG(timestamp); 161 166 162 167 /* Start locking channel mutex */ … … 203 208 204 209 /* Send. */ 205 sent = pj_sock_sendto (channel->rtp_sock, channel->out_pkt, frame_out.size+sizeof(pj_rtp_hdr), 0, 210 sent = frame_out.size+sizeof(pj_rtp_hdr); 211 status = pj_sock_sendto (channel->rtp_sock, channel->out_pkt, &sent, 0, 206 212 &channel->dst_addr, sizeof(channel->dst_addr)); 207 if (sent != (int)frame_out.size + (int)sizeof(pj_rtp_hdr)) { 208 pj_perror(THISFILE, "Error sending RTP packet to %s:%d", 209 pj_sockaddr_get_str_addr(&channel->dst_addr), 210 pj_sockaddr_get_port(&channel->dst_addr)); 213 if (status != PJ_SUCCESS) 211 214 goto on_return; 212 }213 215 214 216 /* Update stat */ … … 232 234 233 235 234 static void*PJ_THREAD_FUNC stream_decoder_transport_thread (void*arg)236 static int PJ_THREAD_FUNC stream_decoder_transport_thread (void*arg) 235 237 { 236 238 pj_media_stream_t *channel = arg; 237 239 238 240 while (!channel->thread_quit_flag) { 239 int len, size;241 pj_ssize_t len, size; 240 242 const pj_rtp_hdr *hdr; 241 243 const void *payload; … … 245 247 246 248 /* Wait for packet. */ 247 fd_set fds;249 pj_fd_set_t fds; 248 250 pj_time_val timeout; 249 251 … … 259 261 260 262 /* Get packet from socket. */ 261 len = pj_sock_recv (channel->rtp_sock, channel->in_pkt, channel->in_pkt_size, 0); 262 if (len < 1) { 263 if (pj_getlasterror() == PJ_ECONNRESET) { 263 len = channel->in_pkt_size; 264 status = pj_sock_recv (channel->rtp_sock, channel->in_pkt, &len, 0); 265 if (len < 1 || status != PJ_SUCCESS) { 266 if (pj_get_netos_error() == PJ_STATUS_FROM_OS(OSERR_ECONNRESET)) { 264 267 /* On Win2K SP2 (or above) and WinXP, recv() will get WSAECONNRESET 265 268 when the sending side receives ICMP port unreachable. … … 267 270 continue; 268 271 } 269 pj_perror(THISFILE, "Error receiving packet from socket (len=%d)", len);272 //pj_perror(THISFILE, "Error receiving packet from socket (len=%d)", len); 270 273 pj_thread_sleep(1); 271 274 continue; … … 326 329 } 327 330 328 return NULL;331 return 0; 329 332 } 330 333 … … 349 352 void *ptr; 350 353 unsigned size; 351 int status;354 pj_status_t status; 352 355 353 356 /* Allocate memory for channel descriptor */ … … 370 373 371 374 /* Create mutex for the channel. */ 372 channel->mutex = pj_mutex_create(pool, NULL, PJ_MUTEX_SIMPLE);373 if ( channel->mutex == NULL)375 status = pj_mutex_create_simple(pool, NULL, &channel->mutex); 376 if (status != PJ_SUCCESS) 374 377 goto err_cleanup; 375 378 … … 485 488 } 486 489 487 channel->transport_thread= pj_thread_create(pool, "decode",488 489 0, NULL, 0);490 if ( !channel->transport_thread) {491 pj_perror(THISFILE, "Unable to create transport thread");490 status = pj_thread_create(pool, "decode", 491 &stream_decoder_transport_thread, channel, 492 0, 0, &channel->transport_thread); 493 if (status != PJ_SUCCESS) { 494 //pj_perror(THISFILE, "Unable to create transport thread"); 492 495 goto err_cleanup; 493 496 } … … 574 577 PJ_DEF(pj_status_t) pj_media_stream_pause (pj_media_stream_t *channel) 575 578 { 576 PJ_UNUSED_ARG(channel) 579 PJ_UNUSED_ARG(channel); 577 580 return -1; 578 581 } … … 580 583 PJ_DEF(pj_status_t) pj_media_stream_resume (pj_media_stream_t *channel) 581 584 { 582 PJ_UNUSED_ARG(channel) 585 PJ_UNUSED_ARG(channel); 583 586 return -1; 584 587 }
Note: See TracChangeset
for help on using the changeset viewer.