[Spice-commits] 2 commits - server/dcc.c server/dcc-send.c server/display-channel.c server/video-stream.c server/video-stream.h
Jonathon Jongsma
jjongsma at kemper.freedesktop.org
Thu Nov 30 19:52:48 UTC 2017
server/dcc-send.c | 4 ++--
server/dcc.c | 2 +-
server/display-channel.c | 4 ++--
server/video-stream.c | 10 +++++-----
server/video-stream.h | 6 +++---
5 files changed, 13 insertions(+), 13 deletions(-)
New commits:
commit cac9629409ca2ad4eeeed19c53db72ebe12d4e52
Author: Jonathon Jongsma <jjongsma at redhat.com>
Date: Thu Nov 16 13:49:03 2017 -0600
DisplayChannel: Use NSEC_PER_MILLISEC
Instead of using 1000*1000
Signed-off-by: Jonathon Jongsma <jjongsma at redhat.com>
Acked-by: Frediano Ziglio <fziglio at redhat.com>
diff --git a/server/display-channel.c b/server/display-channel.c
index 2caaa643..46d229a5 100644
--- a/server/display-channel.c
+++ b/server/display-channel.c
@@ -211,10 +211,10 @@ int display_channel_get_streams_timeout(DisplayChannel *display)
stream = SPICE_CONTAINEROF(item, VideoStream, link);
red_time_t delta = (stream->last_time + RED_STREAM_TIMEOUT) - now;
- if (delta < 1000 * 1000) {
+ if (delta < NSEC_PER_MILLISEC) {
return 0;
}
- timeout = MIN(timeout, (unsigned int)(delta / (1000 * 1000)));
+ timeout = MIN(timeout, (unsigned int)(delta / (NSEC_PER_MILLISEC)));
}
return timeout;
}
commit 0975b92ba76a1075c64a5386ddcfbe60f9ccca59
Author: Jonathon Jongsma <jjongsma at redhat.com>
Date: Thu Nov 16 16:21:54 2017 -0600
Rename RedStreamClipItem to VideoStreamClipItem
Avoid confusion with RedStream which is a totally unrelated object.
Signed-off-by: Jonathon Jongsma <jjongsma at redhat.com>
Acked-by: Frediano Ziglio <fziglio at redhat.com>
diff --git a/server/dcc-send.c b/server/dcc-send.c
index d94615a9..84bc0906 100644
--- a/server/dcc-send.c
+++ b/server/dcc-send.c
@@ -2193,7 +2193,7 @@ static void marshall_stream_start(RedChannelClient *rcc,
static void marshall_stream_clip(RedChannelClient *rcc,
SpiceMarshaller *base_marshaller,
- RedStreamClipItem *item)
+ VideoStreamClipItem *item)
{
DisplayChannelClient *dcc = DISPLAY_CHANNEL_CLIENT(rcc);
VideoStreamAgent *agent = item->stream_agent;
@@ -2404,7 +2404,7 @@ void dcc_send_item(RedChannelClient *rcc, RedPipeItem *pipe_item)
break;
}
case RED_PIPE_ITEM_TYPE_STREAM_CLIP:
- marshall_stream_clip(rcc, m, SPICE_UPCAST(RedStreamClipItem, pipe_item));
+ marshall_stream_clip(rcc, m, SPICE_UPCAST(VideoStreamClipItem, pipe_item));
break;
case RED_PIPE_ITEM_TYPE_STREAM_DESTROY: {
StreamCreateDestroyItem *item = SPICE_UPCAST(StreamCreateDestroyItem, pipe_item);
diff --git a/server/dcc.c b/server/dcc.c
index 628b33ed..fb5009e9 100644
--- a/server/dcc.c
+++ b/server/dcc.c
@@ -629,7 +629,7 @@ static void dcc_stop(DisplayChannelClient *dcc)
void dcc_video_stream_agent_clip(DisplayChannelClient* dcc, VideoStreamAgent *agent)
{
- RedStreamClipItem *item = red_stream_clip_item_new(agent);
+ VideoStreamClipItem *item = video_stream_clip_item_new(agent);
int n_rects;
item->clip_type = SPICE_CLIP_TYPE_RECTS;
diff --git a/server/video-stream.c b/server/video-stream.c
index 2dc63cba..65da3f8a 100644
--- a/server/video-stream.c
+++ b/server/video-stream.c
@@ -163,10 +163,10 @@ void video_stream_agent_unref(DisplayChannel *display, VideoStreamAgent *agent)
video_stream_unref(display, agent->stream);
}
-static void red_stream_clip_item_free(RedPipeItem *base)
+static void video_stream_clip_item_free(RedPipeItem *base)
{
g_return_if_fail(base != NULL);
- RedStreamClipItem *item = SPICE_UPCAST(RedStreamClipItem, base);
+ VideoStreamClipItem *item = SPICE_UPCAST(VideoStreamClipItem, base);
DisplayChannel *display = DCC_TO_DC(item->stream_agent->dcc);
g_return_if_fail(item->base.refcount == 0);
@@ -176,11 +176,11 @@ static void red_stream_clip_item_free(RedPipeItem *base)
g_free(item);
}
-RedStreamClipItem *red_stream_clip_item_new(VideoStreamAgent *agent)
+VideoStreamClipItem *video_stream_clip_item_new(VideoStreamAgent *agent)
{
- RedStreamClipItem *item = g_new(RedStreamClipItem, 1);
+ VideoStreamClipItem *item = g_new(VideoStreamClipItem, 1);
red_pipe_item_init_full(&item->base, RED_PIPE_ITEM_TYPE_STREAM_CLIP,
- red_stream_clip_item_free);
+ video_stream_clip_item_free);
item->stream_agent = agent;
agent->stream->refs++;
diff --git a/server/video-stream.h b/server/video-stream.h
index 33bbd6bd..a4d14981 100644
--- a/server/video-stream.h
+++ b/server/video-stream.h
@@ -86,14 +86,14 @@ typedef struct VideoStreamAgent {
#endif
} VideoStreamAgent;
-typedef struct RedStreamClipItem {
+typedef struct VideoStreamClipItem {
RedPipeItem base;
VideoStreamAgent *stream_agent;
int clip_type;
SpiceClipRects *rects;
-} RedStreamClipItem;
+} VideoStreamClipItem;
-RedStreamClipItem *red_stream_clip_item_new(VideoStreamAgent *agent);
+VideoStreamClipItem *video_stream_clip_item_new(VideoStreamAgent *agent);
typedef struct StreamCreateDestroyItem {
RedPipeItem base;
More information about the Spice-commits
mailing list