Commit 7ac9c635 authored by Julian Bouzas's avatar Julian Bouzas
Browse files

modules: only allow 'sink' and 'source' strings when parsing direction in config files

parent 0ad0c9fb
......@@ -78,9 +78,9 @@ parse_properties (WpTomlTable *table, const char *name)
static guint
parse_endpoint_direction (const char *direction)
{
if (g_strcmp0 (direction, "input") == 0)
if (g_strcmp0 (direction, "sink") == 0)
return PW_DIRECTION_INPUT;
else if (g_strcmp0 (direction, "output") == 0)
else if (g_strcmp0 (direction, "source") == 0)
return PW_DIRECTION_OUTPUT;
g_return_val_if_reached (PW_DIRECTION_INPUT);
......
......@@ -125,9 +125,9 @@ parse_properties (WpTomlTable *table, const char *name)
static guint
parse_endpoint_direction (const char *direction)
{
if (g_strcmp0 (direction, "input") == 0)
if (g_strcmp0 (direction, "sink") == 0)
return PW_DIRECTION_INPUT;
else if (g_strcmp0 (direction, "output") == 0)
else if (g_strcmp0 (direction, "source") == 0)
return PW_DIRECTION_OUTPUT;
g_return_val_if_reached (PW_DIRECTION_INPUT);
......
......@@ -5,6 +5,6 @@ properties = [
]
[endpoint]
direction = "input"
direction = "sink"
type = "pw-audio-softdsp-endpoint"
streams = "default.streams"
......@@ -5,6 +5,6 @@ properties = [
]
[endpoint]
direction = "output"
direction = "source"
type = "pw-audio-softdsp-endpoint"
streams = "default.streams"
[match-endpoint]
priority = 75
direction = "input"
direction = "sink"
name = "bluealsa*"
media_class = "Stream/Input/Audio"
......
[match-endpoint]
priority = 75
direction = "output"
direction = "source"
name = "bluealsa*"
media_class = "Stream/Output/Audio"
......
[match-endpoint]
priority = 50
direction = "input"
direction = "sink"
media_class = "Stream/Input/Audio"
[target-endpoint]
......
[match-endpoint]
priority = 50
direction = "output"
direction = "source"
media_class = "Stream/Output/Audio"
[target-endpoint]
......
......@@ -5,5 +5,5 @@ properties = [
]
[endpoint]
direction = "input"
direction = "sink"
type = "pw-audio-softdsp-endpoint"
......@@ -5,5 +5,5 @@ properties = [
]
[endpoint]
direction = "output"
direction = "source"
type = "pw-audio-softdsp-endpoint"
......@@ -4,6 +4,6 @@ properties = [
]
[endpoint]
direction = "output"
direction = "source"
type = "wp-endpoint-audiotestsrc"
streams = "default.streams"
[match-endpoint]
direction = "input"
direction = "sink"
media_class = "Stream/Input/Fake"
[target-endpoint]
......
[match-endpoint]
direction = "input"
direction = "sink"
media_class = "Stream/Input/Fake"
[target-endpoint]
......
[match-endpoint]
direction = "output"
direction = "source"
media_class = "Stream/Output/Fake"
[target-endpoint]
......
[match-endpoint]
direction = "output"
direction = "source"
media_class = "Stream/Output/Fake"
[target-endpoint]
......
[match-endpoint]
direction = "output"
direction = "source"
name = "ep_for_stream_1"
media_class = "Stream/Output/Fake"
......
[match-endpoint]
direction = "output"
direction = "source"
name = "ep_for_stream_2"
media_class = "Stream/Output/Fake"
......
[match-endpoint]
direction = "output"
direction = "source"
name = "ep_for_stream_3"
media_class = "Stream/Output/Fake"
......
[match-endpoint]
direction = "output"
direction = "source"
name = "ep_with_role"
media_class = "Stream/Output/Fake"
......
[match-endpoint]
name = "ep1"
direction = "output"
direction = "source"
media_class = "Stream/Output/Fake"
[target-endpoint]
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment