def.h File Reference

Global definitions. More...

Go to the source code of this file.

Data Structures

struct  pa_buffer_attr
 Playback and record buffer metrics. More...
struct  pa_timing_info
 A structure for all kinds of timing information of a stream. More...
struct  pa_spawn_api
 A structure for the spawn api. More...

Defines

#define PA_INVALID_INDEX   ((uint32_t) -1)
 An invalid index.
#define pa_subscription_match_flags(m, t)   (!!((m) & (1 << ((t) & PA_SUBSCRIPTION_EVENT_FACILITY_MASK))))
 Return one if an event type t matches an event mask bitfield.

Typedefs

typedef enum pa_context_state pa_context_state_t
typedef enum pa_stream_state pa_stream_state_t
typedef enum pa_operation_state pa_operation_state_t
typedef enum pa_context_flags pa_context_flags_t
typedef enum pa_stream_direction pa_stream_direction_t
typedef enum pa_stream_flags pa_stream_flags_t
typedef enum pa_subscription_mask pa_subscription_mask_t
typedef enum
pa_subscription_event_type 
pa_subscription_event_type_t
typedef enum pa_seek_mode pa_seek_mode_t
typedef enum pa_sink_flags pa_sink_flags_t
typedef enum pa_source_flags pa_source_flags_t
typedef void(* pa_free_cb_t )(void *p)
 A generic free() like callback prototype.

Enumerations

enum  pa_context_state {
  PA_CONTEXT_UNCONNECTED,
  PA_CONTEXT_CONNECTING,
  PA_CONTEXT_AUTHORIZING,
  PA_CONTEXT_SETTING_NAME,
  PA_CONTEXT_READY,
  PA_CONTEXT_FAILED,
  PA_CONTEXT_TERMINATED
}
 The state of a connection context. More...
enum  pa_stream_state {
  PA_STREAM_UNCONNECTED,
  PA_STREAM_CREATING,
  PA_STREAM_READY,
  PA_STREAM_FAILED,
  PA_STREAM_TERMINATED
}
 The state of a stream. More...
enum  pa_operation_state {
  PA_OPERATION_RUNNING,
  PA_OPERATION_DONE,
  PA_OPERATION_CANCELED
}
 The state of an operation. More...
enum  pa_context_flags { PA_CONTEXT_NOAUTOSPAWN = 1 }
 Some special flags for contexts. More...
enum  pa_stream_direction {
  PA_STREAM_NODIRECTION,
  PA_STREAM_PLAYBACK,
  PA_STREAM_RECORD,
  PA_STREAM_UPLOAD
}
 The direction of a pa_stream object. More...
enum  pa_stream_flags {
  PA_STREAM_START_CORKED = 1,
  PA_STREAM_INTERPOLATE_TIMING = 2,
  PA_STREAM_NOT_MONOTONOUS = 4,
  PA_STREAM_AUTO_TIMING_UPDATE = 8
}
 Some special flags for stream connections. More...
enum  {
  PA_OK = 0,
  PA_ERR_ACCESS,
  PA_ERR_COMMAND,
  PA_ERR_INVALID,
  PA_ERR_EXIST,
  PA_ERR_NOENTITY,
  PA_ERR_CONNECTIONREFUSED,
  PA_ERR_PROTOCOL,
  PA_ERR_TIMEOUT,
  PA_ERR_AUTHKEY,
  PA_ERR_INTERNAL,
  PA_ERR_CONNECTIONTERMINATED,
  PA_ERR_KILLED,
  PA_ERR_INVALIDSERVER,
  PA_ERR_MODINITFAILED,
  PA_ERR_BADSTATE,
  PA_ERR_NODATA,
  PA_ERR_VERSION,
  PA_ERR_TOOLARGE,
  PA_ERR_NOTSUPPORTED,
  PA_ERR_MAX
}
 Error values as used by pa_context_errno(). More...
