[gtk-vnc] Remove all audio APIs from VncDisplay since we expose the connection
- From: Daniel P. Berrange <dberrange src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk-vnc] Remove all audio APIs from VncDisplay since we expose the connection
- Date: Fri, 9 Dec 2011 17:41:39 +0000 (UTC)
commit bbd34682389cd76e8428beafa146e9aaaaa33724
Author: Daniel P. Berrange <berrange redhat com>
Date: Fri Dec 9 15:01:07 2011 +0000
Remove all audio APIs from VncDisplay since we expose the connection
Now that there is a vnc_display_get_connection() method there is
no need to duplicate all the audio APIs & signals in the VncDisplay
class
examples/gvncviewer.c | 6 ++-
src/libgtk-vnc_sym.version | 4 --
src/vncdisplay.c | 110 +-------------------------------------------
src/vncdisplay.h | 4 --
4 files changed, 5 insertions(+), 119 deletions(-)
---
diff --git a/examples/gvncviewer.c b/examples/gvncviewer.c
index 1b128e4..a990e36 100644
--- a/examples/gvncviewer.c
+++ b/examples/gvncviewer.c
@@ -166,9 +166,11 @@ static void vnc_initialized(GtkWidget *vncdisplay, GtkWidget *window)
gtk_widget_show_all(window);
#ifdef HAVE_PULSEAUDIO
+ VncConnection *conn;
+ conn = vnc_display_get_connection(VNC_DISPLAY(vncdisplay));
/* look at do_audio_begin() for the actual Pulse Audio setup */
- vnc_display_set_audio_format(VNC_DISPLAY(vncdisplay), 3, 2, 44100);
- vnc_display_audio_enable(VNC_DISPLAY(vncdisplay));
+ vnc_connection_set_audio_format(conn, 3, 2, 44100);
+ vnc_connection_audio_enable(conn);
#endif
}
diff --git a/src/libgtk-vnc_sym.version b/src/libgtk-vnc_sym.version
index 8eac7fa..cdc69ab 100644
--- a/src/libgtk-vnc_sym.version
+++ b/src/libgtk-vnc_sym.version
@@ -84,10 +84,6 @@
vnc_grab_sequence_as_string;
vnc_grab_sequence_get_type;
-# Audio Support!
- vnc_display_set_audio_format;
- vnc_display_audio_enable;
- vnc_display_audio_disable;
local:
*;
};
diff --git a/src/vncdisplay.c b/src/vncdisplay.c
index ffa91ca..1fdb36c 100644
--- a/src/vncdisplay.c
+++ b/src/vncdisplay.c
@@ -127,10 +127,6 @@ typedef enum
VNC_SERVER_CUT_TEXT,
VNC_BELL,
- VNC_AUDIO_BEGIN,
- VNC_AUDIO_END,
- VNC_AUDIO_DATA,
-
LAST_SIGNAL
} vnc_display_signals;
@@ -152,8 +148,7 @@ static inline void gdk_drawable_get_size(GdkWindow *w, gint *ww, gint *wh)
static guint signals[LAST_SIGNAL] = { 0, 0, 0, 0,
0, 0, 0, 0,
- 0, 0, 0, 0,
- 0, 0, 0, 0,};
+ 0, 0, 0, 0, 0,};
static gboolean vnc_debug_option_arg(const gchar *option_name G_GNUC_UNUSED,
const gchar *value G_GNUC_UNUSED,
@@ -1244,34 +1239,6 @@ static void on_bell(VncConnection *conn G_GNUC_UNUSED,
g_signal_emit(G_OBJECT(obj), signals[VNC_BELL], 0);
}
-
-
-static void on_audio_begin(VncConnection *conn G_GNUC_UNUSED,
- gpointer opaque)
-{
- VncDisplay *obj = VNC_DISPLAY(opaque);
-
- g_signal_emit(G_OBJECT(obj), signals[VNC_AUDIO_BEGIN], 0);
-}
-
-static void on_audio_end(VncConnection *conn G_GNUC_UNUSED,
- gpointer opaque)
-{
- VncDisplay *obj = VNC_DISPLAY(opaque);
-
- g_signal_emit(G_OBJECT(obj), signals[VNC_AUDIO_END], 0);
-}
-
-static void on_audio_data(VncConnection *conn G_GNUC_UNUSED,
- const char *data,
- unsigned int len,
- gpointer opaque)
-{
- VncDisplay *obj = VNC_DISPLAY(opaque);
-
- g_signal_emit(G_OBJECT(obj), signals[VNC_AUDIO_DATA], 0, data, len);
-}
-
static void on_cursor_changed(VncConnection *conn G_GNUC_UNUSED,
VncCursor *cursor,
gpointer opaque)
@@ -1949,41 +1916,6 @@ static void vnc_display_class_init(VncDisplayClass *klass)
G_TYPE_NONE,
0);
- signals[VNC_AUDIO_BEGIN] =
- g_signal_new ("vnc-audio-begin",
- G_TYPE_FROM_CLASS(klass),
- G_SIGNAL_RUN_LAST | G_SIGNAL_NO_HOOKS,
- 0,
- NULL,
- NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE,
- 0);
-
- signals[VNC_AUDIO_END] =
- g_signal_new ("vnc-audio-end",
- G_TYPE_FROM_CLASS(klass),
- G_SIGNAL_RUN_LAST | G_SIGNAL_NO_HOOKS,
- 0,
- NULL,
- NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE,
- 0);
-
- signals[VNC_AUDIO_DATA] =
- g_signal_new ("vnc-audio-data",
- G_TYPE_FROM_CLASS(klass),
- G_SIGNAL_RUN_LAST | G_SIGNAL_NO_HOOKS,
- 0,
- NULL,
- NULL,
- g_cclosure_user_marshal_VOID__POINTER_UINT,
- G_TYPE_NONE,
- 2,
- G_TYPE_POINTER,
- G_TYPE_UINT);
-
g_type_class_add_private(klass, sizeof(VncDisplayPrivate));
}
@@ -2100,12 +2032,6 @@ static void vnc_display_init(VncDisplay *display)
G_CALLBACK(on_initialized), display);
g_signal_connect(G_OBJECT(priv->conn), "vnc-disconnected",
G_CALLBACK(on_disconnected), display);
- g_signal_connect(G_OBJECT(priv->conn), "vnc-audio-begin",
- G_CALLBACK(on_audio_begin), display);
- g_signal_connect(G_OBJECT(priv->conn), "vnc-audio-end",
- G_CALLBACK(on_audio_end), display);
- g_signal_connect(G_OBJECT(priv->conn), "vnc-audio-data",
- G_CALLBACK(on_audio_data), display);
priv->keycode_map = vnc_display_keymap_gdk2rfb_table(&priv->keycode_maplen);
}
@@ -2412,40 +2338,6 @@ vnc_display_request_update(VncDisplay *obj)
vnc_connection_get_width(obj->priv->conn));
}
-gboolean
-vnc_display_set_audio_format(VncDisplay *obj, guint32 format, guint32 channels, guint32 frequency)
-{
- g_return_val_if_fail (VNC_IS_DISPLAY (obj), FALSE);
-
- if (!obj->priv->conn || !vnc_connection_is_initialized(obj->priv->conn))
- return FALSE;
-
- return vnc_connection_set_audio_format(obj->priv->conn, format, channels, frequency);
-}
-
-gboolean
-vnc_display_audio_enable(VncDisplay *obj)
-{
- g_return_val_if_fail (VNC_IS_DISPLAY (obj), FALSE);
-
- if (!obj->priv->conn || !vnc_connection_is_initialized(obj->priv->conn))
- return FALSE;
-
- return vnc_connection_audio_enable(obj->priv->conn);
-}
-
-
-gboolean
-vnc_display_audio_disable(VncDisplay *obj)
-{
- g_return_val_if_fail (VNC_IS_DISPLAY (obj), FALSE);
-
- if (!obj->priv->conn || !vnc_connection_is_initialized(obj->priv->conn))
- return FALSE;
-
- return vnc_connection_audio_disable(obj->priv->conn);
-}
-
/*
* Local variables:
* c-indent-level: 8
diff --git a/src/vncdisplay.h b/src/vncdisplay.h
index 605db60..029f2ab 100644
--- a/src/vncdisplay.h
+++ b/src/vncdisplay.h
@@ -151,10 +151,6 @@ const GOptionEntry * vnc_display_get_option_entries(void);
gboolean vnc_display_request_update(VncDisplay *obj);
-gboolean vnc_display_set_audio_format(VncDisplay *obj, guint32 format, guint32 channels, guint32 frequency);
-gboolean vnc_display_audio_enable(VncDisplay *obj);
-gboolean vnc_display_audio_disable(VncDisplay *obj);
-
G_END_DECLS
#endif /* VNC_DISPLAY_H */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]