Define common data structures
authorcoderhyme <jhyo.kim@samsung.com>
Tue, 7 Feb 2017 05:14:06 +0000 (14:14 +0900)
committercoderhyme <jhyo.kim@samsung.com>
Mon, 13 Feb 2017 23:40:42 +0000 (08:40 +0900)
Change-Id: Ie2c7ac0f25922b978f195d9f05d3b20b3d48798b
Signed-off-by: coderhyme <jhyo.kim@samsung.com>
src/Tizen.Multimedia/Camera/Range.cs [deleted file]
src/Tizen.Multimedia/Common/Point.cs [moved from src/Tizen.Multimedia/MediaVision/Point.cs with 55% similarity, mode: 0644]
src/Tizen.Multimedia/Common/Range.cs [new file with mode: 0644]
src/Tizen.Multimedia/Common/Rectangle.cs [new file with mode: 0644]
src/Tizen.Multimedia/Common/Size.cs
src/Tizen.Multimedia/MediaCodec/MediaCodec.cs
src/Tizen.Multimedia/MediaTool/MediaFormat.cs
src/Tizen.Multimedia/MediaVision/FaceDetector.cs
src/Tizen.Multimedia/MediaVision/Rectangle.cs [deleted file]
src/Tizen.Multimedia/MediaVision/SurveillanceEventTrigger.cs

