aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorge Kiagiadakis <george.kiagiadakis@collabora.com>2019-06-04 19:07:51 +0300
committerGeorge Kiagiadakis <george.kiagiadakis@collabora.com>2019-06-10 11:44:55 +0300
commit613dc2e97a53d3a6e4810303e4b2522bd985859d (patch)
tree5daaf8a309d88984c0c07adcf1ae82c7f27b9a9e
parent8f111cf5e1d047220e10d180ffc788d0b62e1142 (diff)
binding: remove support for 4A and use plain alsasink
GStreamer alsasink will redirect the stream to pipewire. Bug-AGL: SPEC-2473 Signed-off-by: George Kiagiadakis <george.kiagiadakis@collabora.com> Change-Id: I696b338e99d28f97f1e0fe3c466e711d2171d1ad
-rw-r--r--binding/afm-mediaplayer-binding.c45
-rw-r--r--conf.d/wgt/config.xml.in1
2 files changed, 1 insertions, 45 deletions
diff --git a/binding/afm-mediaplayer-binding.c b/binding/afm-mediaplayer-binding.c
index fe6e6c6..86f1f3b 100644
--- a/binding/afm-mediaplayer-binding.c
+++ b/binding/afm-mediaplayer-binding.c
@@ -94,50 +94,7 @@ static int find_loop_state_idx(const char *state)
static void mediaplayer_set_role_state(afb_api_t api, int state)
{
- json_object *jsonData = json_object_new_object(), *response;
-
- switch (state) {
- case GST_STATE_PAUSED:
- case GST_STATE_NULL:
- gst_element_set_state(data.playbin, state);
- json_object_object_add(jsonData, "action", json_object_new_string("close"));
- afb_api_call_sync(api, "ahl-4a", "multimedia", jsonData, NULL, NULL, NULL);
-
- data.playing = FALSE;
-
- break;
- case GST_STATE_PLAYING:
- {
- json_object *val = NULL;
- int ret;
-
- json_object_object_add(jsonData, "action", json_object_new_string("open"));
-
- ret = afb_api_call_sync(api, "ahl-4a", "multimedia", jsonData, &response, NULL, NULL);
- if (ret)
- return;
-
- ret = json_object_object_get_ex(response, "device_uri", &val);
- if (ret && json_object_get_string_len(val)) {
- const char *jres_pcm = json_object_get_string(val);
- g_object_set(data.alsa_sink, "device", jres_pcm, NULL);
-
- data.playing = TRUE;
-
- AFB_DEBUG("GSTREAMER alsa_sink.device = \"%s\"", jres_pcm);
- } else {
- AFB_ERROR("GSTREAMER Failed to call ahl-4a/multimedia!");
- }
-
- json_object_put(response);
-
- gst_element_set_state(data.playbin, GST_STATE_PLAYING);
- }
- break;
- default:
- AFB_ERROR("GSTREAMER Failed to parse state");
- }
-
+ data.playing = (state == GST_STATE_PLAYING);
gst_element_set_state(data.playbin, state);
}
diff --git a/conf.d/wgt/config.xml.in b/conf.d/wgt/config.xml.in
index daf5acf..1537dd8 100644
--- a/conf.d/wgt/config.xml.in
+++ b/conf.d/wgt/config.xml.in
@@ -20,7 +20,6 @@
<feature name="urn:AGL:widget:required-api">
<param name="mediascanner" value="ws" />
<param name="Bluetooth-Manager" value="ws" />
- <param name="ahl-4a" value="ws" />
</feature>
<feature name="urn:AGL:widget:required-binding">