mirror of
https://gitlab.freedesktop.org/pipewire/wireplumber.git
synced 2026-05-04 22:28:03 +02:00
endpoint/endpoint-stream: remove useless virtual methods
they are not useful anymore because we hijack priv->info from the impl subclass, so that it points to the impl info struct, and therefore the base implementations work just fine
This commit is contained in:
parent
e944abbcd5
commit
78209c48c7
4 changed files with 16 additions and 48 deletions
|
|
@ -161,13 +161,6 @@ wp_endpoint_stream_pw_proxy_created (WpProxy * proxy, struct pw_proxy * pw_proxy
|
|||
&endpoint_stream_events, self);
|
||||
}
|
||||
|
||||
static const gchar *
|
||||
get_name (WpEndpointStream * self)
|
||||
{
|
||||
WpEndpointStreamPrivate *priv = wp_endpoint_stream_get_instance_private (self);
|
||||
return priv->info->name;
|
||||
}
|
||||
|
||||
static void
|
||||
wp_endpoint_stream_class_init (WpEndpointStreamClass * klass)
|
||||
{
|
||||
|
|
@ -187,8 +180,6 @@ wp_endpoint_stream_class_init (WpEndpointStreamClass * klass)
|
|||
proxy_class->set_param = wp_endpoint_stream_set_param;
|
||||
|
||||
proxy_class->pw_proxy_created = wp_endpoint_stream_pw_proxy_created;
|
||||
|
||||
klass->get_name = get_name;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -201,9 +192,11 @@ const gchar *
|
|||
wp_endpoint_stream_get_name (WpEndpointStream * self)
|
||||
{
|
||||
g_return_val_if_fail (WP_IS_ENDPOINT_STREAM (self), NULL);
|
||||
g_return_val_if_fail (WP_ENDPOINT_STREAM_GET_CLASS (self)->get_name, NULL);
|
||||
g_return_val_if_fail (wp_proxy_get_features (WP_PROXY (self)) &
|
||||
WP_PROXY_FEATURE_INFO, NULL);
|
||||
|
||||
return WP_ENDPOINT_STREAM_GET_CLASS (self)->get_name (self);
|
||||
WpEndpointStreamPrivate *priv = wp_endpoint_stream_get_instance_private (self);
|
||||
return priv->info->name;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -27,8 +27,6 @@ G_DECLARE_DERIVABLE_TYPE (WpEndpointStream, wp_endpoint_stream,
|
|||
struct _WpEndpointStreamClass
|
||||
{
|
||||
WpProxyClass parent_class;
|
||||
|
||||
const gchar * (*get_name) (WpEndpointStream * self);
|
||||
};
|
||||
|
||||
WP_API
|
||||
|
|
|
|||
|
|
@ -263,27 +263,6 @@ wp_endpoint_bound (WpProxy * proxy, guint32 id)
|
|||
wp_endpoint_ensure_feature_streams (self, id);
|
||||
}
|
||||
|
||||
static const gchar *
|
||||
get_name (WpEndpoint * self)
|
||||
{
|
||||
WpEndpointPrivate *priv = wp_endpoint_get_instance_private (self);
|
||||
return priv->info->name;
|
||||
}
|
||||
|
||||
static const gchar *
|
||||
get_media_class (WpEndpoint * self)
|
||||
{
|
||||
WpEndpointPrivate *priv = wp_endpoint_get_instance_private (self);
|
||||
return priv->info->media_class;
|
||||
}
|
||||
|
||||
static WpDirection
|
||||
get_direction (WpEndpoint * self)
|
||||
{
|
||||
WpEndpointPrivate *priv = wp_endpoint_get_instance_private (self);
|
||||
return priv->info->direction;
|
||||
}
|
||||
|
||||
static void
|
||||
wp_endpoint_class_init (WpEndpointClass * klass)
|
||||
{
|
||||
|
|
@ -306,10 +285,6 @@ wp_endpoint_class_init (WpEndpointClass * klass)
|
|||
proxy_class->pw_proxy_created = wp_endpoint_pw_proxy_created;
|
||||
proxy_class->bound = wp_endpoint_bound;
|
||||
|
||||
klass->get_name = get_name;
|
||||
klass->get_media_class = get_media_class;
|
||||
klass->get_direction = get_direction;
|
||||
|
||||
/**
|
||||
* WpEndpoint::streams-changed:
|
||||
* @self: the endpoint
|
||||
|
|
@ -332,9 +307,11 @@ const gchar *
|
|||
wp_endpoint_get_name (WpEndpoint * self)
|
||||
{
|
||||
g_return_val_if_fail (WP_IS_ENDPOINT (self), NULL);
|
||||
g_return_val_if_fail (WP_ENDPOINT_GET_CLASS (self)->get_name, NULL);
|
||||
g_return_val_if_fail (wp_proxy_get_features (WP_PROXY (self)) &
|
||||
WP_PROXY_FEATURE_INFO, NULL);
|
||||
|
||||
return WP_ENDPOINT_GET_CLASS (self)->get_name (self);
|
||||
WpEndpointPrivate *priv = wp_endpoint_get_instance_private (self);
|
||||
return priv->info->name;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -347,9 +324,11 @@ const gchar *
|
|||
wp_endpoint_get_media_class (WpEndpoint * self)
|
||||
{
|
||||
g_return_val_if_fail (WP_IS_ENDPOINT (self), NULL);
|
||||
g_return_val_if_fail (WP_ENDPOINT_GET_CLASS (self)->get_media_class, NULL);
|
||||
g_return_val_if_fail (wp_proxy_get_features (WP_PROXY (self)) &
|
||||
WP_PROXY_FEATURE_INFO, NULL);
|
||||
|
||||
return WP_ENDPOINT_GET_CLASS (self)->get_media_class (self);
|
||||
WpEndpointPrivate *priv = wp_endpoint_get_instance_private (self);
|
||||
return priv->info->media_class;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -362,9 +341,11 @@ WpDirection
|
|||
wp_endpoint_get_direction (WpEndpoint * self)
|
||||
{
|
||||
g_return_val_if_fail (WP_IS_ENDPOINT (self), 0);
|
||||
g_return_val_if_fail (WP_ENDPOINT_GET_CLASS (self)->get_direction, 0);
|
||||
g_return_val_if_fail (wp_proxy_get_features (WP_PROXY (self)) &
|
||||
WP_PROXY_FEATURE_INFO, 0);
|
||||
|
||||
return WP_ENDPOINT_GET_CLASS (self)->get_direction (self);
|
||||
WpEndpointPrivate *priv = wp_endpoint_get_instance_private (self);
|
||||
return (WpDirection) priv->info->direction;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -53,10 +53,6 @@ G_DECLARE_DERIVABLE_TYPE (WpEndpoint, wp_endpoint, WP, ENDPOINT, WpProxy)
|
|||
struct _WpEndpointClass
|
||||
{
|
||||
WpProxyClass parent_class;
|
||||
|
||||
const gchar * (*get_name) (WpEndpoint * self);
|
||||
const gchar * (*get_media_class) (WpEndpoint * self);
|
||||
WpDirection (*get_direction) (WpEndpoint * self);
|
||||
};
|
||||
|
||||
WP_API
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue