From bf335a91eb730bd8576800c4c8421465b2c6b66d Mon Sep 17 00:00:00 2001
From: nam <36914158+aferin@users.noreply.github.com>
Date: Thu, 9 Jul 2020 12:42:33 +0900
Subject: [PATCH] [MediaPlayer] add missing error code (#1781)
* [MediaPlayer] add missing error code
* add exception method
* add other missing descriptions and change version
* remove typo
* fix wrong description
* Update src/Tizen.Multimedia.MediaPlayer/Player/Player.cs
Co-authored-by: Marcin Macias <40991900+m-macias@users.noreply.github.com>
Co-authored-by: Marcin Macias <40991900+m-macias@users.noreply.github.com>
---
src/Tizen.Multimedia.MediaPlayer/Player/Player.cs | 2 ++
.../Player/PlayerError.cs | 22 +++++++++++++++++++++-
2 files changed, 23 insertions(+), 1 deletion(-)
diff --git a/src/Tizen.Multimedia.MediaPlayer/Player/Player.cs b/src/Tizen.Multimedia.MediaPlayer/Player/Player.cs
index 331962c..71433a5 100644
--- a/src/Tizen.Multimedia.MediaPlayer/Player/Player.cs
+++ b/src/Tizen.Multimedia.MediaPlayer/Player/Player.cs
@@ -548,6 +548,8 @@ namespace Tizen.Multimedia
/// -or-
/// It is not able to assign the source to the player.
///
+ /// Thrown when the permission is denied.
+ /// The format is not supported. (Since tizen 6.0, C# API8)
///
///
/// 3
diff --git a/src/Tizen.Multimedia.MediaPlayer/Player/PlayerError.cs b/src/Tizen.Multimedia.MediaPlayer/Player/PlayerError.cs
index 996a8b0..15c4499 100644
--- a/src/Tizen.Multimedia.MediaPlayer/Player/PlayerError.cs
+++ b/src/Tizen.Multimedia.MediaPlayer/Player/PlayerError.cs
@@ -49,6 +49,7 @@ namespace Tizen.Multimedia
NotSupportedAudioCodec = PlayerErrorClass | 0x0e,
NotSupportedVideoCodec = PlayerErrorClass | 0x0f,
NotSupportedSubtitle = PlayerErrorClass | 0x10,
+ NotSupportedFormat = PlayerErrorClass | 0x11,
NotAvailable = PlayerErrorClass | 0x12
}
@@ -131,6 +132,9 @@ namespace Tizen.Multimedia
case PlayerErrorCode.NotSupportedVideoCodec:
throw new CodecNotSupportedException(CodecKind.Video);
+ case PlayerErrorCode.NotSupportedFormat:
+ throw new NotSupportedFormatException(msg);
+
case PlayerErrorCode.NotAvailable:
throw new NotAvailableException(msg);
}
@@ -172,7 +176,7 @@ namespace Tizen.Multimedia
}
///
- /// The exception that is thrown when there it is not available.
+ /// The exception that is thrown when it is not available.
///
/// 6
public class NotAvailableException : Exception
@@ -186,5 +190,21 @@ namespace Tizen.Multimedia
{
}
}
+
+ ///
+ /// The exception that is thrown when it is not supported format.
+ ///
+ /// 8
+ public class NotSupportedFormatException : Exception
+ {
+ ///
+ /// Initializes a new instance of the NotSupportedFormatException class with a specified error message.
+ ///
+ /// Error description.
+ /// 8
+ public NotSupportedFormatException(string message) : base(message)
+ {
+ }
+ }
}
--
2.7.4