#region Dispose support
/// <summary>
- /// Release any unmanaged resources used by this object.
+ /// Releases the unmanaged resources used by the Camera.
/// </summary>
- /// <since_tizen> 3 </since_tizen>
- public void Dispose()
- {
- ReplaceDisplay(null);
- Dispose(true);
- GC.SuppressFinalize(this);
- }
-
+ /// <param name="disposing">true to release both managed and unmanaged resources; false to release only unmanaged resources.</param>
protected virtual void Dispose(bool disposing)
{
if (!_disposed)
}
}
+ /// <summary>
+ /// Releases all resources used by the Camera.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ public void Dispose()
+ {
+ ReplaceDisplay(null);
+ Dispose(true);
+ GC.SuppressFinalize(this);
+ }
+
internal void ValidateNotDisposed()
{
if (_disposed)
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();
public event EventHandler<CameraStateChangedEventArgs> StateChanged;
private Native.StateChangedCallback _stateChangedCallback;
- #region DeviceStateChanged callback
+ #region DeviceStateChanged callback
internal static Native.DeviceStateChangedCallback _deviceStateChangedCallback;
private static event EventHandler<CameraDeviceStateChangedEventArgs> _deviceStateChanged;
private static object _deviceStateChangedEventLock = new object();
}
#endregion DeviceStateChanged callback
- #region Preview EventHandler
+ #region Preview EventHandler
private Native.PreviewCallback _previewCallback;
private event EventHandler<PreviewEventArgs> _preview;
private object _previewEventLock = new object();
}
}
}
- #endregion Preview EventHandler
+ #endregion Preview EventHandler
- #region MediaPacketPreview EventHandler
+ #region MediaPacketPreview EventHandler
private Native.MediaPacketPreviewCallback _mediaPacketPreviewCallback;
private EventHandler<MediaPacketPreviewEventArgs> _mediaPacketPreview;
private object _mediaPacketPreviewEventLock = new object();
}
}
#endregion MediaPacketPreview EventHandler
-
#endregion EventHandlers
#region Properties
_faceDetectedCallback = null;
}
-#endregion Methods
+ #endregion Methods
-#region Callback registrations
+ #region Callback registrations
private void RegisterCallbacks()
{
RegisterErrorCallback();
CameraErrorFactory.ThrowIfError(Native.SetMediaPacketPreviewCallback(_handle, _mediaPacketPreviewCallback, IntPtr.Zero),
"Setting media packet preview callback failed");
}
-#endregion Callback registrations
+ #endregion Callback registrations
}
}
#region Dispose support
/// <summary>
- /// Release any unmanaged resources used by this object.
+ /// Releases the unmanaged resources used by the Recorder.
/// </summary>
- /// <since_tizen> 3 </since_tizen>
- public void Dispose()
- {
- Dispose(true);
- GC.SuppressFinalize(this);
- }
-
+ /// <param name="disposing">true to release both managed and unmanaged resources; false to release only unmanaged resources.</param>
protected virtual void Dispose(bool disposing)
{
if (!_disposed)
}
}
+ /// <summary>
+ /// Releases all resources used by the Recorder.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ public void Dispose()
+ {
+ Dispose(true);
+ GC.SuppressFinalize(this);
+ }
+
internal void ValidateNotDisposed()
{
if (_disposed)
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();
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();
RecorderErrorFactory.ThrowIfError(Native.SetMuxedStreamCallback(_handle, _muxedStreamCallback, IntPtr.Zero),
"Setting muxed stream callback failed");
}
-#endregion Callback registrations
+ #endregion Callback registrations
}
}