src/streamlink/stream/flvconcat.py
def iter_chunks(self, fd=None, buf=None, skip_header=None):
        """Reads FLV tags from fd or buf and returns them with adjusted
           timestamps."""
        timestamps = dict(self.timestamps_add)
        tag_iterator = self.iter_tags(fd=fd, buf=buf, skip_header=skip_header)

        if not self.flv_header_written:
            analyzed_tags = self.analyze_tags(tag_iterator)
        else:
            analyzed_tags = []

        for tag in chain(analyzed_tags, tag_iterator):
            if not self.flv_header_written:
                flv_header = Header(has_video=self.has_video,
                                    has_audio=self.has_audio)
                yield flv_header.serialize()
                self.flv_header_written = True

            if self.verify_tag(tag):
                self.adjust_tag_gap(tag)
                self.adjust_tag_timestamp(tag)

                if self.duration:
                    norm_timestamp = tag.timestamp / 1000
                    if norm_timestamp > self.duration:
                        break
                yield tag.serialize()
                timestamps[tag.type] = tag.timestamp

        if not self.flatten_timestamps:
            self.timestamps_add = timestamps

        self.tags = []
def iter_chunks(self, fd=None, buf=None, skip_header=None):
        """Reads FLV tags from fd or buf and returns them with adjusted
           timestamps."""
        timestamps = dict(self.timestamps_add)
        tag_iterator = self.iter_tags(fd=fd, buf=buf, skip_header=skip_header)

        if not self.flv_header_written:
            analyzed_tags = self.analyze_tags(tag_iterator)
        else:
            analyzed_tags = []

        for tag in chain(analyzed_tags, tag_iterator):
            if not self.flv_header_written:
                flv_header = Header(has_video=self.has_video,
                                    has_audio=self.has_audio)
                yield flv_header.serialize()
                self.flv_header_written = True

            if self.verify_tag(tag):
                self.adjust_tag_gap(tag)
                self.adjust_tag_timestamp(tag)

                if self.duration:
                    norm_timestamp = tag.timestamp / 1000
                    if norm_timestamp > self.duration:
                        break
                yield tag.serialize()
                timestamps[tag.type] = tag.timestamp

        if not self.flatten_timestamps:
            self.timestamps_add = timestamps

        self.tags = []
def iter_chunks ( self , fd = None , buf = None , skip_header = None ) : timestamps = dict ( self . timestamps_add ) tag_iterator = self . iter_tags ( fd = fd , buf = buf , skip_header = skip_header ) if not self . flv_header_written : analyzed_tags = self . analyze_tags ( tag_iterator ) else : analyzed_tags = [ ] for tag in chain ( analyzed_tags , tag_iterator ) : if not self . flv_header_written : flv_header = Header ( has_video = self . has_video , has_audio = self . has_audio ) yield flv_header . serialize ( ) self . flv_header_written = True if self . verify_tag ( tag ) : self . adjust_tag_gap ( tag ) self . adjust_tag_timestamp ( tag ) if self . duration : norm_timestamp = tag . timestamp / 1000 if norm_timestamp > self . duration : break yield tag . serialize ( ) timestamps [ tag . type ] = tag . timestamp if not self . flatten_timestamps : self . timestamps_add = timestamps self . tags = [ ]
Reads FLV tags from fd or buf and returns them with adjusted
           timestamps.
Reads FLV tags from fd or buf and returns them with adjusted timestamps .