diff --git a/src/Tizen.Multimedia/Camera/Range.cs b/src/Tizen.Multimedia/Camera/Range.cs
deleted file mode 100644 (file)
index 8cc2923..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * 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.
- */
-
-namespace Tizen.Multimedia
-{
-    /// <summary>
-    /// Range class containing min and max value.
-    /// </summary>
-    public class Range
-    {
-        internal Range(int min, int max)
-        {
-            Min = min;
-            Max = max;
-        }
-
-        /// <summary>
-        /// The minimum value of the range.
-        /// </summary>
-        public int Min
-        {
-            get;
-            private set;
-        }
-
-        /// <summary>
-        /// The maximum value of the range.
-        /// </summary>
-        public int Max
-        {
-            get;
-            private set;
-        }
-    }
-}
-
old mode 100755 (executable)
new mode 100644 (file)
similarity index 55%
rename from src/Tizen.Multimedia/MediaVision/Point.cs
rename to src/Tizen.Multimedia/Common/Point.cs
index 4b28251..3866788
@@ -1,4 +1,4 @@
-/*
+/*
  * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
  *
  * Licensed under the Apache License, Version 2.0 (the License);
 namespace Tizen.Multimedia
 {
     /// <summary>
-    /// This class represents a point in 2D space.
+    /// Represents a point in 2D space.
     /// </summary>
-    public class Point
+    public struct Point
     {
-        internal Point()
-        {
-        }
 
         /// <summary>
-        /// The constructor of Point class
+        /// Initializes a new instance of the Point with the specified coordinates.
         /// </summary>
-        /// <param name="x">X-axis coordinate of the point in 2D space</param>
-        /// <param name="y">Y-axis coordinate of the point in 2D space</param>
-        /// <code>
-        /// 
-        /// </code>
+        /// <param name="x">X-axis coordinate of the point in 2D space.</param>
+        /// <param name="y">Y-axis coordinate of the point in 2D space.</param>
         public Point(int x, int y)
         {
             X = x;
@@ -40,26 +34,49 @@ namespace Tizen.Multimedia
         }
 
         /// <summary>
-        /// Gets X-axis coordinate of the point in 2D space
+        /// Gets or sets X-axis coordinate of the point in 2D space.
         /// </summary>
         public int X
         {
             get;
-            internal set;
+            set;
         }
 
         /// <summary>
-        /// Gets Y-axis coordinate of the point in 2D space
+        /// Gets or sets Y-axis coordinate of the point in 2D space.
         /// </summary>
         public int Y
         {
             get;
-            internal set;
+            set;
+        }
+
+        public override string ToString() => $"X={X}, Y={Y}";
+
+        public override int GetHashCode()
+        {
+            return new { X, Y }.GetHashCode();
+        }
+
+        public override bool Equals(object obj)
+        {
+            if ((obj is Point) == false)
+            {
+                return false;
+            }
+
+            Point rhs = (Point)obj;
+            return X == rhs.X && Y == rhs.Y;
+        }
+
+        public static bool operator ==(Point lhs, Point rhs)
+        {
+            return lhs.Equals(rhs);
         }
 
-        internal new string ToString()
+        public static bool operator !=(Point lhs, Point rhs)
         {
-            return string.Format("({0}, {1})", X, Y);
+            return !lhs.Equals(rhs);
         }
     }
 }
diff --git a/src/Tizen.Multimedia/Common/Range.cs b/src/Tizen.Multimedia/Common/Range.cs
new file mode 100644 (file)
index 0000000..e10f724
--- /dev/null
@@ -0,0 +1,93 @@
+/*
+ * 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;
+
+namespace Tizen.Multimedia
+{
+    /// <summary>
+    /// Represents a range(min, max) value.
+    /// </summary>
+    public struct Range
+    {
+        /// <summary>
+        /// Initializes a new instance of the Range with the specified values.
+        /// </summary>
+        /// <param name="min">Minimum value of the range.</param>
+        /// <param name="max">Maximum value of the range.</param>
+        public Range(int min, int max)
+        {
+            if (min > max )
+            {
+                throw new ArgumentException($"min can't be greater than max.");
+            }
+            Min = min;
+            Max = max;
+        }
+
+        /// <summary>
+        /// Gets or sets minimum value of the range.
+        /// </summary>
+        public int Min
+        {
+            get;
+            set;
+        }
+
+        /// <summary>
+        /// Gets or sets maximum value of the range.
+        /// </summary>
+        public int Max
+        {
+            get;
+            set;
+        }
+
+        /// <summary>
+        /// Gets length of the range.
+        /// </summary>
+        public int Length => Max - Min;
+
+        /// <summary>
+        /// Determines if the specified value is inside of the range.
+        /// </summary>
+        /// <param name="value">A value to check.</param>
+        /// <returns>true if the value is inside of the range; otherwise false.</returns>
+        public bool IsInside(int value)
+        {
+            return Min <= value && value <= Max;
+        }
+
+        public override string ToString() => $"Min={Min}, Max={Max}";
+
+        public override int GetHashCode()
+        {
+            return new { Min, Max }.GetHashCode();
+        }
+
+        public override bool Equals(object obj)
+        {
+            if ((obj is Range) == false)
+            {
+                return false;
+            }
+
+            Range rhs = (Range)obj;
+            return Min == rhs.Min && Max == rhs.Max;
+        }
+    }
+}
+
diff --git a/src/Tizen.Multimedia/Common/Rectangle.cs b/src/Tizen.Multimedia/Common/Rectangle.cs
new file mode 100644 (file)
index 0000000..c31fd28
--- /dev/null
@@ -0,0 +1,143 @@
+/*
+ * 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.
+ */
+
+namespace Tizen.Multimedia
+{
+    // TODO consider changing it to struct
+    /// <summary>
+    /// This class represents location of the object bounded by rectangle defined by
+    /// coordinates of top left corner, width and height.
+    /// </summary>
+    public class Rectangle
+    {
+        private Point _location;
+        private Size _size;
+
+        /// <summary>
+        /// Initializes a new instance of the Rectangle with default values.
+        /// </summary>
+        public Rectangle() : this(new Point(), new Size())
+        {
+        }
+
+        /// <summary>
+        /// Initializes a new instance of the Rectangle with the specified values.
+        /// </summary>
+        /// <param name="x">The x-coordinate of the upper-left corner of the rectangle.</param>
+        /// <param name="y">The y-coordinate of the upper-left corner of the rectangle.</param>
+        /// <param name="width">The Width of the rectangle.</param>
+        /// <param name="height">The Height of the rectangle.</param>
+        public Rectangle(int x, int y, int width, int height) : this(new Point(x, y),
+            new Size(width, height))
+        {
+        }
+
+        /// <summary>
+        /// Initializes a new instance of the Rectangle with the specified values.
+        /// </summary>
+        /// <param name="location">A <see cref="Point"/> that represents the upper-left corner of the rectangular region.</param>
+        /// <param name="size">A <see cref="Size"/> that represents the width and height of the rectangular region.</param>
+        public Rectangle(Point location, Size size)
+        {
+            _location = location;
+            _size = size;
+        }
+
+        //TODO rename
+        /// <summary>
+        /// Gets or sets the coordinates of the upper-left corner of the rectangle.
+        /// </summary>
+        public Point Point
+        {
+            get { return _location; }
+            set { _location = value; }
+        }
+
+        /// <summary>
+        /// Gets or sets the x-coordinate of the upper-left corner of the rectangle.
+        /// </summary>
+        public int X
+        {
+            get { return Point.X; }
+            set { _location.X = value; }
+        }
+
+        /// <summary>
+        /// Gets or sets the y-coordinate of the upper-left corner of the rectangle.
+        /// </summary>
+        public int Y
+        {
+            get { return Point.Y; }
+            set { _location.Y = value; }
+        }
+
+        /// <summary>
+        /// Gets or sets the width of the rectangle.
+        /// </summary>
+        public int Width
+        {
+            get { return _size.Width; }
+            set { _size.Width = value; }
+        }
+
+        /// <summary>
+        /// Gets or sets the height of the rectangle.
+        /// </summary>
+        public int Height
+        {
+            get { return _size.Height; }
+            set { _size.Height = value; }
+        }
+
+        /// <summary>
+        /// Gets or sets the size of the rectangle.
+        /// </summary>
+        public Size Size
+        {
+            get { return _size; }
+            set { _size = value; }
+        }
+
+        public override string ToString() => $"{_location}, {_size}";
+
+
+        public override int GetHashCode()
+        {
+            return new { Point, Size }.GetHashCode();
+        }
+
+        public override bool Equals(object obj)
+        {
+            if ((obj is Rectangle) == false)
+            {
+                return false;
+            }
+
+            Rectangle rhs = (Rectangle)obj;
+            return Point == rhs.Point && Size == rhs.Size;
+        }
+
+        public static bool operator ==(Rectangle lhs, Rectangle rhs)
+        {
+            return lhs.Equals(rhs);
+        }
+
+        public static bool operator !=(Rectangle lhs, Rectangle rhs)
+        {
+            return !lhs.Equals(rhs);
+        }
+    }
+}
index 7aa6792..30ff0b0 100644 (file)
@@ -18,28 +18,61 @@ namespace Tizen.Multimedia
 {
     public struct Size
     {
-
+        /// <summary>
+        /// Initializes a new instance of the Size with the specified values.
+        /// </summary>
+        /// <param name="width">Width of the size.</param>
+        /// <param name="height">Height of the size.</param>
         public Size(int width, int height)
         {
             Width = width;
             Height = height;
         }
 
+        /// <summary>
+        /// Gets or sets the width of the Size.
+        /// </summary>
         public int Width
         {
             get;
             set;
         }
 
+        /// <summary>
+        /// Gets or sets the height of the Size.
+        /// </summary>
         public int Height
         {
             get;
             set;
         }
 
-        public override string ToString()
+        public override string ToString() => $"Width={ Width }, Height={ Height }";
+
+        public override int GetHashCode()
+        {
+            return new { Width, Height }.GetHashCode();
+        }
+
+        public override bool Equals(object obj)
+        {
+            if ((obj is Size) == false)
+            {
+                return false;
+            }
+
+            Size rhs = (Size)obj;
+            return Width == rhs.Width && Height == rhs.Height;
+        }
+
+        public static bool operator ==(Size lhs, Size rhs)
+        {
+            return lhs.Equals(rhs);
+        }
+
+        public static bool operator !=(Size lhs, Size rhs)
         {
-            return $"Width : { Width }, Height : { Height }";
+            return !lhs.Equals(rhs);
         }
     }
 }
