Revision ceaf1909 output_example.c

View differences:

output_example.c
51 51
/*
52 52
 * add an audio output stream
53 53
 */
54
AVStream *add_audio_stream(AVFormatContext *oc, int codec_id)
54
static AVStream *add_audio_stream(AVFormatContext *oc, int codec_id)
55 55
{
56 56
    AVCodecContext *c;
57 57
    AVStream *st;
......
73 73
    return st;
74 74
}
75 75

  
76
void open_audio(AVFormatContext *oc, AVStream *st)
76
static void open_audio(AVFormatContext *oc, AVStream *st)
77 77
{
78 78
    AVCodecContext *c;
79 79
    AVCodec *codec;
......
124 124

  
125 125
/* prepare a 16 bit dummy audio frame of 'frame_size' samples and
126 126
   'nb_channels' channels */
127
void get_audio_frame(int16_t *samples, int frame_size, int nb_channels)
127
static void get_audio_frame(int16_t *samples, int frame_size, int nb_channels)
128 128
{
129 129
    int j, i, v;
130 130
    int16_t *q;
......
139 139
    }
140 140
}
141 141

  
142
void write_audio_frame(AVFormatContext *oc, AVStream *st)
142
static void write_audio_frame(AVFormatContext *oc, AVStream *st)
143 143
{
144 144
    AVCodecContext *c;
145 145
    AVPacket pkt;
......
163 163
    }
164 164
}
165 165

  
166
void close_audio(AVFormatContext *oc, AVStream *st)
166
static void close_audio(AVFormatContext *oc, AVStream *st)
167 167
{
168 168
    avcodec_close(st->codec);
169 169

  
......
179 179
int frame_count, video_outbuf_size;
180 180

  
181 181
/* add a video output stream */
182
AVStream *add_video_stream(AVFormatContext *oc, int codec_id)
182
static AVStream *add_video_stream(AVFormatContext *oc, int codec_id)
183 183
{
184 184
    AVCodecContext *c;
185 185
    AVStream *st;
......
224 224
    return st;
225 225
}
226 226

  
227
AVFrame *alloc_picture(int pix_fmt, int width, int height)
227
static AVFrame *alloc_picture(int pix_fmt, int width, int height)
228 228
{
229 229
    AVFrame *picture;
230 230
    uint8_t *picture_buf;
......
244 244
    return picture;
245 245
}
246 246

  
247
void open_video(AVFormatContext *oc, AVStream *st)
247
static void open_video(AVFormatContext *oc, AVStream *st)
248 248
{
249 249
    AVCodec *codec;
250 250
    AVCodecContext *c;
......
293 293
}
294 294

  
295 295
/* prepare a dummy image */
296
void fill_yuv_image(AVFrame *pict, int frame_index, int width, int height)
296
static void fill_yuv_image(AVFrame *pict, int frame_index, int width, int height)
297 297
{
298 298
    int x, y, i;
299 299

  
......
315 315
    }
316 316
}
317 317

  
318
void write_video_frame(AVFormatContext *oc, AVStream *st)
318
static void write_video_frame(AVFormatContext *oc, AVStream *st)
319 319
{
320 320
    int out_size, ret;
321 321
    AVCodecContext *c;
......
380 380
    frame_count++;
381 381
}
382 382

  
383
void close_video(AVFormatContext *oc, AVStream *st)
383
static void close_video(AVFormatContext *oc, AVStream *st)
384 384
{
385 385
    avcodec_close(st->codec);
386 386
    av_free(picture->data[0]);

Also available in: Unified diff