Lines Matching refs:oc
147 AVFormatContext *oc; in segment_mux_init() local
154 oc = seg->avf; in segment_mux_init()
156 oc->interrupt_callback = s->interrupt_callback; in segment_mux_init()
157 oc->max_delay = s->max_delay; in segment_mux_init()
158 av_dict_copy(&oc->metadata, s->metadata, 0); in segment_mux_init()
159 oc->opaque = s->opaque; in segment_mux_init()
160 oc->io_close = s->io_close; in segment_mux_init()
161 oc->io_open = s->io_open; in segment_mux_init()
162 oc->flags = s->flags; in segment_mux_init()
168 if (!(st = avformat_new_stream(oc, NULL))) in segment_mux_init()
172 if (!oc->oformat->codec_tag || in segment_mux_init()
173 av_codec_get_id (oc->oformat->codec_tag, ipar->codec_tag) == opar->codec_id || in segment_mux_init()
174 av_codec_get_tag(oc->oformat->codec_tag, ipar->codec_id) <= 0) { in segment_mux_init()
198 AVFormatContext *oc = seg->avf; in set_segment_filename() local
212 av_log(oc, AV_LOG_ERROR, "Could not get segment filename with strftime\n"); in set_segment_filename()
217 av_log(oc, AV_LOG_ERROR, "Invalid segment filename template '%s'\n", s->url); in set_segment_filename()
223 ff_format_set_url(oc, new_name); in set_segment_filename()
226 size = strlen(av_basename(oc->url)) + 1; in set_segment_filename()
234 av_basename(oc->url)); in set_segment_filename()
242 AVFormatContext *oc = seg->avf; in segment_start() local
246 avformat_free_context(oc); in segment_start()
250 oc = seg->avf; in segment_start()
260 if ((err = s->io_open(s, &oc->pb, oc->url, AVIO_FLAG_WRITE, NULL)) < 0) { in segment_start()
261 av_log(s, AV_LOG_ERROR, "Failed to open segment '%s'\n", oc->url); in segment_start()
265 oc->pb->seekable = 0; in segment_start()
267 if (oc->oformat->priv_class && oc->priv_data) in segment_start()
268 av_opt_set(oc->priv_data, "mpegts_flags", "+resend_headers", 0); in segment_start()
274 err = avformat_write_header(oc, &options); in segment_start()
357 AVFormatContext *oc = seg->avf; in segment_end() local
366 if (!oc || !oc->pb) in segment_end()
369 av_write_frame(oc, NULL); /* Flush any buffered data (fragmented mp4) */ in segment_end()
371 ret = av_write_trailer(oc); in segment_end()
375 oc->url); in segment_end()
461 ff_format_io_close(oc, &oc->pb); in segment_end()
682 AVFormatContext *oc = seg->avf; in seg_init() local
765 oc = seg->avf; in seg_init()
768 if ((ret = s->io_open(s, &oc->pb, in seg_init()
769 seg->header_filename ? seg->header_filename : oc->url, in seg_init()
771 av_log(s, AV_LOG_ERROR, "Failed to open segment '%s'\n", oc->url); in seg_init()
775 oc->pb->seekable = 0; in seg_init()
777 if ((ret = open_null_ctx(&oc->pb)) < 0) in seg_init()
784 ret = avformat_init_output(oc, &options); in seg_init()
798 av_assert0(s->nb_streams == oc->nb_streams); in seg_init()
800 ret = avformat_write_header(oc, NULL); in seg_init()
807 AVStream *inner_st = oc->streams[i]; in seg_init()
812 if (oc->avoid_negative_ts > 0 && s->avoid_negative_ts < 0) in seg_init()
821 AVFormatContext *oc = seg->avf; in seg_write_header() local
825 ret = avformat_write_header(oc, NULL); in seg_write_header()
832 av_write_frame(oc, NULL); in seg_write_header()
833 ff_format_io_close(oc, &oc->pb); in seg_write_header()
835 close_null_ctxp(&oc->pb); in seg_write_header()
838 if ((ret = oc->io_open(oc, &oc->pb, oc->url, AVIO_FLAG_WRITE, NULL)) < 0) in seg_write_header()
841 oc->pb->seekable = 0; in seg_write_header()
975 AVFormatContext *oc = seg->avf; in seg_write_trailer() local
978 if (!oc) in seg_write_trailer()
984 if ((ret = open_null_ctx(&oc->pb)) < 0) in seg_write_trailer()
987 ret = av_write_trailer(oc); in seg_write_trailer()
997 AVFormatContext *oc = seg->avf; in seg_check_bitstream() local
998 if (oc->oformat->check_bitstream) { in seg_check_bitstream()
999 int ret = oc->oformat->check_bitstream(oc, pkt); in seg_check_bitstream()
1002 AVStream *ost = oc->streams[pkt->stream_index]; in seg_check_bitstream()