]> code.delx.au - pulseaudio/blobdiff - src/pulse/def.h
- Check process name when dealing with PID files
[pulseaudio] / src / pulse / def.h
index 06d4c7c2babba440b7171ce03d524ad58e309391..dabbc5eb072aefde63dcbd6e3e967f9dddb64336 100644 (file)
@@ -5,17 +5,20 @@
 
 /***
   This file is part of PulseAudio.
+
+  Copyright 2004-2006 Lennart Poettering
+  Copyright 2006 Pierre Ossman <ossman@cendio.se> for Cendio AB
+
   PulseAudio is free software; you can redistribute it and/or modify
   it under the terms of the GNU Lesser General Public License as
   published by the Free Software Foundation; either version 2.1 of the
   License, or (at your option) any later version.
+
   PulseAudio is distributed in the hope that it will be useful, but
   WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
   Lesser General Public License for more details.
+
   You should have received a copy of the GNU Lesser General Public
   License along with PulseAudio; if not, write to the Free Software
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
@@ -69,7 +72,7 @@ typedef enum pa_context_flags {
     PA_CONTEXT_NOAUTOSPAWN = 1 /**< Disabled autospawning of the PulseAudio daemon if required */
 } pa_context_flags_t;
 
-/** The direction of a pa_stream object */ 
+/** The direction of a pa_stream object */
 typedef enum pa_stream_direction {
     PA_STREAM_NODIRECTION,   /**< Invalid direction */
     PA_STREAM_PLAYBACK,      /**< Playback stream */
@@ -119,7 +122,7 @@ typedef enum pa_stream_flags {
                                       * ahead can be corrected
                                       * quickly, without the need to
                                       * wait. */
-    PA_STREAM_AUTO_TIMING_UPDATE = 8 /**< If set timing update requests
+    PA_STREAM_AUTO_TIMING_UPDATE = 8, /**< If set timing update requests
                                        * are issued periodically
                                        * automatically. Combined with
                                        * PA_STREAM_INTERPOLATE_TIMING
@@ -129,6 +132,83 @@ typedef enum pa_stream_flags {
                                        * pa_stream_get_latency() at
                                        * all times without a packet
                                        * round trip.*/
+    PA_STREAM_NO_REMAP_CHANNELS = 16, /**< Don't remap channels by
+                                       * their name, instead map them
+                                       * simply by their
+                                       * index. Implies
+                                       * PA_STREAM_NO_REMIX_CHANNELS. Only
+                                       * supported when the server is
+                                       * at least PA 0.9.8. It is
+                                       * ignored on older
+                                       * servers.\since 0.9.8 */
+    PA_STREAM_NO_REMIX_CHANNELS = 32, /**< When remapping channels by
+                                       * name, don't upmix or downmix
+                                       * them to related
+                                       * channels. Copy them into
+                                       * matching channels of the
+                                       * device 1:1. Only supported
+                                       * when the server is at least
+                                       * PA 0.9.8. It is ignored on
+                                       * older servers. \since
+                                       * 0.9.8 */
+    PA_STREAM_FIX_FORMAT = 64, /**< Use the sample format of the
+                                * sink/device this stream is being
+                                * connected to, and possibly ignore
+                                * the format the sample spec contains
+                                * -- but you still have to pass a
+                                * valid value in it as a hint to
+                                * PulseAudio what would suit your
+                                * stream best. If this is used you
+                                * should query the used sample format
+                                * after creating the stream by using
+                                * pa_stream_get_sample_spec(). Also,
+                                * if you specified manual buffer
+                                * metrics it is recommended to update
+                                * them with
+                                * pa_stream_set_buffer_attr() to
+                                * compensate for the changed frame
+                                * sizes. Only supported when the
+                                * server is at least PA 0.9.8. It is
+                                * ignored on older servers. \since
+                                * 0.9.8 */
+
+    PA_STREAM_FIX_RATE = 128, /**< Use the sample rate of the sink,
+                               * and possibly ignore the rate the
+                               * sample spec contains. Usage similar
+                               * to PA_STREAM_FIX_FORMAT.Only
+                               * supported when the server is at least
+                               * PA 0.9.8. It is ignored on older
+                               * servers. \since 0.9.8 */
+
+    PA_STREAM_FIX_CHANNELS = 256, /**< Use the number of channels and
+                               * the channel map of the sink, and
+                               * possibly ignore the number of
+                               * channels and the map the sample spec
+                               * and the passed channel map
+                               * contains. Usage similar to
+                               * PA_STREAM_FIX_FORMAT. Only supported
+                               * when the server is at least PA
+                               * 0.9.8. It is ignored on older
+                               * servers. \since 0.9.8 */
+    PA_STREAM_DONT_MOVE = 512, /**< Don't allow moving of this stream to
+                              * another sink/device. Useful if you use
+                              * any of the PA_STREAM_FIX_ flags and
+                              * want to make sure that resampling
+                              * never takes place -- which might
+                              * happen if the stream is moved to
+                              * another sink/source whith a different
+                              * sample spec/channel map. Only
+                              * supported when the server is at least
+                              * PA 0.9.8. It is ignored on older
+                              * servers. \since 0.9.8 */
+    PA_STREAM_VARIABLE_RATE = 1024, /**< Allow dynamic changing of the
+                                     * sampling rate during playback
+                                     * with
+                                     * pa_stream_update_sample_rate(). Only
+                                     * supported when the server is at
+                                     * least PA 0.9.8. It is ignored
+                                     * on older servers. \since
+                                     * 0.9.8 */
 } pa_stream_flags_t;
 
 /** Playback and record buffer metrics */
@@ -149,7 +229,7 @@ enum {
     PA_ERR_EXIST,                  /**< Entity exists */
     PA_ERR_NOENTITY,               /**< No such entity */
     PA_ERR_CONNECTIONREFUSED,      /**< Connection refused */
-    PA_ERR_PROTOCOL,               /**< Protocol error */ 
+    PA_ERR_PROTOCOL,               /**< Protocol error */
     PA_ERR_TIMEOUT,                /**< Timeout */
     PA_ERR_AUTHKEY,                /**< No authorization key */
     PA_ERR_INTERNAL,               /**< Internal error */
@@ -161,6 +241,7 @@ enum {
     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 */
 };
 
@@ -206,7 +287,7 @@ typedef enum pa_subscription_event_type {
  * total output latency a sample that is written with
  * pa_stream_write() takes to be played may be estimated by
  * sink_usec+buffer_usec+transport_usec. (where buffer_usec is defined
- * as pa_bytes_to_usec(write_index-read_index)) The output buffer 
+ * as pa_bytes_to_usec(write_index-read_index)) The output buffer
  * which buffer_usec relates to may be manipulated freely (with
  * pa_stream_write()'s seek argument, pa_stream_flush() and friends),
  * the buffers sink_usec and source_usec relate to are first-in
@@ -255,7 +336,7 @@ typedef struct pa_timing_info {
                                * flush request that corrupted it has
                                * been issued in the time since this
                                * latency info was current. \since 0.8  */
-    
+
     int64_t read_index;       /**< Current read index into the
                                * playback buffer in bytes. Think twice before
                                * using this for seeking purposes: it
@@ -287,7 +368,7 @@ typedef struct pa_spawn_api {
 /** Seek type for pa_stream_write(). \since 0.8*/
 typedef enum pa_seek_mode {
     PA_SEEK_RELATIVE = 0,           /**< Seek relatively to the write index */
-    PA_SEEK_ABSOLUTE = 1,           /**< Seek relatively to the start of the buffer queue */  
+    PA_SEEK_ABSOLUTE = 1,           /**< Seek relatively to the start of the buffer queue */
     PA_SEEK_RELATIVE_ON_READ = 2,   /**< Seek relatively to the read index.  */
     PA_SEEK_RELATIVE_END = 3        /**< Seek relatively to the current end of the buffer queue. */
 } pa_seek_mode_t;
@@ -296,14 +377,16 @@ typedef enum pa_seek_mode {
 typedef enum pa_sink_flags {
     PA_SINK_HW_VOLUME_CTRL = 1,   /**< Supports hardware volume control */
     PA_SINK_LATENCY = 2,          /**< Supports latency querying */
-    PA_SINK_HARDWARE = 4          /**< Is a hardware sink of some kind, in contrast to "virtual"/software sinks */
+    PA_SINK_HARDWARE = 4,         /**< Is a hardware sink of some kind, in contrast to "virtual"/software sinks \since 0.9.3 */
+    PA_SINK_NETWORK = 8           /**< Is a networked sink of some kind. \since 0.9.7 */
 } pa_sink_flags_t;
 
 /** Special source flags. \since 0.8  */
 typedef enum pa_source_flags {
     PA_SOURCE_HW_VOLUME_CTRL = 1,  /**< Supports hardware volume control */
     PA_SOURCE_LATENCY = 2,         /**< Supports latency querying */
-    PA_SOURCE_HARDWARE = 4         /**< Is a hardware source of some kind, in contrast to "virtual"/software source */
+    PA_SOURCE_HARDWARE = 4,        /**< Is a hardware source of some kind, in contrast to "virtual"/software source \since 0.9.3 */
+    PA_SOURCE_NETWORK = 8          /**< Is a networked sink of some kind. \since 0.9.7 */
 } pa_source_flags_t;
 
 /** A generic free() like callback prototype */