Mercurial > pidgin
changeset 12029:1c771536a032
[gaim-migrate @ 14322]
This _compiles_ for me now. Theres still a bunch of "dereferencing type-punned pointer will break strict-aliasing rules" warning and some redefinition warnings from the various config.h's. The deferencing warnings look like a BE<->LE hack but I left them untouched for the time being.
committer: Tailor Script <tailor@pidgin.im>
author | Gary Kramlich <grim@reaperworld.com> |
---|---|
date | Wed, 09 Nov 2005 09:57:33 +0000 |
parents | b0ad08e1d492 |
children | 7165a7a444da |
files | src/mediastreamer/.cvsignore src/mediastreamer/audiostream.c src/mediastreamer/msfifo.c src/mediastreamer/msilbcdec.c src/mediastreamer/msilbcenc.c src/mediastreamer/msossread.c src/mediastreamer/msosswrite.c src/mediastreamer/msread.c src/mediastreamer/msread.h src/mediastreamer/msringplayer.c src/mediastreamer/msringplayer.h src/mediastreamer/mssoundread.c src/mediastreamer/mssoundwrite.c src/mediastreamer/msspeexdec.c src/mediastreamer/msspeexenc.c src/mediastreamer/mssync.c src/mediastreamer/osscard.c src/mediastreamer/osscard.h |
diffstat | 18 files changed, 81 insertions(+), 22 deletions(-) [+] |
line wrap: on
line diff
--- a/src/mediastreamer/.cvsignore Wed Nov 09 09:02:43 2005 +0000 +++ b/src/mediastreamer/.cvsignore Wed Nov 09 09:57:33 2005 +0000 @@ -2,7 +2,8 @@ .libs Makefile Makefile.in +*.a +*.dll +*.la *.lo *.loT -*.a -*.dll
--- a/src/mediastreamer/audiostream.c Wed Nov 09 09:02:43 2005 +0000 +++ b/src/mediastreamer/audiostream.c Wed Nov 09 09:57:33 2005 +0000 @@ -18,7 +18,6 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - #include "mediastream.h" #ifdef INET6 #include <sys/types.h> @@ -88,7 +87,6 @@ { const char *ret; #ifdef INET6 - char num[8]; struct addrinfo hints, *res0; int err; memset(&hints, 0, sizeof(hints)); @@ -129,7 +127,6 @@ int payload,int jitt_comp, RtpSession **recv, RtpSession **send){ RtpSession *rtps,*rtpr; - PayloadType *pt; /* creates two rtp filters to recv send streams (remote part)*/ rtps=rtp_session_new(RTP_SESSION_SENDONLY); @@ -338,4 +335,9 @@ { ms_rtp_send_dtmf(MS_RTP_SEND(stream->rtpsend), dtmf); ms_oss_write_play_dtmf(MS_OSS_WRITE(stream->soundwrite),dtmf); + + /* not sure what this should be returning, nothing in mediastreamer calls + * it directly, assuming 0 is okay here. -- Gary + */ + return 0; }
--- a/src/mediastreamer/msfifo.c Wed Nov 09 09:02:43 2005 +0000 +++ b/src/mediastreamer/msfifo.c Wed Nov 09 09:57:33 2005 +0000 @@ -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,
--- a/src/mediastreamer/msilbcdec.c Wed Nov 09 09:02:43 2005 +0000 +++ b/src/mediastreamer/msilbcdec.c Wed Nov 09 09:57:33 2005 +0000 @@ -83,11 +83,16 @@ { switch(prop){ case MS_FILTER_PROPERTY_FMTP: - if (!value) return; + if (!value) return 0; if (strstr(value,"ptime=20")!=NULL) obj->ms_per_frame=20; else if (strstr(value,"ptime=30")!=NULL) obj->ms_per_frame=30; else g_warning("Unrecognized fmtp parameter for ilbc encoder!"); break; + case MS_FILTER_PROPERTY_FREQ: + case MS_FILTER_PROPERTY_BITRATE: + case MS_FILTER_PROPERTY_CHANNELS: + default: + break; } return 0; } @@ -98,13 +103,17 @@ if (obj->ms_per_frame==20) strncpy(value,"ptime=20",MS_FILTER_PROPERTY_STRING_MAX_SIZE); if (obj->ms_per_frame==30) strncpy(value,"ptime=30",MS_FILTER_PROPERTY_STRING_MAX_SIZE); break; + case MS_FILTER_PROPERTY_FREQ: + case MS_FILTER_PROPERTY_BITRATE: + case MS_FILTER_PROPERTY_CHANNELS: + default: + break; } return 0; } void ms_ilbc_decoder_setup(MSILBCDecoder *r) { - MSFilterClass *klass = NULL; switch (r->ms_per_frame) { case 20: r->samples_per_frame = BLOCKL_20MS; @@ -157,7 +166,6 @@ { MSFifo *fo; MSQueue *qi; - int err1; void *dst=NULL; float speech[ILBC_MAX_SAMPLES_PER_FRAME]; MSMessage *m;
--- a/src/mediastreamer/msilbcenc.c Wed Nov 09 09:02:43 2005 +0000 +++ b/src/mediastreamer/msilbcenc.c Wed Nov 09 09:57:33 2005 +0000 @@ -53,7 +53,6 @@ ilbc_write_16bit_samples(gint16 int16samples[], float speech[], int n) { int i; - float real_sample; /* Convert floating point samples in range [-1,+1] to 16 bit integers. */ @@ -139,6 +138,11 @@ else g_warning("Unrecognized fmtp parameter for ilbc encoder!"); #endif break; + case MS_FILTER_PROPERTY_FREQ: + case MS_FILTER_PROPERTY_BITRATE: + case MS_FILTER_PROPERTY_CHANNELS: + default: + break; } return 0; } @@ -151,13 +155,17 @@ if (obj->ms_per_frame==20) strncpy(value,"ptime=20",MS_FILTER_PROPERTY_STRING_MAX_SIZE); if (obj->ms_per_frame==30) strncpy(value,"ptime=30",MS_FILTER_PROPERTY_STRING_MAX_SIZE); break; + case MS_FILTER_PROPERTY_FREQ: + case MS_FILTER_PROPERTY_BITRATE: + case MS_FILTER_PROPERTY_CHANNELS: + default: + break; } return 0; } void ms_ilbc_encoder_setup(MSILBCEncoder *r) { - MSFilterClass *klass = NULL; switch (r->ms_per_frame) { case 20: r->samples_per_frame = BLOCKL_20MS;
--- a/src/mediastreamer/msossread.c Wed Nov 09 09:02:43 2005 +0000 +++ b/src/mediastreamer/msossread.c Wed Nov 09 09:57:33 2005 +0000 @@ -69,6 +69,11 @@ case MS_FILTER_PROPERTY_FREQ: f->freq=((gint*)value)[0]; break; + case MS_FILTER_PROPERTY_BITRATE: + case MS_FILTER_PROPERTY_CHANNELS: + case MS_FILTER_PROPERTY_FMTP: + default: + break; } return 0; }
--- a/src/mediastreamer/msosswrite.c Wed Nov 09 09:02:43 2005 +0000 +++ b/src/mediastreamer/msosswrite.c Wed Nov 09 09:57:33 2005 +0000 @@ -72,6 +72,10 @@ case MS_FILTER_PROPERTY_CHANNELS: f->channels=((gint*)value)[0]; break; + case MS_FILTER_PROPERTY_BITRATE: + case MS_FILTER_PROPERTY_FMTP: + default: + break; } return 0; } @@ -131,15 +135,17 @@ void ms_oss_write_start(MSOssWrite *w) { - gint bsize; + /* gint bsize; */ g_return_if_fail(w->devid!=-1); w->sndcard=snd_card_manager_get_card(snd_card_manager,w->devid); g_return_if_fail(w->sndcard!=NULL); /* open the device for an audio telephony signal with minimum latency */ snd_card_open_w(w->sndcard,16,w->channels==2,w->freq); w->bsize=snd_card_get_bsize(w->sndcard); - //MS_FILTER(w)->r_mingran=w->bsize; - //ms_sync_set_samples_per_tick(MS_FILTER(w)->sync,bsize); + /* + MS_FILTER(w)->r_mingran=w->bsize; + ms_sync_set_samples_per_tick(MS_FILTER(w)->sync,bsize); + */ } void ms_oss_write_stop(MSOssWrite *w)
--- a/src/mediastreamer/msread.c Wed Nov 09 09:02:43 2005 +0000 +++ b/src/mediastreamer/msread.c Wed Nov 09 09:57:33 2005 +0000 @@ -31,7 +31,6 @@ MSFilter * ms_read_new(char *name) { MSRead *r; - int fd=-1; r=g_new(MSRead,1); ms_read_init(r); @@ -92,6 +91,11 @@ case MS_FILTER_PROPERTY_FREQ: f->rate=((gint*)value)[0]; break; + case MS_FILTER_PROPERTY_BITRATE: + case MS_FILTER_PROPERTY_CHANNELS: + case MS_FILTER_PROPERTY_FMTP: + default: + break; } return 0; } @@ -172,6 +176,11 @@ obj->fd=-1; obj->state=MS_READ_STATE_STOPPED; } + + /* No idea if this is correct, but again nothing is calling it and it's not + * even declared in the header file so this should be fine. -- Gary + */ + return 0; }
--- a/src/mediastreamer/msread.h Wed Nov 09 09:02:43 2005 +0000 +++ b/src/mediastreamer/msread.h Wed Nov 09 09:57:33 2005 +0000 @@ -66,6 +66,7 @@ #define ms_read_set_bufsize(filter,sz) (filter)->gran=(sz) /* FOR INTERNAL USE*/ +gint ms_read_open(MSRead *r, gchar *name); void ms_read_init(MSRead *r); void ms_read_class_init(MSReadClass *klass); void ms_read_destroy( MSRead *obj);
--- a/src/mediastreamer/msringplayer.c Wed Nov 09 09:02:43 2005 +0000 +++ b/src/mediastreamer/msringplayer.c Wed Nov 09 09:57:33 2005 +0000 @@ -25,6 +25,7 @@ #include <sys/types.h> #include <string.h> #include <errno.h> +#include <stdlib.h> #include "waveheader.h" @@ -134,6 +135,11 @@ if (f->sync!=NULL) f->gran=(f->rate*f->sync->interval/1000)*2; break; + case MS_FILTER_PROPERTY_BITRATE: + case MS_FILTER_PROPERTY_CHANNELS: + case MS_FILTER_PROPERTY_FMTP: + default: + break; } return 0; } @@ -148,6 +154,10 @@ case MS_FILTER_PROPERTY_CHANNELS: ((gint*)value)[0]=f->channel; break; + case MS_FILTER_PROPERTY_BITRATE: + case MS_FILTER_PROPERTY_FMTP: + default: + break; } return 0; }
--- a/src/mediastreamer/msringplayer.h Wed Nov 09 09:02:43 2005 +0000 +++ b/src/mediastreamer/msringplayer.h Wed Nov 09 09:57:33 2005 +0000 @@ -73,6 +73,7 @@ /* FOR INTERNAL USE*/ void ms_ring_player_init(MSRingPlayer *r); +gint ms_ring_player_set_property(MSRingPlayer *f, MSFilterProperty prop, void *value); void ms_ring_player_class_init(MSRingPlayerClass *klass); void ms_ring_player_destroy( MSRingPlayer *obj); void ms_ring_player_process(MSRingPlayer *r);
--- a/src/mediastreamer/mssoundread.c Wed Nov 09 09:02:43 2005 +0000 +++ b/src/mediastreamer/mssoundread.c Wed Nov 09 09:57:33 2005 +0000 @@ -30,7 +30,6 @@ void ms_sound_read_class_init(MSSoundReadClass *klass) { - int i; ms_filter_class_init(MS_FILTER_CLASS(klass)); MS_FILTER_CLASS(klass)->max_foutputs=1; /* one fifo output only */
--- a/src/mediastreamer/mssoundwrite.c Wed Nov 09 09:02:43 2005 +0000 +++ b/src/mediastreamer/mssoundwrite.c Wed Nov 09 09:57:33 2005 +0000 @@ -30,7 +30,6 @@ void ms_sound_write_class_init(MSSoundWriteClass *klass) { - int i; ms_filter_class_init(MS_FILTER_CLASS(klass)); MS_FILTER_CLASS(klass)->max_finputs=1; /* one fifo output only */
--- a/src/mediastreamer/msspeexdec.c Wed Nov 09 09:02:43 2005 +0000 +++ b/src/mediastreamer/msspeexdec.c Wed Nov 09 09:57:33 2005 +0000 @@ -127,6 +127,11 @@ case MS_FILTER_PROPERTY_FREQ: obj->frequency=value[0]; break; + case MS_FILTER_PROPERTY_BITRATE: + case MS_FILTER_PROPERTY_CHANNELS: + case MS_FILTER_PROPERTY_FMTP: + default: + break; } return 0; } @@ -188,7 +193,6 @@ MSQueue *inq=obj->inq[0]; gint16 *output; gint gran=obj->frame_size*2; - gint i; MSMessage *m; g_return_if_fail(inq!=NULL);
--- a/src/mediastreamer/msspeexenc.c Wed Nov 09 09:02:43 2005 +0000 +++ b/src/mediastreamer/msspeexenc.c Wed Nov 09 09:57:33 2005 +0000 @@ -118,7 +118,6 @@ void ms_speex_enc_setup(MSSpeexEnc *obj) { const SpeexMode *mode; - int quality; g_message("Speex encoder setup: freq=%i",obj->frequency); if ( obj->frequency< 16000) mode=&speex_nb_mode; else mode=&speex_wb_mode; @@ -171,7 +170,6 @@ MSQueue *outq=obj->outq[0]; gint16 *input; gint gran=MS_FILTER(obj)->r_mingran; - gint i; MSMessage *m; g_return_if_fail(inf!=NULL);
--- a/src/mediastreamer/mssync.c Wed Nov 09 09:02:43 2005 +0000 +++ b/src/mediastreamer/mssync.c Wed Nov 09 09:57:33 2005 +0000 @@ -189,5 +189,10 @@ g_mutex_free(sync->lock); g_cond_free(sync->thread_cond); g_cond_free(sync->stop_cond); + + /* I have no idea if this is right, but nothing in media streamer is + * calling this, so it should be ok. -- Gary + */ + return 0; }
--- a/src/mediastreamer/osscard.c Wed Nov 09 09:02:43 2005 +0000 +++ b/src/mediastreamer/osscard.c Wed Nov 09 09:57:33 2005 +0000 @@ -23,6 +23,9 @@ #include "msossread.h" #include "msosswrite.h" +#include <sys/ioctl.h> +#include <unistd.h> + #ifdef HAVE_SYS_SOUNDCARD_H #include <sys/soundcard.h> @@ -227,7 +230,6 @@ void oss_card_close(OssCard *obj) { - int i; obj->ref--; if (obj->ref==0) { close(obj->fd); @@ -342,7 +344,7 @@ { int p=0,mix_fd; int osscmd; - g_return_if_fail(obj->mixdev_name!=NULL); + g_return_val_if_fail(obj->mixdev_name!=NULL, -1); #ifdef HAVE_SYS_SOUNDCARD_H switch(way){ case SND_CARD_LEVEL_GENERAL: