[Spice-commits] 2 commits - src/channel-display.c tools/spicy.c
Victor Toso de Carvalho
victortoso at kemper.freedesktop.org
Mon Mar 13 12:34:18 UTC 2017
src/channel-display.c | 29 -----------------------------
tools/spicy.c | 43 ++-----------------------------------------
2 files changed, 2 insertions(+), 70 deletions(-)
New commits:
commit 2d807682bcaf57f341d3d776ae1c875cce5b9281
Author: Victor Toso <me at victortoso.com>
Date: Mon Mar 13 13:22:01 2017 +0100
Revert "channel-display: new stream-video-codec-type property"
This reverts commit 00f56647a97a95342f235ef6d107ac8216aa9e49.
As this take no consideration to multiple streams.
Signed-off-by: Victor Toso <victortoso at redhat.com>
Acked-by: Marc-André Lureau <mlureau at redhat.com>
diff --git a/src/channel-display.c b/src/channel-display.c
index f30c7ed..7a5a23b 100644
--- a/src/channel-display.c
+++ b/src/channel-display.c
@@ -70,7 +70,6 @@ struct _SpiceDisplayChannelPrivate {
GArray *monitors;
guint monitors_max;
gboolean enable_adaptive_streaming;
- SpiceVideoCodecType stream_video_codec_type;
#ifdef G_OS_WIN32
HDC dc;
#endif
@@ -87,7 +86,6 @@ enum {
PROP_MONITORS,
PROP_MONITORS_MAX,
PROP_GL_SCANOUT,
- PROP_STREAM_VIDEO_CODEC_TYPE,
};
enum {
@@ -224,10 +222,6 @@ static void spice_display_get_property(GObject *object,
g_value_set_static_boxed(value, spice_display_get_gl_scanout(channel));
break;
}
- case PROP_STREAM_VIDEO_CODEC_TYPE: {
- g_value_set_int(value, c->stream_video_codec_type);
- break;
- }
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
break;
@@ -341,23 +335,6 @@ static void spice_display_channel_class_init(SpiceDisplayChannelClass *klass)
G_PARAM_STATIC_STRINGS));
/**
- * SpiceDisplayChannel:stream-video-codec-type
- *
- * The SpiceVideoCodecType enum value for the video-codec being used in the
- * current stream or 0 when there is no ongoing streaming.
- *
- * Since: 0.34
- */
- g_object_class_install_property
- (gobject_class, PROP_STREAM_VIDEO_CODEC_TYPE,
- g_param_spec_int("stream-video-codec-type",
- "Stream Video Codec Type",
- "The Video Codec Type from current Stream",
- 0, SPICE_VIDEO_CODEC_TYPE_ENUM_END, 0,
- G_PARAM_READABLE |
- G_PARAM_STATIC_STRINGS));
-
- /**
* SpiceDisplayChannel::display-primary-create:
* @display: the #SpiceDisplayChannel that emitted the signal
* @format: %SPICE_SURFACE_FMT_32_xRGB or %SPICE_SURFACE_FMT_16_555;
@@ -1241,10 +1218,6 @@ static void display_handle_stream_create(SpiceChannel *channel, SpiceMsgIn *in)
spice_printerr("could not create a video decoder for codec %u", op->codec_type);
destroy_stream(channel, op->id);
report_invalid_stream(channel, op->id);
- } else {
- spice_debug("New stream created of type: %u", op->codec_type);
- c->stream_video_codec_type = op->codec_type;
- g_coroutine_object_notify(G_OBJECT(channel), "stream-video-codec-type");
}
}
@@ -1594,8 +1567,6 @@ static void destroy_stream(SpiceChannel *channel, int id)
g_free(st);
c->streams[id] = NULL;
- c->stream_video_codec_type = 0;
- g_coroutine_object_notify(G_OBJECT(channel), "stream-video-codec-type");
}
static void clear_streams(SpiceChannel *channel)
commit a12a815127d2a31f655396f1fcf80ac97c25859f
Author: Victor Toso <me at victortoso.com>
Date: Mon Mar 13 13:21:12 2017 +0100
Revert "spicy: improve status label with stream information"
This reverts commit 9a7ae78aa94f4eada3fa85e9fd7dfac681aadd6d.
As we are going to revert 00f56647a97a95 "channel-display: new
stream-video-codec-type property"
Signed-off-by: Victor Toso <victortoso at redhat.com>
Acked-by: Marc-André Lureau <mlureau at redhat.com>
diff --git a/tools/spicy.c b/tools/spicy.c
index a41a1a3..eeb640d 100644
--- a/tools/spicy.c
+++ b/tools/spicy.c
@@ -71,7 +71,6 @@ struct _SpiceWindow {
bool fullscreen;
bool mouse_grabbed;
SpiceChannel *display_channel;
- gint video_codec;
#ifdef G_OS_WIN32
gint win_x;
gint win_y;
@@ -181,15 +180,6 @@ static int ask_user(GtkWidget *parent, char *title, char *message,
return retval;
}
-static const gchar *video_codec_enum_to_str[] = {
- [0] = "none",
- [SPICE_VIDEO_CODEC_TYPE_MJPEG] = "mjpeg",
- [SPICE_VIDEO_CODEC_TYPE_VP8] = "vp8",
- [SPICE_VIDEO_CODEC_TYPE_H264] = "h264",
- [SPICE_VIDEO_CODEC_TYPE_VP9] = "vp9",
- [SPICE_VIDEO_CODEC_TYPE_ENUM_END] = "error",
-};
-
static void update_status_window(SpiceWindow *win)
{
GString *status;
@@ -198,10 +188,9 @@ static void update_status_window(SpiceWindow *win)
return;
status = g_string_new(NULL);
- g_string_printf(status, "mouse: %6s, agent: %3s, streaming: %5s",
+ g_string_printf(status, "mouse: %6s, agent: %3s",
win->conn->mouse_state,
- win->conn->agent_state,
- video_codec_enum_to_str[win->video_codec]);
+ win->conn->agent_state);
if (win->mouse_grabbed) {
SpiceGrabSequence *sequence = spice_display_get_grab_keys(SPICE_DISPLAY(win->spice));
@@ -1453,32 +1442,6 @@ static void del_window(spice_connection *conn, SpiceWindow *win)
destroy_spice_window(win);
}
-static void display_stream_changes(SpiceChannel *display, GParamSpec *pspec,
- spice_connection *conn)
-{
- gint i;
- gint id, codec_type;
- GArray *monitors;
-
- g_object_get(display,
- "channel-id", &id,
- "monitors", &monitors,
- "stream-video-codec-type", &codec_type,
- NULL);
-
- for (i = 0; i < monitors->len; i++) {
- SpiceWindow *win = get_window(conn, id, i);
-
- if (win == NULL)
- continue;
-
- win->video_codec = codec_type;
- update_status_window(win);
- }
-
- g_clear_pointer(&monitors, g_array_unref);
-}
-
static void display_monitors(SpiceChannel *display, GParamSpec *pspec,
spice_connection *conn)
{
@@ -1789,8 +1752,6 @@ static void channel_new(SpiceSession *s, SpiceChannel *channel, gpointer data)
SPICE_DEBUG("new display channel (#%d)", id);
g_signal_connect(channel, "notify::monitors",
G_CALLBACK(display_monitors), conn);
- g_signal_connect(channel, "notify::stream-video-codec-type",
- G_CALLBACK(display_stream_changes), conn);
spice_channel_connect(channel);
}
More information about the Spice-commits
mailing list