From bbb490b0cc2e4aa0fb8e90fbd22230b3e880d4c6 Mon Sep 17 00:00:00 2001 From: coderhyme Date: Fri, 24 Mar 2017 11:39:22 +0900 Subject: [PATCH] Fix minor issues including ToString, Exceptions and comments. Change-Id: I753d13b3c7cf15bd0d974c265b7e93e7aaee8826 Signed-off-by: coderhyme --- src/Tizen.Multimedia/AudioIO/AudioCapture.cs | 4 +- src/Tizen.Multimedia/AudioIO/AudioPlayback.cs | 4 +- src/Tizen.Multimedia/Interop/Interop.Player.cs | 4 +- src/Tizen.Multimedia/MediaTool/MediaFormat.cs | 58 +++++++++++----------- .../MediaTool/MediaFormatAacType.cs | 9 ++++ src/Tizen.Multimedia/MediaVision/Barcode.cs | 4 +- .../Player/BufferingProgressChangedEventArgs.cs | 2 +- src/Tizen.Multimedia/Player/DownloadProgress.cs | 2 +- src/Tizen.Multimedia/Player/EqualizerBand.cs | 4 +- .../MediaStreamBufferStatusChangedEventArgs.cs | 2 +- .../Player/MediaStreamSeekingOccurredEventArgs.cs | 2 +- .../Player/PlaybackInterruptedEventArgs.cs | 2 +- src/Tizen.Multimedia/Player/Player.cs | 50 ++++++++----------- src/Tizen.Multimedia/Player/PlayerEnums.cs | 2 - .../Player/PlayerErrorOccurredEventArgs.cs | 2 +- src/Tizen.Multimedia/Player/StreamInfo.cs | 8 ++- .../Player/SubtitleUpdatedEventArgs.cs | 4 +- .../Player/VideoStreamChangedEventArgs.cs | 6 +-- 18 files changed, 84 insertions(+), 85 deletions(-) diff --git a/src/Tizen.Multimedia/AudioIO/AudioCapture.cs b/src/Tizen.Multimedia/AudioIO/AudioCapture.cs index d7e68ad..c18434e 100755 --- a/src/Tizen.Multimedia/AudioIO/AudioCapture.cs +++ b/src/Tizen.Multimedia/AudioIO/AudioCapture.cs @@ -25,8 +25,8 @@ namespace Tizen.Multimedia /// The recorder privilege(http://tizen.org/privilege/recorder) is required. public abstract class AudioCaptureBase : IDisposable { - public const int MinSampleRate = 8000; - public const int MaxSampleRate = 48000; + public readonly int MinSampleRate = 8000; + public readonly int MaxSampleRate = 48000; internal IntPtr _handle = IntPtr.Zero; diff --git a/src/Tizen.Multimedia/AudioIO/AudioPlayback.cs b/src/Tizen.Multimedia/AudioIO/AudioPlayback.cs index ef38513..64b43b5 100755 --- a/src/Tizen.Multimedia/AudioIO/AudioPlayback.cs +++ b/src/Tizen.Multimedia/AudioIO/AudioPlayback.cs @@ -23,8 +23,8 @@ namespace Tizen.Multimedia /// public class AudioPlayback : IDisposable { - public const int MinSampleRate = 8000; - public const int MaxSampleRate = 48000; + public readonly int MinSampleRate = 8000; + public readonly int MaxSampleRate = 48000; private IntPtr _handle = IntPtr.Zero; diff --git a/src/Tizen.Multimedia/Interop/Interop.Player.cs b/src/Tizen.Multimedia/Interop/Interop.Player.cs index 047e887..ce29111 100644 --- a/src/Tizen.Multimedia/Interop/Interop.Player.cs +++ b/src/Tizen.Multimedia/Interop/Interop.Player.cs @@ -64,7 +64,7 @@ namespace Tizen.Multimedia internal static extern int SetUri(IntPtr player, string uri); [DllImport(Libraries.Player, EntryPoint = "player_set_display")] - internal static extern int SetDisplay(IntPtr player, int type, IntPtr display); + internal static extern int SetDisplay(IntPtr player, PlayerDisplayType type, IntPtr display); [DllImport(Libraries.Player, EntryPoint = "player_start")] internal static extern int Start(IntPtr player); @@ -287,4 +287,4 @@ namespace Tizen.Multimedia } } -} \ No newline at end of file +} diff --git a/src/Tizen.Multimedia/MediaTool/MediaFormat.cs b/src/Tizen.Multimedia/MediaTool/MediaFormat.cs index 8f5bb77..13fc270 100755 --- a/src/Tizen.Multimedia/MediaTool/MediaFormat.cs +++ b/src/Tizen.Multimedia/MediaTool/MediaFormat.cs @@ -105,7 +105,7 @@ namespace Tizen.Multimedia /// Fill out properties of a native media format with the current media format object. /// /// A native handle to be written. - protected abstract void AsNativeHandle(IntPtr handle); + internal abstract void AsNativeHandle(IntPtr handle); } /// @@ -117,7 +117,7 @@ namespace Tizen.Multimedia /// Initializes a new instance of the ContainerMediaFormat class. /// /// The mime type of the container format. - /// mimeType is invalid(i.e. undefined value). + /// mimeType is invalid(i.e. undefined value). public ContainerMediaFormat(MediaFormatContainerMimeType mimeType) : base(MediaFormatType.Container) { @@ -157,7 +157,7 @@ namespace Tizen.Multimedia get; } - protected override void AsNativeHandle(IntPtr handle) + internal override void AsNativeHandle(IntPtr handle) { Debug.Assert(Type == MediaFormatType.Container); @@ -168,7 +168,7 @@ namespace Tizen.Multimedia public override string ToString() { - return $"[{ nameof(ContainerMediaFormat) }] MimeType : { MimeType }"; + return $"MimeType={ MimeType.ToString() }"; } public override bool Equals(object obj) @@ -202,8 +202,8 @@ namespace Tizen.Multimedia /// The mime type of the format. /// The width value of the format. /// The height value of the format - /// mimeType is invalid(i.e. undefined value). - /// width, or height is less than zero. + /// mimeType is invalid(i.e. undefined value). + /// width, or height is less than zero. public VideoMediaFormat(MediaFormatVideoMimeType mimeType, int width, int height) : this(mimeType, width, height, DefaultFrameRate) { @@ -214,8 +214,8 @@ namespace Tizen.Multimedia /// /// The mime type of the format. /// The size of the format. - /// mimeType is invalid(i.e. undefined value). - /// width, or height is less than zero. + /// mimeType is invalid(i.e. undefined value). + /// width, or height is less than zero. public VideoMediaFormat(MediaFormatVideoMimeType mimeType, Size size) : this(mimeType, size, DefaultFrameRate) { @@ -229,8 +229,8 @@ namespace Tizen.Multimedia /// The width value of the format. /// The height value of the format /// The frame rate of the format. - /// mimeType is invalid(i.e. undefined value). - /// width, height or frameRate is less than zero. + /// mimeType is invalid(i.e. undefined value). + /// width, height or frameRate is less than zero. public VideoMediaFormat(MediaFormatVideoMimeType mimeType, int width, int height, int frameRate) : this(mimeType, width, height, frameRate, DefaultBitRate) @@ -245,8 +245,8 @@ namespace Tizen.Multimedia /// The video size of the format. /// The height value of the format /// The frame rate of the format. - /// mimeType is invalid(i.e. undefined value). - /// width, height or frameRate is less than zero. + /// mimeType is invalid(i.e. undefined value). + /// width, height or frameRate is less than zero. public VideoMediaFormat(MediaFormatVideoMimeType mimeType, Size size, int frameRate) : this(mimeType, size, frameRate, DefaultBitRate) @@ -262,8 +262,8 @@ namespace Tizen.Multimedia /// The height value of the format /// The frame rate of the format. /// The bit rate of the format. - /// mimeType is invalid(i.e. undefined value). - /// width, height, frameRate or bitRate is less than zero. + /// mimeType is invalid(i.e. undefined value). + /// width, height, frameRate or bitRate is less than zero. public VideoMediaFormat(MediaFormatVideoMimeType mimeType, int width, int height, int frameRate, int bitRate) : this(mimeType, new Size(width, height), frameRate, bitRate) @@ -278,8 +278,8 @@ namespace Tizen.Multimedia /// The size of the format. /// The frame rate of the format. /// The bit rate of the format. - /// mimeType is invalid(i.e. undefined value). - /// width, height, frameRate or bitRate is less than zero. + /// mimeType is invalid(i.e. undefined value). + /// width, height, frameRate or bitRate is less than zero. public VideoMediaFormat(MediaFormatVideoMimeType mimeType, Size size, int frameRate, int bitRate) : base(MediaFormatType.Video) @@ -376,7 +376,7 @@ namespace Tizen.Multimedia MultimediaDebug.AssertNoError(ret); } - protected override void AsNativeHandle(IntPtr handle) + internal override void AsNativeHandle(IntPtr handle) { Debug.Assert(Type == MediaFormatType.Video); @@ -418,8 +418,8 @@ namespace Tizen.Multimedia public override string ToString() { - return $"MimeType : { MimeType }, Size : ({ Size }), " - + $"FrameRate : { FrameRate }, BitRate : { BitRate }"; + return $@"MimeType={ MimeType.ToString() }, Size=({ Size.ToString() }), FrameRate= + { FrameRate.ToString() }, BitRate={ BitRate.ToString() }"; } public override bool Equals(object obj) @@ -455,8 +455,8 @@ namespace Tizen.Multimedia /// The sample rate value of the format. /// The bit value of the format. /// The bit rate value of the format. - /// mimeType is invalid(i.e. undefined value). - /// + /// mimeType is invalid(i.e. undefined value). + /// /// channel, sampleRate, bit or bitRate is less than zero. public AudioMediaFormat(MediaFormatAudioMimeType mimeType, int channel, int sampleRate, int bit, int bitRate) @@ -473,12 +473,12 @@ namespace Tizen.Multimedia /// The sample rate value of the format. /// The bit value of the format. /// The bit rate value of the format. - /// + /// /// mimeType or aacType is invalid(i.e. undefined value). /// - or - /// aacType is not , but mimeType is one of aac types. /// - /// + /// /// channel, sampleRate, bit or bitRate is less than zero. public AudioMediaFormat(MediaFormatAudioMimeType mimeType, int channel, int sampleRate, int bit, int bitRate, MediaFormatAacType aacType) @@ -613,7 +613,7 @@ namespace Tizen.Multimedia Debug.Assert(Enum.IsDefined(typeof(MediaFormatAacType), aacType), "Invalid aac type!"); } - protected override void AsNativeHandle(IntPtr handle) + internal override void AsNativeHandle(IntPtr handle) { Debug.Assert(Type == MediaFormatType.Audio); @@ -668,8 +668,8 @@ namespace Tizen.Multimedia public override string ToString() { - return $"MimeType : {MimeType }, Channel : { Channel }, SampleRate : { SampleRate }, " - + $"Bit : { Bit }, BitRate : { BitRate }, AacType : { AacType }"; + return $@"MimeTyp={ MimeType.ToString() }, Channel={ Channel.ToString() }, SampleRate= + { SampleRate }, Bit={ Bit.ToString() }, BitRate={ BitRate.ToString() }, AacType={ AacType.ToString() }"; } public override bool Equals(object obj) @@ -701,7 +701,7 @@ namespace Tizen.Multimedia /// /// The mime type of the format. /// The text type of the format. - /// + /// /// mimeType or textType is invalid(i.e. undefined value). public TextMediaFormat(MediaFormatTextMimeType mimeType, MediaFormatTextType textType) : base(MediaFormatType.Text) @@ -761,7 +761,7 @@ namespace Tizen.Multimedia "Invalid text type!"); } - protected override void AsNativeHandle(IntPtr handle) + internal override void AsNativeHandle(IntPtr handle) { Debug.Assert(Type == MediaFormatType.Text); @@ -784,7 +784,7 @@ namespace Tizen.Multimedia public override string ToString() { - return $"[{ nameof(TextMediaFormat) }] MimeType : { MimeType }, TextType : { TextType }"; + return $"MimeType={ MimeType.ToString() }, TextType={ TextType.ToString() }"; } public override bool Equals(object obj) diff --git a/src/Tizen.Multimedia/MediaTool/MediaFormatAacType.cs b/src/Tizen.Multimedia/MediaTool/MediaFormatAacType.cs index 2d34a9b..6839c9f 100644 --- a/src/Tizen.Multimedia/MediaTool/MediaFormatAacType.cs +++ b/src/Tizen.Multimedia/MediaTool/MediaFormatAacType.cs @@ -21,8 +21,17 @@ namespace Tizen.Multimedia /// public enum MediaFormatAacType { + /// + /// Raw, no header + /// None, + /// + /// ADTS header + /// Adts, + /// + /// ADIF header + /// Adif } } diff --git a/src/Tizen.Multimedia/MediaVision/Barcode.cs b/src/Tizen.Multimedia/MediaVision/Barcode.cs index 3f44428..d9a1210 100755 --- a/src/Tizen.Multimedia/MediaVision/Barcode.cs +++ b/src/Tizen.Multimedia/MediaVision/Barcode.cs @@ -24,9 +24,9 @@ namespace Tizen.Multimedia /// /// Initializes a new instance of the class. /// - public Barcode(Quadrangle location, string message, BarcodeType type) + public Barcode(Quadrangle region, string message, BarcodeType type) { - Region = location; + Region = region; Message = message; Type = type; } diff --git a/src/Tizen.Multimedia/Player/BufferingProgressChangedEventArgs.cs b/src/Tizen.Multimedia/Player/BufferingProgressChangedEventArgs.cs index 3203178..57c6e15 100644 --- a/src/Tizen.Multimedia/Player/BufferingProgressChangedEventArgs.cs +++ b/src/Tizen.Multimedia/Player/BufferingProgressChangedEventArgs.cs @@ -35,7 +35,7 @@ namespace Tizen.Multimedia public override string ToString() { - return $"Percent : { Percent }"; + return $"Percent={ Percent.ToString() }"; } } } diff --git a/src/Tizen.Multimedia/Player/DownloadProgress.cs b/src/Tizen.Multimedia/Player/DownloadProgress.cs index feeeea8..c496863 100644 --- a/src/Tizen.Multimedia/Player/DownloadProgress.cs +++ b/src/Tizen.Multimedia/Player/DownloadProgress.cs @@ -55,7 +55,7 @@ namespace Tizen.Multimedia public override string ToString() { - return $"Start : { Start }, Current: { Current }"; + return $"Start={ Start.ToString() }, Current={ Current.ToString() }"; } } } diff --git a/src/Tizen.Multimedia/Player/EqualizerBand.cs b/src/Tizen.Multimedia/Player/EqualizerBand.cs index 0b0c7ee..4b574bc 100644 --- a/src/Tizen.Multimedia/Player/EqualizerBand.cs +++ b/src/Tizen.Multimedia/Player/EqualizerBand.cs @@ -53,7 +53,7 @@ namespace Tizen.Multimedia /// Sets the gain for the equalizer band. /// /// The value indicating new gain in decibel(dB). - /// The player that this EqualuzerBand belongs to has already been disposed of. + /// The player that this EqualizerBand belongs to has already been disposed of. /// /// value is less than . /// -or- @@ -83,7 +83,7 @@ namespace Tizen.Multimedia /// /// Gets the gain for the equalizer band. /// - /// The player that this EqualuzerBand belongs to has already been disposed of. + /// The player that this EqualizerBand belongs to has already been disposed of. public int GetLevel() { Log.Debug(PlayerLog.Tag, PlayerLog.Enter); diff --git a/src/Tizen.Multimedia/Player/MediaStreamBufferStatusChangedEventArgs.cs b/src/Tizen.Multimedia/Player/MediaStreamBufferStatusChangedEventArgs.cs index 7ce3130..321d6cf 100644 --- a/src/Tizen.Multimedia/Player/MediaStreamBufferStatusChangedEventArgs.cs +++ b/src/Tizen.Multimedia/Player/MediaStreamBufferStatusChangedEventArgs.cs @@ -39,7 +39,7 @@ namespace Tizen.Multimedia public override string ToString() { - return $"Status : { Status }"; + return $"Status : { Status.ToString() }"; } } } diff --git a/src/Tizen.Multimedia/Player/MediaStreamSeekingOccurredEventArgs.cs b/src/Tizen.Multimedia/Player/MediaStreamSeekingOccurredEventArgs.cs index 9e857e0..7ac76fd 100644 --- a/src/Tizen.Multimedia/Player/MediaStreamSeekingOccurredEventArgs.cs +++ b/src/Tizen.Multimedia/Player/MediaStreamSeekingOccurredEventArgs.cs @@ -36,6 +36,6 @@ namespace Tizen.Multimedia /// public ulong Offset { get; } - public override string ToString() => $"Offset : { Offset }"; + public override string ToString() => $"Offset : { Offset.ToString() }"; } } diff --git a/src/Tizen.Multimedia/Player/PlaybackInterruptedEventArgs.cs b/src/Tizen.Multimedia/Player/PlaybackInterruptedEventArgs.cs index 3369a27..3d47563 100644 --- a/src/Tizen.Multimedia/Player/PlaybackInterruptedEventArgs.cs +++ b/src/Tizen.Multimedia/Player/PlaybackInterruptedEventArgs.cs @@ -38,7 +38,7 @@ namespace Tizen.Multimedia public override string ToString() { - return $"Reason : { Reason }"; + return $"Reason : { Reason.ToString() }"; } } } diff --git a/src/Tizen.Multimedia/Player/Player.cs b/src/Tizen.Multimedia/Player/Player.cs index 1f5730d..2c4ddc1 100755 --- a/src/Tizen.Multimedia/Player/Player.cs +++ b/src/Tizen.Multimedia/Player/Player.cs @@ -153,7 +153,7 @@ namespace Tizen.Multimedia { Log.Debug(PlayerLog.Tag, PlayerLog.Enter); RegisterSubtitleUpdatedCallback(); - RegisterErrorOccuuredCallback(); + RegisterErrorOccurredCallback(); RegisterPlaybackInterruptedCallback(); RegisterVideoStreamChangedCallback(); RegisterBufferingCallback(); @@ -389,14 +389,14 @@ namespace Tizen.Multimedia if (display == null) { Log.Info(PlayerLog.Tag, "set display to none"); - return Interop.Player.SetDisplay(_handle, (int)PlayerDisplayType.None, IntPtr.Zero); + return Interop.Player.SetDisplay(_handle, PlayerDisplayType.None, IntPtr.Zero); } Log.Info(PlayerLog.Tag, "set display to " + display.Type + " (" + display.EvasObject + ")"); Debug.Assert(Enum.IsDefined(typeof(PlayerDisplayType), display.Type)); Debug.Assert(display.EvasObject != null); - return Interop.Player.SetDisplay(_handle, (int)display.Type, display.EvasObject); + return Interop.Player.SetDisplay(_handle, display.Type, display.EvasObject); } private void ReplaceDisplay(PlayerDisplay newDisplay) @@ -699,7 +699,7 @@ namespace Tizen.Multimedia if (!File.Exists(path)) { - throw new FileNotFoundException($"The specified file does not exist : { path }."); + throw new FileNotFoundException($"The specified file does not exist.", path); } PlayerErrorConverter.ThrowIfError(Interop.Player.SetSubtitlePath(_handle, path), @@ -942,14 +942,14 @@ namespace Tizen.Multimedia /// The player must be in the or state. /// The player has already been disposed of. /// The player is not in the valid state. - public Task CaptureVideoAsync() + public async Task CaptureVideoAsync() { Log.Debug(PlayerLog.Tag, PlayerLog.Enter); ValidatePlayerState(PlayerState.Playing, PlayerState.Paused); TaskCompletionSource t = new TaskCompletionSource(); - Interop.Player.VideoCaptureCallback cb = (data, width, height, size, gchPtr) => + Interop.Player.VideoCaptureCallback cb = (data, width, height, size, _) => { Debug.Assert(size <= int.MaxValue); @@ -957,25 +957,16 @@ namespace Tizen.Multimedia Marshal.Copy(data, buf, 0, (int)size); t.TrySetResult(new CapturedFrame(buf, width, height)); - - GCHandle.FromIntPtr(gchPtr).Free(); }; - var gch = GCHandle.Alloc(cb); - try + using (var cbKeeper = ObjectKeeper.Get(cb)) { PlayerErrorConverter.ThrowIfError( - Interop.Player.CaptureVideo(_handle, cb, GCHandle.ToIntPtr(gch)), + Interop.Player.CaptureVideo(_handle, cb, IntPtr.Zero), "Failed to capture the video"); - } - catch(Exception) - { - gch.Free(); - throw; - } - Log.Debug(PlayerLog.Tag, PlayerLog.Leave); - return t.Task; + return await t.Task; + } } /// @@ -1033,7 +1024,7 @@ namespace Tizen.Multimedia /// The player is not in the valid state. /// The specified position is not valid. /// - public Task SetPlayPositionAsync(int position, bool accurate) + public async Task SetPlayPositionAsync(int position, bool accurate) { Log.Debug(PlayerLog.Tag, PlayerLog.Enter); ValidatePlayerState(PlayerState.Ready, PlayerState.Playing, PlayerState.Paused); @@ -1044,15 +1035,18 @@ namespace Tizen.Multimedia Interop.Player.SeekCompletedCallback cb = _ => taskCompletionSource.TrySetResult(true); - SetPlayPosition(position, accurate, cb); - if (immediateResult) + using (var cbKeeper = ObjectKeeper.Get(cb)) { - taskCompletionSource.TrySetResult(true); + SetPlayPosition(position, accurate, cb); + if (immediateResult) + { + taskCompletionSource.TrySetResult(true); + } + + await taskCompletionSource.Task; } Log.Debug(PlayerLog.Tag, PlayerLog.Leave); - - return taskCompletionSource.Task; } /// @@ -1176,7 +1170,7 @@ namespace Tizen.Multimedia PlayerErrorConverter.ThrowIfError(ret, "Failed to set PlaybackInterrupted"); } - private void RegisterErrorOccuuredCallback() + private void RegisterErrorOccurredCallback() { _playbackErrorCallback = (code, _) => { @@ -1229,8 +1223,8 @@ namespace Tizen.Multimedia { Log.Debug(PlayerLog.Tag, "height : " + height + ", width : " + width + ", fps : " + fps + ", bitrate : " + bitrate); - VideoStreamChangedEventArgs eventArgs = new VideoStreamChangedEventArgs(height, width, fps, bitrate); - VideoStreamChanged?.Invoke(this, eventArgs); + + VideoStreamChanged?.Invoke(this, new VideoStreamChangedEventArgs(height, width, fps, bitrate)); }; int ret = Interop.Player.SetVideoStreamChangedCb(GetHandle(), _videoStreamChangedCallback, IntPtr.Zero); if (ret != (int)PlayerErrorCode.None) diff --git a/src/Tizen.Multimedia/Player/PlayerEnums.cs b/src/Tizen.Multimedia/Player/PlayerEnums.cs index 12fc51b..4197b46 100644 --- a/src/Tizen.Multimedia/Player/PlayerEnums.cs +++ b/src/Tizen.Multimedia/Player/PlayerEnums.cs @@ -75,8 +75,6 @@ namespace Tizen.Multimedia /// Paused, - - //TODO is this needed? /// /// Preparing in progress. /// diff --git a/src/Tizen.Multimedia/Player/PlayerErrorOccurredEventArgs.cs b/src/Tizen.Multimedia/Player/PlayerErrorOccurredEventArgs.cs index fb104b2..30b7a06 100644 --- a/src/Tizen.Multimedia/Player/PlayerErrorOccurredEventArgs.cs +++ b/src/Tizen.Multimedia/Player/PlayerErrorOccurredEventArgs.cs @@ -38,7 +38,7 @@ namespace Tizen.Multimedia public override string ToString() { - return $"Error : { Error }"; + return $"Error={ Error.ToString() }"; } } } diff --git a/src/Tizen.Multimedia/Player/StreamInfo.cs b/src/Tizen.Multimedia/Player/StreamInfo.cs index 080adee..20832fa 100644 --- a/src/Tizen.Multimedia/Player/StreamInfo.cs +++ b/src/Tizen.Multimedia/Player/StreamInfo.cs @@ -63,10 +63,8 @@ namespace Tizen.Multimedia set; } - public override string ToString() - { - return $"SampleRate : { SampleRate }, Channels : { Channels }, BitRate : { BitRate }"; - } + public override string ToString() => + $"SampleRate={ SampleRate.ToString() }, Channels={ Channels.ToString() }, BitRate={ BitRate.ToString() }"; } /// @@ -125,7 +123,7 @@ namespace Tizen.Multimedia public override string ToString() { - return $"Fps : { Fps }, BitRate : { BitRate }, Size : [{ Size }]"; + return $"Fps={ Fps.ToString() }, BitRate={ BitRate.ToString() }, Size=[{ Size.ToString() }]"; } } diff --git a/src/Tizen.Multimedia/Player/SubtitleUpdatedEventArgs.cs b/src/Tizen.Multimedia/Player/SubtitleUpdatedEventArgs.cs index 4db7528..d37ae43 100644 --- a/src/Tizen.Multimedia/Player/SubtitleUpdatedEventArgs.cs +++ b/src/Tizen.Multimedia/Player/SubtitleUpdatedEventArgs.cs @@ -29,7 +29,7 @@ namespace Tizen.Multimedia } /// - /// Gets the he duration of the updated subtitl . + /// Gets the he duration of the updated subtitle. /// public uint Duration { get; } @@ -41,7 +41,7 @@ namespace Tizen.Multimedia public override string ToString() { - return $"Duration : { Duration }, Text : { Text }"; + return $"Duration={ Duration.ToString() }, Text={ Text }"; } } } diff --git a/src/Tizen.Multimedia/Player/VideoStreamChangedEventArgs.cs b/src/Tizen.Multimedia/Player/VideoStreamChangedEventArgs.cs index b671ef8..db7312f 100644 --- a/src/Tizen.Multimedia/Player/VideoStreamChangedEventArgs.cs +++ b/src/Tizen.Multimedia/Player/VideoStreamChangedEventArgs.cs @@ -29,11 +29,11 @@ namespace Tizen.Multimedia /// /// Initialize a new instance of the VideoStreamChangedEventArgs class. /// - internal VideoStreamChangedEventArgs(int height, int width, int fps, int bitrate) + internal VideoStreamChangedEventArgs(int height, int width, int fps, int bitRate) { Size = new Size(width, height); Fps = fps; - BitRate = bitrate; + BitRate = bitRate; } /// @@ -53,7 +53,7 @@ namespace Tizen.Multimedia public override string ToString() { - return $"Size : ({ Size }), Fps : { Fps }, BitRate : { BitRate }"; + return $"Size=({ Size.ToString() }), Fps={ Fps.ToString() }, BitRate={ BitRate.ToString() }"; } } } -- 2.7.4