File tree Expand file tree Collapse file tree 3 files changed +8
-7
lines changed Expand file tree Collapse file tree 3 files changed +8
-7
lines changed Original file line number Diff line number Diff line change 88////////////////////////////////////////////////////////////////////////////
99
1010using System ;
11+ using System . Diagnostics ;
1112using System . Linq ;
1213using System . Runtime . InteropServices ;
1314using System . Threading ;
@@ -175,7 +176,7 @@ public VideoBufferHandler(AVFoundationDevice device)
175176
176177 public override void DidDropSampleBuffer ( IntPtr captureOutput , IntPtr sampleBuffer , IntPtr connection )
177178 {
178- Console . WriteLine ( "Dropped" ) ;
179+ Debug . WriteLine ( "Dropped" ) ;
179180 var valid = CMSampleBufferIsValid ( sampleBuffer ) ;
180181 }
181182
Original file line number Diff line number Diff line change 88////////////////////////////////////////////////////////////////////////////
99
1010using System ;
11+ using System . Diagnostics ;
1112using System . Runtime . InteropServices ;
1213using FlashCap . Devices ;
1314using static FlashCap . Internal . NativeMethods_AVFoundation ;
@@ -95,7 +96,7 @@ public void SetSampleBufferDelegate(AVFoundationDevice.VideoBufferHandler sample
9596
9697 if ( sampleBufferDelegate == null )
9798 {
98- Console . WriteLine ( "AVCaptureVideoDataOutputSampleBufferDelegate is null" ) ;
99+ Debug . WriteLine ( "AVCaptureVideoDataOutputSampleBufferDelegate is null" ) ;
99100 return ;
100101 }
101102
Original file line number Diff line number Diff line change 88////////////////////////////////////////////////////////////////////////////
99
1010using System ;
11+ using System . Diagnostics ;
1112using System . Runtime . InteropServices ;
1213using System . Linq ;
1314using static FlashCap . Internal . NativeMethods_AVFoundation ;
@@ -188,8 +189,7 @@ public unsafe void LockForConfiguration()
188189 if ( errorHandle != IntPtr . Zero )
189190 {
190191 using var error = new LibObjC . NSError ( errorHandle , retain : true ) ;
191- Console . WriteLine ( error . Error ) ;
192- throw new InvalidOperationException ( /* error.FailureReason */ ) ;
192+ throw new InvalidOperationException ( error . Error ) ;
193193 }
194194 }
195195
@@ -358,8 +358,7 @@ private static unsafe IntPtr FromDevice(AVCaptureDevice device)
358358 if ( errorHandle != IntPtr . Zero )
359359 {
360360 using var error = new LibObjC . NSError ( errorHandle , retain : false ) ;
361- Console . WriteLine ( error . Error ) ;
362- throw new InvalidOperationException ( /* error.FailureReason */ ) ;
361+ throw new InvalidOperationException ( error . Error ) ;
363362 }
364363
365364 return inputHandle ;
@@ -404,7 +403,7 @@ static AVCaptureVideoDataOutputSampleBuffer()
404403 {
405404 4 => 2 ,
406405 8 => 3 ,
407- _ => throw new NotSupportedException ( "The current arhitecture isn't supported." )
406+ _ => throw new NotSupportedException ( "The current architecture isn't supported." )
408407 } ,
409408 types : "^v" ) ;
410409
You can’t perform that action at this time.
0 commit comments