Program works differently from IDE and from system

asked 2016-03-04 16:27:29 -0600

Using a simple code to open the camera:

// hardcoded for this time
string _pathToCam = "rtsp://192.168.2.2:554/user=admin&password=&channel=1&stream=0.sdp?real_stream--rtp-caching=100";
if (_pathToCam.length() > 1)
    vc.open(_pathToCam);
else
    vc.open(0);

if (!vc.isOpened())
{
    cerr << "Can't open stream!";
    return 1;
}

Using router for connect pc to cam. When I run the program from the IDE - program is operating normally, but when I run programm from system (by clicking at exe file), program can't open the camera. When I connect camera to pc without router - program is operating normally by running exe too.

SYSTEM = IDE = TRUE
IDE + ROUTER = TRUE 
SYSTEM + ROUTER = FALSE

What could be the problem?

Additional info:

P.S.: sorry for my english.

edit retag flag offensive close merge delete

Comments

help me please!

alextrof94 gravatar imagealextrof94 ( 2016-03-10 15:16:17 -0600 )edit