@@ -184,7 +184,10 @@ static const char *shortHelp_text =
184
184
" --bpm (number) Set the tempo/bpm\n "
185
185
" --albumArtist (string) Set the album artist tag\n "
186
186
" --compilation (boolean) Set the compilation flag (true or false)\n "
187
- " --hdvideo (boolean) Set the hdvideo flag (true or false)\n "
187
+ " --hdvideo (number) Set the hdvideo flag to one of:\n "
188
+ " false or 0 for standard definition\n "
189
+ " true or 1 for 720p\n "
190
+ " 2 for 1080p\n "
188
191
" --advisory (string*) Content advisory (*values: 'clean', "
189
192
" 'explicit')\n "
190
193
" --stik (string*) Sets the iTunes \" stik\" atom (see "
@@ -2137,18 +2140,27 @@ int real_main(int argc, char *argv[]) {
2137
2140
break ;
2138
2141
}
2139
2142
2140
- if (strcmp (optarg, " false" ) == 0 || strlen (optarg) == 0 ) {
2143
+ if (strcmp (optarg, " false" ) == 0 || strlen (optarg) == 0 ||
2144
+ strcmp (optarg, " 0" ) == 0 ) {
2141
2145
APar_RemoveAtom (" moov.udta.meta.ilst.hdvd.data" , VERSIONED_ATOM, 0 );
2142
2146
} else {
2143
2147
// compilation: [0, 0, 0, 0, boolean_value]; BUT that first uint32_t
2144
2148
// is already accounted for in APar_MetaData_atom_Init
2145
2149
AtomicInfo *hdvideoData_atom = APar_MetaData_atom_Init (
2146
2150
" moov.udta.meta.ilst.hdvd.data" , optarg, AtomFlags_Data_UInt);
2151
+
2152
+ uint8_t hdvideo_value = 0 ;
2153
+ if (strcmp (optarg, " true" ) == 0 ) {
2154
+ hdvideo_value = 1 ;
2155
+ } else {
2156
+ sscanf (optarg, " %" SCNu8, &hdvideo_value);
2157
+ }
2158
+
2147
2159
APar_Unified_atom_Put (hdvideoData_atom,
2148
2160
NULL ,
2149
2161
UTF8_iTunesStyle_256glyphLimited,
2150
- 1 ,
2151
- 8 ); // a hard coded uint8_t of: 1 is compilation
2162
+ hdvideo_value ,
2163
+ 8 );
2152
2164
}
2153
2165
break ;
2154
2166
}
0 commit comments