[MetadataExtractor] Refactoring
authorcoderhyme <jhyo.kim@samsung.com>
Fri, 3 Feb 2017 07:36:03 +0000 (16:36 +0900)
committercoderhyme <jhyo.kim@samsung.com>
Thu, 9 Feb 2017 02:09:14 +0000 (11:09 +0900)
Change-Id: Ief6bb5921c0da8d02bcdcbc89f53c85e04b7f6e6
Signed-off-by: coderhyme <jhyo.kim@samsung.com>
13 files changed:
src/Tizen.Multimedia/Common/ObjectDescriptionBuilder.cs [new file with mode: 0644]
src/Tizen.Multimedia/Interop/Interop.MetadataExtractor.cs
src/Tizen.Multimedia/MetadataExtractor/Artwork.cs
src/Tizen.Multimedia/MetadataExtractor/Frame.cs [deleted file]
src/Tizen.Multimedia/MetadataExtractor/Metadata.cs
src/Tizen.Multimedia/MetadataExtractor/MetadataEnums.cs [deleted file]
src/Tizen.Multimedia/MetadataExtractor/MetadataExtractor.cs
src/Tizen.Multimedia/MetadataExtractor/MetadataExtractorAttr.cs [new file with mode: 0644]
src/Tizen.Multimedia/MetadataExtractor/MetadataExtractorError.cs [new file with mode: 0644]
src/Tizen.Multimedia/MetadataExtractor/MetadataExtractorErrorFactory.cs [deleted file]
src/Tizen.Multimedia/MetadataExtractor/Synclyrics.cs
src/Tizen.Multimedia/Tizen.Multimedia.Net45.csproj
src/Tizen.Multimedia/Tizen.Multimedia.csproj

diff --git a/src/Tizen.Multimedia/Common/ObjectDescriptionBuilder.cs b/src/Tizen.Multimedia/Common/ObjectDescriptionBuilder.cs
new file mode 100644 (file)
index 0000000..96f1f68
--- /dev/null
@@ -0,0 +1,59 @@
+/*
+ * 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 System.Reflection;
+using System.Text;
+
+namespace Tizen.Multimedia
+{
+    /// <summary>
+    /// Represents a point in 2D space.
+    /// </summary>
+    internal static class ObjectDescriptionBuilder
+    {
+        internal static string BuildWithProperties(object obj)
+        {
+            StringBuilder sb = new StringBuilder();
+
+            foreach (var property in obj.GetType().GetRuntimeProperties())
+            {
+                object value = property.GetValue(obj);
+
+                sb.Append(property.Name).Append("=");
+
+                bool isObjectType = Convert.GetTypeCode(value) == TypeCode.Object;
+
+                if (isObjectType)
+                {
+                    sb.Append("[").Append(value).Append("]");
+                }
+                else
+                {
+                    sb.Append(value);
+                }
+
+                sb.Append(", ");
+            }
+            if (sb.Length >= 2)
+            {
+                sb.Remove(sb.Length - 1, 2);
+            }
+
+            return sb.ToString();
+        }
+    }
+}
index 5599ad5..54a393f 100755 (executable)
@@ -1,35 +1,55 @@
-using System;
+using System;
 using System.Runtime.InteropServices;
 using System.Runtime.InteropServices;
+using Tizen.Multimedia;
 
 internal static partial class Interop
 {
 
 internal static partial class Interop
 {
-       internal static partial class MetadataExtractor
-       {
-               [DllImport(Libraries.MetadataExtractor, EntryPoint = "metadata_extractor_create")]
-               internal static extern int Create(out IntPtr handle);
-
-               [DllImport(Libraries.MetadataExtractor, EntryPoint = "metadata_extractor_set_path")]
-               internal static extern int SetPath(IntPtr handle, string path);
-
-               [DllImport(Libraries.MetadataExtractor, EntryPoint = "metadata_extractor_set_buffer")]
-               internal static extern int SetBuffer(IntPtr handle, IntPtr buffer, int size);
-
-               [DllImport(Libraries.MetadataExtractor, EntryPoint = "metadata_extractor_destroy")]
-               internal static extern int Destroy(IntPtr handle);
-
-               [DllImport(Libraries.MetadataExtractor, EntryPoint = "metadata_extractor_get_metadata")]
-               internal static extern int GetMetadata(IntPtr handle, int attribute, out string value);
-
-               [DllImport(Libraries.MetadataExtractor, EntryPoint = "metadata_extractor_get_artwork")]
-               internal static extern int GetArtwork(IntPtr handle, out IntPtr artwork, out int size, out string mimeType);
-
-               [DllImport(Libraries.MetadataExtractor, EntryPoint = "metadata_extractor_get_frame")]
-               internal static extern int GetFrame(IntPtr handle, out IntPtr frame, out int size);
-
-               [DllImport(Libraries.MetadataExtractor, EntryPoint = "metadata_extractor_get_synclyrics")]
-               internal static extern int GetSynclyrics(IntPtr handle, int index, out uint timeStamp, out string lyrics);
-
-               [DllImport(Libraries.MetadataExtractor, EntryPoint = "metadata_extractor_get_frame_at_time")]
-               internal static extern int GetFrameAtTime(IntPtr handle, uint timeStamp, bool isAccurate, out IntPtr frame, out int size);
-       }
+    internal static partial class MetadataExtractor
+    {
+        [DllImport(Libraries.MetadataExtractor, EntryPoint = "metadata_extractor_create")]
+        internal static extern MetadataExtractorError Create(out IntPtr handle);
+
+        [DllImport(Libraries.MetadataExtractor, EntryPoint = "metadata_extractor_set_path")]
+        internal static extern MetadataExtractorError SetPath(IntPtr handle, string path);
+
+        [DllImport(Libraries.MetadataExtractor, EntryPoint = "metadata_extractor_set_buffer")]
+        internal static extern MetadataExtractorError SetBuffer(IntPtr handle, IntPtr buffer, int size);
+
+        [DllImport(Libraries.MetadataExtractor, EntryPoint = "metadata_extractor_destroy")]
+        internal static extern MetadataExtractorError Destroy(IntPtr handle);
+
+        [DllImport(Libraries.MetadataExtractor, EntryPoint = "metadata_extractor_get_metadata")]
+        private static extern MetadataExtractorError GetMetadata(IntPtr handle, MetadataExtractorAttr attribute, out IntPtr value);
+
+        internal static string GetMetadata(IntPtr handle, MetadataExtractorAttr attr)
+        {
+            IntPtr valuePtr = IntPtr.Zero;
+
+            try
+            {
+                var ret = GetMetadata(handle, attr, out valuePtr);
+                MetadataExtractorRetValidator.ThrowIfError(ret, "Failed to get value for " + attr);
+                return Marshal.PtrToStringAnsi(valuePtr);
+            }
+            finally
+            {
+                Libc.Free(valuePtr);
+            }
+        }
+
+        [DllImport(Libraries.MetadataExtractor, EntryPoint = "metadata_extractor_get_artwork")]
+        internal static extern MetadataExtractorError GetArtwork(IntPtr handle, out IntPtr artwork,
+            out int size, out IntPtr mimeType);
+
+        [DllImport(Libraries.MetadataExtractor, EntryPoint = "metadata_extractor_get_frame")]
+        internal static extern MetadataExtractorError GetFrame(IntPtr handle, out IntPtr frame, out int size);
+
+        [DllImport(Libraries.MetadataExtractor, EntryPoint = "metadata_extractor_get_synclyrics")]
+        internal static extern MetadataExtractorError GetSynclyrics(IntPtr handle, int index,
+            out uint timeStamp, out IntPtr lyrics);
+
+        [DllImport(Libraries.MetadataExtractor, EntryPoint = "metadata_extractor_get_frame_at_time")]
+        internal static extern MetadataExtractorError GetFrameAtTime(IntPtr handle, uint timeStamp,
+            bool isAccurate, out IntPtr frame, out int size);
+    }
 }
 }
index edaed93..da76853 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);
 * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
 *
 * Licensed under the Apache License, Version 2.0 (the License);
 * limitations under the License.
 */
 
 * limitations under the License.
 */
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
 namespace Tizen.Multimedia
 namespace Tizen.Multimedia
-{\r
+{
     /// <summary>
     /// <summary>
-    /// This class provides properties of the artwork information of the given media
+    /// Represents artwork information of media.
     /// </summary>
     public class Artwork
     /// </summary>
     public class Artwork
-       {
-               internal Artwork(byte[] artworkData, string mimeType)
-               {
-            ArtworkData = artworkData;
-                       MimeType = mimeType;
-               }\r
+    {
         /// <summary>
         /// <summary>
-        /// The encoded artwork image
+        /// Initialize a new instance of the Artwork class with the specified data and mimeType.
         /// </summary>
         /// </summary>
-        public readonly byte[] ArtworkData;\r
-\r
+        public Artwork(byte[] data, string mimeType)
+        {
+            Data = data;
+            MimeType = mimeType;
+        }
+
+        /// <summary>
+        /// The encoded artwork image.
+        /// </summary>
+        public byte[] Data { get; }
+
         /// <summary>
         /// <summary>
-        /// The mime type of artwork
+        /// The mime type of artwork.
         /// </summary>
         /// </summary>
-        public readonly string MimeType;
-       }
+        public string MimeType { get; }
+    }
 }
 }
diff --git a/src/Tizen.Multimedia/MetadataExtractor/Frame.cs b/src/Tizen.Multimedia/MetadataExtractor/Frame.cs
deleted file mode 100755 (executable)
index e3a5b16..0000000
+++ /dev/null
@@ -1,43 +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.
-*/
-
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace Tizen.Multimedia
-{\r
-    /// <summary>
-    /// This class provides properties of the frame data of the given video file
-    /// </summary>
-    public class Frame
-       {
-               internal Frame(byte[] frameData)
-               {
-                       FrameData = frameData;
-               }
-        /// <summary>
-        /// The raw frame data
-        /// </summary>
-        /// <remarks>
-        /// Provided raw data is RGB888 format.
-        /// </remarks>
-               public readonly byte[] FrameData;
-       }
-}
index bf7a3d1..977e84c 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);
 * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
 *
 * Licensed under the Apache License, Version 2.0 (the License);
 * limitations under the License.
 */
 
 * limitations under the License.
 */
 
-
 using System;
 using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
+using System.Diagnostics;
+using static Interop.MetadataExtractor;
 
 namespace Tizen.Multimedia
 
 namespace Tizen.Multimedia
