├── README.md ├── VideoCreation ├── ic_launcher-web.png ├── res │ ├── drawable-hdpi │ │ └── ic_launcher.png │ ├── drawable-mdpi │ │ └── ic_launcher.png │ ├── drawable-xhdpi │ │ └── ic_launcher.png │ ├── drawable-xxhdpi │ │ └── ic_launcher.png │ ├── values │ │ ├── strings.xml │ │ └── styles.xml │ ├── values-v11 │ │ └── styles.xml │ ├── values-v14 │ │ └── styles.xml │ └── layout │ │ ├── activity_render_from_surface.xml │ │ ├── activity_main.xml │ │ └── activity_join.xml ├── .classpath ├── project.properties ├── proguard-project.txt ├── .project ├── AndroidManifest.xml └── src │ └── com │ └── roryhool │ └── videocreation │ ├── RenderFromSurfaceActivity.java │ ├── MainActivity.java │ ├── JoinActivity.java │ └── SurfaceEncoder.java ├── VideoPlayback ├── ic_launcher-web.png ├── res │ ├── drawable-hdpi │ │ ├── ic_launcher.png │ │ ├── ic_media_play.png │ │ ├── ic_media_pause.png │ │ ├── ic_vidcontrol_fullscreen_off.png │ │ └── ic_vidcontrol_fullscreen_on.png │ ├── drawable-mdpi │ │ ├── ic_launcher.png │ │ ├── ic_media_play.png │ │ ├── ic_media_pause.png │ │ ├── ic_vidcontrol_fullscreen_off.png │ │ └── ic_vidcontrol_fullscreen_on.png │ ├── drawable-xhdpi │ │ ├── ic_launcher.png │ │ ├── ic_media_pause.png │ │ ├── ic_media_play.png │ │ ├── ic_vidcontrol_fullscreen_on.png │ │ └── ic_vidcontrol_fullscreen_off.png │ ├── drawable-xxhdpi │ │ └── ic_launcher.png │ ├── values │ │ ├── dimens.xml │ │ ├── strings.xml │ │ ├── colors.xml │ │ └── styles.xml │ ├── drawable │ │ └── button_selector.xml │ ├── values-v11 │ │ └── styles.xml │ ├── values-v14 │ │ └── styles.xml │ └── layout │ │ ├── activity_play_with_mediaplayer.xml │ │ ├── activity_decode_with_mediacodec.xml │ │ ├── video_player.xml │ │ └── activity_main.xml ├── .classpath ├── project.properties ├── proguard-project.txt ├── .project ├── AndroidManifest.xml └── src │ └── com │ └── roryhool │ └── videoplayback │ ├── PlayWithMediaPlayerActivity.java │ ├── PlaybackTimer.java │ ├── DecodeWithMediaCodecActivity.java │ ├── ControllerBase.java │ ├── ResizeAnimation.java │ ├── MainActivity.java │ ├── ScaledTextureView.java │ ├── MediaPlayerController.java │ ├── VideoPlayerView.java │ └── MediaCodecDecodeController.java ├── VideoManipulation ├── ic_launcher-web.png ├── res │ ├── drawable-hdpi │ │ └── ic_launcher.png │ ├── drawable-mdpi │ │ └── ic_launcher.png │ ├── drawable-xhdpi │ │ └── ic_launcher.png │ ├── drawable-xxhdpi │ │ └── ic_launcher.png │ ├── values │ │ ├── colors.xml │ │ ├── strings.xml │ │ └── styles.xml │ ├── values-v11 │ │ └── styles.xml │ ├── values-v14 │ │ └── styles.xml │ └── layout │ │ ├── activity_trim.xml │ │ ├── activity_main.xml │ │ ├── activity_rotation.xml │ │ └── activity_resample.xml ├── .classpath ├── project.properties ├── proguard-project.txt ├── .project ├── AndroidManifest.xml └── src │ └── com │ └── roryhool │ └── videomanipulation │ ├── RotationActivity.java │ ├── MainActivity.java │ ├── TrimActivity.java │ └── ResampleActivity.java ├── CommonVideoLibrary ├── ic_launcher-web.png ├── libs │ ├── android-support-v4.jar │ └── isoviewer-1.0-RC-35.jar ├── res │ ├── drawable-hdpi │ │ └── ic_launcher.png │ ├── drawable-mdpi │ │ └── ic_launcher.png │ ├── drawable-xhdpi │ │ └── ic_launcher.png │ ├── drawable-xxhdpi │ │ └── ic_launcher.png │ ├── values │ │ ├── strings.xml │ │ └── styles.xml │ ├── values-v11 │ │ └── styles.xml │ └── values-v14 │ │ └── styles.xml ├── .classpath ├── AndroidManifest.xml ├── project.properties ├── proguard-project.txt ├── .project └── src │ └── com │ └── roryhool │ └── commonvideolibrary │ ├── Resolution.java │ ├── CursorHelper.java │ ├── SamplerClip.java │ ├── Intents.java │ ├── UriHelper.java │ ├── InputSurface.java │ ├── MediaHelper.java │ ├── TextureRenderer.java │ └── OutputSurface.java ├── .gitignore └── LICENSE /README.md: -------------------------------------------------------------------------------- 1 | AndroidVideoSamples 2 | =================== 3 | 4 | Sample code for working with video on Android 5 | -------------------------------------------------------------------------------- /VideoCreation/ic_launcher-web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hoolrory/AndroidVideoSamples/HEAD/VideoCreation/ic_launcher-web.png -------------------------------------------------------------------------------- /VideoPlayback/ic_launcher-web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hoolrory/AndroidVideoSamples/HEAD/VideoPlayback/ic_launcher-web.png -------------------------------------------------------------------------------- /VideoManipulation/ic_launcher-web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hoolrory/AndroidVideoSamples/HEAD/VideoManipulation/ic_launcher-web.png -------------------------------------------------------------------------------- /CommonVideoLibrary/ic_launcher-web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hoolrory/AndroidVideoSamples/HEAD/CommonVideoLibrary/ic_launcher-web.png -------------------------------------------------------------------------------- /CommonVideoLibrary/libs/android-support-v4.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hoolrory/AndroidVideoSamples/HEAD/CommonVideoLibrary/libs/android-support-v4.jar -------------------------------------------------------------------------------- /CommonVideoLibrary/libs/isoviewer-1.0-RC-35.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hoolrory/AndroidVideoSamples/HEAD/CommonVideoLibrary/libs/isoviewer-1.0-RC-35.jar -------------------------------------------------------------------------------- /VideoCreation/res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hoolrory/AndroidVideoSamples/HEAD/VideoCreation/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /VideoCreation/res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hoolrory/AndroidVideoSamples/HEAD/VideoCreation/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /VideoPlayback/res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hoolrory/AndroidVideoSamples/HEAD/VideoPlayback/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /VideoPlayback/res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hoolrory/AndroidVideoSamples/HEAD/VideoPlayback/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /VideoCreation/res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hoolrory/AndroidVideoSamples/HEAD/VideoCreation/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /VideoCreation/res/drawable-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hoolrory/AndroidVideoSamples/HEAD/VideoCreation/res/drawable-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /VideoPlayback/res/drawable-hdpi/ic_media_play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hoolrory/AndroidVideoSamples/HEAD/VideoPlayback/res/drawable-hdpi/ic_media_play.png -------------------------------------------------------------------------------- /VideoPlayback/res/drawable-mdpi/ic_media_play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hoolrory/AndroidVideoSamples/HEAD/VideoPlayback/res/drawable-mdpi/ic_media_play.png -------------------------------------------------------------------------------- /VideoPlayback/res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hoolrory/AndroidVideoSamples/HEAD/VideoPlayback/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /VideoPlayback/res/drawable-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hoolrory/AndroidVideoSamples/HEAD/VideoPlayback/res/drawable-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /CommonVideoLibrary/res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hoolrory/AndroidVideoSamples/HEAD/CommonVideoLibrary/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /CommonVideoLibrary/res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hoolrory/AndroidVideoSamples/HEAD/CommonVideoLibrary/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /VideoManipulation/res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hoolrory/AndroidVideoSamples/HEAD/VideoManipulation/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /VideoManipulation/res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hoolrory/AndroidVideoSamples/HEAD/VideoManipulation/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /VideoManipulation/res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hoolrory/AndroidVideoSamples/HEAD/VideoManipulation/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /VideoPlayback/res/drawable-hdpi/ic_media_pause.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hoolrory/AndroidVideoSamples/HEAD/VideoPlayback/res/drawable-hdpi/ic_media_pause.png -------------------------------------------------------------------------------- /VideoPlayback/res/drawable-mdpi/ic_media_pause.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hoolrory/AndroidVideoSamples/HEAD/VideoPlayback/res/drawable-mdpi/ic_media_pause.png -------------------------------------------------------------------------------- /VideoPlayback/res/drawable-xhdpi/ic_media_pause.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hoolrory/AndroidVideoSamples/HEAD/VideoPlayback/res/drawable-xhdpi/ic_media_pause.png -------------------------------------------------------------------------------- /VideoPlayback/res/drawable-xhdpi/ic_media_play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hoolrory/AndroidVideoSamples/HEAD/VideoPlayback/res/drawable-xhdpi/ic_media_play.png -------------------------------------------------------------------------------- /CommonVideoLibrary/res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hoolrory/AndroidVideoSamples/HEAD/CommonVideoLibrary/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /CommonVideoLibrary/res/drawable-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hoolrory/AndroidVideoSamples/HEAD/CommonVideoLibrary/res/drawable-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /VideoManipulation/res/drawable-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hoolrory/AndroidVideoSamples/HEAD/VideoManipulation/res/drawable-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /VideoPlayback/res/drawable-hdpi/ic_vidcontrol_fullscreen_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hoolrory/AndroidVideoSamples/HEAD/VideoPlayback/res/drawable-hdpi/ic_vidcontrol_fullscreen_off.png -------------------------------------------------------------------------------- /VideoPlayback/res/drawable-hdpi/ic_vidcontrol_fullscreen_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hoolrory/AndroidVideoSamples/HEAD/VideoPlayback/res/drawable-hdpi/ic_vidcontrol_fullscreen_on.png -------------------------------------------------------------------------------- /VideoPlayback/res/drawable-mdpi/ic_vidcontrol_fullscreen_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hoolrory/AndroidVideoSamples/HEAD/VideoPlayback/res/drawable-mdpi/ic_vidcontrol_fullscreen_off.png -------------------------------------------------------------------------------- /VideoPlayback/res/drawable-mdpi/ic_vidcontrol_fullscreen_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hoolrory/AndroidVideoSamples/HEAD/VideoPlayback/res/drawable-mdpi/ic_vidcontrol_fullscreen_on.png -------------------------------------------------------------------------------- /VideoPlayback/res/drawable-xhdpi/ic_vidcontrol_fullscreen_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hoolrory/AndroidVideoSamples/HEAD/VideoPlayback/res/drawable-xhdpi/ic_vidcontrol_fullscreen_on.png -------------------------------------------------------------------------------- /VideoPlayback/res/drawable-xhdpi/ic_vidcontrol_fullscreen_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hoolrory/AndroidVideoSamples/HEAD/VideoPlayback/res/drawable-xhdpi/ic_vidcontrol_fullscreen_off.png -------------------------------------------------------------------------------- /VideoPlayback/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 230dp 5 | 6 | 48dp 7 | 8 | -------------------------------------------------------------------------------- /VideoPlayback/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | VideoPlayback 4 | 5 | Play and pause button 6 | Fullscreen button 7 | 8 | 9 | -------------------------------------------------------------------------------- /CommonVideoLibrary/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | CommonVideoLibrary 4 | 5 | Select Video 6 | 7 | Selected Video\'s Thumbnail 8 | 9 | -------------------------------------------------------------------------------- /VideoManipulation/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #000 4 | 5 | 6 | -------------------------------------------------------------------------------- /VideoPlayback/res/drawable/button_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /VideoPlayback/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | #00000000 6 | #443498db 7 | 8 | #44000000 9 | #000000 10 | 11 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Built application files 2 | *.apk 3 | *.ap_ 4 | 5 | # Files for the Dalvik VM 6 | *.dex 7 | 8 | # Java class files 9 | *.class 10 | 11 | # Generated files 12 | bin/ 13 | gen/ 14 | 15 | # Gradle files 16 | .gradle/ 17 | build/ 18 | 19 | # Local configuration file (sdk path, etc) 20 | local.properties 21 | 22 | # Proguard folder generated by Eclipse 23 | proguard/ 24 | -------------------------------------------------------------------------------- /VideoManipulation/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | VideoManipulation 4 | 5 | Rotate Video 6 | Join Videos 7 | Trim Video 8 | Resample Video 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /VideoCreation/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | VideoCreation 4 | 5 | Join Videos 6 | Render Video from Surface 7 | 8 | Select Video 1 9 | Select Video 2 10 | 11 | 12 | -------------------------------------------------------------------------------- /VideoCreation/res/values-v11/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /VideoManipulation/res/values-v11/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /VideoPlayback/res/values-v11/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /CommonVideoLibrary/res/values-v11/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /VideoCreation/res/values-v14/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /VideoPlayback/res/values-v14/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /CommonVideoLibrary/res/values-v14/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /VideoManipulation/res/values-v14/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /VideoCreation/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /VideoPlayback/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /CommonVideoLibrary/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /VideoManipulation/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /VideoPlayback/res/layout/activity_play_with_mediaplayer.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /VideoPlayback/res/layout/activity_decode_with_mediacodec.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /VideoCreation/res/layout/activity_render_from_surface.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 |