2 * Copyright (c) 2016 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.
17 using Tizen.Internals.Errors;
19 namespace Tizen.Multimedia
24 /// <seealso cref="Player.ErrorOccurred"/>
25 /// <seealso cref="PlayerErrorOccurredEventArgs"/>
26 public enum PlayerError
29 /// File does not exists.
31 NoSuchFile = ErrorCode.NoSuchFile,
36 InternalError = ErrorCode.InvalidOperation,
41 NoSpaceOnDevice = PlayerErrorCode.NoSpaceOnDevice,
44 /// Not enough buffer.
46 BufferSpace = ErrorCode.BufferSpace,
49 /// <see cref="Player.SetPlayPositionAsync(int, bool)"/> failed.
51 SeekFailed = PlayerErrorCode.SeekFailed,
56 InvalidState = PlayerErrorCode.InvalidState,
59 /// Not supported file.
61 NotSupportedFile = PlayerErrorCode.NotSupportedFile,
66 InvalidUri = PlayerErrorCode.InvalidUri,
69 /// Connection to service failed.
71 ConnectionFailed = PlayerErrorCode.ConnectionFailed,
74 /// Not permitted DRM.
76 DrmNotPermitted = PlayerErrorCode.DrmNotPermitted,
79 /// Service disconnected.
81 ServiceDisconnected = PlayerErrorCode.ServiceDisconnected,
84 /// Not supported audio codec.
86 AudioCodecNotSupported = PlayerErrorCode.NotSupportedAudioCodec,
89 /// Not supported video codec.
91 VideoCodecNotSupported = PlayerErrorCode.NotSupportedVideoCodec,
94 /// Not supported subtitle file.
96 SubtitleNotSupported = PlayerErrorCode.NotSupportedSubtitle,
100 /// Specifies states that a <see cref="Player"/> can have.
102 public enum PlayerState
105 /// Initial state, unprepared.
107 /// <seealso cref="Player.Unprepare"/>
113 /// <seealso cref="Player.PrepareAsync"/>
119 /// <seealso cref="Player.Start"/>
123 /// Paused while playing media.
125 /// <seealso cref="Player.Pause"/>
129 /// Preparing in progress.
131 /// <seealso cref="Player.PrepareAsync"/>/>
135 internal static class PlayerStateExtensions
137 internal static bool IsAnyOf(this PlayerState thisState, params PlayerState[] states)
139 return Array.IndexOf(states, thisState) != -1;
144 /// Specifies audio latency modes for <see cref="Player"/> .
146 /// <seealso cref="Player.AudioLatencyMode"/>
147 public enum AudioLatencyMode
150 /// Low audio latency mode.
155 /// Middle audio latency mode.
160 /// High audio latency mode.
166 /// Specifies display modes for <see cref="Player"/>
168 /// <seealso cref="Display.Mode"/>
169 public enum PlayerDisplayMode
187 /// Cropped full-screen.
192 /// Origin size (if surface size is larger than video size(width/height)) or
193 /// Letter box (if video size(width/height) is larger than surface size).
198 /// Region of interest, See <see cref="Display.SetRoi(Rectangle)"/>.
203 internal enum StreamType
206 /// Audio element stream type
211 /// Video element stream type
222 /// Specifies the streaming buffer status.
224 /// <seealso cref="MediaStreamConfiguration.BufferStatusChanged"/>
225 /// <seealso cref="MediaStreamBufferStatusChangedEventArgs"/>
226 public enum MediaStreamBufferStatus
240 /// Specifies the reason for the playback interruption.
242 /// <seealso cref="Player.PlaybackInterrupted"/>
243 public enum PlaybackInterruptionReason
246 /// Interrupted by a resource conflict and the <see cref="Player"/> will be unprepared, automatically.
252 /// Specifies keys for the metadata.
254 /// <seealso cref="StreamInfo.GetMetadata(StreamMetadataKey)"/>
255 public enum StreamMetadataKey