[Multimedia.Util] Modified to throw NotSupportedException for NotSupported error...
[platform/core/csapi/tizenfx.git] / src / Tizen.Multimedia.Util / ImageUtil / ImageTransformer.cs
index aa22ae7..dda3600 100644 (file)
@@ -44,8 +44,10 @@ namespace Tizen.Multimedia.Util
         ///     -or-<br/>
         ///     <paramref name="item"/> is null.
         /// </exception>
+        /// <exception cref="ArgumentException"><paramref name="source"/> is not video format.</exception>
         /// <exception cref="ObjectDisposedException">The <see cref="ImageTransformer"/> has already been disposed of.</exception>
         /// <exception cref="InvalidOperationException">Failed to apply <see cref="ImageTransform"/>.</exception>
+        /// <exception cref="NotSupportedException">Specified transformation is not supported.</exception>
         /// <since_tizen> 4 </since_tizen>
         public Task<MediaPacket> TransformAsync(MediaPacket source, ImageTransform item)
         {
@@ -64,6 +66,11 @@ namespace Tizen.Multimedia.Util
                 throw new ArgumentNullException(nameof(item));
             }
 
+            if (source.Format is VideoMediaFormat == false)
+            {
+                throw new ArgumentException("source is not video format.", nameof(source));
+            }
+
             return item.ApplyAsync(source);
         }