config FFMPEG_X86ASM
	bool "Compile x86 ASM"
	depends on (x86_64 || (i386 && !(TARGET_x86_geode || TARGET_x86_legacy)))
	help
		This compiles ffmpeg with x86 assembly optimizations. This option is needed as NASM is
		totally broken with CPU_TYPE=pentium.
	default y

if PACKAGE_libffmpeg-custom

comment "Build Licensing"

config FFMPEG_CUSTOM_GPL
	bool "Allow use of GPL code"
	help
		By default, FFMpeg is licensed under the LGPL. This builds a GPL licensed version.
		Some software requires this, such as libx264.
	default y

config FFMPEG_CUSTOM_GPLV3
	bool "Use (L)GPL v3"
	help
		Uses the LPGL v3 if GPL isn't selected, or GPL v3 if it is.

config FFMPEG_CUSTOM_NONFREE
	bool "Use code with complex licensing requirements; see help"
	help
		This sets --enable-nonfree, which in almost all cases, will prohibit redistribution of the resulting package.
		Use this with care.
	default n

config FFMPEG_CUSTOM_PATENTED
	bool "Include patented codecs and technologies"
	default BUILD_PATENTED

comment "Build Properties"

config FFMPEG_CUSTOM_LARGE
	bool "Build libffmpeg for performance instead of minimizing size on disk"
	default y if ( x86_64 )
	default n

comment "Profiles"

config FFMPEG_CUSTOM_MINIDLNA_SUPPORT
	bool "Include support for minidlna"
	select FFMPEG_CUSTOM_DECODER_aac
	select FFMPEG_CUSTOM_DECODER_ac3
	select FFMPEG_CUSTOM_DECODER_flac
	select FFMPEG_CUSTOM_DECODER_h264 if (BUILD_PATENTED)
	select FFMPEG_CUSTOM_DECODER_hevc if (BUILD_PATENTED)
	select FFMPEG_CUSTOM_DECODER_jpegls
	select FFMPEG_CUSTOM_DECODER_mp2
	select FFMPEG_CUSTOM_DECODER_mp3
	select FFMPEG_CUSTOM_DECODER_mpeg1video
	select FFMPEG_CUSTOM_DECODER_mpeg2video
	select FFMPEG_CUSTOM_DECODER_mpeg4
	select FFMPEG_CUSTOM_DECODER_mpegvideo
	select FFMPEG_CUSTOM_DECODER_png
	select FFMPEG_CUSTOM_DECODER_opus
	select FFMPEG_CUSTOM_DECODER_vc1 if (BUILD_PATENTED)
	select FFMPEG_CUSTOM_DECODER_vorbis
	select FFMPEG_CUSTOM_DECODER_wmav1
	select FFMPEG_CUSTOM_DECODER_wmav2
	select FFMPEG_CUSTOM_DEMUXER_avi
	select FFMPEG_CUSTOM_DEMUXER_flac
	select FFMPEG_CUSTOM_DEMUXER_matroska
	select FFMPEG_CUSTOM_DEMUXER_mov
	select FFMPEG_CUSTOM_DEMUXER_mp3
	select FFMPEG_CUSTOM_DEMUXER_mpegps
	select FFMPEG_CUSTOM_DEMUXER_mpegts
	select FFMPEG_CUSTOM_DEMUXER_mpegvideo
	select FFMPEG_CUSTOM_DEMUXER_ogg
	select FFMPEG_CUSTOM_PROTOCOL_file

