cookyshi / libjingle

Automatically exported from code.google.com/p/libjingle
0 stars 0 forks source link

libjingle+linphone can only send voice but cann't receive voice #265

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. write a function similar to CreateFileMediaEngine:
cricket::MediaEngineInterface* 
MediaEngineFactory::CreateLinphoneMediaEngine(const std::string& ringWav,  
const std::string& callWav) {
  cricket::LinphoneMediaEngine* linphone_media_engine = new cricket::LinphoneMediaEngine(ringWav, callWav );

  // Set voice and video codecs. TODO: The codecs actually depend on
  // the the input voice and video streams.
  std::vector<cricket::AudioCodec> voice_codecs;
  voice_codecs.push_back(
      cricket::AudioCodec(9, "G722", 16000, 0, 1, 0));
  voice_codecs.push_back(
      cricket::AudioCodec(0, "PCMU", 8000, 0, 1, 0));
  voice_codecs.push_back(
      cricket::AudioCodec(13, "CN", 8000, 0, 1, 0));
  voice_codecs.push_back(
      cricket::AudioCodec(105, "CN", 16000, 0, 1, 0));    
  linphone_media_engine->set_voice_codecs(voice_codecs);
  std::vector<cricket::VideoCodec> video_codecs;
  video_codecs.push_back(
      cricket::VideoCodec(97, "H264", 320, 240, 30, 0));
  video_codecs.push_back(
      cricket::VideoCodec(99, "H264-SVC", 640, 360, 30, 0));
  linphone_media_engine->set_video_codecs(video_codecs);

  return linphone_media_engine;
}
2. modify call_main to use linphone_media_engine:
if (FLAG_voiceinput || FLAG_voiceoutput ||
      FLAG_videoinput || FLAG_videooutput) {
    // If any dump file is specified, we use a FileMediaEngine.
    cricket::MediaEngineInterface* engine =
        MediaEngineFactory::CreateFileMediaEngine(
            FLAG_voiceinput, FLAG_voiceoutput,
            FLAG_videoinput, FLAG_videooutput);
    client->SetMediaEngine(engine);
  }
  else
  {   cricket::MediaEngineInterface* engine = MediaEngineFactory::CreateLinphoneMediaEngine("ambul.wav", "bb.wav"); 
    client->SetMediaEngine(engine);
  }
3. add additional library "libmediastreamer-1.lib" and "libortp-8.lib" and put 
libmediastreamer2-1.dll, libortp-8.dll into output directory.
4. run "call.exe" without any rtpdump file input

What is the expected output? What do you see instead?
This new call.exe should be able to communicate with another gmail account. 
However I can only say but cannot hear, i.e. the other side can hear me 
talking, but I cannot hear him talking.

What version of the product are you using? On what operating system?
libjingle-0.6.0 and libjingle-0.6.6
VS 2010
Win 7

Please provide any additional information below.
The VS 2010 solution can be downloaded from Issue 242. Only a little needs to 
be made.

I guess the problem is that I used lihphonemediaengine incorrectly. Does anyone 
know the correct way of using it? Thanks in advance.

Original issue reported on code.google.com by tangketa...@gmail.com on 24 Dec 2011 at 2:42

GoogleCodeExporter commented 9 years ago
The problem has been solved. It's because of incorrect codecs. Change codecs to 
speex will be fine.

Original comment by tangketa...@gmail.com on 7 Apr 2012 at 5:21

GoogleCodeExporter commented 9 years ago
Hi tangketa@
I want to ask you one primary question: The version of libjingle in the case 
(when using linphone) must be 0.6.6? 
Any problems occur if i want to use 0.6.14 (e.g. the newest version)
Thanks.

Original comment by duc...@tin180.com on 5 Jul 2012 at 8:58

GoogleCodeExporter commented 9 years ago
tangketa,

Where can i find the correct codecs?

Original comment by tejeshsm...@gmail.com on 27 Aug 2012 at 2:13

GoogleCodeExporter commented 9 years ago

Original comment by juberti@google.com on 1 Jun 2013 at 4:53