Skip to content

Two or more cameras switch problem #165

@zhchlmm

Description

@zhchlmm

When I use more than one cameras and switch from one to another, the first one sometimes closed but sometimes did not close properly.

Before I open a new camera, I stop the camera by following code:

if (this.captureDevice != null)
{
// Discard capture device.
if (this.captureDevice.IsRunning)
{
await this.captureDevice.StopAsync();
}

if (this.captureDevice != null)
{
    await this.captureDevice.DisposeAsync();
    //this.captureDevice.Dispose();
    this.captureDevice = null;
}

}

Is there anything wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is neededquestionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions