2 * Copyright (c) 2018 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 using System.Runtime.InteropServices;
20 using Tizen.Multimedia;
22 internal static partial class Interop
24 internal static partial class NativePlayer
27 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
28 internal delegate void PlaybackCompletedCallback(IntPtr userData);
30 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
31 internal delegate void PlaybackInterruptedCallback(PlaybackInterruptionReason code, IntPtr userData);
33 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
34 internal delegate void PlaybackErrorCallback(int code, IntPtr userData);
36 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
37 internal delegate void VideoFrameDecodedCallback(IntPtr packetHandle, IntPtr userData);
39 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
40 internal delegate void AudioFrameDecodedCallback(IntPtr packetHandle, IntPtr userData);
42 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
43 internal delegate void SubtitleUpdatedCallback(uint duration, string text, IntPtr userData);
45 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
46 internal delegate void BufferingProgressCallback(int percent, IntPtr userData);
48 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
49 internal delegate void VideoStreamChangedCallback(int width, int height, int fps, int bitrate, IntPtr userData);
51 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
52 internal delegate void MediaStreamBufferStatusCallback(MediaStreamBufferStatus status, IntPtr userData);
54 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
55 internal delegate void MediaStreamSeekCallback(ulong offset, IntPtr userData);
57 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
58 internal delegate void VideoCaptureCallback(IntPtr data, int width, int height, uint size, IntPtr userData);
60 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
61 internal delegate void PrepareCallback(IntPtr userData);
63 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
64 internal delegate void SeekCompletedCallback(IntPtr userData);
66 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
67 internal delegate bool AdaptiveVariantCallback(int bandwidth, int width, int height, IntPtr userData);
69 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
70 internal delegate bool SupportedMediaFormatCallback(int format, IntPtr userData);
72 [DllImport(Libraries.Player, EntryPoint = "player_create")]
73 internal static extern PlayerErrorCode Create(out PlayerHandle player);
75 [DllImport(Libraries.Player, EntryPoint = "player_destroy")]
76 internal static extern PlayerErrorCode Destroy(IntPtr player);
78 [DllImport(Libraries.Player, EntryPoint = "player_prepare")]
79 internal static extern PlayerErrorCode Prepare(IntPtr player);
81 [DllImport(Libraries.Player, EntryPoint = "player_prepare_async")]
82 internal static extern PlayerErrorCode PrepareAsync(IntPtr player, PrepareCallback callback,
83 IntPtr userData = default(IntPtr));
85 [DllImport(Libraries.Player, EntryPoint = "player_unprepare")]
86 internal static extern PlayerErrorCode Unprepare(IntPtr player);
88 [DllImport(Libraries.Player, EntryPoint = "player_set_uri")]
89 internal static extern PlayerErrorCode SetUri(IntPtr player, string uri);
91 [DllImport(Libraries.Player, EntryPoint = "player_start")]
92 internal static extern PlayerErrorCode Start(IntPtr player);
94 [DllImport(Libraries.Player, EntryPoint = "player_stop")]
95 internal static extern PlayerErrorCode Stop(IntPtr player);
97 [DllImport(Libraries.Player, EntryPoint = "player_pause")]
98 internal static extern PlayerErrorCode Pause(IntPtr player);
100 [DllImport(Libraries.Player, EntryPoint = "player_set_memory_buffer")]
101 internal static extern PlayerErrorCode SetMemoryBuffer(IntPtr player, byte[] data, int size);
103 [DllImport(Libraries.Player, EntryPoint = "player_get_state")]
104 internal static extern PlayerErrorCode GetState(IntPtr player, out int state);
106 [DllImport(Libraries.Player, EntryPoint = "player_set_volume")]
107 internal static extern PlayerErrorCode SetVolume(IntPtr player, float left, float right);
109 [DllImport(Libraries.Player, EntryPoint = "player_get_volume")]
110 internal static extern PlayerErrorCode GetVolume(IntPtr player, out float left, out float right);
112 [DllImport(Libraries.Player, EntryPoint = "player_set_replaygain_enabled")]
113 internal static extern PlayerErrorCode SetReplayGain(IntPtr player, bool enabled);
115 [DllImport(Libraries.Player, EntryPoint = "player_is_replaygain_enabled")]
116 internal static extern PlayerErrorCode IsReplayGain(IntPtr player, out bool enabled);
118 [DllImport(Libraries.Player, EntryPoint = "player_set_sound_stream_info")]
119 internal static extern PlayerErrorCode SetAudioPolicyInfo(IntPtr player, AudioStreamPolicyHandle streamInfo);
121 [DllImport(Libraries.Player, EntryPoint = "player_set_audio_latency_mode")]
122 internal static extern PlayerErrorCode SetAudioLatencyMode(IntPtr player, AudioLatencyMode latencyMode);
124 [DllImport(Libraries.Player, EntryPoint = "player_get_audio_latency_mode")]
125 internal static extern PlayerErrorCode GetAudioLatencyMode(IntPtr player, out AudioLatencyMode latencyMode);
127 [DllImport(Libraries.Player, EntryPoint = "player_get_play_position")]
128 internal static extern PlayerErrorCode GetPlayPosition(IntPtr player, out int millisecond);
130 [DllImport(Libraries.Player, EntryPoint = "player_set_play_position")]
131 internal static extern PlayerErrorCode SetPlayPosition(IntPtr player, int millisecond,
132 bool accurate, SeekCompletedCallback cb, IntPtr userData = default(IntPtr));
134 [DllImport(Libraries.Player, EntryPoint = "player_get_play_position_nsec")]
135 internal static extern PlayerErrorCode GetPlayPositionNanoseconds(IntPtr player, out long nanoseconds);
137 [DllImport(Libraries.Player, EntryPoint = "player_set_play_position_nsec")]
138 internal static extern PlayerErrorCode SetPlayPositionNanoseconds(IntPtr player, long nanoseconds,
139 bool accurate, SeekCompletedCallback cb, IntPtr userData = default(IntPtr));
141 [DllImport(Libraries.Player, EntryPoint = "player_set_mute")]
142 internal static extern PlayerErrorCode SetMute(IntPtr player, bool muted);
144 [DllImport(Libraries.Player, EntryPoint = "player_is_muted")]
145 internal static extern PlayerErrorCode IsMuted(IntPtr player, out bool muted);
147 [DllImport(Libraries.Player, EntryPoint = "player_set_looping")]
148 internal static extern PlayerErrorCode SetLooping(IntPtr player, bool looping);
150 [DllImport(Libraries.Player, EntryPoint = "player_is_looping")]
151 internal static extern PlayerErrorCode IsLooping(IntPtr player, out bool looping);
153 [DllImport(Libraries.Player, EntryPoint = "player_set_completed_cb")]
154 internal static extern PlayerErrorCode SetCompletedCb(IntPtr player,
155 PlaybackCompletedCallback callback, IntPtr userData = default(IntPtr));
157 [DllImport(Libraries.Player, EntryPoint = "player_unset_completed_cb")]
158 internal static extern PlayerErrorCode UnsetCompletedCb(IntPtr player);
160 [DllImport(Libraries.Player, EntryPoint = "player_set_interrupted_cb")]
161 internal static extern PlayerErrorCode SetInterruptedCb(IntPtr player,
162 PlaybackInterruptedCallback callback, IntPtr userData = default(IntPtr));
164 [DllImport(Libraries.Player, EntryPoint = "player_unset_interrupted_cb")]
165 internal static extern PlayerErrorCode UnsetInterruptedCb(IntPtr player);
167 [DllImport(Libraries.Player, EntryPoint = "player_set_error_cb")]
168 internal static extern PlayerErrorCode SetErrorCb(IntPtr player, PlaybackErrorCallback callback,
169 IntPtr userData = default(IntPtr));
171 [DllImport(Libraries.Player, EntryPoint = "player_unset_error_cb")]
172 internal static extern PlayerErrorCode UnsetErrorCb(IntPtr player);
174 [DllImport(Libraries.Player, EntryPoint = "player_capture_video")]
175 internal static extern PlayerErrorCode CaptureVideo(IntPtr player, VideoCaptureCallback callback,
176 IntPtr userData = default(IntPtr));
178 [DllImport(Libraries.Player, EntryPoint = "player_set_media_packet_video_frame_decoded_cb")]
179 internal static extern PlayerErrorCode SetVideoFrameDecodedCb(IntPtr player, VideoFrameDecodedCallback callback,
180 IntPtr userData = default(IntPtr));
182 [DllImport(Libraries.Player, EntryPoint = "player_unset_media_packet_video_frame_decoded_cb")]
183 internal static extern PlayerErrorCode UnsetVideoFrameDecodedCb(IntPtr player);
185 [DllImport(Libraries.Player, EntryPoint = "player_set_media_packet_audio_frame_decoded_cb")]
186 internal static extern PlayerErrorCode SetAudioFrameDecodedCb(IntPtr player, IntPtr format, PlayerAudioExtractOption opt,
187 AudioFrameDecodedCallback callback, IntPtr userData = default(IntPtr));
189 [DllImport(Libraries.Player, EntryPoint = "player_unset_media_packet_audio_frame_decoded_cb")]
190 internal static extern PlayerErrorCode UnsetAudioFrameDecodedCb(IntPtr player);
192 [DllImport(Libraries.Player, EntryPoint = "player_set_streaming_cookie")]
193 internal static extern PlayerErrorCode SetStreamingCookie(IntPtr player, string cookie, int size);
195 [DllImport(Libraries.Player, EntryPoint = "player_set_streaming_user_agent")]
196 internal static extern PlayerErrorCode SetStreamingUserAgent(IntPtr player, string userAgent, int size);
198 [DllImport(Libraries.Player, EntryPoint = "player_get_streaming_download_progress")]
199 internal static extern PlayerErrorCode GetStreamingDownloadProgress(IntPtr player, out int start, out int current);
201 [DllImport(Libraries.Player, EntryPoint = "player_set_streaming_buffering_time")]
202 internal static extern PlayerErrorCode SetStreamingBufferingTime(IntPtr player, int bufferingTime, int reBufferingTime);
204 [DllImport(Libraries.Player, EntryPoint = "player_get_streaming_buffering_time")]
205 internal static extern PlayerErrorCode GetStreamingBufferingTime(IntPtr player, out int bufferingTime, out int reBufferingTime);
207 [DllImport(Libraries.Player, EntryPoint = "player_set_buffering_cb")]
208 internal static extern PlayerErrorCode SetBufferingCb(IntPtr player,
209 BufferingProgressCallback callback, IntPtr userData = default(IntPtr));
211 [DllImport(Libraries.Player, EntryPoint = "player_unset_buffering_cb")]
212 internal static extern PlayerErrorCode UnsetBufferingCb(IntPtr player);
214 [DllImport(Libraries.Player, EntryPoint = "player_set_playback_rate")]
215 internal static extern PlayerErrorCode SetPlaybackRate(IntPtr player, float rate);
217 [DllImport(Libraries.Player, EntryPoint = "player_push_media_stream")]
218 internal static extern PlayerErrorCode PushMediaStream(IntPtr player, IntPtr packet);
220 [DllImport(Libraries.Player, EntryPoint = "player_set_media_stream_info")]
221 internal static extern PlayerErrorCode SetMediaStreamInfo(IntPtr player, StreamType type, IntPtr format);
223 [DllImport(Libraries.Player, EntryPoint = "player_set_media_stream_buffer_status_cb")]
224 internal static extern PlayerErrorCode SetMediaStreamBufferStatusCb(IntPtr player, StreamType type,
225 MediaStreamBufferStatusCallback callback, IntPtr userData = default(IntPtr));
227 [DllImport(Libraries.Player, EntryPoint = "player_unset_media_stream_buffer_status_cb")]
228 internal static extern PlayerErrorCode UnsetMediaStreamBufferStatusCb(IntPtr player, int type);
230 [DllImport(Libraries.Player, EntryPoint = "player_set_media_stream_seek_cb")]
231 internal static extern PlayerErrorCode SetMediaStreamSeekCb(IntPtr player, StreamType type,
232 MediaStreamSeekCallback callback, IntPtr userData = default(IntPtr));
234 [DllImport(Libraries.Player, EntryPoint = "player_unset_media_stream_seek_cb")]
235 internal static extern PlayerErrorCode UnsetMediaStreamSeekCb(IntPtr player, int type);
237 [DllImport(Libraries.Player, EntryPoint = "player_set_media_stream_buffer_max_size")]
238 internal static extern PlayerErrorCode SetMediaStreamBufferMaxSize(IntPtr player, StreamType type, ulong maxSize);
240 [DllImport(Libraries.Player, EntryPoint = "player_get_media_stream_buffer_max_size")]
241 internal static extern PlayerErrorCode GetMediaStreamBufferMaxSize(IntPtr player, StreamType type, out ulong maxSize);
243 [DllImport(Libraries.Player, EntryPoint = "player_set_media_stream_buffer_min_threshold")]
244 internal static extern PlayerErrorCode SetMediaStreamBufferMinThreshold(IntPtr player, StreamType type, uint percent);
246 [DllImport(Libraries.Player, EntryPoint = "player_get_media_stream_buffer_min_threshold")]
247 internal static extern PlayerErrorCode GetMediaStreamBufferMinThreshold(IntPtr player, int type, out uint percent);
249 [DllImport(Libraries.Player, EntryPoint = "player_get_content_info")]
250 internal static extern PlayerErrorCode GetContentInfo(IntPtr player, StreamMetadataKey key, out IntPtr value);
252 [DllImport(Libraries.Player, EntryPoint = "player_get_codec_info")]
253 internal static extern PlayerErrorCode GetCodecInfo(IntPtr player, out IntPtr audioCodec, out IntPtr videoCodec);
255 [DllImport(Libraries.Player, EntryPoint = "player_get_audio_stream_info")]
256 internal static extern PlayerErrorCode GetAudioStreamInfo(IntPtr player, out int sampleRate, out int channel, out int bitRate);
258 [DllImport(Libraries.Player, EntryPoint = "player_get_video_stream_info")]
259 internal static extern PlayerErrorCode GetVideoStreamInfo(IntPtr player, out int fps, out int bitRate);
261 [DllImport(Libraries.Player, EntryPoint = "player_get_album_art")]
262 internal static extern PlayerErrorCode GetAlbumArt(IntPtr player, out IntPtr albumArt, out int size);
264 [DllImport(Libraries.Player, EntryPoint = "player_get_video_size")]
265 internal static extern PlayerErrorCode GetVideoSize(IntPtr player, out int width, out int height);
267 [DllImport(Libraries.Player, EntryPoint = "player_get_duration")]
268 internal static extern PlayerErrorCode GetDuration(IntPtr player, out int duration);
270 [DllImport(Libraries.Player, EntryPoint = "player_get_duration_nsec")]
271 internal static extern PlayerErrorCode GetDurationNanoseconds(IntPtr player, out long duration);
273 [DllImport(Libraries.Player, EntryPoint = "player_set_subtitle_path")]
274 internal static extern PlayerErrorCode SetSubtitlePath(IntPtr player, string path);
276 [DllImport(Libraries.Player, EntryPoint = "player_set_subtitle_updated_cb")]
277 internal static extern PlayerErrorCode SetSubtitleUpdatedCb(IntPtr player,
278 SubtitleUpdatedCallback callback, IntPtr userData = default(IntPtr));
280 [DllImport(Libraries.Player, EntryPoint = "player_unset_subtitle_updated_cb")]
281 internal static extern PlayerErrorCode UnsetSubtitleUpdatedCb(IntPtr player);
283 [DllImport(Libraries.Player, EntryPoint = "player_set_subtitle_position_offset")]
284 internal static extern PlayerErrorCode SetSubtitlePositionOffset(IntPtr player, int millisecond);
286 [DllImport(Libraries.Player, EntryPoint = "player_set_video_stream_changed_cb")]
287 internal static extern PlayerErrorCode SetVideoStreamChangedCb(IntPtr player,
288 VideoStreamChangedCallback callback, IntPtr userData = default(IntPtr));
290 [DllImport(Libraries.Player, EntryPoint = "player_unset_video_stream_changed_cb")]
291 internal static extern PlayerErrorCode UnsetVideoStreamChangedCb(IntPtr player);
293 [DllImport(Libraries.Player, EntryPoint = "player_get_track_count")]
294 internal static extern PlayerErrorCode GetTrackCount(IntPtr player, StreamType type, out int count);
296 [DllImport(Libraries.Player, EntryPoint = "player_select_track")]
297 internal static extern PlayerErrorCode SelectTrack(IntPtr player, StreamType type, int index);
299 [DllImport(Libraries.Player, EntryPoint = "player_get_current_track")]
300 internal static extern PlayerErrorCode GetCurrentTrack(IntPtr player, StreamType type,
303 [DllImport(Libraries.Player, EntryPoint = "player_get_track_language_code")]
304 internal static extern PlayerErrorCode GetTrackLanguageCode(IntPtr player, StreamType type,
305 int index, out IntPtr code);
307 [DllImport(Libraries.Player, EntryPoint = "player_set_audio_only")]
308 internal static extern PlayerErrorCode SetAudioOnly(IntPtr player, bool audioOnly);
310 [DllImport(Libraries.Player, EntryPoint = "player_is_audio_only")]
311 internal static extern PlayerErrorCode IsAudioOnly(IntPtr player, out bool audioOnly);
313 [DllImport(Libraries.Player, EntryPoint = "player_360_is_content_spherical")]
314 internal static extern PlayerErrorCode IsSphericalContent(IntPtr player, out bool isspherical);
316 [DllImport(Libraries.Player, EntryPoint = "player_360_set_enabled")]
317 internal static extern PlayerErrorCode SetSphericalMode(IntPtr player, bool enabled);
319 [DllImport(Libraries.Player, EntryPoint = "player_360_is_enabled")]
320 internal static extern PlayerErrorCode IsSphericalMode(IntPtr player, out bool enabled);
322 [DllImport(Libraries.Player, EntryPoint = "player_360_set_direction_of_view")]
323 internal static extern PlayerErrorCode SetDirectionOfView(IntPtr player, float yaw, float pitch);
325 [DllImport(Libraries.Player, EntryPoint = "player_360_get_direction_of_view")]
326 internal static extern PlayerErrorCode GetDirectionOfView(IntPtr player, out float yaw, out float pitch);
328 [DllImport(Libraries.Player, EntryPoint = "player_360_set_zoom")]
329 internal static extern PlayerErrorCode SetZoom(IntPtr player, float level);
331 [DllImport(Libraries.Player, EntryPoint = "player_360_get_zoom")]
332 internal static extern PlayerErrorCode GetZoom(IntPtr player, out float level);
334 [DllImport(Libraries.Player, EntryPoint = "player_360_set_field_of_view")]
335 internal static extern PlayerErrorCode SetFieldOfView(IntPtr player, int horizontalDegrees, int verticalDegrees);
337 [DllImport(Libraries.Player, EntryPoint = "player_360_get_field_of_view")]
338 internal static extern PlayerErrorCode GetFieldOfView(IntPtr player, out int horizontalDegrees, out int verticalDegrees);
340 [DllImport(Libraries.Player, EntryPoint = "player_360_set_zoom_with_field_of_view")]
341 internal static extern PlayerErrorCode SetZoomWithFieldOfView(IntPtr player, float level, int horizontalDegrees, int verticalDegrees);
343 [DllImport(Libraries.Player, EntryPoint = "player_foreach_adaptive_variant")]
344 internal static extern PlayerErrorCode ForeachAdaptiveVariants(IntPtr player, AdaptiveVariantCallback callback, IntPtr userData);
346 [DllImport(Libraries.Player, EntryPoint = "player_set_max_adaptive_variant_limit")]
347 internal static extern PlayerErrorCode SetMaxLimit(IntPtr player, int bandwidth, int width, int height);
349 [DllImport(Libraries.Player, EntryPoint = "player_get_max_adaptive_variant_limit")]
350 internal static extern PlayerErrorCode GetMaxLimit(IntPtr player, out int bandwidth, out int width, out int height);
352 [DllImport(Libraries.Player, EntryPoint = "player_set_video_roi_area")]
353 internal static extern PlayerErrorCode SetVideoRoi(IntPtr player, double scaleX, double scaleY, double scaleWidth, double scaleHeight);
355 [DllImport(Libraries.Player, EntryPoint = "player_get_video_roi_area")]
356 internal static extern PlayerErrorCode GetVideoRoi(IntPtr player, out double scaleX, out double scaleY, out double scaleWidth, out double scaleHeight);
358 [DllImport(Libraries.Player, EntryPoint = "player_audio_pitch_set_enabled")]
359 internal static extern PlayerErrorCode SetAudioPitchEnabled(IntPtr player, bool enabled);
361 [DllImport(Libraries.Player, EntryPoint = "player_audio_pitch_is_enabled")]
362 internal static extern PlayerErrorCode IsAudioPitchEnabled(IntPtr player, out bool enabled);
364 [DllImport(Libraries.Player, EntryPoint = "player_audio_pitch_set_value")]
365 internal static extern PlayerErrorCode SetAudioPitch(IntPtr player, float level);
367 [DllImport(Libraries.Player, EntryPoint = "player_audio_pitch_get_value")]
368 internal static extern PlayerErrorCode GetAudioPitch(IntPtr player, out float level);
370 [DllImport(Libraries.Player, EntryPoint = "player_audio_offload_set_enabled")]
371 internal static extern PlayerErrorCode SetAudioOffloadEnabled(IntPtr player, bool value);
373 [DllImport(Libraries.Player, EntryPoint = "player_audio_offload_is_enabled")]
374 internal static extern PlayerErrorCode IsAudioOffloadEnabled(IntPtr player, out bool value);
376 [DllImport(Libraries.Player, EntryPoint = "player_audio_offload_is_activated")]
377 internal static extern PlayerErrorCode IsAudioOffloadActivated(IntPtr player, out bool value);
379 [DllImport(Libraries.Player, EntryPoint = "player_audio_offload_foreach_supported_format")]
380 internal static extern PlayerErrorCode SupportedAudioOffloadFormat(IntPtr player, SupportedMediaFormatCallback callback, IntPtr userData);
382 [DllImport(Libraries.Player, EntryPoint = "player_foreach_media_stream_supported_format")]
383 internal static extern PlayerErrorCode SupportedMediaStreamFormat(IntPtr player, SupportedMediaFormatCallback callback, IntPtr userData);
385 [DllImport(Libraries.Player, EntryPoint = "player_set_audio_codec_type")]
386 internal static extern PlayerErrorCode SetAudioCodecType(IntPtr player, CodecType type);
388 [DllImport(Libraries.Player, EntryPoint = "player_get_audio_codec_type")]
389 internal static extern PlayerErrorCode GetAudioCodecType(IntPtr player, out CodecType type);
391 [DllImport(Libraries.Player, EntryPoint = "player_set_video_codec_type")]
392 internal static extern PlayerErrorCode SetVideoCodecType(IntPtr player, CodecType type);
394 [DllImport(Libraries.Player, EntryPoint = "player_get_video_codec_type")]
395 internal static extern PlayerErrorCode GetVideoCodecType(IntPtr player, out CodecType type);
398 internal class PlayerHandle : SafeHandle
400 protected PlayerHandle() : base(IntPtr.Zero, true)
404 internal PlayerHandle(IntPtr rawHandle) : this()
409 public override bool IsInvalid => handle == IntPtr.Zero;
411 protected override bool ReleaseHandle()
413 var ret = NativePlayer.Destroy(handle);
414 if (ret != PlayerErrorCode.None)
416 Log.Debug(GetType().FullName, $"Failed to release native {GetType().Name}");