config FFMPEG_CUSTOM_AUDIO_DEC_SUPPORT
	bool "Include support for most audio decoding requirements"
	select FFMPEG_CUSTOM_DECODER_aac
	select FFMPEG_CUSTOM_DECODER_aac_latm
	select FFMPEG_CUSTOM_DECODER_ac3
	select FFMPEG_CUSTOM_SELECT_adpcm
	select FFMPEG_CUSTOM_DECODER_alac
	select FFMPEG_CUSTOM_DECODER_amrnb
	select FFMPEG_CUSTOM_DECODER_amrwb
	select FFMPEG_CUSTOM_DECODER_ape
	select FFMPEG_CUSTOM_DECODER_atrac3 if (BUILD_PATENTED)
	select FFMPEG_CUSTOM_DECODER_flac
	select FFMPEG_CUSTOM_DECODER_mp2
	select FFMPEG_CUSTOM_DECODER_mp3
	select FFMPEG_CUSTOM_DECODER_mpc7
	select FFMPEG_CUSTOM_DECODER_mpc8
	select FFMPEG_CUSTOM_DECODER_opus
	select FFMPEG_CUSTOM_DECODER_pcm_s16be
	select FFMPEG_CUSTOM_DECODER_pcm_s16le
	select FFMPEG_CUSTOM_DECODER_vorbis
	select FFMPEG_CUSTOM_DECODER_wavpack
	select FFMPEG_CUSTOM_DECODER_wmav1
	select FFMPEG_CUSTOM_DECODER_wmav2
	select FFMPEG_CUSTOM_DECODER_wmalossless
	select FFMPEG_CUSTOM_DECODER_wmapro
	select FFMPEG_CUSTOM_DECODER_zlib
	select FFMPEG_CUSTOM_DEMUXER_aac
	select FFMPEG_CUSTOM_DEMUXER_ac3
	select FFMPEG_CUSTOM_DEMUXER_aiff
	select FFMPEG_CUSTOM_DEMUXER_amr
	select FFMPEG_CUSTOM_DEMUXER_ape
	select FFMPEG_CUSTOM_DEMUXER_avi
	select FFMPEG_CUSTOM_DEMUXER_flac
	select FFMPEG_CUSTOM_DEMUXER_ffm
	select FFMPEG_CUSTOM_DEMUXER_matroska
	select FFMPEG_CUSTOM_DEMUXER_mp3
	select FFMPEG_CUSTOM_DEMUXER_mov
	select FFMPEG_CUSTOM_DEMUXER_mpc
	select FFMPEG_CUSTOM_DEMUXER_mpc8
	select FFMPEG_CUSTOM_DEMUXER_mpegts
	select FFMPEG_CUSTOM_DEMUXER_ogg
	select FFMPEG_CUSTOM_DEMUXER_rm
	select FFMPEG_CUSTOM_DEMUXER_rtsp
	select FFMPEG_CUSTOM_DEMUXER_rtp
	select FFMPEG_CUSTOM_DEMUXER_sdp
	select FFMPEG_CUSTOM_DEMUXER_wav
	select FFMPEG_CUSTOM_DEMUXER_wv
	select FFMPEG_CUSTOM_PROTOCOL_file
	select FFMPEG_CUSTOM_PROTOCOL_http
	select FFMPEG_CUSTOM_PROTOCOL_rtp
	select FFMPEG_CUSTOM_PROTOCOL_tcp
	select FFMPEG_CUSTOM_PROTOCOL_udp

config FFMPEG_CUSTOM_PROGRAMS
	bool "Include ffmpeg command-line utilities"
	select PACKAGE_ffmpeg-custom
	select PACKAGE_ffprobe-custom

comment "External Libraries"

config FFMPEG_CUSTOM_SELECT_libfdk-aac
	bool "Fraunhofer FDK AAC encoding library (libfdk-aac)"
	depends on FFMPEG_CUSTOM_NONFREE
	depends on PACKAGE_fdk-aac

config FFMPEG_CUSTOM_SELECT_libmp3lame
	bool "Libmp3lame"
	depends on PACKAGE_lame-lib
	select FFMPEG_CUSTOM_DECODER_mp3
	select FFMPEG_CUSTOM_MUXER_mp3
	select FFMPEG_CUSTOM_DEMUXER_mp3

