[asterisk-commits] mvanbaak: branch mvanbaak/ast_frame_dataunion r117253 - /team/mvanbaak/ast_fr...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon May 19 17:44:50 CDT 2008
Author: mvanbaak
Date: Mon May 19 17:44:50 2008
New Revision: 117253
URL: http://svn.digium.com/view/asterisk?view=rev&rev=117253
Log:
last batch of conversions
Modified:
team/mvanbaak/ast_frame_dataunion/main/abstract_jb.c
team/mvanbaak/ast_frame_dataunion/main/app.c
team/mvanbaak/ast_frame_dataunion/main/audiohook.c
team/mvanbaak/ast_frame_dataunion/main/channel.c
team/mvanbaak/ast_frame_dataunion/main/dsp.c
team/mvanbaak/ast_frame_dataunion/main/features.c
team/mvanbaak/ast_frame_dataunion/main/file.c
team/mvanbaak/ast_frame_dataunion/main/frame.c
team/mvanbaak/ast_frame_dataunion/main/indications.c
team/mvanbaak/ast_frame_dataunion/main/rtp.c
team/mvanbaak/ast_frame_dataunion/main/slinfactory.c
team/mvanbaak/ast_frame_dataunion/main/translate.c
team/mvanbaak/ast_frame_dataunion/main/udptl.c
Modified: team/mvanbaak/ast_frame_dataunion/main/abstract_jb.c
URL: http://svn.digium.com/view/asterisk/team/mvanbaak/ast_frame_dataunion/main/abstract_jb.c?view=diff&rev=117253&r1=117252&r2=117253
==============================================================================
--- team/mvanbaak/ast_frame_dataunion/main/abstract_jb.c (original)
+++ team/mvanbaak/ast_frame_dataunion/main/abstract_jb.c Mon May 19 17:44:50 2008
@@ -415,7 +415,7 @@
f->samples = interpolation_len * 8;
f->mallocd = 0;
f->src = "JB interpolation";
- f->data = NULL;
+ f->data.ptr = NULL;
f->delivery = ast_tvadd(jb->timebase, ast_samp2tv(jb->next, 1000));
f->offset = AST_FRIENDLY_OFFSET;
/* deliver the interpolated frame */
Modified: team/mvanbaak/ast_frame_dataunion/main/app.c
URL: http://svn.digium.com/view/asterisk/team/mvanbaak/ast_frame_dataunion/main/app.c?view=diff&rev=117253&r1=117252&r2=117253
==============================================================================
--- team/mvanbaak/ast_frame_dataunion/main/app.c (original)
+++ team/mvanbaak/ast_frame_dataunion/main/app.c Mon May 19 17:44:50 2008
@@ -340,7 +340,7 @@
.offset = AST_FRIENDLY_OFFSET,
};
int res;
- f.data = buf + AST_FRIENDLY_OFFSET / 2;
+ f.data.ptr = buf + AST_FRIENDLY_OFFSET / 2;
len = samples * 2;
if (len > sizeof(buf) - AST_FRIENDLY_OFFSET) {
Modified: team/mvanbaak/ast_frame_dataunion/main/audiohook.c
URL: http://svn.digium.com/view/asterisk/team/mvanbaak/ast_frame_dataunion/main/audiohook.c?view=diff&rev=117253&r1=117252&r2=117253
==============================================================================
--- team/mvanbaak/ast_frame_dataunion/main/audiohook.c (original)
+++ team/mvanbaak/ast_frame_dataunion/main/audiohook.c Mon May 19 17:44:50 2008
@@ -161,7 +161,7 @@
.datalen = sizeof(buf),
.samples = samples,
};
- frame.data = buf;
+ frame.data.ptr = buf;
/* Ensure the factory is able to give us the samples we want */
if (samples > ast_slinfactory_available(factory))
@@ -188,7 +188,7 @@
.datalen = sizeof(buf1),
.samples = samples,
};
- frame.data = NULL;
+ frame.data.ptr = NULL;
/* Make sure both factories have the required samples */
usable_read = (ast_slinfactory_available(&audiohook->read_factory) >= samples ? 1 : 0);
@@ -263,7 +263,7 @@
final_buf = buf2;
/* Make the final buffer part of the frame, so it gets duplicated fine */
- frame.data = final_buf;
+ frame.data.ptr = final_buf;
/* Yahoo, a combined copy of the audio! */
return ast_frdup(&frame);
@@ -586,7 +586,7 @@
}
AST_LIST_TRAVERSE_SAFE_END
/* We take all of the combined whisper sources and combine them into the audio being written out */
- for (i = 0, data1 = middle_frame->data, data2 = combine_buf; i < samples; i++, data1++, data2++)
+ for (i = 0, data1 = middle_frame->data.ptr, data2 = combine_buf; i < samples; i++, data1++, data2++)
ast_slinear_saturated_add(data1, data2);
end_frame = middle_frame;
}
Modified: team/mvanbaak/ast_frame_dataunion/main/channel.c
URL: http://svn.digium.com/view/asterisk/team/mvanbaak/ast_frame_dataunion/main/channel.c?view=diff&rev=117253&r1=117252&r2=117253
==============================================================================
--- team/mvanbaak/ast_frame_dataunion/main/channel.c (original)
+++ team/mvanbaak/ast_frame_dataunion/main/channel.c Mon May 19 17:44:50 2008
@@ -1055,7 +1055,7 @@
struct ast_frame f = { AST_FRAME_CONTROL, };
f.subclass = control;
- f.data = (void *) data;
+ f.data.ptr = (void *) data;
f.datalen = datalen;
return ast_queue_frame(chan, &f);
@@ -2247,7 +2247,7 @@
case AST_FRAME_VOICE:
/* Write audio if appropriate */
if (audiofd > -1)
- write(audiofd, f->data, f->datalen);
+ write(audiofd, f->data.ptr, f->datalen);
default:
/* Ignore */
break;
@@ -2847,7 +2847,7 @@
if (f->frametype == AST_FRAME_CONTROL && f->subclass == AST_CONTROL_HANGUP)
done = 1; /* force a break */
else if (f->frametype == AST_FRAME_TEXT) { /* what we want */
- buf = ast_strndup((char *) f->data, f->datalen); /* dup and break */
+ buf = ast_strndup((char *) f->data.ptr, f->datalen); /* dup and break */
done = 1;
}
ast_frfree(f);
@@ -2945,7 +2945,7 @@
if (chan->_state != AST_STATE_UP) {
ast_debug(1, "Prodding channel '%s'\n", chan->name);
a.subclass = chan->rawwriteformat;
- a.data = nothing + AST_FRIENDLY_OFFSET;
+ a.data.ptr = nothing + AST_FRIENDLY_OFFSET;
a.src = "ast_prod";
if (ast_write(chan, &a))
ast_log(LOG_WARNING, "Prodding channel '%s' failed\n", chan->name);
@@ -3008,7 +3008,7 @@
} else if (fr->frametype == AST_FRAME_CONTROL && fr->subclass == AST_CONTROL_UNHOLD) {
/* This is a side case where Echo is basically being called and the person put themselves on hold and took themselves off hold */
res = (chan->tech->indicate == NULL) ? 0 :
- chan->tech->indicate(chan, fr->subclass, fr->data, fr->datalen);
+ chan->tech->indicate(chan, fr->subclass, fr->data.ptr, fr->datalen);
}
res = 0; /* XXX explain, why 0 ? */
goto done;
@@ -3021,7 +3021,7 @@
switch (fr->frametype) {
case AST_FRAME_CONTROL:
res = (chan->tech->indicate == NULL) ? 0 :
- chan->tech->indicate(chan, fr->subclass, fr->data, fr->datalen);
+ chan->tech->indicate(chan, fr->subclass, fr->data.ptr, fr->datalen);
break;
case AST_FRAME_DTMF_BEGIN:
if (chan->audiohooks) {
@@ -3057,12 +3057,12 @@
chan->tech->write_text(chan, fr);
} else {
res = (chan->tech->send_text == NULL) ? 0 :
- chan->tech->send_text(chan, (char *) fr->data);
+ chan->tech->send_text(chan, (char *) fr->data.ptr);
}
break;
case AST_FRAME_HTML:
res = (chan->tech->send_html == NULL) ? 0 :
- chan->tech->send_html(chan, fr->subclass, (char *) fr->data, fr->datalen);
+ chan->tech->send_html(chan, fr->subclass, (char *) fr->data.ptr, fr->datalen);
break;
case AST_FRAME_VIDEO:
/* XXX Handle translation of video codecs one day XXX */
@@ -4224,7 +4224,7 @@
case AST_CONTROL_UNHOLD:
case AST_CONTROL_VIDUPDATE:
case AST_CONTROL_SRCUPDATE:
- ast_indicate_data(other, f->subclass, f->data, f->datalen);
+ ast_indicate_data(other, f->subclass, f->data.ptr, f->datalen);
break;
default:
*fo = f;
@@ -4701,7 +4701,7 @@
ts->f.datalen = len;
ts->f.samples = samples;
ts->f.offset = AST_FRIENDLY_OFFSET;
- ts->f.data = ts->data;
+ ts->f.data.ptr = ts->data;
ast_write(chan, &ts->f);
ts->pos += x;
if (ts->duration > 0) {
@@ -4888,7 +4888,7 @@
.samples = samples,
.datalen = sizeof(buf),
};
- frame.data = buf;
+ frame.data.ptr = buf;
memset(buf, 0, sizeof(buf));
Modified: team/mvanbaak/ast_frame_dataunion/main/dsp.c
URL: http://svn.digium.com/view/asterisk/team/mvanbaak/ast_frame_dataunion/main/dsp.c?view=diff&rev=117253&r1=117252&r2=117253
==============================================================================
--- team/mvanbaak/ast_frame_dataunion/main/dsp.c (original)
+++ team/mvanbaak/ast_frame_dataunion/main/dsp.c Mon May 19 17:44:50 2008
@@ -1075,7 +1075,7 @@
ast_log(LOG_WARNING, "Can only check call progress in signed-linear frames\n");
return 0;
}
- return __ast_dsp_call_progress(dsp, inf->data, inf->datalen / 2);
+ return __ast_dsp_call_progress(dsp, inf->data.ptr, inf->datalen / 2);
}
static int __ast_dsp_silence_noise(struct ast_dsp *dsp, short *s, int len, int *totalsilence, int *totalnoise)
@@ -1236,7 +1236,7 @@
ast_log(LOG_WARNING, "Can only calculate silence on signed-linear frames :(\n");
return 0;
}
- s = f->data;
+ s = f->data.ptr;
len = f->datalen/2;
return __ast_dsp_silence_noise(dsp, s, len, totalsilence, NULL);
}
@@ -1254,7 +1254,7 @@
ast_log(LOG_WARNING, "Can only calculate noise on signed-linear frames :(\n");
return 0;
}
- s = f->data;
+ s = f->data.ptr;
len = f->datalen/2;
return __ast_dsp_silence_noise(dsp, s, len, NULL, totalnoise);
}
@@ -1276,12 +1276,12 @@
if (af->frametype != AST_FRAME_VOICE)
return af;
- odata = af->data;
+ odata = af->data.ptr;
len = af->datalen;
/* Make sure we have short data */
switch (af->subclass) {
case AST_FORMAT_SLINEAR:
- shortdata = af->data;
+ shortdata = af->data.ptr;
len = af->datalen / 2;
break;
case AST_FORMAT_ULAW:
Modified: team/mvanbaak/ast_frame_dataunion/main/features.c
URL: http://svn.digium.com/view/asterisk/team/mvanbaak/ast_frame_dataunion/main/features.c?view=diff&rev=117253&r1=117252&r2=117253
==============================================================================
--- team/mvanbaak/ast_frame_dataunion/main/features.c (original)
+++ team/mvanbaak/ast_frame_dataunion/main/features.c Mon May 19 17:44:50 2008
@@ -2202,10 +2202,10 @@
break;
case AST_CONTROL_HOLD:
case AST_CONTROL_UNHOLD:
- ast_indicate_data(other, f->subclass, f->data, f->datalen);
+ ast_indicate_data(other, f->subclass, f->data.ptr, f->datalen);
break;
case AST_CONTROL_OPTION:
- aoh = f->data;
+ aoh = f->data.ptr;
/* Forward option Requests */
if (aoh && aoh->flag == AST_OPTION_FLAG_REQUEST) {
ast_channel_setoption(other, ntohs(aoh->option), aoh->data,
Modified: team/mvanbaak/ast_frame_dataunion/main/file.c
URL: http://svn.digium.com/view/asterisk/team/mvanbaak/ast_frame_dataunion/main/file.c?view=diff&rev=117253&r1=117252&r2=117253
==============================================================================
--- team/mvanbaak/ast_frame_dataunion/main/file.c (original)
+++ team/mvanbaak/ast_frame_dataunion/main/file.c Mon May 19 17:44:50 2008
@@ -1193,7 +1193,7 @@
case AST_FRAME_VOICE:
/* Write audio if appropriate */
if (audiofd > -1)
- write(audiofd, fr->data, fr->datalen);
+ write(audiofd, fr->data.ptr, fr->datalen);
default:
/* Ignore all others */
break;
Modified: team/mvanbaak/ast_frame_dataunion/main/frame.c
URL: http://svn.digium.com/view/asterisk/team/mvanbaak/ast_frame_dataunion/main/frame.c?view=diff&rev=117253&r1=117252&r2=117253
==============================================================================
--- team/mvanbaak/ast_frame_dataunion/main/frame.c (original)
+++ team/mvanbaak/ast_frame_dataunion/main/frame.c Mon May 19 17:44:50 2008
@@ -180,7 +180,7 @@
on the next read, thus eliminating the douple
copy */
if (swap)
- ast_swapcopy_samples(f->data, f->data, f->samples);
+ ast_swapcopy_samples(f->data.ptr, f->data.ptr, f->samples);
s->opt = f;
return 0;
}
@@ -192,9 +192,9 @@
}
}
if (swap)
- ast_swapcopy_samples(s->data+s->len, f->data, f->samples);
+ ast_swapcopy_samples(s->data+s->len, f->data.ptr, f->samples);
else
- memcpy(s->data + s->len, f->data, f->datalen);
+ memcpy(s->data + s->len, f->data.ptr, f->datalen);
/* If either side is empty, reset the delivery time */
if (!s->len || ast_tvzero(f->delivery) || ast_tvzero(s->delivery)) /* XXX really ? */
s->delivery = f->delivery;
@@ -229,14 +229,14 @@
/* Make frame */
s->f.frametype = AST_FRAME_VOICE;
s->f.subclass = s->format;
- s->f.data = s->framedata + AST_FRIENDLY_OFFSET;
+ s->f.data.ptr = s->framedata + AST_FRIENDLY_OFFSET;
s->f.offset = AST_FRIENDLY_OFFSET;
s->f.datalen = len;
/* Samples will be improper given VAD, but with VAD the concept really doesn't even exist */
s->f.samples = len * s->samplesperbyte; /* XXX rounding */
s->f.delivery = s->delivery;
/* Fill Data */
- memcpy(s->f.data, s->data, len);
+ memcpy(s->f.data.ptr, s->data, len);
s->len -= len;
/* Move remaining data to the front if applicable */
if (s->len) {
@@ -331,8 +331,8 @@
#endif
if (fr->mallocd & AST_MALLOCD_DATA) {
- if (fr->data)
- ast_free(fr->data - fr->offset);
+ if (fr->data.ptr)
+ ast_free(fr->data.ptr - fr->offset);
}
if (fr->mallocd & AST_MALLOCD_SRC) {
if (fr->src)
@@ -404,8 +404,8 @@
newdata += AST_FRIENDLY_OFFSET;
out->offset = AST_FRIENDLY_OFFSET;
out->datalen = fr->datalen;
- memcpy(newdata, fr->data, fr->datalen);
- out->data = newdata;
+ memcpy(newdata, fr->data.ptr, fr->datalen);
+ out->data.ptr = newdata;
}
out->mallocd = AST_MALLOCD_HDR | AST_MALLOCD_SRC | AST_MALLOCD_DATA;
@@ -470,8 +470,8 @@
out->mallocd = AST_MALLOCD_HDR;
out->offset = AST_FRIENDLY_OFFSET;
if (out->datalen) {
- out->data = buf + sizeof(*out) + AST_FRIENDLY_OFFSET;
- memcpy(out->data, f->data, out->datalen);
+ out->data.ptr = buf + sizeof(*out) + AST_FRIENDLY_OFFSET;
+ memcpy(out->data.ptr, f->data.ptr, out->datalen);
}
if (srclen > 0) {
out->src = buf + sizeof(*out) + AST_FRIENDLY_OFFSET + f->datalen;
@@ -780,7 +780,7 @@
if (f->datalen != sizeof(enum ast_control_t38)) {
message = "Invalid";
} else {
- enum ast_control_t38 state = *((enum ast_control_t38 *) f->data);
+ enum ast_control_t38 state = *((enum ast_control_t38 *) f->data.ptr);
if (state == AST_T38_REQUEST_NEGOTIATE)
message = "Negotiation Requested";
else if (state == AST_T38_REQUEST_TERMINATE)
@@ -813,7 +813,7 @@
case AST_FRAME_TEXT:
strcpy(ftype, "Text");
strcpy(subclass, "N/A");
- ast_copy_string(moreinfo, f->data, sizeof(moreinfo));
+ ast_copy_string(moreinfo, f->data.ptr, sizeof(moreinfo));
break;
case AST_FRAME_IMAGE:
strcpy(ftype, "Image");
@@ -824,7 +824,7 @@
switch(f->subclass) {
case AST_HTML_URL:
strcpy(subclass, "URL");
- ast_copy_string(moreinfo, f->data, sizeof(moreinfo));
+ ast_copy_string(moreinfo, f->data.ptr, sizeof(moreinfo));
break;
case AST_HTML_DATA:
strcpy(subclass, "Data");
@@ -843,7 +843,7 @@
break;
case AST_HTML_LINKURL:
strcpy(subclass, "Link URL");
- ast_copy_string(moreinfo, f->data, sizeof(moreinfo));
+ ast_copy_string(moreinfo, f->data.ptr, sizeof(moreinfo));
break;
case AST_HTML_UNLINK:
strcpy(subclass, "Unlink");
@@ -1403,10 +1403,10 @@
int samples=0;
switch(f->subclass) {
case AST_FORMAT_SPEEX:
- samples = speex_samples(f->data, f->datalen);
+ samples = speex_samples(f->data.ptr, f->datalen);
break;
case AST_FORMAT_G723_1:
- samples = g723_samples(f->data, f->datalen);
+ samples = g723_samples(f->data.ptr, f->datalen);
break;
case AST_FORMAT_ILBC:
samples = 240 * (f->datalen / 50);
@@ -1424,7 +1424,7 @@
case AST_FORMAT_LPC10:
/* assumes that the RTP packet contains one LPC10 frame */
samples = 22 * 8;
- samples += (((char *)(f->data))[7] & 0x1) * 8;
+ samples += (((char *)(f->data.ptr))[7] & 0x1) * 8;
break;
case AST_FORMAT_ULAW:
case AST_FORMAT_ALAW:
@@ -1484,7 +1484,7 @@
int ast_frame_adjust_volume(struct ast_frame *f, int adjustment)
{
int count;
- short *fdata = f->data;
+ short *fdata = f->data.ptr;
short adjust_value = abs(adjustment);
if ((f->frametype != AST_FRAME_VOICE) || (f->subclass != AST_FORMAT_SLINEAR))
@@ -1518,7 +1518,7 @@
if (f1->samples != f2->samples)
return -1;
- for (count = 0, data1 = f1->data, data2 = f2->data;
+ for (count = 0, data1 = f1->data.ptr, data2 = f2->data.ptr;
count < f1->samples;
count++, data1++, data2++)
ast_slinear_saturated_add(data1, data2);
Modified: team/mvanbaak/ast_frame_dataunion/main/indications.c
URL: http://svn.digium.com/view/asterisk/team/mvanbaak/ast_frame_dataunion/main/indications.c?view=diff&rev=117253&r1=117252&r2=117253
==============================================================================
--- team/mvanbaak/ast_frame_dataunion/main/indications.c (original)
+++ team/mvanbaak/ast_frame_dataunion/main/indications.c Mon May 19 17:44:50 2008
@@ -188,7 +188,7 @@
ps->f.datalen = len;
ps->f.samples = samples;
ps->f.offset = AST_FRIENDLY_OFFSET;
- ps->f.data = ps->data;
+ ps->f.data.ptr = ps->data;
ps->f.delivery.tv_sec = 0;
ps->f.delivery.tv_usec = 0;
ast_write(chan, &ps->f);
Modified: team/mvanbaak/ast_frame_dataunion/main/rtp.c
URL: http://svn.digium.com/view/asterisk/team/mvanbaak/ast_frame_dataunion/main/rtp.c?view=diff&rev=117253&r1=117252&r2=117253
==============================================================================
--- team/mvanbaak/ast_frame_dataunion/main/rtp.c (original)
+++ team/mvanbaak/ast_frame_dataunion/main/rtp.c Mon May 19 17:44:50 2008
@@ -1035,12 +1035,12 @@
if (!len)
return NULL;
if (len < 24) {
- rtp->f.data = rtp->rawdata + AST_FRIENDLY_OFFSET;
+ rtp->f.data.ptr = rtp->rawdata + AST_FRIENDLY_OFFSET;
rtp->f.datalen = len - 1;
rtp->f.offset = AST_FRIENDLY_OFFSET;
- memcpy(rtp->f.data, data + 1, len - 1);
+ memcpy(rtp->f.data.ptr, data + 1, len - 1);
} else {
- rtp->f.data = NULL;
+ rtp->f.data.ptr = NULL;
rtp->f.offset = 0;
rtp->f.datalen = 0;
}
@@ -1621,14 +1621,14 @@
rtp->f.mallocd = 0;
rtp->f.datalen = res - hdrlen;
- rtp->f.data = rtp->rawdata + hdrlen + AST_FRIENDLY_OFFSET;
+ rtp->f.data.ptr = rtp->rawdata + hdrlen + AST_FRIENDLY_OFFSET;
rtp->f.offset = hdrlen + AST_FRIENDLY_OFFSET;
rtp->f.seqno = seqno;
if (rtp->f.subclass == AST_FORMAT_T140 && (int)seqno - (prev_seqno+1) > 0 && (int)seqno - (prev_seqno+1) < 10) {
- unsigned char *data = rtp->f.data;
+ unsigned char *data = rtp->f.data.ptr;
- memmove(rtp->f.data+3, rtp->f.data, rtp->f.datalen);
+ memmove(rtp->f.data.ptr+3, rtp->f.data.ptr, rtp->f.datalen);
rtp->f.datalen +=3;
*data++ = 0xEF;
*data++ = 0xBF;
@@ -1636,7 +1636,7 @@
}
if (rtp->f.subclass == AST_FORMAT_T140RED) {
- unsigned char *data = rtp->f.data;
+ unsigned char *data = rtp->f.data.ptr;
unsigned char *header_end;
int num_generations;
int header_length;
@@ -1659,14 +1659,14 @@
if (!(rtp->f.datalen - len))
return &ast_null_frame;
- rtp->f.data += len;
+ rtp->f.data.ptr += len;
rtp->f.datalen -= len;
} else if (diff > num_generations && diff < 10) {
len -= 3;
- rtp->f.data += len;
+ rtp->f.data.ptr += len;
rtp->f.datalen -= len;
- data = rtp->f.data;
+ data = rtp->f.data.ptr;
*data++ = 0xEF;
*data++ = 0xBF;
*data = 0xBD;
@@ -1674,7 +1674,7 @@
for ( x = 0; x < num_generations - diff; x++)
len += data[x * 4 + 3];
- rtp->f.data += len;
+ rtp->f.data.ptr += len;
rtp->f.datalen -= len;
}
}
@@ -3147,7 +3147,7 @@
rtp->lastts = f->ts * 8;
/* Get a pointer to the header */
- rtpheader = (unsigned char *)(f->data - hdrlen);
+ rtpheader = (unsigned char *)(f->data.ptr - hdrlen);
put_unaligned_uint32(rtpheader, htonl((2 << 30) | (codec << 16) | (rtp->seqno) | (mark << 23)));
put_unaligned_uint32(rtpheader + 4, htonl(rtp->lastts));
@@ -3278,7 +3278,7 @@
ast_smoother_feed(rtp->smoother, _f);
}
- while ((f = ast_smoother_read(rtp->smoother)) && (f->data)) {
+ while ((f = ast_smoother_read(rtp->smoother)) && (f->data.ptr)) {
if (f->subclass == AST_FORMAT_G722) {
/* G.722 is silllllllllllllly */
f->samples /= 2;
@@ -3292,7 +3292,7 @@
f = ast_frdup(_f); /*! \bug XXX this might never be free'd. Why do we do this? */
else
f = _f;
- if (f->data)
+ if (f->data.ptr)
ast_rtp_raw_write(rtp, f, codec);
if (f != _f)
ast_frfree(f);
@@ -3499,7 +3499,7 @@
oldcodec0 = codec0 = pr0->get_codec(c0);
if (pr1->get_codec && c1->tech_pvt)
oldcodec1 = codec1 = pr1->get_codec(c1);
- ast_indicate_data(other, fr->subclass, fr->data, fr->datalen);
+ ast_indicate_data(other, fr->subclass, fr->data.ptr, fr->datalen);
ast_frfree(fr);
} else {
*fo = fr;
@@ -3733,7 +3733,7 @@
p0_callback = p2p_callback_enable(c0, p0, &p0_iod[0]);
p1_callback = p2p_callback_enable(c1, p1, &p1_iod[0]);
}
- ast_indicate_data(other, fr->subclass, fr->data, fr->datalen);
+ ast_indicate_data(other, fr->subclass, fr->data.ptr, fr->datalen);
ast_frfree(fr);
} else {
*fo = fr;
@@ -4372,7 +4372,7 @@
* \param red redundant data structure
*/
static struct ast_frame *red_t140_to_red(struct rtp_red *red) {
- unsigned char *data = red->t140red.data;
+ unsigned char *data = red->t140red.data.ptr;
int len = 0;
int i;
@@ -4395,7 +4395,7 @@
len += data[i*4+3] = red->len[i];
/* add primary data to buffer */
- memcpy(&data[len], red->t140.data, red->t140.datalen);
+ memcpy(&data[len], red->t140.data.ptr, red->t140.datalen);
red->t140red.datalen = len + red->t140.datalen;
/* no primary data and no generations to send */
@@ -4425,11 +4425,11 @@
r->t140.frametype = AST_FRAME_TEXT;
r->t140.subclass = AST_FORMAT_T140RED;
- r->t140.data = &r->buf_data;
+ r->t140.data.ptr = &r->buf_data;
r->t140.ts = 0;
r->t140red = r->t140;
- r->t140red.data = &r->t140red_data;
+ r->t140red.data.ptr = &r->t140red_data;
r->t140red.datalen = 0;
r->ti = ti;
r->num_gen = num_gen;
@@ -4458,7 +4458,7 @@
{
if( f->datalen > -1 ) {
struct rtp_red *red = rtp->red;
- memcpy(&red->buf_data[red->t140.datalen], f->data, f->datalen);
+ memcpy(&red->buf_data[red->t140.datalen], f->data.ptr, f->datalen);
red->t140.datalen += f->datalen;
red->t140.ts = f->ts;
}
Modified: team/mvanbaak/ast_frame_dataunion/main/slinfactory.c
URL: http://svn.digium.com/view/asterisk/team/mvanbaak/ast_frame_dataunion/main/slinfactory.c?view=diff&rev=117253&r1=117252&r2=117253
==============================================================================
--- team/mvanbaak/ast_frame_dataunion/main/slinfactory.c (original)
+++ team/mvanbaak/ast_frame_dataunion/main/slinfactory.c Mon May 19 17:44:50 2008
@@ -161,7 +161,7 @@
}
if ((frame_ptr = AST_LIST_REMOVE_HEAD(&sf->queue, frame_list))) {
- frame_data = frame_ptr->data;
+ frame_data = frame_ptr->data.ptr;
if (frame_ptr->samples <= ineed) {
memcpy(offset, frame_data, frame_ptr->samples * sizeof(*offset));
Modified: team/mvanbaak/ast_frame_dataunion/main/translate.c
URL: http://svn.digium.com/view/asterisk/team/mvanbaak/ast_frame_dataunion/main/translate.c?view=diff&rev=117253&r1=117252&r2=117253
==============================================================================
--- team/mvanbaak/ast_frame_dataunion/main/translate.c (original)
+++ team/mvanbaak/ast_frame_dataunion/main/translate.c Mon May 19 17:44:50 2008
@@ -235,7 +235,7 @@
f->mallocd = 0;
f->offset = AST_FRIENDLY_OFFSET;
f->src = pvt->t->name;
- f->data = pvt->outbuf;
+ f->data.ptr = pvt->outbuf;
ast_set_flag(f, AST_FRFLAG_FROM_TRANSLATOR);
Modified: team/mvanbaak/ast_frame_dataunion/main/udptl.c
URL: http://svn.digium.com/view/asterisk/team/mvanbaak/ast_frame_dataunion/main/udptl.c?view=diff&rev=117253&r1=117252&r2=117253
==============================================================================
--- team/mvanbaak/ast_frame_dataunion/main/udptl.c (original)
+++ team/mvanbaak/ast_frame_dataunion/main/udptl.c Mon May 19 17:44:50 2008
@@ -357,7 +357,7 @@
s->f[ifp_no].mallocd = 0;
s->f[ifp_no].seqno = seq_no - i;
s->f[ifp_no].datalen = lengths[i - 1];
- s->f[ifp_no].data = (uint8_t *) bufs[i - 1];
+ s->f[ifp_no].data.ptr = (uint8_t *) bufs[i - 1];
s->f[ifp_no].offset = 0;
s->f[ifp_no].src = "UDPTL";
if (ifp_no > 0)
@@ -459,7 +459,7 @@
s->f[ifp_no].mallocd = 0;
s->f[ifp_no].seqno = j;
s->f[ifp_no].datalen = s->rx[l].buf_len;
- s->f[ifp_no].data = s->rx[l].buf;
+ s->f[ifp_no].data.ptr = s->rx[l].buf;
s->f[ifp_no].offset = 0;
s->f[ifp_no].src = "UDPTL";
if (ifp_no > 0)
@@ -480,7 +480,7 @@
s->f[ifp_no].mallocd = 0;
s->f[ifp_no].seqno = seq_no;
s->f[ifp_no].datalen = ifp_len;
- s->f[ifp_no].data = (uint8_t *) ifp;
+ s->f[ifp_no].data.ptr = (uint8_t *) ifp;
s->f[ifp_no].offset = 0;
s->f[ifp_no].src = "UDPTL";
if (ifp_no > 0)
@@ -909,7 +909,7 @@
seq = s->tx_seq_no & 0xFFFF;
/* Cook up the UDPTL packet, with the relevant EC info. */
- len = udptl_build_packet(s, buf, f->data, f->datalen);
+ len = udptl_build_packet(s, buf, f->data.ptr, f->datalen);
if (len > 0 && s->them.sin_port && s->them.sin_addr.s_addr) {
if ((res = sendto(s->fd, buf, len, 0, (struct sockaddr *) &s->them, sizeof(s->them))) < 0)
More information about the asterisk-commits
mailing list