Ask Your Question

alextrof94's profile - activity

2016-03-10 15:16:17 -0600 commented question Program works differently from IDE and from system

help me please!

2016-03-05 00:37:23 -0600 asked a question Program works differently from IDE and from system

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.