Skip to content

Commit

Permalink
Fix recording stopped when lossing video link
Browse files Browse the repository at this point in the history
  • Loading branch information
bangdc90 authored Oct 17, 2024
1 parent 9f78e76 commit 06c6e26
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions app/src/main/java/com/openipc/pixelpilot/VideoActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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();
}
});
}
Expand Down

0 comments on commit 06c6e26

Please sign in to comment.