[SAMPLE APP][Stream-player] Player model deinitialization
authorMichal Skorupinski <m.skorupinsk@samsung.com>
Fri, 18 Dec 2015 20:08:19 +0000 (21:08 +0100)
committerMichal Skorupinski <m.skorupinsk@samsung.com>
Mon, 18 Jan 2016 15:24:30 +0000 (16:24 +0100)
Change-Id: I78ad25c1ccc21f1ab4997fe0c3c99bf4264d95b1
Signed-off-by: Michal Skorupinski <m.skorupinsk@samsung.com>
org.tizen.sampledescriptions/html/mobile_n/stream-player-mn.html

index d2b8953..c52e911 100644 (file)
@@ -710,6 +710,27 @@ void player_model_get_video_size(int *width, int *height)
 </pre>
 <p>Note that not every file provides all the mentioned data.</p>
 
+<!-- ********************************************************************************** -->
+<h5>Player deinitialization</h5>
+<p>The function below is used deinitialize and destroy the player object.</p>
+<pre class="prettyprint">
+void player_model_deinit(void)
+{
+&nbsp;&nbsp;&nbsp;// Error handling
+&nbsp;&nbsp;&nbsp;error_code = player_stop(s_info.player);
+&nbsp;&nbsp;&nbsp;// Error handling
+
+&nbsp;&nbsp;&nbsp;error_code = player_unprepare(s_info.player);
+&nbsp;&nbsp;&nbsp;// Error handling and callbacks deinitialization
+
+&nbsp;&nbsp;&nbsp;error_code = player_destroy(s_info.player);
+&nbsp;&nbsp;&nbsp;// Error handling
+}
+</pre>
+<p>Note that any working playback should be stopped and the player should be put into the <span style="font-family: Courier New,Courier,monospace">PLAYER_STATE_IDLE</span> state before it can be destroyed.</p>
+
+<!-- ********************************************************************************** -->
+
 <script type="text/javascript" src="../scripts/jquery.zclip.min.js"></script>
 <script type="text/javascript" src="../scripts/showhide.js"></script>
 </div></div></div>