# nativeMediaCodec **Repository Path**: zwmagic/native-media-codec ## Basic Information - **Project Name**: nativeMediaCodec - **Description**: android在Native层实现mediaCodec,同时打断surfaceview送显,额外插入操作。 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 2 - **Created**: 2021-05-05 - **Last Updated**: 2025-03-18 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README Native Codec ============ Native Codec is an Android C++ sample that uses the Native Media Codec API to play a video. We change a little bit from [origin source code](https://github.com/android/ndk-samples) during the surfaceview Display. We can use AI to do some superresolution transform before display! encoded stream files are under app/src/main/assets/clips 4 video files is provided as an example. To add your own files: - copy your stream file into app/src/main/assets/ - add your file name to res/strings.xml, "source_array" - compile and run app - from android device, select your stream This sample uses the new [Android Studio CMake plugin](http://tools.android.com/tech-docs/external-c-builds) with C++ support. Pre-requisitescd -------------- - Android Studio 2.2+ with [NDK](https://developer.android.com/ndk/) bundle. Getting Started --------------- 1. [Download Android Studio](http://developer.android.com/sdk/index.html) 1. Launch Android Studio. 1. Open the sample directory. 1. Open *File/Project Structure...* - Click *Download* or *Select NDK location*. 1. Click *Tools/Android/Sync Project with Gradle Files*. 1. Click *Run/Run 'app'*. 1. Open a terminal prompt and run `adb push testfile.mp4 /sdcard/testfile.mp4` to copy the test video file. Screenshots ----------- ![screenshot](screenshot.png) Support ------- If you've found an error in these samples, please [file an issue](https://github.com/googlesamples/android-ndk/issues/new).