Compare commits

...

2 Commits

Author SHA1 Message Date
Icedream f9c5b5e0c6
Regenerate gen_formats.go. 2018-07-09 12:23:29 +02:00
Icedream 426c26c613
Update format list generator to support aliases. 2018-07-09 12:23:15 +02:00
2 changed files with 83 additions and 11 deletions

View File

@ -37,6 +37,11 @@ var (
// PCM A-law
Mux_Format_ALAW = Format_ALAW
// ALSA audio output
Format_ALSA = "alsa"
// ALSA audio output
Mux_Format_ALSA = Format_ALSA
// 3GPP AMR
Format_AMR = "amr"
// 3GPP AMR
@ -52,6 +57,11 @@ var (
// raw aptX (Audio Processing Technology for Bluetooth)
Mux_Format_APTX = Format_APTX
// raw aptX HD (Audio Processing Technology for Bluetooth)
Format_APTX_HD = "aptx_hd"
// raw aptX HD (Audio Processing Technology for Bluetooth)
Mux_Format_APTX_HD = Format_APTX_HD
// ASF (Advanced / Active Streaming Format)
Format_ASF = "asf"
// ASF (Advanced / Active Streaming Format)
@ -102,6 +112,16 @@ var (
// raw Chinese AVS (Audio Video Standard) video
Mux_Format_CAVSVIDEO = Format_CAVSVIDEO
// codec2 .c2 muxer
Format_CODEC2 = "codec2"
// codec2 .c2 muxer
Mux_Format_CODEC2 = Format_CODEC2
// raw codec2 muxer
Format_CODEC2RAW = "codec2raw"
// raw codec2 muxer
Mux_Format_CODEC2RAW = Format_CODEC2RAW
// CRC testing
Format_CRC = "crc"
// CRC testing
@ -177,6 +197,11 @@ var (
// PCM 64-bit floating-point little-endian
Mux_Format_F64LE = Format_F64LE
// Linux framebuffer
Format_FBDEV = "fbdev"
// Linux framebuffer
Mux_Format_FBDEV = Format_FBDEV
// FFmpeg metadata in text
Format_FFMETADATA = "ffmetadata"
// FFmpeg metadata in text
@ -187,6 +212,16 @@ var (
// FIFO queue pseudo-muxer
Mux_Format_FIFO = Format_FIFO
// Fifo test muxer
Format_FIFO_TEST = "fifo_test"
// Fifo test muxer
Mux_Format_FIFO_TEST = Format_FIFO_TEST
// Sega FILM / CPK
Format_FILM_CPK = "film_cpk"
// Sega FILM / CPK
Mux_Format_FILM_CPK = Format_FILM_CPK
// Adobe Filmstrip
Format_FILMSTRIP = "filmstrip"
// Adobe Filmstrip
@ -487,11 +522,21 @@ var (
// Ogg Opus
Mux_Format_OPUS = Format_OPUS
// OSS (Open Sound System) playback
Format_OSS = "oss"
// OSS (Open Sound System) playback
Mux_Format_OSS = Format_OSS
// PSP MP4 (MPEG-4 Part 14)
Format_PSP = "psp"
// PSP MP4 (MPEG-4 Part 14)
Mux_Format_PSP = Format_PSP
// Pulse audio output
Format_PULSE = "pulse"
// Pulse audio output
Mux_Format_PULSE = Format_PULSE
// raw video
Format_RAWVIDEO = "rawvideo"
// raw video
@ -567,15 +612,25 @@ var (
// SAP output
Mux_Format_SAP = Format_SAP
// raw SBC
Format_SBC = "sbc"
// raw SBC
Mux_Format_SBC = Format_SBC
// Scenarist Closed Captions
Format_SCC = "scc"
// Scenarist Closed Captions
Mux_Format_SCC = Format_SCC
// SDL2 output device
Format_SDL, SDL2 = "sdl,sdl2"
Format_SDL = "sdl"
// SDL2 output device
Mux_Format_SDL, SDL2 = Format_SDL, SDL2
Mux_Format_SDL = Format_SDL
// SDL2 output device
Format_SDL2 = "sdl2"
// SDL2 output device
Mux_Format_SDL2 = Format_SDL2
// segment
Format_SEGMENT = "segment"
@ -618,9 +673,14 @@ var (
Mux_Format_SRT = Format_SRT
// streaming segment muxer
Format_STREAM_SEGMENT, SSEGMENT = "stream_segment,ssegment"
Format_STREAM_SEGMENT = "stream_segment"
// streaming segment muxer
Mux_Format_STREAM_SEGMENT, SSEGMENT = Format_STREAM_SEGMENT, SSEGMENT
Mux_Format_STREAM_SEGMENT = Format_STREAM_SEGMENT
// streaming segment muxer
Format_SSEGMENT = "ssegment"
// streaming segment muxer
Mux_Format_SSEGMENT = Format_SSEGMENT
// raw HDMV Presentation Graphic Stream subtitles
Format_SUP = "sup"
@ -692,6 +752,11 @@ var (
// uncoded framecrc testing
Mux_Format_UNCODEDFRAMECRC = Format_UNCODEDFRAMECRC
// Video4Linux2 output device
Format_V4L2 = "v4l2"
// Video4Linux2 output device
Mux_Format_V4L2 = Format_V4L2
// raw VC-1 video
Format_VC1 = "vc1"
// raw VC-1 video
@ -762,6 +827,11 @@ var (
// raw WavPack
Mux_Format_WV = Format_WV
// XV (XVideo) output device
Format_XV = "xv"
// XV (XVideo) output device
Mux_Format_XV = Format_XV
// YUV4MPEG pipe
Format_YUV4MPEGPIPE = "yuv4mpegpipe"
// YUV4MPEG pipe

View File

@ -51,21 +51,23 @@ var (
muxingSupported := text[2] == 'E'
text = text[4:]
cols := strings.Fields(text)
id := cols[0]
ids := strings.Split(cols[0], ",")
name := strings.Join(cols[1:], " ")
code += fmt.Sprintf(`
for _, id := range ids {
code += fmt.Sprintf(`
// %s
Format_%s = %q
`, name, strings.ToUpper(id), id)
if demuxingSupported {
code += fmt.Sprintf(` // %s
if demuxingSupported {
code += fmt.Sprintf(` // %s
Demux_Format_%s = Format_%s
`, name, strings.ToUpper(id), strings.ToUpper(id))
}
if muxingSupported {
code += fmt.Sprintf(` // %s
}
if muxingSupported {
code += fmt.Sprintf(` // %s
Mux_Format_%s = Format_%s
`, name, strings.ToUpper(id), strings.ToUpper(id))
}
}
}