Lines Matching refs:oc

847     AVFormatContext *oc;
856 oc = vs->avf;
858 oc->url = av_strdup("");
859 if (!oc->url)
862 oc->interrupt_callback = s->interrupt_callback;
863 oc->max_delay = s->max_delay;
864 oc->opaque = s->opaque;
865 oc->io_open = s->io_open;
866 oc->io_close = s->io_close;
867 oc->io_close2 = s->io_close2;
868 oc->strict_std_compliance = s->strict_std_compliance;
869 av_dict_copy(&oc->metadata, s->metadata, 0);
885 loc = oc;
890 if (!oc->oformat->codec_tag ||
891 av_codec_get_id (oc->oformat->codec_tag, vs->streams[i]->codecpar->codec_tag) == st->codecpar->codec_id ||
892 av_codec_get_tag(oc->oformat->codec_tag, vs->streams[i]->codecpar->codec_id) <= 0) {
918 if ((ret = avio_open_dyn_buf(&oc->pb)) < 0)
946 ret = avformat_init_output(oc, &options);
955 avio_flush(oc->pb);
1059 static int sls_flag_use_localtime_filename(AVFormatContext *oc, HLSContext *c, VariantStream *vs)
1064 oc->url, 'd', vs->sequence) < 1) {
1067 oc->url);
1071 ff_format_set_url(oc, filename);
1074 av_strlcpy(vs->current_segment_final_filename_fmt, oc->url,
1078 if (replace_int_data_in_filename(&filename, oc->url, 's', 0) < 1) {
1081 oc->url);
1085 ff_format_set_url(oc, filename);
1089 if (replace_int_data_in_filename(&filename, oc->url, 't', 0) < 1) {
1092 oc->url);
1096 ff_format_set_url(oc, filename);
1316 static int hls_rename_temp_file(AVFormatContext *s, AVFormatContext *oc)
1318 size_t len = strlen(oc->url);
1319 char *final_filename = av_strdup(oc->url);
1325 ret = ff_rename(oc->url, final_filename, s);
1326 oc->url[len-4] = '\0';
1679 AVFormatContext *oc = vs->avf;
1691 ff_format_set_url(oc, new_name);
1703 av_log(oc, AV_LOG_ERROR, "Invalid segment filename template '%s', you can try to use -strftime 1 with it\n", vs->basename);
1706 ff_format_set_url(oc, filename);
1714 av_log(oc, AV_LOG_ERROR, "Could not get segment filename with strftime\n");
1717 ff_format_set_url(oc, expanded);
1719 err = sls_flag_use_localtime_filename(oc, c, vs);
1726 char *fn_copy = av_strdup(oc->url);
1731 av_log(oc, AV_LOG_ERROR, "Could not create directory %s with use_localtime_mkdir\n", dir);
1742 av_log(oc, AV_LOG_ERROR, "Invalid segment filename template '%s' you can try to use -strftime 1 with it\n", vs->basename);
1745 ff_format_set_url(oc, filename);
1759 proto = avio_find_protocol_name(oc->url);
1763 char *new_name = av_asprintf("%s.tmp", oc->url);
1766 ff_format_set_url(oc, new_name);
1804 if (oc->oformat->priv_class && oc->priv_data) {
1805 av_opt_set(oc->priv_data, "mpegts_flags", "resend_headers", 0);
1814 vs->basename_tmp = av_asprintf("crypto:%s.tmp", oc->url);
1818 vs->basename = av_asprintf("%s", oc->url);
2379 AVFormatContext *oc = vs->avf;
2382 filename = av_asprintf("%s.tmp", oc->url);
2406 AVFormatContext *oc = NULL;
2427 oc = vs->vtt_avf;
2430 oc = vs->avf;
2437 if (oc)
2441 if (!oc) {
2499 av_write_frame(oc, NULL); /* Flush any buffered data */
2500 new_start_pos = avio_tell(oc->pb);
2502 avio_flush(oc->pb);
2505 range_length = avio_close_dyn_buf(oc->pb, &vs->init_buffer);
2512 avio_open_dyn_buf(&oc->pb);
2536 if (oc->url[0]) {
2537 proto = avio_find_protocol_name(oc->url);
2548 filename = av_asprintf("crypto:%s", oc->url);
2550 filename = av_asprintf("%s", oc->url);
2595 hls_rename_temp_file(s, oc);
2598 old_filename = av_strdup(oc->url);
2638 if (hls->segment_type == SEGMENT_TYPE_MPEGTS && oc->oformat->priv_class && oc->priv_data) {
2639 av_opt_set(oc->priv_data, "mpegts_flags", "resend_headers", 0);
2666 if (oc->pb) {
2667 ret = ff_write_chained(oc, stream_index, pkt, s, 0);
2670 vs->video_keyframe_size = avio_tell(oc->pb);
2717 AVFormatContext *oc = NULL;
2731 oc = vs->avf;
2733 old_filename = av_strdup(oc->url);
2742 filename = av_asprintf("crypto:%s", oc->url);
2744 filename = av_asprintf("%s", oc->url);
2755 av_write_frame(oc, NULL); /* Flush any buffered data */
2757 range_length = avio_close_dyn_buf(oc->pb, &buffer);
2761 avio_open_dyn_buf(&oc->pb);
2775 av_log(s, AV_LOG_ERROR, "Failed to open file '%s'\n", oc->url);
2792 av_log(s, AV_LOG_ERROR, "Failed to open file '%s'\n", oc->url);
2798 av_log(s, AV_LOG_WARNING, "Failed to upload file '%s' at the end.\n", oc->url);
2810 av_write_trailer(oc);
2811 if (oc->url[0]) {
2812 proto = avio_find_protocol_name(oc->url);
2818 hls_rename_temp_file(s, oc);
2820 old_filename = av_strdup(oc->url);
2844 ffio_free_dyn_buf(&oc->pb);