aboutsummaryrefslogtreecommitdiffstats
path: root/binding/afm-mediaplayer-binding.c
diff options
context:
space:
mode:
authorMatt Ranostay <matt.ranostay@konsulko.com>2017-10-23 23:38:49 -0700
committerMatt Ranostay <matt.ranostay@konsulko.com>2017-10-23 23:39:07 -0700
commit269ceb71b9a18acd37995495af23b2b5ed7f3a56 (patch)
tree33f7c4474bc31e1e27a4746dffe5968c2678d1aa /binding/afm-mediaplayer-binding.c
parent4ce89b162cecc149ad2864c8a839befdbf83487e (diff)
binding: mediaplayer: add stop verb for playback
Add stop verb mostly for resetting playback on media removal Bug-AGL: SPEC-931 Change-Id: Ic564d2329aab300bbff0bb8afcf47a65dc73103b Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
Diffstat (limited to 'binding/afm-mediaplayer-binding.c')
-rw-r--r--binding/afm-mediaplayer-binding.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/binding/afm-mediaplayer-binding.c b/binding/afm-mediaplayer-binding.c
index 805a6bb..e95b4ba 100644
--- a/binding/afm-mediaplayer-binding.c
+++ b/binding/afm-mediaplayer-binding.c
@@ -387,6 +387,9 @@ static void controls(struct afb_req request)
data.loop = !strcasecmp(state, "true") ? TRUE : FALSE;
break;
}
+ case STOP_CMD:
+ gst_element_set_state(data.playbin, GST_STATE_NULL);
+ break;
default:
afb_req_fail(request, "failed", "unknown command");
pthread_mutex_unlock(&mutex);