View my account

Content to RSID Support

Comments

11 comments

  • Munesh

    Hello Revathi,
    There is only one pipe for the Preview functionality. Before showing the Preview in the second screen, you must stop the preview and release the handle from the first screen. On the second screen, you must start the preview all over again.

    Sincerely,
    Jesus G.
    Intel Customer Support

    0
    Comment actions Permalink
  • Revathi

    thanks for your reply

    0
    Comment actions Permalink
  • Revathi
    Request you to share your code or function name to stop the preview and release the handle from the first screen. We have spent enough time on this and could not resolve.
     
     
     
    0
    Comment actions Permalink
  • Munesh

    Hello Revathi,

    Use the preview.StopPreview() API. In C#, check the rsid-viewer tool, MainWindow.xaml.cs, line 2042. The StopPreview call releases the handle.

     

    Sincerely,
    Jesus G.
    Intel Customer Support

    0
    Comment actions Permalink
  • Revathi

    Hello Munesh,

    As per your guidance, I had used _preview.Stop(), CancelJob() and _authenticator.Disconnect() in first screen before opening the next screen. At that point of time the we are getting the error in the second screen  "Attempted to read or write protected memory This is often an indication that other memory". Please find below the screenshot for your reference:

     
    Request your assistance on this error at the earliest.
     
     
     
     
    0
    Comment actions Permalink
  • Munesh

    Hi Revathi,
    How are you implementing the callbacks?
    Would you please share your codes with us? 

    Regards,
    Munesh

    Intel Customer Support

     
    0
    Comment actions Permalink
  • Revathi

    1. The following code is for opening the second screen from the first screen:

    private void LoginButton_Click(object sender, RoutedEventArgs e)
    {
    _preview.Stop();
    CancelJob();
    _authenticator.Disconnect();
    MainWindow login= new MainWindow();
    login.Show();
    this.Close();
    }

    2. The following code is for opening the first screen from the second screen:

    private void LogoutButton_Click(object sender, RoutedEventArgs e)
    {
    _preview.Stop();
    CancelJob();
    _authenticator.Disconnect();
    LoginWindow window = new LoginWindow();
    window.Show();
    this.Close();
    }

     

    First Screen: LoginWindow.xaml

    Second Screen: MainWindow.xaml

    Issues:

    1. The second screen is opened from the first screen after clicking the settings button It's automatically closing.

    2. some time opening the second screen from the first screen. some time does't open the second screen.

    How to solve the above two issues?

    Request to help as soon as possible. 

    0
    Comment actions Permalink
  • Munesh

    Hi Revathi,
    You must use authenticator.Connect() before running the Preview. Check how ConnectAuth(), which calls _authenticator.Connect, is used in the RSID Viewer tool.

    Regards,
    Munesh
    Intel Customer Support

    0
    Comment actions Permalink
  • Revathi

    I have followed your solution to open camera preview in the second screen from first screen and vice versa. It is working without any issues for 4 to 5 times. After that the application is stopping its functionality. When we debug the source of error is varying time to time. We are providing the screenshot of the error and the places / code where the error is generated.

    error line number:366

    file name : Authenticator.cs in wrappers folder.

    0
    Comment actions Permalink
  • Munesh

    Hi Revathi,
    It looks like the second window is trying to access the memory resources before it is released. Use mutexes to ensure that resources are not being accessed simultaneously. 

    You can refer to the following links for information on implementing mutex lock.
    rs-motion Sample and rs-motion.cpp
    rs-callback Sample and rs-callback.cpp

    Additionally, please do some research on "Mutex and Thread Safety" as well.

    Regards,
    Munesh

    Intel Customer Support

    0
    Comment actions Permalink
  • Revathi

    Hi Munesh,

    Thanks, I have solved the  above problem using mutex concept.

    0
    Comment actions Permalink

Please sign in to leave a comment.