[pulseaudio-commits] [SCM] PulseAudio Sound Server branch, master, updated. v0.9.13-303-g8c4e2be
Lennart Poettering
gitmailer-noreply at 0pointer.de
Mon Jan 19 14:55:25 PST 2009
This is an automated email from the git hooks/post-receive script. It was
generated because of a push to the "PulseAudio Sound Server" repository.
The master branch has been updated
from 310f433848b21a53def0a5a5ca0b3b2e6a2008ef (commit)
- Log -----------------------------------------------------------------
8c4e2be... include sink/source state in pactl output
8886e66... Document explicitly that the internal sink/source states are not considered part of the ABI/API
-----------------------------------------------------------------------
Summary of changes:
src/pulse/def.h | 24 ++++++++++++++++++------
src/utils/pactl.c | 20 ++++++++++++++++++++
2 files changed, 38 insertions(+), 6 deletions(-)
-----------------------------------------------------------------------
commit 8886e66ff68f5f23a2cacb06df6cb85a0175b7f1
Author: Lennart Poettering <lennart at poettering.net>
Date: Mon Jan 19 23:54:44 2009 +0100
Document explicitly that the internal sink/source states are not considered part of the ABI/API
diff --git a/src/pulse/def.h b/src/pulse/def.h
index 8e8857c..21a02bc 100644
--- a/src/pulse/def.h
+++ b/src/pulse/def.h
@@ -627,13 +627,19 @@ typedef enum pa_sink_state { /* enum serialized in u8 */
PA_SINK_SUSPENDED = 2,
/**< When suspended, actual sink access can be closed, for instance \since 0.9.15 */
- /* *** PRIVATE: server-side values *** */
+/** \cond fulldocs */
+ /* PRIVATE: Server-side values -- DO NOT USE THIS ON THE CLIENT
+ * SIDE! These values are *not* considered part of the official PA
+ * API/ABI. If you use them your application might break when PA
+ * is upgraded. Also, please note that these values are not useful
+ * on the client side anyway. */
PA_SINK_INIT = -2,
- /* Initialization state */
+ /**< Initialization state */
PA_SINK_UNLINKED = -3
- /* The state when the sink is getting unregistered and removed from client access */
+ /**< The state when the sink is getting unregistered and removed from client access */
+/** \endcond */
} pa_sink_state_t;
@@ -696,13 +702,19 @@ typedef enum pa_source_state {
PA_SOURCE_SUSPENDED = 2,
/**< When suspended, actual source access can be closed, for instance \since 0.9.15 */
- /* *** PRIVATE: server-side values *** */
+/** \cond fulldocs */
+ /* PRIVATE: Server-side values -- DO NOT USE THIS ON THE CLIENT
+ * SIDE! These values are *not* considered part of the official PA
+ * API/ABI. If you use them your application might break when PA
+ * is upgraded. Also, please note that these values are not useful
+ * on the client side anyway. */
PA_SOURCE_INIT = -2,
- /* Initialization state */
+ /**< Initialization state */
PA_SOURCE_UNLINKED = -3
- /* The state when the source is getting unregistered and removed from client access */
+ /**< The state when the source is getting unregistered and removed from client access */
+/** \endcond */
} pa_source_state_t;
commit 8c4e2be05b519c54cb51c161b7cd08bf9e46ab2b
Author: Lennart Poettering <lennart at poettering.net>
Date: Mon Jan 19 23:55:22 2009 +0100
include sink/source state in pactl output
diff --git a/src/utils/pactl.c b/src/utils/pactl.c
index 1ff979e..dbc9ba7 100644
--- a/src/utils/pactl.c
+++ b/src/utils/pactl.c
@@ -153,6 +153,14 @@ static void get_server_info_callback(pa_context *c, const pa_server_info *i, voi
}
static void get_sink_info_callback(pa_context *c, const pa_sink_info *i, int is_last, void *userdata) {
+
+ static const char *state_table[] = {
+ [1+PA_SINK_INVALID_STATE] = "n/a",
+ [1+PA_SINK_RUNNING] = "RUNNING",
+ [1+PA_SINK_IDLE] = "IDLE",
+ [1+PA_SINK_SUSPENDED] = "SUSPENDED"
+ };
+
char
s[PA_SAMPLE_SPEC_SNPRINT_MAX],
cv[PA_CVOLUME_SNPRINT_MAX],
@@ -180,6 +188,7 @@ static void get_sink_info_callback(pa_context *c, const pa_sink_info *i, int is_
nl = 1;
printf(_("Sink #%u\n"
+ "\tState: %s\n"
"\tName: %s\n"
"\tDescription: %s\n"
"\tDriver: %s\n"
@@ -195,6 +204,7 @@ static void get_sink_info_callback(pa_context *c, const pa_sink_info *i, int is_
"\tFlags: %s%s%s%s%s%s\n"
"\tProperties:\n\t\t%s\n"),
i->index,
+ state_table[1+i->state],
i->name,
pa_strnull(i->description),
pa_strnull(i->driver),
@@ -223,6 +233,14 @@ static void get_sink_info_callback(pa_context *c, const pa_sink_info *i, int is_
}
static void get_source_info_callback(pa_context *c, const pa_source_info *i, int is_last, void *userdata) {
+
+ static const char *state_table[] = {
+ [1+PA_SOURCE_INVALID_STATE] = "n/a",
+ [1+PA_SOURCE_RUNNING] = "RUNNING",
+ [1+PA_SOURCE_IDLE] = "IDLE",
+ [1+PA_SOURCE_SUSPENDED] = "SUSPENDED"
+ };
+
char
s[PA_SAMPLE_SPEC_SNPRINT_MAX],
cv[PA_CVOLUME_SNPRINT_MAX],
@@ -250,6 +268,7 @@ static void get_source_info_callback(pa_context *c, const pa_source_info *i, int
nl = 1;
printf(_("Source #%u\n"
+ "\tState: %s\n"
"\tName: %s\n"
"\tDescription: %s\n"
"\tDriver: %s\n"
@@ -265,6 +284,7 @@ static void get_source_info_callback(pa_context *c, const pa_source_info *i, int
"\tFlags: %s%s%s%s%s%s\n"
"\tProperties:\n\t\t%s\n"),
i->index,
+ state_table[1+i->state],
i->name,
pa_strnull(i->description),
pa_strnull(i->driver),
--
hooks/post-receive
PulseAudio Sound Server
More information about the pulseaudio-commits
mailing list