aboutsummaryrefslogtreecommitdiffstats
path: root/src/mp4ff
diff options
context:
space:
mode:
authorAvuton Olrich <avuton@gmail.com>2006-08-20 00:50:44 +0000
committerAvuton Olrich <avuton@gmail.com>2006-08-20 00:50:44 +0000
commitf79a70d1b9bab78fca515ac9142607ce2414e333 (patch)
tree9b851a6298a000e1feee859f430c9ccc5c297ddd /src/mp4ff
parent9caade4eb11bc930f618650918db8b60b912c961 (diff)
downloadmpd-f79a70d1b9bab78fca515ac9142607ce2414e333.tar.gz
mpd-f79a70d1b9bab78fca515ac9142607ce2414e333.tar.xz
mpd-f79a70d1b9bab78fca515ac9142607ce2414e333.zip
Fix warnings for -Wmissing-prototypes
Add -Wmissing-prototypes if compiling with gcc Static where possible git-svn-id: https://svn.musicpd.org/mpd/trunk@4657 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r--src/mp4ff/mp4ff.c24
-rw-r--r--src/mp4ff/mp4tagupdate.c34
2 files changed, 30 insertions, 28 deletions
diff --git a/src/mp4ff/mp4ff.c b/src/mp4ff/mp4ff.c
index 07dc99f3f..e0bb781e8 100644
--- a/src/mp4ff/mp4ff.c
+++ b/src/mp4ff/mp4ff.c
@@ -31,6 +31,8 @@
#include "drms.h"
+int64_t mp4ff_get_track_duration_use_offsets(const mp4ff_t *f, const int32_t track);
+
mp4ff_t *mp4ff_open_read(mp4ff_callback_t *f)
{
mp4ff_t *ff = malloc(sizeof(mp4ff_t));
@@ -202,7 +204,7 @@ int32_t mp4ff_get_decoder_config(const mp4ff_t *f, const int32_t track,
return 0;
}
-int32_t mp4ff_get_track_type(const mp4ff_t *f, const int track)
+static int32_t mp4ff_get_track_type(const mp4ff_t *f, const int track)
{
return f->track[track]->type;
}
@@ -217,17 +219,17 @@ int32_t mp4ff_time_scale(const mp4ff_t *f, const int32_t track)
return f->track[track]->timeScale;
}
-uint32_t mp4ff_get_avg_bitrate(const mp4ff_t *f, const int32_t track)
+static uint32_t mp4ff_get_avg_bitrate(const mp4ff_t *f, const int32_t track)
{
return f->track[track]->avgBitrate;
}
-uint32_t mp4ff_get_max_bitrate(const mp4ff_t *f, const int32_t track)
+static uint32_t mp4ff_get_max_bitrate(const mp4ff_t *f, const int32_t track)
{
return f->track[track]->maxBitrate;
}
-int64_t mp4ff_get_track_duration(const mp4ff_t *f, const int32_t track)
+static int64_t mp4ff_get_track_duration(const mp4ff_t *f, const int32_t track)
{
return f->track[track]->duration;
}
@@ -260,22 +262,22 @@ int32_t mp4ff_num_samples(const mp4ff_t *f, const int32_t track)
-uint32_t mp4ff_get_sample_rate(const mp4ff_t *f, const int32_t track)
+static uint32_t mp4ff_get_sample_rate(const mp4ff_t *f, const int32_t track)
{
return f->track[track]->sampleRate;
}
-uint32_t mp4ff_get_channel_count(const mp4ff_t * f,const int32_t track)
+static uint32_t mp4ff_get_channel_count(const mp4ff_t * f,const int32_t track)
{
return f->track[track]->channelCount;
}
-uint32_t mp4ff_get_audio_type(const mp4ff_t * f,const int32_t track)
+static uint32_t mp4ff_get_audio_type(const mp4ff_t * f,const int32_t track)
{
return f->track[track]->audioType;
}
-int32_t mp4ff_get_sample_duration_use_offsets(const mp4ff_t *f, const int32_t track, const int32_t sample)
+static int32_t mp4ff_get_sample_duration_use_offsets(const mp4ff_t *f, const int32_t track, const int32_t sample)
{
int32_t d,o;
d = mp4ff_get_sample_duration(f,track,sample);
@@ -364,7 +366,7 @@ int32_t mp4ff_find_sample(const mp4ff_t *f, const int32_t track, const int64_t o
return (int32_t)(-1);
}
-int32_t mp4ff_find_sample_use_offsets(const mp4ff_t *f, const int32_t track, const int64_t offset,int32_t * toskip)
+static int32_t mp4ff_find_sample_use_offsets(const mp4ff_t *f, const int32_t track, const int64_t offset,int32_t * toskip)
{
return mp4ff_find_sample(f,track,offset + mp4ff_get_sample_offset(f,track,0),toskip);
}
@@ -402,7 +404,7 @@ int32_t mp4ff_read_sample(mp4ff_t *f, const int32_t track, const int32_t sample,
}
-int32_t mp4ff_read_sample_v2(mp4ff_t *f, const int track, const int sample,unsigned char *buffer)
+static int32_t mp4ff_read_sample_v2(mp4ff_t *f, const int track, const int sample,unsigned char *buffer)
{
int32_t result = 0;
int32_t size = mp4ff_audio_frame_size(f,track,sample);
@@ -420,7 +422,7 @@ int32_t mp4ff_read_sample_v2(mp4ff_t *f, const int track, const int sample,unsig
return result;
}
-int32_t mp4ff_read_sample_getsize(mp4ff_t *f, const int track, const int sample)
+static int32_t mp4ff_read_sample_getsize(mp4ff_t *f, const int track, const int sample)
{
int32_t temp = mp4ff_audio_frame_size(f, track, sample);
if (temp<0) temp = 0;
diff --git a/src/mp4ff/mp4tagupdate.c b/src/mp4ff/mp4tagupdate.c
index be2d7084b..c999fa5ee 100644
--- a/src/mp4ff/mp4tagupdate.c
+++ b/src/mp4ff/mp4tagupdate.c
@@ -43,7 +43,7 @@ typedef struct
unsigned error;
} membuffer;
-unsigned membuffer_write(membuffer * buf,const void * ptr,unsigned bytes)
+static unsigned membuffer_write(membuffer * buf,const void * ptr,unsigned bytes)
{
unsigned dest_size = buf->written + bytes;
@@ -75,64 +75,64 @@ unsigned membuffer_write(membuffer * buf,const void * ptr,unsigned bytes)
#define membuffer_write_data membuffer_write
-unsigned membuffer_write_int32(membuffer * buf,uint32_t data)
+static unsigned membuffer_write_int32(membuffer * buf,uint32_t data)
{
uint8_t temp[4] = {(uint8_t)(data>>24),(uint8_t)(data>>16),(uint8_t)(data>>8),(uint8_t)data};
return membuffer_write_data(buf,temp,4);
}
-unsigned membuffer_write_int24(membuffer * buf,uint32_t data)
+static unsigned membuffer_write_int24(membuffer * buf,uint32_t data)
{
uint8_t temp[3] = {(uint8_t)(data>>16),(uint8_t)(data>>8),(uint8_t)data};
return membuffer_write_data(buf,temp,3);
}
-unsigned membuffer_write_int16(membuffer * buf,uint16_t data)
+static unsigned membuffer_write_int16(membuffer * buf,uint16_t data)
{
uint8_t temp[2] = {(uint8_t)(data>>8),(uint8_t)data};
return membuffer_write_data(buf,temp,2);
}
-unsigned membuffer_write_atom_name(membuffer * buf,const char * data)
+static unsigned membuffer_write_atom_name(membuffer * buf,const char * data)
{
return membuffer_write_data(buf,data,4)==4 ? 1 : 0;
}
-void membuffer_write_atom(membuffer * buf,const char * name,unsigned size,const void * data)
+static void membuffer_write_atom(membuffer * buf,const char * name,unsigned size,const void * data)
{
membuffer_write_int32(buf,size + 8);
membuffer_write_atom_name(buf,name);
membuffer_write_data(buf,data,size);
}
-unsigned membuffer_write_string(membuffer * buf,const char * data)
+static unsigned membuffer_write_string(membuffer * buf,const char * data)
{
return membuffer_write_data(buf,data,strlen(data));
}
-unsigned membuffer_write_int8(membuffer * buf,uint8_t data)
+static unsigned membuffer_write_int8(membuffer * buf,uint8_t data)
{
return membuffer_write_data(buf,&data,1);
}
-void * membuffer_get_ptr(const membuffer * buf)
+static void * membuffer_get_ptr(const membuffer * buf)
{
return buf->data;
}
-unsigned membuffer_get_size(const membuffer * buf)
+static unsigned membuffer_get_size(const membuffer * buf)
{
return buf->written;
}
-unsigned membuffer_error(const membuffer * buf)
+static unsigned membuffer_error(const membuffer * buf)
{
return buf->error;
}
-void membuffer_set_error(membuffer * buf) {buf->error = 1;}
+static void membuffer_set_error(membuffer * buf) {buf->error = 1;}
-unsigned membuffer_transfer_from_file(membuffer * buf,mp4ff_t * src,unsigned bytes)
+static unsigned membuffer_transfer_from_file(membuffer * buf,mp4ff_t * src,unsigned bytes)
{
unsigned oldsize;
void * bufptr;
@@ -153,7 +153,7 @@ unsigned membuffer_transfer_from_file(membuffer * buf,mp4ff_t * src,unsigned byt
}
-membuffer * membuffer_create()
+static membuffer * membuffer_create()
{
const unsigned initial_size = 256;
@@ -166,13 +166,13 @@ membuffer * membuffer_create()
return buf;
}
-void membuffer_free(membuffer * buf)
+static void membuffer_free(membuffer * buf)
{
if (buf->data) free(buf->data);
free(buf);
}
-void * membuffer_detach(membuffer * buf)
+static void * membuffer_detach(membuffer * buf)
{
void * ret;
@@ -595,7 +595,7 @@ static uint32_t modify_moov(mp4ff_t * f,const mp4ff_metadata_t * data,void ** ou
}
-int32_t mp4ff_meta_update(mp4ff_callback_t *f,const mp4ff_metadata_t * data)
+static int32_t mp4ff_meta_update(mp4ff_callback_t *f,const mp4ff_metadata_t * data)
{
void * new_moov_data;
uint32_t new_moov_size;