1313
1414VERSION_MAJOR = 0
1515VERSION_MINOR = 9
16- VERSION_BUGFIX = 3
16+ VERSION_BUGFIX = 9
1717
1818PREAMBLE = """
1919Dolby Atmos for home audio executable
@@ -43,6 +43,8 @@ def parse_command_line(my_args=None) -> argparse.Namespace:
4343 prog = "gst-ha-flexr" , formatter_class = argparse .RawTextHelpFormatter
4444 )
4545 sinks = parser .add_mutually_exclusive_group ()
46+ input_gains = parser .add_mutually_exclusive_group ()
47+ external_gains = parser .add_mutually_exclusive_group ()
4648 parser .add_argument (
4749 "-wd" ,
4850 "--working_dir" ,
@@ -58,7 +60,8 @@ def parse_command_line(my_args=None) -> argparse.Namespace:
5860 "Supported formats:\n "
5961 "Dolby Digital: .ac3\n "
6062 "Dolby Digital Plus: .ec3\n "
61- "PCM: .wav\n \n " ,
63+ "PCM: .wav\n "
64+ "MP4: .mp4\n \n " ,
6265 type = str ,
6366 metavar = "<filename>" ,
6467 required = True ,
@@ -116,12 +119,23 @@ def parse_command_line(my_args=None) -> argparse.Namespace:
116119 action = "store_true" ,
117120 default = False ,
118121 )
119- parser .add_argument (
122+ input_gains .add_argument (
123+ "-pr" ,
124+ "--profile" ,
125+ help = "Select content profile.\n "
126+ "Default: off\n "
127+ "Not allowed with content normalization gain (-cg argument).\n \n " ,
128+ type = str ,
129+ metavar = "<off|movie|music>" ,
130+ default = "off" ,
131+ )
132+ input_gains .add_argument (
120133 "-cg" ,
121134 "--content-normalization-gain" ,
122135 help = "Linear gain to bring the input to system level.\n "
123136 "Range: [0.0 - 10.0]\n "
124- "Default: 1.0\n \n " ,
137+ "Default: 1.0\n "
138+ "Not allowed with profile (-pr argument)\n \n " ,
125139 type = float ,
126140 metavar = "<gain>" ,
127141 default = 1.0
@@ -136,7 +150,7 @@ def parse_command_line(my_args=None) -> argparse.Namespace:
136150 metavar = "<gain>" ,
137151 default = 1.0
138152 )
139- parser .add_argument (
153+ external_gains .add_argument (
140154 "-eg" ,
141155 "--external-user-gain" ,
142156 help = "Linear gain to be applied by downstream external processing.\n "
@@ -146,6 +160,27 @@ def parse_command_line(my_args=None) -> argparse.Namespace:
146160 metavar = "<gain>" ,
147161 default = 1.0
148162 )
163+ external_gains .add_argument (
164+ "-egs" ,
165+ "--external-user-gain-by-step" ,
166+ help = "Linear gain to be applied by downstream external processing.\n "
167+ "This property is an alternative form of external-user-gain \n "
168+ "where instead of using the linear gain, index into the volume \n "
169+ "steps defined in device configuration is used.\n "
170+ "Default: disabled - flag not set.\n \n " ,
171+ type = int ,
172+ metavar = "<vol_step>" ,
173+ default = - 1
174+ )
175+ parser .add_argument (
176+ "-im" ,
177+ "--interp-mode" ,
178+ help = "Selects interpolation mode.\n "
179+ "Default: offline\n \n " ,
180+ type = str ,
181+ metavar = "<offline|runtime>" ,
182+ default = "offline"
183+ )
149184 parser .add_argument (
150185 "--debug" ,
151186 help = argparse .SUPPRESS ,
@@ -154,15 +189,15 @@ def parse_command_line(my_args=None) -> argparse.Namespace:
154189 )
155190 parser .add_argument (
156191 "-gd" ,
157- "--gst_debug " ,
192+ "--gst-debug " ,
158193 help = "Number specyfing Gstreamer Debug Level\n \n " ,
159194 type = int ,
160195 metavar = "<val>" ,
161196 default = 0 ,
162197 )
163198 parser .add_argument (
164199 "-pg" ,
165- "--pipeline_graph " ,
200+ "--pipeline-graph " ,
166201 help = "Defines debug dot file name\n \n " ,
167202 type = str ,
168203 metavar = "<filename>" ,
@@ -214,6 +249,23 @@ def validate_command_line(args) -> Tuple[bool, str]:
214249 "Invalid gain value. Gain must be in range [0.0 - 10.0]"
215250 )
216251
252+ if args .profile is not None :
253+ if args .profile not in ["off" , "music" , "movie" ]:
254+ return False , (
255+ "Invalid profile name. Allowed options are:\n "
256+ " off\n "
257+ " movie\n "
258+ " music"
259+ )
260+
261+ if args .interp_mode is not None :
262+ if args .interp_mode not in ["offline" , "runtime" ]:
263+ return False , (
264+ "Invalid interpolation mode. Allowed options are:\n "
265+ " offline\n "
266+ " runtime"
267+ )
268+
217269 return True , "OK"
218270
219271
0 commit comments