-{\r
+{
     /// <summary>
     /// <summary>
-    /// This class provides properties of the metadata information of the given media
+    /// Represents video metadata information.
     /// </summary>
     /// </summary>
-    public class Metadata
-       {
-               internal Metadata(MetadataBundle metadata)
-               {
-                       Duration = metadata.Duration;
-                       VideoBitrate = metadata.VideoBitrate;
-                       VideoFPS = metadata.VideoFPS;
-                       VideoWidth = metadata.VideoWidth;
-                       VideoHeight = metadata.VideoHeight;
-                       VideoStreamCount = metadata.Videostreamcount;
-                       AudioBitrate = metadata.AudioBitrate;
-                       AudioChannels = metadata.AudioChannels;
-                       AudioSamplerate = metadata.AudioSamplerate;
-                       AudioBitPerSample = metadata.Audiobitpersample;
-                       AudioStreamCount = metadata.Audiostreamcount;
-                       Artist = metadata.Artist;
-                       Title = metadata.Title;
-                       Album = metadata.Album;
-                       AlbumArtist = metadata.AlbumArtist;
-                       Genre = metadata.Genre;
-                       Author = metadata.Author;
-                       Copyright = metadata.Copyright;
-                       Date = metadata.Date;
-                       Description = metadata.Description;
-                       Comment = metadata.Comment;
-                       TrackNumber = metadata.Tracknumber;
-                       Classification = metadata.Classification;
-                       Rating = metadata.Rating;
-                       Longitude = metadata.Longitude;
-                       Latitude = metadata.Latitude;
-                       Altitude = metadata.Altitude;
-                       Conductor = metadata.Conductor;
-                       Unsynclyric = metadata.Unsynclyric;
-                       SyncLyricNumber = metadata.SyncLyricNumber;
-                       RecordingDate = metadata.Recordingdate;
-                       Rotate = metadata.Rotate;
-                       VideoCodec = metadata.VideoCodec;
-                       AudioCodec = metadata.AudioCodec;
-                       Content360 = metadata.content360;
-               }\r
+    public class VideoMetadata
+    {
+
+        protected VideoMetadata()
+        {
+        }
+
+        internal VideoMetadata(IntPtr handle)
+        {
+            Debug.Assert(handle != IntPtr.Zero);
+
+            StreamCount = GetMetadata(handle, MetadataExtractorAttr.VideoStreamCount);
+
+            if (StreamCount == null || (StreamCount != null && StreamCount.Equals("0") == false))
+            {
+                Bitrate = GetMetadata(handle, MetadataExtractorAttr.VideoBitrate);
+                Fps = GetMetadata(handle, MetadataExtractorAttr.VideoFps);
+                Width = GetMetadata(handle, MetadataExtractorAttr.VideoWidth);
+                Height = GetMetadata(handle, MetadataExtractorAttr.VideoHeight);
+                Codec = GetMetadata(handle, MetadataExtractorAttr.VideoCodec);
+            }
+
+            _description = new Lazy<string>(() => ObjectDescriptionBuilder.BuildWithProperties(this));
+        }
+
         /// <summary>
         /// <summary>
-        /// Duration
+        /// Gets the bitrate.
         /// </summary>
         /// </summary>
-        public readonly string Duration;
+        /// <value>A string representing the bitrate, or null if the information does not exists.</value>
+        public string Bitrate { get; }
+
         /// <summary>
         /// <summary>
-        /// Video bitrate
+        /// Gets the video FPS.
         /// </summary>
         /// </summary>
-               public readonly string VideoBitrate;
+        /// <value>A string representing the fps, or null if the information does not exists.</value>
+        public string Fps { get; }
+
+        /// <summary>
+        /// Gets the width of the video.
+        /// </summary>
+        /// <value>A string representing the width, or null if the information does not exists.</value>
+        public string Width { get; }
+
+        /// <summary>
+        /// Gets the height of the video.
+        /// </summary>
+        /// <value>A string representing the height, or null if the information does not exists.</value>
+        public string Height { get; }
+
+        /// <summary>
+        /// Get the codec type of the video.
+        /// </summary>
+        /// <value>A string representing the codec type, or null if the information does not exists.</value>
+        public string Codec { get; }
+
         /// <summary>
         /// <summary>
-        /// Video FPS
+        /// Gets the video stream count.
         /// </summary>
         /// </summary>
-               public readonly string VideoFPS;
+        /// <value>A string representing the video stream count, or null if the information does not exists.</value>
+        public string StreamCount { get; }
+
+        private Lazy<string> _description;
+
+        public override string ToString()
+        {
+            return _description.Value;
+        }
+
+    }
+
+    /// <summary>
+    /// Represents audio metadata information.
+    /// </summary>
+    public class AudioMetadata
+    {
+
+        protected AudioMetadata()
+        {
+        }
+
+        internal AudioMetadata(IntPtr handle)
+        {
+            Debug.Assert(handle != IntPtr.Zero);
+
+            StreamCount = GetMetadata(handle, MetadataExtractorAttr.AudioStreamCount);
+
+            if (StreamCount == null || (StreamCount != null && !StreamCount.Equals("0")))
+            {
+                Bitrate = GetMetadata(handle, MetadataExtractorAttr.AudioBitrate);
+                Channels = GetMetadata(handle, MetadataExtractorAttr.AudioChannels);
+                Samplerate = GetMetadata(handle, MetadataExtractorAttr.AudioSamplerate);
+                BitPerSample = GetMetadata(handle, MetadataExtractorAttr.AudioBitPerSample);
+                Codec = GetMetadata(handle, MetadataExtractorAttr.AudioCodec);
+            }
+
+            _description = new Lazy<string>(() => ObjectDescriptionBuilder.BuildWithProperties(this));
+        }
+
         /// <summary>
         /// <summary>
-        /// Video width
+        /// Gets the audio bitrate.
         /// </summary>
         /// </summary>
-               public readonly string VideoWidth;
+        /// <value>A string representing the bitrate, or null if the information does not exists.</value>
+        public string Bitrate { get; }
+
         /// <summary>
         /// <summary>
-        /// Video height
+        /// Gets the audio channels.
         /// </summary>
         /// </summary>
-               public readonly string VideoHeight;
+        /// <value>A string representing the audio channels, or null if the information does not exists.</value>
+        public string Channels { get; }
+
         /// <summary>
         /// <summary>
-        /// Video stream existence
+        /// Gets the audio sample rate.
         /// </summary>
         /// </summary>
-               public readonly string VideoStreamCount;
+        /// <value>A string representing the sample rate, or null if the information does not exists.</value>
+        public string Samplerate { get; }
+
         /// <summary>
         /// <summary>
-        /// Audio bitrate
+        /// Gets the bit per sample of the audio.
         /// </summary>
         /// </summary>
-               public readonly string AudioBitrate;
+        /// <value>A string representing the bit oer sample, or null if the information does not exists.</value>
+        public string BitPerSample { get; }
+
         /// <summary>
         /// <summary>
-        /// Audio channels
+        /// Gets the audio stream count.
         /// </summary>
         /// </summary>
-               public readonly string AudioChannels;
+        /// <value>A string representing the audio stream count, or null if the information does not exists.</value>
+        public string StreamCount { get; }
+
         /// <summary>
         /// <summary>
-        /// Audio samplerate
+        /// Audio codec type
         /// </summary>
         /// </summary>
-               public readonly string AudioSamplerate;
+        public string Codec { get; }
+
+        private Lazy<string> _description;
+
+        public override string ToString()
+        {
+            return _description.Value;
+        }
+    }
+
+    /// <summary>
+    /// Represents metadata information of a media.
+    /// </summary>
+    public class Metadata
+    {
+
+        protected Metadata()
+        {
+        }
+
+        internal Metadata(IntPtr handle)
+        {
+            Debug.Assert(handle != IntPtr.Zero);
+
+            Video = new VideoMetadata(handle);
+            Audio = new AudioMetadata(handle);
+
+            Duration = GetMetadata(handle, MetadataExtractorAttr.Duration);
+            Artist = GetMetadata(handle, MetadataExtractorAttr.Artist);
+            Title = GetMetadata(handle, MetadataExtractorAttr.Title);
+            Album = GetMetadata(handle, MetadataExtractorAttr.Album);
+            AlbumArtist = GetMetadata(handle, MetadataExtractorAttr.AlbumArtist);
+            Genre = GetMetadata(handle, MetadataExtractorAttr.Genre);
+            Author = GetMetadata(handle, MetadataExtractorAttr.Author);
+            Copyright = GetMetadata(handle, MetadataExtractorAttr.Copyright);
+            ReleaseDate = GetMetadata(handle, MetadataExtractorAttr.ReleaseDate);
+            Description = GetMetadata(handle, MetadataExtractorAttr.Description);
+            Comment = GetMetadata(handle, MetadataExtractorAttr.Comment);
+            TrackNumber = GetMetadata(handle, MetadataExtractorAttr.TrackNum);
+            Classification = GetMetadata(handle, MetadataExtractorAttr.Classification);
+            Rating = GetMetadata(handle, MetadataExtractorAttr.Rating);
+            Longitude = GetMetadata(handle, MetadataExtractorAttr.Longitude);
+            Latitude = GetMetadata(handle, MetadataExtractorAttr.Latitude);
+            Altitude = GetMetadata(handle, MetadataExtractorAttr.Altitude);
+            Conductor = GetMetadata(handle, MetadataExtractorAttr.Conductor);
+            UnsyncLyric = GetMetadata(handle, MetadataExtractorAttr.UnSyncLyrics);
+            SyncLyricCount = GetMetadata(handle, MetadataExtractorAttr.SyncLyricsNum);
+            RecordingDate = GetMetadata(handle, MetadataExtractorAttr.RecordingDate);
+            Rotation = GetMetadata(handle, MetadataExtractorAttr.Rotate);
+            Content360 = GetMetadata(handle, MetadataExtractorAttr.ContentFor360);
+
+            _description = new Lazy<string>(() => ObjectDescriptionBuilder.BuildWithProperties(this));
+        }
+
         /// <summary>
         /// <summary>
-        /// Audio bit per sample
+        /// Gets the duration of the media.
         /// </summary>
         /// </summary>
-               public readonly string AudioBitPerSample;
+        /// <value>A string representing the duration, or null if the information does not exists.</value>
+        public string Duration { get; }
+
         /// <summary>
         /// <summary>
-        /// Audio stream existence
+        /// Gets the video metadata.
         /// </summary>
         /// </summary>
-               public readonly string AudioStreamCount;
+        public VideoMetadata Video { get; }
+
         /// <summary>
         /// <summary>
-        /// Artist
+        /// Gets the audio metadata.
         /// </summary>
         /// </summary>
-               public readonly string Artist;
+        public AudioMetadata Audio { get; }
+
         /// <summary>
         /// <summary>
-        /// Title
+        /// Gets the artist of the media.
         /// </summary>
         /// </summary>
-               public readonly string Title;
+        /// <value>A string representing the artist, or null if the information does not exists.</value>
+        public string Artist { get; }
+
         /// <summary>
         /// <summary>
-        /// Album name
+        /// Gets the title of the media.
         /// </summary>
         /// </summary>
-               public readonly string Album;
+        /// <value>A string representing the title, or null if the information does not exists.</value>
+        public string Title { get; }
+
         /// <summary>
         /// <summary>
-        /// Album artist
+        /// Gets the album name of the media.
         /// </summary>
         /// </summary>
-               public readonly string AlbumArtist;
+        /// <value>A string representing the album name, or null if the information does not exists.</value>
+        public string Album { get; }
+
         /// <summary>
         /// <summary>
-        /// Genre
+        /// Gets the album artist of the media.
         /// </summary>
         /// </summary>
-               public readonly string Genre;
+        /// <value>A string representing the album artist, or null if the information does not exists.</value>
+        public string AlbumArtist { get; }
+
         /// <summary>
         /// <summary>
-        /// Author
+        /// Gets the genre of the media.
         /// </summary>
         /// </summary>
-               public readonly string Author;
+        /// <value>A string representing the genre, or null if the information does not exists.</value>
+        public string Genre { get; }
+
         /// <summary>
         /// <summary>
-        /// Copyright
+        /// Gets the author of the media.
         /// </summary>
         /// </summary>
-               public readonly string Copyright;
+        /// <value>A string representing the author, or null if the information does not exists.</value>
+        public string Author { get; }
+
         /// <summary>
         /// <summary>
-        /// Release date
+        /// Gets the copyright of the media.
         /// </summary>
         /// </summary>
-               public readonly string Date;
+        /// <value>A string representing the copyright, or null if the information does not exists.</value>
+        public string Copyright { get; }
+
         /// <summary>
         /// <summary>
-        /// Description
+        /// Gets the release date of the media.
         /// </summary>
         /// </summary>
-               public readonly string Description;
+        /// <value>A string representing the release date, or null if the information does not exists.</value>
+        public string ReleaseDate { get; }
+
         /// <summary>
         /// <summary>
-        /// Comment
+        /// Gets the description of the media.
         /// </summary>
         /// </summary>
-               public readonly string Comment;
+        /// <value>A string representing the description, or null if the information does not exists.</value>
+        public string Description { get; }
+
         /// <summary>
         /// <summary>
-        /// Track number information
+        /// Gets the comment of the media.
         /// </summary>
         /// </summary>
-               public readonly string TrackNumber;
+        /// <value>A string representing the comment, or null if the information does not exists.</value>
+        public string Comment { get; }
+
         /// <summary>
         /// <summary>
-        /// Classification
+        /// Gets the track number of the media.
         /// </summary>
         /// </summary>
-               public readonly string Classification;
+        /// <value>A string representing the track number, or null if the information does not exists.</value>
+        public string TrackNumber { get; }
+
         /// <summary>
         /// <summary>
-        /// Rating
+        /// Gets the classification of the media.
         /// </summary>
         /// </summary>
-               public readonly string Rating;
+        /// <value>A string representing the classification, or null if the information does not exists.</value>
+        public string Classification { get; }
+
         /// <summary>
         /// <summary>
-        /// Longitude
+        /// Gets the rating of the media.
         /// </summary>
         /// </summary>
-               public readonly string Longitude;
+        /// <value>A string representing the rating, or null if the information does not exists.</value>
+        public string Rating { get; }
+
         /// <summary>
         /// <summary>
-        /// Latitude
+        /// Gets the longitude of the media.
         /// </summary>
         /// </summary>
-               public readonly string Latitude;
+        /// <value>A string representing the longitude, or null if the information does not exists.</value>
+        public string Longitude { get; }
+
         /// <summary>
         /// <summary>
-        /// Altitude
+        /// Gets the latitude of the media.
         /// </summary>
         /// </summary>
-               public readonly string Altitude;
+        /// <value>A string representing the latitude, or null if the information does not exists.</value>
+        public string Latitude { get; }
+
         /// <summary>
         /// <summary>
-        /// Conductor
+        /// Gets the altitude of the media.
         /// </summary>
         /// </summary>
-               public readonly string Conductor;
+        /// <value>A string representing the altitude, or null if the information does not exists.</value>
+        public string Altitude { get; }
+
         /// <summary>
         /// <summary>
-        /// Unsynchronized lyrics
+        /// Gets the conductor of the media.
         /// </summary>
         /// </summary>
-               public readonly string Unsynclyric;
+        /// <value>A string representing the conductor, or null if the information does not exists.</value>
+        public string Conductor { get; }
+
         /// <summary>
         /// <summary>
-        /// Synchronized lyrics number
+        /// Gets the unsynchronized lyrics of the media.
         /// </summary>
         /// </summary>
-               public readonly string SyncLyricNumber;
+        /// <value>A string representing the unsynchronized lyrics, or null if the information does not exists.</value>
+        public string UnsyncLyric { get; }
+
         /// <summary>
         /// <summary>
-        /// Recording date
+        /// Gets the number of synchronized lyrics of the media.
         /// </summary>
         /// </summary>
-               public readonly string RecordingDate;
+        /// <value>A string representing the number of the synchronized lyrics, or null if the information does not exists.</value>
+        public string SyncLyricCount { get; }
+
         /// <summary>
         /// <summary>
-        /// Rotate(orientation) information
+        /// Gets the recording date of the media.
         /// </summary>
         /// </summary>
-               public readonly string Rotate;
+        /// <value>A string representing the recording date, or null if the information does not exists.</value>
+        public string RecordingDate { get; }
+
         /// <summary>
         /// <summary>
-        /// Video codec type
+        /// Gets the rotate(orientation) information of the media.
         /// </summary>
         /// </summary>
-               public readonly string VideoCodec;
+        /// <value>A string representing the rotation information, or null if the information does not exists.</value>
+        public string Rotation { get; }
+
         /// <summary>
         /// <summary>
-        /// Audio codec type
+        /// Gets the information for 360 content of the media.
         /// </summary>
         /// </summary>
-               public readonly string AudioCodec;
-        /// <summary>
-        /// 360 content information
-        /// </summary>
-               public readonly string Content360;
-       }
-
-       internal class MetadataBundle
-       {
-               internal string Duration;
-               internal string VideoBitrate;
-               internal string VideoFPS;
-               internal string VideoWidth;
-               internal string VideoHeight;
-               internal string Videostreamcount;
-               internal string AudioBitrate;
-               internal string AudioChannels;
-               internal string AudioSamplerate;
-               internal string Audiobitpersample;
-               internal string Audiostreamcount;
-               internal string Artist;
-               internal string Title;
-               internal string Album;
-               internal string AlbumArtist;
-               internal string Genre;
-               internal string Author;
-               internal string Copyright;
-               internal string Date;
-               internal string Description;
-               internal string Comment;
-               internal string Tracknumber;
-               internal string Classification;
-               internal string Rating;
-               internal string Longitude;
-               internal string Latitude;
-               internal string Altitude;
-               internal string Conductor;
-               internal string Unsynclyric;
-               internal string SyncLyricNumber;
-               internal string Recordingdate;
-               internal string Rotate;
-               internal string VideoCodec;
-               internal string AudioCodec;
-               internal string content360;
-       }
+        /// <value>A string representing the information for 360 content, or null if the information does not exists.</value>
+        public string Content360 { get; }
+
+        private Lazy<string> _description;
+
+        public override string ToString()
+        {
+            return _description.Value;
+        }
+    }
 }
 }
diff --git a/src/Tizen.Multimedia/MetadataExtractor/MetadataEnums.cs b/src/Tizen.Multimedia/MetadataExtractor/MetadataEnums.cs
deleted file mode 100755 (executable)
index 0b6d955..0000000
+++ /dev/null
@@ -1,60 +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.
-*/
-
-
-using System;
-
-namespace Tizen.Multimedia
-{
-       public enum MetadataExtractorAttr
-       {
-               METADATA_DURATION,              //Duration
-               METADATA_VIDEO_BITRATE,                 //VideoBitrate
-               METADATA_VIDEO_FPS,                             //VideoFPS
-               METADATA_VIDEO_WIDTH,                   //VideoWidth
-               METADATA_VIDEO_HEIGHT,                  //VideoHeight
-               METADATA_HAS_VIDEO,                             //Videostreamcount
-               METADATA_AUDIO_BITRATE,                 //AudioBitrate
-               METADATA_AUDIO_CHANNELS,                //AudioChannels
-               METADATA_AUDIO_SAMPLERATE,              //AudioSamplerate
-               METADATA_AUDIO_BITPERSAMPLE,            //Audiobitpersample
-               METADATA_HAS_AUDIO,                             //Audiostreamcount
-               METADATA_ARTIST,                                        //Artist
-               METADATA_TITLE,                                 //Title
-               METADATA_ALBUM,                                 //Album
-               METADATA_ALBUM_ARTIST,                  //Album_Artist
-               METADATA_GENRE,                                 //Genre
-               METADATA_AUTHOR,                                        //Author
-               METADATA_COPYRIGHT,                             //Copyright
-               METADATA_DATE,                                  //Date
-               METADATA_DESCRIPTION,                           //Description
-               METADATA_COMMENT,                               //Comment
-               METADATA_TRACK_NUM,                             //Tracknumberinfo
-               METADATA_CLASSIFICATION,                        //Classification
-               METADATA_RATING,                                        //Rating
-               METADATA_LONGITUDE,                             //Longitude
-               METADATA_LATITUDE,                              //Latitude
-               METADATA_ALTITUDE,                              //Altitude
-               METADATA_CONDUCTOR,                             //Conductor
-               METADATA_UNSYNCLYRICS,                  //Unsynchronizedlyric
-               METADATA_SYNCLYRICS_NUM,                //Synchronizedlyric(time/lyricset)number
-               METADATA_RECDATE,                               //Recordingdate
-               METADATA_ROTATE,                                        //Rotate(Orientation)Information
-               METADATA_VIDEO_CODEC,                   //VideoCodec
-               METADATA_AUDIO_CODEC,                   //AudioCodec
-               METADATA_360,                                           //360contentInformation
-       }
-}
index 70e3e01..17b8021 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);
 * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
 *
 * Licensed under the Apache License, Version 2.0 (the License);
 * limitations under the License.
 */
 
 * limitations under the License.
 */
 
-
 using System;
 using System;
