Skip to content

Commit 06c6e26

Browse files
authored
Fix recording stopped when lossing video link
1 parent 9f78e76 commit 06c6e26

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

app/src/main/java/com/openipc/pixelpilot/VideoActivity.java

-8
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ public void run() {
9494
private Timer recordTimer = null;
9595
private int seconds = 0;
9696
private boolean isVRMode = false;
97-
private boolean isStreaming = false;
9897
private ConstraintLayout constraintLayout;
9998
private ConstraintSet constraintSet;
10099

@@ -273,8 +272,6 @@ public void onStopTrackingTouch(SeekBar seekBar) {
273272
chart.setData(noData);
274273

275274
binding.imgBtnRecord.setOnClickListener(item -> {
276-
if(!isStreaming) return;
277-
278275
if (dvrFd == null) {
279276
Uri dvrUri = openDvrFile();
280277
if (dvrUri != null) {
@@ -352,7 +349,6 @@ public void onStopTrackingTouch(SeekBar seekBar) {
352349
SubMenu recording = popup.getMenu().addSubMenu("Recording");
353350
MenuItem dvrBtn = recording.add(dvrFd == null ? "Start" : "Stop");
354351
dvrBtn.setOnMenuItemClickListener(item -> {
355-
if(!isStreaming) return false;
356352
if (dvrFd == null) {
357353
Uri dvrUri = openDvrFile();
358354
if (dvrUri != null) {
@@ -744,13 +740,9 @@ public void onWfbNgStatsChanged(WfbNGStats data) {
744740
paddedDigits(data.count_p_dec_ok, 6),
745741
paddedDigits(data.count_p_fec_recovered, 6),
746742
paddedDigits(data.count_p_lost, 6)));
747-
isStreaming = true;
748743
}
749744
} else {
750745
binding.tvLinkStatus.setText("No wfb-ng data.");
751-
isStreaming = false;
752-
binding.imgBtnRecord.setImageResource(R.drawable.record);
753-
stopDvr();
754746
}
755747
});
756748
}

0 commit comments

Comments
 (0)