aboutsummaryrefslogtreecommitdiffstats
path: root/formats
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2007-11-29 17:29:59 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2007-11-29 17:29:59 +0000
commit8417f20fe68be3b186eedbaffd3e5462f5153111 (patch)
tree797602764292bb013738ea847efe6813375f71a7 /formats
parent0005174a58a7f131509d96f431eadedf64624326 (diff)
Use of "private" as a field name in a header file messes with C++ projects
Reported by: chewbacca Patch by: casper (Closes issue #11401) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@90155 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'formats')
-rw-r--r--formats/format_g726.c6
-rw-r--r--formats/format_h263.c2
-rw-r--r--formats/format_h264.c2
-rw-r--r--formats/format_ogg_vorbis.c12
-rw-r--r--formats/format_pcm.c2
-rw-r--r--formats/format_wav.c8
-rw-r--r--formats/format_wav_gsm.c8
7 files changed, 20 insertions, 20 deletions
diff --git a/formats/format_g726.c b/formats/format_g726.c
index 41cd87a08..499d545d2 100644
--- a/formats/format_g726.c
+++ b/formats/format_g726.c
@@ -76,7 +76,7 @@ struct g726_desc {
*/
static int g726_open(struct ast_filestream *tmp, int rate)
{
- struct g726_desc *s = (struct g726_desc *)tmp->private;
+ struct g726_desc *s = (struct g726_desc *)tmp->_private;
s->rate = rate;
if (option_debug)
ast_log(LOG_DEBUG, "Created filestream G.726-%dk.\n",
@@ -131,7 +131,7 @@ static int g726_16_rewrite(struct ast_filestream *s, const char *comment)
static struct ast_frame *g726_read(struct ast_filestream *s, int *whennext)
{
int res;
- struct g726_desc *fs = (struct g726_desc *)s->private;
+ struct g726_desc *fs = (struct g726_desc *)s->_private;
/* Send a frame from the file to the appropriate channel */
s->fr.frametype = AST_FRAME_VOICE;
@@ -151,7 +151,7 @@ static struct ast_frame *g726_read(struct ast_filestream *s, int *whennext)
static int g726_write(struct ast_filestream *s, struct ast_frame *f)
{
int res;
- struct g726_desc *fs = (struct g726_desc *)s->private;
+ struct g726_desc *fs = (struct g726_desc *)s->_private;
if (f->frametype != AST_FRAME_VOICE) {
ast_log(LOG_WARNING, "Asked to write non-voice frame!\n");
diff --git a/formats/format_h263.c b/formats/format_h263.c
index a2537f037..baa7a3efd 100644
--- a/formats/format_h263.c
+++ b/formats/format_h263.c
@@ -80,7 +80,7 @@ static struct ast_frame *h263_read(struct ast_filestream *s, int *whennext)
int mark;
unsigned short len;
unsigned int ts;
- struct h263_desc *fs = (struct h263_desc *)s->private;
+ struct h263_desc *fs = (struct h263_desc *)s->_private;
/* Send a frame from the file to the appropriate channel */
if ((res = fread(&len, 1, sizeof(len), s->f)) < 1)
diff --git a/formats/format_h264.c b/formats/format_h264.c
index 4b471f84e..bc70a75c7 100644
--- a/formats/format_h264.c
+++ b/formats/format_h264.c
@@ -72,7 +72,7 @@ static struct ast_frame *h264_read(struct ast_filestream *s, int *whennext)
int mark=0;
unsigned short len;
unsigned int ts;
- struct h264_desc *fs = (struct h264_desc *)s->private;
+ struct h264_desc *fs = (struct h264_desc *)s->_private;
/* Send a frame from the file to the appropriate channel */
if ((res = fread(&len, 1, sizeof(len), s->f)) < 1)
diff --git a/formats/format_ogg_vorbis.c b/formats/format_ogg_vorbis.c
index 9d80b63d4..ff796e79f 100644
--- a/formats/format_ogg_vorbis.c
+++ b/formats/format_ogg_vorbis.c
@@ -99,7 +99,7 @@ static int ogg_vorbis_open(struct ast_filestream *s)
int result;
char **ptr;
char *buffer;
- struct vorbis_desc *tmp = (struct vorbis_desc *)s->private;
+ struct vorbis_desc *tmp = (struct vorbis_desc *)s->_private;
tmp->writing = 0;
@@ -209,7 +209,7 @@ static int ogg_vorbis_rewrite(struct ast_filestream *s,
ogg_packet header;
ogg_packet header_comm;
ogg_packet header_code;
- struct vorbis_desc *tmp = (struct vorbis_desc *)s->private;
+ struct vorbis_desc *tmp = (struct vorbis_desc *)s->_private;
tmp->writing = 1;
@@ -286,7 +286,7 @@ static int ogg_vorbis_write(struct ast_filestream *fs, struct ast_frame *f)
int i;
float **buffer;
short *data;
- struct vorbis_desc *s = (struct vorbis_desc *)fs->private;
+ struct vorbis_desc *s = (struct vorbis_desc *)fs->_private;
if (!s->writing) {
ast_log(LOG_ERROR, "This stream is not set up for writing!\n");
@@ -325,7 +325,7 @@ static int ogg_vorbis_write(struct ast_filestream *fs, struct ast_frame *f)
*/
static void ogg_vorbis_close(struct ast_filestream *fs)
{
- struct vorbis_desc *s = (struct vorbis_desc *)fs->private;
+ struct vorbis_desc *s = (struct vorbis_desc *)fs->_private;
if (s->writing) {
/* Tell the Vorbis encoder that the stream is finished
@@ -357,7 +357,7 @@ static int read_samples(struct ast_filestream *fs, float ***pcm)
int result;
char *buffer;
int bytes;
- struct vorbis_desc *s = (struct vorbis_desc *)fs->private;
+ struct vorbis_desc *s = (struct vorbis_desc *)fs->_private;
while (1) {
samples_in = vorbis_synthesis_pcmout(&s->vd, pcm);
@@ -440,7 +440,7 @@ static struct ast_frame *ogg_vorbis_read(struct ast_filestream *fs,
int val;
int samples_in;
int samples_out = 0;
- struct vorbis_desc *s = (struct vorbis_desc *)fs->private;
+ struct vorbis_desc *s = (struct vorbis_desc *)fs->_private;
short *buf; /* SLIN data buffer */
fs->fr.frametype = AST_FRAME_VOICE;
diff --git a/formats/format_pcm.c b/formats/format_pcm.c
index 6736ea996..6facfcdcc 100644
--- a/formats/format_pcm.c
+++ b/formats/format_pcm.c
@@ -180,7 +180,7 @@ static int pcm_write(struct ast_filestream *fs, struct ast_frame *f)
#ifdef REALTIME_WRITE
if (s->fmt->format == AST_FORMAT_ALAW) {
- struct pcm_desc *pd = (struct pcm_desc *)fs->private;
+ struct pcm_desc *pd = (struct pcm_desc *)fs->_private;
struct stat stat_buf;
unsigned long cur_time = get_time();
unsigned long fpos = ( cur_time - pd->start_time ) * 8; /* 8 bytes per msec */
diff --git a/formats/format_wav.c b/formats/format_wav.c
index 2081433a6..df808590f 100644
--- a/formats/format_wav.c
+++ b/formats/format_wav.c
@@ -324,7 +324,7 @@ static int wav_open(struct ast_filestream *s)
/* We don't have any header to read or anything really, but
if we did, it would go here. We also might want to check
and be sure it's a valid file. */
- struct wav_desc *tmp = (struct wav_desc *)s->private;
+ struct wav_desc *tmp = (struct wav_desc *)s->_private;
if ((tmp->maxlen = check_header(s->f)) < 0)
return -1;
return 0;
@@ -344,7 +344,7 @@ static int wav_rewrite(struct ast_filestream *s, const char *comment)
static void wav_close(struct ast_filestream *s)
{
char zero = 0;
- struct wav_desc *fs = (struct wav_desc *)s->private;
+ struct wav_desc *fs = (struct wav_desc *)s->_private;
/* Pad to even length */
if (fs->bytes & 0x1)
fwrite(&zero, 1, 1, s->f);
@@ -359,7 +359,7 @@ static struct ast_frame *wav_read(struct ast_filestream *s, int *whennext)
int bytes = WAV_BUF_SIZE; /* in bytes */
off_t here;
/* Send a frame from the file to the appropriate channel */
- struct wav_desc *fs = (struct wav_desc *)s->private;
+ struct wav_desc *fs = (struct wav_desc *)s->_private;
here = ftello(s->f);
if (fs->maxlen - here < bytes) /* truncate if necessary */
@@ -411,7 +411,7 @@ static int wav_write(struct ast_filestream *fs, struct ast_frame *f)
int x;
short tmp[8000], *tmpi;
float tmpf;
- struct wav_desc *s = (struct wav_desc *)fs->private;
+ struct wav_desc *s = (struct wav_desc *)fs->_private;
int res;
if (f->frametype != AST_FRAME_VOICE) {
diff --git a/formats/format_wav_gsm.c b/formats/format_wav_gsm.c
index fea08952e..727f9cf22 100644
--- a/formats/format_wav_gsm.c
+++ b/formats/format_wav_gsm.c
@@ -383,7 +383,7 @@ static int wav_open(struct ast_filestream *s)
/* We don't have any header to read or anything really, but
if we did, it would go here. We also might want to check
and be sure it's a valid file. */
- struct wavg_desc *fs = (struct wavg_desc *)s->private;
+ struct wavg_desc *fs = (struct wavg_desc *)s->_private;
if (check_header(s->f))
return -1;
@@ -414,7 +414,7 @@ static void wav_close(struct ast_filestream *s)
static struct ast_frame *wav_read(struct ast_filestream *s, int *whennext)
{
/* Send a frame from the file to the appropriate channel */
- struct wavg_desc *fs = (struct wavg_desc *)s->private;
+ struct wavg_desc *fs = (struct wavg_desc *)s->_private;
s->fr.frametype = AST_FRAME_VOICE;
s->fr.subclass = AST_FORMAT_GSM;
@@ -448,7 +448,7 @@ static int wav_write(struct ast_filestream *s, struct ast_frame *f)
{
int len;
int size;
- struct wavg_desc *fs = (struct wavg_desc *)s->private;
+ struct wavg_desc *fs = (struct wavg_desc *)s->_private;
if (f->frametype != AST_FRAME_VOICE) {
ast_log(LOG_WARNING, "Asked to write non-voice frame!\n");
@@ -494,7 +494,7 @@ static int wav_write(struct ast_filestream *s, struct ast_frame *f)
static int wav_seek(struct ast_filestream *fs, off_t sample_offset, int whence)
{
off_t offset=0, distance, max;
- struct wavg_desc *s = (struct wavg_desc *)fs->private;
+ struct wavg_desc *s = (struct wavg_desc *)fs->_private;
off_t min = MSGSM_DATA_OFFSET;
off_t cur = ftello(fs->f);