0

My application written in Visual C++ executes an external program with system function call. A system command is a call of stereoscopic player instance with certain stereo 3D video file and fullscreen mode passed as parameters.

The problem is that stereoscopic player called from C++ app plays video very slowly. Executing the same command from Windows cmd doesn't cause such behaviour.

When I run built-in Windows CPU load analyzer I get the following results (I can attach a screenshot if needed):

  • The stereoscopic player instance executed from cmd loads all available cores simultaneously for 40-50% each (I tried with 2 and 4 cores on different machines).
  • The stereoscopic player instance executed from C++ app loads the first core for 90-100% and doesn't load other cores.

How can I solve this problem?

Andrey Pesoshin
  • 1,136
  • 1
  • 14
  • 30

1 Answers1

2

Try using SetProcessAffinityMask for the process you are spawning

Flot2011
  • 4,601
  • 3
  • 44
  • 61