Skip to content

Commit

Permalink
Wait for stop on exit
Browse files Browse the repository at this point in the history
  • Loading branch information
gavazquez committed Mar 28, 2020
1 parent c6f7a0d commit ea4bcdb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion GazeTrackerCore/Lister/CameraLister.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public static IEnumerable<Camera> GetAvailableCameras()
videoSource.SignalToStop();
videoSource.WaitForStop();

var camera = new Camera(device.MonikerString, device.Name, resolutions, new RawImage(bitmap), CameraType.Ps3Eye);
var camera = new Camera(device.MonikerString, device.Name, resolutions, new RawImage(new Bitmap(bitmap)), CameraType.Ps3Eye);
bitmap = null;

yield return camera;
Expand Down
1 change: 1 addition & 0 deletions GazeTrackerCore/Producer/DirectShowFrameProducer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public override void Dispose()
{
base.Dispose();
_videoSource.SignalToStop();
_videoSource.WaitForStop();
}

public override void ReadFrames(BroadcastBlock<FrameData> broadcast)
Expand Down

0 comments on commit ea4bcdb

Please sign in to comment.