mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-05 13:29:57 -05:00
* some commenting work
* add new field "read_only" to memory blocks * add new API function pa_context_get_server() * filter capture data through mcalign on client * make module-tunnel use pa_socket_client_new_string() instead of using pa_resolve_server() directly. * remove pa_resolve_server() * remove debug.h and replace it by a macro definition on the gcc command line * some strbuf cleanups * small fixes in pa_stream for cleanup when server dies * new CLI command "load-sample-dir-lazy" * send FQDN as part of server info * rework mcalign, this time with memory block merging * fix iochannel cleanup when connection dies * check getaddrinfo() results git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@286 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
f5f6605254
commit
0a2bbc528b
30 changed files with 636 additions and 273 deletions
|
|
@ -61,6 +61,8 @@ struct pa_stream *pa_stream_new(struct pa_context *c, const char *name, const st
|
|||
s->state = PA_STREAM_DISCONNECTED;
|
||||
memset(&s->buffer_attr, 0, sizeof(s->buffer_attr));
|
||||
|
||||
s->mcalign = pa_mcalign_new(pa_frame_size(ss), c->memblock_stat);
|
||||
|
||||
s->counter = 0;
|
||||
s->previous_time = 0;
|
||||
|
||||
|
|
@ -83,6 +85,8 @@ static void stream_free(struct pa_stream *s) {
|
|||
assert(s->mainloop);
|
||||
s->mainloop->time_free(s->ipol_event);
|
||||
}
|
||||
|
||||
pa_mcalign_free(s->mcalign);
|
||||
|
||||
pa_xfree(s->name);
|
||||
pa_xfree(s);
|
||||
|
|
@ -203,11 +207,13 @@ static void ipol_callback(struct pa_mainloop_api *m, struct pa_time_event *e, co
|
|||
struct pa_stream *s = userdata;
|
||||
|
||||
pa_stream_ref(s);
|
||||
pa_operation_unref(pa_stream_get_latency_info(s, NULL, NULL));
|
||||
|
||||
if (s->state == PA_STREAM_READY)
|
||||
pa_operation_unref(pa_stream_get_latency_info(s, NULL, NULL));
|
||||
|
||||
gettimeofday(&tv2, NULL);
|
||||
tv2.tv_usec += LATENCY_IPOL_INTERVAL_USEC;
|
||||
|
||||
|
||||
m->time_restart(e, &tv2);
|
||||
|
||||
pa_stream_unref(s);
|
||||
|
|
@ -329,7 +335,7 @@ void pa_stream_write(struct pa_stream *s, const void *data, size_t length, void
|
|||
assert(s && s->context && data && length && s->state == PA_STREAM_READY && s->ref >= 1);
|
||||
|
||||
if (free_cb) {
|
||||
chunk.memblock = pa_memblock_new_user((void*) data, length, free_cb, s->context->memblock_stat);
|
||||
chunk.memblock = pa_memblock_new_user((void*) data, length, free_cb, 1, s->context->memblock_stat);
|
||||
assert(chunk.memblock && chunk.memblock->data);
|
||||
} else {
|
||||
chunk.memblock = pa_memblock_new(length, s->context->memblock_stat);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue