|
1 | 1 | using MMALSharp.Components; |
2 | 2 | using MMALSharp.Native; |
3 | | -using MMALSharp.Utility; |
4 | 3 | using System; |
5 | 4 | using System.Collections.Generic; |
6 | 5 | using System.Linq; |
@@ -153,7 +152,7 @@ public async Task TakeRawPicture(ICaptureHandler handler) |
153 | 152 | { |
154 | 153 | Console.WriteLine($"Preparing to take picture - Resolution: {MMALCameraConfig.StillResolution.Width} x {MMALCameraConfig.StillResolution.Height}"); |
155 | 154 |
|
156 | | - await BeginProcessing(this.Camera, null, this.Camera.StillPort, 0); |
| 155 | + await BeginProcessing(this.Camera, null, this.Camera.StillPort, MMALCameraComponent.MMALCameraStillPort); |
157 | 156 | } |
158 | 157 | finally |
159 | 158 | { |
@@ -280,10 +279,10 @@ public async Task TakePictureTimelapse(MMALPortImpl connPort, Timelapse tl, bool |
280 | 279 | /// Helper method to begin processing image data. Starts the Camera port and awaits until processing is complete. |
281 | 280 | /// Cleans up resources upon finish. |
282 | 281 | /// </summary> |
283 | | - /// <param name="component"></param> |
284 | | - /// <param name="connection"></param> |
285 | | - /// <param name="cameraPort"></param> |
286 | | - /// <param name="outputPort"></param> |
| 282 | + /// <param name="component">The component we are processing data on</param> |
| 283 | + /// <param name="connection">The connection between </param> |
| 284 | + /// <param name="cameraPort">The camera port which image data is coming from</param> |
| 285 | + /// <param name="outputPort">The output port we are processing data from</param> |
287 | 286 | /// <returns>The awaitable Task</returns> |
288 | 287 | private async Task BeginProcessing(MMALComponentBase component, MMALConnectionImpl connection, MMALPortImpl cameraPort, int outputPort) |
289 | 288 | { |
@@ -412,29 +411,11 @@ public MMALCamera ConfigureCamera() |
412 | 411 | } |
413 | 412 |
|
414 | 413 | this.DisableCamera(); |
415 | | - |
416 | | - this.SetSaturation(MMALCameraConfig.Saturation); |
417 | | - this.SetSharpness(MMALCameraConfig.Sharpness); |
418 | | - this.SetContrast(MMALCameraConfig.Contrast); |
419 | | - this.SetBrightness(MMALCameraConfig.Brightness); |
420 | | - this.SetISO(MMALCameraConfig.ISO); |
421 | | - this.SetVideoStabilisation(MMALCameraConfig.VideoStabilisation); |
422 | | - this.SetExposureCompensation(MMALCameraConfig.ExposureCompensation); |
423 | | - this.SetExposureMode(MMALCameraConfig.ExposureMode); |
424 | | - this.SetExposureMeteringMode(MMALCameraConfig.ExposureMeterMode); |
425 | | - this.SetAwbMode(MMALCameraConfig.AwbMode); |
426 | | - this.SetAwbGains(MMALCameraConfig.AwbGainsR, MMALCameraConfig.AwbGainsB); |
427 | | - this.SetImageFx(MMALCameraConfig.ImageFx); |
428 | | - this.SetColourFx(MMALCameraConfig.ColourFx); |
429 | | - this.SetRotation(MMALCameraConfig.Rotation); |
430 | | - this.SetShutterSpeed(MMALCameraConfig.ShutterSpeed); |
431 | | - this.SetStatsPass(MMALCameraConfig.StatsPass); |
432 | | - this.SetDRC(MMALCameraConfig.DrcLevel); |
433 | | - this.SetFlips(MMALCameraConfig.Flips); |
434 | | - this.SetZoom(MMALCameraConfig.ROI); |
435 | | - |
436 | | - this.EnableCamera(); |
437 | 414 |
|
| 415 | + this.Camera.SetCameraParameters(); |
| 416 | + |
| 417 | + this.EnableCamera(); |
| 418 | + |
438 | 419 | return this; |
439 | 420 | } |
440 | 421 |
|
|
0 commit comments