mirror of
https://github.com/outbackdingo/UltraGrid.git
synced 2026-04-05 08:04:41 +00:00
VRG: accept RenderPacket by ug_send_frame
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user