@@ -36,9 +36,9 @@ public int connect(String address, String username, String password) {
3636 int result = CONNECT_ERROR ;
3737 String camIP = "" ;
3838 try {
39-
39+
4040 camIP = getURL (address );
41-
41+
4242 nvt = new OnvifDevice (camIP , username , password );
4343 nvt .getSoap ().setLogging (false );
4444 nvt .getDevices ().getCapabilities ().getDevice ();
@@ -47,7 +47,7 @@ public int connect(String address, String username, String password) {
4747 profiles = nvt .getDevices ().getProfiles ();
4848
4949
50- if (profiles != null )
50+ if (profiles != null )
5151 {
5252 for (Profile profile : profiles ) {
5353 if (profile .getPTZConfiguration () != null ) {
@@ -58,7 +58,7 @@ public int connect(String address, String username, String password) {
5858 if (profileToken == null ) {
5959 profileToken = profiles .get (0 ).getToken ();
6060 }
61-
61+
6262 result = CONNECTION_SUCCESS ;
6363 }
6464 else {
@@ -71,20 +71,20 @@ public int connect(String address, String username, String password) {
7171
7272 //connection error. Let the user check ip address
7373 result = CONNECT_ERROR ;
74- }
74+ }
7575 return result ;
7676 }
77-
77+
7878 @ Override
7979 public String [] getProfiles () {
8080 String profilesStr [] = null ;
8181 try {
8282 List <Profile > profilesLocal = nvt .getDevices ().getProfiles ();
8383
84- if (profilesLocal != null )
84+ if (profilesLocal != null )
8585 {
8686 int i = 0 ;
87- profilesStr = new String [profilesLocal .size ()];
87+ profilesStr = new String [profilesLocal .size ()];
8888 for (Profile profile : profilesLocal ) {
8989 if (profile .getPTZConfiguration () != null ) {
9090 profilesStr [i ++] = nvt .getMedia ().getRTSPStreamUri (profile .getToken ());
@@ -93,7 +93,7 @@ public String[] getProfiles() {
9393 }
9494 } catch (ConnectException | SOAPException e ) {
9595 // nothing to do
96- }
96+ }
9797 return profilesStr ;
9898 }
9999
@@ -125,19 +125,19 @@ public String getTCPStreamURI() {
125125
126126 } catch (ConnectException | SOAPException e ) {
127127 logger .error (ExceptionUtils .getStackTrace (e ));
128- }
128+ }
129129 return rtspURL ;
130130 }
131-
132-
131+
132+
133133 public boolean moveContinous (float x , float y , float zoom ) {
134134 return ptzDevices .continuousMove (profileToken , x , y , zoom );
135135 }
136-
136+
137137 public boolean moveRelative (float x , float y , float zoom ) {
138138 return ptzDevices .relativeMove (profileToken , x , y , zoom );
139139 }
140-
140+
141141 public boolean moveAbsolute (float x , float y , float zoom ) {
142142 boolean result = false ;
143143 try {
@@ -256,7 +256,7 @@ public boolean isFocusModeAuto() {
256256 public boolean setDateTime (java .sql .Date date , java .sql .Time time ) {
257257 return false ;
258258 }
259-
259+
260260 public String getURL (String url ) {
261261
262262 String [] ipAddrParts = null ;
@@ -284,4 +284,4 @@ public String getURL (String url) {
284284 return ipAddr ;
285285 }
286286
287- }
287+ }
0 commit comments