asrc_anullsrc.c 1.44 KB
Newer Older
1
/*
2
 * This file is part of Libav.
3
 *
4
 * Libav is free software; you can redistribute it and/or
5 6 7 8
 * 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.
 *
9
 * Libav is distributed in the hope that it will be useful,
10 11 12 13 14
 * 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
15
 * License along with Libav; if not, write to the Free Software
16 17 18 19 20 21 22 23
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 */

/**
 * @file
 * null audio source
 */

24 25 26
#include <inttypes.h>
#include <stdio.h>

27 28
#include "libavutil/channel_layout.h"
#include "libavutil/internal.h"
29
#include "avfilter.h"
30
#include "internal.h"
31 32 33

static int request_frame(AVFilterLink *link)
{
34
    return AVERROR_EOF;
35 36
}

37 38 39 40 41 42 43 44 45
static const AVFilterPad avfilter_asrc_anullsrc_outputs[] = {
    {
        .name          = "default",
        .type          = AVMEDIA_TYPE_AUDIO,
        .request_frame = request_frame,
    },
    { NULL }
};

46
AVFilter ff_asrc_anullsrc = {
47 48 49
    .name        = "anullsrc",
    .description = NULL_IF_CONFIG_SMALL("Null audio source, never return audio frames."),

50
    .inputs      = NULL,
51

52
    .outputs     = avfilter_asrc_anullsrc_outputs,
53
};