68 #define KJpegCh1ScanDataLen 32
69 #define KJpegCh2ScanDataLen 56
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,
134 *rtp_time_counter += ((
uint32_t) (90000.0
f / average_frame_rate));
136 #define MAX_PACKET_SIZE 1400
139 for (; jpeg_size > 0;) {
143 if (jpeg_size <= len) {
148 rtp_packet_send(udp, jpeg_ptr, len, *packet_number, *rtp_time_counter,
offset, lastpacket, img->
w, img->
h, format_code,
149 quality_code, has_dri_header);
187 #define KRtpHeaderSize 12 // size of the RTP header
188 #define KJpegHeaderSize 8 // size of the special JPEG payload header
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);