linphone-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Linphone-developers] use mediastreamer2 on Windows Mobile 5.0 PPC


From: Vadim Lebedev
Subject: Re: [Linphone-developers] use mediastreamer2 on Windows Mobile 5.0 PPC
Date: Tue, 31 Mar 2009 16:24:58 +0200
User-agent: Thunderbird 2.0.0.19 (X11/20090105)

Dear Wu,

I'd suggest you first try to use some other codec like G711 or GSM...

If it works, than try to make sure that you're using Fixed point version of Speex codec and echo canceller

Thanks
Vadim

振湘吴 wrote:
Hi,everybody:
I am trying to use mediateamer2 on Windows Mobile 5.0 PPC.I have built oRTP.dll and mediastreamer2.dll for wince platform via VS2005.But when I am going to implement the mediastream.c on PPC,there is some problems happened.the VS2005 Debug output tell me:
 
Load Module: mediastream4ce.exe
Load Module: mediastreamer2.dll
Load Module: oRTP.dll
Load Module: mmtimer.dll
Load Module: oleaut32.dll
Load Module: commctrl.dll.0409.mui
Load Module: commctrl.dll
Load Module: aygshell.dll
Load Module: ws2.dll
Load Module: coredll.dll.0409.mui
Load Module: ossvcs.dll
Load Module: ole32.dll
Load Module: coredll.dll
Platform Type : PocketPC
Load Module: compime.dll
Load Module: shellres.dll
ortp-message-Registering all filters...
ortp-message-Registering all soundcard handlers
ortp-message-Card WINSND: A added
ortp-message-Card WINSND: A added
ortp-message-Loading plugins
ortp-warning-no loadable plugin support: plugins cannot be loaded.
ortp-message-ms_init() done
Load Module: ssllsp.dll
Load Module: AutoBind_lsp.dll
Load Module: dtpt_lsp.dll
Load Module: wspm.dll
ortp-warning-Failed to set multicast loopback on socket.
ortp-message-Setting audio encoder network bitrate to 8000
ortp-message-ms_filter_link: MSWinSndRead:002AA650,0-->MSSpeexEnc:002AA6D0,0
ortp-message-ms_filter_link: MSDtmfGen:002AA5E0,0-->MSWinSndWrite:002AA690,0
ortp-message-ms_filter_link: MSSpeexEnc:002AA6D0,0-->MSRtpSend:002A9AD0,0
ortp-message-ms_filter_link: MSRtpRecv:002AA550,0-->MSSpeexDec:002AA790,0
ortp-message-ms_filter_link: MSSpeexDec:002AA790,0-->MSDtmfGen:002AA5E0,0
ortp-message-ms_ticker_set_time_func: ticker updated.
ortp-message-Using bitrate 2150 for speex encoder.
ortp-message-win32 timer resolution set to 2 ms
ortp-message-SpeakerCallback : WOM_OPEN
ortp-message-Sound Header prepared 0 for windows sound device. (waveOutPrepareHeader)
ortp-message-Sound Header prepared 1 for windows sound device. (waveOutPrepareHeader)
ortp-message-Sound Header prepared 2 for windows sound device. (waveOutPrepareHeader)
ortp-message-Sound Header prepared 3 for windows sound device. (waveOutPrepareHeader)
ortp-message-Sound Header prepared 4 for windows sound device. (waveOutPrepareHeader)
ortp-message-Sound Header prepared 5 for windows sound device. (waveOutPrepareHeader)
ortp-message-WaveInCallback : WIM_OPEN
ortp-message-Sound Header prepared 0 for windows sound device. (waveInAddBuffer)
ortp-message-Sound Header prepared 1 for windows sound device. (waveInAddBuffer)
ortp-message-Sound Header prepared 2 for windows sound device. (waveInAddBuffer)
ortp-message-Sound Header prepared 3 for windows sound device. (waveInAddBuffer)
ortp-message-Sound Header prepared 4 for windows sound device. (waveInAddBuffer)
ortp-message-Sound Header prepared 5 for windows sound device. (waveInAddBuffer)
ortp-warning-We are late of 110 miliseconds.
ortp-warning-We are late of 300 miliseconds.
ortp-warning-We are late of 1370 miliseconds.
ortp-warning-We are late of 3160 miliseconds.
.......
the endless warning "we are late x meliseconds",and the x become longer and longer.
at the same time,the program looks like get in truble,doesn't respond.
 
In order to transplant the mediastream.c,I have modified the original program with MFC,the main functions are pasted as follows:
 
void Cmediastream4ceDlg::OnBnClickedStart()
{
 /* parameter initialized */
 int localport=5050,
  remoteport=5060,
  payload=110;
 char ip[50]="192.168.4.76";
 const char *fmtp=NULL;
 int jitter=50;
 int bitrate=0;
 bool_t ec=FALSE;
 /*create the rtp session */
 ortp_init();
 ortp_set_log_level_mask(ORTP_MESSAGE|ORTP_WARNING|ORTP_ERROR|ORTP_FATAL);
 rtp_profile_set_payload(&av_profile,115,&payload_type_lpc1015);
 rtp_profile_set_payload(&av_profile,110,&payload_type_speex_nb);
 rtp_profile_set_payload(&av_profile,111,&payload_type_speex_wb);
 rtp_profile_set_payload(&av_profile,112,&payload_type_ilbc); 
 run_media_streams((void *)this,localport,ip,remoteport,payload,fmtp,jitter,ec,bitrate);
}
 
void run_media_streams(void *p,int localport,  const char *remote_ip, int remoteport, int payload, const char *fmtp, int jitter, bool_t ec, int bitrate)
{
 cond=true;
 Cmediastream4ceDlg *pMainWnd = (Cmediastream4ceDlg *)p;
 profile="">  q=ortp_ev_queue_new();
 ms_init();
 pt=rtp_profile_get_payload(profile,payload);
 if (pt==NULL){
  pMainWnd->GetDlgItem(IDC_DebugListBox)->AddString(_T("payload type error"));
 }
 if (fmtp!=NULL) payload_type_set_send_fmtp(pt,fmtp);
 if (bitrate>0) pt->normal_bitrate=bitrate;
 if (pt->type!=PAYLOAD_VIDEO){
  pMainWnd->GetDlgItem(IDC_DebugListBox)->AddString(_T("Starting audio stream"));
  
  audio=audio_stream_start(profile,localport,remote_ip,remoteport,payload,jitter, ec);
  if (audio)
  {
   session=audio->session;
   pMainWnd->GetDlgItem(IDC_DebugListBox)->AddString(_T("Start audio stream"));
  }
 }
 rtp_session_register_event_queue(session,q);
 
 while(cond)
 {
  for(n=0;n<100;++n){
#ifdef WIN32
   MSG msg;
   Sleep(10);
   while (PeekMessage(&msg, NULL, 0, 0,PM_REMOVE)){
           TranslateMessage(&msg);
           DispatchMessage(&msg);
   }
#else
   struct timespec ts;
   ts.tv_sec=0;
   ts.tv_nsec=10000000;
   nanosleep(&ts,NULL);
#endif
  }

  if (session)
  {
   parse_events(q);
  }
 }
}
 
void Cmediastream4ceDlg::OnBnClickedStop()
{
 cond=false;
 if (audio) audio_stream_stop(audio);
 ortp_ev_queue_destroy(q);
 rtp_profile_destroy(profile);
 this->GetDlgItem(IDC_DebugListBox)->AddString(_T("Stoping audio stream"));
}
 
Maybe I don't modify it correctly,can you help me to find the mistakes,and tell me how to build the mediastream on Pocket PC WM 5.
 
thank you very much,and thie is my first time to post letter.I'm glad to communicate with everybody.
 
Best Regards
                                                                                                         Wu from China
 

_______________________________________________ Linphone-developers mailing list address@hidden http://lists.nongnu.org/mailman/listinfo/linphone-developers


reply via email to

[Prev in Thread] Current Thread [Next in Thread]