Home | History | Annotate | Download | only in client_examples

Lines Matching refs:oc

48 AVStream *add_video_stream(AVFormatContext *oc, int codec_id, int w, int h)
53 st = av_new_stream(oc, 0);
93 if(!strcmp(oc->oformat->name, "mp4") || !strcmp(oc->oformat->name, "mov") || !strcmp(oc->oformat->name, "3gp"))
119 void open_video(AVFormatContext *oc, AVStream *st)
144 if (!(oc->oformat->flags & AVFMT_RAWPICTURE)) {
171 void write_video_frame(AVFormatContext *oc, AVStream *st)
193 if (oc->oformat->flags & AVFMT_RAWPICTURE) {
204 ret = av_write_frame(oc, &pkt);
221 ret = av_write_frame(oc, &pkt);
233 void close_video(AVFormatContext *oc, AVStream *st)
247 static AVFormatContext *oc;
253 video_st = add_video_stream(oc, fmt->video_codec, w, h);
259 if (av_set_parameters(oc, NULL) < 0) {
264 dump_format(oc, 0, filename, 1);
269 open_video(oc, video_st);
273 if (url_fopen(&oc->pb, filename, URL_WRONLY) < 0) {
280 av_write_header(oc);
289 close_video(oc, video_st);
292 av_write_trailer(oc);
295 for(i = 0; i < oc->nb_streams; i++) {
296 av_freep(&oc->streams[i]);
301 url_fclose(&oc->pb);
305 av_free(oc);
389 oc = av_alloc_format_context();
390 if (!oc) {
394 oc->oformat = fmt;
395 snprintf(oc->filename, sizeof(oc->filename), "%s", filename);
428 write_video_frame(oc, video_st);