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''
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""
def on_demand_deactivate(self) -> None: LowBitrateSource.on_demand_deactivate(self) self.working_buffer = b"" self.frame_parser.clear()
def on_demand_connected(self, sock, request_parser): # update? headers LowBitrateSource.on_demand_connected(self, sock, request_parser) self.set_headers()
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()
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()