Encode the supplied data (byte array) and write to
        the media transport file descriptor encapsulated
        as RTP packets.  The encoder will calculate the
        required number of SBC frames and encapsulate as
        RTP to fit the MTU size.

        :param int fd: Media transport file descriptor
        :param int mtu: Media transport MTU size as returned
            when the media transport was acquired.
        :param array{byte} data: Data to encode and send
            over the media transport.
        :return:

def encode(self, fd, mtu, data):
        """
        Encode the supplied data (byte array) and write to
        the media transport file descriptor encapsulated
        as RTP packets.  The encoder will calculate the
        required number of SBC frames and encapsulate as
        RTP to fit the MTU size.

        :param int fd: Media transport file descriptor
        :param int mtu: Media transport MTU size as returned
            when the media transport was acquired.
        :param array{byte} data: Data to encode and send
            over the media transport.
        :return:
        """
        self.codec.rtp_sbc_encode_to_fd(self.config,
                                        ffi.new('char[]',
                                                data),
                                        len(data),
                                        mtu,
                                        self.ts,
                                        self.seq_num,
                                        fd)