[svn-commits] mvanbaak: branch mvanbaak/ast_frame_dataunion r117247 - /team/mvanbaak/ast_fr...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon May 19 16:49:56 CDT 2008


Author: mvanbaak
Date: Mon May 19 16:49:56 2008
New Revision: 117247

URL: http://svn.digium.com/view/asterisk?view=rev&rev=117247
Log:
make codecs/ compile

Modified:
    team/mvanbaak/ast_frame_dataunion/codecs/codec_a_mu.c
    team/mvanbaak/ast_frame_dataunion/codecs/codec_adpcm.c
    team/mvanbaak/ast_frame_dataunion/codecs/codec_alaw.c
    team/mvanbaak/ast_frame_dataunion/codecs/codec_g722.c
    team/mvanbaak/ast_frame_dataunion/codecs/codec_g726.c
    team/mvanbaak/ast_frame_dataunion/codecs/codec_gsm.c
    team/mvanbaak/ast_frame_dataunion/codecs/codec_lpc10.c
    team/mvanbaak/ast_frame_dataunion/codecs/codec_resample.c
    team/mvanbaak/ast_frame_dataunion/codecs/codec_ulaw.c
    team/mvanbaak/ast_frame_dataunion/codecs/codec_zap.c

Modified: team/mvanbaak/ast_frame_dataunion/codecs/codec_a_mu.c
URL: http://svn.digium.com/view/asterisk/team/mvanbaak/ast_frame_dataunion/codecs/codec_a_mu.c?view=diff&rev=117247&r1=117246&r2=117247
==============================================================================
--- team/mvanbaak/ast_frame_dataunion/codecs/codec_a_mu.c (original)
+++ team/mvanbaak/ast_frame_dataunion/codecs/codec_a_mu.c Mon May 19 16:49:56 2008
@@ -46,7 +46,7 @@
 static int alawtoulaw_framein(struct ast_trans_pvt *pvt, struct ast_frame *f)
 {
 	int x = f->samples;
-	unsigned char *src = f->data;
+	unsigned char *src = f->data.ptr;
 	unsigned char *dst = (unsigned char *)pvt->outbuf + pvt->samples;
 
 	pvt->samples += x;
@@ -62,7 +62,7 @@
 static int ulawtoalaw_framein(struct ast_trans_pvt *pvt, struct ast_frame *f)
 {
 	int x = f->samples;
-	unsigned char *src = f->data;
+	unsigned char *src = f->data.ptr;
 	unsigned char *dst = (unsigned char *)pvt->outbuf + pvt->samples;
 
 	pvt->samples += x;
@@ -87,7 +87,7 @@
 	f.mallocd = 0;
 	f.offset = 0;
 	f.src = __PRETTY_FUNCTION__;
-	f.data = ulaw_slin_ex; /* XXX what ? */
+	f.data.ptr = ulaw_slin_ex; /* XXX what ? */
 	return &f;
 }
 
@@ -101,7 +101,7 @@
 	f.mallocd = 0;
 	f.offset = 0;
 	f.src = __PRETTY_FUNCTION__;
-	f.data = ulaw_slin_ex;
+	f.data.ptr = ulaw_slin_ex;
 	return &f;
 }
 

Modified: team/mvanbaak/ast_frame_dataunion/codecs/codec_adpcm.c
URL: http://svn.digium.com/view/asterisk/team/mvanbaak/ast_frame_dataunion/codecs/codec_adpcm.c?view=diff&rev=117247&r1=117246&r2=117247
==============================================================================
--- team/mvanbaak/ast_frame_dataunion/codecs/codec_adpcm.c (original)
+++ team/mvanbaak/ast_frame_dataunion/codecs/codec_adpcm.c Mon May 19 16:49:56 2008
@@ -229,7 +229,7 @@
 {
 	struct adpcm_decoder_pvt *tmp = pvt->pvt;
 	int x = f->datalen;
-	unsigned char *src = f->data;
+	unsigned char *src = f->data.ptr;
 	int16_t *dst = (int16_t *)pvt->outbuf + pvt->samples;
 
 	while (x--) {
@@ -246,7 +246,7 @@
 {
 	struct adpcm_encoder_pvt *tmp = pvt->pvt;
 
-	memcpy(&tmp->inbuf[pvt->samples], f->data, f->datalen);
+	memcpy(&tmp->inbuf[pvt->samples], f->data.ptr, f->datalen);
 	pvt->samples += f->samples;
 	return 0;
 }
@@ -296,7 +296,7 @@
 	f.mallocd = 0;
 	f.offset = 0;
 	f.src = __PRETTY_FUNCTION__;
-	f.data = adpcm_slin_ex;
+	f.data.ptr = adpcm_slin_ex;
 	return &f;
 }
 
@@ -312,7 +312,7 @@
 	f.mallocd = 0;
 	f.offset = 0;
 	f.src = __PRETTY_FUNCTION__;
-	f.data = slin_adpcm_ex;
+	f.data.ptr = slin_adpcm_ex;
 	return &f;
 }
 

