#ifndef MS_PACKET_SEND_HELLO #define MS_PACKET_SEND_HELLO #include #include struct msPacket; /** * Structure representing a video frame packet. * The combination of these packets allow the video to be seen in the client. */ struct msPacketSendFrame { //! The width unsigned int stride; //! The full size of the buffer. size_t outputBufferSize; //! The rgbx buffer. color_t *outputBuffer; }; /** * Ends the life in memory of the send_frame packet. * @param send_frame A reference to a pointer to a send_frame packet. */ void msPacketSendFrameDestroy(struct msPacketSendFrame **send_frame); /** * Creates a new send_frame packet. * @param stride The witdh * @param outputBufferSize The size of the outputBuffer * @param outputBuffer The rgbx array. */ struct msPacketSendFrame * msPacketSendFrameNew(unsigned int stride, size_t outputBufferSize, color_t *const outputBuffer); /** * Converts the struct to a byte array with size len. * @param send_frame The object * @param len The returned byte array size. */ unsigned char * msPacketSendFrameSerialize(struct msPacketSendFrame *const send_frame, size_t *len); #endif