[Spice-commits] 3 commits - server/red_worker.c server/stream.c server/stream.h
Frediano Ziglio
fziglio at kemper.freedesktop.org
Sat Nov 21 05:42:31 PST 2015
server/red_worker.c | 2 +-
server/stream.c | 21 +++++++++++----------
server/stream.h | 3 +--
3 files changed, 13 insertions(+), 13 deletions(-)
New commits:
commit 1f27043b8264c2c43e62269992cbfd85d9753482
Author: Marc-André Lureau <marcandre.lureau at gmail.com>
Date: Fri Nov 20 16:30:05 2015 +0100
stream: remove red_stream_ prefix from mjpeg callbacks
Author: Marc-André Lureau <marcandre.lureau at gmail.com>
Acked-by: Frediano Ziglio <fziglio at redhat.com>
diff --git a/server/stream.c b/server/stream.c
index 6749f90..518e2d8 100644
--- a/server/stream.c
+++ b/server/stream.c
@@ -582,7 +582,7 @@ static uint64_t get_initial_bit_rate(DisplayChannelClient *dcc, Stream *stream)
stream->width * stream->height) / DCC_TO_DC(dcc)->streams_size_total;
}
-static uint32_t red_stream_mjpeg_encoder_get_roundtrip(void *opaque)
+static uint32_t get_roundtrip_ms(void *opaque)
{
StreamAgent *agent = opaque;
int roundtrip;
@@ -602,14 +602,14 @@ static uint32_t red_stream_mjpeg_encoder_get_roundtrip(void *opaque)
return roundtrip;
}
-static uint32_t red_stream_mjpeg_encoder_get_source_fps(void *opaque)
+static uint32_t get_source_fps(void *opaque)
{
StreamAgent *agent = opaque;
return agent->stream->input_fps;
}
-static void red_stream_update_client_playback_latency(void *opaque, uint32_t delay_ms)
+static void update_client_playback_delay(void *opaque, uint32_t delay_ms)
{
StreamAgent *agent = opaque;
DisplayChannelClient *dcc = agent->dcc;
@@ -646,9 +646,9 @@ void dcc_create_stream(DisplayChannelClient *dcc, Stream *stream)
MJpegEncoderRateControlCbs mjpeg_cbs;
uint64_t initial_bit_rate;
- mjpeg_cbs.get_roundtrip_ms = red_stream_mjpeg_encoder_get_roundtrip;
- mjpeg_cbs.get_source_fps = red_stream_mjpeg_encoder_get_source_fps;
- mjpeg_cbs.update_client_playback_delay = red_stream_update_client_playback_latency;
+ mjpeg_cbs.get_roundtrip_ms = get_roundtrip_ms;
+ mjpeg_cbs.get_source_fps = get_source_fps;
+ mjpeg_cbs.update_client_playback_delay = update_client_playback_delay;
initial_bit_rate = get_initial_bit_rate(dcc, stream);
agent->mjpeg_encoder = mjpeg_encoder_new(initial_bit_rate, &mjpeg_cbs, agent);
commit f5c109573f37fb60b86c5cbb3f1c9f7308ca363f
Author: Marc-André Lureau <marcandre.lureau at gmail.com>
Date: Fri Nov 20 16:30:04 2015 +0100
stream: rename {red_stream_, }get_initial_bit_rate
Author: Marc-André Lureau <marcandre.lureau at gmail.com>
Acked-by: Frediano Ziglio <fziglio at redhat.com>
diff --git a/server/stream.c b/server/stream.c
index 0d4a20a..6749f90 100644
--- a/server/stream.c
+++ b/server/stream.c
@@ -535,8 +535,7 @@ static void dcc_update_streams_max_latency(DisplayChannelClient *dcc, StreamAgen
dcc->streams_max_latency = new_max_latency;
}
-static uint64_t red_stream_get_initial_bit_rate(DisplayChannelClient *dcc,
- Stream *stream)
+static uint64_t get_initial_bit_rate(DisplayChannelClient *dcc, Stream *stream)
{
char *env_bit_rate_str;
uint64_t bit_rate = 0;
@@ -651,7 +650,7 @@ void dcc_create_stream(DisplayChannelClient *dcc, Stream *stream)
mjpeg_cbs.get_source_fps = red_stream_mjpeg_encoder_get_source_fps;
mjpeg_cbs.update_client_playback_delay = red_stream_update_client_playback_latency;
- initial_bit_rate = red_stream_get_initial_bit_rate(dcc, stream);
+ initial_bit_rate = get_initial_bit_rate(dcc, stream);
agent->mjpeg_encoder = mjpeg_encoder_new(initial_bit_rate, &mjpeg_cbs, agent);
} else {
agent->mjpeg_encoder = mjpeg_encoder_new(0, NULL, NULL);
commit d78b44ec264576c1e66730fd019bfbb99b89c148
Author: Marc-André Lureau <marcandre.lureau at gmail.com>
Date: Fri Nov 20 16:30:03 2015 +0100
stream: remove dcc parameter from stream_agent_stop()
Author: Marc-André Lureau <marcandre.lureau at gmail.com>
Acked-by: Frediano Ziglio <fziglio at redhat.com>
diff --git a/server/red_worker.c b/server/red_worker.c
index faa50ed..44627f0 100644
--- a/server/red_worker.c
+++ b/server/red_worker.c
@@ -4267,7 +4267,7 @@ static void red_display_marshall_stream_end(RedChannelClient *rcc,
red_channel_client_init_send_data(rcc, SPICE_MSG_DISPLAY_STREAM_DESTROY, NULL);
destroy.id = get_stream_id(DCC_TO_DC(dcc), agent->stream);
- stream_agent_stop(dcc, agent);
+ stream_agent_stop(agent);
spice_marshall_msg_display_stream_destroy(base_marshaller, &destroy);
}
diff --git a/server/stream.c b/server/stream.c
index a2acd3a..0d4a20a 100644
--- a/server/stream.c
+++ b/server/stream.c
@@ -675,8 +675,10 @@ void dcc_create_stream(DisplayChannelClient *dcc, Stream *stream)
#endif
}
-void stream_agent_stop(DisplayChannelClient *dcc, StreamAgent *agent)
+void stream_agent_stop(StreamAgent *agent)
{
+ DisplayChannelClient *dcc = agent->dcc;
+
dcc_update_streams_max_latency(dcc, agent);
if (agent->mjpeg_encoder) {
mjpeg_encoder_destroy(agent->mjpeg_encoder);
diff --git a/server/stream.h b/server/stream.h
index 3627b0f..65de2f4 100644
--- a/server/stream.h
+++ b/server/stream.h
@@ -152,8 +152,7 @@ void stream_maintenance (DisplayChan
void stream_agent_unref (DisplayChannel *display,
StreamAgent *agent);
void stream_agent_stats_print (StreamAgent *agent);
-void stream_agent_stop (DisplayChannelClient *dcc,
- StreamAgent *agent);
+void stream_agent_stop (StreamAgent *agent);
void attach_stream(DisplayChannel *display, Drawable *drawable, Stream *stream);
void detach_stream(DisplayChannel *display, Stream *stream, int detach_sized);
More information about the Spice-commits
mailing list