From: Haesu Gwon Date: Tue, 4 Jul 2017 11:02:49 +0000 (+0900) Subject: [Camera/Recorder] Updated comments X-Git-Tag: submit/trunk/20170823.075128~94^2~34 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=10875b2f2dde68273b10032974591808d5801af9;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git [Camera/Recorder] Updated comments Change-Id: Ie1e3e366aa878ded2316d1f9fa7cc91a2181b976 Signed-off-by: Haesu Gwon --- diff --git a/src/Tizen.Multimedia.Camera/Camera/Camera.cs b/src/Tizen.Multimedia.Camera/Camera/Camera.cs index 8d915ac..ac50a24 100755 --- a/src/Tizen.Multimedia.Camera/Camera/Camera.cs +++ b/src/Tizen.Multimedia.Camera/Camera/Camera.cs @@ -82,16 +82,9 @@ namespace Tizen.Multimedia #region Dispose support /// - /// Release any unmanaged resources used by this object. + /// Releases the unmanaged resources used by the Camera. /// - /// 3 - public void Dispose() - { - ReplaceDisplay(null); - Dispose(true); - GC.SuppressFinalize(this); - } - + /// true to release both managed and unmanaged resources; false to release only unmanaged resources. protected virtual void Dispose(bool disposing) { if (!_disposed) @@ -111,6 +104,17 @@ namespace Tizen.Multimedia } } + /// + /// Releases all resources used by the Camera. + /// + /// 3 + public void Dispose() + { + ReplaceDisplay(null); + Dispose(true); + GC.SuppressFinalize(this); + } + internal void ValidateNotDisposed() { if (_disposed) @@ -119,9 +123,9 @@ namespace Tizen.Multimedia throw new ObjectDisposedException(nameof(Camera)); } } -#endregion Dispose support + #endregion Dispose support -#region Check camera state + #region Check camera state internal void ValidateState(params CameraState[] required) { ValidateNotDisposed(); @@ -200,7 +204,7 @@ namespace Tizen.Multimedia public event EventHandler StateChanged; private Native.StateChangedCallback _stateChangedCallback; - #region DeviceStateChanged callback + #region DeviceStateChanged callback internal static Native.DeviceStateChangedCallback _deviceStateChangedCallback; private static event EventHandler _deviceStateChanged; private static object _deviceStateChangedEventLock = new object(); @@ -263,7 +267,7 @@ namespace Tizen.Multimedia } #endregion DeviceStateChanged callback - #region Preview EventHandler + #region Preview EventHandler private Native.PreviewCallback _previewCallback; private event EventHandler _preview; private object _previewEventLock = new object(); @@ -302,9 +306,9 @@ namespace Tizen.Multimedia } } } - #endregion Preview EventHandler + #endregion Preview EventHandler - #region MediaPacketPreview EventHandler + #region MediaPacketPreview EventHandler private Native.MediaPacketPreviewCallback _mediaPacketPreviewCallback; private EventHandler _mediaPacketPreview; private object _mediaPacketPreviewEventLock = new object(); @@ -345,7 +349,6 @@ namespace Tizen.Multimedia } } #endregion MediaPacketPreview EventHandler - #endregion EventHandlers #region Properties @@ -841,9 +844,9 @@ namespace Tizen.Multimedia _faceDetectedCallback = null; } -#endregion Methods + #endregion Methods -#region Callback registrations + #region Callback registrations private void RegisterCallbacks() { RegisterErrorCallback(); @@ -953,7 +956,7 @@ namespace Tizen.Multimedia CameraErrorFactory.ThrowIfError(Native.SetMediaPacketPreviewCallback(_handle, _mediaPacketPreviewCallback, IntPtr.Zero), "Setting media packet preview callback failed"); } -#endregion Callback registrations + #endregion Callback registrations } } diff --git a/src/Tizen.Multimedia.Recorder/Recorder/Recorder.cs b/src/Tizen.Multimedia.Recorder/Recorder/Recorder.cs index 1013fb7..701981c 100755 --- a/src/Tizen.Multimedia.Recorder/Recorder/Recorder.cs +++ b/src/Tizen.Multimedia.Recorder/Recorder/Recorder.cs @@ -88,15 +88,9 @@ namespace Tizen.Multimedia #region Dispose support /// - /// Release any unmanaged resources used by this object. + /// Releases the unmanaged resources used by the Recorder. /// - /// 3 - public void Dispose() - { - Dispose(true); - GC.SuppressFinalize(this); - } - + /// true to release both managed and unmanaged resources; false to release only unmanaged resources. protected virtual void Dispose(bool disposing) { if (!_disposed) @@ -114,6 +108,16 @@ namespace Tizen.Multimedia } } + /// + /// Releases all resources used by the Recorder. + /// + /// 3 + public void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + internal void ValidateNotDisposed() { if (_disposed) @@ -121,9 +125,9 @@ namespace Tizen.Multimedia throw new ObjectDisposedException(nameof(Recorder)); } } -#endregion Dispose support + #endregion Dispose support -#region Check recorder state + #region Check recorder state internal void ValidateState(params RecorderState[] required) { ValidateNotDisposed(); @@ -388,9 +392,9 @@ namespace Tizen.Multimedia RecorderErrorFactory.ThrowIfError(Native.SetAudioStreamPolicy(_handle, policy.Handle), "Failed to set audio stream policy"); } -#endregion Methods + #endregion Methods -#region Callback registrations + #region Callback registrations private void RegisterCallbacks() { RegisterErrorCallback(); @@ -473,6 +477,6 @@ namespace Tizen.Multimedia RecorderErrorFactory.ThrowIfError(Native.SetMuxedStreamCallback(_handle, _muxedStreamCallback, IntPtr.Zero), "Setting muxed stream callback failed"); } -#endregion Callback registrations + #endregion Callback registrations } }