Content to RSID Support
I have added an admin Login page to enable enrollment by authenticated users only. This page is the copy of Mainwindow.xaml. Simultaneously, this page will authenticate users in loop. Users will enter the valid credentials and log in to the Main window. We are calling Canceljob() & _authenticate.Disconnect() functions to stop the camera functionality in the login page before opening the Mainwindow.xaml. In the MainWindow Page camera preview is not working. We request your help to resolve this by activating camera preview functionality in II Screen.
As per new logic:
Landing Page: LoginWindow.xaml (Ist Screen)
After authentication: MainWindow.xaml (II nd Screen)
-
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 -
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 -
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. -
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.
-
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 -
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.
-
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,
MuneshIntel Customer Support
Please sign in to leave a comment.
Comments
11 comments