comparison api-example.c @ 9295:b225f51903af libavcodec

Mark non-exported functions in test and example programs as static.
author diego
date Tue, 31 Mar 2009 09:32:59 +0000
parents bd89b50b48fc
children 621852d53087
comparison
equal deleted inserted replaced
9294:bf264662cd6b 9295:b225f51903af
41 #define INBUF_SIZE 4096 41 #define INBUF_SIZE 4096
42 42
43 /* 43 /*
44 * Audio encoding example 44 * Audio encoding example
45 */ 45 */
46 void audio_encode_example(const char *filename) 46 static void audio_encode_example(const char *filename)
47 { 47 {
48 AVCodec *codec; 48 AVCodec *codec;
49 AVCodecContext *c= NULL; 49 AVCodecContext *c= NULL;
50 int frame_size, i, j, out_size, outbuf_size; 50 int frame_size, i, j, out_size, outbuf_size;
51 FILE *f; 51 FILE *f;
109 } 109 }
110 110
111 /* 111 /*
112 * Audio decoding. 112 * Audio decoding.
113 */ 113 */
114 void audio_decode_example(const char *outfilename, const char *filename) 114 static void audio_decode_example(const char *outfilename, const char *filename)
115 { 115 {
116 AVCodec *codec; 116 AVCodec *codec;
117 AVCodecContext *c= NULL; 117 AVCodecContext *c= NULL;
118 int out_size, size, len; 118 int out_size, size, len;
119 FILE *f, *outfile; 119 FILE *f, *outfile;
184 } 184 }
185 185
186 /* 186 /*
187 * Video encoding example 187 * Video encoding example
188 */ 188 */
189 void video_encode_example(const char *filename) 189 static void video_encode_example(const char *filename)
190 { 190 {
191 AVCodec *codec; 191 AVCodec *codec;
192 AVCodecContext *c= NULL; 192 AVCodecContext *c= NULL;
193 int i, out_size, size, x, y, outbuf_size; 193 int i, out_size, size, x, y, outbuf_size;
194 FILE *f; 194 FILE *f;
295 295
296 /* 296 /*
297 * Video decoding example 297 * Video decoding example
298 */ 298 */
299 299
300 void pgm_save(unsigned char *buf,int wrap, int xsize,int ysize,char *filename) 300 static void pgm_save(unsigned char *buf, int wrap, int xsize, int ysize,
301 char *filename)
301 { 302 {
302 FILE *f; 303 FILE *f;
303 int i; 304 int i;
304 305
305 f=fopen(filename,"w"); 306 f=fopen(filename,"w");
307 for(i=0;i<ysize;i++) 308 for(i=0;i<ysize;i++)
308 fwrite(buf + i * wrap,1,xsize,f); 309 fwrite(buf + i * wrap,1,xsize,f);
309 fclose(f); 310 fclose(f);
310 } 311 }
311 312
312 void video_decode_example(const char *outfilename, const char *filename) 313 static void video_decode_example(const char *outfilename, const char *filename)
313 { 314 {
314 AVCodec *codec; 315 AVCodec *codec;
315 AVCodecContext *c= NULL; 316 AVCodecContext *c= NULL;
316 int frame, size, got_picture, len; 317 int frame, size, got_picture, len;
317 FILE *f; 318 FILE *f;