Quoting Mark Thompson (2017-05-14 23:24:14)
> Supports all streams that the coded bitstream infrastructure does
> (currently H.264, H.265 and MPEG-2).
> ---
>  doc/bitstream_filters.texi     |  14 ++++
>  libavcodec/Makefile            |   2 +
>  libavcodec/bitstream_filters.c |   1 +
>  libavcodec/trace_headers_bsf.c | 167 
> +++++++++++++++++++++++++++++++++++++++++
>  4 files changed, 184 insertions(+)
>  create mode 100644 libavcodec/trace_headers_bsf.c
> 
> diff --git a/doc/bitstream_filters.texi b/doc/bitstream_filters.texi
> index 64f91f4b5..2e9106005 100644
> --- a/doc/bitstream_filters.texi
> +++ b/doc/bitstream_filters.texi
> @@ -95,6 +95,20 @@ This bitstream filter passes the packets through unchanged.
>  
>  @section remove_extradata
>  
> +@section trace_headers
> +
> +Generate trace output containing all syntax elements in the coded
> +stream headers (everything above the level of individual coded blocks).
> +
> +Supports H.264 and MPEG-2.
> +
> +The trace output is written to the normal logging facility by default.
> +
> +@table @option
> +@item output_file
> +Write trace output to this file instead.

I don't like this option, for multiple reasons.

1) IMO the only sane use case for this bsf is debugging purposes (from
avconv or something like that). This should btw be explicitly mentioned
in the docs. This option being present can easily signal to people that
you can use it as a generic stream analyzer, which this API is very much
not suited for. So just don't.

2) libavcodec is not a place that should do IO directly. The users don't
expect it, so it might even be a security issue in some cases. I know
some other code does it, but those are IMO bugs to be removed.

-- 
Anton Khirnov
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to