添加 Box 类及其子类 ItemLocationBox 的实现,包含初始化和解析逻辑
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
from typing import List
|
||||
|
||||
class Box:
|
||||
"""
|
||||
Represents a generic ISOBMFF box. This is a simple data container.
|
||||
"""
|
||||
def __init__(self, size: int, box_type: str, offset: int, raw_data: bytes):
|
||||
self.size = size
|
||||
self.type = box_type
|
||||
self.offset = offset
|
||||
self.raw_data = raw_data
|
||||
self.children: List['Box'] = [] # Initially empty
|
||||
|
||||
def __repr__(self) -> str:
|
||||
return f"<Box '{self.type}' size={self.size} offset={self.offset}>"
|
||||
Reference in New Issue
Block a user