summaryrefslogtreecommitdiff
path: root/ffmpeg_opt.c
diff options
context:
space:
mode:
authorSimon Thelen <ffmpeg-dev@c-14.de>2014-12-25 22:56:06 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-12-28 02:05:34 +0100
commitcc63da1223da2ccd758d3aab815ad230d74f1a5d (patch)
tree80b0e72c05c3825723a777f606c49295dabb4b6d /ffmpeg_opt.c
parentc263102298ecb1cb8d307d881d2f45e0f6fc16d2 (diff)
ffmpeg: add sdp_file option
Allow printing of sdp information to a file specified by -sdp_file This allows users to print sdp information when at least one of the outputs isn't an rtp stream. Signed-off-by: Simon Thelen <ffmpeg-dev@c-14.de> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'ffmpeg_opt.c')
-rw-r--r--ffmpeg_opt.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/ffmpeg_opt.c b/ffmpeg_opt.c
index ae05bf0571..ac93eb50f6 100644
--- a/ffmpeg_opt.c
+++ b/ffmpeg_opt.c
@@ -77,6 +77,7 @@ const HWAccel hwaccels[] = {
};
char *vstats_filename;
+char *sdp_filename;
float audio_drift_threshold = 0.1;
float dts_delta_threshold = 10;
@@ -381,6 +382,13 @@ static int opt_map_channel(void *optctx, const char *opt, const char *arg)
return 0;
}
+static int opt_sdp_file(void *optctx, const char *opt, const char *arg)
+{
+ av_free(sdp_filename);
+ sdp_filename = av_strdup(arg);
+ return 0;
+}
+
/**
* Parse a metadata specifier passed as 'arg' parameter.
* @param arg metadata string to parse
@@ -3070,6 +3078,8 @@ const OptionDef options[] = {
"set the initial demux-decode delay", "seconds" },
{ "override_ffserver", OPT_BOOL | OPT_EXPERT | OPT_OUTPUT, { &override_ffserver },
"override the options from ffserver", "" },
+ { "sdp_file", HAS_ARG | OPT_EXPERT | OPT_OUTPUT, { opt_sdp_file },
+ "specify a file in which to print sdp information", "file" },
{ "bsf", HAS_ARG | OPT_STRING | OPT_SPEC | OPT_EXPERT | OPT_OUTPUT, { .off = OFFSET(bitstream_filters) },
"A comma-separated list of bitstream filters", "bitstream_filters" },