From: Jaroslav Kysela Date: Fri, 5 Jan 2018 17:00:12 +0000 (+0100) Subject: add SCT_FLAC, issue #4828 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9bed2c7a4fb5f8b243321bd1c0670f5b783fba60;p=thirdparty%2Ftvheadend.git add SCT_FLAC, issue #4828 --- diff --git a/src/esfilter.h b/src/esfilter.h index 7c7cf22f2..a036f52ef 100644 --- a/src/esfilter.h +++ b/src/esfilter.h @@ -51,7 +51,7 @@ extern const idclass_t esfilter_class_other; #define ESF_MASK_AUDIO \ (SCT_MASK(SCT_MPEG2AUDIO) | SCT_MASK(SCT_AC3) | SCT_MASK(SCT_AAC) | \ SCT_MASK(SCT_EAC3) | SCT_MASK(SCT_MP4A) | SCT_MASK(SCT_VORBIS) | \ - SCT_MASK(SCT_OPUS)) + SCT_MASK(SCT_OPUS) | SCT_MASK(SCT_FLAC)) #define ESF_MASK_TELETEXT \ SCT_MASK(SCT_TELETEXT) diff --git a/src/libav.c b/src/libav.c index f4e66b55b..bab90a0b4 100644 --- a/src/libav.c +++ b/src/libav.c @@ -199,6 +199,9 @@ codec_id2streaming_component_type(enum AVCodecID id) case AV_CODEC_ID_DVB_TELETEXT: type = SCT_TELETEXT; break; + case AV_CODEC_ID_FLAC: + type = SCT_FLAC; + break; case AV_CODEC_ID_NONE: type = SCT_NONE; break; diff --git a/src/muxer/muxer_mkv.c b/src/muxer/muxer_mkv.c index fab7c078b..7a5694cd8 100644 --- a/src/muxer/muxer_mkv.c +++ b/src/muxer/muxer_mkv.c @@ -359,6 +359,11 @@ mk_build_tracks(mk_muxer_t *mk, streaming_start_t *ss) codec_id = "A_OPUS"; break; + case SCT_FLAC: + tracktype = 2; + codec_id = "A_FLAC"; + break; + case SCT_DVBSUB: if (mk->dvbsub_skip) goto disable; diff --git a/src/streaming.c b/src/streaming.c index 2c311b64b..2d55f210a 100644 --- a/src/streaming.c +++ b/src/streaming.c @@ -555,13 +555,15 @@ static struct strtab streamtypetab[] = { { "UNKNOWN", SCT_UNKNOWN }, { "RAW", SCT_RAW }, { "PCR", SCT_PCR }, + { "CAT", SCT_CAT }, + { "CA", SCT_CA }, + { "HBBTV", SCT_HBBTV }, { "MPEG2VIDEO", SCT_MPEG2VIDEO }, { "MPEG2AUDIO", SCT_MPEG2AUDIO }, { "H264", SCT_H264 }, { "AC3", SCT_AC3 }, { "TELETEXT", SCT_TELETEXT }, { "DVBSUB", SCT_DVBSUB }, - { "CA", SCT_CA }, { "AAC", SCT_AAC }, { "MPEGTS", SCT_MPEGTS }, { "TEXTSUB", SCT_TEXTSUB }, @@ -571,10 +573,9 @@ static struct strtab streamtypetab[] = { { "VORBIS", SCT_VORBIS }, { "HEVC", SCT_HEVC }, { "VP9", SCT_VP9 }, - { "HBBTV", SCT_HBBTV }, { "THEORA", SCT_THEORA }, { "OPUS", SCT_OPUS }, - { "CAT", SCT_CAT }, + { "FLAC", SCT_FLAC }, }; /** diff --git a/src/tvheadend.h b/src/tvheadend.h index 8bd94ef38..2e3eb04db 100644 --- a/src/tvheadend.h +++ b/src/tvheadend.h @@ -307,7 +307,8 @@ typedef enum { SCT_VP9, SCT_THEORA, SCT_OPUS, - SCT_LAST = SCT_OPUS + SCT_FLAC, + SCT_LAST = SCT_FLAC } streaming_component_type_t; #define SCT_MASK(t) (1 << (t)) @@ -319,7 +320,7 @@ typedef enum { #define SCT_ISAUDIO(t) ((t) == SCT_MPEG2AUDIO || (t) == SCT_AC3 || \ (t) == SCT_AAC || (t) == SCT_MP4A || \ (t) == SCT_EAC3 || (t) == SCT_VORBIS || \ - (t) == SCT_OPUS) + (t) == SCT_OPUS || (t) == SCT_FLAC) #define SCT_ISAV(t) (SCT_ISVIDEO(t) || SCT_ISAUDIO(t))