Beispiel #1
0
	def read_data(self, stream, end = None):
		"""Parse atom data."""
		super(MetadataHandlerAtom, self).read_data(stream, end)
		self.fields["reserved"] = []
		for _ in range(self.reserved_count):
			self.fields["reserved"].append(read_struct(stream, self.reserved_format))
		self.fields["name"] = stream.read(end - stream.tell())
Beispiel #2
0
 def read_data(self, stream, end=None):
     """Parse atom data."""
     super(ChunkOffsetAtom, self).read_data(stream, end)
     self.fields["table"] = []
     while stream.tell() < end:
         self.fields["table"].append(
             read_struct(stream, self.table_row_format))
Beispiel #3
0
	def read_data(self, stream, end=None):
		"""Parse atom data."""
		super(FileTypeAtom, self).read_data(stream, end)

		self.fields["compatible_brands"] = []

		while stream.tell() < end:
			self.fields["compatible_brands"].append(read_struct(stream, ">4s"))
Beispiel #4
0
    def read_data(self, stream, end=None):
        """Parse atom data."""
        super(FileTypeAtom, self).read_data(stream, end)

        self.fields["compatible_brands"] = []

        while stream.tell() < end:
            self.fields["compatible_brands"].append(read_struct(stream, ">4s"))
Beispiel #5
0
 def read_data(self, stream, end=None):
     """Parse atom data."""
     super(MetadataHandlerAtom, self).read_data(stream, end)
     self.fields["reserved"] = []
     for _ in range(self.reserved_count):
         self.fields["reserved"].append(
             read_struct(stream, self.reserved_format))
     self.fields["name"] = stream.read(end - stream.tell())
Beispiel #6
0
	def read_data(self, stream, end = None):
		"""Parse atom data."""
		super(MetadataKeysAtom, self).read_data(stream, end)
		self.fields["keys"] = []

		for _ in range(self.fields["entry_count"]):
			size, namespace = read_struct(stream, self.key_header_format)
			value = stream.read(size - struct.calcsize(self.key_header_format))
			if size != len(value) + struct.calcsize(self.key_header_format):
				raise QuickTimeParseError("Size mismatch [%s->%s] in key structure" % (size, len(value)), stream.tell())

			self.fields["keys"].append((namespace, value))
Beispiel #7
0
    def read_data(self, stream, end=None):
        """Parse atom data."""
        super(MetadataKeysAtom, self).read_data(stream, end)
        self.fields["keys"] = []

        for _ in range(self.fields["entry_count"]):
            size, namespace = read_struct(stream, self.key_header_format)
            value = stream.read(size - struct.calcsize(self.key_header_format))
            if size != len(value) + struct.calcsize(self.key_header_format):
                raise QuickTimeParseError(
                    "Size mismatch [%s->%s] in key structure" %
                    (size, len(value)), stream.tell())

            self.fields["keys"].append((namespace, value))
Beispiel #8
0
	def read_data(self, stream, end = None):
		"""Parse atom data."""
		super(ChunkOffsetAtom, self).read_data(stream, end)
		self.fields["table"] = []
		while stream.tell() < end:
			self.fields["table"].append(read_struct(stream, self.table_row_format))