index c715d95..76b1076 100644 (file)
@@ -306,14 +306,14 @@ namespace Tizen.Multimedia.MediaCodec
 
             if (encoder)
             {
-                int ret = Interop.MediaCodec.SetVideoEncoderInfo(_handle, format.Width,
-                    format.Height, format.FrameRate, format.BitRate / 1000);
+                int ret = Interop.MediaCodec.SetVideoEncoderInfo(_handle, format.Size.Width,
+                    format.Size.Height, format.FrameRate, format.BitRate / 1000);
 
                 MultimediaDebug.AssertNoError(ret);
             }
             else
             {
-                int ret = Interop.MediaCodec.SetVideoDecoderInfo(_handle, format.Width, format.Height);
+                int ret = Interop.MediaCodec.SetVideoDecoderInfo(_handle, format.Size.Width, format.Size.Height);
 
                 MultimediaDebug.AssertNoError(ret);
             }
index 535662a..8f5bb77 100755 (executable)
@@ -193,9 +193,8 @@ namespace Tizen.Multimedia
     /// </summary>
     public sealed class VideoMediaFormat : MediaFormat
     {
-        private const int DEFAULT_FRAME_RATE = 0;
-        private const int DEFAULT_BIT_RATE = 0;
-
+        private const int DefaultFrameRate = 0;
+        private const int DefaultBitRate = 0;
 
         /// <summary>
         /// Initializes a new instance of the VideoMediaFormat class with the specified mime type, width and height.
@@ -206,7 +205,19 @@ namespace Tizen.Multimedia
         /// <exception cref="System.ArgumentException">mimeType is invalid(i.e. undefined value).</exception>
         /// <exception cref="System.ArgumentOutOfRangeException">width, or height is less than zero.</exception>
         public VideoMediaFormat(MediaFormatVideoMimeType mimeType, int width, int height)
-            : this(mimeType, width, height, DEFAULT_FRAME_RATE)
+            : this(mimeType, width, height, DefaultFrameRate)
+        {
+        }
+
+        /// <summary>
+        /// Initializes a new instance of the VideoMediaFormat class with the specified mime type, width and height.
+        /// </summary>
+        /// <param name="mimeType">The mime type of the format.</param>
+        /// <param name="size">The size of the format.</param>
+        /// <exception cref="System.ArgumentException">mimeType is invalid(i.e. undefined value).</exception>
+        /// <exception cref="System.ArgumentOutOfRangeException">width, or height is less than zero.</exception>
+        public VideoMediaFormat(MediaFormatVideoMimeType mimeType, Size size)
+            : this(mimeType, size, DefaultFrameRate)
         {
         }
 
@@ -222,7 +233,23 @@ namespace Tizen.Multimedia
         /// <exception cref="System.ArgumentOutOfRangeException">width, height or frameRate is less than zero.</exception>
         public VideoMediaFormat(MediaFormatVideoMimeType mimeType, int width, int height,
             int frameRate)
-            : this(mimeType, width, height, frameRate, DEFAULT_BIT_RATE)
+            : this(mimeType, width, height, frameRate, DefaultBitRate)
+        {
+        }
+
+        /// <summary>
+        /// Initializes a new instance of the VideoMediaFormat class with the specified mime type,
+        /// width, height and frame rate.
+        /// </summary>
+        /// <param name="mimeType">The mime type of the format.</param>
+        /// <param name="size">The video size of the format.</param>
+        /// <param name="height">The height value of the format</param>
+        /// <param name="frameRate">The frame rate of the format.</param>
+        /// <exception cref="System.ArgumentException">mimeType is invalid(i.e. undefined value).</exception>
+        /// <exception cref="System.ArgumentOutOfRangeException">width, height or frameRate is less than zero.</exception>
+        public VideoMediaFormat(MediaFormatVideoMimeType mimeType, Size size,
+            int frameRate)
+            : this(mimeType, size, frameRate, DefaultBitRate)
         {
         }
 
@@ -239,32 +266,47 @@ namespace Tizen.Multimedia
         /// <exception cref="System.ArgumentOutOfRangeException">width, height, frameRate or bitRate is less than zero.</exception>
         public VideoMediaFormat(MediaFormatVideoMimeType mimeType, int width, int height,
             int frameRate, int bitRate)
+            : this(mimeType, new Size(width, height), frameRate, bitRate)
+        {
+        }
+
+        /// <summary>
+        /// Initializes a new instance of the VideoMediaFormat class with the specified mime type,
+        /// width, height, frame rate and bit rate.
+        /// </summary>
+        /// <param name="mimeType">The mime type of the format.</param>
+        /// <param name="size">The size of the format.</param>
+        /// <param name="frameRate">The frame rate of the format.</param>
+        /// <param name="bitRate">The bit rate of the format.</param>
+        /// <exception cref="System.ArgumentException">mimeType is invalid(i.e. undefined value).</exception>
+        /// <exception cref="System.ArgumentOutOfRangeException">width, height, frameRate or bitRate is less than zero.</exception>
+        public VideoMediaFormat(MediaFormatVideoMimeType mimeType, Size size,
+            int frameRate, int bitRate)
             : base(MediaFormatType.Video)
         {
             if (!Enum.IsDefined(typeof(MediaFormatVideoMimeType), mimeType))
             {
                 throw new ArgumentException($"Invalid mime type value : { (int)mimeType }");
             }
-            if (width < 0)
+            if (size.Width < 0)
             {
-                throw new ArgumentOutOfRangeException("Width value can't be less than zero.");
+                throw new ArgumentOutOfRangeException(nameof(size), size.Width, "Size.Width value can't be less than zero.");
             }
-            if (height < 0)
+            if (size.Height < 0)
             {
-                throw new ArgumentOutOfRangeException("Height value can't be less than zero.");
+                throw new ArgumentOutOfRangeException(nameof(size), size.Height, "Size.Height value can't be less than zero.");
             }
             if (frameRate < 0)
             {
-                throw new ArgumentOutOfRangeException("Frame rate can't be less than zero.");
+                throw new ArgumentOutOfRangeException(nameof(frameRate), frameRate, "Frame rate can't be less than zero.");
             }
             if (bitRate < 0)
             {
-                throw new ArgumentOutOfRangeException("Bit rate value can't be less than zero.");
+                throw new ArgumentOutOfRangeException(nameof(bitRate), bitRate, "Bit rate value can't be less than zero.");
             }
 
             MimeType = mimeType;
-            Width = width;
-            Height = height;
+            Size = size;
             FrameRate = frameRate;
             BitRate = bitRate;
         }
@@ -288,8 +330,7 @@ namespace Tizen.Multimedia
             GetFrameRate(handle, out frameRate);
 
             MimeType = mimeType;
-            Width = width;
-            Height = height;
+            Size = new Size(width, height);
             FrameRate = frameRate;
             BitRate = bitRate;
         }
