Skip to content

Protocols

HLS dataclass

Represents a HLS streaming protocol.

Usage:

# use h264 as codec
hls = HLS(H264())
Source code in nucleus/sdk/processing/video/protocols.py
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
@dataclass(slots=True)
class HLS:
    """Represents a HLS streaming protocol.

    Usage:

        # use h264 as codec
        hls = HLS(H264())

    """

    # default h264 codec
    codec: Codec = H264()

    def __iter__(self):
        yield 'hls_time', HLS_TIME
        yield 'hls_list_size', HLS_LIST_SIZE
        yield 'hls_playlist_type', HLS_PLAYLIST_TYPE,
        yield 'tag:v', HLS_TAG_VIDEO_FORMAT,
        yield from self.codec