VRG: accept RenderPacket by ug_send_frame

This commit is contained in:
Martin Pulec
2021-04-23 14:06:20 +02:00
parent d98ec20ece
commit fa9c76cc2a
4 changed files with 9 additions and 7 deletions

View File

@@ -132,17 +132,15 @@ struct ug_sender *ug_sender_init(const struct ug_sender_parameters *init_params)
return s;
}
void ug_send_frame(struct ug_sender *s, const char *data, libug_pixfmt_t codec, int width, int height, uint32_t seq)
void ug_send_frame(struct ug_sender *s, const char *data, libug_pixfmt_t pixel_format, int width, int height, struct RenderPacket *pkt)
{
struct video_frame *f = vf_alloc(1);
f->color_spec = (codec_t) codec;
f->color_spec = (codec_t) pixel_format;
f->tiles[0].width = width;
f->tiles[0].height = height;
f->fps = 120;
f->interlacing = PROGRESSIVE;
struct RenderPacket render_packet{};
render_packet.frame = seq;
f->render_packet = render_packet;
f->render_packet = *pkt;
f->tiles[0].data = const_cast<char *>(data);
f->tiles[0].data_len = vc_get_datalen(width, height, f->color_spec);