2019-12-09 16:35:15 +02:00
|
|
|
/* WirePlumber
|
|
|
|
|
*
|
|
|
|
|
* Copyright © 2019 Collabora Ltd.
|
|
|
|
|
* @author George Kiagiadakis <george.kiagiadakis@collabora.com>
|
|
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef __WIREPLUMBER_ENDPOINT_H__
|
|
|
|
|
#define __WIREPLUMBER_ENDPOINT_H__
|
|
|
|
|
|
2020-04-16 13:29:48 -04:00
|
|
|
#include "spa-pod.h"
|
2019-12-09 16:35:15 +02:00
|
|
|
#include "proxy.h"
|
2020-04-21 17:08:10 +03:00
|
|
|
#include "port.h"
|
2020-03-31 15:14:45 +03:00
|
|
|
#include "endpoint-stream.h"
|
2020-04-21 13:21:03 +03:00
|
|
|
#include "iterator.h"
|
2020-05-05 12:17:08 +03:00
|
|
|
#include "object-interest.h"
|
2019-12-09 16:35:15 +02:00
|
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
|
2020-02-17 15:39:19 +02:00
|
|
|
/**
|
|
|
|
|
* WpEndpointFeatures:
|
2020-03-31 15:14:45 +03:00
|
|
|
* @WP_ENDPOINT_FEATURE_STREAMS: caches information about streams, enabling
|
2020-05-05 12:17:08 +03:00
|
|
|
* the use of wp_endpoint_get_n_streams(), wp_endpoint_lookup_stream(),
|
|
|
|
|
* wp_endpoint_iterate_streams() and related methods
|
2020-02-17 15:39:19 +02:00
|
|
|
*
|
|
|
|
|
* An extension of #WpProxyFeatures
|
|
|
|
|
*/
|
2020-02-12 11:28:07 +02:00
|
|
|
typedef enum { /*< flags >*/
|
2020-05-12 18:07:56 +03:00
|
|
|
WP_ENDPOINT_FEATURE_STREAMS = (WP_PROXY_FEATURE_LAST << 0),
|
2020-02-12 11:28:07 +02:00
|
|
|
} WpEndpointFeatures;
|
|
|
|
|
|
2020-04-01 13:38:39 +03:00
|
|
|
/**
|
|
|
|
|
* WP_ENDPOINT_FEATURES_STANDARD:
|
|
|
|
|
*
|
|
|
|
|
* A constant set of features that contains the standard features that are
|
|
|
|
|
* available in the #WpEndpoint class.
|
|
|
|
|
*/
|
|
|
|
|
#define WP_ENDPOINT_FEATURES_STANDARD \
|
|
|
|
|
(WP_PROXY_FEATURES_STANDARD | \
|
2020-04-16 15:18:53 -04:00
|
|
|
WP_PROXY_FEATURE_CONTROLS | \
|
2020-04-01 13:38:39 +03:00
|
|
|
WP_ENDPOINT_FEATURE_STREAMS)
|
|
|
|
|
|
2020-02-17 15:39:19 +02:00
|
|
|
/**
|
|
|
|
|
* WP_TYPE_ENDPOINT:
|
|
|
|
|
*
|
|
|
|
|
* The #WpEndpoint #GType
|
|
|
|
|
*/
|
2020-02-12 11:28:07 +02:00
|
|
|
#define WP_TYPE_ENDPOINT (wp_endpoint_get_type ())
|
|
|
|
|
WP_API
|
|
|
|
|
G_DECLARE_DERIVABLE_TYPE (WpEndpoint, wp_endpoint, WP, ENDPOINT, WpProxy)
|
|
|
|
|
|
|
|
|
|
struct _WpEndpointClass
|
2019-12-09 16:35:15 +02:00
|
|
|
{
|
2020-02-12 11:28:07 +02:00
|
|
|
WpProxyClass parent_class;
|
2019-12-09 16:35:15 +02:00
|
|
|
|
|
|
|
|
const gchar * (*get_name) (WpEndpoint * self);
|
|
|
|
|
const gchar * (*get_media_class) (WpEndpoint * self);
|
|
|
|
|
WpDirection (*get_direction) (WpEndpoint * self);
|
|
|
|
|
};
|
|
|
|
|
|
2020-01-16 18:50:07 +02:00
|
|
|
WP_API
|
2019-12-09 16:35:15 +02:00
|
|
|
const gchar * wp_endpoint_get_name (WpEndpoint * self);
|
2020-01-16 18:50:07 +02:00
|
|
|
|
|
|
|
|
WP_API
|
2019-12-09 16:35:15 +02:00
|
|
|
const gchar * wp_endpoint_get_media_class (WpEndpoint * self);
|
2020-01-16 18:50:07 +02:00
|
|
|
|
|
|
|
|
WP_API
|
2019-12-09 16:35:15 +02:00
|
|
|
WpDirection wp_endpoint_get_direction (WpEndpoint * self);
|
|
|
|
|
|
2020-03-31 15:14:45 +03:00
|
|
|
WP_API
|
|
|
|
|
guint wp_endpoint_get_n_streams (WpEndpoint * self);
|
|
|
|
|
|
|
|
|
|
WP_API
|
2020-05-05 12:17:08 +03:00
|
|
|
WpIterator * wp_endpoint_iterate_streams (WpEndpoint * self);
|
2020-03-31 15:14:45 +03:00
|
|
|
|
|
|
|
|
WP_API
|
2020-05-05 12:17:08 +03:00
|
|
|
WpIterator * wp_endpoint_iterate_streams_filtered (WpEndpoint * self, ...)
|
|
|
|
|
G_GNUC_NULL_TERMINATED;
|
|
|
|
|
|
|
|
|
|
WP_API
|
|
|
|
|
WpIterator * wp_endpoint_iterate_streams_filtered_full (WpEndpoint * self,
|
|
|
|
|
WpObjectInterest * interest);
|
|
|
|
|
|
|
|
|
|
WP_API
|
|
|
|
|
WpEndpointStream * wp_endpoint_lookup_stream (WpEndpoint * self, ...)
|
|
|
|
|
G_GNUC_NULL_TERMINATED;
|
|
|
|
|
|
|
|
|
|
WP_API
|
|
|
|
|
WpEndpointStream * wp_endpoint_lookup_stream_full (WpEndpoint * self,
|
|
|
|
|
WpObjectInterest * interest);
|
2020-03-31 15:14:45 +03:00
|
|
|
|
2020-05-05 10:19:41 +03:00
|
|
|
WP_API
|
|
|
|
|
void wp_endpoint_create_link (WpEndpoint * self, WpProperties * props);
|
|
|
|
|
|
2019-12-09 16:35:15 +02:00
|
|
|
G_END_DECLS
|
|
|
|
|
|
|
|
|
|
#endif
|