# FMSPy - Copyright (c) 2009 Andrey Smirnov.
#
# See COPYRIGHT for details.

"""
RTMP packet disassembly/assembly line.

Cutting packets into chunks for transmission.
"""

from pyamf.util import BufferedByteStream

from fmspy.rtmp.header import RTMPHeader, NeedBytes
from fmspy.rtmp.packets import packetFactory

class RTMPDisassembler(object):
    """
    Disassembling bytestream into RTMP packets.

    RTMP stream slices packets into chunks of L{chunkSize}. This class
    processes incoming stream of RTMP protocol data (after initial handshake)