Am Mittwoch, den 28.04.2010, 17:50 +0200 schrieb Jan Olav Stangeland: > Thank you, > > as reference I was speculating that perhaps proper values for p1, p2 would > do the trick: > > def _getTrackInfo(self, track, p1, p2): > query = self.formatQuery('1806 02201001 %w %w %w ff00 00000000', track, > p1, p2) > reply = self.send_query(query) > return self.scanQuery(reply, '1806 02201001 %?%? %?%? %?%? 1000 ' \ > '00%?0000 %x')[0] So, "content_creation_date_and_time" has the information block ID 4, according to TA2000004 ("Enhancements to the AV/C General Specification 3.0 Version 1.1"). The command you quote is (06) a READ INFO BLOCK command, described in TA1999035 ("AV/C Descriptor Mechanism Specification Version 1.0"). The 02 means the info block path has two elements. The 20 means that an indexed subentry of some directory is to be used. The 1001 is (according to TA1998014 ("AV/C Disc Media Type Specification - MD audio")) the directory of audio tracks, which is followed by a 16 bit word for the track number. p1 and p2 is a quite illogic separation of the following bytes, which is a result of not understanding the base protocol. Reading info about a track always starts with 06 - READ DESCRIPTOR 02 - TWO LEVELS 20 1001 <trknum> - 1st Level: the chosen track in the trakc list 30 <infoblkid> 00 - 2nd Level: 1st occurrence of info block with id So for the track creation time, you have p1 == 0x3000 and p2 == 0x0400. The format of the time stamp is 1st byte: bit 7 - set if valid bit 6 - set if the timestamp is an abstract count, clear if an absolute time bit 5-0: high bits of year 2nd byte: low bits of year 3rd byte: month 4th byte: day 5th byte: hours 6th byte: minutes 7th byte: seconds If the timestamp is an abstract count, all bits specified for the timestamp (with most significant bits in 1st byte and last significant bits in 7th byte) form a 54 bit count which is incremented once on each "event". What kind of "events" are counted is device specific, but MD should only use absolute time anyway. Regards, Michael Karcher
Attachment:
signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil