Coder Social home page Coder Social logo

Comments (4)

qian256 avatar qian256 commented on May 29, 2024

Currently, the ARUWPVideo can pause/resume. Have you tried if the camera can be accessed from your app when the video is paused? What API are you using to access the webcam? If you are using Windows UWP MediaCapture API, you should be able to insert your functionality into the frame receiving callback without turning off the webcam. If you are using Unity WebcamTexture API, I do not know how the resources are shared (My guess is MediaCapture for HoloLensARToolKit needs to be totally stopped).

from hololensartoolkit.

Baxab avatar Baxab commented on May 29, 2024

I am using Unity VideoCapture class. Yes, it can access the webcam when HoloLensARToolkit is paused, but the problem is that I can not know when the resource will be available, since the Pause() function is async and it takes a while for it to finish its execution and free the webcam resource. Is there a way to detect when HoloLensARToolkit stops?

from hololensartoolkit.

ericalbers avatar ericalbers commented on May 29, 2024

the pause looks like it ends up calling StopFrameReaderAsyncTask, in ARUWPVideo.cs which will change
controller.status to ARUWP.ARUWP_STATUS_CTRL_INITIALIZED; when its done
Adding a GetStatus to return controller.status might be useful, or perhaps sending event when status changes

from hololensartoolkit.

qian256 avatar qian256 commented on May 29, 2024

@Baxab The pause is a .NET asynchronous function, which returns before it is really done. As mentioned by @ericalbers , you can check controller status because controller.status = ARUWP.ARUWP_STATUS_CTRL_INITIALIZED; is called after the async function really done.

from hololensartoolkit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.