RE: process scheduling

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance




Hi

Can someone please help me figure out this issue. I didnt get a response for
my last post so sorry for posting it again.

Hi all
I have two processes running on my application. The first process has five
threads to perform following functions; collect data from different sensors,
process the data, display the data graphically and logs few important data in
a file and kicks off the second process by sending its handle through command
line. The second process is just displaying a video from four different
camera's. Half of the screen displays graphical data from the sensor and
quarter screen is occupied by the video from cameras.

I am using few API calls in my second process to switch between camera and
to switch camera view from quarter to full screen (processed on
WM_LBUTTONUP).

Scenario 1:
When i run my video process as standalone i dont have any problem doing
either of this functions (changing cameras, switching between quarter and
full).

Scenario 2:
Running both the process on my application but with disabling four threads
(on first process)used for data collection, processing and logging. No
problem in doing either of the video function on my second process

Scenario 3:
When i run both of my process (without disabling any threads on my first
process)i dont have problem switching between cameras but as soon as i try
switching between quarter and full screen of the video few times i just end
up on a blank screen. I assume the video is still in the background but
screen just freezes to blank; because if i touch the screen again it bring
the video back in quarter mode. Seems to me there is some processor demand
issue are priority problem.

Here is my pseudocode.

Case:
WM_LBUTTONUP:
touch_screen_pressed();
break;

touch_screen_pressed()
{
toggle_touch = !toggle_touch;
disable_video();
if(toggle_touch)
{
SetWindowPos(hWnd,HWND_TOPMOST,BASE_X_COORDINATE,BASE_Y_COORDINATE,SCREEN_WIDTH,SCREEN_HEIGHT,NULL);
videoscreen = FULL_SCREEN;
start_video(videoscreen,BASE_X_COORDINATE,BASE_Y_COORDINATE);
}
else
{
SetWindowPos(hWnd,HWND_TOPMOST,BASE_X_COORDINATE,BASE_Y_COORDINATE,QUARTER_SCREEN_WIDTH,QUARTER_SCREEN_HEIGHT,NULL);
videoscreen = QUARTER_SCREEN;
start_video(videoscreen,BASE_X_COORDINATE,BASE_Y_COORDINATE);
}
enable_video();
}

I would really appreciate if someone could shed some light here.

thanks

thanks

Hi all
I have two processes running on my application. The first process has five
threads to perform following functions; collect data from different sensors,
process the data, display the data graphically and logs few important data in
a file and kicks off the second process by sending its handle through command
line. The second process is just displaying a video from four different
camera's. Half of the screen displays graphical data from the sensor and
quarter screen is occupied by the video from cameras.

I am using few API calls in my second process to switch between camera and
to switch camera view from quarter to full screen (processed on
WM_LBUTTONUP).

Scenario 1:
When i run my video process as standalone i dont have any problem doing
either of this functions (changing cameras, switching between quarter and
full).

Scenario 2:
Running both the process on my application but with disabling four threads
(on first process)used for data collection, processing and logging. No
problem in doing either of the video function on my second process

Scenario 3:
When i run both of my process (without disabling any threads on my first
process)i dont have problem switching between cameras but as soon as i try
switching between quarter and full screen of the video few times i just end
up on a blank screen. I assume the video is still in the background but
screen just freezes to blank; because if i touch the screen again it bring
the video back in quarter mode. Seems to me there is some processor demand
issue are priority problem.

Here is my pseudocode.

Case:
WM_LBUTTONUP:
touch_screen_pressed();
break;

touch_screen_pressed()
{
toggle_touch = !toggle_touch;
disable_video();
if(toggle_touch)
{
SetWindowPos(hWnd,HWND_TOPMOST,BASE_X_COORDINATE,BASE_Y_COORDINATE,SCREEN_WIDTH,SCREEN_HEIGHT,NULL);
videoscreen = FULL_SCREEN;
start_video(videoscreen,BASE_X_COORDINATE,BASE_Y_COORDINATE);
}
else
{
SetWindowPos(hWnd,HWND_TOPMOST,BASE_X_COORDINATE,BASE_Y_COORDINATE,QUARTER_SCREEN_WIDTH,QUARTER_SCREEN_HEIGHT,NULL);
videoscreen = QUARTER_SCREEN;
start_video(videoscreen,BASE_X_COORDINATE,BASE_Y_COORDINATE);
}
enable_video();
}

I would really appreciate if someone could shed some light here.

thanks
.


Quantcast