Microphone Detector and Video Detector and Recorder working simultaniously
This commit is contained in:
parent
4baf3db1bb
commit
f329fab62d
@ -9,11 +9,14 @@ import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
import android.widget.ToggleButton;
|
||||
|
||||
import com.example.ueberwachungssystem.Detection.DetectionReport;
|
||||
import com.example.ueberwachungssystem.Detection.Detector;
|
||||
import com.example.ueberwachungssystem.Detection.VideoDetector;
|
||||
import com.example.ueberwachungssystem.logger.Logger;
|
||||
import com.jjoe64.graphview.GraphView;
|
||||
|
||||
@ExperimentalGetImage
|
||||
public class MainActivity extends AppCompatActivity {
|
||||
@ -29,6 +32,17 @@ public class MainActivity extends AppCompatActivity {
|
||||
PreviewView previewView = findViewById(R.id.previewView);
|
||||
|
||||
|
||||
// Mic stuff
|
||||
TextView textView= (TextView) findViewById(R.id.textView); //Set textview for showing logged content
|
||||
Logger logger = new Logger(this.getClass().getSimpleName(), textView, "");
|
||||
GraphView graph = (GraphView) findViewById(R.id.graph);
|
||||
MicrophoneDetector mic = new MicrophoneDetector(this, logger, graph);
|
||||
mic.startDetection();
|
||||
|
||||
|
||||
|
||||
|
||||
// video Stuff
|
||||
VideoDetector vd = new VideoDetector(this);
|
||||
//vd.setPreviewView(previewView);
|
||||
vd.debugProcessing(inputImageView, outputImageView);
|
||||
|
@ -10,6 +10,12 @@
|
||||
tools:context=".MainActivity">
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="100dp"
|
||||
android:text="TextView" />
|
||||
|
||||
<androidx.camera.view.PreviewView
|
||||
android:id="@+id/previewView"
|
||||
android:layout_width="match_parent"
|
||||
@ -31,8 +37,20 @@
|
||||
<ImageView
|
||||
android:id="@+id/outputImageView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="1dp"
|
||||
tools:srcCompat="@tools:sample/avatars" />
|
||||
|
||||
<com.jjoe64.graphview.GraphView
|
||||
android:id="@+id/graph"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="200dip"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.499" />
|
||||
|
||||
|
||||
</LinearLayout>
|
Loading…
x
Reference in New Issue
Block a user