Modified: team/mvanbaak/ast_frame_dataunion/codecs/codec_alaw.c
URL: http://svn.digium.com/view/asterisk/team/mvanbaak/ast_frame_dataunion/codecs/codec_alaw.c?view=diff&rev=117247&r1=117246&r2=117247
==============================================================================
--- team/mvanbaak/ast_frame_dataunion/codecs/codec_alaw.c (original)
+++ team/mvanbaak/ast_frame_dataunion/codecs/codec_alaw.c Mon May 19 16:49:56 2008
@@ -44,7 +44,7 @@
 static int alawtolin_framein(struct ast_trans_pvt *pvt, struct ast_frame *f)
 {
 	int i = f->samples;
-	unsigned char *src = f->data;
+	unsigned char *src = f->data.ptr;
 	int16_t *dst = (int16_t *)pvt->outbuf + pvt->samples;
 
 	pvt->samples += i;
@@ -61,7 +61,7 @@
 {
 	int i = f->samples;
 	char *dst = pvt->outbuf + pvt->samples;
-	int16_t *src = f->data;
+	int16_t *src = f->data.ptr;
 
 	pvt->samples += i;
 	pvt->datalen += i;	/* 1 byte/sample */
@@ -83,7 +83,7 @@
 	f.mallocd = 0;
 	f.offset = 0;
 	f.src = __PRETTY_FUNCTION__;
-	f.data = ulaw_slin_ex;
+	f.data.ptr = ulaw_slin_ex;
 	return &f;
 }
 
@@ -98,7 +98,7 @@
 	f.mallocd = 0;
 	f.offset = 0;
 	f.src = __PRETTY_FUNCTION__;
-	f.data = slin_ulaw_ex;
+	f.data.ptr = slin_ulaw_ex;
 	return &f;
 }
 

Modified: team/mvanbaak/ast_frame_dataunion/codecs/codec_g722.c
URL: http://svn.digium.com/view/asterisk/team/mvanbaak/ast_frame_dataunion/codecs/codec_g722.c?view=diff&rev=117247&r1=117246&r2=117247
==============================================================================
--- team/mvanbaak/ast_frame_dataunion/codecs/codec_g722.c (original)
+++ team/mvanbaak/ast_frame_dataunion/codecs/codec_g722.c Mon May 19 16:49:56 2008
@@ -108,7 +108,7 @@
 	in_samples = f->samples / 2;
 
 	out_samples = g722_decode(&tmp->g722, (int16_t *) &pvt->outbuf[pvt->samples * sizeof(int16_t)], 
-		(uint8_t *) f->data, in_samples);
+		(uint8_t *) f->data.ptr, in_samples);
 
 	pvt->samples += out_samples;
 
@@ -123,7 +123,7 @@
 	int outlen;
 
 	outlen = g722_encode(&tmp->g722, (uint8_t *) (&pvt->outbuf[pvt->datalen]), 
-		(int16_t *) f->data, f->samples);
+		(int16_t *) f->data.ptr, f->samples);
 
 	pvt->samples += outlen * 2;
 
@@ -141,7 +141,7 @@
 		.samples = sizeof(g722_slin_ex) * 2,
 		.src = __PRETTY_FUNCTION__,
 	};
-	f.data = g722_slin_ex;
+	f.data.ptr = g722_slin_ex;
 
 	return &f;
 }
@@ -155,7 +155,7 @@
 		.samples = sizeof(g722_slin_ex) * 2,
 		.src = __PRETTY_FUNCTION__,
 	};
-	f.data = g722_slin_ex;
+	f.data.ptr = g722_slin_ex;
 
 	return &f;
 }
