[MetadataExtractor] Fixed naming issues and updated comments.
authorcoderhyme <jhyo.kim@samsung.com>
Mon, 5 Jun 2017 07:57:32 +0000 (16:57 +0900)
committercoderhyme <jhyo.kim@samsung.com>
Thu, 13 Jul 2017 05:03:13 +0000 (14:03 +0900)
This is to make names consistent in the Multimedia namespace.

Change-Id: I5dd04f3d57c41d3a8fbd6b98452cc08c06e4f85f
Signed-off-by: coderhyme <jhyo.kim@samsung.com>
src/Tizen.Multimedia.Metadata/MetadataExtractor/Artwork.cs
src/Tizen.Multimedia.Metadata/MetadataExtractor/Metadata.cs
src/Tizen.Multimedia.Metadata/MetadataExtractor/MetadataExtractor.cs
src/Tizen.Multimedia.Metadata/MetadataExtractor/MetadataExtractorAttr.cs
src/Tizen.Multimedia.Metadata/MetadataExtractor/MetadataExtractorError.cs
src/Tizen.Multimedia.Metadata/MetadataExtractor/SyncLyrics.cs
src/Tizen.Multimedia.Metadata/MetadataExtractor/ValueConverter.cs [new file with mode: 0644]

index e1fcb83..d5a83a7 100755 (executable)
@@ -1,18 +1,18 @@
 /*
-* 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.
-*/
+ * 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
 {
@@ -22,7 +22,7 @@ namespace Tizen.Multimedia
     public class Artwork
     {
         /// <summary>
-        /// Initializes a new instance of the Artwork class with the specified data and mimeType.
+        /// Initializes a new instance of the Artwork class with the specified data and mime type.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
         /// <param name="data">The data of the artwork to set metadata.</param>
@@ -34,13 +34,13 @@ namespace Tizen.Multimedia
         }
 
         /// <summary>
-        /// The encoded artwork image.
+        /// Gets the encoded artwork image.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
         public byte[] Data { get; }
 
         /// <summary>
-        /// The mime type of artwork.
+        /// Gets the mime type of artwork.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
         public string MimeType { get; }
index 561bb8b..36234ac 100755 (executable)
@@ -1,18 +1,18 @@
 /*
-* 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.
-*/
+ * 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.Diagnostics;
@@ -25,70 +25,69 @@ namespace Tizen.Multimedia
     /// </summary>
     public class VideoMetadata
     {
-
-        protected VideoMetadata()
-        {
-        }
-
-        internal VideoMetadata(IntPtr handle)
+        private VideoMetadata(int streamCount, IntPtr handle)
         {
+            Debug.Assert(streamCount > 0);
             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);
-            }
+            StreamCount = streamCount;
+            BitRate = ValueConverter.ToNullableInt(GetMetadata(handle, MetadataExtractorAttr.VideoBitrate));
+            Fps = ValueConverter.ToNullableInt(GetMetadata(handle, MetadataExtractorAttr.VideoFps));
+            Width = ValueConverter.ToNullableInt(GetMetadata(handle, MetadataExtractorAttr.VideoWidth));
+            Height = ValueConverter.ToNullableInt(GetMetadata(handle, MetadataExtractorAttr.VideoHeight));
+            Codec = GetMetadata(handle, MetadataExtractorAttr.VideoCodec);
 
             _description = new Lazy<string>(() => ObjectDescriptionBuilder.BuildWithProperties(this));
         }
 
+        internal static VideoMetadata From(IntPtr handle)
+        {
+            var streamCount = ValueConverter.ToInt(GetMetadata(handle, MetadataExtractorAttr.VideoStreamCount));
+
+            return streamCount > 0 ? new VideoMetadata(streamCount, handle) : null;
+        }
+
         /// <summary>
         /// Gets the bitrate.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <value>A string representing the bitrate, or null if the information does not exists.</value>
