1cabdff1aSopenharmony_ci/* 2cabdff1aSopenharmony_ci * RAW PCM muxers 3cabdff1aSopenharmony_ci * Copyright (c) 2002 Fabrice Bellard 4cabdff1aSopenharmony_ci * 5cabdff1aSopenharmony_ci * This file is part of FFmpeg. 6cabdff1aSopenharmony_ci * 7cabdff1aSopenharmony_ci * FFmpeg is free software; you can redistribute it and/or 8cabdff1aSopenharmony_ci * modify it under the terms of the GNU Lesser General Public 9cabdff1aSopenharmony_ci * License as published by the Free Software Foundation; either 10cabdff1aSopenharmony_ci * version 2.1 of the License, or (at your option) any later version. 11cabdff1aSopenharmony_ci * 12cabdff1aSopenharmony_ci * FFmpeg is distributed in the hope that it will be useful, 13cabdff1aSopenharmony_ci * but WITHOUT ANY WARRANTY; without even the implied warranty of 14cabdff1aSopenharmony_ci * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15cabdff1aSopenharmony_ci * Lesser General Public License for more details. 16cabdff1aSopenharmony_ci * 17cabdff1aSopenharmony_ci * You should have received a copy of the GNU Lesser General Public 18cabdff1aSopenharmony_ci * License along with FFmpeg; if not, write to the Free Software 19cabdff1aSopenharmony_ci * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20cabdff1aSopenharmony_ci */ 21cabdff1aSopenharmony_ci 22cabdff1aSopenharmony_ci#include "config_components.h" 23cabdff1aSopenharmony_ci 24cabdff1aSopenharmony_ci#include "avformat.h" 25cabdff1aSopenharmony_ci#include "rawenc.h" 26cabdff1aSopenharmony_ci 27cabdff1aSopenharmony_ci#define PCMDEF_0(name_, long_name_, ext, codec) 28cabdff1aSopenharmony_ci#define PCMDEF_1(name_, long_name_, ext, codec) \ 29cabdff1aSopenharmony_ciconst AVOutputFormat ff_pcm_ ## name_ ## _muxer = { \ 30cabdff1aSopenharmony_ci .name = #name_, \ 31cabdff1aSopenharmony_ci .long_name = NULL_IF_CONFIG_SMALL(long_name_), \ 32cabdff1aSopenharmony_ci .extensions = ext, \ 33cabdff1aSopenharmony_ci .audio_codec = codec, \ 34cabdff1aSopenharmony_ci .video_codec = AV_CODEC_ID_NONE, \ 35cabdff1aSopenharmony_ci .write_packet = ff_raw_write_packet, \ 36cabdff1aSopenharmony_ci .flags = AVFMT_NOTIMESTAMPS, \ 37cabdff1aSopenharmony_ci}; 38cabdff1aSopenharmony_ci#define PCMDEF_2(name, long_name, ext, codec, enabled) \ 39cabdff1aSopenharmony_ci PCMDEF_ ## enabled(name, long_name, ext, codec) 40cabdff1aSopenharmony_ci#define PCMDEF_3(name, long_name, ext, codec, config) \ 41cabdff1aSopenharmony_ci PCMDEF_2(name, long_name, ext, codec, config) 42cabdff1aSopenharmony_ci#define PCMDEF(name, long_name, ext, uppercase) \ 43cabdff1aSopenharmony_ci PCMDEF_3(name, long_name, ext, AV_CODEC_ID_PCM_ ## uppercase, \ 44cabdff1aSopenharmony_ci CONFIG_PCM_ ## uppercase ## _MUXER) 45cabdff1aSopenharmony_ci 46cabdff1aSopenharmony_ciPCMDEF(f64be, "PCM 64-bit floating-point big-endian", NULL, F64BE) 47cabdff1aSopenharmony_ciPCMDEF(f64le, "PCM 64-bit floating-point little-endian", NULL, F64LE) 48cabdff1aSopenharmony_ciPCMDEF(f32be, "PCM 32-bit floating-point big-endian", NULL, F32BE) 49cabdff1aSopenharmony_ciPCMDEF(f32le, "PCM 32-bit floating-point little-endian", NULL, F32LE) 50cabdff1aSopenharmony_ciPCMDEF(s32be, "PCM signed 32-bit big-endian", NULL, S32BE) 51cabdff1aSopenharmony_ciPCMDEF(s32le, "PCM signed 32-bit little-endian", NULL, S32LE) 52cabdff1aSopenharmony_ciPCMDEF(s24be, "PCM signed 24-bit big-endian", NULL, S24BE) 53cabdff1aSopenharmony_ciPCMDEF(s24le, "PCM signed 24-bit little-endian", NULL, S24LE) 54cabdff1aSopenharmony_ciPCMDEF(s16be, "PCM signed 16-bit big-endian", AV_NE("sw", NULL), S16BE) 55cabdff1aSopenharmony_ciPCMDEF(s16le, "PCM signed 16-bit little-endian", AV_NE(NULL, "sw"), S16LE) 56cabdff1aSopenharmony_ciPCMDEF(s8, "PCM signed 8-bit", "sb", S8) 57cabdff1aSopenharmony_ciPCMDEF(u32be, "PCM unsigned 32-bit big-endian", NULL, U32BE) 58cabdff1aSopenharmony_ciPCMDEF(u32le, "PCM unsigned 32-bit little-endian", NULL, U32LE) 59cabdff1aSopenharmony_ciPCMDEF(u24be, "PCM unsigned 24-bit big-endian", NULL, U24BE) 60cabdff1aSopenharmony_ciPCMDEF(u24le, "PCM unsigned 24-bit little-endian", NULL, U24LE) 61cabdff1aSopenharmony_ciPCMDEF(u16be, "PCM unsigned 16-bit big-endian", AV_NE("uw", NULL), U16BE) 62cabdff1aSopenharmony_ciPCMDEF(u16le, "PCM unsigned 16-bit little-endian", AV_NE(NULL, "uw"), U16LE) 63cabdff1aSopenharmony_ciPCMDEF(u8, "PCM unsigned 8-bit", "ub", U8) 64cabdff1aSopenharmony_ciPCMDEF(alaw, "PCM A-law", "al", ALAW) 65cabdff1aSopenharmony_ciPCMDEF(mulaw, "PCM mu-law", "ul", MULAW) 66cabdff1aSopenharmony_ciPCMDEF(vidc, "PCM Archimedes VIDC", NULL, VIDC) 67