config FFMPEG_CUSTOM_SELECT_libopus
	bool "Libopus"

config FFMPEG_CUSTOM_SELECT_libshine
	bool "Libshine"

config FFMPEG_CUSTOM_SELECT_libx264
	bool "Libx264"
	depends on FFMPEG_CUSTOM_PATENTED
	depends on FFMPEG_CUSTOM_GPL
	depends on PACKAGE_libx264
	select FFMPEG_CUSTOM_DECODER_h264
	select FFMPEG_CUSTOM_MUXER_h264
	select FFMPEG_CUSTOM_DEMUXER_h264

comment "Encoders"

config FFMPEG_CUSTOM_ENCODER_ac3
	bool "AC3"

config FFMPEG_CUSTOM_ENCODER_jpegls
	bool "JPEG-LS"

config FFMPEG_CUSTOM_ENCODER_mpeg1video
	bool "MPEG-1 Video"

config FFMPEG_CUSTOM_ENCODER_mpeg2video
	bool "MPEG-2 Video"

config FFMPEG_CUSTOM_ENCODER_mpeg4
	bool "MPEG-4"

config FFMPEG_CUSTOM_ENCODER_pcm_s16be
	bool "PCM signed 16-bit big-endian"

config FFMPEG_CUSTOM_ENCODER_pcm_s16le
	bool "PCM signed 16-bit little-endian"

config FFMPEG_CUSTOM_ENCODER_png
	bool "PNG"
	select FFMPEG_CUSTOM_ENCODER_zlib

config FFMPEG_CUSTOM_ENCODER_vorbis
	bool "Vorbis"

config FFMPEG_CUSTOM_ENCODER_zlib
	bool "Zlib"

comment "Decoders"

config FFMPEG_CUSTOM_DECODER_aac
	bool "AAC (Advanced Audio Coding)"

config FFMPEG_CUSTOM_SELECT_adpcm
	bool "ADPCM (multiple types)"

config FFMPEG_CUSTOM_DECODER_ac3
	bool "AC3"

config FFMPEG_CUSTOM_DECODER_alac
	bool "ALAC"

config FFMPEG_CUSTOM_DECODER_amrnb
	bool "AMR-NB"
	select FFMPEG_CUSTOM_DEMUXER_amr

config FFMPEG_CUSTOM_DECODER_amrwb
	bool "AMR-WB"
	select FFMPEG_CUSTOM_DEMUXER_amr

config FFMPEG_CUSTOM_DECODER_ape
	bool "APE"

config FFMPEG_CUSTOM_DECODER_atrac3
	bool "ATRAC3"
	depends on FFMPEG_CUSTOM_PATENTED

config FFMPEG_CUSTOM_DECODER_flac
	bool "FLAC"

config FFMPEG_CUSTOM_DECODER_gif
	bool "GIF"

config FFMPEG_CUSTOM_DECODER_h264
	bool "H.264"
	depends on FFMPEG_CUSTOM_PATENTED

config FFMPEG_CUSTOM_DECODER_hevc
	bool "HEVC / H.265 Video"
	depends on FFMPEG_CUSTOM_PATENTED

config FFMPEG_CUSTOM_DECODER_jpegls
	bool "JPEG-LS"

config FFMPEG_CUSTOM_DECODER_mp2
	bool "MP2 (MPEG Audio Layer 2)"

config FFMPEG_CUSTOM_DECODER_mp3
	bool "MP3 (MPEG Audio Layer 3)"

config FFMPEG_CUSTOM_DECODER_mpegvideo
	bool "MPEG Video"

config FFMPEG_CUSTOM_DECODER_mpeg1video
	bool "MPEG-1 Video"

config FFMPEG_CUSTOM_DECODER_mpeg2video
	bool "MPEG-2 Video"

config FFMPEG_CUSTOM_DECODER_mpeg4
	bool "MPEG-4"

