[FFmpeg-cvslog] avformat/hlsenc: reindent after previous commits
ffmpeg | branch: master | Steven Liu| Tue Dec 12 11:50:23 2017 +0800| [0e5260226a72fc9da2967ded99624f5dfb1ed135] | committer: Steven Liu avformat/hlsenc: reindent after previous commits > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0e5260226a72fc9da2967ded99624f5dfb1ed135 --- libavformat/hlsenc.c | 60 ++-- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index dd09739651..fdf614bdd1 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c @@ -1646,40 +1646,40 @@ static int hls_write_header(AVFormatContext *s) for (i = 0; i < hls->nb_varstreams; i++) { vs = >var_streams[i]; -av_dict_copy(, hls->format_options, 0); -ret = avformat_write_header(vs->avf, ); -if (av_dict_count(options)) { -av_log(s, AV_LOG_ERROR, "Some of provided format options in '%s' are not recognized\n", hls->format_options_str); -ret = AVERROR(EINVAL); +av_dict_copy(, hls->format_options, 0); +ret = avformat_write_header(vs->avf, ); +if (av_dict_count(options)) { +av_log(s, AV_LOG_ERROR, "Some of provided format options in '%s' are not recognized\n", hls->format_options_str); +ret = AVERROR(EINVAL); +av_dict_free(); +goto fail; +} av_dict_free(); -goto fail; -} -av_dict_free(); -//av_assert0(s->nb_streams == hls->avf->nb_streams); -for (j = 0; j < vs->nb_streams; j++) { -AVStream *inner_st; -AVStream *outer_st = vs->streams[j]; - -if (hls->max_seg_size > 0) { -if ((outer_st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO) && -(outer_st->codecpar->bit_rate > hls->max_seg_size)) { -av_log(s, AV_LOG_WARNING, "Your video bitrate is bigger than hls_segment_size, " - "(%"PRId64 " > %"PRId64 "), the result maybe not be what you want.", - outer_st->codecpar->bit_rate, hls->max_seg_size); +//av_assert0(s->nb_streams == hls->avf->nb_streams); +for (j = 0; j < vs->nb_streams; j++) { +AVStream *inner_st; +AVStream *outer_st = vs->streams[j]; + +if (hls->max_seg_size > 0) { +if ((outer_st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO) && +(outer_st->codecpar->bit_rate > hls->max_seg_size)) { +av_log(s, AV_LOG_WARNING, "Your video bitrate is bigger than hls_segment_size, " + "(%"PRId64 " > %"PRId64 "), the result maybe not be what you want.", + outer_st->codecpar->bit_rate, hls->max_seg_size); +} } -} -if (outer_st->codecpar->codec_type != AVMEDIA_TYPE_SUBTITLE) -inner_st = vs->avf->streams[j]; -else if (vs->vtt_avf) -inner_st = vs->vtt_avf->streams[0]; -else { -/* We have a subtitle stream, when the user does not want one */ -inner_st = NULL; -continue; +if (outer_st->codecpar->codec_type != AVMEDIA_TYPE_SUBTITLE) +inner_st = vs->avf->streams[j]; +else if (vs->vtt_avf) +inner_st = vs->vtt_avf->streams[0]; +else { +/* We have a subtitle stream, when the user does not want one */ +inner_st = NULL; +continue; +} +avpriv_set_pts_info(outer_st, inner_st->pts_wrap_bits, inner_st->time_base.num, inner_st->time_base.den); } -avpriv_set_pts_info(outer_st, inner_st->pts_wrap_bits, inner_st->time_base.num, inner_st->time_base.den); -} } fail: ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] doc/filters: re-arrange options for testsrc family
ffmpeg | branch: master | Lou Logan| Mon Dec 11 12:46:02 2017 -0900| [555119bd762540a9f17a61bdd92329c8b8feb1e0] | committer: Lou Logan doc/filters: re-arrange options for testsrc family Additionally: * Mention that allrgb and allyuv do not support the "size" option. * Separate examples into subsection. Fixes ticket #6906. Signed-off-by: Lou Logan > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=555119bd762540a9f17a61bdd92329c8b8feb1e0 --- doc/filters.texi | 44 +--- 1 file changed, 25 insertions(+), 19 deletions(-) diff --git a/doc/filters.texi b/doc/filters.texi index 3346438231..f304bbf949 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -17099,28 +17099,24 @@ The sources accept the following parameters: @table @option -@item alpha -Specify the alpha (opacity) of the background, only available in the -@code{testsrc2} source. The value must be between 0 (fully transparent) and -255 (fully opaque, the default). - -@item color, c -Specify the color of the source, only available in the @code{color} -source. For the syntax of this option, check the "Color" section in the -ffmpeg-utils manual. - @item level Specify the level of the Hald CLUT, only available in the @code{haldclutsrc} source. A level of @code{N} generates a picture of @code{N*N*N} by @code{N*N*N} pixels to be used as identity matrix for 3D lookup tables. Each component is coded on a @code{1/(N*N)} scale. +@item color, c +Specify the color of the source, only available in the @code{color} +source. For the syntax of this option, check the "Color" section in the +ffmpeg-utils manual. + @item size, s Specify the size of the sourced video. For the syntax of this option, check the @ref{video size syntax,,"Video size" section in the ffmpeg-utils manual,ffmpeg-utils}. The default value is @code{320x240}. -This option is not available with the @code{haldclutsrc} filter. +This option is not available with the @code{allrgb}, @code{allyuv}, and +@code{haldclutsrc} filters. @item rate, r Specify the frame rate of the sourced video, as the number of frames @@ -17129,9 +17125,6 @@ generated per second. It has to be a string in the format number or a valid video frame rate abbreviation. The default value is "25". -@item sar -Set the sample aspect ratio of the sourced video. - @item duration, d Set the duration of the sourced video. See @ref{time duration syntax,,the Time duration section in the ffmpeg-utils(1) manual,ffmpeg-utils} @@ -17140,6 +17133,14 @@ for the accepted syntax. If not specified, or the expressed duration is negative, the video is supposed to be generated forever. +@item sar +Set the sample aspect ratio of the sourced video. + +@item alpha +Specify the alpha (opacity) of the background, only available in the +@code{testsrc2} source. The value must be between 0 (fully transparent) and +255 (fully opaque, the default). + @item decimals, n Set the number of decimals to show in the timestamp, only available in the @code{testsrc} source. @@ -17149,27 +17150,32 @@ timestamp value multiplied by the power of 10 of the specified value. Default value is 0. @end table -For example the following: +@subsection Examples + +@itemize +@item +Generate a video with a duration of 5.3 seconds, with size +176x144 and a frame rate of 10 frames per second: @example testsrc=duration=5.3:size=qcif:rate=10 @end example -will generate a video with a duration of 5.3 seconds, with size -176x144 and a frame rate of 10 frames per second. - +@item The following graph description will generate a red source with an opacity of 0.2, with size "qcif" and a frame rate of 10 -frames per second. +frames per second: @example color=c=red@@0.2:s=qcif:r=10 @end example +@item If the input content is to be ignored, @code{nullsrc} can be used. The following command generates noise in the luminance plane by employing the @code{geq} filter: @example nullsrc=s=256x256, geq=random(1)*255:128:128 @end example +@end itemize @subsection Commands ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avfilter/avfiltergraph: remove ugly dead code
ffmpeg | branch: master | Paul B Mahol| Mon Dec 11 22:39:26 2017 +0100| [cbd524b26cd825af8bf4b4565a29f4ed2d3f4728] | committer: Paul B Mahol avfilter/avfiltergraph: remove ugly dead code Remnant of old merge. Signed-off-by: Paul B Mahol > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=cbd524b26cd825af8bf4b4565a29f4ed2d3f4728 --- libavfilter/avfiltergraph.c | 5 - 1 file changed, 5 deletions(-) diff --git a/libavfilter/avfiltergraph.c b/libavfilter/avfiltergraph.c index a959a9ef3f..4cc6892404 100644 --- a/libavfilter/avfiltergraph.c +++ b/libavfilter/avfiltergraph.c @@ -518,7 +518,6 @@ static int query_formats(AVFilterGraph *graph, AVClass *log_ctx) AVFilterContext *convert; const AVFilter *filter; AVFilterLink *inlink, *outlink; -char scale_args[256]; char inst_name[30]; if (graph->disable_auto_convert) { @@ -555,10 +554,6 @@ static int query_formats(AVFilterGraph *graph, AVClass *log_ctx) snprintf(inst_name, sizeof(inst_name), "auto_resampler_%d", resampler_count++); -scale_args[0] = '\0'; -if (graph->aresample_swr_opts) -snprintf(scale_args, sizeof(scale_args), "%s", - graph->aresample_swr_opts); if ((ret = avfilter_graph_create_filter(, filter, inst_name, graph->aresample_swr_opts, NULL, graph)) < 0) ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Revert "libavcodec/utils.c: simplify avcodec locking with atomics"
ffmpeg | branch: master | Hendrik Leppkes| Mon Dec 11 20:59:56 2017 +0100| [fd542b6f2026f1aa163882ee0283958598a97c31] | committer: Hendrik Leppkes Revert "libavcodec/utils.c: simplify avcodec locking with atomics" This reverts commit 590136e78da3d091ea99ab5432543d47a559a461. Atomics are not required for this variable, because it is protected through the lock manager, and the use of atomics here is not compatible with the c11 emulation wrappersi. Fixes FATE on MSVC, among other setups which use the compat wrappers. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fd542b6f2026f1aa163882ee0283958598a97c31 --- libavcodec/internal.h | 1 + libavcodec/utils.c| 12 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/libavcodec/internal.h b/libavcodec/internal.h index 6deaf1d204..30cb9a0de1 100644 --- a/libavcodec/internal.h +++ b/libavcodec/internal.h @@ -241,6 +241,7 @@ int ff_init_buffer_info(AVCodecContext *s, AVFrame *frame); void ff_color_frame(AVFrame *frame, const int color[4]); +extern volatile int ff_avcodec_locked; int ff_lock_avcodec(AVCodecContext *log_ctx, const AVCodec *codec); int ff_unlock_avcodec(const AVCodec *codec); diff --git a/libavcodec/utils.c b/libavcodec/utils.c index baf09119fe..873f39f9bd 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -115,7 +115,7 @@ static int (*lockmgr_cb)(void **mutex, enum AVLockOp op) = NULL; #endif -static atomic_bool ff_avcodec_locked; +volatile int ff_avcodec_locked; static atomic_int entangled_thread_counter = ATOMIC_VAR_INIT(0); static void *codec_mutex; static void *avformat_mutex; @@ -1943,7 +1943,6 @@ int av_lockmgr_register(int (*cb)(void **mutex, enum AVLockOp op)) int ff_lock_avcodec(AVCodecContext *log_ctx, const AVCodec *codec) { -_Bool exp = 0; if (codec->caps_internal & FF_CODEC_CAP_INIT_THREADSAFE || !codec->init) return 0; @@ -1959,21 +1958,22 @@ int ff_lock_avcodec(AVCodecContext *log_ctx, const AVCodec *codec) atomic_load(_thread_counter)); if (!lockmgr_cb) av_log(log_ctx, AV_LOG_ERROR, "No lock manager is set, please see av_lockmgr_register()\n"); -atomic_store(_avcodec_locked, 1); +ff_avcodec_locked = 1; ff_unlock_avcodec(codec); return AVERROR(EINVAL); } -av_assert0(atomic_compare_exchange_strong(_avcodec_locked, , 1)); +av_assert0(!ff_avcodec_locked); +ff_avcodec_locked = 1; return 0; } int ff_unlock_avcodec(const AVCodec *codec) { -_Bool exp = 1; if (codec->caps_internal & FF_CODEC_CAP_INIT_THREADSAFE || !codec->init) return 0; -av_assert0(atomic_compare_exchange_strong(_avcodec_locked, , 0)); +av_assert0(ff_avcodec_locked); +ff_avcodec_locked = 0; atomic_fetch_add(_thread_counter, -1); if (lockmgr_cb) { if ((*lockmgr_cb)(_mutex, AV_LOCK_RELEASE)) ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog