29 int xinc, yinc, pgroup;
33 s->timestamp =
s->cur_timestamp;
65 int left =
s->max_payload_size;
66 uint8_t *dest =
s->buf;
68 const int head_size = 6;
70 int length, cont, pixels;
82 length = (pixels * pgroup) / xinc;
88 pixels = (
left / pgroup) * xinc;
89 length = (pixels * pgroup) / xinc;
95 *dest++ = (length >> 8) & 0xff;
96 *dest++ = length & 0xff;
100 *dest++ = ((l_line >> 8) & 0x7f) | ((field << 7) & 0x80);
101 *dest++ = l_line & 0xff;
102 if (next_line)
i += yinc;
104 cont = (
left > (head_size + pgroup) &&
i <
height) ? 0x80 : 0x00;
106 *dest++ = ((
offset >> 8) & 0x7f) | cont;
121 length = (headers[0] << 8) | headers[1];
122 l_field = (headers[2] & 0x80) >> 7;
123 l_line = ((headers[2] & 0x7f) << 8) | headers[3];
124 l_off = ((headers[4] & 0x7f) << 8) | headers[5];
125 cont = headers[4] & 0x80;
126 headers += head_size;
129 l_line = 2 * l_line + l_field;
130 copy_offset = (l_line * (
int64_t)
width + l_off) * pgroup / xinc;
131 if (copy_offset + length >
size)
133 memcpy (dest, buf + copy_offset, length);
static int BS_FUNC left(const BSCTX *bc)
Return the number of the bits left in a buffer.
#define i(width, name, range_min, range_max)
#define AV_PIX_FMT_YUV422P10
@ AV_PIX_FMT_RGB24
packed RGB 8:8:8, 24bpp, RGBRGB...
@ AV_PIX_FMT_YUV420P
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
@ AV_PIX_FMT_UYVY422
packed YUV 4:2:2, 16bpp, Cb Y0 Cr Y1
@ AV_PIX_FMT_BGR24
packed RGB 8:8:8, 24bpp, BGRBGR...
void ff_rtp_send_data(AVFormatContext *s1, const uint8_t *buf1, int len, int m)
void ff_rtp_send_raw_rfc4175(AVFormatContext *s1, const uint8_t *buf, int size, int interlaced, int field)
int height
The height of the video frame in pixels.
int width
The width of the video frame in pixels.
void * priv_data
Format private data.
AVStream ** streams
A list of all streams in the file.
AVCodecParameters * codecpar
Codec parameters associated with this stream.