30 lines
800 B
Python
30 lines
800 B
Python
|
|
from .dsc_compression_info import DscCompressionInfo as CompressionInfo
|
||
|
|
from .video_frame import VideoFrame
|
||
|
|
|
||
|
|
|
||
|
|
class VideoFrameDSC(VideoFrame):
|
||
|
|
|
||
|
|
"""
|
||
|
|
Class `VideoFrameDSC` contains base information about DSC compressed video frame:
|
||
|
|
- Height (int).
|
||
|
|
- Width (int).
|
||
|
|
- Data (bytearray).
|
||
|
|
- Color info (object of `ColorInfo`).
|
||
|
|
- Data info (object of `DataInfo`).
|
||
|
|
- Timestamp (object of `Timestamp`).
|
||
|
|
- CompressionInfo (object of `CompressionInfo`)
|
||
|
|
"""
|
||
|
|
|
||
|
|
def __init__(self):
|
||
|
|
super().__init__()
|
||
|
|
self.compression_info = CompressionInfo()
|
||
|
|
|
||
|
|
def is_compressed(self) -> bool:
|
||
|
|
"""
|
||
|
|
Return state of the video frame, compressed it or not.
|
||
|
|
|
||
|
|
Returns:
|
||
|
|
object of `bool` type.
|
||
|
|
"""
|
||
|
|
return not self._compressed
|