/* * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an AS IS BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ using System; using Tizen.Internals.Errors; namespace Tizen.Multimedia { /// /// Specifies errors. /// /// /// /// 3 public enum PlayerError { /// /// File does not exists. /// NoSuchFile = ErrorCode.NoSuchFile, /// /// Internal error. /// InternalError = ErrorCode.InvalidOperation, /// /// No space. /// NoSpaceOnDevice = PlayerErrorCode.NoSpaceOnDevice, /// /// Not enough buffer. /// BufferSpace = ErrorCode.BufferSpace, /// /// failed. /// SeekFailed = PlayerErrorCode.SeekFailed, /// /// Invalid state. /// InvalidState = PlayerErrorCode.InvalidState, /// /// Not supported file. /// NotSupportedFile = PlayerErrorCode.NotSupportedFile, /// /// Invalid uri. /// InvalidUri = PlayerErrorCode.InvalidUri, /// /// Connection to service failed. /// ConnectionFailed = PlayerErrorCode.ConnectionFailed, /// /// Not permitted DRM. /// DrmNotPermitted = PlayerErrorCode.DrmNotPermitted, /// /// Service disconnected. /// ServiceDisconnected = PlayerErrorCode.ServiceDisconnected, /// /// Not supported audio codec. /// /// 4 AudioCodecNotSupported = PlayerErrorCode.NotSupportedAudioCodec, /// /// Not supported video codec. /// /// 4 VideoCodecNotSupported = PlayerErrorCode.NotSupportedVideoCodec, /// /// Not supported subtitle file. /// SubtitleNotSupported = PlayerErrorCode.NotSupportedSubtitle, } /// /// Specifies states that a can have. /// /// 3 public enum PlayerState { /// /// Initial state, unprepared. /// /// Idle = 1, /// /// Prepared. /// /// Ready, /// /// Playing. /// /// Playing, /// /// Paused while playing media. /// /// Paused, /// /// Preparation in progress. /// /// /> Preparing, } internal static class PlayerStateExtensions { internal static bool IsAnyOf(this PlayerState thisState, params PlayerState[] states) { return Array.IndexOf(states, thisState) != -1; } } /// /// Specifies audio latency modes for . /// /// /// 3 public enum AudioLatencyMode { /// /// Low audio latency mode. /// Low, /// /// Middle audio latency mode. /// Mid, /// /// High audio latency mode. /// High, } /// /// Specifies display modes for . /// /// /// 3 public enum PlayerDisplayMode { /// /// Letter box. /// LetterBox, /// /// Original size. /// OriginalSize, /// /// Full-screen. /// FullScreen, /// /// Cropped full-screen. /// CroppedFull, /// /// Original size (if surface size is larger than video size(width/height)) or /// letter box (if video size(width/height) is larger than surface size). /// OriginalOrFull, /// /// Region of interest. /// /// Roi } internal enum StreamType { /// /// Audio element stream type. /// Audio = 1, /// /// Video element stream type. /// Video, /// /// Text type. /// Text } /// /// Specifies the streaming buffer status. /// /// /// /// 3 public enum MediaStreamBufferStatus { /// /// Underrun. /// Underrun, /// /// Completed. /// Overflow, } /// /// Specifies the reason for the playback interruption. /// /// /// 3 public enum PlaybackInterruptionReason { /// /// Interrupted by a resource conflict and the will be unprepared automatically. /// ResourceConflict = 4 } /// /// Specifies keys for the metadata. /// /// /// 3 public enum StreamMetadataKey { /// /// Album. /// Album, /// /// Artists. /// Artist, /// /// Author. /// Author, /// /// Genre. /// Genre, /// /// Title. /// Title, /// /// Year. /// Year } }