@@ -2234,6 +2234,34 @@ public function QuicktimeParseAtom($atomname, $atomsize, $atom_data, $baseoffset
22342234 $ esds_offset += $ atom_structure ['ES_SLConfigDescrTagSize ' ];
22352235 break ;
22362236
2237+ case 'sgpd ' : // https://developer.apple.com/documentation/quicktime-file-format/sample_group_description_atom
2238+ $ atom_structure ['version ' ] = getid3_lib::BigEndian2Int (substr ($ atom_data , 0 , 1 )); // hardcoded: 0x00
2239+ $ atom_structure ['flags_raw ' ] = getid3_lib::BigEndian2Int (substr ($ atom_data , 1 , 3 )); // hardcoded: 0x000000
2240+ $ sgpd_offset = 4 ;
2241+
2242+ $ atom_structure ['grouping_type ' ] = getid3_lib::BigEndian2Int (substr ($ atom_data , $ sgpd_offset , 4 ));
2243+ $ sgpd_offset += 4 ;
2244+ $ atom_structure ['default_length ' ] = getid3_lib::BigEndian2Int (substr ($ atom_data , $ sgpd_offset , 4 ));
2245+ $ sgpd_offset += 4 ;
2246+ $ atom_structure ['entry_count ' ] = getid3_lib::BigEndian2Int (substr ($ atom_data , $ sgpd_offset , 4 ));
2247+ $ sgpd_offset += 4 ;
2248+ $ atom_structure ['payload_data_raw ' ] = substr ($ atom_data , $ sgpd_offset );
2249+ break ;
2250+
2251+ case 'sbgp ' : // https://developer.apple.com/documentation/quicktime-file-format/sample-to-group_atom
2252+ $ atom_structure ['version ' ] = getid3_lib::BigEndian2Int (substr ($ atom_data , 0 , 1 )); // hardcoded: 0x00
2253+ $ atom_structure ['flags_raw ' ] = getid3_lib::BigEndian2Int (substr ($ atom_data , 1 , 3 )); // hardcoded: 0x000000
2254+ $ sbgp_offset = 4 ;
2255+
2256+ $ atom_structure ['grouping_type ' ] = getid3_lib::BigEndian2Int (substr ($ atom_data , $ sbgp_offset , 4 ));
2257+ $ sbgp_offset += 4 ;
2258+ $ atom_structure ['default_length ' ] = getid3_lib::BigEndian2Int (substr ($ atom_data , $ sbgp_offset , 4 ));
2259+ $ sbgp_offset += 4 ;
2260+ $ atom_structure ['entry_count ' ] = getid3_lib::BigEndian2Int (substr ($ atom_data , $ sbgp_offset , 4 ));
2261+ $ sbgp_offset += 4 ;
2262+ $ atom_structure ['table_data_raw ' ] = substr ($ atom_data , $ sbgp_offset );
2263+ break ;
2264+
22372265// AVIF-related - https://docs.rs/avif-parse/0.13.2/src/avif_parse/boxes.rs.html
22382266 case 'pitm ' : // Primary ITeM
22392267 case 'iloc ' : // Item LOCation
0 commit comments