增加传递的信息

main
Matthew 4 months ago
parent 5d169817d9
commit f4cbfd7cda

@ -650,6 +650,7 @@ public class DeviceActivity extends AppCompatActivity {
int rotation = -1;
int usb = 0;
int netCamera = 0;
int vendor = 0;
Integer chVal = Integer.valueOf(channel);
if (mChannelCfgs.containsKey(chVal)) {
JSONObject jsonChannel = mChannelCfgs.get(chVal);
@ -662,6 +663,8 @@ public class DeviceActivity extends AppCompatActivity {
int cameraType = jsonChannel.optInt("cameraType", 0);
usb = (cameraType == 1) ? 1 : 0;
netCamera = (cameraType == 2 || cameraType == 4) ? 1 : 0;
vendor = jsonChannel.optInt("vendor", 0);
}
}
@ -673,6 +676,7 @@ public class DeviceActivity extends AppCompatActivity {
intent.putExtra("channel", channel);
intent.putExtra("rotation", rotation);
intent.putExtra("netCamera", netCamera);
intent.putExtra("vendor", vendor);
intent.putExtra("usb", usb);
intent.putExtra("cmdid", TextUtils.isEmpty(mAppConfig.cmdid) ? "" : mAppConfig.cmdid);
// intent.putExtra("info", info);

@ -62,6 +62,7 @@ public class StreamActivity extends AppCompatActivity {
int channel = intent.getIntExtra("channel", 1);
int rotation = intent.getIntExtra("rotation", -1);
int netCamera = intent.getIntExtra("netCamera", 0);
int vendor = intent.getIntExtra("vendor", 0);
actionBar.setTitle(getResources().getString(R.string.channel) + Integer.toString(channel));
@ -71,6 +72,7 @@ public class StreamActivity extends AppCompatActivity {
+ " --ei cameraId " + Integer.toString(cameraId)
+ " --ei rotation " + Integer.toString(rotation)
+ " --ei netCamera " + Integer.toString(netCamera)
+ " --ei vendor " + Integer.toString(vendor)
+ " --ei autoStart 1"
+ " --es url \"" + url + "\"";

Loading…
Cancel
Save