Skip to content

Commit

Permalink
#1194: add aac+gdp and aac+mpeg4 sound options
Browse files Browse the repository at this point in the history
git-svn-id: https://xpra.org/svn/Xpra/trunk@12565 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed May 12, 2016
1 parent 24ffeac commit 03958e1
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions src/xpra/sound/gstreamer_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ def force_enabled(codec_name):
GDP = "gdp"
OGG = "ogg"
MKA = "mka"
MPEG4 = "mpeg4"
#RTP = "rtp"

FLAC_GDP = FLAC+"+"+GDP
Expand All @@ -97,7 +98,10 @@ def force_enabled(codec_name):
VORBIS_OGG = VORBIS+"+"+OGG
#OPUS_WEBM = OPUS+"+"+WEBM
#OPUS_RTP = OPUS+"+"+RTP
VORBIS_MKA = VORBIS+"+"+MKA
VORBIS_MKA = VORBIS+"+"+MKA
AAC_GDP = AAC+"+"+GDP
AAC_MPEG4 = AAC+"+"+MPEG4


#format: encoder, container-formatter, decoder, container-parser
#we keep multiple options here for the same encoding
Expand Down Expand Up @@ -126,12 +130,17 @@ def force_enabled(codec_name):
(SPEEX , "speexenc", "oggmux", "speexdec", "oggdemux"),
(SPEEX_GDP , "speexenc", "gdppay", "speexdec", "gdpdepay"),
(WAVPACK , "wavpackenc", None, "wavpackparse ! wavpackdec", None),
(AAC_GDP , "faac", "gdppay", "faad", "gdpdepay"),
(AAC_GDP , "avenc_aac", "gdppay", "avdec_aac", "gdpdepay"),
(AAC_MPEG4 , "faac", "mp4mux", "faad", "qtdemux"),
(AAC_MPEG4 , "avenc_aac", "mp4mux", "avdec_aac", "qtdemux"),
]

MUX_OPTIONS = [
(GDP, "gdppay", "gdpdepay"),
(OGG, "oggmux", "oggdemux"),
(MKA, "webmmux", "matroskademux"),
(MPEG4, "mp4mux", "qtdemux"),
]
emux = [x for x in os.environ.get("XPRA_MUXER_OPTIONS", "").split(",") if len(x.strip())>0]
if emux:
Expand All @@ -158,6 +167,7 @@ def force_enabled(codec_name):
"bitrate" : 256000,
},
"flacenc" : {"quality" : 0}, #"fast"
"avenc_aac" : {"compliance" : -2} #allows experimental
}
ENCODER_DEFAULT_OPTIONS = {
0 : {
Expand Down Expand Up @@ -185,6 +195,12 @@ def force_enabled(codec_name):
"crc-payload" : int(GDPPAY_CRC),
},
"webmmux" : {"writing-app" : "Xpra"},
"mp4mux" : {
"faststart" : 1,
"streamable" : 1,
"fragment-duration" : 1,
"presentation-time" : 0,
}
}

#based on the encoder options above:
Expand All @@ -203,7 +219,7 @@ def force_enabled(codec_name):
SPEEX_GDP : 0,
}

CODEC_ORDER = [OPUS_GDP, OPUS, VORBIS, VORBIS_MKA, FLAC_GDP, FLAC, MP3, WAV, WAVPACK, SPEEX_GDP, SPEEX]
CODEC_ORDER = [OPUS_GDP, OPUS, VORBIS, VORBIS_MKA, FLAC_GDP, FLAC, MP3, AAC_GDP, AAC_MPEG4, WAV, WAVPACK, SPEEX_GDP, SPEEX]


gst = None
Expand Down

0 comments on commit 03958e1

Please sign in to comment.