Skip to content

Commit 2d40e73

Browse files
committed
Add video info: resolution, fps, name
1 parent 3b2e61e commit 2d40e73

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

app/src/main/java/com/dan/videostab/MainActivity.kt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -702,5 +702,12 @@ class MainActivity : AppCompatActivity() {
702702
binding.seekBarStrength.isEnabled = canStabilize
703703
binding.crop.isEnabled = canStabilize
704704
binding.fps.isEnabled = canStabilize
705+
706+
val videoProps = this.videoProps
707+
if (null != videoProps) {
708+
binding.info.text = "${videoProps.width} x ${videoProps.height}, fps: ${videoProps.frameRate}, $videoName"
709+
} else {
710+
binding.info.text = ""
711+
}
705712
}
706713
}

app/src/main/res/layout/activity_main.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@
1111
android:orientation="vertical"
1212
android:padding="10dp">
1313

14+
<TextView
15+
android:id="@+id/info"
16+
android:layout_width="match_parent"
17+
android:layout_height="wrap_content"
18+
android:singleLine="true" />
19+
1420
<LinearLayout
1521
android:layout_width="match_parent"
1622
android:layout_height="wrap_content"

0 commit comments

Comments
 (0)