enum  pa_subscription_mask {
  PA_SUBSCRIPTION_MASK_NULL = 0,
  PA_SUBSCRIPTION_MASK_SINK = 1,
  PA_SUBSCRIPTION_MASK_SOURCE = 2,
  PA_SUBSCRIPTION_MASK_SINK_INPUT = 4,
  PA_SUBSCRIPTION_MASK_SOURCE_OUTPUT = 8,
  PA_SUBSCRIPTION_MASK_MODULE = 16,
  PA_SUBSCRIPTION_MASK_CLIENT = 32,
  PA_SUBSCRIPTION_MASK_SAMPLE_CACHE = 64,
  PA_SUBSCRIPTION_MASK_SERVER = 128,
  PA_SUBSCRIPTION_MASK_AUTOLOAD = 256,
  PA_SUBSCRIPTION_MASK_ALL = 511
}
 Subscription event mask, as used by pa_context_subscribe(). More...
enum  pa_subscription_event_type {
  PA_SUBSCRIPTION_EVENT_SINK = 0,
  PA_SUBSCRIPTION_EVENT_SOURCE = 1,
  PA_SUBSCRIPTION_EVENT_SINK_INPUT = 2,
  PA_SUBSCRIPTION_EVENT_SOURCE_OUTPUT = 3,
  PA_SUBSCRIPTION_EVENT_MODULE = 4,
  PA_SUBSCRIPTION_EVENT_CLIENT = 5,
  PA_SUBSCRIPTION_EVENT_SAMPLE_CACHE = 6,
  PA_SUBSCRIPTION_EVENT_SERVER = 7,
  PA_SUBSCRIPTION_EVENT_AUTOLOAD = 8,
  PA_SUBSCRIPTION_EVENT_FACILITY_MASK = 15,
  PA_SUBSCRIPTION_EVENT_NEW = 0,
  PA_SUBSCRIPTION_EVENT_CHANGE = 16,
  PA_SUBSCRIPTION_EVENT_REMOVE = 32,
  PA_SUBSCRIPTION_EVENT_TYPE_MASK = 16+32
}
 Subscription event types, as used by pa_context_subscribe(). More...
enum  pa_seek_mode {
  PA_SEEK_RELATIVE = 0,
  PA_SEEK_ABSOLUTE = 1,
  PA_SEEK_RELATIVE_ON_READ = 2,
  PA_SEEK_RELATIVE_END = 3
}
 Seek type for pa_stream_write(). More...
enum  pa_sink_flags {
  PA_SINK_HW_VOLUME_CTRL = 1,
  PA_SINK_LATENCY = 2,
  PA_SINK_HARDWARE = 4
}
 Special sink flags. More...
enum  pa_source_flags {
  PA_SOURCE_HW_VOLUME_CTRL = 1,
  PA_SOURCE_LATENCY = 2,
  PA_SOURCE_HARDWARE = 4
}
 Special source flags. More...


Detailed Description

Global definitions.


Define Documentation

#define PA_INVALID_INDEX   ((uint32_t) -1)

An invalid index.

#define pa_subscription_match_flags ( m,
 )     (!!((m) & (1 << ((t) & PA_SUBSCRIPTION_EVENT_FACILITY_MASK))))

Return one if an event type t matches an event mask bitfield.


Typedef Documentation

typedef enum pa_context_flags pa_context_flags_t

typedef enum pa_context_state pa_context_state_t

typedef void(* pa_free_cb_t)(void *p)

A generic free() like callback prototype.

typedef enum pa_operation_state pa_operation_state_t

typedef enum pa_seek_mode pa_seek_mode_t

typedef enum pa_sink_flags pa_sink_flags_t

typedef enum pa_source_flags pa_source_flags_t

typedef enum pa_stream_direction pa_stream_direction_t

typedef enum pa_stream_flags pa_stream_flags_t

typedef enum pa_stream_state pa_stream_state_t

typedef enum pa_subscription_event_type pa_subscription_event_type_t

typedef enum pa_subscription_mask pa_subscription_mask_t


Enumeration Type Documentation

anonymous enum

Error values as used by pa_context_errno().

Use pa_strerror() to convert these values to human readable strings

