Exemplo n.º 1
0
    def __init__(self,
                 server,
                 sock,
                 address,
                 content_type,
                 request_parser,
                 path=None,
                 burst_size=None,
                 on_demand=False,
                 keepalive=None):
        LowBitrateSource.__init__(self, server, sock, address, content_type,
                                  request_parser, path, burst_size, on_demand,
                                  keepalive)

        self.set_headers()

        self.frame_parser = self.FRAME_PARSER_CLASS
        if self.frame_parser is not None:
            self.frame_parser = self.frame_parser()
        self.working_buffer = self.output_buffer_data
        self.output_buffer_data = b''
Exemplo n.º 2
0
    def __init__(
        self,
        server,
        sock,
        address,
        content_type,
        request_parser,
        path=None,
        burst_size=None,
        on_demand=False,
        keepalive=None,
    ):
        LowBitrateSource.__init__(
            self, server, sock, address, content_type, request_parser, path, burst_size, on_demand, keepalive
        )

        self.set_headers()

        self.frame_parser = self.FRAME_PARSER_CLASS
        if self.frame_parser is not None:
            self.frame_parser = self.frame_parser()
        self.working_buffer = self.output_buffer_data
        self.output_buffer_data = b""
Exemplo n.º 3
0
 def on_demand_deactivate(self) -> None:
     LowBitrateSource.on_demand_deactivate(self)
     self.working_buffer = b""
     self.frame_parser.clear()
Exemplo n.º 4
0
 def on_demand_connected(self, sock, request_parser):
     # update? headers
     LowBitrateSource.on_demand_connected(self, sock, request_parser)
     self.set_headers()
Exemplo n.º 5
0
 def on_demand_deactivate(self):
     LowBitrateSource.on_demand_deactivate(self)
     self.working_buffer = b""
     if self.frame_parser is not None:
         self.frame_parser.clear()
Exemplo n.º 6
0
 def on_demand_connected(self, sock, request_parser):
     # update? headers
     LowBitrateSource.on_demand_connected(self, sock, request_parser)
     self.set_headers()
Exemplo n.º 7
0
 def on_demand_deactivate(self):
     LowBitrateSource.on_demand_deactivate(self)
     self.working_buffer = b''
     if self.frame_parser is not None:
         self.frame_parser.clear()