[FFmpeg-devel] [PATCH 5/5] lavf: add uncodedframecrc test muxer.

Michael Niedermayer michaelni at gmx.at
Thu Jan 16 05:36:55 CET 2014


On Wed, Jan 15, 2014 at 11:30:04PM +0100, Nicolas George wrote:
> Signed-off-by: Nicolas George <george at nsup.org>
> ---
>  libavformat/Makefile             |   1 +
>  libavformat/allformats.c         |   1 +
>  libavformat/avformat.h           |   6 +-
>  libavformat/uncodedframecrcenc.c | 171 +++++++++++++++++++++++++++++++++++++++
>  4 files changed, 176 insertions(+), 3 deletions(-)
>  create mode 100644 libavformat/uncodedframecrcenc.c
> 
> 
> ALSA and XVideo are great for casual testing, not so much for valgrind.
> 
> The output matches the output of framecrc for u8 audio and packed 8-bits
> video.
> 
> 
> diff --git a/libavformat/Makefile b/libavformat/Makefile
> index 383f82f..704bd62 100644
> --- a/libavformat/Makefile
> +++ b/libavformat/Makefile
> @@ -387,6 +387,7 @@ OBJS-$(CONFIG_TRUEHD_MUXER)              += rawenc.o
>  OBJS-$(CONFIG_TTA_DEMUXER)               += tta.o apetag.o img2.o
>  OBJS-$(CONFIG_TTY_DEMUXER)               += tty.o sauce.o
>  OBJS-$(CONFIG_TXD_DEMUXER)               += txd.o
> +OBJS-$(CONFIG_UNCODEDFRAMECRC_MUXER)     += uncodedframecrcenc.o framehash.o
>  OBJS-$(CONFIG_VC1_DEMUXER)               += rawdec.o
>  OBJS-$(CONFIG_VC1_MUXER)                 += rawenc.o
>  OBJS-$(CONFIG_VC1T_DEMUXER)              += vc1test.o
> diff --git a/libavformat/allformats.c b/libavformat/allformats.c
> index f1039dd..0ee2246 100644
> --- a/libavformat/allformats.c
> +++ b/libavformat/allformats.c
> @@ -284,6 +284,7 @@ void av_register_all(void)
>      REGISTER_DEMUXER (TTA,              tta);
>      REGISTER_DEMUXER (TXD,              txd);
>      REGISTER_DEMUXER (TTY,              tty);
> +    REGISTER_MUXER   (UNCODEDFRAMECRC,  uncodedframecrc);
>      REGISTER_MUXDEMUX(VC1,              vc1);
>      REGISTER_MUXDEMUX(VC1T,             vc1t);
>      REGISTER_DEMUXER (VIVO,             vivo);

> diff --git a/libavformat/avformat.h b/libavformat/avformat.h
> index 3fe6c3e..4c03985 100644
> --- a/libavformat/avformat.h
> +++ b/libavformat/avformat.h
> @@ -460,7 +460,7 @@ typedef struct AVOutputFormat {
>       * See av_write_uncoded_frame() for details.
>       */
>      int (*write_uncoded_frame)(struct AVFormatContext *, int stream_index,
> -                               AVFrame **frame, unsigned flags);
> +                               AVFrame *frame, unsigned flags);
>  } AVOutputFormat;
>  /**
>   * @}
> @@ -1937,8 +1937,8 @@ int av_write_uncoded_frame(AVFormatContext *s, int stream_index,
>   * To test whether it is possible to use it with a given muxer and stream,
>   * use av_write_uncoded_frame_query().
>   *
> - * The caller gives up ownership of the frame and must not access it
> - * afterwards.
> + * The caller keeps ownership of the frame and is responsible for freeing
> + * it.
>   *
>   * @return  >=0 for success, a negative code on error
>   */

stray change ?


[...]
> +static int write_packet(struct AVFormatContext *s, AVPacket *pkt)
> +{
> +    return AVERROR(ENOSYS);
> +}

i wonder if we need/want a framecrc muxer that can handle both ?


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

It is dangerous to be right in matters on which the established authorities
are wrong. -- Voltaire
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140116/e5449ee3/attachment.asc>


More information about the ffmpeg-devel mailing list