@@ -169,7 +169,7 @@
 		.samples = sizeof(slin_g722_ex) / sizeof(slin_g722_ex[0]),
 		.src = __PRETTY_FUNCTION__,
 	};
-	f.data = slin_g722_ex;
+	f.data.ptr = slin_g722_ex;
 
 	return &f;
 }
@@ -183,7 +183,7 @@
 		.samples = sizeof(slin_g722_ex) / sizeof(slin_g722_ex[0]),
 		.src = __PRETTY_FUNCTION__,
 	};
-	f.data = slin_g722_ex;
+	f.data.ptr = slin_g722_ex;
 
 	return &f;
 }

Modified: team/mvanbaak/ast_frame_dataunion/codecs/codec_g726.c
URL: http://svn.digium.com/view/asterisk/team/mvanbaak/ast_frame_dataunion/codecs/codec_g726.c?view=diff&rev=117247&r1=117246&r2=117247
==============================================================================
--- team/mvanbaak/ast_frame_dataunion/codecs/codec_g726.c (original)
+++ team/mvanbaak/ast_frame_dataunion/codecs/codec_g726.c Mon May 19 16:49:56 2008
@@ -692,7 +692,7 @@
 static int g726aal2tolin_framein (struct ast_trans_pvt *pvt, struct ast_frame *f)
 {
 	struct g726_coder_pvt *tmp = pvt->pvt;
-	unsigned char *src = f->data;
+	unsigned char *src = f->data.ptr;
 	int16_t *dst = (int16_t *) pvt->outbuf + pvt->samples;
 	unsigned int i;
 
@@ -711,7 +711,7 @@
 static int lintog726aal2_framein(struct ast_trans_pvt *pvt, struct ast_frame *f)
 {
 	struct g726_coder_pvt *tmp = pvt->pvt;
-	int16_t *src = f->data;
+	int16_t *src = f->data.ptr;
 	unsigned int i;
 
 	for (i = 0; i < f->samples; i++) {
@@ -733,7 +733,7 @@
 static int g726tolin_framein (struct ast_trans_pvt *pvt, struct ast_frame *f)
 {
 	struct g726_coder_pvt *tmp = pvt->pvt;
-	unsigned char *src = f->data;
+	unsigned char *src = f->data.ptr;
 	int16_t *dst = (int16_t *) pvt->outbuf + pvt->samples;
 	unsigned int i;
 
@@ -752,7 +752,7 @@
 static int lintog726_framein(struct ast_trans_pvt *pvt, struct ast_frame *f)
 {
 	struct g726_coder_pvt *tmp = pvt->pvt;
-	int16_t *src = f->data;
+	int16_t *src = f->data.ptr;
 	unsigned int i;
 
 	for (i = 0; i < f->samples; i++) {
@@ -773,7 +773,7 @@
 /*! \brief convert G726-32 RFC3551 packed data into AAL2 packed data (or vice-versa) */
 static int g726tog726aal2_framein(struct ast_trans_pvt *pvt, struct ast_frame *f)
 {
-	unsigned char *src = f->data;
+	unsigned char *src = f->data.ptr;
 	unsigned char *dst = (unsigned char *) pvt->outbuf + pvt->samples;
 	unsigned int i;
 
@@ -795,7 +795,7 @@
 		.samples = sizeof(g726_slin_ex) * 2,	/* 2 samples per byte */
 		.src = __PRETTY_FUNCTION__,
 	};
-	f.data = g726_slin_ex;
+	f.data.ptr = g726_slin_ex;
 
 	return &f;
 }
@@ -809,7 +809,7 @@
 		.samples = sizeof(slin_g726_ex) / 2,	/* 1 sample per 2 bytes */
 		.src = __PRETTY_FUNCTION__,
 	};
-	f.data = slin_g726_ex;
+	f.data.ptr = slin_g726_ex;
 
 	return &f;
 }

Modified: team/mvanbaak/ast_frame_dataunion/codecs/codec_gsm.c
URL: http://svn.digium.com/view/asterisk/team/mvanbaak/ast_frame_dataunion/codecs/codec_gsm.c?view=diff&rev=117247&r1=117246&r2=117247
==============================================================================
--- team/mvanbaak/ast_frame_dataunion/codecs/codec_gsm.c (original)
+++ team/mvanbaak/ast_frame_dataunion/codecs/codec_gsm.c Mon May 19 16:49:56 2008
@@ -79,7 +79,7 @@
 	f.mallocd = 0;
 	f.offset = 0;
 	f.src = __PRETTY_FUNCTION__;
-	f.data = slin_gsm_ex;
+	f.data.ptr = slin_gsm_ex;
 	return &f;
 }
 
@@ -94,7 +94,7 @@
 	f.mallocd = 0;
 	f.offset = 0;
 	f.src = __PRETTY_FUNCTION__;
-	f.data = gsm_slin_ex;
+	f.data.ptr = gsm_slin_ex;
 	return &f;
 }
 
@@ -119,10 +119,10 @@
 			/* XXX what's the point here! we should just work
 			 * on the full format.
 			 */
-			conv65(f->data + x, data);
+			conv65(f->data.ptr + x, data);
 		} else {
 			len = GSM_SAMPLES;
-			src = f->data + x;
+			src = f->data.ptr + x;
 		}
 		/* XXX maybe we don't need to check */
 		if (pvt->samples + len > BUFFER_SAMPLES) {	
@@ -159,7 +159,7 @@
 		ast_log(LOG_WARNING, "Out of buffer space\n");
 		return -1;
 	}
-	memcpy(tmp->buf + pvt->samples, f->data, f->datalen);
+	memcpy(tmp->buf + pvt->samples, f->data.ptr, f->datalen);
 	pvt->samples += f->samples;
 	return 0;
 }

Modified: team/mvanbaak/ast_frame_dataunion/codecs/codec_lpc10.c
URL: http://svn.digium.com/view/asterisk/team/mvanbaak/ast_frame_dataunion/codecs/codec_lpc10.c?view=diff&rev=117247&r1=117246&r2=117247
==============================================================================
--- team/mvanbaak/ast_frame_dataunion/codecs/codec_lpc10.c (original)
+++ team/mvanbaak/ast_frame_dataunion/codecs/codec_lpc10.c Mon May 19 16:49:56 2008
@@ -86,7 +86,7 @@
 	f.mallocd = 0;
 	f.offset = 0;
 	f.src = __PRETTY_FUNCTION__;
-	f.data = slin_lpc10_ex;
+	f.data.ptr = slin_lpc10_ex;
 	return &f;
 }
 
@@ -102,7 +102,7 @@
 	f.mallocd = 0;
 	f.offset = 0;
 	f.src = __PRETTY_FUNCTION__;
-	f.data = lpc10_slin_ex;
+	f.data.ptr = lpc10_slin_ex;
 	return &f;
 }
 
@@ -151,7 +151,7 @@
 			ast_log(LOG_WARNING, "Out of buffer space\n");
 			return -1;
 		}
-		extract_bits(bits, f->data + len);
+		extract_bits(bits, f->data.ptr + len);
 		if (lpc10_decode(bits, tmpbuf, tmp->lpc10.dec)) {
 			ast_log(LOG_WARNING, "Invalid lpc10 data\n");
 			return -1;
@@ -179,7 +179,7 @@
 		ast_log(LOG_WARNING, "Out of buffer space\n");
 		return -1;
 	}
-	memcpy(tmp->buf + pvt->samples, f->data, f->datalen);
+	memcpy(tmp->buf + pvt->samples, f->data.ptr, f->datalen);
 	pvt->samples += f->samples;
 	return 0;
 }

Modified: team/mvanbaak/ast_frame_dataunion/codecs/codec_resample.c
URL: http://svn.digium.com/view/asterisk/team/mvanbaak/ast_frame_dataunion/codecs/codec_resample.c?view=diff&rev=117247&r1=117246&r2=117247
==============================================================================
--- team/mvanbaak/ast_frame_dataunion/codecs/codec_resample.c (original)
+++ team/mvanbaak/ast_frame_dataunion/codecs/codec_resample.c Mon May 19 16:49:56 2008
@@ -102,7 +102,7 @@
 {
 	int total_in_buf_used = 0;
 	int total_out_buf_used = 0;
-	int16_t *in_buf = (int16_t *) f->data;
+	int16_t *in_buf = (int16_t *) f->data.ptr;
 	int16_t *out_buf = (int16_t *) pvt->outbuf + pvt->samples;
 	float in_buf_f[f->samples];
 	float out_buf_f[2048];
@@ -169,7 +169,7 @@
 		.samples = sizeof(slin16_slin8_ex) / sizeof(slin16_slin8_ex[0]),
 		.src = __PRETTY_FUNCTION__,
 	};
