首页 > 其他分享 >[Libjingle 0.4]编译Libjingle 0.4+Linphone Voice Engine的总结之一

[Libjingle 0.4]编译Libjingle 0.4+Linphone Voice Engine的总结之一

时间:2023-06-02 21:38:54浏览次数:60  
标签:Engine speex set 0.4 Libjingle profile rtp type payload


在Windows下编译Libjingle 0.4+Linphone Voice Engine时候会遇到一些问题, 下面整理了一下, 当然并不是所有的patch都有用的.


http://code.google.com/p/libjingle/issues/detail?id=16
*** 64-bit.patch ***
*** ortp.patch ***
*** gcc4.patch ***
*** libjingle-fileshare.patch ***
*** mutex.patch ***

http://code.google.com/p/libjingle/issues/detail?id=11

fileshare.cc compile error


http://code.google.com/p/libjingle/issues/detail?id=6

Compile fix for new version of libortp2

http://code.google.com/p/libjingle/issues/detail?id=19
cannot login using 'call' from examples

http://code.google.com/p/libjingle/issues/detail?id=29
"make" command gives an error

 

其中, 我遇到的一个编译问题就是ortp.patch所提到的:

http://libjingle.googlecode.com/issues/attachment?aid=5772608404175355205&name=ortp.patch&token=bcee68cb1b3f4d2ddefd7681b733cac8

这里backup一下

diff --exclude='Makefile*' --exclude='.*' --exclude='*~' --exclude='*.lo' --exclude='*.o' -aurbB libjingle-orig/talk/session/phone/linphonemediaengine.cc libjingle-new-ortp/talk/session/phone/linphonemediaengine.cc
--- libjingle-orig/talk/session/phone/linphonemediaengine.cc	2007-02-02 00:07:30.000000000 -0500
+++ libjingle-new-ortp/talk/session/phone/linphonemediaengine.cc	2007-07-19 11:24:09.000000000 -0400
@@ -80,19 +80,19 @@
     } 
 #endif
 #ifdef HAVE_SPEEX
-    if (i->name == speex_wb.mime_type && i->clockrate == speex_wb.clock_rate) {
-      rtp_profile_set_payload(&av_profile, i->id, &speex_wb);
-    } else if (i->name == speex_nb.mime_type && i->clockrate == speex_nb.clock_rate) {
-      rtp_profile_set_payload(&av_profile, i->id, &speex_nb);
+    if (i->name == payload_type_speex_wb.mime_type && i->clockrate == payload_type_speex_wb.clock_rate) {
+      rtp_profile_set_payload(&av_profile, i->id, &payload_type_speex_wb);
+    } else if (i->name == payload_type_speex_nb.mime_type && i->clockrate == payload_type_speex_nb.clock_rate) {
+      rtp_profile_set_payload(&av_profile, i->id, &payload_type_speex_nb);
     }
 #endif
 
     if (i->id == 0)
-      rtp_profile_set_payload(&av_profile, 0, &pcmu8000);
+      rtp_profile_set_payload(&av_profile, 0, &payload_type_pcmu8000);
 
-    if (i->name == telephone_event.mime_type) {
+/*    if (i->name == telephone_event.mime_type) {
       rtp_profile_set_payload(&av_profile, i->id, &telephone_event);
-    }
+    }*/
     
     if (first) {
       LOG(LS_INFO) << "Using " << i->name << "/" << i->clockrate;
@@ -114,12 +114,12 @@
 bool LinphoneMediaEngine::FindCodec(const Codec &c) {
   if (c.id == 0)
     return true;
-  if (c.name == telephone_event.mime_type)
-    return true;
+/*  if (c.name == telephone_event.mime_type)
+    return true;*/
 #ifdef HAVE_SPEEX
-  if (c.name == speex_wb.mime_type && c.clockrate == speex_wb.clock_rate)
+  if (c.name == payload_type_speex_wb.mime_type && c.clockrate == payload_type_speex_wb.clock_rate)
     return true;
-  if (c.name == speex_nb.mime_type && c.clockrate == speex_nb.clock_rate)
+  if (c.name == payload_type_speex_nb.mime_type && c.clockrate == payload_type_speex_nb.clock_rate)
     return true;
 #endif
 #ifdef HAVE_ILBC
@@ -171,8 +171,8 @@
 #ifdef HAVE_SPEEX
   ms_speex_codec_init();
 
-  codecs_.push_back(Codec(110, speex_wb.mime_type, speex_wb.clock_rate, 0, 1, 8));
-  codecs_.push_back(Codec(111, speex_nb.mime_type, speex_nb.clock_rate, 0, 1, 7));
+  codecs_.push_back(Codec(110, payload_type_speex_wb.mime_type, payload_type_speex_wb.clock_rate, 0, 1, 8));
+  codecs_.push_back(Codec(111, payload_type_speex_nb.mime_type, payload_type_speex_nb.clock_rate, 0, 1, 7));
   
 #endif
 
@@ -181,8 +181,8 @@
   codecs_.push_back(Codec(102, payload_type_ilbc.mime_type, payload_type_ilbc.clock_rate, 0, 1, 4));
 #endif
 
-  codecs_.push_back(Codec(0, pcmu8000.mime_type, pcmu8000.clock_rate, 0, 1, 2));
-  codecs_.push_back(Codec(101, telephone_event.mime_type, telephone_event.clock_rate, 0, 1, 1));
+  codecs_.push_back(Codec(0, payload_type_pcmu8000.mime_type, payload_type_pcmu8000.clock_rate, 0, 1, 2));
+ // codecs_.push_back(Codec(101, telephone_event.mime_type, telephone_event.clock_rate, 0, 1, 1));
   return true;
 }
 
diff --exclude='Makefile*' --exclude='.*' --exclude='*~' --exclude='*.lo' --exclude='*.o' -aurbB libjingle-orig/talk/third_party/mediastreamer/audiostream.c libjingle-new-ortp/talk/third_party/mediastreamer/audiostream.c
--- libjingle-orig/talk/third_party/mediastreamer/audiostream.c	2007-02-02 00:07:32.000000000 -0500
+++ libjingle-new-ortp/talk/third_party/mediastreamer/audiostream.c	2007-07-19 11:55:32.000000000 -0400
@@ -112,7 +112,7 @@
 			RtpSession **recvsend){
 	RtpSession *rtpr;
 	rtpr=rtp_session_new(RTP_SESSION_SENDRECV);
-	rtp_session_max_buf_size_set(rtpr,MAX_RTP_SIZE);
+	rtp_session_set_recv_buf_size(rtpr,MAX_RTP_SIZE);
 	rtp_session_set_profile(rtpr,profile);
 	rtp_session_set_local_addr(rtpr,get_local_addr_for(remip),locport);
 	if (remport>0) rtp_session_set_remote_addr(rtpr,remip,remport);
@@ -133,7 +133,7 @@
 	/* creates two rtp filters to recv send streams (remote part)*/
 	
 	rtps=rtp_session_new(RTP_SESSION_SENDONLY);
-	rtp_session_max_buf_size_set(rtps,MAX_RTP_SIZE);
+	rtp_session_set_recv_buf_size(rtps,MAX_RTP_SIZE);
 	rtp_session_set_profile(rtps,profile);
 #ifdef INET6
 	rtp_session_set_local_addr(rtps,"::",locport+2);
@@ -147,7 +147,7 @@
 	rtp_session_set_jitter_compensation(rtps,jitt_comp);
 	
 	rtpr=rtp_session_new(RTP_SESSION_RECVONLY);
-	rtp_session_max_buf_size_set(rtpr,MAX_RTP_SIZE);
+	rtp_session_set_recv_buf_size(rtpr,MAX_RTP_SIZE);
 	rtp_session_set_profile(rtpr,profile);
 #ifdef INET6
 	rtp_session_set_local_addr(rtpr,"::",locport);
@@ -217,8 +217,8 @@
 	ms_filter_set_property(stream->decoder,MS_FILTER_PROPERTY_FREQ,&pt->clock_rate);
 	ms_filter_set_property(stream->decoder,MS_FILTER_PROPERTY_BITRATE,&pt->normal_bitrate);
 	
-	ms_filter_set_property(stream->encoder,MS_FILTER_PROPERTY_FMTP, (void*)pt->fmtp);
-	ms_filter_set_property(stream->decoder,MS_FILTER_PROPERTY_FMTP,(void*)pt->fmtp);
+	ms_filter_set_property(stream->encoder,MS_FILTER_PROPERTY_FMTP, (void*)pt->send_fmtp);
+	ms_filter_set_property(stream->decoder,MS_FILTER_PROPERTY_FMTP,(void*)pt->recv_fmtp);
 	/* create the synchronisation source */
 	stream->timer=ms_timer_new();
 	
diff --exclude='Makefile*' --exclude='.*' --exclude='*~' --exclude='*.lo' --exclude='*.o' -aurbB libjingle-orig/talk/third_party/mediastreamer/msrtprecv.c libjingle-new-ortp/talk/third_party/mediastreamer/msrtprecv.c
--- libjingle-orig/talk/third_party/mediastreamer/msrtprecv.c	2007-02-02 00:07:32.000000000 -0500
+++ libjingle-new-ortp/talk/third_party/mediastreamer/msrtprecv.c	2007-07-19 11:40:11.000000000 -0400
@@ -26,7 +26,7 @@
 MSMessage *msgb_2_ms_message(mblk_t* mp){
 	MSMessage *msg;
 	MSBuffer *msbuf;
-	if (mp->b_datap->ref_count!=1) return NULL; /* cannot handle properly non-unique buffers*/
+	if (mp->b_datap->db_ref!=1) return NULL; /* cannot handle properly non-unique buffers*/
 	/* create a MSBuffer using the mblk_t buffer */
 	msg=ms_message_alloc();
 	msbuf=ms_buffer_alloc(0);
@@ -120,7 +120,7 @@
 		gint got=0;
 		/* we are connected with queues (surely for video)*/
 		/* use the sync system time to compute a timestamp */
-		PayloadType *pt=rtp_profile_get_payload(r->rtpsession->profile,r->rtpsession->payload_type);
+		PayloadType *pt=rtp_profile_get_payload(rtp_session_get_recv_profile(r->rtpsession),rtp_session_get_recv_payload_type(r->rtpsession));
 		if (pt==NULL) {
 			ms_warning("ms_rtp_recv_process(): NULL RtpPayload- skipping.");
 			return;
diff --exclude='Makefile*' --exclude='.*' --exclude='*~' --exclude='*.lo' --exclude='*.o' -aurbB libjingle-orig/talk/third_party/mediastreamer/msrtpsend.c libjingle-new-ortp/talk/third_party/mediastreamer/msrtpsend.c
--- libjingle-orig/talk/third_party/mediastreamer/msrtpsend.c	2007-02-02 00:07:32.000000000 -0500
+++ libjingle-new-ortp/talk/third_party/mediastreamer/msrtpsend.c	2007-07-19 11:41:26.000000000 -0400
@@ -85,7 +85,7 @@
 {
 	guint32 clockts;
 	/* use the sync system time to compute a timestamp */
-	PayloadType *pt=rtp_profile_get_payload(r->rtpsession->profile,r->rtpsession->payload_type);
+	PayloadType *pt=rtp_profile_get_payload(rtp_session_get_send_profile(r->rtpsession),rtp_session_get_send_payload_type(r->rtpsession));
 	g_return_val_if_fail(pt!=NULL,0);
 	clockts=(guint32)(((double)synctime * (double)pt->clock_rate)/1000.0);
 	ms_trace("ms_rtp_send_process: sync->time=%i clock=%i",synctime,clockts);

标签:Engine,speex,set,0.4,Libjingle,profile,rtp,type,payload
From: https://blog.51cto.com/u_16125990/6405077

相关文章

  • Step by Step about How to Build libjingle 0.4
    [b]1.DownloadandInstallVisualC++2010Express[/b][url]http://www.microsoft.com/express/Downloads/#2010-Visual-CPP[/url][b]2.DownloadandinstallbinarypackageforExpat[/b]http://sourceforge.net/projects/expat/files/expat_......
  • 2015.4.22.20.46_ecilipse_8.30_Eclipse 10个最有用的快捷键_0.01
    Eclipse中10个最有用的快捷键组合一个Eclipse骨灰级开发者总结了他认为最有用但又不太为人所知的快捷键组合。通过这些组合可以更加容易的浏览源代码,使得整体的开发效率和质量得到提升。1.ctrl+shift+r:打开资源这可能是所有快捷键组合中最省时间的了。这组快捷键可以让你打开你的......
  • 【虚幻引擎】UE4源码解析FWorldContent、UWorld、ULevel、UGameInstance、UEngine
    一、UEngineEngine,因为也是很基础的类,再加上开发过程中会经常访问到该类型,因此UE4引擎也在代码全局范围内定义了一个该类型的全局变量:UEngine*GEngine供开发者直接调用。该最基础的类型分化成了两个子类:UGameEngine和UEditorEngine。UGameEngine保存了唯一的一个UGameInstan......
  • 搞事我们是认真的!TDengine 周边大礼包走起,数量有限先到先得
    没错~我们就是要“搞事”啦揭晓谜底前TDengine周边先来露个面不知不觉间TDengine已经和大家共同走过六年时间了从单机版开源到集群版开源从零到两万一的Star增长从寥寥可数的下载量到超25万的用户实例数从1.0到2.0到3.0的版本迭代......在这六年时间里T......
  • 英国皇家植物园采用机器学习预测植物抗疟性,将准确率从 0.46 提升至 0.67
    内容一览:疟疾是严重危害人类生命健康的重大传染病,研究人员一直在致力于寻找新的植物源性抗疟疾化合物,以研发相关药物。近期英国皇家植物园利用机器学习算法有效预测了植物抗疟性,该研究成果目前已发表在《FrontiersinPlantScience》期刊上。关键词:植物学抗疟疾支持向量......
  • tdengine指标卡汇总计算整理
    以天做时间隔断函数值当天某项数据平均值SELECTAVG(phv_phsa)FROM 子表 WHEREts>'2023-05-1000:00:00'INTERVAL(1d);连续几天的某项数据平均值1天为间隔有填充不进行填充:NONE(默认填充模式)。VALUE填充:固定值填充,此时需要指定填充的数值。例如:FILL(VALUE,1.23)......
  • 微软提示工程(Prompt Engineering)指南
    第一部分提示工程简介本文内容基本信息最佳做法空间效率后续步骤OpenAI中的GPT-3、GPT-3.5和GPT-4模型基于提示。使用基于提示的模型时,用户通过输入文本提示与模型交互,该文本提示通过文本补全进行响应。补全是模型的输入文本的延续。虽然这些模型非常强大,但它......
  • 【随手记录】Unable to create requested service [org.hibernate.engine.jdbc.env.sp
    链接数据库报错 Unabletocreaterequestedservice[org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]出现这个问题基本是数据库的方言dialect或者驱动driver_class有问题,可以确认下dialect或者driver_class的配置和自己要链接的库、库版本是否一致,比如:spring.jpa......
  • MegEngine 使用小技巧:如何解读 MegCC 编译模型几个阶段 Pass 的作用
    MegCC 是一个真真实实的深度学习模型编译器,具备极其轻量的Runtime二进制体积,高性能,方便移植,极低内存使用以及快启动等核心特点。用户可在MLIR上进行计算图优化,内存规划,最后通过预先写好的code模版进行代码生成。MegCC中主要的PassMGBToKernelPass:这个Pass主要将MGB......
  • libjingle 0.4和0.5版本之间的区别
    我所知道的主要的区别是:1.Build方式的区别.0.4在Windows上用VisualC++Express来build的,而0.5用的SCons来build的(一种跨平台的build工具)2.在0.5上去掉了fileshare的实现代码以及例子.我当前最关注的就是文件传输这一部分,所以决定从0.4版本......