@@ -342,10 +383,10 @@ namespace Tizen.Multimedia
             int ret = Interop.MediaFormat.SetVideoMimeType(handle, (int)MimeType);
             MultimediaDebug.AssertNoError(ret);
 
-            ret = Interop.MediaFormat.SetVideoWidth(handle, Width);
+            ret = Interop.MediaFormat.SetVideoWidth(handle, Size.Width);
             MultimediaDebug.AssertNoError(ret);
 
-            ret = Interop.MediaFormat.SetVideoHeight(handle, Height);
+            ret = Interop.MediaFormat.SetVideoHeight(handle, Size.Height);
             MultimediaDebug.AssertNoError(ret);
 
             ret = Interop.MediaFormat.SetVideoAverageBps(handle, BitRate);
@@ -361,14 +402,9 @@ namespace Tizen.Multimedia
         public MediaFormatVideoMimeType MimeType { get; }
 
         /// <summary>
-        /// Gets the width value of the current format.
+        /// Gets the size of the current format.
         /// </summary>
-        public int Width { get; }
-
-        /// <summary>
-        /// Gets the width value of the current format.
-        /// </summary>
-        public int Height { get; }
+        public Size Size { get; }
 
         /// <summary>
         /// Gets the frame rate value of the current format.
@@ -382,8 +418,8 @@ namespace Tizen.Multimedia
 
         public override string ToString()
         {
-            return $"MimeType : { MimeType }, Width : { Width }, "
-                + $"Height : { Height }, FrameRate : { FrameRate }, BitRate : { BitRate }";
+            return $"MimeType : { MimeType }, Size : ({ Size }), "
+                + $"FrameRate : { FrameRate }, BitRate : { BitRate }";
         }
 
         public override bool Equals(object obj)
@@ -394,13 +430,13 @@ namespace Tizen.Multimedia
                 return false;
             }
 
-            return MimeType == rhs.MimeType && Width == rhs.Width && Height == rhs.Height &&
+            return MimeType == rhs.MimeType && Size == rhs.Size &&
                 FrameRate == rhs.FrameRate && BitRate == rhs.BitRate;
         }
 
         public override int GetHashCode()
         {
-            return new { MimeType, Width, Height, FrameRate, BitRate }.GetHashCode();
+            return new { MimeType, Size, FrameRate, BitRate }.GetHashCode();
         }
     }
 
@@ -629,6 +665,7 @@ namespace Tizen.Multimedia
         /// Gets the aac type of the current format.
         /// </summary>
         public MediaFormatAacType AacType { get; }
+
         public override string ToString()
         {
             return $"MimeType : {MimeType }, Channel : { Channel }, SampleRate : { SampleRate }, "
index 987b2a2..4728efb 100755 (executable)
@@ -1,4 +1,4 @@
-/*
+/*
  * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
  *
  * Licensed under the Apache License, Version 2.0 (the License);
@@ -36,7 +36,7 @@ namespace Tizen.Multimedia
         /// <param name="config">The configuration of engine will be used for detecting. If NULL, then default settings will be used.</param>
         /// <returns>Returns the FaceDetectionResult asynchronously</returns>
         /// <code>
-        /// 
+        ///
         /// </code>
         public static async Task<FaceDetectionResult> DetectAsync(MediaVisionSource source, FaceEngineConfiguration config = null)
         {
@@ -59,7 +59,8 @@ namespace Tizen.Multimedia
                         for (int i = 0; i < numberOfFaces; i++)
                         {
                             Interop.MediaVision.Rectangle location = (Interop.MediaVision.Rectangle)Marshal.PtrToStructure(facesLocations, typeof(Interop.MediaVision.Rectangle));
-                            Rectangle rect = new Rectangle(new Point(location.x, location.y), location.width, location.height);
+                            Rectangle rect = new Rectangle(new Point(location.x, location.y),
+                                new Size(location.width, location.height));
                             Log.Info(MediaVisionLog.Tag, String.Format("Face {0} detected at : ({1}, {2})", i + 1, rect.Point.X, rect.Point.Y));
                             locations.Add(rect);
                             facesLocations = IntPtr.Add(facesLocations, sizeof(int) * 4);
diff --git a/src/Tizen.Multimedia/MediaVision/Rectangle.cs b/src/Tizen.Multimedia/MediaVision/Rectangle.cs
deleted file mode 100755 (executable)
index fead617..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * 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.
- */
-
-namespace Tizen.Multimedia
-{
-    /// <summary>
-    /// This class represents location of the object bounded by rectangle defined by
-    /// coordinates of top left corner, width and height.
-    /// </summary>
-    public class Rectangle
-    {
-        internal Rectangle()
-        {
-        }
-
-        /// <summary>
-        /// The constructor of the Rectangle class
-        /// </summary>
-        /// <param name="point">Top left corner of rectangle coordinates</param>
-        /// <param name="width">Width of the bounding rectangle</param>
-        /// <param name="height">Height of the bounding rectangle</param>
-        /// <code>
-        /// 
-        /// </code>
-        public Rectangle(Point point, int width, int height)
-        {
-            Point = point;
-            Width = width;
-            Height = height;
-        }
-
-        /// <summary>
-        /// Gets top left corner of rectangle coordinates
-        /// </summary>
-        public Point Point { get; internal set; }
-
-        /// <summary>
-        /// Gets width of the bounding rectangle
-        /// </summary>
-        public int Width { get; internal set; }
-
-        /// <summary>
-        /// Gets height of the bounding rectangle
-        /// </summary>
-        public int Height { get; internal set; }
-
-        internal new string ToString()
-        {
-            return string.Format("Point : [{0}, {1}], Width : {2}, Height : {3}", Point.ToString(), Width, Height);
-        }
-    }
-}
index e07ea01..04d1684 100755 (executable)
@@ -1,4 +1,4 @@
-/*
+/*
  * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
  *
  * Licensed under the Apache License, Version 2.0 (the License);
@@ -120,11 +120,6 @@ namespace Tizen.Multimedia
                 IntPtr[] ptrArray = new IntPtr[value.Count];
                 for (int i = 0; i < value.Count; i++)
                 {
-                    if (value[i] == null)
-                    {
-                        throw new ArgumentException("Invalid parameter");
-                    }
-
                     Interop.MediaVision.Point point = new Interop.MediaVision.Point()
                     {
                         x = value[i].X,