> > Just to avoid confusion between different uses of the word Stream (e.g. > RedStream) clarify that it's related to video streams > > Signed-off-by: Jonathon Jongsma <jjongsma@xxxxxxxxxx> > --- > Changes in v2: > - broke long lines, changed function declaration indentation > > server/dcc-private.h | 2 +- > server/dcc-send.c | 14 ++++++------ > server/dcc.c | 10 ++++----- > server/dcc.h | 8 +++---- > server/display-channel.c | 6 +++--- > server/video-stream.c | 55 > +++++++++++++++++++++++++----------------------- > server/video-stream.h | 14 ++++++------ > 7 files changed, 57 insertions(+), 52 deletions(-) > > diff --git a/server/dcc-private.h b/server/dcc-private.h > index 76e194fe3..848d42702 100644 > --- a/server/dcc-private.h > +++ b/server/dcc-private.h > @@ -61,7 +61,7 @@ struct DisplayChannelClientPrivate > uint8_t surface_client_created[NUM_SURFACES]; > QRegion surface_client_lossy_region[NUM_SURFACES]; > > - StreamAgent stream_agents[NUM_STREAMS]; > + VideoStreamAgent stream_agents[NUM_STREAMS]; > uint32_t streams_max_latency; > uint64_t streams_max_bit_rate; > bool gl_draw_ongoing; > diff --git a/server/dcc-send.c b/server/dcc-send.c > index 642c6edd3..d94615a93 100644 > --- a/server/dcc-send.c > +++ b/server/dcc-send.c > @@ -1709,7 +1709,7 @@ static bool red_marshall_stream_data(RedChannelClient > *rcc, > } > > int stream_id = display_channel_get_video_stream_id(display, stream); > - StreamAgent *agent = &dcc->priv->stream_agents[stream_id]; > + VideoStreamAgent *agent = &dcc->priv->stream_agents[stream_id]; > VideoBuffer *outbuf; > /* workaround for vga streams */ > frame_mm_time = drawable->red_drawable->mm_time ? > @@ -2151,7 +2151,8 @@ static void marshall_qxl_drawable(RedChannelClient > *rcc, > } > > static void marshall_stream_start(RedChannelClient *rcc, > - SpiceMarshaller *base_marshaller, > StreamAgent *agent) > + SpiceMarshaller *base_marshaller, > + VideoStreamAgent *agent) > { > DisplayChannelClient *dcc = DISPLAY_CHANNEL_CLIENT(rcc); > VideoStream *stream = agent->stream; > @@ -2195,7 +2196,7 @@ static void marshall_stream_clip(RedChannelClient *rcc, > RedStreamClipItem *item) > { > DisplayChannelClient *dcc = DISPLAY_CHANNEL_CLIENT(rcc); > - StreamAgent *agent = item->stream_agent; > + VideoStreamAgent *agent = item->stream_agent; > > spice_return_if_fail(agent->stream); > > @@ -2210,14 +2211,15 @@ static void marshall_stream_clip(RedChannelClient > *rcc, > } > > static void marshall_stream_end(RedChannelClient *rcc, > - SpiceMarshaller *base_marshaller, > StreamAgent* agent) > + SpiceMarshaller *base_marshaller, > + VideoStreamAgent* agent) > { > DisplayChannelClient *dcc = DISPLAY_CHANNEL_CLIENT(rcc); > SpiceMsgDisplayStreamDestroy destroy; > > red_channel_client_init_send_data(rcc, > SPICE_MSG_DISPLAY_STREAM_DESTROY); > destroy.id = display_channel_get_video_stream_id(DCC_TO_DC(dcc), > agent->stream); > - stream_agent_stop(agent); > + video_stream_agent_stop(agent); > spice_marshall_msg_display_stream_destroy(base_marshaller, &destroy); > } > > @@ -2308,7 +2310,7 @@ static void > marshall_stream_activate_report(RedChannelClient *rcc, > uint32_t stream_id) > { > DisplayChannelClient *dcc = DISPLAY_CHANNEL_CLIENT(rcc); > - StreamAgent *agent = &dcc->priv->stream_agents[stream_id]; > + VideoStreamAgent *agent = &dcc->priv->stream_agents[stream_id]; > SpiceMsgDisplayStreamActivateReport msg; > > red_channel_client_init_send_data(rcc, > SPICE_MSG_DISPLAY_STREAM_ACTIVATE_REPORT); > diff --git a/server/dcc.c b/server/dcc.c > index 951d1e9f5..628b33edb 100644 > --- a/server/dcc.c > +++ b/server/dcc.c > @@ -487,7 +487,7 @@ static void dcc_init_stream_agents(DisplayChannelClient > *dcc) > DisplayChannel *display = DCC_TO_DC(dcc); > > for (i = 0; i < NUM_STREAMS; i++) { > - StreamAgent *agent = &dcc->priv->stream_agents[i]; > + VideoStreamAgent *agent = &dcc->priv->stream_agents[i]; > agent->stream = display_channel_get_nth_video_stream(display, i); > region_init(&agent->vis_region); > region_init(&agent->clip); > @@ -601,7 +601,7 @@ static void > dcc_destroy_stream_agents(DisplayChannelClient *dcc) > int i; > > for (i = 0; i < NUM_STREAMS; i++) { > - StreamAgent *agent = &dcc->priv->stream_agents[i]; > + VideoStreamAgent *agent = &dcc->priv->stream_agents[i]; > region_destroy(&agent->vis_region); > region_destroy(&agent->clip); > if (agent->video_encoder) { > @@ -627,7 +627,7 @@ static void dcc_stop(DisplayChannelClient *dcc) > } > } > > -void dcc_stream_agent_clip(DisplayChannelClient* dcc, StreamAgent *agent) > +void dcc_video_stream_agent_clip(DisplayChannelClient* dcc, VideoStreamAgent > *agent) > { > RedStreamClipItem *item = red_stream_clip_item_new(agent); > int n_rects; > @@ -1041,7 +1041,7 @@ static bool dcc_handle_init(DisplayChannelClient *dcc, > SpiceMsgcDisplayInit *ini > static bool dcc_handle_stream_report(DisplayChannelClient *dcc, > SpiceMsgcDisplayStreamReport *report) > { > - StreamAgent *agent; > + VideoStreamAgent *agent; > > if (report->stream_id >= NUM_STREAMS) { > spice_warning("stream_report: invalid stream id %u", > @@ -1383,7 +1383,7 @@ bool dcc_handle_migrate_data(DisplayChannelClient *dcc, > uint32_t size, void *mes > return TRUE; > } > > -StreamAgent* dcc_get_stream_agent(DisplayChannelClient *dcc, int stream_id) > +VideoStreamAgent* dcc_get_video_stream_agent(DisplayChannelClient *dcc, int > stream_id) > { > return &dcc->priv->stream_agents[stream_id]; > } > diff --git a/server/dcc.h b/server/dcc.h > index 8ee0bd78a..ec7dc3ca9 100644 > --- a/server/dcc.h > +++ b/server/dcc.h > @@ -79,7 +79,7 @@ GType display_channel_client_get_type(void) G_GNUC_CONST; > > typedef struct DisplayChannel DisplayChannel; > typedef struct VideoStream VideoStream; > -typedef struct StreamAgent StreamAgent; > +typedef struct VideoStreamAgent VideoStreamAgent; > > typedef struct WaitForChannels { > SpiceMsgWaitForChannels header; > @@ -146,8 +146,8 @@ bool dcc_handle_migrate_data > (DisplayCha > void dcc_push_monitors_config > (DisplayChannelClient *dcc); > void dcc_destroy_surface > (DisplayChannelClient *dcc, > uint32_t > surface_id); > -void dcc_stream_agent_clip > (DisplayChannelClient* dcc, > - > StreamAgent > *agent); > +void dcc_video_stream_agent_clip > (DisplayChannelClient* dcc, > + > VideoStreamAgent > *agent); > void dcc_create_stream > (DisplayChannelClient *dcc, > VideoStream > *stream); > void dcc_create_surface > (DisplayChannelClient *dcc, > @@ -189,7 +189,7 @@ int dcc_compress_image > (DisplayCha > int > can_lossy, > compress_send_data_t* > o_comp_data); > > -StreamAgent * dcc_get_stream_agent > (DisplayChannelClient *dcc, int stream_id); > +VideoStreamAgent * dcc_get_video_stream_agent > (DisplayChannelClient *dcc, int stream_id); This line is too long. > ImageEncoders *dcc_get_encoders(DisplayChannelClient *dcc); > spice_wan_compression_t dcc_get_jpeg_state > (DisplayChannelClient *dcc); > spice_wan_compression_t dcc_get_zlib_glz_state > (DisplayChannelClient *dcc); Otherwise, Acked-by: Frediano Ziglio <fziglio@xxxxxxxxxx> OT: wondering is "agent" here is a good name. But not a regression. Frediano _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel