y5gfunc.source.rpu¶
rpu
¶
Classes:
| Name | Description |
|---|---|
RpuFile |
Represents a Dolby Vision RPU binary file. |
Functions:
| Name | Description |
|---|---|
write_rpu |
Writes the RPU data to the clip. |
RpuFile
¶
Represents a Dolby Vision RPU binary file.
Initializes the RpuFile instance.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
Union[str, Path]
|
Path to the RPU file. |
required |
Raises:
| Type | Description |
|---|---|
FileNotFoundError
|
If the file path does not exist. |
Methods:
| Name | Description |
|---|---|
__len__ |
|
get_frame_data |
Gets the payload of a single RPU frame by its index. |
Attributes:
| Name | Type | Description |
|---|---|---|
file_path |
|
Source code in y5gfunc/source/rpu.py
get_frame_data
¶
get_frame_data(frame_index: int) -> bytes
Gets the payload of a single RPU frame by its index.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
int
|
The 0-based index of the frame to retrieve. |
required |
Returns:
| Type | Description |
|---|---|
bytes
|
The RPU payload binary data (starting with 0x19) for the requested frame. |
Raises:
| Type | Description |
|---|---|
IndexError
|
If frame_index is out of bounds. |
ValueError
|
If the RPU payload (0x19) is not found within the frame. |
Source code in y5gfunc/source/rpu.py
write_rpu
¶
Writes the RPU data to the clip.