[FFmpeg-devel] [PATCH v4 8/8] avformat: remove retimeinterleave

Marton Balint cus at passwd.hu
Tue Apr 28 20:37:25 EEST 2020


It is not used by anything anymore.

Signed-off-by: Marton Balint <cus at passwd.hu>
---
 libavformat/retimeinterleave.c | 51 ------------------------------------------
 libavformat/retimeinterleave.h | 51 ------------------------------------------
 2 files changed, 102 deletions(-)
 delete mode 100644 libavformat/retimeinterleave.c
 delete mode 100644 libavformat/retimeinterleave.h

diff --git a/libavformat/retimeinterleave.c b/libavformat/retimeinterleave.c
deleted file mode 100644
index 9f874e3626..0000000000
--- a/libavformat/retimeinterleave.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Retime Interleaving functions
- *
- * Copyright (c) 2009 Baptiste Coudurier <baptiste dot coudurier at gmail dot com>
- *
- * This file is part of FFmpeg.
- *
- * FFmpeg is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * FFmpeg is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with FFmpeg; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "libavutil/mathematics.h"
-#include "avformat.h"
-#include "retimeinterleave.h"
-#include "internal.h"
-
-void ff_retime_interleave_init(RetimeInterleaveContext *aic, AVRational time_base)
-{
-    aic->time_base = time_base;
-}
-
-int ff_retime_interleave(AVFormatContext *s, AVPacket *out, AVPacket *pkt, int flush,
-                        int (*get_packet)(AVFormatContext *, AVPacket *, AVPacket *, int),
-                        int (*compare_ts)(AVFormatContext *, const AVPacket *, const AVPacket *))
-{
-    int ret;
-
-    if (pkt) {
-        AVStream *st = s->streams[pkt->stream_index];
-        RetimeInterleaveContext *aic = st->priv_data;
-        pkt->duration = av_rescale_q(pkt->duration, st->time_base, aic->time_base);
-        // rewrite pts and dts to be decoded time line position
-        pkt->pts = pkt->dts = aic->dts;
-        aic->dts += pkt->duration;
-        if ((ret = ff_interleave_add_packet(s, pkt, compare_ts)) < 0)
-            return ret;
-    }
-
-    return get_packet(s, out, NULL, flush);
-}
diff --git a/libavformat/retimeinterleave.h b/libavformat/retimeinterleave.h
deleted file mode 100644
index de0a7442b0..0000000000
--- a/libavformat/retimeinterleave.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * audio interleaving prototypes and declarations
- *
- * Copyright (c) 2009 Baptiste Coudurier <baptiste dot coudurier at gmail dot com>
- *
- * This file is part of FFmpeg.
- *
- * FFmpeg is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * FFmpeg is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with FFmpeg; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef AVFORMAT_RETIMEINTERLEAVE_H
-#define AVFORMAT_RETIMEINTERLEAVE_H
-
-#include "avformat.h"
-
-typedef struct RetimeInterleaveContext {
-    uint64_t dts;                 ///< current dts
-    AVRational time_base;         ///< time base of output packets
-} RetimeInterleaveContext;
-
-/**
- * Init the retime interleave context
- */
-void ff_retime_interleave_init(RetimeInterleaveContext *aic, AVRational time_base);
-
-/**
- * Retime packets per RetimeInterleaveContext->time_base and interleave them
- * correctly.
- * The first element of AVStream->priv_data must be RetimeInterleaveContext
- * when using this function.
- *
- * @param get_packet function will output a packet when streams are correctly interleaved.
- * @param compare_ts function will compare AVPackets and decide interleaving order.
- */
-int ff_retime_interleave(AVFormatContext *s, AVPacket *out, AVPacket *pkt, int flush,
-                        int (*get_packet)(AVFormatContext *, AVPacket *, AVPacket *, int),
-                        int (*compare_ts)(AVFormatContext *, const AVPacket *, const AVPacket *));
-
-#endif /* AVFORMAT_AUDIOINTERLEAVE_H */
-- 
2.16.4



More information about the ffmpeg-devel mailing list