Enumerator:
PA_OK  No error.
PA_ERR_ACCESS  Access failure.
PA_ERR_COMMAND  Unknown command.
PA_ERR_INVALID  Invalid argument.
PA_ERR_EXIST  Entity exists.
PA_ERR_NOENTITY  No such entity.
PA_ERR_CONNECTIONREFUSED  Connection refused.
PA_ERR_PROTOCOL  Protocol error.
PA_ERR_TIMEOUT  Timeout.
PA_ERR_AUTHKEY  No authorization key.
PA_ERR_INTERNAL  Internal error.
PA_ERR_CONNECTIONTERMINATED  Connection terminated.
PA_ERR_KILLED  Entity killed.
PA_ERR_INVALIDSERVER  Invalid server.
PA_ERR_MODINITFAILED  Module initialization failed.
PA_ERR_BADSTATE  Bad state.
PA_ERR_NODATA  No data.
PA_ERR_VERSION  Incompatible protocol version.

Since:
0.8
PA_ERR_TOOLARGE  Data too large.

Since:
0.8.1
PA_ERR_NOTSUPPORTED  Operation not supported.

Since:
0.9.5
PA_ERR_MAX  Not really an error but the first invalid error code.

enum pa_context_flags

Some special flags for contexts.

Since:
0.8
Enumerator:
PA_CONTEXT_NOAUTOSPAWN  Disabled autospawning of the PulseAudio daemon if required.

enum pa_context_state

The state of a connection context.

Enumerator:
PA_CONTEXT_UNCONNECTED  The context hasn't been connected yet.
PA_CONTEXT_CONNECTING  A connection is being established.
PA_CONTEXT_AUTHORIZING  The client is authorizing itself to the daemon.
PA_CONTEXT_SETTING_NAME  The client is passing its application name to the daemon.
PA_CONTEXT_READY  The connection is established, the context is ready to execute operations.
PA_CONTEXT_FAILED  The connection failed or was disconnected.
PA_CONTEXT_TERMINATED  The connection was terminated cleanly.

enum pa_operation_state

The state of an operation.

Enumerator:
PA_OPERATION_RUNNING  The operation is still running.
PA_OPERATION_DONE  The operation has been completed.
PA_OPERATION_CANCELED  The operation has been canceled.

enum pa_seek_mode

Seek type for pa_stream_write().

Since:
0.8
Enumerator:
PA_SEEK_RELATIVE  Seek relatively to the write index.
PA_SEEK_ABSOLUTE  Seek relatively to the start of the buffer queue.
PA_SEEK_RELATIVE_ON_READ  Seek relatively to the read index.

PA_SEEK_RELATIVE_END  Seek relatively to the current end of the buffer queue.

enum pa_sink_flags

Special sink flags.

Since:
0.8
Enumerator:
PA_SINK_HW_VOLUME_CTRL  Supports hardware volume control.
PA_SINK_LATENCY  Supports latency querying.
PA_SINK_HARDWARE  Is a hardware sink of some kind, in contrast to "virtual"/software sinks.

Since:
0.9.3

enum pa_source_flags

Special source flags.

Since:
0.8
Enumerator:
PA_SOURCE_HW_VOLUME_CTRL  Supports hardware volume control.
PA_SOURCE_LATENCY  Supports latency querying.
PA_SOURCE_HARDWARE  Is a hardware source of some kind, in contrast to "virtual"/software source.

Since:
0.9.3

enum pa_stream_direction

The direction of a pa_stream object.

Enumerator:
PA_STREAM_NODIRECTION  Invalid direction.
PA_STREAM_PLAYBACK  Playback stream.
PA_STREAM_RECORD  Record stream.
PA_STREAM_UPLOAD  Sample upload stream.

enum pa_stream_flags

Some special flags for stream connections.

Since:
0.6
Enumerator:
PA_STREAM_START_CORKED  Create the stream corked, requiring an explicit pa_stream_cork() call to uncork it.

PA_STREAM_INTERPOLATE_TIMING  Interpolate the latency for this stream.

When enabled, pa_stream_get_latency() and pa_stream_get_time() will try to estimate the current record/playback time based on the local time that passed since the last timing info update. Using this option has the advantage of not requiring a whole roundtrip when the current playback/recording time is needed. Consider using this option when requesting latency information frequently. This is especially useful on long latency network connections. It makes a lot of sense to combine this option with PA_STREAM_AUTO_TIMING_UPDATE.

PA_STREAM_NOT_MONOTONOUS  Don't force the time to increase monotonically.

If this option is enabled, pa_stream_get_time() will not necessarily return always monotonically increasing time values on each call. This may confuse applications which cannot deal with time going 'backwards', but has the advantage that bad transport latency estimations that caused the time to to jump ahead can be corrected quickly, without the need to wait.

PA_STREAM_AUTO_TIMING_UPDATE  If set timing update requests are issued periodically automatically.

Combined with PA_STREAM_INTERPOLATE_TIMING you will be able to query the current time and latency with pa_stream_get_time() and pa_stream_get_latency() at all times without a packet round trip.

enum pa_stream_state

The state of a stream.

Enumerator:
PA_STREAM_UNCONNECTED  The stream is not yet connected to any sink or source.
PA_STREAM_CREATING  The stream is being created.
PA_STREAM_READY  The stream is established, you may pass audio data to it now.
PA_STREAM_FAILED  An error occured that made the stream invalid.
PA_STREAM_TERMINATED  The stream has been terminated cleanly.

enum pa_subscription_event_type

Subscription event types, as used by pa_context_subscribe().

Enumerator:
PA_SUBSCRIPTION_EVENT_SINK  Event type: Sink.
PA_SUBSCRIPTION_EVENT_SOURCE  Event type: Source.
PA_SUBSCRIPTION_EVENT_SINK_INPUT  Event type: Sink input.
PA_SUBSCRIPTION_EVENT_SOURCE_OUTPUT  Event type: Source output.
PA_SUBSCRIPTION_EVENT_MODULE  Event type: Module.
PA_SUBSCRIPTION_EVENT_CLIENT  Event type: Client.
PA_SUBSCRIPTION_EVENT_SAMPLE_CACHE  Event type: Sample cache item.
PA_SUBSCRIPTION_EVENT_SERVER  Event type: Global server change, only occuring with PA_SUBSCRIPTION_EVENT_CHANGE.

Since:
0.4
PA_SUBSCRIPTION_EVENT_AUTOLOAD  Event type: Autoload table changes.

Since:
0.5
PA_SUBSCRIPTION_EVENT_FACILITY_MASK  A mask to extract the event type from an event value.
PA_SUBSCRIPTION_EVENT_NEW  A new object was created.
PA_SUBSCRIPTION_EVENT_CHANGE  A property of the object was modified.
PA_SUBSCRIPTION_EVENT_REMOVE  An object was removed.
PA_SUBSCRIPTION_EVENT_TYPE_MASK  A mask to extract the event operation from an event value.

enum pa_subscription_mask

Subscription event mask, as used by pa_context_subscribe().

Enumerator:
PA_SUBSCRIPTION_MASK_NULL  No events.
PA_SUBSCRIPTION_MASK_SINK  Sink events.
PA_SUBSCRIPTION_MASK_SOURCE  Source events.
PA_SUBSCRIPTION_MASK_SINK_INPUT  Sink input events.
PA_SUBSCRIPTION_MASK_SOURCE_OUTPUT  Source output events.
PA_SUBSCRIPTION_MASK_MODULE  Module events.
PA_SUBSCRIPTION_MASK_CLIENT  Client events.
PA_SUBSCRIPTION_MASK_SAMPLE_CACHE  Sample cache events.
PA_SUBSCRIPTION_MASK_SERVER  Other global server changes.

Since:
0.4
PA_SUBSCRIPTION_MASK_AUTOLOAD  Autoload table events.

Since:
0.5
PA_SUBSCRIPTION_MASK_ALL  Catch all events.

Since:
0.8


Generated on Wed Jan 23 11:06:29 2008 for PulseAudio by  doxygen 1.5.4