/// <summary> /// Sets the image format that color captures will be converted to. By default the conversion format will be the same as /// the image format stored in the recording file, and no conversion will occur. /// </summary> /// <param name="format">The target image format to be returned in captures.</param> /// <remarks><para> /// After the color conversion format is set, all <see cref="Sensor.Capture"/> objects returned from the playback handle will have /// their color images converted to the <paramref name="format"/>. /// </para><para> /// Color format conversion occurs in the user-thread, so setting <paramref name="format"/> to anything other than the format /// stored in the file may significantly increase the latency of <see cref="TryGetNextCapture(out Sensor.Capture)"/> and /// <see cref="TryGetPreviousCapture(out Sensor.Capture)"/>. /// </para></remarks> /// <exception cref="ObjectDisposedException">This method cannot be called for disposed object.</exception> /// <exception cref="InvalidOperationException">Format <paramref name="format"/> is not supported for color conversion.</exception> public void SetColorConversion(Sensor.ImageFormat format) { var res = NativeApi.PlaybackSetColorConversion(handle.ValueNotDisposed, format); if (res != NativeCallResults.Result.Succeeded) { throw new NotSupportedException($"Format {format} is not supported for color conversion."); } }
public static extern NativeCallResults.Result PlaybackSetColorConversion( NativeHandles.PlaybackHandle playbackHandle, Sensor.ImageFormat targetFormat);