-        public string Bitrate { get; }
+        /// <value>The bitrate value, or null if the information does not exist.</value>
+        public int? BitRate { get; }
 
         /// <summary>
         /// Gets the video FPS.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <value>A string representing the fps, or null if the information does not exists.</value>
-        public string Fps { get; }
+        /// <value>The fps value, or null if the information does not exist.</value>
+        public int? Fps { get; }
 
         /// <summary>
         /// Gets the width of the video.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <value>A string representing the width, or null if the information does not exists.</value>
-        public string Width { get; }
+        /// <value>The width value, or null if the information does not exist.</value>
+        public int? Width { get; }
 
         /// <summary>
         /// Gets the height of the video.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <value>A string representing the height, or null if the information does not exists.</value>
-        public string Height { get; }
+        /// <value>The height value, or null if the information does not exist.</value>
+        public int? Height { get; }
 
         /// <summary>
         /// Get the codec type of the video.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <value>A string representing the codec type, or null if the information does not exists.</value>
+        /// <value>A string representing the codec type, or null if the information does not exist.</value>
         public string Codec { get; }
 
         /// <summary>
         /// Gets the video stream count.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <value>A string representing the video stream count, or null if the information does not exists.</value>
-        public string StreamCount { get; }
+        /// <value>The number of video streams.</value>
+        public int StreamCount { get; }
 
         private Lazy<string> _description;
 
@@ -104,63 +103,62 @@ namespace Tizen.Multimedia
     /// </summary>
     public class AudioMetadata
     {
-
-        protected AudioMetadata()
-        {
-        }
-
-        internal AudioMetadata(IntPtr handle)
+        internal AudioMetadata(int streamCount, IntPtr handle)
         {
+            Debug.Assert(streamCount > 0);
             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);
-            }
+            StreamCount = streamCount;
+            BitRate = ValueConverter.ToNullableInt(GetMetadata(handle, MetadataExtractorAttr.AudioBitrate));
+            Channels = ValueConverter.ToNullableInt(GetMetadata(handle, MetadataExtractorAttr.AudioChannels));
+            SampleRate = ValueConverter.ToNullableInt(GetMetadata(handle, MetadataExtractorAttr.AudioSamplerate));
+            BitPerSample = ValueConverter.ToNullableInt(GetMetadata(handle, MetadataExtractorAttr.AudioBitPerSample));
+            Codec = GetMetadata(handle, MetadataExtractorAttr.AudioCodec);
 
             _description = new Lazy<string>(() => ObjectDescriptionBuilder.BuildWithProperties(this));
         }
 
+        internal static AudioMetadata From(IntPtr handle)
+        {
+            var streamCount = ValueConverter.ToInt(GetMetadata(handle, MetadataExtractorAttr.AudioStreamCount));
+
+            return streamCount > 0 ? new AudioMetadata(streamCount, handle) : null;
+        }
+
         /// <summary>
         /// Gets the audio bitrate.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <value>A string representing the bitrate, or null if the information does not exists.</value>
-        public string Bitrate { get; }
+        /// <value>The bit rate value, or null if the information does not exist.</value>
+        public int? BitRate { get; }
 
         /// <summary>
         /// Gets the audio channels.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <value>A string representing the audio channels, or null if the information does not exists.</value>
-        public string Channels { get; }
+        /// <value>The number of the audio channels, or null if the information does not exist.</value>
+        public int? Channels { get; }
 
         /// <summary>
         /// Gets the audio sample rate.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <value>A string representing the sample rate, or null if the information does not exists.</value>
-        public string Samplerate { get; }
+        /// <value>The sample rate, or null if the information does not exist.</value>
+        public int? SampleRate { get; }
 
         /// <summary>
         /// Gets the bit per sample of the audio.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <value>A string representing the bit oer sample, or null if the information does not exists.</value>
-        public string BitPerSample { get; }
+        /// <value>The bit per sample, or null if the information does not exist.</value>
+        public int? BitPerSample { get; }
 
         /// <summary>
         /// Gets the audio stream count.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <value>A string representing the audio stream count, or null if the information does not exists.</value>
-        public string StreamCount { get; }
+        /// <value>The number of audio streams.</value>
+        public int StreamCount { get; }
 
         /// <summary>
         /// Gets the audio codec type.
@@ -181,19 +179,14 @@ namespace Tizen.Multimedia
     /// </summary>
     public class Metadata
     {
-
-        protected Metadata()
-        {
-        }
-
         internal Metadata(IntPtr handle)
         {
             Debug.Assert(handle != IntPtr.Zero);
 
-            Video = new VideoMetadata(handle);
-            Audio = new AudioMetadata(handle);
+            Video = VideoMetadata.From(handle);
+            Audio = AudioMetadata.From(handle);
 
-            Duration = GetMetadata(handle, MetadataExtractorAttr.Duration);
+            Duration = ValueConverter.ToNullableInt(GetMetadata(handle, MetadataExtractorAttr.Duration));
             Artist = GetMetadata(handle, MetadataExtractorAttr.Artist);
             Title = GetMetadata(handle, MetadataExtractorAttr.Title);
             Album = GetMetadata(handle, MetadataExtractorAttr.Album);
@@ -207,13 +200,13 @@ namespace Tizen.Multimedia
             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);
+            Longitude = ValueConverter.ToNullableDouble(GetMetadata(handle, MetadataExtractorAttr.Longitude));
+            Latitude = ValueConverter.ToNullableDouble(GetMetadata(handle, MetadataExtractorAttr.Latitude));
+            Altitude = ValueConverter.ToNullableDouble(GetMetadata(handle, MetadataExtractorAttr.Altitude));
             Conductor = GetMetadata(handle, MetadataExtractorAttr.Conductor);
-            UnsyncLyric = GetMetadata(handle, MetadataExtractorAttr.UnSyncLyrics);
-            SyncLyricCount = GetMetadata(handle, MetadataExtractorAttr.SyncLyricsNum);
-            RecordingDate = GetMetadata(handle, MetadataExtractorAttr.RecordingDate);
+            UnsyncLyrics = GetMetadata(handle, MetadataExtractorAttr.UnSyncLyrics);
+            SyncLyricsCount = ValueConverter.ToInt(GetMetadata(handle, MetadataExtractorAttr.SyncLyricsNum));
+            DateRecorded = GetMetadata(handle, MetadataExtractorAttr.RecordingDate);
             Rotation = GetMetadata(handle, MetadataExtractorAttr.Rotate);
             Content360 = GetMetadata(handle, MetadataExtractorAttr.ContentFor360);
 
@@ -224,173 +217,175 @@ namespace Tizen.Multimedia
         /// Gets the duration of the media.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <value>A string representing the duration, or null if the information does not exists.</value>
-        public string Duration { get; }
+        /// <value>The duration value, or null if the information does not exist.</value>
+        public int? Duration { get; }
 
         /// <summary>
         /// Gets the video metadata.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
+        /// <value>The video metadata, or null if the information does not exist.</value>
         public VideoMetadata Video { get; }
 
         /// <summary>
         /// Gets the audio metadata.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
+        /// <value>The audio metadata, or null if the information does not exist.</value>
         public AudioMetadata Audio { get; }
 
         /// <summary>
         /// Gets the artist of the media.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <value>A string representing the artist, or null if the information does not exists.</value>
+        /// <value>A string representing the artist, or null if the information does not exist.</value>
         public string Artist { get; }
 
         /// <summary>
         /// Gets the title of the media.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <value>A string representing the title, or null if the information does not exists.</value>
+        /// <value>A string representing the title, or null if the information does not exist.</value>
         public string Title { get; }
 
         /// <summary>
         /// Gets the album name of the media.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <value>A string representing the album name, or null if the information does not exists.</value>
+        /// <value>A string representing the album name, or null if the information does not exist.</value>
         public string Album { get; }
 
         /// <summary>
         /// Gets the album artist of the media.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <value>A string representing the album artist, or null if the information does not exists.</value>
+        /// <value>A string representing the album artist, or null if the information does not exist.</value>
         public string AlbumArtist { get; }
 
         /// <summary>
         /// Gets the genre of the media.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <value>A string representing the genre, or null if the information does not exists.</value>
+        /// <value>A string representing the genre, or null if the information does not exist.</value>
         public string Genre { get; }
 
         /// <summary>
         /// Gets the author of the media.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <value>A string representing the author, or null if the information does not exists.</value>
+        /// <value>A string representing the author, or null if the information does not exist.</value>
         public string Author { get; }
 
         /// <summary>
         /// Gets the copyright of the media.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <value>A string representing the copyright, or null if the information does not exists.</value>
+        /// <value>A string representing the copyright, or null if the information does not exist.</value>
         public string Copyright { get; }
 
         /// <summary>
         /// Gets the release date of the media.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <value>A string representing the release date, or null if the information does not exists.</value>
+        /// <value>A string representing the release date, or null if the information does not exist.</value>
         public string ReleaseDate { get; }
 
         /// <summary>
         /// Gets the description of the media.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <value>A string representing the description, or null if the information does not exists.</value>
+        /// <value>A string representing the description, or null if the information does not exist.</value>
         public string Description { get; }
 
         /// <summary>
         /// Gets the comment of the media.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <value>A string representing the comment, or null if the information does not exists.</value>
+        /// <value>A string representing the comment, or null if the information does not exist.</value>
         public string Comment { get; }
 
         /// <summary>
         /// Gets the track number of the media.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <value>A string representing the track number, or null if the information does not exists.</value>
+        /// <value>A string representing the track number, or null if the information does not exist.</value>
         public string TrackNumber { get; }
 
         /// <summary>
         /// Gets the classification of the media.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <value>A string representing the classification, or null if the information does not exists.</value>
+        /// <value>A string representing the classification, or null if the information does not exist.</value>
         public string Classification { get; }
 
         /// <summary>
         /// Gets the rating of the media.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <value>A string representing the rating, or null if the information does not exists.</value>
+        /// <value>A string representing the rating, or null if the information does not exist.</value>
         public string Rating { get; }
 
         /// <summary>
         /// Gets the longitude of the media.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <value>A string representing the longitude, or null if the information does not exists.</value>
-        public string Longitude { get; }
+        /// <value>The longitude value, or null if the information does not exist.</value>
+        public double? Longitude { get; }
 
         /// <summary>
         /// Gets the latitude of the media.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <value>A string representing the latitude, or null if the information does not exists.</value>
-        public string Latitude { get; }
+        /// <value>The latitude value, or null if the information does not exist.</value>
+        public double? Latitude { get; }
 
         /// <summary>
         /// Gets the altitude of the media.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <value>A string representing the altitude, or null if the information does not exists.</value>
-        public string Altitude { get; }
+        /// <value>The altitude value, or null if the information does not exist.</value>
+        public double? Altitude { get; }
 
         /// <summary>
         /// Gets the conductor of the media.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <value>A string representing the conductor, or null if the information does not exists.</value>
+        /// <value>A string representing the conductor, or null if the information does not exist.</value>
         public string Conductor { get; }
 
         /// <summary>
         /// Gets the unsynchronized lyrics of the media.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <value>A string representing the unsynchronized lyrics, or null if the information does not exists.</value>
-        public string UnsyncLyric { get; }
+        /// <value>A string representing the unsynchronized lyrics, or null if the information does not exist.</value>
+        public string UnsyncLyrics { get; }
 
         /// <summary>
         /// Gets the number of synchronized lyrics of the media.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <value>A string representing the number of the synchronized lyrics, or null if the information does not exists.</value>
-        public string SyncLyricCount { get; }
+        /// <value>The number of the synchronized lyrics.</value>
+        public int SyncLyricsCount { get; }
 
         /// <summary>
         /// Gets the recording date of the media.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <value>A string representing the recording date, or null if the information does not exists.</value>
-        public string RecordingDate { get; }
+        /// <value>A string representing the recording date, or null if the information does not exist.</value>
+        public string DateRecorded { get; }
 
         /// <summary>
         /// Gets the rotate(orientation) information of the media.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <value>A string representing the rotation information, or null if the information does not exists.</value>
+        /// <value>A string representing the rotation information, or null if the information does not exist.</value>
         public string Rotation { get; }
 
         /// <summary>
         /// Gets the information for 360 content of the media.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <value>A string representing the information for 360 content, or null if the information does not exists.</value>
+        /// <value>A string representing the information for 360 content, or null if the information does not exist.</value>
         public string Content360 { get; }
 
         private Lazy<string> _description;
index 7b49cdf..bc3514c 100755 (executable)
@@ -1,18 +1,18 @@
 /*
-* 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.
-*/
+ * 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.Runtime.InteropServices;
@@ -243,7 +243,7 @@ namespace Tizen.Multimedia
         /// <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="InvalidOperationException">An internal error occurs.</exception>
         /// <exception cref="ObjectDisposedException">The <see cref="MetadataExtractor"/> has been already disposed of.</exception>
         public byte[] GetFrameAt(uint timeStamp, bool accurate)
         {
@@ -306,6 +306,9 @@ namespace Tizen.Multimedia
             }
         }
 
+        /// <summary>
+        /// Releases all resources used by the <see cref="MetadataExtractor"/> object.
+        /// </summary>
         public void Dispose()
         {
             Dispose(true);
index 8388dec..574e7a4 100644 (file)
@@ -1,18 +1,18 @@
 /*
-* 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.
-*/
+ * 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
 {
index 9902b33..36d40a2 100644 (file)
@@ -1,19 +1,18 @@
 /*
-* 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.
-*/
-
+ * 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;
index a12d730..3081964 100755 (executable)
@@ -1,18 +1,18 @@
 /*
-* 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.
-*/
+ * 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
 {
@@ -25,8 +25,8 @@ namespace Tizen.Multimedia
         /// Initialize a new instance of the MetadataExtractor class with the specified lyrics and timestamp.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <param name="lyrics">The text of synclyrics to set.</param>
-        /// <param name="timestamp">The timestamp of synclyrics to set.</param>
+        /// <param name="lyrics">The text of synchronized lyrics.</param>
+        /// <param name="timestamp">The timestamp of synchronized lyrics.</param>
         public SyncLyrics(string lyrics, uint timestamp)
         {
             Lyrics = lyrics;
@@ -34,13 +34,13 @@ namespace Tizen.Multimedia
         }
 
         /// <summary>
-        /// The text representation of the lyrics.
+        /// Gets the text representation of the lyrics.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
         public string Lyrics { get; }
 
         /// <summary>
-        /// The time information of the lyrics.
+        /// Gets the time information of the lyrics.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
         public uint Timestamp { get; }
diff --git a/src/Tizen.Multimedia.Metadata/MetadataExtractor/ValueConverter.cs b/src/Tizen.Multimedia.Metadata/MetadataExtractor/ValueConverter.cs
new file mode 100644 (file)
index 0000000..aa6571e
--- /dev/null
@@ -0,0 +1,48 @@
+/*
+ * 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.Diagnostics;
+using static Interop.MetadataExtractor;
+
+namespace Tizen.Multimedia
+{
+    internal static class ValueConverter
+    {
+        internal static int? ToNullableInt(string str)
+        {
+            if (int.TryParse(str, out var value))
+            {
+                return value;
+            }
+            return null;
+        }
+
+        internal static int ToInt(string str)
+        {
+            return int.TryParse(str, out var value) ? value : 0;
+        }
+
+        internal static double? ToNullableDouble(string str)
+        {
+            if (double.TryParse(str, out var value))
+            {
+                return value;
+            }
+            return null;
+        }
+    }
+}
\ No newline at end of file