Skip to content

Instantly share code, notes, and snippets.

@iamcxa
Created November 9, 2016 17:45
Show Gist options
  • Save iamcxa/592a7c62a8efddbfa46337061cfa49f5 to your computer and use it in GitHub Desktop.
Save iamcxa/592a7c62a8efddbfa46337061cfa49f5 to your computer and use it in GitHub Desktop.
RTSP player with screen capture
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/LinearLayout1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<EditText
android:id="@+id/editText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ems="10"
android:text="rtsp://mpv.cdn3.bigCDN.com:554/bigCDN/definst/mp4:bigbuckbunnyiphone_400.mp4">
<requestFocus />
</EditText>
<Button
android:id="@+id/playButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Play" />
<Button
android:text="save video frame"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/btnCapture" />
<TextureView
android:id="@+id/rtspVideo"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:alpha="1"
tools:foreground="#000" />
</LinearLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment