summaryrefslogtreecommitdiffstats
path: root/src/polypprobe.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/polypprobe.c')
-rw-r--r--src/polypprobe.c64
1 files changed, 32 insertions, 32 deletions
diff --git a/src/polypprobe.c b/src/polypprobe.c
index cd057e0..adb5212 100644
--- a/src/polypprobe.c
+++ b/src/polypprobe.c
@@ -1,20 +1,20 @@
/* $Id$ */
/***
- This file is part of gst-polyp.
+ This file is part of gst-pulse.
- gst-polyp is free software; you can redistribute it and/or modify
+ gst-pulse is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation; either version 2.1 of the
License, or (at your option) any later version.
- gst-polyp is distributed in the hope that it will be useful, but
+ gst-pulse is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with gst-polyp; if not, write to the Free Software
+ License along with gst-pulse; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
USA.
***/
@@ -23,13 +23,13 @@
#include "config.h"
#endif
-#include "polypprobe.h"
-#include "polyputil.h"
+#include "pulseprobe.h"
+#include "pulseutil.h"
-GST_DEBUG_CATEGORY_EXTERN(polyp_debug);
-#define GST_CAT_DEFAULT polyp_debug
+GST_DEBUG_CATEGORY_EXTERN(pulse_debug);
+#define GST_CAT_DEFAULT pulse_debug
-static void gst_polypprobe_context_state_cb(pa_context *context, void *userdata) {
+static void gst_pulseprobe_context_state_cb(pa_context *context, void *userdata) {
GstPolypProbe *c = (GstPolypProbe*) userdata;
/* Called from the background thread! */
@@ -49,7 +49,7 @@ static void gst_polypprobe_context_state_cb(pa_context *context, void *userdata)
}
}
-static void gst_polypprobe_sink_info_cb(pa_context *context, const pa_sink_info *i, int eol, void *userdata) {
+static void gst_pulseprobe_sink_info_cb(pa_context *context, const pa_sink_info *i, int eol, void *userdata) {
GstPolypProbe *c = (GstPolypProbe*) userdata;
/* Called from the background thread! */
@@ -64,7 +64,7 @@ static void gst_polypprobe_sink_info_cb(pa_context *context, const pa_sink_info
}
-static void gst_polypprobe_source_info_cb(pa_context *context, const pa_source_info *i, int eol, void *userdata) {
+static void gst_pulseprobe_source_info_cb(pa_context *context, const pa_source_info *i, int eol, void *userdata) {
GstPolypProbe *c = (GstPolypProbe*) userdata;
/* Called from the background thread! */
@@ -78,16 +78,16 @@ static void gst_polypprobe_source_info_cb(pa_context *context, const pa_source_i
c->devices = g_list_append(c->devices, g_strdup(i->name));
}
-static void gst_polypprobe_invalidate(GstPolypProbe *c) {
+static void gst_pulseprobe_invalidate(GstPolypProbe *c) {
g_list_foreach(c->devices, (GFunc) g_free, NULL);
g_list_free(c->devices);
c->devices = NULL;
c->devices_valid = 0;
}
-static gboolean gst_polypprobe_open(GstPolypProbe *c) {
+static gboolean gst_pulseprobe_open(GstPolypProbe *c) {
int e;
- gchar *name = gst_polyp_client_name();
+ gchar *name = gst_pulse_client_name();
g_assert(c);
@@ -104,7 +104,7 @@ static gboolean gst_polypprobe_open(GstPolypProbe *c) {
goto unlock_and_fail;
}
- pa_context_set_state_callback(c->context, gst_polypprobe_context_state_cb, c);
+ pa_context_set_state_callback(c->context, gst_pulseprobe_context_state_cb, c);
if (pa_context_connect(c->context, c->server, 0, NULL) < 0) {
GST_WARNING("Failed to connect context: %s", pa_strerror(pa_context_errno(c->context)));
@@ -122,7 +122,7 @@ static gboolean gst_polypprobe_open(GstPolypProbe *c) {
pa_threaded_mainloop_unlock(c->mainloop);
g_free(name);
- gst_polypprobe_invalidate(c);
+ gst_pulseprobe_invalidate(c);
return TRUE;
@@ -143,7 +143,7 @@ if (!(c)->context || pa_context_get_state((c)->context) != PA_CONTEXT_READY) { \
} \
} while(0);
-static gboolean gst_polypprobe_enumerate(GstPolypProbe *c) {
+static gboolean gst_pulseprobe_enumerate(GstPolypProbe *c) {
pa_operation *o = NULL;
pa_threaded_mainloop_lock(c->mainloop);
@@ -151,7 +151,7 @@ static gboolean gst_polypprobe_enumerate(GstPolypProbe *c) {
if (c->enumerate_sinks) {
/* Get sink info */
- if (!(o = pa_context_get_sink_info_list(c->context, gst_polypprobe_sink_info_cb, c))) {
+ if (!(o = pa_context_get_sink_info_list(c->context, gst_pulseprobe_sink_info_cb, c))) {
GST_WARNING("Failed to get sink info: %s", pa_strerror(pa_context_errno(c->context)));
goto unlock_and_fail;
}
@@ -174,7 +174,7 @@ static gboolean gst_polypprobe_enumerate(GstPolypProbe *c) {
if (c->enumerate_sources) {
/* Get source info */
- if (!(o = pa_context_get_source_info_list(c->context, gst_polypprobe_source_info_cb, c))) {
+ if (!(o = pa_context_get_source_info_list(c->context, gst_pulseprobe_source_info_cb, c))) {
GST_WARNING("Failed to get source info: %s", pa_strerror(pa_context_errno(c->context)));
goto unlock_and_fail;
}
@@ -210,7 +210,7 @@ unlock_and_fail:
return FALSE;
}
-static void gst_polypprobe_close(GstPolypProbe *c) {
+static void gst_pulseprobe_close(GstPolypProbe *c) {
g_assert(c);
if (c->mainloop)
@@ -228,7 +228,7 @@ static void gst_polypprobe_close(GstPolypProbe *c) {
}
}
-GstPolypProbe* gst_polypprobe_new(GObjectClass *klass, guint prop_id, const gchar *server, gboolean sinks, gboolean sources) {
+GstPolypProbe* gst_pulseprobe_new(GObjectClass *klass, guint prop_id, const gchar *server, gboolean sinks, gboolean sources) {
GstPolypProbe *c = NULL;
c = g_new(GstPolypProbe, 1);
@@ -247,10 +247,10 @@ GstPolypProbe* gst_polypprobe_new(GObjectClass *klass, guint prop_id, const gcha
return c;
}
-void gst_polypprobe_free(GstPolypProbe* c) {
+void gst_pulseprobe_free(GstPolypProbe* c) {
g_assert(c);
- gst_polypprobe_close(c);
+ gst_pulseprobe_close(c);
g_list_free(c->properties);
g_free(c->server);
@@ -261,11 +261,11 @@ void gst_polypprobe_free(GstPolypProbe* c) {
g_free(c);
}
-const GList* gst_polypprobe_get_properties(GstPolypProbe *c) {
+const GList* gst_pulseprobe_get_properties(GstPolypProbe *c) {
return c->properties;
}
-gboolean gst_polypprobe_needs_probe(GstPolypProbe *c, guint prop_id, const GParamSpec *pspec) {
+gboolean gst_pulseprobe_needs_probe(GstPolypProbe *c, guint prop_id, const GParamSpec *pspec) {
if (prop_id == c->prop_id)
return !c->devices_valid;
@@ -274,20 +274,20 @@ gboolean gst_polypprobe_needs_probe(GstPolypProbe *c, guint prop_id, const GPara
return FALSE;
}
-void gst_polypprobe_probe_property(GstPolypProbe *c, guint prop_id, const GParamSpec *pspec) {
+void gst_pulseprobe_probe_property(GstPolypProbe *c, guint prop_id, const GParamSpec *pspec) {
if (prop_id != c->prop_id) {
G_OBJECT_WARN_INVALID_PROPERTY_ID(c, prop_id, pspec);
return;
}
- if (gst_polypprobe_open(c)) {
- gst_polypprobe_enumerate(c);
- gst_polypprobe_close(c);
+ if (gst_pulseprobe_open(c)) {
+ gst_pulseprobe_enumerate(c);
+ gst_pulseprobe_close(c);
}
}
-GValueArray *gst_polypprobe_get_values(GstPolypProbe *c, guint prop_id, const GParamSpec *pspec) {
+GValueArray *gst_pulseprobe_get_values(GstPolypProbe *c, guint prop_id, const GParamSpec *pspec) {
GValueArray *array;
GValue value = { 0 };
GList *item;
@@ -312,10 +312,10 @@ GValueArray *gst_polypprobe_get_values(GstPolypProbe *c, guint prop_id, const GP
return array;
}
-void gst_polypprobe_set_server(GstPolypProbe *c, const gchar *server) {
+void gst_pulseprobe_set_server(GstPolypProbe *c, const gchar *server) {
g_assert(c);
- gst_polypprobe_invalidate(c);
+ gst_pulseprobe_invalidate(c);
g_free(c->server);
c->server = g_strdup(server);