|
|
|
@ -213,7 +213,6 @@ public class DeviceActivity extends AppCompatActivity {
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
final File fileTmp = new File(getFilesDir(), "tmp");
|
|
|
|
|
if (!fileTmp.exists()) {
|
|
|
|
|
fileTmp.mkdirs();
|
|
|
|
@ -664,12 +663,30 @@ public class DeviceActivity extends AppCompatActivity {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void showStreaming(int channel, int cameraId, final String url, String localIp) {
|
|
|
|
|
|
|
|
|
|
int rotation = -1;
|
|
|
|
|
int usb = 0;
|
|
|
|
|
Integer chVal = Integer.valueOf(channel);
|
|
|
|
|
if (mChannelCfgs.containsKey(chVal)) {
|
|
|
|
|
JSONObject jsonChannel = mChannelCfgs.get(chVal);
|
|
|
|
|
|
|
|
|
|
if (jsonChannel != null) {
|
|
|
|
|
int orientation = jsonChannel.optInt("orientation", 0);
|
|
|
|
|
if (orientation > 0) {
|
|
|
|
|
rotation = (orientation - 1) * 90;
|
|
|
|
|
}
|
|
|
|
|
usb = jsonChannel.optInt("usbCamera", 0);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Intent intent = new Intent(this, StreamActivity.class);
|
|
|
|
|
intent.putExtra("url", url);
|
|
|
|
|
intent.putExtra("localIp", localIp);
|
|
|
|
|
intent.putExtra("deviceIp", mDeviceIp);
|
|
|
|
|
intent.putExtra("cameraId", cameraId);
|
|
|
|
|
intent.putExtra("channel", channel);
|
|
|
|
|
intent.putExtra("rotation", rotation);
|
|
|
|
|
intent.putExtra("usb", usb);
|
|
|
|
|
intent.putExtra("cmdid", TextUtils.isEmpty(mAppConfig.cmdid) ? "" : mAppConfig.cmdid);
|
|
|
|
|
// intent.putExtra("info", info);
|
|
|
|
|
startActivity(intent);
|
|
|
|
|