config FFMPEG_CUSTOM_DECODER_mpc7
	bool "Musepack 7"
	select FFMPEG_CUSTOM_DEMUXER_mpc

config FFMPEG_CUSTOM_DECODER_mpc8
	bool "Musepack 8"
	select FFMPEG_CUSTOM_DEMUXER_mpc8

config FFMPEG_CUSTOM_DECODER_opus
	bool "Opus"

config FFMPEG_CUSTOM_DECODER_pcm_s16be
	bool "PCM signed 16-bit big-endian"

config FFMPEG_CUSTOM_DECODER_pcm_s16le
	bool "PCM signed 16-bit little-endian"

config FFMPEG_CUSTOM_DECODER_png
	bool "PNG"
	select FFMPEG_CUSTOM_DECODER_zlib

config FFMPEG_CUSTOM_DECODER_vc1
	bool "VC-1 / WMV9"
	depends on FFMPEG_CUSTOM_PATENTED

config FFMPEG_CUSTOM_DECODER_vorbis
	bool "Vorbis"
	select FFMPEG_CUSTOM_DEMUXER_ogg

config FFMPEG_CUSTOM_DECODER_wavpack
	bool "Wavpack"

config FFMPEG_CUSTOM_DECODER_wmav1
	bool "WMAv1"

config FFMPEG_CUSTOM_DECODER_wmav2
	bool "WMAv2"

config FFMPEG_CUSTOM_DECODER_zlib
	bool "Zlib"

comment "Muxers"

config FFMPEG_CUSTOM_MUXER_ac3
	bool "AC3"

config FFMPEG_CUSTOM_MUXER_h264
	bool "H.264 Raw Video"
	depends on FFMPEG_CUSTOM_PATENTED

config FFMPEG_CUSTOM_MUXER_hevc
	bool "HEVC / H265 Raw Video"
	depends on FFMPEG_CUSTOM_PATENTED

config FFMPEG_CUSTOM_MUXER_mp3
	bool "MP3 (MPEG Audio Layer 3)"

config FFMPEG_CUSTOM_MUXER_mp4
	bool "MP4"

config FFMPEG_CUSTOM_MUXER_mpeg1video
	bool "MPEG-1 Video"

config FFMPEG_CUSTOM_MUXER_mpeg2video
	bool "MPEG-2 Video"

config FFMPEG_CUSTOM_MUXER_mpegts
	bool "MPEG-2 (TS)"

config FFMPEG_CUSTOM_MUXER_ogg
	bool "Ogg"

config FFMPEG_CUSTOM_MUXER_rtp
	bool "RTP"

comment "Demuxers"

config FFMPEG_CUSTOM_DEMUXER_aac
	bool "AAC"

config FFMPEG_CUSTOM_DEMUXER_avi
	bool "AVI (Audio Video Interleave)"

config FFMPEG_CUSTOM_DEMUXER_ac3
	bool "AC3"

config FFMPEG_CUSTOM_DEMUXER_amr
	bool "AMR"

config FFMPEG_CUSTOM_DEMUXER_ape
	bool "APE"

config FFMPEG_CUSTOM_DEMUXER_flac
	bool "FLAC"

config FFMPEG_CUSTOM_DEMUXER_h264
	bool "H.264 Raw Video"
	depends on FFMPEG_CUSTOM_PATENTED

config FFMPEG_CUSTOM_DEMUXER_hevc
	bool "HEVC / H265 Raw Video"
	depends on FFMPEG_CUSTOM_PATENTED

config FFMPEG_CUSTOM_DEMUXER_matroska
	bool "Matroska (MKA,MKV)"
	select FFMPEG_CUSTOM_DECODER_zlib

config FFMPEG_CUSTOM_DEMUXER_mov
	bool "MOV/MP4/M4A/3GP/3G2/MJ2"
	select FFMPEG_CUSTOM_DECODER_zlib

