Changeset 2174
- Timestamp:
- Jul 24, 2008 3:30:44 PM (16 years ago)
- Location:
- pjproject/trunk
- Files:
-
- 3 added
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/build.symbian/bld.inf
r1979 r2174 1 #define SND_USE_NULL 0 2 #define SND_USE_APS 0 3 1 4 prj_platforms 2 5 winscw … … 11 14 pjnath.mmp 12 15 pjsdp.mmp 13 //null_audio.mmp14 symbian_audio.mmp15 16 pjmedia.mmp 16 17 pjsip.mmp … … 24 25 libspeexcodec.mmp 25 26 27 /* Sound device impl */ 28 #if SND_USE_NULL 29 null_audio.mmp 30 #elif SND_USE_APS 31 symbian_audio_aps.mmp 32 #else 33 symbian_audio.mmp 34 #endif 35 26 36 /* Applications */ 27 37 //pjlib_test.mmp -
pjproject/trunk/build.symbian/symbian_ua.mmp
r1979 r2174 1 #define SND_USE_NULL 0 2 #define SND_USE_APS 0 3 1 4 TARGET symbian_ua.exe 2 5 TARGETTYPE exe … … 8 11 MACRO PJ_SYMBIAN=1 9 12 10 #if defined(PJ_BUILD_DLL)11 MACRO PJ_DLL=112 #endif13 14 13 // Source files 15 14 … … 18 17 19 18 DOCUMENT ua.h 19 20 START RESOURCE symbian_ua_reg.rss 21 TARGETPATH \private\10003a3f\apps 22 END 20 23 21 24 SYSTEMINCLUDE ..\pjlib\include … … 28 31 SYSTEMINCLUDE \epoc32\include\libc 29 32 30 #if defined(PJ_BUILD_DLL) 31 LIBRARY pjsua_lib.lib pjsip_ua.lib 32 LIBRARY pjsip_simple.lib pjsip.lib pjsdp.lib pjmedia.lib 33 LIBRARY pjnath.lib pjlib_util.lib pjlib.lib 34 LIBRARY symbian_audio.lib libsrtp.lib 35 LIBRARY libgsmcodec.lib libspeexcodec.lib 33 STATICLIBRARY pjsua_lib.lib pjsip_ua.lib 34 STATICLIBRARY pjsip_simple.lib pjsip.lib pjsdp.lib pjmedia.lib 35 STATICLIBRARY pjnath.lib pjlib_util.lib pjlib.lib 36 STATICLIBRARY libsrtp.lib 37 STATICLIBRARY libgsmcodec.lib libspeexcodec.lib 38 39 #if SND_USE_NULL || defined(WINSCW) 40 STATICLIBRARY null_audio.lib 41 CAPABILITY NetworkServices LocalServices ReadUserData WriteUserData UserEnvironment 42 #elif SND_USE_APS 43 STATICLIBRARY symbian_audio_aps.lib 44 LIBRARY APSSession2.lib 45 CAPABILITY NetworkServices LocalServices ReadUserData WriteUserData UserEnvironment MultimediaDD 46 MACRO PJMEDIA_SYM_SND_USE_APS=1 36 47 #else 37 STATICLIBRARY pjsua_lib.lib pjsip_ua.lib 38 STATICLIBRARY pjsip_simple.lib pjsip.lib pjsdp.lib pjmedia.lib 39 STATICLIBRARY pjnath.lib pjlib_util.lib pjlib.lib 40 STATICLIBRARY symbian_audio.lib libsrtp.lib 41 STATICLIBRARY libgsmcodec.lib libspeexcodec.lib 48 STATICLIBRARY symbian_audio.lib 49 LIBRARY mediaclientaudiostream.lib 50 LIBRARY mediaclientaudioinputstream.lib 51 CAPABILITY NetworkServices LocalServices ReadUserData WriteUserData UserEnvironment 42 52 #endif 43 53 … … 47 57 48 58 LIBRARY esock.lib insock.lib charconv.lib euser.lib estlib.lib 49 LIBRARY mediaclientaudiostream.lib50 LIBRARY mediaclientaudioinputstream.lib51 52 CAPABILITY NetworkServices LocalServices ReadUserData WriteUserData UserEnvironment53 54 START RESOURCE symbian_ua_reg.rss55 TARGETPATH \private\10003a3f\apps56 END57 59 58 60 // The default 8KB seems to be insufficient with all bells and -
pjproject/trunk/build.symbian/symsndtest.mmp
r1640 r2174 1 #define SND_USE_NULL 0 2 #define SND_USE_APS 0 3 1 4 TARGET symsndtest.exe 2 5 TARGETTYPE exe … … 8 11 MACRO PJ_SYMBIAN=1 9 12 10 #if defined(PJ_BUILD_DLL)11 MACRO PJ_DLL=112 #endif13 14 13 // Test files 15 14 16 15 SOURCE app_main.cpp 17 16 SOURCE main_symbian.cpp 17 18 START RESOURCE symsndtest_reg.rss 19 TARGETPATH \private\10003a3f\apps 20 END 18 21 19 22 SYSTEMINCLUDE ..\pjlib\include … … 24 27 25 28 LIBRARY charconv.lib euser.lib estlib.lib 29 LIBRARY esock.lib insock.lib 30 STATICLIBRARY pjlib.lib pjmedia.lib 26 31 27 #if defined(PJ_BUILD_DLL) 28 LIBRARY symbian_audio.lib pjlib.lib 32 #if SND_USE_NULL || defined(WINSCW) 33 STATICLIBRARY null_audio.lib 34 CAPABILITY NetworkServices LocalServices ReadUserData WriteUserData UserEnvironment 35 #elif SND_USE_APS 36 SOURCEPATH ..\pjmedia\src\pjmedia 37 SOURCE symbian_sound_aps.cpp 38 39 SYSTEMINCLUDE \epoc32\include\mmf\server 40 SYSTEMINCLUDE \epoc32\include\mmf\common 41 SYSTEMINCLUDE \epoc32\include\mda\common 42 43 //STATICLIBRARY symbian_audio_aps.lib 44 LIBRARY APSSession2.lib 45 CAPABILITY NetworkServices LocalServices ReadUserData WriteUserData UserEnvironment MultimediaDD 29 46 #else 30 STATICLIBRARY symbian_audio.lib pjlib.lib 47 STATICLIBRARY symbian_audio.lib 48 LIBRARY mediaclientaudiostream.lib 49 LIBRARY mediaclientaudioinputstream.lib 50 CAPABILITY NetworkServices LocalServices ReadUserData WriteUserData UserEnvironment 31 51 #endif 32 33 LIBRARY esock.lib insock.lib34 LIBRARY mediaclientaudiostream.lib35 LIBRARY mediaclientaudioinputstream.lib36 52 37 53 #ifdef WINSCW 38 54 STATICLIBRARY eexe.lib ecrt0.lib 39 55 #endif 40 41 CAPABILITY NetworkServices LocalServices ReadUserData WriteUserData UserEnvironment42 43 START RESOURCE symsndtest_reg.rss44 TARGETPATH \private\10003a3f\apps45 END46 -
pjproject/trunk/pjsip-apps/src/symbian_ua/main_symbian.cpp
r1504 r2174 27 27 // Global Variables 28 28 CConsoleBase* console; 29 30 // Needed by APS 31 TPtrC APP_UID = _L("A000000E"); 29 32 30 33 -
pjproject/trunk/pjsip-apps/src/symbian_ua/ua.cpp
r2018 r2174 327 327 log_cfg.console_level = 4; 328 328 log_cfg.cb = &log_writer; 329 //log_cfg.log_filename = pj_str("C:\\data\\symbian_ua.log"); 329 330 330 331 pjsua_media_config_default(&med_cfg); … … 332 333 med_cfg.has_ioqueue = PJ_FALSE; 333 334 med_cfg.clock_rate = 8000; 335 #if defined(PJMEDIA_SYM_SND_USE_APS) && (PJMEDIA_SYM_SND_USE_APS==1) 336 med_cfg.audio_frame_ptime = 20; 337 #else 334 338 med_cfg.audio_frame_ptime = 40; 339 #endif 335 340 med_cfg.ec_tail_len = 0; 336 341 med_cfg.enable_ice = USE_ICE; -
pjproject/trunk/pjsip-apps/src/symbian_ua_gui/group/symbian_ua_gui.mmp
r1980 r2174 1 #define SND_USE_NULL 0 2 #define SND_USE_APS 0 3 1 4 TARGET symbian_ua_gui.exe 2 5 UID 0x100039CE 0xEBD12EE4 … … 33 36 LIBRARY etext.lib gdi.lib egul.lib insock.lib 34 37 LIBRARY ecom.lib inetprotutil.lib http.lib esock.lib 38 LIBRARY charconv.lib estlib.lib 35 39 36 40 STATICLIBRARY pjsua_lib.lib pjsip_ua.lib 37 41 STATICLIBRARY pjsip_simple.lib pjsip.lib pjsdp.lib pjmedia.lib 38 42 STATICLIBRARY pjnath.lib pjlib_util.lib pjlib.lib 39 STATICLIBRARY symbian_audio.liblibsrtp.lib43 STATICLIBRARY libsrtp.lib 40 44 STATICLIBRARY libgsmcodec.lib 41 45 STATICLIBRARY libspeexcodec.lib 42 46 43 LIBRARY charconv.lib estlib.lib 44 LIBRARY mediaclientaudiostream.lib 45 LIBRARY mediaclientaudioinputstream.lib 47 48 #if SND_USE_NULL || defined(WINSCW) 49 STATICLIBRARY null_audio.lib 50 CAPABILITY NetworkServices LocalServices ReadUserData WriteUserData UserEnvironment 51 #elif SND_USE_APS 52 STATICLIBRARY symbian_audio_aps.lib 53 LIBRARY APSSession2.lib 54 CAPABILITY NetworkServices LocalServices ReadUserData WriteUserData UserEnvironment MultimediaDD 55 MACRO PJMEDIA_SYM_SND_USE_APS=1 56 #else 57 STATICLIBRARY symbian_audio.lib 58 LIBRARY mediaclientaudiostream.lib 59 LIBRARY mediaclientaudioinputstream.lib 60 CAPABILITY NetworkServices LocalServices ReadUserData WriteUserData UserEnvironment 61 #endif 46 62 47 63 LANG 01 … … 57 73 SOURCE symbian_ua_guiContainerView.cpp symbian_ua_guiContainer.cpp symbian_ua_guiAppUi.cpp symbian_ua_guiDocument.cpp symbian_ua_guiApplication.cpp symbian_ua_guiSettingItemList.cpp Symbian_ua_guiSettingItemListSets.cpp symbian_ua_guiSettingItemListView.cpp 58 74 SOURCE symbian_ua.cpp 59 60 CAPABILITY NetworkServices LocalServices ReadUserData WriteUserData UserEnvironment -
pjproject/trunk/pjsip-apps/src/symbian_ua_gui/src/symbian_ua.cpp
r2018 r2174 324 324 med_cfg.has_ioqueue = PJ_FALSE; 325 325 med_cfg.clock_rate = 8000; 326 #if defined(PJMEDIA_SYM_SND_USE_APS) && (PJMEDIA_SYM_SND_USE_APS==1) 327 med_cfg.audio_frame_ptime = 20; 328 #else 326 329 med_cfg.audio_frame_ptime = 40; 330 #endif 327 331 med_cfg.ec_tail_len = 0; 328 332 med_cfg.enable_ice = USE_ICE; -
pjproject/trunk/pjsip-apps/src/symbian_ua_gui/src/symbian_ua_guiApplication.cpp
r1973 r2174 17 17 #endif 18 18 // ]]] end generated region [Generated Includes] 19 20 21 // Needed by APS 22 TPtrC APP_UID = _L("EBD12EE4"); 19 23 20 24 /** -
pjproject/trunk/pjsip-apps/src/symsndtest/app_main.cpp
r1641 r2174 17 17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 18 */ 19 #include <pjmedia/delaybuf.h> 19 20 #include <pjmedia/sound.h> 20 21 #include <pj/errno.h> … … 28 29 #define CLOCK_RATE 8000 29 30 #define CHANNEL_COUNT 1 30 #define PTIME 10031 #define SAMPLES_PER_FRAME ( 80)31 #define PTIME 20 32 #define SAMPLES_PER_FRAME (CLOCK_RATE*PTIME/1000) 32 33 #define BITS_PER_SAMPLE 16 33 #define LOOPBACK_BUFF_COUNT 10034 34 35 35 extern CConsoleBase* console; … … 40 40 static pj_time_val t_start; 41 41 42 43 static pj_int16_t buff_loopback[SAMPLES_PER_FRAME*LOOPBACK_BUFF_COUNT]; 44 static pj_uint32_t pointer_w, pointer_r; 42 pj_pool_t *pool; 43 pjmedia_delay_buf *delaybuf; 45 44 46 45 /* Logging callback */ … … 74 73 pj_log_set_log_func((void (*)(int,const char*,int)) &log_writer); 75 74 pj_log_set_decor(PJ_LOG_HAS_NEWLINE); 76 pj_log_set_level( 5);75 pj_log_set_level(3); 77 76 78 77 /* Init pjlib */ … … 104 103 info->default_samples_per_sec)); 105 104 } 105 106 /* Create pool */ 107 pool = pj_pool_create(&cp.factory, THIS_FILE, 512, 512, NULL); 108 if (pool == NULL) { 109 app_perror("pj_pool_create()", status); 110 pj_caching_pool_destroy(&cp); 111 pj_shutdown(); 112 return status; 113 } 114 115 /* Init delay buffer */ 116 status = pjmedia_delay_buf_create(pool, THIS_FILE, CLOCK_RATE, 117 SAMPLES_PER_FRAME, CHANNEL_COUNT, 118 0, 0, &delaybuf); 119 if (status != PJ_SUCCESS) { 120 app_perror("pjmedia_delay_buf_create()", status); 121 //pj_caching_pool_destroy(&cp); 122 //pj_shutdown(); 123 //return status; 124 } 106 125 107 126 return PJ_SUCCESS; … … 117 136 PJ_UNUSED_ARG(user_data); 118 137 PJ_UNUSED_ARG(timestamp); 119 PJ_UNUSED_ARG(input);120 138 PJ_UNUSED_ARG(size); 121 139 122 pj _memcpy(&buff_loopback[pointer_w*SAMPLES_PER_FRAME], input, size);140 pjmedia_delay_buf_put(delaybuf, (pj_int16_t*)input); 123 141 124 142 if (size != SAMPLES_PER_FRAME*2) { 125 143 PJ_LOG(3, (THIS_FILE, "Size captured = %u", 126 144 size)); 127 pj_bzero(&buff_loopback[pointer_w*SAMPLES_PER_FRAME]+size/2, SAMPLES_PER_FRAME*2 - size); 128 } 129 130 if (++pointer_w >= LOOPBACK_BUFF_COUNT) { 131 pointer_w = 0; 132 } 133 145 } 146 134 147 ++rec_cnt; 135 148 return PJ_SUCCESS; … … 144 157 PJ_UNUSED_ARG(user_data); 145 158 PJ_UNUSED_ARG(timestamp); 146 147 //pj_bzero(output, size); 148 pj_memcpy(output, &buff_loopback[pointer_r*SAMPLES_PER_FRAME], SAMPLES_PER_FRAME*2); 149 150 if (++pointer_r >= LOOPBACK_BUFF_COUNT) { 151 pointer_r = 0; 152 } 159 PJ_UNUSED_ARG(size); 160 161 pjmedia_delay_buf_get(delaybuf, (pj_int16_t*)output); 153 162 154 163 ++play_cnt; … … 187 196 pj_gettimeofday(&t_start); 188 197 198 pjmedia_delay_buf_reset(delaybuf); 199 189 200 status = pjmedia_snd_stream_start(strm); 190 201 if (status != PJ_SUCCESS) { … … 195 206 } 196 207 197 pointer_w = LOOPBACK_BUFF_COUNT/2;198 pointer_r = 0;199 200 208 return PJ_SUCCESS; 201 209 } … … 232 240 233 241 pjmedia_snd_deinit(); 242 pjmedia_delay_buf_destroy(delaybuf); 243 pj_pool_release(pool); 234 244 pj_caching_pool_destroy(&cp); 235 245 pj_shutdown(); … … 296 306 PJ_LOG(3, (THIS_FILE, "\n\n" 297 307 "Menu:\n" 298 " bStart bidir sound\n"299 " rStart recorder\n"308 " a Start bidir sound\n" 309 " t Start recorder\n" 300 310 " p Start player\n" 301 " cStop & close sound\n"302 " qQuit\n"));311 " d Stop & close sound\n" 312 " w Quit\n")); 303 313 } 304 314 … … 310 320 311 321 switch (kc) { 312 case ' q':322 case 'w': 313 323 asw_->AsyncStop(); 314 324 reschedule = PJ_FALSE; 315 325 break; 316 case ' b':326 case 'a': 317 327 snd_start(PJMEDIA_DIR_CAPTURE_PLAYBACK); 318 328 break; 319 case ' r':329 case 't': 320 330 snd_start(PJMEDIA_DIR_CAPTURE); 321 331 break; … … 323 333 snd_start(PJMEDIA_DIR_PLAYBACK); 324 334 break; 325 case ' c':335 case 'd': 326 336 snd_stop(); 327 337 break; -
pjproject/trunk/pjsip-apps/src/symsndtest/main_symbian.cpp
r1428 r2174 27 27 // Global Variables 28 28 CConsoleBase* console; 29 30 // Needed by APS 31 TPtrC APP_UID = _L("A000000D"); 29 32 30 33 int app_main();
Note: See TracChangeset
for help on using the changeset viewer.