Lines Matching defs:oc
148 AVFormatContext *oc;
155 oc = seg->avf;
157 oc->interrupt_callback = s->interrupt_callback;
158 oc->max_delay = s->max_delay;
159 av_dict_copy(&oc->metadata, s->metadata, 0);
160 oc->opaque = s->opaque;
161 oc->io_close = s->io_close;
162 oc->io_close2 = s->io_close2;
163 oc->io_open = s->io_open;
164 oc->flags = s->flags;
170 if (!(st = avformat_new_stream(oc, NULL)))
176 if (!oc->oformat->codec_tag ||
177 av_codec_get_id (oc->oformat->codec_tag, ipar->codec_tag) == opar->codec_id ||
178 av_codec_get_tag(oc->oformat->codec_tag, ipar->codec_id) <= 0) {
191 AVFormatContext *oc = seg->avf;
205 av_log(oc, AV_LOG_ERROR, "Could not get segment filename with strftime\n");
210 av_log(oc, AV_LOG_ERROR, "Invalid segment filename template '%s'\n", s->url);
216 ff_format_set_url(oc, new_name);
219 size = strlen(av_basename(oc->url)) + 1;
227 av_basename(oc->url));
235 AVFormatContext *oc = seg->avf;
239 avformat_free_context(oc);
243 oc = seg->avf;
253 if ((err = s->io_open(s, &oc->pb, oc->url, AVIO_FLAG_WRITE, NULL)) < 0) {
254 av_log(s, AV_LOG_ERROR, "Failed to open segment '%s'\n", oc->url);
258 oc->pb->seekable = 0;
260 if (oc->oformat->priv_class && oc->priv_data)
261 av_opt_set(oc->priv_data, "mpegts_flags", "+resend_headers", 0);
267 err = avformat_write_header(oc, &options);
350 AVFormatContext *oc = seg->avf;
359 if (!oc || !oc->pb)
362 av_write_frame(oc, NULL); /* Flush any buffered data (fragmented mp4) */
364 ret = av_write_trailer(oc);
368 oc->url);
454 ff_format_io_close(oc, &oc->pb);
675 AVFormatContext *oc = seg->avf;
758 oc = seg->avf;
761 if ((ret = s->io_open(s, &oc->pb,
762 seg->header_filename ? seg->header_filename : oc->url,
764 av_log(s, AV_LOG_ERROR, "Failed to open segment '%s'\n", oc->url);
768 oc->pb->seekable = 0;
770 if ((ret = open_null_ctx(&oc->pb)) < 0)
777 ret = avformat_init_output(oc, &options);
791 av_assert0(s->nb_streams == oc->nb_streams);
793 ret = avformat_write_header(oc, NULL);
800 AVStream *inner_st = oc->streams[i];
805 if (oc->avoid_negative_ts > 0 && s->avoid_negative_ts < 0)
814 AVFormatContext *oc = seg->avf;
818 ret = avformat_write_header(oc, NULL);
825 av_write_frame(oc, NULL);
826 ff_format_io_close(oc, &oc->pb);
828 close_null_ctxp(&oc->pb);
831 if ((ret = oc->io_open(oc, &oc->pb, oc->url, AVIO_FLAG_WRITE, NULL)) < 0)
834 oc->pb->seekable = 0;
970 AVFormatContext *oc = seg->avf;
973 if (!oc)
979 if ((ret = open_null_ctx(&oc->pb)) < 0)
982 ret = av_write_trailer(oc);
993 AVFormatContext *oc = seg->avf;
994 if (oc->oformat->check_bitstream) {
995 AVStream *const ost = oc->streams[st->index];
996 int ret = oc->oformat->check_bitstream(oc, ost, pkt);