mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-29 05:40:23 -04:00
minor cleanups
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@155 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
92bf0a365a
commit
761a895d1f
8 changed files with 30 additions and 15 deletions
|
|
@ -20,7 +20,7 @@
|
||||||
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
|
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||||
|
|
||||||
AC_PREREQ(2.57)
|
AC_PREREQ(2.57)
|
||||||
AC_INIT([polypaudio],[0.2],[mzcbylcnhqvb (at) 0pointer (dot) de])
|
AC_INIT([polypaudio],[0.3],[mzcbylcnhqvb (at) 0pointer (dot) de])
|
||||||
AC_CONFIG_SRCDIR([polyp/main.c])
|
AC_CONFIG_SRCDIR([polyp/main.c])
|
||||||
AC_CONFIG_HEADERS([config.h])
|
AC_CONFIG_HEADERS([config.h])
|
||||||
AM_INIT_AUTOMAKE([foreign -Wall])
|
AM_INIT_AUTOMAKE([foreign -Wall])
|
||||||
|
|
|
||||||
6
doc/todo
6
doc/todo
|
|
@ -8,7 +8,13 @@
|
||||||
- native library/protocol:
|
- native library/protocol:
|
||||||
module load/unload
|
module load/unload
|
||||||
kill client/...
|
kill client/...
|
||||||
|
autoload management
|
||||||
- more complete pactl
|
- more complete pactl
|
||||||
|
- daemon autostart
|
||||||
|
- cleanup tagstruct (add s32, pa_volume_t, pa_usec_t)
|
||||||
|
- xmlrpc
|
||||||
|
- remove all gcc warnings
|
||||||
|
- complete doxygen coverage
|
||||||
|
|
||||||
** later ***
|
** later ***
|
||||||
- slp/rendezvous
|
- slp/rendezvous
|
||||||
|
|
|
||||||
|
|
@ -129,10 +129,16 @@ enum pa_subscription_event_type {
|
||||||
/** Return one if an event type t matches an event mask bitfield */
|
/** Return one if an event type t matches an event mask bitfield */
|
||||||
#define pa_subscription_match_flags(m, t) (!!((m) & (1 << ((t) & PA_SUBSCRIPTION_EVENT_FACILITY_MASK))))
|
#define pa_subscription_match_flags(m, t) (!!((m) & (1 << ((t) & PA_SUBSCRIPTION_EVENT_FACILITY_MASK))))
|
||||||
|
|
||||||
/** A structure for latency info. See pa_stream_get_latency(). */
|
/** A structure for latency info. See pa_stream_get_latency(). The
|
||||||
|
* total latency a sample that is written with pa_stream_write() takes
|
||||||
|
* to be played is buffer_usec+sink_usec. The buffer to which
|
||||||
|
* buffer_usec relates may be manipulated freely (with
|
||||||
|
* pa_stream_write()'s delta argument, pa_stream_flush() and friends),
|
||||||
|
* the playback buffer sink_usec relates to is a FIFO which cannot be
|
||||||
|
* flushed or manipulated in any way. */
|
||||||
struct pa_latency_info {
|
struct pa_latency_info {
|
||||||
pa_usec_t buffer_usec; /**< Time in usecs the current buffer takes to play */
|
pa_usec_t buffer_usec; /**< Time in usecs the current buffer takes to play */
|
||||||
pa_usec_t sink_usec; /**< Time in usecs a sample takes to be played on the sink. The total latency is buffer_usec+sink_usec. */
|
pa_usec_t sink_usec; /**< Time in usecs a sample takes to be played on the sink. */
|
||||||
int playing; /**< Non-zero when the stream is currently playing */
|
int playing; /**< Non-zero when the stream is currently playing */
|
||||||
int queue_length; /**< Queue size in bytes. */
|
int queue_length; /**< Queue size in bytes. */
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -400,7 +400,8 @@ static void context_get_sink_input_info_callback(struct pa_pdispatch *pd, uint32
|
||||||
pa_tagstruct_getu32(t, &i.sink) < 0 ||
|
pa_tagstruct_getu32(t, &i.sink) < 0 ||
|
||||||
pa_tagstruct_get_sample_spec(t, &i.sample_spec) < 0 ||
|
pa_tagstruct_get_sample_spec(t, &i.sample_spec) < 0 ||
|
||||||
pa_tagstruct_getu32(t, &i.volume) < 0 ||
|
pa_tagstruct_getu32(t, &i.volume) < 0 ||
|
||||||
pa_tagstruct_getu32(t, &i.latency) < 0) {
|
pa_tagstruct_getu32(t, &i.buffer_usec) < 0 ||
|
||||||
|
pa_tagstruct_getu32(t, &i.sink_usec) < 0) {
|
||||||
pa_context_fail(o->context, PA_ERROR_PROTOCOL);
|
pa_context_fail(o->context, PA_ERROR_PROTOCOL);
|
||||||
goto finish;
|
goto finish;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -93,15 +93,17 @@ struct pa_client_info {
|
||||||
struct pa_operation* pa_context_get_client_info(struct pa_context *c, uint32_t index, void (*cb)(struct pa_context *c, const struct pa_client_info*i, int is_last, void *userdata), void *userdata);
|
struct pa_operation* pa_context_get_client_info(struct pa_context *c, uint32_t index, void (*cb)(struct pa_context *c, const struct pa_client_info*i, int is_last, void *userdata), void *userdata);
|
||||||
struct pa_operation* pa_context_get_client_info_list(struct pa_context *c, void (*cb)(struct pa_context *c, const struct pa_client_info*i, int is_last, void *userdata), void *userdata);
|
struct pa_operation* pa_context_get_client_info_list(struct pa_context *c, void (*cb)(struct pa_context *c, const struct pa_client_info*i, int is_last, void *userdata), void *userdata);
|
||||||
|
|
||||||
|
/** Stores information about sink inputs */
|
||||||
struct pa_sink_input_info {
|
struct pa_sink_input_info {
|
||||||
uint32_t index;
|
uint32_t index; /**< Name of this index */
|
||||||
const char *name;
|
const char *name; /**< Name of the sink input */
|
||||||
uint32_t owner_module;
|
uint32_t owner_module; /**< Index of the module this sink input belongs to, or PA_INVALID_INDEX when it does not belong to any module */
|
||||||
uint32_t client;
|
uint32_t client; /**< Index of the client this sink input belongs to, or PA_INVALID_INDEX when it does not belong to any client */
|
||||||
uint32_t sink;
|
uint32_t sink; /**< Index of the connected sink */
|
||||||
struct pa_sample_spec sample_spec;
|
struct pa_sample_spec sample_spec; /**< The sample specification of the sink input */
|
||||||
pa_volume_t volume;
|
pa_volume_t volume; /**< The volume of this sink input */
|
||||||
pa_usec_t latency;
|
pa_usec_t buffer_usec; /**< Latency due to buffering in sink input, see pa_latency_info for details */
|
||||||
|
pa_usec_t sink_usec; /**< Latency of the sink device, see pa_latency_info for details */
|
||||||
};
|
};
|
||||||
|
|
||||||
struct pa_operation* pa_context_get_sink_input_info(struct pa_context *c, uint32_t index, void (*cb)(struct pa_context *c, const struct pa_sink_input_info*i, int is_last, void *userdata), void *userdata);
|
struct pa_operation* pa_context_get_sink_input_info(struct pa_context *c, uint32_t index, void (*cb)(struct pa_context *c, const struct pa_sink_input_info*i, int is_last, void *userdata), void *userdata);
|
||||||
|
|
|
||||||
|
|
@ -168,8 +168,6 @@ void pa_command_request(struct pa_pdispatch *pd, uint32_t command, uint32_t tag,
|
||||||
|
|
||||||
s->requested_bytes += bytes;
|
s->requested_bytes += bytes;
|
||||||
|
|
||||||
fprintf(stderr, "total req: %u (%u)\n", s->requested_bytes, bytes);
|
|
||||||
|
|
||||||
if (s->requested_bytes && s->write_callback)
|
if (s->requested_bytes && s->write_callback)
|
||||||
s->write_callback(s, s->requested_bytes, s->write_userdata);
|
s->write_callback(s, s->requested_bytes, s->write_userdata);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1022,6 +1022,7 @@ static void sink_input_fill_tagstruct(struct pa_tagstruct *t, struct pa_sink_inp
|
||||||
pa_tagstruct_put_sample_spec(t, &s->sample_spec);
|
pa_tagstruct_put_sample_spec(t, &s->sample_spec);
|
||||||
pa_tagstruct_putu32(t, s->volume);
|
pa_tagstruct_putu32(t, s->volume);
|
||||||
pa_tagstruct_putu32(t, pa_sink_input_get_latency(s));
|
pa_tagstruct_putu32(t, pa_sink_input_get_latency(s));
|
||||||
|
pa_tagstruct_putu32(t, pa_sink_get_latency(s->sink));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void source_output_fill_tagstruct(struct pa_tagstruct *t, struct pa_source_output *s) {
|
static void source_output_fill_tagstruct(struct pa_tagstruct *t, struct pa_source_output *s) {
|
||||||
|
|
@ -1363,6 +1364,7 @@ static void command_flush_or_trigger_playback_stream(struct pa_pdispatch *pd, ui
|
||||||
|
|
||||||
pa_sink_notify(s->sink_input->sink);
|
pa_sink_notify(s->sink_input->sink);
|
||||||
pa_pstream_send_simple_ack(c->pstream, tag);
|
pa_pstream_send_simple_ack(c->pstream, tag);
|
||||||
|
request_bytes(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*** pstream callbacks ***/
|
/*** pstream callbacks ***/
|
||||||
|
|
|
||||||
|
|
@ -95,7 +95,7 @@ void pa_tagstruct_puts(struct pa_tagstruct*t, const char *s) {
|
||||||
l = strlen(s)+2;
|
l = strlen(s)+2;
|
||||||
extend(t, l);
|
extend(t, l);
|
||||||
t->data[t->length] = TAG_STRING;
|
t->data[t->length] = TAG_STRING;
|
||||||
strcpy(t->data+t->length+1, s);
|
strcpy((char*) (t->data+t->length+1), s);
|
||||||
t->length += l;
|
t->length += l;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue