diff options
author | lioux <lioux@FreeBSD.org> | 2006-05-11 04:53:30 +0000 |
---|---|---|
committer | lioux <lioux@FreeBSD.org> | 2006-05-11 04:53:30 +0000 |
commit | 1054d48a8b9590f959c21c2ae6fc1d703ee9385a (patch) | |
tree | d44da7ac8e8bcefa85b9338812a87c3923062442 /net-im/libjingle | |
parent | e2f79b902fe6b3fc0445e07d1fcc4dc1b067d131 (diff) | |
download | FreeBSD-ports-1054d48a8b9590f959c21c2ae6fc1d703ee9385a.zip FreeBSD-ports-1054d48a8b9590f959c21c2ae6fc1d703ee9385a.tar.gz |
o More updates to libjingle's third party mediaphone (obtained from
current CVS of net/linphone http://savannah.gnu.org/projects/linphone/)
library [1]
o Pacify gcc: add missing "return" values to non-void functions
o This last round of patches get voice communications to "realtime"
responsiveness levels. Previously, there were a couple seconds
of latency on communications which made them a patience test.
- Particularly, the change on
talk/third_party/mediastreamer/msrtprecv.c
where we now rely on the rtp session's send_pt payload
instead of the recv_pt one
o Bump PORTREVISION
Obtained from: linphone's CVS [1]
Diffstat (limited to 'net-im/libjingle')
11 files changed, 195 insertions, 16 deletions
diff --git a/net-im/libjingle/Makefile b/net-im/libjingle/Makefile index b7be6bb..6aef015 100644 --- a/net-im/libjingle/Makefile +++ b/net-im/libjingle/Makefile @@ -7,7 +7,7 @@ PORTNAME= libjingle PORTVERSION= 0.3.0 -PORTREVISION= 5 +PORTREVISION= 6 CATEGORIES= net-im MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= ${PORTNAME} diff --git a/net-im/libjingle/files/patch-talk__session__phone__linphonemediaengine.cc b/net-im/libjingle/files/patch-talk__session__phone__linphonemediaengine.cc index 8ce6830..962789a 100644 --- a/net-im/libjingle/files/patch-talk__session__phone__linphonemediaengine.cc +++ b/net-im/libjingle/files/patch-talk__session__phone__linphonemediaengine.cc @@ -8,6 +8,17 @@ } LinphoneMediaChannel::~LinphoneMediaChannel() { +@@ -118,8 +119,8 @@ + mute_ = !send; + } + +-float LinphoneMediaChannel::GetCurrentQuality() {} +-int LinphoneMediaChannel::GetOutputLevel() {} ++float LinphoneMediaChannel::GetCurrentQuality() { return 0; } ++int LinphoneMediaChannel::GetOutputLevel() { return 0; } + + LinphoneMediaEngine::LinphoneMediaEngine() {} + LinphoneMediaEngine::~LinphoneMediaEngine() {} @@ -139,7 +140,7 @@ #ifdef HAVE_SPEEX @@ -26,3 +37,16 @@ codecs_.push_back(Codec(0, "PCMU", 2)); return true; +@@ -163,8 +164,8 @@ + return new LinphoneMediaChannel(); + } + +-int LinphoneMediaEngine::SetAudioOptions(int options) {} +-int LinphoneMediaEngine::SetSoundDevices(int wave_in_device, int wave_out_device) {} ++int LinphoneMediaEngine::SetAudioOptions(int options) { return 0; } ++int LinphoneMediaEngine::SetSoundDevices(int wave_in_device, int wave_out_device) { return 0; } + +-float LinphoneMediaEngine::GetCurrentQuality() {} +-int LinphoneMediaEngine::GetInputLevel() {} ++float LinphoneMediaEngine::GetCurrentQuality() { return 0; } ++int LinphoneMediaEngine::GetInputLevel() { return 0; } diff --git a/net-im/libjingle/files/patch-talk__third_party__mediastreamer__audiostream.c b/net-im/libjingle/files/patch-talk__third_party__mediastreamer__audiostream.c index fd018c4..9bda7b7 100644 --- a/net-im/libjingle/files/patch-talk__third_party__mediastreamer__audiostream.c +++ b/net-im/libjingle/files/patch-talk__third_party__mediastreamer__audiostream.c @@ -29,15 +29,19 @@ rtp_session_set_jitter_compensation(rtps,jitt_comp); rtpr=rtp_session_new(RTP_SESSION_RECVONLY); -@@ -158,7 +162,6 @@ +@@ -156,9 +160,9 @@ + #endif + rtp_session_set_scheduling_mode(rtpr,0); rtp_session_set_blocking_mode(rtpr,0); - rtp_session_set_payload_type(rtpr,payload); +- rtp_session_set_payload_type(rtpr,payload); ++ rtp_session_set_send_payload_type(rtpr,payload); ++ rtp_session_set_recv_payload_type(rtpr,payload); rtp_session_set_jitter_compensation(rtpr,jitt_comp); - rtp_session_signal_connect(rtpr,"telephone-event",(RtpCallback)on_dtmf_received,NULL); rtp_session_signal_connect(rtpr,"timestamp_jump",(RtpCallback)on_timestamp_jump,NULL); *recv=rtpr; *send=rtps; -@@ -179,8 +182,6 @@ +@@ -179,8 +183,6 @@ rtp_session_signal_connect(rtpr,"telephone-event",(RtpCallback)on_dtmf_received,(gpointer)stream); rtps=rtpr; @@ -46,7 +50,7 @@ stream->rtpsend=ms_rtp_send_new(); ms_rtp_send_set_session(MS_RTP_SEND(stream->rtpsend),rtps); stream->rtprecv=ms_rtp_recv_new(); -@@ -217,8 +218,8 @@ +@@ -217,8 +219,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); @@ -57,3 +61,9 @@ /* create the synchronisation source */ stream->timer=ms_timer_new(); +@@ -340,4 +342,5 @@ + { + ms_rtp_send_dtmf(MS_RTP_SEND(stream->rtpsend), dtmf); + ms_oss_write_play_dtmf(MS_OSS_WRITE(stream->soundwrite),dtmf); ++ return 0; + } diff --git a/net-im/libjingle/files/patch-talk__third_party__mediastreamer__msavencoder.h b/net-im/libjingle/files/patch-talk__third_party__mediastreamer__msavencoder.h new file mode 100644 index 0000000..40a7c88 --- /dev/null +++ b/net-im/libjingle/files/patch-talk__third_party__mediastreamer__msavencoder.h @@ -0,0 +1,10 @@ +--- talk/third_party/mediastreamer/msavencoder.h.orig Thu May 11 01:05:51 2006 ++++ talk/third_party/mediastreamer/msavencoder.h Thu May 11 01:06:18 2006 +@@ -44,6 +44,7 @@ + gint av_opened; + MSBuffer *comp_buf; + MSBuffer *yuv_buf; ++ MSMessage *outm; + }; + + typedef struct _MSAVEncoder MSAVEncoder; diff --git a/net-im/libjingle/files/patch-talk__third_party__mediastreamer__msbuffer.c b/net-im/libjingle/files/patch-talk__third_party__mediastreamer__msbuffer.c new file mode 100644 index 0000000..446f212 --- /dev/null +++ b/net-im/libjingle/files/patch-talk__third_party__mediastreamer__msbuffer.c @@ -0,0 +1,42 @@ +--- ./talk/third_party/mediastreamer/msbuffer.c.orig Wed May 10 23:56:49 2006 ++++ ./talk/third_party/mediastreamer/msbuffer.c Wed May 10 23:59:29 2006 +@@ -34,31 +34,28 @@ + /* allocate the data buffer: there is a lot of optmisation that can be done by using a pool of cached buffers*/ + buf->buffer=((char*)(buf))+sizeof(MSBuffer); /* to avoid to do two allocations, + buffer info and buffer are contigous.*/ +- buf->flags=MS_BUFFER_CONTIGUOUS; ++ buf->freefn=NULL; ++ buf->freearg=NULL; + return(buf); + } + +-MSBuffer *ms_buffer_alloc(gint flags) ++MSBuffer *ms_buffer_new_with_buf(char *extbuf, int size,void (*freefn)(void *), void *freearg) + { + MSBuffer *buf; + buf=(MSBuffer*)g_malloc(sizeof(MSBuffer)); + buf->ref_count=0; +- buf->size=0; +- buf->buffer=NULL; +- buf->flags=0; ++ buf->size=size; ++ buf->buffer=extbuf; ++ buf->freefn=freefn; ++ buf->freearg=freearg; + return(buf); + } + + + void ms_buffer_destroy(MSBuffer *buf) + { +- if (buf->flags & MS_BUFFER_CONTIGUOUS){ +- g_free(buf); +- } +- else { +- g_free(buf->buffer); ++ if (buf->freefn!=NULL) buf->freefn(buf->freearg); + g_free(buf); +- } + } + + MSMessage *ms_message_alloc() diff --git a/net-im/libjingle/files/patch-talk__third_party__mediastreamer__msbuffer.h b/net-im/libjingle/files/patch-talk__third_party__mediastreamer__msbuffer.h index 4775e95..bf6c382 100644 --- a/net-im/libjingle/files/patch-talk__third_party__mediastreamer__msbuffer.h +++ b/net-im/libjingle/files/patch-talk__third_party__mediastreamer__msbuffer.h @@ -1,6 +1,21 @@ --- ./talk/third_party/mediastreamer/msbuffer.h.orig Thu Mar 16 18:43:06 2006 -+++ ./talk/third_party/mediastreamer/msbuffer.h Fri Apr 21 10:56:34 2006 -@@ -48,11 +48,12 @@ ++++ ./talk/third_party/mediastreamer/msbuffer.h Thu May 11 00:12:20 2006 +@@ -37,28 +37,28 @@ + { + gchar *buffer; + guint32 size; +- guint16 ref_count; +- guint16 flags; +-#define MS_BUFFER_CONTIGUOUS (1) ++ gint ref_count; ++ void (*freefn)(void *); ++ void *freearg; + }MSBuffer; + + MSBuffer * ms_buffer_new(guint32 size); ++MSBuffer *ms_buffer_new_with_buf(char *extbuf, int size,void (*freefn)(void *), void *freearg); + void ms_buffer_destroy(MSBuffer *buf); + struct _MSMessage { MSBuffer *buffer; /* points to a MSBuffer */ @@ -14,3 +29,9 @@ }; typedef struct _MSMessage MSMessage; + +- +-MSBuffer *ms_buffer_alloc(gint flags); + MSMessage *ms_message_new(gint size); + + #define ms_message_set_buf(m,b) do { (b)->ref_count++; (m)->buffer=(b); (m)->data=(b)->buffer; (m)->size=(b)->size; }while(0) diff --git a/net-im/libjingle/files/patch-talk__third_party__mediastreamer__mscodec.c b/net-im/libjingle/files/patch-talk__third_party__mediastreamer__mscodec.c new file mode 100644 index 0000000..c843b12 --- /dev/null +++ b/net-im/libjingle/files/patch-talk__third_party__mediastreamer__mscodec.c @@ -0,0 +1,18 @@ +--- ./talk/third_party/mediastreamer/mscodec.c.orig Thu May 11 00:01:12 2006 ++++ ./talk/third_party/mediastreamer/mscodec.c Thu May 11 00:01:45 2006 +@@ -21,6 +21,7 @@ + + #include "mscodec.h" + #include "msMUlawdec.h" ++#include "msAlawdec.h" + + #ifdef TRUESPEECH + extern MSCodecInfo TrueSpeechinfo; +@@ -43,6 +44,7 @@ + // ms_filter_register(MS_FILTER_INFO(&GSMinfo)); + // ms_filter_register(MS_FILTER_INFO(&LPC10info)); + ms_filter_register(MS_FILTER_INFO(&MULAWinfo)); ++ ms_filter_register(MS_FILTER_INFO(&ALAWinfo)); + #ifdef TRUESPEECH + ms_filter_register(MS_FILTER_INFO(&TrueSpeechinfo)); + #endif diff --git a/net-im/libjingle/files/patch-talk__third_party__mediastreamer__msfifo.c b/net-im/libjingle/files/patch-talk__third_party__mediastreamer__msfifo.c index 5a723c9..8b72fce 100644 --- a/net-im/libjingle/files/patch-talk__third_party__mediastreamer__msfifo.c +++ b/net-im/libjingle/files/patch-talk__third_party__mediastreamer__msfifo.c @@ -1,6 +1,23 @@ --- ./talk/third_party/mediastreamer/msfifo.c.orig Thu Mar 16 18:43:06 2006 -+++ ./talk/third_party/mediastreamer/msfifo.c Fri Apr 21 10:56:34 2006 -@@ -123,7 +123,7 @@ ++++ ./talk/third_party/mediastreamer/msfifo.c Thu May 11 00:03:06 2006 +@@ -54,7 +54,6 @@ + MSBuffer *buf; + gint saved_offset=MAX(r_gran+r_offset,w_offset); + gint fifo_size; +- gint tmp; + if (min_fifo_size==0) min_fifo_size=w_gran; + + /* we must allocate a fifo with a size multiple of min_fifo_size, +@@ -90,7 +89,7 @@ + if (bsize>fifo->readsize) + { + ms_trace("Not enough data: bsize=%i, readsize=%i",bsize,fifo->readsize); +- return (-ENODATA); ++ return -1; + } + + rnext=fifo->rd_ptr+bsize; +@@ -123,7 +122,7 @@ /* fix readsize and writesize */ fifo->readsize-=unwritten; fifo->writesize+=unwritten; @@ -9,3 +26,12 @@ } gint ms_fifo_get_write_ptr(MSFifo *fifo, gint bsize, void **ret_ptr) +@@ -137,7 +136,7 @@ + { + ms_trace("Not enough space: bsize=%i, writesize=%i",bsize,fifo->writesize); + *ret_ptr=NULL; +- return(-ENODATA); ++ return -1; + } + wnext=fifo->wr_ptr+bsize; + if (wnext<=fifo->w_end){ diff --git a/net-im/libjingle/files/patch-talk__third_party__mediastreamer__msrtprecv.c b/net-im/libjingle/files/patch-talk__third_party__mediastreamer__msrtprecv.c index ebbb905..99ecb62 100644 --- a/net-im/libjingle/files/patch-talk__third_party__mediastreamer__msrtprecv.c +++ b/net-im/libjingle/files/patch-talk__third_party__mediastreamer__msrtprecv.c @@ -1,6 +1,23 @@ --- ./talk/third_party/mediastreamer/msrtprecv.c.orig Thu Mar 16 18:43:06 2006 -+++ ./talk/third_party/mediastreamer/msrtprecv.c Fri Apr 21 10:56:34 2006 -@@ -70,6 +70,8 @@ ++++ ./talk/third_party/mediastreamer/msrtprecv.c Thu May 11 00:07:00 2006 +@@ -29,15 +29,10 @@ + if (mp->b_datap->ref_count!=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); +- msbuf->buffer=mp->b_datap->db_base; +- msbuf->size=(char*)mp->b_datap->db_lim-(char*)mp->b_datap->db_base; ++ msbuf=ms_buffer_new_with_buf(mp->b_datap->db_base,mp->b_datap->db_lim-mp->b_datap->db_base,freemsg,mp); + ms_message_set_buf(msg,msbuf); + msg->size=mp->b_wptr-mp->b_rptr; + msg->data=mp->b_rptr; +- /* free the mblk_t */ +- g_free(mp->b_datap); +- g_free(mp); + return msg; + } + +@@ -70,6 +65,8 @@ memset(r->q_outputs,0,sizeof(MSFifo*)*MSRTPRECV_MAX_OUTPUTS); r->rtpsession=NULL; r->stream_started=0; @@ -9,7 +26,7 @@ } void ms_rtp_recv_class_init(MSRtpRecvClass *klass) -@@ -120,7 +122,7 @@ +@@ -120,7 +117,7 @@ gint got=0; /* we are connected with queues (surely for video)*/ /* use the sync system time to compute a timestamp */ @@ -18,7 +35,7 @@ if (pt==NULL) { ms_warning("ms_rtp_recv_process(): NULL RtpPayload- skipping."); return; -@@ -134,10 +136,16 @@ +@@ -134,10 +131,16 @@ /*g_message("Got packet with timestamp %u",clock);*/ got++; r->stream_started=1; @@ -39,7 +56,7 @@ } } } -@@ -147,10 +155,24 @@ +@@ -147,10 +150,24 @@ g_free(obj); } diff --git a/net-im/libjingle/files/patch-talk__third_party__mediastreamer__msrtpsend.c b/net-im/libjingle/files/patch-talk__third_party__mediastreamer__msrtpsend.c index 4495909..b3fcb7c 100644 --- a/net-im/libjingle/files/patch-talk__third_party__mediastreamer__msrtpsend.c +++ b/net-im/libjingle/files/patch-talk__third_party__mediastreamer__msrtpsend.c @@ -5,7 +5,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(r->rtpsession->profile,r->rtpsession->recv_pt); ++ PayloadType *pt=rtp_profile_get_payload(r->rtpsession->profile,r->rtpsession->send_pt); 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); diff --git a/net-im/libjingle/files/patch-talk__third_party__mediastreamer__mstimer.c b/net-im/libjingle/files/patch-talk__third_party__mediastreamer__mstimer.c index 667cf3f..5038dbb 100644 --- a/net-im/libjingle/files/patch-talk__third_party__mediastreamer__mstimer.c +++ b/net-im/libjingle/files/patch-talk__third_party__mediastreamer__mstimer.c @@ -1,5 +1,16 @@ --- ./talk/third_party/mediastreamer/mstimer.c.orig Thu Mar 16 18:43:06 2006 -+++ ./talk/third_party/mediastreamer/mstimer.c Fri Apr 21 10:56:34 2006 ++++ ./talk/third_party/mediastreamer/mstimer.c Wed May 10 23:45:11 2006 +@@ -33,8 +33,8 @@ + ms_sync_init(MS_SYNC(sync)); + MS_SYNC(sync)->attached_filters=sync->filters; + memset(sync->filters,0,MSTIMER_MAX_FILTERS*sizeof(MSFilter*)); +- MS_SYNC(sync)->samples_per_tick=160; +- ms_timer_set_interval(sync,20); ++ MS_SYNC(sync)->samples_per_tick=80; ++ ms_timer_set_interval(sync,10); + sync->state=MS_TIMER_STOPPED; + } + @@ -66,6 +66,8 @@ else { gint32 diff,time; |