• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/minidlna/ffmpeg-2.3.4/

Lines Matching defs:ost

1033 static void choose_encoder(OptionsContext *o, AVFormatContext *s, OutputStream *ost)
1037 MATCH_PER_STREAM_OPT(codec_names, str, codec_name, s, ost->st);
1039 ost->st->codec->codec_id = av_guess_codec(s->oformat, NULL, s->filename,
1040 NULL, ost->st->codec->codec_type);
1041 ost->enc = avcodec_find_encoder(ost->st->codec->codec_id);
1043 ost->stream_copy = 1;
1045 ost->enc = find_codec_or_die(codec_name, ost->st->codec->codec_type, 1);
1046 ost->st->codec->codec_id = ost->enc->id;
1052 OutputStream *ost;
1069 if (!(ost = av_mallocz(sizeof(*ost))))
1071 output_streams[nb_output_streams - 1] = ost;
1073 ost->file_index = nb_output_files - 1;
1074 ost->index = idx;
1075 ost->st = st;
1077 choose_encoder(o, oc, ost);
1079 ost->enc_ctx = avcodec_alloc_context3(ost->enc);
1080 if (!ost->enc_ctx) {
1084 ost->enc_ctx->codec_type = type;
1086 if (ost->enc) {
1090 ost->encoder_opts = filter_codec_opts(o->g->codec_opts, ost->enc->id, oc, st, ost->enc);
1093 if (preset && (!(ret = get_preset_file_2(preset, ost->enc->name, &s)))) {
1105 av_dict_set(&ost->encoder_opts, buf, arg, AV_DICT_DONT_OVERWRITE);
1113 preset, ost->file_index, ost->index);
1117 ost->encoder_opts = filter_codec_opts(o->g->codec_opts, AV_CODEC_ID_NONE, oc, st, NULL);
1120 ost->max_frames = INT64_MAX;
1121 MATCH_PER_STREAM_OPT(max_frames, i64, ost->max_frames, oc, st);
1130 ost->copy_prior_start = -1;
1131 MATCH_PER_STREAM_OPT(copy_prior_start, i, ost->copy_prior_start, oc ,st);
1144 ost->bitstream_filters = bsfc;
1155 ost->enc_ctx->codec_tag = tag;
1160 ost->enc_ctx->flags |= CODEC_FLAG_QSCALE;
1161 ost->enc_ctx->global_quality = FF_QP2LAMBDA * qscale;
1165 ost->enc_ctx->flags |= CODEC_FLAG_GLOBAL_HEADER;
1167 av_opt_get_int(o->g->sws_opts, "sws_flags", 0, &ost->sws_flags);
1169 av_dict_copy(&ost->swr_opts, o->g->swr_opts, 0);
1170 if (ost->enc && av_get_exact_bits_per_sample(ost->enc->id) == 24)
1171 av_dict_set(&ost->swr_opts, "output_sample_bits", "24", 0);
1173 av_dict_copy(&ost->resample_opts, o->g->resample_opts, 0);
1175 ost->source_index = source_index;
1177 ost->sync_ist = input_streams[source_index];
1181 ost->last_mux_dts = AV_NOPTS_VALUE;
1183 return ost;
1233 OutputStream *ost)
1235 AVStream *st = ost->st;
1237 if (ost->filters_script && ost->filters) {
1243 if (ost->filters_script)
1244 return read_file(ost->filters_script);
1245 else if (ost->filters)
1246 return av_strdup(ost->filters);
1253 const OutputStream *ost, enum AVMediaType type)
1255 if (ost->filters_script || ost->filters) {
1259 ost->filters ? "Filtergraph" : "Filtergraph script",
1260 ost->filters ? ost->filters : ost->filters_script,
1261 av_get_media_type_string(type), ost->file_index, ost->index);
1269 OutputStream *ost;
1273 ost = new_output_stream(o, oc, AVMEDIA_TYPE_VIDEO, source_index);
1274 st = ost->st;
1275 video_enc = ost->enc_ctx;
1278 if (frame_rate && av_parse_video_rate(&ost->frame_rate, frame_rate) < 0) {
1291 ost->frame_aspect_ratio = q;
1294 MATCH_PER_STREAM_OPT(filter_scripts, str, ost->filters_script, oc, st);
1295 MATCH_PER_STREAM_OPT(filters, str, ost->filters, oc, st);
1297 if (!ost->stream_copy) {
1315 ost->keep_pix_fmt = 1;
1389 av_dict_set(&ost->encoder_opts, "flags", "+pass1", AV_DICT_APPEND);
1393 av_dict_set(&ost->encoder_opts, "flags", "+pass2", AV_DICT_APPEND);
1397 MATCH_PER_STREAM_OPT(passlogfiles, str, ost->logfile_prefix, oc, st);
1398 if (ost->logfile_prefix &&
1399 !(ost->logfile_prefix = av_strdup(ost->logfile_prefix)))
1402 MATCH_PER_STREAM_OPT(forced_key_frames, str, ost->forced_keyframes, oc, st);
1403 if (ost->forced_keyframes)
1404 ost->forced_keyframes = av_strdup(ost->forced_keyframes);
1406 MATCH_PER_STREAM_OPT(force_fps, i, ost->force_fps, oc, st);
1408 ost->top_field_first = -1;
1409 MATCH_PER_STREAM_OPT(top_field_first, i, ost->top_field_first, oc, st);
1412 ost->avfilter = get_ost_filters(o, oc, ost);
1413 if (!ost->avfilter)
1416 MATCH_PER_STREAM_OPT(copy_initial_nonkeyframes, i, ost->copy_initial_nonkeyframes, oc ,st);
1419 if (ost->stream_copy)
1420 check_streamcopy_filters(o, oc, ost, AVMEDIA_TYPE_VIDEO);
1422 return ost;
1429 OutputStream *ost;
1432 ost = new_output_stream(o, oc, AVMEDIA_TYPE_AUDIO, source_index);
1433 st = ost->st;
1435 audio_enc = ost->enc_ctx;
1438 MATCH_PER_STREAM_OPT(filter_scripts, str, ost->filters_script, oc, st);
1439 MATCH_PER_STREAM_OPT(filters, str, ost->filters, oc, st);
1441 if (!ost->stream_copy) {
1455 MATCH_PER_STREAM_OPT(apad, str, ost->apad, oc, st);
1456 ost->apad = av_strdup(ost->apad);
1458 ost->avfilter = get_ost_filters(o, oc, ost);
1459 if (!ost->avfilter)
1465 if ((map->ofile_idx == -1 || ost->file_index == map->ofile_idx) &&
1466 (map->ostream_idx == -1 || ost->st->index == map->ostream_idx)) {
1471 } else if (ost->source_index < 0) {
1473 ost->file_index, ost->st->index);
1476 ist = input_streams[ost->source_index];
1480 if (ost->audio_channels_mapped < FF_ARRAY_ELEMS(ost->audio_channels_map))
1481 ost->audio_channels_map[ost->audio_channels_mapped++] = map->channel_idx;
1484 ost->file_index, ost->st->index);
1490 if (ost->stream_copy)
1491 check_streamcopy_filters(o, oc, ost, AVMEDIA_TYPE_AUDIO);
1493 return ost;
1498 OutputStream *ost;
1500 ost = new_output_stream(o, oc, AVMEDIA_TYPE_DATA, source_index);
1501 if (!ost->stream_copy) {
1506 return ost;
1511 OutputStream *ost = new_output_stream(o, oc, AVMEDIA_TYPE_ATTACHMENT, source_index);
1512 ost->stream_copy = 1;
1513 ost->finished = 1;
1514 return ost;
1520 OutputStream *ost;
1523 ost = new_output_stream(o, oc, AVMEDIA_TYPE_SUBTITLE, source_index);
1524 st = ost->st;
1525 subtitle_enc = ost->enc_ctx;
1529 MATCH_PER_STREAM_OPT(copy_initial_nonkeyframes, i, ost->copy_initial_nonkeyframes, oc, st);
1531 if (!ost->stream_copy) {
1541 return ost;
1622 OutputStream *ost;
1627 ost = new_output_stream(o, s, codec->type, -1);
1628 st = ost->st;
1630 ost->enc = codec;
1640 if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO && !ost->stream_copy)
1642 else if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO && !ost->stream_copy)
1644 avcodec_copy_context(ost->enc_ctx, st->codec);
1654 OutputStream *ost;
1658 case AVMEDIA_TYPE_VIDEO: ost = new_video_stream(o, oc, -1); break;
1659 case AVMEDIA_TYPE_AUDIO: ost = new_audio_stream(o, oc, -1); break;
1666 ost->source_index = -1;
1667 ost->filter = ofilter;
1669 ofilter->ost = ost;
1671 if (ost->stream_copy) {
1674 "cannot be used together.\n", ost->file_index, ost->index);
1678 if (ost->avfilter && (ost->filters || ost->filters_script)) {
1679 const char *opt = ost->filters ? "-vf/-af/-filter" : "-filter_script";
1684 ost->filters ? "Filtergraph" : "Filtergraph script",
1685 ost->filters ? ost->filters : ost->filters_script,
1686 opt, ost->file_index, ost->index, opt);
1714 OutputStream *ost;
1808 ost = output_streams[j];
1811 if(ist->st->codec->codec_type == ost->st->codec->codec_type){
1812 ost->sync_ist= ist;
1813 ost->source_index= i;
1814 if(ost->st->codec->codec_type == AVMEDIA_TYPE_AUDIO) ost->avfilter = av_strdup("anull");
1815 if(ost->st->codec->codec_type == AVMEDIA_TYPE_VIDEO) ost->avfilter = av_strdup("null");
1821 if(!ost->sync_ist){
1822 av_log(NULL, AV_LOG_FATAL, "Missing %s stream which is required by this ffm\n", av_get_media_type_string(ost->st->codec->codec_type));
1920 case AVMEDIA_TYPE_VIDEO: ost = new_video_stream (o, oc, src_idx); break;
1921 case AVMEDIA_TYPE_AUDIO: ost = new_audio_stream (o, oc, src_idx); break;
1922 case AVMEDIA_TYPE_SUBTITLE: ost = new_subtitle_stream (o, oc, src_idx); break;
1923 case AVMEDIA_TYPE_DATA: ost = new_data_stream (o, oc, src_idx); break;
1924 case AVMEDIA_TYPE_ATTACHMENT: ost = new_attachment_stream(o, oc, src_idx); break;
1958 ost = new_attachment_stream(o, oc, -1);
1959 ost->stream_copy = 0;
1960 ost->attachment_filename = o->attachments[i];
1961 ost->finished = 1;
1962 ost->enc_ctx->extradata = attachment;
1963 ost->enc_ctx->extradata_size = len;
1966 av_dict_set(&ost->st->metadata, "filename", (p && *p) ? p + 1 : o->attachments[i], AV_DICT_DONT_OVERWRITE);
1972 ost = output_streams[i];
1974 if ((ost->stream_copy || ost->attachment_filename)
1976 && (!e->key[5] || check_stream_specifier(oc, ost->st, e->key+6)))
1977 if (av_opt_set(ost->st->codec, "flags", e->value, 0) < 0)