-using System.Threading.Tasks;
 using System.Runtime.InteropServices;
 
 namespace Tizen.Multimedia
 {
 using System.Runtime.InteropServices;
 
 namespace Tizen.Multimedia
 {
-       static internal class MetadataExtractorLog
-       {
-               internal const string LogTag = "Tizen.Multimedia.MetadataExtractor";
-       }
-       /// <summary>
-       /// The Metadata extractor class provides a set of functions to get the metadata of the input media file
-       /// </summary>
-       public class MetadataExtractor : IDisposable
-       {
-               private bool _disposed = false;
-               internal IntPtr _handle = IntPtr.Zero;
-               /// <summary>
-               /// Metadata extractor constructor
-               /// </summary>
-               /// <param name="path"> the path to extract metadata </param>
-               public MetadataExtractor(string path)
-               {
-                       int ret;
-
-                       if (path == null)
-                       {
-                               Log.Error(MetadataExtractorLog.LogTag, "Path is NULL");
-                               MetadataExtractorErrorFactory.ThrowException((int)MetadataExtractorError.InvalidParameter, "Path is NULL");
-                       }
-                       else
-                       {
-                               ret = Interop.MetadataExtractor.Create(out _handle);
-                               if (ret != (int)MetadataExtractorError.None)
-                               {
-                                       Log.Error(MetadataExtractorLog.LogTag, "Failed to create metadata" + (MetadataExtractorError)ret);
-                                       MetadataExtractorErrorFactory.ThrowException(ret, "Failed to create metadata");
-                               }
-                               ret = Interop.MetadataExtractor.SetPath(_handle, path);
-                               if (ret != (int)MetadataExtractorError.None)
-                               {
-                                       Log.Error(MetadataExtractorLog.LogTag, "Failed to set path" + (MetadataExtractorError)ret);
-                                       MetadataExtractorErrorFactory.ThrowException(ret, "Failed to set path");
-                               }
-                       }
-               }
-               /// <summary>
-               /// Metadata extractor constructor
-               /// </summary>
-               /// <param name="buffer"> the buffer to extract metadata </param>
-               public MetadataExtractor(byte[] buffer)
-               {
-                       int ret;
-
-                       if (buffer == null || buffer.Length == 0)
-                       {
-                               Log.Error(MetadataExtractorLog.LogTag, "buffer is null");
-                               MetadataExtractorErrorFactory.ThrowException((int)MetadataExtractorError.InvalidParameter, "buffer is null");
-                       }
-                       else
+    static internal class MetadataExtractorLog
+    {
+        internal const string Tag = "Tizen.Multimedia.MetadataExtractor";
+    }
+
+    /// <summary>
+    /// Provides a set of functions to get the metadata from a media file.
+    /// </summary>
+    public class MetadataExtractor : IDisposable
+    {
+        private bool _disposed = false;
+        private IntPtr _handle = IntPtr.Zero;
+        private IntPtr _buffer = IntPtr.Zero;
+
+        private void Create(Func<MetadataExtractorError> initFunc)
+        {
+            MetadataExtractorRetValidator.ThrowIfError(
+                Interop.MetadataExtractor.Create(out _handle), "Failed to create metadata");
+
+            try
+            {
+                MetadataExtractorRetValidator.ThrowIfError(initFunc(), "Failed to init");
+
+                _metadata = new Lazy<Metadata>(() => new Metadata(Handle));
+            }
+            catch
+            {
+                Release();
+                throw;
+            }
+        }
+
+        /// <summary>
+        /// Initialize a new instance of the MetadataExtractor class with the specified path.
+        /// </summary>
+        /// <param name="path">The path for the file to extract metadata.</param>
+        /// <exception cref="ArgumentNullException"><paramref name="path"/> is null.</exception>
+        public MetadataExtractor(string path)
+        {
+            if (path == null)
+            {
+                throw new ArgumentNullException(nameof(path));
+            }
+
+            Create(()=> Interop.MetadataExtractor.SetPath(_handle, path));
+        }
+
+        /// <summary>
+        /// Initialize a new instance of the MetadataExtractor class with the specified buffer.
+        /// </summary>
+        /// <param name="buffer">The buffer to extract metadata.</param>
+        /// <exception cref="ArgumentNullException"><paramref name="buffer"/> is null.</exception>
+        /// <exception cref="ArgumentException">The length of <paramref name="buffer"/> is zero.</exception>
+        public MetadataExtractor(byte[] buffer)
+        {
+            if (buffer == null)
+            {
+                throw new ArgumentNullException(nameof(buffer));
+            }
+
+            if (buffer.Length == 0)
+            {
+                throw new ArgumentException("buffer length is zero.", nameof(buffer));
+            }
+
+            _buffer = Marshal.AllocHGlobal(buffer.Length);
+            Marshal.Copy(buffer, 0, _buffer, buffer.Length);
+
+            Create(() => Interop.MetadataExtractor.SetBuffer(_handle, _buffer, buffer.Length));
+        }
+
+        private IntPtr Handle
+        {
+            get
+            {
+                if (_disposed)
+                {
+                    throw new ObjectDisposedException(nameof(MetadataExtractor));
+                }
+
+                return _handle;
+            }
+        }
+
+        private Lazy<Metadata> _metadata;
+
+        /// <summary>
+        /// Retrieves the <see cref="Metadata"/>.
+        /// </summary>
+        /// <returns>A <see cref="Metadata"/> for the give source.</returns>
+        /// <exception cref="InvalidOperationException">Internal process error is occurred.</exception>
+        /// <exception cref="ObjectDisposedException">The <see cref="MetadataExtractor"/> has been already disposed of.</exception>
+        public Metadata GetMetadata()
+        {
+            if (_disposed)
+            {
+                throw new ObjectDisposedException(nameof(MetadataExtractor));
+            }
+
+            return _metadata.Value;
+        }
+
+        /// <summary>
+        /// Gets the artwork image in the source.
+        /// </summary>
+        /// <returns>A <see cref="Artwork"/> if it exists, otherwise null.</returns>
+        /// <exception cref="InvalidOperationException">Internal process error is occurred.</exception>
+        /// <exception cref="ObjectDisposedException">The <see cref="MetadataExtractor"/> has been already disposed of.</exception>
+        public Artwork GetArtwork()
+        {
+            IntPtr data = IntPtr.Zero;
+            IntPtr mimeType = IntPtr.Zero;
+
+            try
+            {
+                int size = 0;
+
+                var ret = Interop.MetadataExtractor.GetArtwork(Handle, out data, out size, out mimeType);
+                MetadataExtractorRetValidator.ThrowIfError(ret, "Failed to get value");
+
+                if (size > 0)
+                {
+                    var buf = new byte[size];
+                    Marshal.Copy(data, buf, 0, size);
+
+                    return new Artwork(buf, Marshal.PtrToStringAnsi(mimeType));
+                }
+
+                return null;
+            }
+            finally
+            {
+                Interop.Libc.Free(data);
+                Interop.Libc.Free(mimeType);
+            }
+        }
+
+        /// <summary>
+        /// Gets the sync lyrics of the source.
+        /// </summary>
+        /// <param name="index">The index of lyrics to retrieve.</param>
+        /// <returns>A <see cref="SyncLyrics"/> object if <paramref name="index"/> is valid, otherwise null.</returns>
+        /// <exception cref="InvalidOperationException">Internal process error is occurred.</exception>
+        /// <exception cref="ObjectDisposedException">The <see cref="MetadataExtractor"/> has been already disposed of.</exception>
+        public SyncLyrics GetSyncLyrics(int index)
+        {
+            IntPtr lyrics = IntPtr.Zero;
+
+            try
+            {
+                uint timestamp = 0;
+
+                var ret = Interop.MetadataExtractor.GetSynclyrics(Handle, index, out timestamp, out lyrics);
+                MetadataExtractorRetValidator.ThrowIfError(ret, "Failed to get sync lyrics");
+
+                if (lyrics == IntPtr.Zero)
+                {
+                    return null;
+                }
+
+                return new SyncLyrics(Marshal.PtrToStringAnsi(lyrics), timestamp);
+            }
+            finally
+            {
+                Interop.Libc.Free(lyrics);
+            }
+        }
+
+        /// <summary>
+        /// Gets the frame of a video media.
+        /// </summary>
+        /// <returns>The raw thumbnail data in RGB888 if it exists, otherwise null.</returns>
+        /// <exception cref="InvalidOperationException">Internal process error is occurred.</exception>
+        /// <exception cref="ObjectDisposedException">The <see cref="MetadataExtractor"/> has been already disposed of.</exception>
+        public byte[] GetVideoThumbnail()
+        {
+            IntPtr data = IntPtr.Zero;
+
+            try
+            {
+                int size = 0;
+
+                var ret = Interop.MetadataExtractor.GetFrame(Handle, out data, out size);
+                MetadataExtractorRetValidator.ThrowIfError(ret, "Failed to get value");
+
+                if (size == 0)
+                {
+                    return null;
+                }
+
+                var buf = new byte[size];
+                Marshal.Copy(data, buf, 0, size);
+
+                return buf;
+            }
+            finally
             {
             {
-                int size = buffer.Length;
-                IntPtr buf = Marshal.AllocHGlobal(size);
-                Marshal.Copy(buffer, 0, buf, size);
-
-                               ret = Interop.MetadataExtractor.Create(out _handle);
-                               if (ret != (int)MetadataExtractorError.None)
-                               {
-                                       Log.Error(MetadataExtractorLog.LogTag, "Failed to create metadata" + (MetadataExtractorError)ret);
-                                       MetadataExtractorErrorFactory.ThrowException(ret, "Failed to create metadata");
-                               }
-
-                               ret = Interop.MetadataExtractor.SetBuffer(_handle, buf, size);
-                               if (ret != (int)MetadataExtractorError.None)
-                               {
-                                       Log.Error(MetadataExtractorLog.LogTag, "Failed to set buffer" + (MetadataExtractorError)ret);
-                                       MetadataExtractorErrorFactory.ThrowException(ret, "Failed to set buffer");
-                               }
-                       }
-                       
-               }
-               /// <summary>
-               /// Gets metadata
-               /// </summary>
-               /// <value> Metadata object </value>
-               /// <exception cref="InvalidOperationException"> When internal process error is occured</exception>
-               public Metadata GetMetadata()
-               {
-                       int ret;
-                       Metadata _metadata;
-                       MetadataBundle _metaBundle = new MetadataBundle();
-
-                       ret = Interop.MetadataExtractor.GetMetadata(_handle, (int)MetadataExtractorAttr.METADATA_DURATION, out _metaBundle.Duration);
-                       if (ret != (int)MetadataExtractorError.None)
-                       {
-                               Log.Error(MetadataExtractorLog.LogTag, "Failed to get value" + (MetadataExtractorError)ret);
-                               MetadataExtractorErrorFactory.ThrowException(ret, "Failed to get value");
-                       }
-                       ret = Interop.MetadataExtractor.GetMetadata(_handle, (int)MetadataExtractorAttr.METADATA_HAS_VIDEO, out _metaBundle.Videostreamcount);
-                       if (ret != (int)MetadataExtractorError.None)
-                       {
-                               Log.Error(MetadataExtractorLog.LogTag, "Failed to get value" + (MetadataExtractorError)ret);
-                               MetadataExtractorErrorFactory.ThrowException(ret, "Failed to get value");
-                       }
-                       if (_metaBundle.Videostreamcount == null || (_metaBundle.Videostreamcount != null && !_metaBundle.Videostreamcount.Equals("0")))
-                       {
-                               ret = Interop.MetadataExtractor.GetMetadata(_handle, (int)MetadataExtractorAttr.METADATA_VIDEO_BITRATE, out _metaBundle.VideoBitrate);
-                               if (ret != (int)MetadataExtractorError.None)
-                               {
-                                       Log.Error(MetadataExtractorLog.LogTag, "Failed to get value" + (MetadataExtractorError)ret);
-                                       MetadataExtractorErrorFactory.ThrowException(ret, "Failed to get value");
-                               }
-                               ret = Interop.MetadataExtractor.GetMetadata(_handle, (int)MetadataExtractorAttr.METADATA_VIDEO_FPS, out _metaBundle.VideoFPS);
-                               if (ret != (int)MetadataExtractorError.None)
-                               {
-                                       Log.Error(MetadataExtractorLog.LogTag, "Failed to get value" + (MetadataExtractorError)ret);
-                                       MetadataExtractorErrorFactory.ThrowException(ret, "Failed to get value");
-                               }
-                               ret = Interop.MetadataExtractor.GetMetadata(_handle, (int)MetadataExtractorAttr.METADATA_VIDEO_WIDTH, out _metaBundle.VideoWidth);
-                               if (ret != (int)MetadataExtractorError.None)
-                               {
-                                       Log.Error(MetadataExtractorLog.LogTag, "Failed to get value" + (MetadataExtractorError)ret);
-                                       MetadataExtractorErrorFactory.ThrowException(ret, "Failed to get value");
-                               }
-                               ret = Interop.MetadataExtractor.GetMetadata(_handle, (int)MetadataExtractorAttr.METADATA_VIDEO_HEIGHT, out _metaBundle.VideoHeight);
-                               if (ret != (int)MetadataExtractorError.None)
-                               {
-                                       Log.Error(MetadataExtractorLog.LogTag, "Failed to get value" + (MetadataExtractorError)ret);
-                                       MetadataExtractorErrorFactory.ThrowException(ret, "Failed to get value");
-                               }
-                               ret = Interop.MetadataExtractor.GetMetadata(_handle, (int)MetadataExtractorAttr.METADATA_VIDEO_CODEC, out _metaBundle.VideoCodec);
-                               if (ret != (int)MetadataExtractorError.None)
-                               {
-                                       Log.Error(MetadataExtractorLog.LogTag, "Failed to get value" + (MetadataExtractorError)ret);
-                                       MetadataExtractorErrorFactory.ThrowException(ret, "Failed to get value");
-                               }
-                       }
-
-                       ret = Interop.MetadataExtractor.GetMetadata(_handle, (int)MetadataExtractorAttr.METADATA_HAS_AUDIO, out _metaBundle.Audiostreamcount);
-                       if (ret != (int)MetadataExtractorError.None)
-                       {
-                               Log.Error(MetadataExtractorLog.LogTag, "Failed to get value" + (MetadataExtractorError)ret);
-                               MetadataExtractorErrorFactory.ThrowException(ret, "Failed to get value");
-                       }
-                       if (_metaBundle.Audiostreamcount == null || (_metaBundle.Audiostreamcount != null && !_metaBundle.Audiostreamcount.Equals("0")))
-                       {
-                               ret = Interop.MetadataExtractor.GetMetadata(_handle, (int)MetadataExtractorAttr.METADATA_AUDIO_BITRATE, out _metaBundle.AudioBitrate);
-                               if (ret != (int)MetadataExtractorError.None)
-                               {
-                                       Log.Error(MetadataExtractorLog.LogTag, "Failed to get value" + (MetadataExtractorError)ret);
-                                       MetadataExtractorErrorFactory.ThrowException(ret, "Failed to get value");
-                               }
-                               ret = Interop.MetadataExtractor.GetMetadata(_handle, (int)MetadataExtractorAttr.METADATA_AUDIO_CHANNELS, out _metaBundle.AudioChannels);
-                               if (ret != (int)MetadataExtractorError.None)
-                               {
-                                       Log.Error(MetadataExtractorLog.LogTag, "Failed to get value" + (MetadataExtractorError)ret);
-                                       MetadataExtractorErrorFactory.ThrowException(ret, "Failed to get value");
-                               }
-                               ret = Interop.MetadataExtractor.GetMetadata(_handle, (int)MetadataExtractorAttr.METADATA_AUDIO_SAMPLERATE, out _metaBundle.AudioSamplerate);
-                               if (ret != (int)MetadataExtractorError.None)
-                               {
-                                       Log.Error(MetadataExtractorLog.LogTag, "Failed to get value" + (MetadataExtractorError)ret);
-                                       MetadataExtractorErrorFactory.ThrowException(ret, "Failed to get value");
-                               }
-                               ret = Interop.MetadataExtractor.GetMetadata(_handle, (int)MetadataExtractorAttr.METADATA_AUDIO_BITPERSAMPLE, out _metaBundle.Audiobitpersample);
-                               if (ret != (int)MetadataExtractorError.None)
-                               {
-                                       Log.Error(MetadataExtractorLog.LogTag, "Failed to get value" + (MetadataExtractorError)ret);
-                                       MetadataExtractorErrorFactory.ThrowException(ret, "Failed to get value");
-                               }
-                               ret = Interop.MetadataExtractor.GetMetadata(_handle, (int)MetadataExtractorAttr.METADATA_AUDIO_CODEC, out _metaBundle.AudioCodec);
-                               if (ret != (int)MetadataExtractorError.None)
-                               {
-                                       Log.Error(MetadataExtractorLog.LogTag, "Failed to get value" + (MetadataExtractorError)ret);
-                                       MetadataExtractorErrorFactory.ThrowException(ret, "Failed to get value");
-                               }
-                       }
-
-                       ret = Interop.MetadataExtractor.GetMetadata(_handle, (int)MetadataExtractorAttr.METADATA_ARTIST, out _metaBundle.Artist);
-                       if (ret != (int)MetadataExtractorError.None)
-                       {
-                               Log.Error(MetadataExtractorLog.LogTag, "Failed to get value" + (MetadataExtractorError)ret);
-                               MetadataExtractorErrorFactory.ThrowException(ret, "Failed to get value");
-                       }
-                       ret = Interop.MetadataExtractor.GetMetadata(_handle, (int)MetadataExtractorAttr.METADATA_TITLE, out _metaBundle.Title);
-                       if (ret != (int)MetadataExtractorError.None)
-                       {
-                               Log.Error(MetadataExtractorLog.LogTag, "Failed to get value" + (MetadataExtractorError)ret);
-                               MetadataExtractorErrorFactory.ThrowException(ret, "Failed to get value");
-                       }
-                       ret = Interop.MetadataExtractor.GetMetadata(_handle, (int)MetadataExtractorAttr.METADATA_ALBUM, out _metaBundle.Album);
-                       if (ret != (int)MetadataExtractorError.None)
-                       {
-                               Log.Error(MetadataExtractorLog.LogTag, "Failed to get value" + (MetadataExtractorError)ret);
-                               MetadataExtractorErrorFactory.ThrowException(ret, "Failed to get value");
-                       }
-                       ret = Interop.MetadataExtractor.GetMetadata(_handle, (int)MetadataExtractorAttr.METADATA_ALBUM_ARTIST, out _metaBundle.AlbumArtist);
-                       if (ret != (int)MetadataExtractorError.None)
-                       {
-                               Log.Error(MetadataExtractorLog.LogTag, "Failed to get value" + (MetadataExtractorError)ret);
-                               MetadataExtractorErrorFactory.ThrowException(ret, "Failed to get value");
-                       }
-                       ret = Interop.MetadataExtractor.GetMetadata(_handle, (int)MetadataExtractorAttr.METADATA_GENRE, out _metaBundle.Genre);
-                       if (ret != (int)MetadataExtractorError.None)
-                       {
-                               Log.Error(MetadataExtractorLog.LogTag, "Failed to get value" + (MetadataExtractorError)ret);
-                               MetadataExtractorErrorFactory.ThrowException(ret, "Failed to get value");
-                       }
-                       ret = Interop.MetadataExtractor.GetMetadata(_handle, (int)MetadataExtractorAttr.METADATA_AUTHOR, out _metaBundle.Author);
-                       if (ret != (int)MetadataExtractorError.None)
-                       {
-                               Log.Error(MetadataExtractorLog.LogTag, "Failed to get value" + (MetadataExtractorError)ret);
-                               MetadataExtractorErrorFactory.ThrowException(ret, "Failed to get value");
-                       }
-                       ret = Interop.MetadataExtractor.GetMetadata(_handle, (int)MetadataExtractorAttr.METADATA_COPYRIGHT, out _metaBundle.Copyright);
-                       if (ret != (int)MetadataExtractorError.None)
-                       {
-                               Log.Error(MetadataExtractorLog.LogTag, "Failed to get value" + (MetadataExtractorError)ret);
-                               MetadataExtractorErrorFactory.ThrowException(ret, "Failed to get value");
-                       }
-                       ret = Interop.MetadataExtractor.GetMetadata(_handle, (int)MetadataExtractorAttr.METADATA_DATE, out _metaBundle.Date);
-                       if (ret != (int)MetadataExtractorError.None)
-                       {
-                               Log.Error(MetadataExtractorLog.LogTag, "Failed to get value" + (MetadataExtractorError)ret);
-                               MetadataExtractorErrorFactory.ThrowException(ret, "Failed to get value");
-                       }
-                       ret = Interop.MetadataExtractor.GetMetadata(_handle, (int)MetadataExtractorAttr.METADATA_DESCRIPTION, out _metaBundle.Description);
-                       if (ret != (int)MetadataExtractorError.None)
-                       {
-                               Log.Error(MetadataExtractorLog.LogTag, "Failed to get value" + (MetadataExtractorError)ret);
-                               MetadataExtractorErrorFactory.ThrowException(ret, "Failed to get value");
-                       }
-                       ret = Interop.MetadataExtractor.GetMetadata(_handle, (int)MetadataExtractorAttr.METADATA_COMMENT, out _metaBundle.Comment);
-                       if (ret != (int)MetadataExtractorError.None)
-                       {
-                               Log.Error(MetadataExtractorLog.LogTag, "Failed to get value" + (MetadataExtractorError)ret);
-                               MetadataExtractorErrorFactory.ThrowException(ret, "Failed to get value");
-                       }
-                       ret = Interop.MetadataExtractor.GetMetadata(_handle, (int)MetadataExtractorAttr.METADATA_TRACK_NUM, out _metaBundle.Tracknumber);
-                       if (ret != (int)MetadataExtractorError.None)
-                       {
-                               Log.Error(MetadataExtractorLog.LogTag, "Failed to get value" + (MetadataExtractorError)ret);
-                               MetadataExtractorErrorFactory.ThrowException(ret, "Failed to get value");
-                       }
-                       ret = Interop.MetadataExtractor.GetMetadata(_handle, (int)MetadataExtractorAttr.METADATA_CLASSIFICATION, out _metaBundle.Classification);
-                       if (ret != (int)MetadataExtractorError.None)
-                       {
-                               Log.Error(MetadataExtractorLog.LogTag, "Failed to get value" + (MetadataExtractorError)ret);
-                               MetadataExtractorErrorFactory.ThrowException(ret, "Failed to get value");
-                       }
-                       ret = Interop.MetadataExtractor.GetMetadata(_handle, (int)MetadataExtractorAttr.METADATA_RATING, out _metaBundle.Rating);
-                       if (ret != (int)MetadataExtractorError.None)
-                       {
-                               Log.Error(MetadataExtractorLog.LogTag, "Failed to get value" + (MetadataExtractorError)ret);
-                               MetadataExtractorErrorFactory.ThrowException(ret, "Failed to get value");
-                       }
-                       ret = Interop.MetadataExtractor.GetMetadata(_handle, (int)MetadataExtractorAttr.METADATA_LONGITUDE, out _metaBundle.Longitude);
-                       if (ret != (int)MetadataExtractorError.None)
-                       {
-                               Log.Error(MetadataExtractorLog.LogTag, "Failed to get value" + (MetadataExtractorError)ret);
-                               MetadataExtractorErrorFactory.ThrowException(ret, "Failed to get value");
-                       }
-                       ret = Interop.MetadataExtractor.GetMetadata(_handle, (int)MetadataExtractorAttr.METADATA_LATITUDE, out _metaBundle.Latitude);
-                       if (ret != (int)MetadataExtractorError.None)
-                       {
-                               Log.Error(MetadataExtractorLog.LogTag, "Failed to get value" + (MetadataExtractorError)ret);
-                               MetadataExtractorErrorFactory.ThrowException(ret, "Failed to get value");
-                       }
-                       ret = Interop.MetadataExtractor.GetMetadata(_handle, (int)MetadataExtractorAttr.METADATA_ALTITUDE, out _metaBundle.Altitude);
-                       if (ret != (int)MetadataExtractorError.None)
-                       {
-                               Log.Error(MetadataExtractorLog.LogTag, "Failed to get value" + (MetadataExtractorError)ret);
-                               MetadataExtractorErrorFactory.ThrowException(ret, "Failed to get value");
-                       }
-                       ret = Interop.MetadataExtractor.GetMetadata(_handle, (int)MetadataExtractorAttr.METADATA_CONDUCTOR, out _metaBundle.Conductor);
-                       if (ret != (int)MetadataExtractorError.None)
-                       {
-                               Log.Error(MetadataExtractorLog.LogTag, "Failed to get value" + (MetadataExtractorError)ret);
-                               MetadataExtractorErrorFactory.ThrowException(ret, "Failed to get value");
-                       }
-                       ret = Interop.MetadataExtractor.GetMetadata(_handle, (int)MetadataExtractorAttr.METADATA_UNSYNCLYRICS, out _metaBundle.Unsynclyric);
-                       if (ret != (int)MetadataExtractorError.None)
-                       {
-                               Log.Error(MetadataExtractorLog.LogTag, "Failed to get value" + (MetadataExtractorError)ret);
-                               MetadataExtractorErrorFactory.ThrowException(ret, "Failed to get value");
-                       }
-                       ret = Interop.MetadataExtractor.GetMetadata(_handle, (int)MetadataExtractorAttr.METADATA_SYNCLYRICS_NUM, out _metaBundle.SyncLyricNumber);
-                       if (ret != (int)MetadataExtractorError.None)
-                       {
-                               Log.Error(MetadataExtractorLog.LogTag, "Failed to get value" + (MetadataExtractorError)ret);
-                               MetadataExtractorErrorFactory.ThrowException(ret, "Failed to get value");
-                       }
-                       ret = Interop.MetadataExtractor.GetMetadata(_handle, (int)MetadataExtractorAttr.METADATA_RECDATE, out _metaBundle.Recordingdate);
-                       if (ret != (int)MetadataExtractorError.None)
-                       {
-                               Log.Error(MetadataExtractorLog.LogTag, "Failed to get value" + (MetadataExtractorError)ret);
-                               MetadataExtractorErrorFactory.ThrowException(ret, "Failed to get value");
-                       }
-                       ret = Interop.MetadataExtractor.GetMetadata(_handle, (int)MetadataExtractorAttr.METADATA_ROTATE, out _metaBundle.Rotate);
-                       if (ret != (int)MetadataExtractorError.None)
-                       {
-                               Log.Error(MetadataExtractorLog.LogTag, "Failed to get value" + (MetadataExtractorError)ret);
-                               MetadataExtractorErrorFactory.ThrowException(ret, "Failed to get value");
-                       }
-                       ret = Interop.MetadataExtractor.GetMetadata(_handle, (int)MetadataExtractorAttr.METADATA_360, out _metaBundle.content360);
-                       if (ret != (int)MetadataExtractorError.None)
-                       {
-                               Log.Error(MetadataExtractorLog.LogTag, "Failed to get value" + (MetadataExtractorError)ret);
-                               MetadataExtractorErrorFactory.ThrowException(ret, "Failed to get value");
-                       }
-
-                       _metadata = new Metadata(_metaBundle);
-
-                       return _metadata;
-               }
-               /// <summary>
-               /// Gets the artwork image in a media file
-               /// </summary>
-               /// <value> Artwork object </value>
-               /// <exception cref="InvalidOperationException"> When internal process error is occured</exception>
-               public Artwork GetArtwork()
-               {
-                       int ret;
-                       Artwork _artwork;
-                       IntPtr getArtworkData;
-                       int getSize;
-                       byte[] tmpBuf;
-                       string getMimeType;
-
-                       ret = Interop.MetadataExtractor.GetArtwork(_handle, out getArtworkData, out getSize, out getMimeType);
-                       if (ret != (int)MetadataExtractorError.None)
-                       {
-                               Log.Error(MetadataExtractorLog.LogTag, "Failed to get value" + (MetadataExtractorError)ret);
-                               MetadataExtractorErrorFactory.ThrowException(ret, "Failed to get value");
-                       }
-
-                       if (getSize > 0)
-                       {
-                               tmpBuf = new byte[getSize];
-                               Marshal.Copy(getArtworkData, tmpBuf, 0, getSize);
-
-                               _artwork = new Artwork(tmpBuf, getMimeType);
-                       }
-                       else
-                       {
-                               _artwork = new Artwork(null, null);
-                       }
-
-                       return _artwork;
-               }
-               /// <summary>
-               /// Gets the synclyrics of a media file
-               /// </summary>
-               /// <param name="index"> The index of time/lyrics to set </param>
-               /// <value> Synclyrics object </value>
-               /// <exception cref="ArgumentException"> When the invalid parameter value is set.</exception>
-               /// <exception cref="InvalidOperationException"> When internal process error is occured</exception>
-               public Synclyrics GetSynclyrics(int index)
-               {
-                       int ret;
-                       Synclyrics _lyrics;
-                       uint getTimestamp;
-                       string getLyrics;
-
-                       ret = Interop.MetadataExtractor.GetSynclyrics(_handle, index, out getTimestamp, out getLyrics);
-                       if (ret != (int)MetadataExtractorError.None)
-                       {
-                               Log.Error(MetadataExtractorLog.LogTag, "Failed to get value" + (MetadataExtractorError)ret);
-                               MetadataExtractorErrorFactory.ThrowException(ret, "Failed to get value");
-                       }
-
-                       _lyrics = new Synclyrics(getLyrics, getTimestamp);
-
-                       return _lyrics;
-               }
-               /// <summary>
-               /// Gets the frame of a video media file
-               /// </summary>
-               /// <value> Frame object </value>
-               /// <exception cref="InvalidOperationException"> When internal process error is occured</exception>
-               public Frame GetFrame()
-               {
-                       int ret;
-                       Frame _frame;
-                       IntPtr getFameData;
-                       int getSize;
-                       byte[] tmpBuf;
-
-                       ret = Interop.MetadataExtractor.GetFrame(_handle, out getFameData, out getSize);
-                       if (ret != (int)MetadataExtractorError.None)
-                       {
-                               Log.Error(MetadataExtractorLog.LogTag, "Failed to get value" + (MetadataExtractorError)ret);
-                               MetadataExtractorErrorFactory.ThrowException(ret, "Failed to get value");
-                       }
-
-                       tmpBuf = new byte[getSize];
-                       Marshal.Copy(getFameData, tmpBuf, 0, getSize);
-
-                       _frame = new Frame(tmpBuf);
-
-                       return _frame;
-               }
-               /// <summary>
-               /// Gets the frame of a video media
-               /// </summary>
-               /// <param name="timeStamp"> The timestamp in milliseconds </param>
-               /// <param name="accurate"> If @c true the user can get an accurate frame for the given timestamp,\n
-               ///                                              otherwise @c false if the user can only get the nearest i-frame of the video rapidly </param>
-               /// <value> Frame object </value>
-               /// <exception cref="ArgumentException"> When the invalid parameter value is set.</exception>
-               /// <exception cref="InvalidOperationException"> When internal process error is occured</exception>
-               public Frame GetFrameAtTime(uint timeStamp, bool accurate)
-               {
-                       int ret;
-                       Frame _frame;
-                       IntPtr getFameData;
-                       int getSize;
-                       byte[] tmpBuf;
-
-                       ret = Interop.MetadataExtractor.GetFrameAtTime(_handle, timeStamp, accurate, out getFameData, out getSize);
-                       if (ret != (int)MetadataExtractorError.None)
-                       {
-                               Log.Error(MetadataExtractorLog.LogTag, "Failed to get value" + (MetadataExtractorError)ret);
-                               MetadataExtractorErrorFactory.ThrowException(ret, "Failed to get value");
-                       }
-
-                       tmpBuf = new byte[getSize];
-                       Marshal.Copy(getFameData, tmpBuf, 0, getSize);
-
-                       _frame = new Frame(tmpBuf);
-
-                       return _frame;
-               }
-               
-               /// <summary>
-               /// Metadata Extractor destructor
-               /// </summary>
-               ~MetadataExtractor()
-               {
-                       Dispose(false);
-               }
-
-               protected virtual void Dispose(bool disposing)
-               {
-                       if (!_disposed)
-                       {
-                               if (disposing)
-                               {
-                                       // To be used if there are any other disposable objects
-                               }
-                               if (_handle != IntPtr.Zero)
-                               {
-                                       Interop.MetadataExtractor.Destroy(_handle);
-                                       _handle = IntPtr.Zero;
-                               }
-                               _disposed = true;
-                       }
-               }
-
-               public void Dispose()
-               {
-                       Dispose(true);
-                       GC.SuppressFinalize(this);
-               }
-       }
+                Interop.Libc.Free(data);
+            }
+        }
+
+        /// <summary>
+        /// Gets the frame of a video media.
+        /// </summary>
+        /// <param name="timeStamp">The timestamp in milliseconds.</param>
+        /// <param name="accurate">true to get an accurate frame for the given timestamp,
+        ///     otherwise false to get the nearest i-frame of the video rapidly.</param>
+        /// <returns>The raw frame data in RGB888 if a frame at specified time exists, otherwise null.</returns>
+        /// <exception cref="InvalidOperationException"> When internal process error is occured</exception>
+        /// <exception cref="ObjectDisposedException">The <see cref="MetadataExtractor"/> has been already disposed of.</exception>
+        public byte[] GetFrameAt(uint timeStamp, bool accurate)
+        {
+            IntPtr data = IntPtr.Zero;
+
+            try
+            {
+                int size = 0;
+
+                var ret = Interop.MetadataExtractor.GetFrameAtTime(Handle, timeStamp, accurate, out data, out size);
+                MetadataExtractorRetValidator.ThrowIfError(ret, "Failed to get value");
+
+                if (size == 0)
+                {
+                    return null;
+                }
+
+                var buf = new byte[size];
+                Marshal.Copy(data, buf, 0, size);
+
+                return buf;
+            }
+            finally
+            {
+                Interop.Libc.Free(data);
+            }
+        }
+
+        /// <summary>
+        /// Metadata Extractor destructor
+        /// </summary>
+        ~MetadataExtractor()
+        {
+            Dispose(false);
+        }
+
+        protected virtual void Dispose(bool disposing)
+        {
+            if (!_disposed)
+            {
+                Release();
+                _disposed = true;
+            }
+        }
+
+        private void Release()
+        {
+            if (_buffer != IntPtr.Zero)
+            {
+                Marshal.FreeHGlobal(_buffer);
+            }
+
+            if (_handle != IntPtr.Zero)
+            {
+                var ret = Interop.MetadataExtractor.Destroy(_handle);
+                Log.Error(MetadataExtractorLog.Tag, $"DestroyHandle failed : {ret}.");
+
+                _handle = IntPtr.Zero;
+            }
+        }
+
+        public void Dispose()
+        {
+            Dispose(true);
+            GC.SuppressFinalize(this);
+        }
+    }
 }
 }
diff --git a/src/Tizen.Multimedia/MetadataExtractor/MetadataExtractorAttr.cs b/src/Tizen.Multimedia/MetadataExtractor/MetadataExtractorAttr.cs
new file mode 100644 (file)
index 0000000..8388dec
--- /dev/null
@@ -0,0 +1,57 @@
+/*
+* 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
+{
+    internal enum MetadataExtractorAttr
+    {
+        Duration,
+        VideoBitrate,
+        VideoFps,
+        VideoWidth,
+        VideoHeight,
+        VideoStreamCount,
+        AudioBitrate,
+        AudioChannels,
+        AudioSamplerate,
+        AudioBitPerSample,
+        AudioStreamCount,
+        Artist,
+        Title,
+        Album,
+        AlbumArtist,
+        Genre,
+        Author,
+        Copyright,
+        ReleaseDate,
+        Description,
+        Comment,
+        TrackNum,
+        Classification,
+        Rating,
+        Longitude,
+        Latitude,
+        Altitude,
+        Conductor,
+        UnSyncLyrics,
+        SyncLyricsNum,
+        RecordingDate,
+        Rotate,
+        VideoCodec,
+        AudioCodec,
+        ContentFor360,
+    }
+}
diff --git a/src/Tizen.Multimedia/MetadataExtractor/MetadataExtractorError.cs b/src/Tizen.Multimedia/MetadataExtractor/MetadataExtractorError.cs
new file mode 100644 (file)
index 0000000..9902b33
--- /dev/null
@@ -0,0 +1,62 @@
+/*
+* 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 System.IO;
+using Tizen.Internals.Errors;
+
+namespace Tizen.Multimedia
+{
+    /// <summary>
+    /// Enumeration for metadata extractor's error codes.
+    /// </summary>
+    internal enum MetadataExtractorError
+    {
+        None = ErrorCode.None,
+        InvalidParameter = ErrorCode.InvalidParameter,
+        OutOfMemory = ErrorCode.OutOfMemory,
+        FileExists = ErrorCode.FileExists,
+        PermissionDenied = ErrorCode.PermissionDenied,
+        TizenMetadataExtractorError = -0x01930000,
+        OperationFailed = TizenMetadataExtractorError | 0x01  // Invalid operation
+    };
+
+    internal static class MetadataExtractorRetValidator
+    {
+        internal static void ThrowIfError(MetadataExtractorError error, string errorMessage)
+        {
+            switch (error)
+            {
+                case MetadataExtractorError.InvalidParameter:
+                    throw new ArgumentException(errorMessage);
+
+                case MetadataExtractorError.FileExists:
+                    throw new FileNotFoundException(errorMessage);
+
+                case MetadataExtractorError.PermissionDenied:
+                    throw new UnauthorizedAccessException(errorMessage);
+
+                case MetadataExtractorError.OutOfMemory:
+                    throw new OutOfMemoryException();
+
+                case MetadataExtractorError.OperationFailed:
+                    throw new InvalidOperationException(errorMessage);
+            }
+        }
+    }
+}
+
diff --git a/src/Tizen.Multimedia/MetadataExtractor/MetadataExtractorErrorFactory.cs b/src/Tizen.Multimedia/MetadataExtractor/MetadataExtractorErrorFactory.cs
deleted file mode 100755 (executable)
index 9b34ab5..0000000
+++ /dev/null
@@ -1,55 +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.
-*/
-
-
-using System;
-using Tizen.Internals.Errors;
-
-namespace Tizen.Multimedia
-{
-       /// <summary>
-       /// Enumeration for metadata extractor's error codes.
-       /// </summary>
-       internal enum MetadataExtractorError
-       {
-               None = ErrorCode.None,                                            // Success
-               InvalidParameter = ErrorCode.InvalidParameter,  // Invalid parameter
-               OutOfMemory = ErrorCode.OutOfMemory,                    // Out of memory
-               FileExists = ErrorCode.FileExists,                        // File does not exist
-               PermissionDenied = ErrorCode.PermissionDenied,  // Permission deny
-               TizenMetadataExtractorError = -0x01930000,
-               MetadataExtractorErrorOperationFailed = TizenMetadataExtractorError | 0x01  // Invalid operation
-       };
-
-       internal static class MetadataExtractorErrorFactory
-       {
-               internal static void ThrowException(int errorCode, string errorMessage = null, string paramName = null)
-               {
-                       switch ((MetadataExtractorError)errorCode)
-                       {
-                               case MetadataExtractorError.InvalidParameter:
-                                       throw new ArgumentException("[" + errorCode.ToString() + "]" + errorMessage, paramName);
-
-                               case MetadataExtractorError.OutOfMemory:
-                               case MetadataExtractorError.FileExists:
-                               case MetadataExtractorError.PermissionDenied:
-                               case MetadataExtractorError.MetadataExtractorErrorOperationFailed:
-                                       throw new InvalidOperationException("[" + errorCode.ToString() + "]" + errorMessage);
-                       }
-               }
-       }
-}
-
index 080f307..620b251 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);
 * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
 *
 * Licensed under the Apache License, Version 2.0 (the License);
 * limitations under the License.
 */
 
 * limitations under the License.
 */
 
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
 namespace Tizen.Multimedia
 namespace Tizen.Multimedia