config FFMPEG_CUSTOM_DEMUXER_mp3
	bool "MP3 (MPEG Audio Layer 3)"

config FFMPEG_CUSTOM_DEMUXER_mpegvideo
	bool "MPEG Video (Raw)"

config FFMPEG_CUSTOM_DEMUXER_mpegps
	bool "MPEG-2 (PS)"

config FFMPEG_CUSTOM_DEMUXER_mpegts
	bool "MPEG-2 (TS)"

config FFMPEG_CUSTOM_DEMUXER_mpc
	bool "Musepack"

config FFMPEG_CUSTOM_DEMUXER_mpc8
	bool "Musepack 8"

config FFMPEG_CUSTOM_DEMUXER_ogg
	bool "Ogg"

config FFMPEG_CUSTOM_DEMUXER_rm
	bool "RM"
	help
	  RealMedia format demuxer

config FFMPEG_CUSTOM_DEMUXER_rtsp
	bool "RTSP"
	select FFMPEG_CUSTOM_DEMUXER_rm
	select FFMPEG_CUSTOM_DEMUXER_sdp
	select FFMPEG_CUSTOM_DEMUXER_rtp

config FFMPEG_CUSTOM_DEMUXER_sdp
	bool "SDP"
	select FFMPEG_CUSTOM_DEMUXER_mpegts

config FFMPEG_CUSTOM_DEMUXER_rtp
	bool "RTP"

config FFMPEG_CUSTOM_DEMUXER_vc1
	bool "VC-1 / WMV9 Raw Video"
	depends on FFMPEG_CUSTOM_PATENTED

config FFMPEG_CUSTOM_DEMUXER_wav
	bool "WAV"

config FFMPEG_CUSTOM_DEMUXER_wv
	bool "WV"

comment "Parsers"

config FFMPEG_CUSTOM_PARSER_aac
	bool "AAC (Advanced Audio Coding)"

config FFMPEG_CUSTOM_PARSER_ac3
	bool "AC3"

config FFMPEG_CUSTOM_PARSER_flac
	bool "FLAC"

config FFMPEG_CUSTOM_PARSER_h264
	bool "H.264"
	depends on FFMPEG_CUSTOM_PATENTED
	select FFMPEG_CUSTOM_DECODER_h264

config FFMPEG_CUSTOM_PARSER_hevc
	bool "HEVC / H265"
	depends on FFMPEG_CUSTOM_PATENTED
	select FFMPEG_CUSTOM_DECODER_hevc

config FFMPEG_CUSTOM_PARSER_mpegaudio
	bool "MPEG Audio"

config FFMPEG_CUSTOM_PARSER_mpegvideo
	bool "MPEG Video"

config FFMPEG_CUSTOM_PARSER_mpeg4video
	bool "MPEG-4 Video"

config FFMPEG_CUSTOM_PARSER_opus
	bool "Opus"

config FFMPEG_CUSTOM_PARSER_vc1
	bool "VC-1 / WMV9"
	depends on FFMPEG_CUSTOM_PATENTED
	select FFMPEG_CUSTOM_DECODER_vc1

comment "Protocols"

config FFMPEG_CUSTOM_PROTOCOL_file
	bool "file:"

config FFMPEG_CUSTOM_PROTOCOL_http
	bool "http:"

config FFMPEG_CUSTOM_PROTOCOL_icecast
	bool "icecast:"
	select FFMPEG_CUSTOM_PROTOCOL_http

config FFMPEG_CUSTOM_PROTOCOL_pipe
	bool "pipe:"

config FFMPEG_CUSTOM_PROTOCOL_rtp
	bool "rtp:"
	select FFMPEG_CUSTOM_PROTOCOL_udp

config FFMPEG_CUSTOM_PROTOCOL_tcp
	bool "tcp:"

config FFMPEG_CUSTOM_PROTOCOL_udp
	bool "udp:"


endif
