73 0xf8, 0xbe, 0x8a, 0x28, 0xaf, 0xe5, 0x33, 0xfd,
74 0xfc, 0x0a, 0x28, 0xa2, 0x80, 0x0a, 0x28, 0xa2,
75 0x80, 0x0a, 0x28, 0xa2, 0x80, 0x0a, 0x28, 0xa2,
76 0x80, 0x0a, 0x28, 0xa2, 0x80, 0x0a, 0x28, 0xa2,
77 0x80, 0x0a, 0x28, 0xa2, 0x80, 0x0a, 0x28, 0xa2,
78 0x80, 0x0a, 0x28, 0xa2, 0x80, 0x0a, 0x28, 0xa2,
79 0x80, 0x0a, 0x28, 0xa2, 0x80, 0x3f, 0xff, 0xd9
82 0xf5, 0x8a, 0x28, 0xa2, 0xbf, 0xca, 0xf3, 0xfc,
83 0x53, 0x0a, 0x28, 0xa2, 0x80, 0x0a, 0x28, 0xa2,
84 0x80, 0x0a, 0x28, 0xa2, 0x80, 0x0a, 0x28, 0xa2,
85 0x80, 0x0a, 0x28, 0xa2, 0x80, 0x0a, 0x28, 0xa2,
86 0x80, 0x0a, 0x28, 0xa2, 0x80, 0x0a, 0x28, 0xa2,
87 0x80, 0x0a, 0x28, 0xa2, 0x80, 0x0a, 0x28, 0xa2,
88 0x80, 0x0a, 0x28, 0xa2, 0x80, 0x3f, 0xff, 0xd9
106 rtp_packet_send(udp,
JpegScanDataCh2A,
KJpegCh2ScanDataLen, framecounter, timecounter, 0, 1, 64, 48, format_code,
109 rtp_packet_send(udp,
JpegScanDataCh2B,
KJpegCh2ScanDataLen, framecounter, timecounter, 0, 1, 64, 48, format_code,
187#define KRtpHeaderSize 12
188#define KJpegHeaderSize 8
193 memset(RtpBuf, 0x00,
sizeof(RtpBuf));
214 RtpBuf[1] = 0x1a + (marker_bit << 7);
215 RtpBuf[2] = m_SequenceNumber >> 8;
216 RtpBuf[3] = m_SequenceNumber & 0x0FF;
217 RtpBuf[4] = (m_Timestamp & 0xFF000000) >> 24;
218 RtpBuf[5] = (m_Timestamp & 0x00FF0000) >> 16;
219 RtpBuf[6] = (m_Timestamp & 0x0000FF00) >> 8;
220 RtpBuf[7] = (m_Timestamp & 0x000000FF);
241 RtpBuf[13] = (m_offset & 0x00FF0000) >> 16;
242 RtpBuf[14] = (m_offset & 0x0000FF00) >> 8;
243 RtpBuf[15] = (m_offset & 0x000000FF);
246 RtpBuf[16] = format_code;
247 if (has_dri_header) {
250 RtpBuf[17] = quality_code;
254 memcpy(&RtpBuf[20], Jpeg, JpegLen);
void rtp_frame_send(struct UdpSocket *udp, struct image_t *img, uint8_t format_code, uint8_t quality_code, uint8_t has_dri_header, float average_frame_rate, uint16_t *packet_number, uint32_t *rtp_time_counter)
Send an RTP frame.
static void rtp_packet_send(struct UdpSocket *udp, uint8_t *Jpeg, int JpegLen, uint16_t m_SequenceNumber, uint32_t m_Timestamp, uint32_t m_offset, uint8_t marker_bit, int w, int h, uint8_t format_code, uint8_t quality_code, uint8_t has_dri_header)
int udp_socket_send_dontwait(struct UdpSocket *sock, uint8_t *buffer, uint32_t len)
Send a packet from buffer, non-blocking.