mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-12-16 08:56:40 -05:00
add refernce counting for sinks, sources, sink-inputs and source-outputs
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@200 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
8c6593dabf
commit
6e019795bf
27 changed files with 426 additions and 132 deletions
|
|
@ -31,7 +31,15 @@
|
|||
#include "module.h"
|
||||
#include "client.h"
|
||||
|
||||
enum pa_sink_input_state {
|
||||
PA_SINK_INPUT_RUNNING,
|
||||
PA_SINK_INPUT_DISCONNECTED
|
||||
};
|
||||
|
||||
struct pa_sink_input {
|
||||
int ref;
|
||||
enum pa_sink_input_state state;
|
||||
|
||||
uint32_t index;
|
||||
|
||||
int corked;
|
||||
|
|
@ -55,11 +63,14 @@ struct pa_sink_input {
|
|||
};
|
||||
|
||||
struct pa_sink_input* pa_sink_input_new(struct pa_sink *s, const char *name, const struct pa_sample_spec *spec, int variable_rate);
|
||||
void pa_sink_input_free(struct pa_sink_input* i);
|
||||
void pa_sink_input_unref(struct pa_sink_input* i);
|
||||
struct pa_sink_input* pa_sink_input_ref(struct pa_sink_input* i);
|
||||
|
||||
/* Code that didn't create the input stream should call this function to
|
||||
* request destruction of it */
|
||||
void pa_sink_input_kill(struct pa_sink_input *i);
|
||||
/* To be called by the implementing module only */
|
||||
void pa_sink_input_disconnect(struct pa_sink_input* i);
|
||||
|
||||
/* External code may request disconnection with this funcion */
|
||||
void pa_sink_input_kill(struct pa_sink_input*i);
|
||||
|
||||
pa_usec_t pa_sink_input_get_latency(struct pa_sink_input *i);
|
||||
|
||||
|
|
@ -72,4 +83,6 @@ void pa_sink_input_cork(struct pa_sink_input *i, int b);
|
|||
|
||||
void pa_sink_input_set_rate(struct pa_sink_input *i, uint32_t rate);
|
||||
|
||||
void pa_sink_input_set_name(struct pa_sink_input *i, const char *name);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue