]> code.delx.au - pulseaudio/blobdiff - src/pulse/introspect.h
core: Fix uninit pointer read in protocol-native
[pulseaudio] / src / pulse / introspect.h
index 6ea4536127eaa7a817c644613f7b5ef6664d1a72..023b4186a25f0278c598c70e4bc05872527dda12 100644 (file)
@@ -443,9 +443,7 @@ pa_operation* pa_context_kill_client(pa_context *c, uint32_t idx, pa_context_suc
 
 /** @{ \name Cards */
 
-/** Stores information about a specific profile of a card.  Please
- * note that this structure can be extended as part of evolutionary
- * API updates at any time in any new release. \since 0.9.15 */
+/** \deprecated Superseded by pa_card_profile_info2 \since 0.9.15 */
 typedef struct pa_card_profile_info {
     const char *name;                   /**< Name of this profile */
     const char *description;            /**< Description of this profile */
@@ -454,6 +452,23 @@ typedef struct pa_card_profile_info {
     uint32_t priority;                  /**< The higher this value is, the more useful this profile is as a default. */
 } pa_card_profile_info;
 
+/** Stores information about a specific profile of a card. Please
+ * note that this structure can be extended as part of evolutionary
+ * API updates at any time in any new release. \since 5.0 */
+typedef struct pa_card_profile_info2 {
+    const char *name;                   /**< Name of this profile */
+    const char *description;            /**< Description of this profile */
+    uint32_t n_sinks;                   /**< Number of sinks this profile would create */
+    uint32_t n_sources;                 /**< Number of sources this profile would create */
+    uint32_t priority;                  /**< The higher this value is, the more useful this profile is as a default. */
+    int available;
+    /**< Is this profile available? If this is zero, meaning "unavailable",
+     * then it makes no sense to try to activate this profile. If this is
+     * non-zero, it's still not a guarantee that activating the profile will
+     * result in anything useful, it just means that the server isn't aware of
+     * any reason why the profile would definitely be useless. \since 5.0 */
+} pa_card_profile_info2;
+
 /** Stores information about a specific port of a card.  Please
  * note that this structure can be extended as part of evolutionary
  * API updates at any time in any new release. \since 2.0 */
@@ -464,9 +479,10 @@ typedef struct pa_card_port_info {
     int available;                      /**< A #pa_port_available enum, indicating availability status of this port. */
     int direction;                      /**< A #pa_direction enum, indicating the direction of this port. */
     uint32_t n_profiles;                /**< Number of entries in profile array */
-    pa_card_profile_info** profiles;    /**< Array of pointers to available profiles, or NULL. Array is terminated by an entry set to NULL. */
+    pa_card_profile_info** profiles;    /**< \deprecated Superseded by profiles2 */
     pa_proplist *proplist;              /**< Property list */
     int64_t latency_offset;             /**< Latency offset of the port that gets added to the sink/source latency when the port is active. \since 3.0 */
+    pa_card_profile_info2** profiles2;  /**< Array of pointers to available profiles, or NULL. Array is terminated by an entry set to NULL. */
 } pa_card_port_info;
 
 /** Stores information about cards. Please note that this structure
@@ -478,11 +494,13 @@ typedef struct pa_card_info {
     uint32_t owner_module;               /**< Index of the owning module, or PA_INVALID_INDEX. */
     const char *driver;                  /**< Driver name */
     uint32_t n_profiles;                 /**< Number of entries in profile array */
-    pa_card_profile_info* profiles;      /**< Array of available profile, or NULL. Array is terminated by an entry with name set to NULL. Number of entries is stored in n_profiles. */
-    pa_card_profile_info* active_profile; /**< Pointer to active profile in the array, or NULL. */
+    pa_card_profile_info* profiles;      /**< \deprecated Superseded by profiles2 */
+    pa_card_profile_info* active_profile; /**< \deprecated Superseded by active_profile2 */
     pa_proplist *proplist;               /**< Property list */
     uint32_t n_ports;                    /**< Number of entries in port array */
     pa_card_port_info **ports;           /**< Array of pointers to ports, or NULL. Array is terminated by an entry set to NULL. */
+    pa_card_profile_info2** profiles2;    /**< Array of pointers to available profiles, or NULL. Array is terminated by an entry set to NULL. */
+    pa_card_profile_info2* active_profile2; /**< Pointer to active profile in the array, or NULL. */
 } pa_card_info;
 
 /** Callback prototype for pa_context_get_card_info_...() \since 0.9.15 */
@@ -522,8 +540,8 @@ typedef struct pa_sink_input_info {
     pa_sample_spec sample_spec;          /**< The sample specification of the sink input. */
     pa_channel_map channel_map;          /**< Channel map */
     pa_cvolume volume;                   /**< The volume of this sink input. */
-    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. */
+    pa_usec_t buffer_usec;               /**< Latency due to buffering in sink input, see pa_timing_info for details. */
+    pa_usec_t sink_usec;                 /**< Latency of the sink device, see pa_timing_info for details. */
     const char *resample_method;         /**< The resampling method used by this sink input. */
     const char *driver;                  /**< Driver name */
     int mute;                            /**< Stream muted \since 0.9.7 */
@@ -573,8 +591,8 @@ typedef struct pa_source_output_info {
     uint32_t source;                     /**< Index of the connected source */
     pa_sample_spec sample_spec;          /**< The sample specification of the source output */
     pa_channel_map channel_map;          /**< Channel map */
-    pa_usec_t buffer_usec;               /**< Latency due to buffering in the source output, see pa_latency_info for details. */
-    pa_usec_t source_usec;               /**< Latency of the source device, see pa_latency_info for details. */
+    pa_usec_t buffer_usec;               /**< Latency due to buffering in the source output, see pa_timing_info for details. */
+    pa_usec_t source_usec;               /**< Latency of the source device, see pa_timing_info for details. */
     const char *resample_method;         /**< The resampling method used by this source output. */
     const char *driver;                  /**< Driver name */
     pa_proplist *proplist;               /**< Property list \since 0.9.11 */