Пример #1
0
    def __init__(self, reader, *args, **kwargs):
        options = reader.stream.session.options
        kwargs["retries"] = options.get("hls-segment-attempts")
        kwargs["threads"] = options.get("hls-segment-threads")
        kwargs["timeout"] = options.get("hls-segment-timeout")
        kwargs["ignore_names"] = options.get("hls-segment-ignore-names")
        SegmentedStreamWriter.__init__(self, reader, *args, **kwargs)

        self.byterange_offsets = defaultdict(int)
        self.key_data = None
        self.key_uri = None
        if self.ignore_names:
            # creates a regex from a list of segment names,
            # this will be used to ignore segments.
            self.ignore_names = list(set(self.ignore_names))
            self.ignore_names = "|".join(list(map(re.escape, self.ignore_names)))
            self.ignore_names_re = re.compile(r"(?:{blacklist})\.ts".format(
                    blacklist=self.ignore_names),  re.IGNORECASE)
Пример #2
0
    def __init__(self, *args, **kwargs):
        SegmentedStreamWriter.__init__(self, *args, **kwargs)

        self.concater = FLVTagConcat(flatten_timestamps=True,
                                     sync_headers=True)
Пример #3
0
 def __init__(self, reader, *args, **kwargs):
     options = reader.stream.session.options
     kwargs["retries"] = options.get("dash-segment-attempts")
     kwargs["threads"] = options.get("dash-segment-threads")
     kwargs["timeout"] = options.get("dash-segment-timeout")
     SegmentedStreamWriter.__init__(self, reader, *args, **kwargs)
Пример #4
0
    def __init__(self, *args, **kwargs):
        SegmentedStreamWriter.__init__(self, *args, **kwargs)

        self.concater = FLVTagConcat(tags=[],
                                     flatten_timestamps=True,
                                     sync_headers=True)
Пример #5
0
 def __init__(self, reader, *args, **kwargs):
     options = reader.stream.session.options
     kwargs["retries"] = options.get("dash-segment-attempts")
     kwargs["threads"] = options.get("dash-segment-threads")
     kwargs["timeout"] = options.get("dash-segment-timeout")
     SegmentedStreamWriter.__init__(self, reader, *args, **kwargs)
Пример #6
0
    def __init__(self, *args, **kwargs):
        SegmentedStreamWriter.__init__(self, *args, **kwargs)

        self.concater = BeatFLVTagConcat(flatten_timestamps=True)