-{\r
+{
     /// <summary>
     /// <summary>
-    /// This class provides properties of the synchronized lyrics information of the given media
+    /// Represents synchronized lyrics information of media.
     /// </summary>
     /// </summary>
-    public class Synclyrics
-       {
-               internal Synclyrics(string lyrics, uint timestamp)
-               {
-                       Lyrics = lyrics;
-                       Timestamp = timestamp;
-               }\r
+    public class SyncLyrics
+    {
+        /// <summary>
+        /// Initialize a new instance of the MetadataExtractor class with the specified lyrics and timestamp.
+        /// </summary>
+        public SyncLyrics(string lyrics, uint timestamp)
+        {
+            Lyrics = lyrics;
+            Timestamp = timestamp;
+        }
+
         /// <summary>
         /// The lyrics of the index
         /// </summary>
         /// <summary>
         /// The lyrics of the index
         /// </summary>
-        public readonly string Lyrics;\r
+        public string Lyrics { get; }
+
         /// <summary>
         /// The time information of the index
         /// </summary>
         /// <summary>
         /// The time information of the index
         /// </summary>
-        public readonly uint Timestamp;
-       }
+        public uint Timestamp { get; }
+    }
 }
 }
index e6dbb28..336310e 100755 (executable)
     <Reference Include="System.Xml" />
   </ItemGroup>
   <ItemGroup>
     <Reference Include="System.Xml" />
   </ItemGroup>
   <ItemGroup>
-    <Compile Include="AudioIO\AudioCapture.cs" />
-    <Compile Include="AudioIO\AudioDataAvailableEventArgs.cs" />
-    <Compile Include="AudioIO\AudioIOEnums.cs" />
-    <Compile Include="AudioIO\AudioIOStateChangedEventArgs.cs" />
-    <Compile Include="AudioIO\AudioIOUtil.cs" />
-    <Compile Include="AudioIO\AudioPlaybackBufferAvailableEventArgs.cs" />
-    <Compile Include="AudioIO\AudioPlayback.cs" />
-    <Compile Include="Camera\Area.cs" />
-    <Compile Include="Camera\Camera.cs" />
-    <Compile Include="Camera\CameraDisplay.cs" />
-    <Compile Include="Camera\CameraEnums.cs" />
-    <Compile Include="Camera\CameraErrorFactory.cs" />
-    <Compile Include="Camera\CameraErrorOccurredEventArgs.cs" />
-    <Compile Include="Camera\CameraFeature.cs" />
-    <Compile Include="Camera\CameraFocusChangedEventArgs.cs" />
-    <Compile Include="Camera\CameraInterruptedEventArgs.cs" />
-    <Compile Include="Camera\CameraResolution.cs" />
-    <Compile Include="Camera\CameraSetting.cs" />
-    <Compile Include="Camera\CameraStateChangedEventArgs.cs" />
-    <Compile Include="Camera\CapturingEventArgs.cs" />
-    <Compile Include="Camera\DoublePlaneData.cs" />
-    <Compile Include="Camera\EncodedPlaneData.cs" />
-    <Compile Include="Camera\FaceDetectedData.cs" />
-    <Compile Include="Camera\FaceDetectedEventArgs.cs" />
-    <Compile Include="Camera\HdrCaptureProgressEventArgs.cs" />
-    <Compile Include="Camera\ImageData.cs" />
-    <Compile Include="Camera\Location.cs" />
-    <Compile Include="Camera\MediaPacketPreviewEventArgs.cs" />
-    <Compile Include="Camera\PreviewData.cs" />
-    <Compile Include="Camera\PreviewEventArgs.cs" />
-    <Compile Include="Camera\Range.cs" />
-    <Compile Include="Camera\SinglePlaneData.cs" />
-    <Compile Include="Camera\TriplePlaneData.cs" />
-    <Compile Include="Common\MultimediaDebug.cs" />
-    <Compile Include="Common\Size.cs" />
-    <Compile Include="Common\ValdiationUtil.cs" />
-    <Compile Include="Interop\Interop.AudioIO.cs" />
-    <Compile Include="Interop\Interop.Camera.cs" />
-    <Compile Include="Interop\Interop.CameraDisplay.cs" />
-    <Compile Include="Interop\Interop.CameraFeature.cs" />
-    <Compile Include="Interop\Interop.CameraSetting.cs" />
-    <Compile Include="Interop\Interop.MediaCodec.cs" />
-    <Compile Include="Interop\Interop.MediaTool.cs" />
-    <Compile Include="Interop\Interop.MediaVision.BarCode.cs" />
-    <Compile Include="Interop\Interop.MediaVision.Common.cs" />
-    <Compile Include="Interop\Interop.MediaVision.Face.cs" />
-    <Compile Include="Interop\Interop.MediaVision.Image.cs" />
-    <Compile Include="Interop\Interop.MediaVision.Surveillance.cs" />
-    <Compile Include="Interop\Interop.Player.cs" />
-    <Compile Include="Interop\Interop.MetadataExtractor.cs" />
-    <Compile Include="MediaCodec\BufferStatusChangedEventArgs.cs" />
-    <Compile Include="MediaCodec\InputProcessedEventArgs.cs" />
-    <Compile Include="MediaCodec\MediaCodec.cs" />
-    <Compile Include="MediaCodec\MediaCodecError.cs" />
-    <Compile Include="MediaCodec\MediaCodecErrorOccurredEventArgs.cs" />
-    <Compile Include="MediaCodec\MediaCodecStatus.cs" />
-    <Compile Include="MediaCodec\MediaCodecType.cs" />
-    <Compile Include="MediaCodec\OutputAvailableEventArgs.cs" />
-    <Compile Include="MediaCodec\SupportedCodecType.cs" />
-    <Compile Include="MediaTool\MediaFormat.cs" />
-    <Compile Include="MediaTool\MediaFormatAacType.cs" />
-    <Compile Include="MediaTool\MediaFormatMimeType.cs" />
-    <Compile Include="MediaTool\MediaFormatTextType.cs" />
-    <Compile Include="MediaTool\MediaPacket.cs" />
-    <Compile Include="MediaTool\MediaPacketBuffer.cs" />
-    <Compile Include="MediaTool\MediaPacketBufferFlags.cs" />
-    <Compile Include="MediaTool\MediaPacketVideoPlane.cs" />
-    <Compile Include="MediaVision\Barcode.cs" />
-    <Compile Include="MediaVision\BarcodeDetector.cs" />
-    <Compile Include="MediaVision\BarcodeDetectorEngineConfiguration.cs" />
-    <Compile Include="MediaVision\BarcodeGenerator.cs" />
-    <Compile Include="MediaVision\BarcodeGeneratorEngineConfiguration.cs" />
-    <Compile Include="MediaVision\BarcodeImageConfiguration.cs" />
-    <Compile Include="MediaVision\BarcodeImageFormat.cs" />
-    <Compile Include="MediaVision\BarcodeType.cs" />
-    <Compile Include="MediaVision\Colorspace.cs" />
-    <Compile Include="MediaVision\EngineConfiguration.cs" />
-    <Compile Include="MediaVision\ErrorCorrectionLevel.cs" />
-    <Compile Include="MediaVision\EyeCondition.cs" />
-    <Compile Include="MediaVision\FaceDetectionResult.cs" />
-    <Compile Include="MediaVision\FaceDetector.cs" />
-    <Compile Include="MediaVision\FaceEngineConfiguration.cs" />
-    <Compile Include="MediaVision\FaceRecognitionModel.cs" />
-    <Compile Include="MediaVision\FaceRecognitionModelType.cs" />
-    <Compile Include="MediaVision\FaceRecognitionResult.cs" />
-    <Compile Include="MediaVision\FaceRecognizer.cs" />
-    <Compile Include="MediaVision\FaceTracker.cs" />
-    <Compile Include="MediaVision\FaceTrackingModel.cs" />
-    <Compile Include="MediaVision\FaceTrackingResult.cs" />
-    <Compile Include="MediaVision\FacialExpression.cs" />
-    <Compile Include="MediaVision\Image.cs" />
-    <Compile Include="MediaVision\ImageEngineConfiguration.cs" />
-    <Compile Include="MediaVision\ImageRecognitionResult.cs" />
-    <Compile Include="MediaVision\ImageRecognizer.cs" />
-    <Compile Include="MediaVision\ImageTracker.cs" />
-    <Compile Include="MediaVision\ImageTrackingModel.cs" />
-    <Compile Include="MediaVision\MediaVisionErrorFactory.cs" />
-    <Compile Include="MediaVision\MediaVisionSource.cs" />
-    <Compile Include="MediaVision\MovementDetectedEventArgs.cs" />
-    <Compile Include="MediaVision\MovementDetectionEventTrigger.cs" />
-    <Compile Include="MediaVision\PersonAppearanceChangedEventArgs.cs" />
-    <Compile Include="MediaVision\PersonAppearanceEventTrigger.cs" />
-    <Compile Include="MediaVision\PersonRecognitionEventTrigger.cs" />
-    <Compile Include="MediaVision\PersonRecognitionResult.cs" />
-    <Compile Include="MediaVision\PersonRecognizedEventArgs.cs" />
-    <Compile Include="MediaVision\Point.cs" />
-    <Compile Include="MediaVision\QrConfiguration.cs" />
-    <Compile Include="MediaVision\QrMode.cs" />
-    <Compile Include="MediaVision\Quadrangle.cs" />
-    <Compile Include="MediaVision\Rectangle.cs" />
-    <Compile Include="MediaVision\SurveillanceEngineConfiguration.cs" />
-    <Compile Include="MediaVision\SurveillanceEventTrigger.cs" />
-    <Compile Include="MediaVision\TargetAttribute.cs" />
-    <Compile Include="MediaVision\TextAttribute.cs" />
-    <Compile Include="MetadataExtractor\MetadataEnums.cs" />
-    <Compile Include="MetadataExtractor\MetadataExtractorErrorFactory.cs" />
-    <Compile Include="MetadataExtractor\Synclyrics.cs" />
-    <Compile Include="MetadataExtractor\Frame.cs" />
-    <Compile Include="MetadataExtractor\Artwork.cs" />
-    <Compile Include="MetadataExtractor\Metadata.cs" />
-    <Compile Include="MetadataExtractor\MetadataExtractor.cs" />
-    <Compile Include="Interop\Interop.EvasObject.cs" />
-    <Compile Include="MediaView\MediaView.cs" />
-    <Compile Include="Player\CapturedFrame.cs" />
-    <Compile Include="Player\MediaStreamBufferStatusChangedEventArgs.cs" />
-    <Compile Include="Player\MediaStreamSeekingOccurredEventArgs.cs" />
-    <Compile Include="Player\PlayerDisplay.cs" />
-    <Compile Include="Player\PlayerEnums.cs" />
-    <Compile Include="Player\MediaStreamConfiguration.cs" />
-    <Compile Include="Player\PlayerError.cs" />
-    <Compile Include="Player\PlayerErrorOccurredEventArgs.cs" />
-    <Compile Include="Player\PlayerTrackInfo.cs" />
-    <Compile Include="Player\StreamInfo.cs" />
-    <Compile Include="Player\AudioEffect.cs" />
-    <Compile Include="Player\BufferingProgressChangedEventArgs.cs" />
-    <Compile Include="Player\DownloadProgress.cs" />
-    <Compile Include="Player\EqualizerBand.cs" />
-    <Compile Include="Player\SubtitleUpdatedEventArgs.cs" />
-    <Compile Include="Player\PlaybackInterruptedEventArgs.cs" />
-    <Compile Include="Player\Player.cs" />
-    <Compile Include="Player\VideoFrameDecodedEventArgs.cs" />
-    <Compile Include="Player\VideoStreamChangedEventArgs.cs" />
-    <Compile Include="Properties\AssemblyInfo.cs" />
-    <Compile Include="Player\MediaSource.cs" />
-    <Compile Include="Player\MediaUriSource.cs" />
-    <Compile Include="Player\MediaBufferSource.cs" />
-    <Compile Include="Player\MediaStreamSource.cs" />
-    <Compile Include="Interop\Interop.Libraries.cs" />
-    <Compile Include="Recorder\AudioStreamDeliveredEventArgs.cs" />
-    <Compile Include="Recorder\Recorder.cs" />
-    <Compile Include="Recorder\RecorderEnums.cs" />
-    <Compile Include="Recorder\RecorderErrorFactory.cs" />
-    <Compile Include="Recorder\RecorderInterruptedEventArgs.cs" />
-    <Compile Include="Recorder\RecorderStateChangedEventArgs.cs" />
-    <Compile Include="Recorder\RecordingErrorOccurredEventArgs.cs" />
-    <Compile Include="Recorder\RecordingLimitReachedEventArgs.cs" />
-    <Compile Include="Recorder\RecordingStatusChangedEventArgs.cs" />
-    <Compile Include="Recorder\VideoResolution.cs" />
-    <Compile Include="Interop\Interop.Recorder.cs" />
-    <Compile Include="Interop\Interop.RecorderAttribute.cs" />
-    <Compile Include="Interop\Interop.RecorderCapability.cs" />
-    <Compile Include="AudioManager\AudioDevice.cs" />
-    <Compile Include="AudioManager\AudioDeviceConnectionChangedEventArgs.cs" />
-    <Compile Include="AudioManager\AudioDeviceStateChangedEventArgs.cs" />
-    <Compile Include="AudioManager\AudioManager.cs" />
-    <Compile Include="AudioManager\AudioManagerEnumerations.cs" />
-    <Compile Include="AudioManager\AudioManagerErrorFactory.cs" />
-    <Compile Include="AudioManager\AudioStreamPolicy.cs" />
-    <Compile Include="AudioManager\AudioVolume.cs" />
-    <Compile Include="AudioManager\FocusStateChangedEventArgs.cs" />
-    <Compile Include="AudioManager\MaxVolumeLevel.cs" />
-    <Compile Include="AudioManager\StreamFocusStateChangedEventArgs.cs" />
-    <Compile Include="AudioManager\VolumeChangedEventArgs.cs" />
-    <Compile Include="AudioManager\VolumeLevel.cs" />
-    <Compile Include="Interop\Interop.Device.cs" />
-    <Compile Include="Interop\Interop.StreamPolicy.cs" />
-    <Compile Include="Interop\Interop.Volume.cs" />
-    <Compile Include="Interop\Interop.MediaController.cs" />
-    <Compile Include="MediaController\MediaControllerPlayback.cs" />
-    <Compile Include="MediaController\MediaControllerMetadata.cs" />
-    <Compile Include="MediaController\ServerInformation.cs" />
-    <Compile Include="MediaController\CustomCommandEventArgs.cs" />
-    <Compile Include="MediaController\PlaybackStateCommandEventArgs.cs" />
-    <Compile Include="MediaController\ServerUpdatedEventArgs.cs" />
-    <Compile Include="MediaController\PlaybackUpdatedEventArgs.cs" />
-    <Compile Include="MediaController\MetadataUpdatedEventArgs.cs" />
-    <Compile Include="MediaController\ShuffleModeUpdatedEventArgs.cs" />
-    <Compile Include="MediaController\RepeatModeUpdatedEventArgs.cs" />
-    <Compile Include="MediaController\MediaControllerErrorFactory.cs" />
-    <Compile Include="MediaController\MediaControllerEnums.cs" />
-    <Compile Include="MediaController\MediaControllerLog.cs" />
-    <Compile Include="MediaController\MediaControllerClient.cs" />
-    <Compile Include="MediaController\MediaControllerServer.cs" />
-    <Compile Include="MediaController\CustomCommandReplyEventArgs.cs" />
-    <Compile Include="ScreenMirroring\AudioInformation.cs" />
-    <Compile Include="ScreenMirroring\ScreenMirroring.cs" />
-    <Compile Include="ScreenMirroring\ScreenMirroringEnumerations.cs" />
-    <Compile Include="ScreenMirroring\StateChangedEventArgs.cs" />
-    <Compile Include="ScreenMirroring\ScreenMirroringErrorFactory.cs" />
-    <Compile Include="ScreenMirroring\VideoInformation.cs" />
-    <Compile Include="Interop\Interop.ScreenMirroring.cs" />
-    <Compile Include="StreamRecorder\StreamRecordingBufferConsumedEventArgs.cs" />
-    <Compile Include="StreamRecorder\StreamRecorder.cs" />
-    <Compile Include="StreamRecorder\StreamRecorderEnums.cs" />
-    <Compile Include="StreamRecorder\StreamRecorderErrorFactory.cs" />
-    <Compile Include="StreamRecorder\StreamRecorderNotifiedEventArgs.cs" />
-    <Compile Include="StreamRecorder\StreamRecorderVideoResolution.cs" />
-    <Compile Include="StreamRecorder\StreamRecordingErrorOccurredEventArgs.cs" />
-    <Compile Include="StreamRecorder\StreamRecordingLimitReachedEventArgs.cs" />
-    <Compile Include="Interop\Interop.StreamRecorder.cs" />
-    <Compile Include="ThumbnailExtractor\ThumbnailData.cs" />
-    <Compile Include="ThumbnailExtractor\ThumbnailExtractorErrorFactory.cs" />
-    <Compile Include="ThumbnailExtractor\ThumbnailExtractor.cs" />
-    <Compile Include="Interop\Interop.ThumbnailExtractor.cs" />
+    <Compile Include="*\*.cs" />
   </ItemGroup>
   <ItemGroup>
     <None Include="Tizen.Multimedia.nuspec" />
   </ItemGroup>
   <ItemGroup>
     <None Include="Tizen.Multimedia.nuspec" />
