* add first part of zeroconf publisher

* bump version to 0.7.1.
* improve logging subsystem (introducing log levels)
* remove verbose flag on cli
* add new API pa_sample_format_to_string()
* replace strtol() by usages of pa_atou() and pa_atoi()


git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@317 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
Lennart Poettering 2004-12-11 00:10:41 +00:00
parent 5be9641ffe
commit 73eabece33
38 changed files with 467 additions and 280 deletions

View file

@ -35,6 +35,7 @@
#include "sink.h"
#include "xmalloc.h"
#include "subscribe.h"
#include "util.h"
struct namereg_entry {
enum pa_namereg_type type;
@ -112,8 +113,6 @@ void pa_namereg_unregister(struct pa_core *c, const char *name) {
void* pa_namereg_get(struct pa_core *c, const char *name, enum pa_namereg_type type, int autoload) {
struct namereg_entry *e;
uint32_t index;
char *x = NULL;
void *d = NULL;
assert(c);
if (!name) {
@ -130,9 +129,7 @@ void* pa_namereg_get(struct pa_core *c, const char *name, enum pa_namereg_type t
if (e->type == e->type)
return e->data;
index = (uint32_t) strtol(name, &x, 0);
if (!x || *x != 0) {
if (pa_atou(name, &index) < 0) {
if (autoload) {
pa_autoload_request(c, name, type);
@ -146,13 +143,13 @@ void* pa_namereg_get(struct pa_core *c, const char *name, enum pa_namereg_type t
}
if (type == PA_NAMEREG_SINK)
d = pa_idxset_get_by_index(c->sinks, index);
return pa_idxset_get_by_index(c->sinks, index);
else if (type == PA_NAMEREG_SOURCE)
d = pa_idxset_get_by_index(c->sources, index);
return pa_idxset_get_by_index(c->sources, index);
else if (type == PA_NAMEREG_SAMPLE && c->scache)
d = pa_idxset_get_by_index(c->scache, index);
return d;
return pa_idxset_get_by_index(c->scache, index);
return NULL;
}
void pa_namereg_set_default(struct pa_core*c, const char *name, enum pa_namereg_type type) {