From 12b9f0e9c79ba0e56dae00b383dc19d02431fab4 Mon Sep 17 00:00:00 2001 From: Michal Skorupinski Date: Fri, 18 Dec 2015 21:08:19 +0100 Subject: [PATCH] [SAMPLE APP][Stream-player] Player model deinitialization Change-Id: I78ad25c1ccc21f1ab4997fe0c3c99bf4264d95b1 Signed-off-by: Michal Skorupinski --- .../html/mobile_n/stream-player-mn.html | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/org.tizen.sampledescriptions/html/mobile_n/stream-player-mn.html b/org.tizen.sampledescriptions/html/mobile_n/stream-player-mn.html index d2b8953..c52e911 100644 --- a/org.tizen.sampledescriptions/html/mobile_n/stream-player-mn.html +++ b/org.tizen.sampledescriptions/html/mobile_n/stream-player-mn.html @@ -710,6 +710,27 @@ void player_model_get_video_size(int *width, int *height)

Note that not every file provides all the mentioned data.

+ +
Player deinitialization
+

The function below is used deinitialize and destroy the player object.

+
+void player_model_deinit(void)
+{
+   // Error handling
+   error_code = player_stop(s_info.player);
+   // Error handling
+
+   error_code = player_unprepare(s_info.player);
+   // Error handling and callbacks deinitialization
+
+   error_code = player_destroy(s_info.player);
+   // Error handling
+}
+
+

Note that any working playback should be stopped and the player should be put into the PLAYER_STATE_IDLE state before it can be destroyed.

+ + + -- 2.7.4