index 2bbe0e7..3e35bcd 100755 (executable)
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <PropertyGroup>
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <ProjectGuid>{0CE698B0-4849-4096-9D7F-30E611F50DAD}</ProjectGuid>
-    <OutputType>Library</OutputType>
-    <AppDesignerFolder>Properties</AppDesignerFolder>
-    <RootNamespace>Tizen.Multimedia</RootNamespace>
-    <AssemblyName>Tizen.Multimedia</AssemblyName>
-    <FileAlignment>512</FileAlignment>
-  </PropertyGroup>
-  <PropertyGroup>
-    <TargetFrameworkIdentifier>.NETStandard</TargetFrameworkIdentifier>
-    <TargetFrameworkVersion>v1.3</TargetFrameworkVersion>
-    <NuGetTargetMoniker>.NETStandard,Version=v1.3</NuGetTargetMoniker>
-    <AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
-    <NoStdLib>true</NoStdLib>
-    <NoWarn>$(NoWarn);1701;1702</NoWarn>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
-    <DebugSymbols>true</DebugSymbols>
-    <DebugType>full</DebugType>
-    <Optimize>false</Optimize>
-    <OutputPath>bin\Debug\</OutputPath>
-    <DefineConstants>DEBUG;TRACE</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
-    <DebugType>pdbonly</DebugType>
-    <Optimize>true</Optimize>
-    <OutputPath>bin\Release\</OutputPath>
-    <DefineConstants>TRACE</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-  </PropertyGroup>
-  <PropertyGroup>
-    <SignAssembly>true</SignAssembly>
-  </PropertyGroup>
-  <PropertyGroup>
-    <AssemblyOriginatorKeyFile>Tizen.Multimedia.snk</AssemblyOriginatorKeyFile>
-  </PropertyGroup>
-  <ItemGroup>
-    <Compile Include="AudioIO\AudioCapture.cs" />
-    <Compile Include="AudioIO\AudioDataAvailableEventArgs.cs" />
-    <Compile Include="AudioIO\AudioIOEnums.cs" />
-    <Compile Include="AudioIO\AudioIOStateChangedEventArgs.cs" />
-    <Compile Include="AudioIO\AudioIOUtil.cs" />
-    <Compile Include="AudioIO\AudioPlaybackBufferAvailableEventArgs.cs" />
-    <Compile Include="AudioIO\AudioPlayback.cs" />
-    <Compile Include="Camera\Area.cs" />
-    <Compile Include="Camera\Camera.cs" />
-    <Compile Include="Camera\CameraDisplay.cs" />
-    <Compile Include="Camera\CameraEnums.cs" />
-    <Compile Include="Camera\CameraErrorFactory.cs" />
-    <Compile Include="Camera\CameraErrorOccurredEventArgs.cs" />
-    <Compile Include="Camera\CameraFeature.cs" />
-    <Compile Include="Camera\CameraFocusChangedEventArgs.cs" />
-    <Compile Include="Camera\CameraInterruptedEventArgs.cs" />
-    <Compile Include="Camera\CameraResolution.cs" />
-    <Compile Include="Camera\CameraSetting.cs" />
-    <Compile Include="Camera\CameraStateChangedEventArgs.cs" />
-    <Compile Include="Camera\CapturingEventArgs.cs" />
-    <Compile Include="Camera\DoublePlaneData.cs" />
-    <Compile Include="Camera\EncodedPlaneData.cs" />
-    <Compile Include="Camera\FaceDetectedData.cs" />
-    <Compile Include="Camera\FaceDetectedEventArgs.cs" />
-    <Compile Include="Camera\HdrCaptureProgressEventArgs.cs" />
-    <Compile Include="Camera\ImageData.cs" />
-    <Compile Include="Camera\Location.cs" />
-    <Compile Include="Camera\MediaPacketPreviewEventArgs.cs" />
-    <Compile Include="Camera\PreviewData.cs" />
-    <Compile Include="Camera\PreviewEventArgs.cs" />
-    <Compile Include="Camera\Range.cs" />
-    <Compile Include="Camera\SinglePlaneData.cs" />
-    <Compile Include="Camera\TriplePlaneData.cs" />
-    <Compile Include="Common\MultimediaDebug.cs" />
-    <Compile Include="Common\Size.cs" />
-    <Compile Include="Common\ValdiationUtil.cs" />
-    <Compile Include="Interop\Interop.AudioIO.cs" />
-    <Compile Include="Interop\Interop.Camera.cs" />
-    <Compile Include="Interop\Interop.CameraDisplay.cs" />
-    <Compile Include="Interop\Interop.CameraFeature.cs" />
-    <Compile Include="Interop\Interop.CameraSetting.cs" />
-    <Compile Include="Interop\Interop.MediaCodec.cs" />
-    <Compile Include="Interop\Interop.MediaTool.cs" />
-    <Compile Include="Interop\Interop.MediaVision.BarCode.cs" />
-    <Compile Include="Interop\Interop.MediaVision.Common.cs" />
-    <Compile Include="Interop\Interop.MediaVision.Face.cs" />
-    <Compile Include="Interop\Interop.MediaVision.Image.cs" />
-    <Compile Include="Interop\Interop.MediaVision.Surveillance.cs" />
-    <Compile Include="Interop\Interop.Player.cs" />
-    <Compile Include="Interop\Interop.MetadataExtractor.cs" />
-    <Compile Include="MediaCodec\BufferStatusChangedEventArgs.cs" />
-    <Compile Include="MediaCodec\InputProcessedEventArgs.cs" />
-    <Compile Include="MediaCodec\MediaCodec.cs" />
-    <Compile Include="MediaCodec\MediaCodecError.cs" />
-    <Compile Include="MediaCodec\MediaCodecErrorOccurredEventArgs.cs" />
-    <Compile Include="MediaCodec\MediaCodecStatus.cs" />
-    <Compile Include="MediaCodec\MediaCodecType.cs" />
-    <Compile Include="MediaCodec\OutputAvailableEventArgs.cs" />
-    <Compile Include="MediaCodec\SupportedCodecType.cs" />
-    <Compile Include="MediaTool\MediaFormat.cs" />
-    <Compile Include="MediaTool\MediaFormatAacType.cs" />
-    <Compile Include="MediaTool\MediaFormatMimeType.cs" />
-    <Compile Include="MediaTool\MediaFormatTextType.cs" />
-    <Compile Include="MediaTool\MediaPacket.cs" />
-    <Compile Include="MediaTool\MediaPacketBuffer.cs" />
-    <Compile Include="MediaTool\MediaPacketBufferFlags.cs" />
-    <Compile Include="MediaTool\MediaPacketVideoPlane.cs" />
-    <Compile Include="MediaVision\Barcode.cs" />
-    <Compile Include="MediaVision\BarcodeDetector.cs" />
-    <Compile Include="MediaVision\BarcodeDetectorEngineConfiguration.cs" />
-    <Compile Include="MediaVision\BarcodeGenerator.cs" />
-    <Compile Include="MediaVision\BarcodeGeneratorEngineConfiguration.cs" />
-    <Compile Include="MediaVision\BarcodeImageConfiguration.cs" />
-    <Compile Include="MediaVision\BarcodeImageFormat.cs" />
-    <Compile Include="MediaVision\BarcodeType.cs" />
-    <Compile Include="MediaVision\Colorspace.cs" />
-    <Compile Include="MediaVision\EngineConfiguration.cs" />
-    <Compile Include="MediaVision\ErrorCorrectionLevel.cs" />
-    <Compile Include="MediaVision\EyeCondition.cs" />
-    <Compile Include="MediaVision\FaceDetectionResult.cs" />
-    <Compile Include="MediaVision\FaceDetector.cs" />
-    <Compile Include="MediaVision\FaceEngineConfiguration.cs" />
-    <Compile Include="MediaVision\FaceRecognitionModel.cs" />
-    <Compile Include="MediaVision\FaceRecognitionModelType.cs" />
-    <Compile Include="MediaVision\FaceRecognitionResult.cs" />
-    <Compile Include="MediaVision\FaceRecognizer.cs" />
-    <Compile Include="MediaVision\FaceTracker.cs" />
-    <Compile Include="MediaVision\FaceTrackingModel.cs" />
-    <Compile Include="MediaVision\FaceTrackingResult.cs" />
-    <Compile Include="MediaVision\FacialExpression.cs" />
-    <Compile Include="MediaVision\Image.cs" />
-    <Compile Include="MediaVision\ImageEngineConfiguration.cs" />
-    <Compile Include="MediaVision\ImageRecognitionResult.cs" />
-    <Compile Include="MediaVision\ImageRecognizer.cs" />
-    <Compile Include="MediaVision\ImageTracker.cs" />
-    <Compile Include="MediaVision\ImageTrackingModel.cs" />
-    <Compile Include="MediaVision\MediaVisionErrorFactory.cs" />
-    <Compile Include="MediaVision\MediaVisionSource.cs" />
-    <Compile Include="MediaVision\MovementDetectedEventArgs.cs" />
-    <Compile Include="MediaVision\MovementDetectionEventTrigger.cs" />
-    <Compile Include="MediaVision\PersonAppearanceChangedEventArgs.cs" />
-    <Compile Include="MediaVision\PersonAppearanceEventTrigger.cs" />
-    <Compile Include="MediaVision\PersonRecognitionEventTrigger.cs" />
-    <Compile Include="MediaVision\PersonRecognitionResult.cs" />
-    <Compile Include="MediaVision\PersonRecognizedEventArgs.cs" />
-    <Compile Include="MediaVision\Point.cs" />
-    <Compile Include="MediaVision\QrConfiguration.cs" />
-    <Compile Include="MediaVision\QrMode.cs" />
-    <Compile Include="MediaVision\Quadrangle.cs" />
-    <Compile Include="MediaVision\Rectangle.cs" />
-    <Compile Include="MediaVision\SurveillanceEngineConfiguration.cs" />
-    <Compile Include="MediaVision\SurveillanceEventTrigger.cs" />
-    <Compile Include="MediaVision\TargetAttribute.cs" />
-    <Compile Include="MediaVision\TextAttribute.cs" />
-    <Compile Include="MetadataExtractor\MetadataEnums.cs" />
-    <Compile Include="MetadataExtractor\MetadataExtractorErrorFactory.cs" />
-    <Compile Include="MetadataExtractor\Synclyrics.cs" />
-    <Compile Include="MetadataExtractor\Frame.cs" />
-    <Compile Include="MetadataExtractor\Artwork.cs" />
-    <Compile Include="MetadataExtractor\Metadata.cs" />
-    <Compile Include="MetadataExtractor\MetadataExtractor.cs" />
-    <Compile Include="Interop\Interop.EvasObject.cs" />
-    <Compile Include="MediaView\MediaView.cs" />
-    <Compile Include="Player\CapturedFrame.cs" />
-    <Compile Include="Player\MediaStreamBufferStatusChangedEventArgs.cs" />
-    <Compile Include="Player\MediaStreamSeekingOccurredEventArgs.cs" />
-    <Compile Include="Player\PlayerDisplay.cs" />
-    <Compile Include="Player\PlayerEnums.cs" />
-    <Compile Include="Player\MediaStreamConfiguration.cs" />
-    <Compile Include="Player\PlayerError.cs" />
-    <Compile Include="Player\PlayerErrorOccurredEventArgs.cs" />
-    <Compile Include="Player\PlayerTrackInfo.cs" />
-    <Compile Include="Player\StreamInfo.cs" />
-    <Compile Include="Player\AudioEffect.cs" />
-    <Compile Include="Player\BufferingProgressChangedEventArgs.cs" />
-    <Compile Include="Player\DownloadProgress.cs" />
-    <Compile Include="Player\EqualizerBand.cs" />
-    <Compile Include="Player\SubtitleUpdatedEventArgs.cs" />
-    <Compile Include="Player\PlaybackInterruptedEventArgs.cs" />
-    <Compile Include="Player\Player.cs" />
-    <Compile Include="Player\VideoFrameDecodedEventArgs.cs" />
-    <Compile Include="Player\VideoStreamChangedEventArgs.cs" />
-    <Compile Include="Properties\AssemblyInfo.cs" />
-    <Compile Include="Player\MediaSource.cs" />
-    <Compile Include="Player\MediaUriSource.cs" />
-    <Compile Include="Player\MediaBufferSource.cs" />
-    <Compile Include="Player\MediaStreamSource.cs" />
-    <Compile Include="Interop\Interop.Libraries.cs" />
-    <Compile Include="Recorder\AudioStreamDeliveredEventArgs.cs" />
-    <Compile Include="Recorder\Recorder.cs" />
-    <Compile Include="Recorder\RecorderEnums.cs" />
-    <Compile Include="Recorder\RecorderErrorFactory.cs" />
-    <Compile Include="Recorder\RecorderInterruptedEventArgs.cs" />
-    <Compile Include="Recorder\RecorderStateChangedEventArgs.cs" />
-    <Compile Include="Recorder\RecordingErrorOccurredEventArgs.cs" />
-    <Compile Include="Recorder\RecordingLimitReachedEventArgs.cs" />
-    <Compile Include="Recorder\RecordingStatusChangedEventArgs.cs" />
-    <Compile Include="Recorder\VideoResolution.cs" />
-    <Compile Include="Interop\Interop.Recorder.cs" />
-    <Compile Include="Interop\Interop.RecorderAttribute.cs" />
-    <Compile Include="Interop\Interop.RecorderCapability.cs" />
-    <Compile Include="AudioManager\AudioDevice.cs" />
-    <Compile Include="AudioManager\AudioDeviceConnectionChangedEventArgs.cs" />
-    <Compile Include="AudioManager\AudioDeviceStateChangedEventArgs.cs" />
-    <Compile Include="AudioManager\AudioManager.cs" />
-    <Compile Include="AudioManager\AudioManagerEnumerations.cs" />
-    <Compile Include="AudioManager\AudioManagerErrorFactory.cs" />
-    <Compile Include="AudioManager\AudioStreamPolicy.cs" />
-    <Compile Include="AudioManager\AudioVolume.cs" />
-    <Compile Include="AudioManager\FocusStateChangedEventArgs.cs" />
-    <Compile Include="AudioManager\MaxVolumeLevel.cs" />
-    <Compile Include="AudioManager\StreamFocusStateChangedEventArgs.cs" />
-    <Compile Include="AudioManager\VolumeChangedEventArgs.cs" />
-    <Compile Include="AudioManager\VolumeLevel.cs" />
-    <Compile Include="Interop\Interop.Device.cs" />
-    <Compile Include="Interop\Interop.StreamPolicy.cs" />
-    <Compile Include="Interop\Interop.Volume.cs" />
-    <Compile Include="Interop\Interop.MediaController.cs" />
-    <Compile Include="MediaController\MediaControllerPlayback.cs" />
-    <Compile Include="MediaController\MediaControllerMetadata.cs" />
-    <Compile Include="MediaController\ServerInformation.cs" />
-    <Compile Include="MediaController\CustomCommandEventArgs.cs" />
-    <Compile Include="MediaController\PlaybackStateCommandEventArgs.cs" />
-    <Compile Include="MediaController\ServerUpdatedEventArgs.cs" />
-    <Compile Include="MediaController\PlaybackUpdatedEventArgs.cs" />
-    <Compile Include="MediaController\MetadataUpdatedEventArgs.cs" />
-    <Compile Include="MediaController\ShuffleModeUpdatedEventArgs.cs" />
-    <Compile Include="MediaController\RepeatModeUpdatedEventArgs.cs" />
-    <Compile Include="MediaController\MediaControllerErrorFactory.cs" />
-    <Compile Include="MediaController\MediaControllerEnums.cs" />
-    <Compile Include="MediaController\MediaControllerLog.cs" />
-    <Compile Include="MediaController\MediaControllerClient.cs" />
-    <Compile Include="MediaController\MediaControllerServer.cs" />
-    <Compile Include="MediaController\CustomCommandReplyEventArgs.cs" />
-    <Compile Include="ScreenMirroring\AudioInformation.cs" />
-    <Compile Include="ScreenMirroring\ScreenMirroring.cs" />
-    <Compile Include="ScreenMirroring\ScreenMirroringEnumerations.cs" />
-    <Compile Include="ScreenMirroring\StateChangedEventArgs.cs" />
-    <Compile Include="ScreenMirroring\ScreenMirroringErrorFactory.cs" />
-    <Compile Include="ScreenMirroring\VideoInformation.cs" />
-    <Compile Include="Interop\Interop.ScreenMirroring.cs" />
-    <Compile Include="StreamRecorder\StreamRecordingBufferConsumedEventArgs.cs" />
-    <Compile Include="StreamRecorder\StreamRecorder.cs" />
-    <Compile Include="StreamRecorder\StreamRecorderEnums.cs" />
-    <Compile Include="StreamRecorder\StreamRecorderErrorFactory.cs" />
-    <Compile Include="StreamRecorder\StreamRecorderNotifiedEventArgs.cs" />
-    <Compile Include="StreamRecorder\StreamRecorderVideoResolution.cs" />
-    <Compile Include="StreamRecorder\StreamRecordingErrorOccurredEventArgs.cs" />
-    <Compile Include="StreamRecorder\StreamRecordingLimitReachedEventArgs.cs" />
-    <Compile Include="Interop\Interop.StreamRecorder.cs" />
-    <Compile Include="ThumbnailExtractor\ThumbnailData.cs" />
-    <Compile Include="ThumbnailExtractor\ThumbnailExtractorErrorFactory.cs" />
-    <Compile Include="ThumbnailExtractor\ThumbnailExtractor.cs" />
-    <Compile Include="Interop\Interop.ThumbnailExtractor.cs" />
-  </ItemGroup>
-  <ItemGroup>
-    <None Include="Tizen.Multimedia.nuspec" />
-    <None Include="Tizen.Multimedia.project.json" />
-    <None Include="Tizen.Multimedia.snk" />
-  </ItemGroup>
-  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
-  <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
-       Other similar extension points exist, see Microsoft.Common.targets.
-  <Target Name="BeforeBuild">
-  </Target>
-  <Target Name="AfterBuild">
-  </Target>
-  -->
-  <PropertyGroup>
-    <!-- https://github.com/dotnet/corefxlab/tree/master/samples/NetCoreSample and
-       https://docs.microsoft.com/en-us/dotnet/articles/core/tutorials/target-dotnetcore-with-msbuild
-    -->
-    <!-- We don't use any of MSBuild's resolution logic for resolving the framework, so just set these two
-       properties to any folder that exists to skip the GetReferenceAssemblyPaths task (not target) and
-       to prevent it from outputting a warning (MSB3644).
-    -->
-    <_TargetFrameworkDirectories>$(MSBuildThisFileDirectory)</_TargetFrameworkDirectories>
-    <_FullFrameworkReferenceAssemblyPaths>$(MSBuildThisFileDirectory)</_FullFrameworkReferenceAssemblyPaths>
-    <AutoUnifyAssemblyReferences>true</AutoUnifyAssemblyReferences>
-  </PropertyGroup>
-</Project>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+  <PropertyGroup>\r
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>\r
+    <ProjectGuid>{0CE698B0-4849-4096-9D7F-30E611F50DAD}</ProjectGuid>\r
+    <OutputType>Library</OutputType>\r
+    <AppDesignerFolder>Properties</AppDesignerFolder>\r
+    <RootNamespace>Tizen.Multimedia</RootNamespace>\r
+    <AssemblyName>Tizen.Multimedia</AssemblyName>\r
+    <FileAlignment>512</FileAlignment>\r
+  </PropertyGroup>\r
+  <PropertyGroup>\r
+    <TargetFrameworkIdentifier>.NETStandard</TargetFrameworkIdentifier>\r
+    <TargetFrameworkVersion>v1.3</TargetFrameworkVersion>\r
+    <NuGetTargetMoniker>.NETStandard,Version=v1.3</NuGetTargetMoniker>\r
+    <AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>\r
+    <NoStdLib>true</NoStdLib>\r
+    <NoWarn>$(NoWarn);1701;1702</NoWarn>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
+    <DebugSymbols>true</DebugSymbols>\r
+    <DebugType>full</DebugType>\r
+    <Optimize>false</Optimize>\r
+    <OutputPath>bin\Debug\</OutputPath>\r
+    <DefineConstants>DEBUG;TRACE</DefineConstants>\r
+    <ErrorReport>prompt</ErrorReport>\r
+    <WarningLevel>4</WarningLevel>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">\r
+    <DebugType>pdbonly</DebugType>\r
+    <Optimize>true</Optimize>\r
+    <OutputPath>bin\Release\</OutputPath>\r
+    <DefineConstants>TRACE</DefineConstants>\r
+    <ErrorReport>prompt</ErrorReport>\r
+    <WarningLevel>4</WarningLevel>\r
+  </PropertyGroup>\r
+  <PropertyGroup>\r
+    <SignAssembly>true</SignAssembly>\r
+  </PropertyGroup>\r
+  <PropertyGroup>\r
+    <AssemblyOriginatorKeyFile>Tizen.Multimedia.snk</AssemblyOriginatorKeyFile>\r
+  </PropertyGroup>\r
+  <ItemGroup>\r
+    <Compile Include="*\*.cs" />\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <None Include="Tizen.Multimedia.nuspec" />\r
+    <None Include="Tizen.Multimedia.project.json" />\r
+    <None Include="Tizen.Multimedia.snk" />\r
+  </ItemGroup>\r
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />\r
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it.\r
+       Other similar extension points exist, see Microsoft.Common.targets.\r
+  <Target Name="BeforeBuild">\r
+  </Target>\r
+  <Target Name="AfterBuild">\r
+  </Target>\r
+  -->\r
+  <PropertyGroup>\r
+    <!-- https://github.com/dotnet/corefxlab/tree/master/samples/NetCoreSample and\r
+       https://docs.microsoft.com/en-us/dotnet/articles/core/tutorials/target-dotnetcore-with-msbuild\r
+    -->\r
+    <!-- We don't use any of MSBuild's resolution logic for resolving the framework, so just set these two\r
+       properties to any folder that exists to skip the GetReferenceAssemblyPaths task (not target) and\r
+       to prevent it from outputting a warning (MSB3644).\r
+    -->\r
+    <_TargetFrameworkDirectories>$(MSBuildThisFileDirectory)</_TargetFrameworkDirectories>\r
+    <_FullFrameworkReferenceAssemblyPaths>$(MSBuildThisFileDirectory)</_FullFrameworkReferenceAssemblyPaths>\r
+    <AutoUnifyAssemblyReferences>true</AutoUnifyAssemblyReferences>\r
+  </PropertyGroup>\r
+</Project>\r