From 06c6e26a396ef07c614ba5691b02016e744802b6 Mon Sep 17 00:00:00 2001 From: bangdc90 <65581036+bangdc90@users.noreply.github.com> Date: Thu, 17 Oct 2024 17:04:41 +0700 Subject: [PATCH] Fix recording stopped when lossing video link --- .../main/java/com/openipc/pixelpilot/VideoActivity.java | 8 -------- 1 file changed, 8 deletions(-) diff --git a/app/src/main/java/com/openipc/pixelpilot/VideoActivity.java b/app/src/main/java/com/openipc/pixelpilot/VideoActivity.java index 516c0de..1e02945 100644 --- a/app/src/main/java/com/openipc/pixelpilot/VideoActivity.java +++ b/app/src/main/java/com/openipc/pixelpilot/VideoActivity.java @@ -94,7 +94,6 @@ public void run() { private Timer recordTimer = null; private int seconds = 0; private boolean isVRMode = false; - private boolean isStreaming = false; private ConstraintLayout constraintLayout; private ConstraintSet constraintSet; @@ -273,8 +272,6 @@ public void onStopTrackingTouch(SeekBar seekBar) { chart.setData(noData); binding.imgBtnRecord.setOnClickListener(item -> { - if(!isStreaming) return; - if (dvrFd == null) { Uri dvrUri = openDvrFile(); if (dvrUri != null) { @@ -352,7 +349,6 @@ public void onStopTrackingTouch(SeekBar seekBar) { SubMenu recording = popup.getMenu().addSubMenu("Recording"); MenuItem dvrBtn = recording.add(dvrFd == null ? "Start" : "Stop"); dvrBtn.setOnMenuItemClickListener(item -> { - if(!isStreaming) return false; if (dvrFd == null) { Uri dvrUri = openDvrFile(); if (dvrUri != null) { @@ -744,13 +740,9 @@ public void onWfbNgStatsChanged(WfbNGStats data) { paddedDigits(data.count_p_dec_ok, 6), paddedDigits(data.count_p_fec_recovered, 6), paddedDigits(data.count_p_lost, 6))); - isStreaming = true; } } else { binding.tvLinkStatus.setText("No wfb-ng data."); - isStreaming = false; - binding.imgBtnRecord.setImageResource(R.drawable.record); - stopDvr(); } }); }