-	f.data = slin16_slin8_ex;
+	f.data.ptr = slin16_slin8_ex;
 
 	return &f;
 }
@@ -183,7 +183,7 @@
 		.samples = sizeof(slin8_slin16_ex) / sizeof(slin8_slin16_ex[0]),
 		.src = __PRETTY_FUNCTION__,
 	};
-	f.data = slin8_slin16_ex;
+	f.data.ptr = slin8_slin16_ex;
 
 	return &f;
 }

Modified: team/mvanbaak/ast_frame_dataunion/codecs/codec_ulaw.c
URL: http://svn.digium.com/view/asterisk/team/mvanbaak/ast_frame_dataunion/codecs/codec_ulaw.c?view=diff&rev=117247&r1=117246&r2=117247
==============================================================================
--- team/mvanbaak/ast_frame_dataunion/codecs/codec_ulaw.c (original)
+++ team/mvanbaak/ast_frame_dataunion/codecs/codec_ulaw.c Mon May 19 16:49:56 2008
@@ -44,7 +44,7 @@
 static int ulawtolin_framein(struct ast_trans_pvt *pvt, struct ast_frame *f)
 {
 	int i = f->samples;
-	unsigned char *src = f->data;
+	unsigned char *src = f->data.ptr;
 	int16_t *dst = (int16_t *)pvt->outbuf + pvt->samples;
 
 	pvt->samples += i;
@@ -62,7 +62,7 @@
 {
 	int i = f->samples;
 	char *dst = pvt->outbuf + pvt->samples;
-	int16_t *src = f->data;
+	int16_t *src = f->data.ptr;
 
 	pvt->samples += i;
 	pvt->datalen += i;	/* 1 byte/sample */
@@ -84,7 +84,7 @@
 	f.mallocd = 0;
 	f.offset = 0;
 	f.src = __PRETTY_FUNCTION__;
-	f.data = ulaw_slin_ex;
+	f.data.ptr = ulaw_slin_ex;
 	return &f;
 }
 
@@ -103,7 +103,7 @@
 	f.mallocd = 0;
 	f.offset = 0;
 	f.src = __PRETTY_FUNCTION__;
-	f.data = slin_ulaw_ex;
+	f.data.ptr = slin_ulaw_ex;
 	return &f;
 }
 

Modified: team/mvanbaak/ast_frame_dataunion/codecs/codec_zap.c
URL: http://svn.digium.com/view/asterisk/team/mvanbaak/ast_frame_dataunion/codecs/codec_zap.c?view=diff&rev=117247&r1=117246&r2=117247
==============================================================================
--- team/mvanbaak/ast_frame_dataunion/codecs/codec_zap.c (original)
+++ team/mvanbaak/ast_frame_dataunion/codecs/codec_zap.c Mon May 19 16:49:56 2008
@@ -144,7 +144,7 @@
 		hdr->srcoffset = 0;
 	}
 
-	memcpy(hdr->srcdata + hdr->srcoffset + hdr->srclen, f->data, f->datalen);
+	memcpy(hdr->srcdata + hdr->srcoffset + hdr->srclen, f->data.ptr, f->datalen);
 	hdr->srclen += f->datalen;
 	pvt->samples += f->samples;
 
@@ -162,7 +162,7 @@
 		pvt->f.frametype = AST_FRAME_VOICE;
 		pvt->f.subclass = 0;
 		pvt->f.samples = 160;
-		pvt->f.data = NULL;
+		pvt->f.data.ptr = NULL;
 		pvt->f.offset = 0;
 		pvt->f.datalen = 0;
 		pvt->f.mallocd = 0;
@@ -182,7 +182,7 @@
 			pvt->f.frametype = AST_FRAME_VOICE;
 			pvt->f.subclass = hdr->dstfmt;
 			pvt->f.samples = hdr->dstsamples;
-			pvt->f.data = hdr->dstdata + hdr->dstoffset;
+			pvt->f.data.ptr = hdr->dstdata + hdr->dstoffset;
 			pvt->f.offset = hdr->dstoffset;
 			pvt->f.datalen = hdr->dstlen;
 			pvt->f.mallocd = 0;




More information about the svn-commits mailing list