示例#1
0
文件: Stream.py 项目: slyseal/slyseal
	def getFrameHeader(self, type, keyframe, description = False, ref_time = 0):
		output = BytesOutput(True)
		
		if type == FRAME_TYPE_VIDEO:
			output.writeByte((0x27, 0x17)[keyframe])
			output.writeByte((0x01, 0x00)[description])
			output.writeInt24(ref_time)
		elif type == FRAME_TYPE_AUDIO:
			output.writeByte(0xAF)
			output.writeByte((0x01, 0x00)[description])

		return output.getBytes()
示例#2
0
文件: Stream.py 项目: slyseal/slyseal
    def getFrameHeader(self, type, keyframe, description=False, ref_time=0):
        output = BytesOutput(True)

        if type == FRAME_TYPE_VIDEO:
            output.writeByte((0x27, 0x17)[keyframe])
            output.writeByte((0x01, 0x00)[description])
            output.writeInt24(ref_time)
        elif type == FRAME_TYPE_AUDIO:
            output.writeByte(0xAF)
            output.writeByte((0x01, 0x00)[description])

        return output.getBytes()