├── FFmpegv播放视频有声音,暂停,释放、快进、退后 ├── CMakeLists.txt ├── build.gradle ├── libs │ ├── armeabi │ │ ├── libavcodec-56.so │ │ ├── libavdevice-56.so │ │ ├── libavfilter-5.so │ │ ├── libavformat-56.so │ │ ├── libavutil-54.so │ │ ├── libpostproc-53.so │ │ ├── libswresample-1.so │ │ └── libswscale-3.so │ └── include │ │ ├── libavcodec │ │ ├── avcodec.h │ │ ├── avfft.h │ │ ├── dv_profile.h │ │ ├── dxva2.h │ │ ├── old_codec_ids.h │ │ ├── qsv.h │ │ ├── vaapi.h │ │ ├── vda.h │ │ ├── vdpau.h │ │ ├── version.h │ │ ├── vorbis_parser.h │ │ └── xvmc.h │ │ ├── libavdevice │ │ ├── avdevice.h │ │ └── version.h │ │ ├── libavfilter │ │ ├── asrc_abuffer.h │ │ ├── avcodec.h │ │ ├── avfilter.h │ │ ├── avfiltergraph.h │ │ ├── buffersink.h │ │ ├── buffersrc.h │ │ └── version.h │ │ ├── libavformat │ │ ├── avformat.h │ │ ├── avio.h │ │ └── version.h │ │ ├── libavutil │ │ ├── adler32.h │ │ ├── aes.h │ │ ├── attributes.h │ │ ├── audio_fifo.h │ │ ├── audioconvert.h │ │ ├── avassert.h │ │ ├── avconfig.h │ │ ├── avstring.h │ │ ├── avutil.h │ │ ├── base64.h │ │ ├── blowfish.h │ │ ├── bprint.h │ │ ├── bswap.h │ │ ├── buffer.h │ │ ├── camellia.h │ │ ├── cast5.h │ │ ├── channel_layout.h │ │ ├── common.h │ │ ├── cpu.h │ │ ├── crc.h │ │ ├── dict.h │ │ ├── display.h │ │ ├── downmix_info.h │ │ ├── error.h │ │ ├── eval.h │ │ ├── ffversion.h │ │ ├── fifo.h │ │ ├── file.h │ │ ├── frame.h │ │ ├── hash.h │ │ ├── hmac.h │ │ ├── imgutils.h │ │ ├── intfloat.h │ │ ├── intreadwrite.h │ │ ├── lfg.h │ │ ├── log.h │ │ ├── lzo.h │ │ ├── macros.h │ │ ├── mathematics.h │ │ ├── md5.h │ │ ├── mem.h │ │ ├── motion_vector.h │ │ ├── murmur3.h │ │ ├── old_pix_fmts.h │ │ ├── opt.h │ │ ├── parseutils.h │ │ ├── pixdesc.h │ │ ├── pixelutils.h │ │ ├── pixfmt.h │ │ ├── random_seed.h │ │ ├── rational.h │ │ ├── replaygain.h │ │ ├── ripemd.h │ │ ├── samplefmt.h │ │ ├── sha.h │ │ ├── sha512.h │ │ ├── stereo3d.h │ │ ├── threadmessage.h │ │ ├── time.h │ │ ├── timecode.h │ │ ├── timestamp.h │ │ ├── twofish.h │ │ ├── version.h │ │ └── xtea.h │ │ ├── libpostproc │ │ ├── postprocess.h │ │ └── version.h │ │ ├── libswresample │ │ ├── swresample.h │ │ └── version.h │ │ └── libswscale │ │ ├── swscale.h │ │ └── version.h └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── test │ │ └── ffmpegvideoplay │ │ └── ExampleInstrumentedTest.java │ ├── main │ ├── AndroidManifest.xml │ ├── cpp │ │ ├── FFmpegMusic.cpp │ │ ├── FFmpegMusic.h │ │ ├── FFmpegVideo.cpp │ │ ├── FFmpegVideo.h │ │ ├── Log.h │ │ └── native-lib.cpp │ ├── java │ │ └── com │ │ │ └── test │ │ │ └── ffmpegvideoplay │ │ │ ├── MainActivity.java │ │ │ ├── Play.java │ │ │ └── VideoView.java │ └── res │ │ ├── drawable-v24 │ │ └── ic_launcher_foreground.xml │ │ ├── drawable │ │ └── ic_launcher_background.xml │ │ ├── layout │ │ └── activity_main.xml │ │ ├── mipmap-anydpi-v26 │ │ ├── ic_launcher.xml │ │ └── ic_launcher_round.xml │ │ ├── mipmap-hdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-mdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ └── values │ │ ├── colors.xml │ │ ├── strings.xml │ │ └── styles.xml │ └── test │ └── java │ └── com │ └── test │ └── ffmpegvideoplay │ └── ExampleUnitTest.java ├── FFmpeg使用OpenSLES播放音乐,能停止 ├── CMakeLists.txt ├── build.gradle ├── libs │ ├── armeabi │ │ ├── libavcodec-56.so │ │ ├── libavdevice-56.so │ │ ├── libavfilter-5.so │ │ ├── libavformat-56.so │ │ ├── libavutil-54.so │ │ ├── libpostproc-53.so │ │ ├── libswresample-1.so │ │ └── libswscale-3.so │ └── include │ │ ├── libavcodec │ │ ├── avcodec.h │ │ ├── avfft.h │ │ ├── dv_profile.h │ │ ├── dxva2.h │ │ ├── old_codec_ids.h │ │ ├── qsv.h │ │ ├── vaapi.h │ │ ├── vda.h │ │ ├── vdpau.h │ │ ├── version.h │ │ ├── vorbis_parser.h │ │ └── xvmc.h │ │ ├── libavdevice │ │ ├── avdevice.h │ │ └── version.h │ │ ├── libavfilter │ │ ├── asrc_abuffer.h │ │ ├── avcodec.h │ │ ├── avfilter.h │ │ ├── avfiltergraph.h │ │ ├── buffersink.h │ │ ├── buffersrc.h │ │ └── version.h │ │ ├── libavformat │ │ ├── avformat.h │ │ ├── avio.h │ │ └── version.h │ │ ├── libavutil │ │ ├── adler32.h │ │ ├── aes.h │ │ ├── attributes.h │ │ ├── audio_fifo.h │ │ ├── audioconvert.h │ │ ├── avassert.h │ │ ├── avconfig.h │ │ ├── avstring.h │ │ ├── avutil.h │ │ ├── base64.h │ │ ├── blowfish.h │ │ ├── bprint.h │ │ ├── bswap.h │ │ ├── buffer.h │ │ ├── camellia.h │ │ ├── cast5.h │ │ ├── channel_layout.h │ │ ├── common.h │ │ ├── cpu.h │ │ ├── crc.h │ │ ├── dict.h │ │ ├── display.h │ │ ├── downmix_info.h │ │ ├── error.h │ │ ├── eval.h │ │ ├── ffversion.h │ │ ├── fifo.h │ │ ├── file.h │ │ ├── frame.h │ │ ├── hash.h │ │ ├── hmac.h │ │ ├── imgutils.h │ │ ├── intfloat.h │ │ ├── intreadwrite.h │ │ ├── lfg.h │ │ ├── log.h │ │ ├── lzo.h │ │ ├── macros.h │ │ ├── mathematics.h │ │ ├── md5.h │ │ ├── mem.h │ │ ├── motion_vector.h │ │ ├── murmur3.h │ │ ├── old_pix_fmts.h │ │ ├── opt.h │ │ ├── parseutils.h │ │ ├── pixdesc.h │ │ ├── pixelutils.h │ │ ├── pixfmt.h │ │ ├── random_seed.h │ │ ├── rational.h │ │ ├── replaygain.h │ │ ├── ripemd.h │ │ ├── samplefmt.h │ │ ├── sha.h │ │ ├── sha512.h │ │ ├── stereo3d.h │ │ ├── threadmessage.h │ │ ├── time.h │ │ ├── timecode.h │ │ ├── timestamp.h │ │ ├── twofish.h │ │ ├── version.h │ │ └── xtea.h │ │ ├── libpostproc │ │ ├── postprocess.h │ │ └── version.h │ │ ├── libswresample │ │ ├── swresample.h │ │ └── version.h │ │ └── libswscale │ │ ├── swscale.h │ │ └── version.h └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── test │ │ └── ffmpegopensles │ │ └── ExampleInstrumentedTest.java │ ├── main │ ├── AndroidManifest.xml │ ├── cpp │ │ ├── FFmpegMusic.cpp │ │ ├── FFmpegMusic.h │ │ └── native-lib.cpp │ ├── java │ │ └── com │ │ │ └── test │ │ │ └── ffmpegopensles │ │ │ ├── MainActivity.java │ │ │ └── MusicPlay.java │ └── res │ │ ├── drawable-v24 │ │ └── ic_launcher_foreground.xml │ │ ├── drawable │ │ └── ic_launcher_background.xml │ │ ├── layout │ │ └── activity_main.xml │ │ ├── mipmap-anydpi-v26 │ │ ├── ic_launcher.xml │ │ └── ic_launcher_round.xml │ │ ├── mipmap-hdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-mdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ └── values │ │ ├── colors.xml │ │ ├── strings.xml │ │ └── styles.xml │ └── test │ └── java │ └── com │ └── test │ └── ffmpegopensles │ └── ExampleUnitTest.java ├── FFmpeg播放音乐(保程序不死) ├── CMakeLists.txt ├── build.gradle ├── libs │ ├── armeabi-v7a │ │ ├── libavcodec-57.so │ │ ├── libavcodec.so │ │ ├── libavdevice-57.so │ │ ├── libavfilter-6.so │ │ ├── libavfilter.so │ │ ├── libavformat-57.so │ │ ├── libavformat.so │ │ ├── libavutil-55.so │ │ ├── libavutil.so │ │ ├── libswresample-2.so │ │ ├── libswresample.so │ │ ├── libswscale-4.so │ │ ├── libswscale.so │ │ └── pkgconfig │ │ │ ├── libavcodec.pc │ │ │ ├── libavfilter.pc │ │ │ ├── libavformat.pc │ │ │ ├── libavutil.pc │ │ │ ├── libswresample.pc │ │ │ └── libswscale.pc │ └── include │ │ ├── libavcodec │ │ ├── avcodec.h │ │ ├── avdct.h │ │ ├── avfft.h │ │ ├── d3d11va.h │ │ ├── dirac.h │ │ ├── dv_profile.h │ │ ├── dxva2.h │ │ ├── jni.h │ │ ├── mediacodec.h │ │ ├── qsv.h │ │ ├── vaapi.h │ │ ├── vda.h │ │ ├── vdpau.h │ │ ├── version.h │ │ ├── videotoolbox.h │ │ ├── vorbis_parser.h │ │ └── xvmc.h │ │ ├── libavdevice │ │ ├── avdevice.h │ │ └── version.h │ │ ├── libavfilter │ │ ├── avfilter.h │ │ ├── avfiltergraph.h │ │ ├── buffersink.h │ │ ├── buffersrc.h │ │ └── version.h │ │ ├── libavformat │ │ ├── avformat.h │ │ ├── avio.h │ │ └── version.h │ │ ├── libavutil │ │ ├── adler32.h │ │ ├── aes.h │ │ ├── aes_ctr.h │ │ ├── attributes.h │ │ ├── audio_fifo.h │ │ ├── avassert.h │ │ ├── avconfig.h │ │ ├── avstring.h │ │ ├── avutil.h │ │ ├── base64.h │ │ ├── blowfish.h │ │ ├── bprint.h │ │ ├── bswap.h │ │ ├── buffer.h │ │ ├── camellia.h │ │ ├── cast5.h │ │ ├── channel_layout.h │ │ ├── common.h │ │ ├── cpu.h │ │ ├── crc.h │ │ ├── des.h │ │ ├── dict.h │ │ ├── display.h │ │ ├── downmix_info.h │ │ ├── error.h │ │ ├── eval.h │ │ ├── ffversion.h │ │ ├── fifo.h │ │ ├── file.h │ │ ├── frame.h │ │ ├── hash.h │ │ ├── hmac.h │ │ ├── hwcontext.h │ │ ├── hwcontext_cuda.h │ │ ├── hwcontext_dxva2.h │ │ ├── hwcontext_qsv.h │ │ ├── hwcontext_vaapi.h │ │ ├── hwcontext_vdpau.h │ │ ├── imgutils.h │ │ ├── intfloat.h │ │ ├── intreadwrite.h │ │ ├── lfg.h │ │ ├── log.h │ │ ├── lzo.h │ │ ├── macros.h │ │ ├── mastering_display_metadata.h │ │ ├── mathematics.h │ │ ├── md5.h │ │ ├── mem.h │ │ ├── motion_vector.h │ │ ├── murmur3.h │ │ ├── opt.h │ │ ├── parseutils.h │ │ ├── pixdesc.h │ │ ├── pixelutils.h │ │ ├── pixfmt.h │ │ ├── random_seed.h │ │ ├── rational.h │ │ ├── rc4.h │ │ ├── replaygain.h │ │ ├── ripemd.h │ │ ├── samplefmt.h │ │ ├── sha.h │ │ ├── sha512.h │ │ ├── spherical.h │ │ ├── stereo3d.h │ │ ├── tea.h │ │ ├── threadmessage.h │ │ ├── time.h │ │ ├── timecode.h │ │ ├── timestamp.h │ │ ├── tree.h │ │ ├── twofish.h │ │ ├── version.h │ │ └── xtea.h │ │ ├── libswresample │ │ ├── swresample.h │ │ └── version.h │ │ └── libswscale │ │ ├── swscale.h │ │ └── version.h └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── ws │ │ └── ffmpegandroidavfilter │ │ └── ExampleInstrumentedTest.java │ ├── main │ ├── AndroidManifest.xml │ ├── cpp │ │ ├── native-lib.cpp │ │ └── native-lib.h │ ├── java │ │ └── com │ │ │ └── ws │ │ │ └── ffmpegandroidavfilter │ │ │ └── MainActivity.java │ └── res │ │ ├── drawable-v24 │ │ └── ic_launcher_foreground.xml │ │ ├── drawable │ │ └── ic_launcher_background.xml │ │ ├── layout │ │ └── activity_main.xml │ │ ├── mipmap-anydpi-v26 │ │ ├── ic_launcher.xml │ │ └── ic_launcher_round.xml │ │ ├── mipmap-hdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-mdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── values-w820dp │ │ └── dimens.xml │ │ └── values │ │ ├── colors.xml │ │ ├── dimens.xml │ │ ├── strings.xml │ │ └── styles.xml │ └── test │ └── java │ └── com │ └── ws │ └── ffmpegandroidavfilter │ └── ExampleUnitTest.java ├── FFmpeg给视频换声音 ├── CMakeLists.txt ├── build.gradle ├── libs │ ├── armeabi-v7a │ │ ├── libavcodec-57.so │ │ ├── libavcodec.so │ │ ├── libavdevice-57.so │ │ ├── libavfilter-6.so │ │ ├── libavfilter.so │ │ ├── libavformat-57.so │ │ ├── libavformat.so │ │ ├── libavutil-55.so │ │ ├── libavutil.so │ │ ├── libswresample-2.so │ │ ├── libswresample.so │ │ ├── libswscale-4.so │ │ ├── libswscale.so │ │ └── pkgconfig │ │ │ ├── libavcodec.pc │ │ │ ├── libavfilter.pc │ │ │ ├── libavformat.pc │ │ │ ├── libavutil.pc │ │ │ ├── libswresample.pc │ │ │ └── libswscale.pc │ └── include │ │ ├── libavcodec │ │ ├── avcodec.h │ │ ├── avdct.h │ │ ├── avfft.h │ │ ├── d3d11va.h │ │ ├── dirac.h │ │ ├── dv_profile.h │ │ ├── dxva2.h │ │ ├── jni.h │ │ ├── mediacodec.h │ │ ├── qsv.h │ │ ├── vaapi.h │ │ ├── vda.h │ │ ├── vdpau.h │ │ ├── version.h │ │ ├── videotoolbox.h │ │ ├── vorbis_parser.h │ │ └── xvmc.h │ │ ├── libavdevice │ │ ├── avdevice.h │ │ └── version.h │ │ ├── libavfilter │ │ ├── avfilter.h │ │ ├── avfiltergraph.h │ │ ├── buffersink.h │ │ ├── buffersrc.h │ │ └── version.h │ │ ├── libavformat │ │ ├── avformat.h │ │ ├── avio.h │ │ └── version.h │ │ ├── libavutil │ │ ├── adler32.h │ │ ├── aes.h │ │ ├── aes_ctr.h │ │ ├── attributes.h │ │ ├── audio_fifo.h │ │ ├── avassert.h │ │ ├── avconfig.h │ │ ├── avstring.h │ │ ├── avutil.h │ │ ├── base64.h │ │ ├── blowfish.h │ │ ├── bprint.h │ │ ├── bswap.h │ │ ├── buffer.h │ │ ├── camellia.h │ │ ├── cast5.h │ │ ├── channel_layout.h │ │ ├── common.h │ │ ├── cpu.h │ │ ├── crc.h │ │ ├── des.h │ │ ├── dict.h │ │ ├── display.h │ │ ├── downmix_info.h │ │ ├── error.h │ │ ├── eval.h │ │ ├── ffversion.h │ │ ├── fifo.h │ │ ├── file.h │ │ ├── frame.h │ │ ├── hash.h │ │ ├── hmac.h │ │ ├── hwcontext.h │ │ ├── hwcontext_cuda.h │ │ ├── hwcontext_dxva2.h │ │ ├── hwcontext_qsv.h │ │ ├── hwcontext_vaapi.h │ │ ├── hwcontext_vdpau.h │ │ ├── imgutils.h │ │ ├── intfloat.h │ │ ├── intreadwrite.h │ │ ├── lfg.h │ │ ├── log.h │ │ ├── lzo.h │ │ ├── macros.h │ │ ├── mastering_display_metadata.h │ │ ├── mathematics.h │ │ ├── md5.h │ │ ├── mem.h │ │ ├── motion_vector.h │ │ ├── murmur3.h │ │ ├── opt.h │ │ ├── parseutils.h │ │ ├── pixdesc.h │ │ ├── pixelutils.h │ │ ├── pixfmt.h │ │ ├── random_seed.h │ │ ├── rational.h │ │ ├── rc4.h │ │ ├── replaygain.h │ │ ├── ripemd.h │ │ ├── samplefmt.h │ │ ├── sha.h │ │ ├── sha512.h │ │ ├── spherical.h │ │ ├── stereo3d.h │ │ ├── tea.h │ │ ├── threadmessage.h │ │ ├── time.h │ │ ├── timecode.h │ │ ├── timestamp.h │ │ ├── tree.h │ │ ├── twofish.h │ │ ├── version.h │ │ └── xtea.h │ │ ├── libswresample │ │ ├── swresample.h │ │ └── version.h │ │ └── libswscale │ │ ├── swscale.h │ │ └── version.h └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── ws │ │ └── ffmpegandroidaddmusic │ │ └── ExampleInstrumentedTest.java │ ├── main │ ├── AndroidManifest.xml │ ├── cpp │ │ └── native-lib.cpp │ ├── java │ │ └── com │ │ │ └── ws │ │ │ └── ffmpegandroidaddmusic │ │ │ └── MainActivity.java │ └── res │ │ ├── drawable-v24 │ │ └── ic_launcher_foreground.xml │ │ ├── drawable │ │ └── ic_launcher_background.xml │ │ ├── layout │ │ └── activity_main.xml │ │ ├── mipmap-anydpi-v26 │ │ ├── ic_launcher.xml │ │ └── ic_launcher_round.xml │ │ ├── mipmap-hdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-mdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── values-w820dp │ │ └── dimens.xml │ │ └── values │ │ ├── colors.xml │ │ ├── dimens.xml │ │ ├── strings.xml │ │ └── styles.xml │ └── test │ └── java │ └── com │ └── ws │ └── ffmpegandroidaddmusic │ └── ExampleUnitTest.java └── README.md /FFmpegv播放视频有声音,暂停,释放、快进、退后/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.4.1) 2 | 3 | file(GLOB my_source src/main/cpp/*.cpp src/main/cpp/*.c) 4 | set(distribution_DIR ../../../../libs) 5 | 6 | add_library( native-lib 7 | SHARED 8 | ${my_source} 9 | ) 10 | add_library( avcodec-56 11 | SHARED 12 | IMPORTED) 13 | set_target_properties( avcodec-56 14 | PROPERTIES IMPORTED_LOCATION 15 | ${distribution_DIR}/armeabi/libavcodec-56.so) 16 | add_library( avfilter-5 17 | SHARED 18 | IMPORTED) 19 | set_target_properties( avfilter-5 20 | PROPERTIES IMPORTED_LOCATION 21 | ${distribution_DIR}/armeabi/libavfilter-5.so) 22 | 23 | add_library( avformat-56 24 | SHARED 25 | IMPORTED) 26 | set_target_properties( avformat-56 27 | PROPERTIES IMPORTED_LOCATION 28 | ${distribution_DIR}/armeabi/libavformat-56.so) 29 | 30 | add_library( avutil-54 31 | SHARED 32 | IMPORTED) 33 | set_target_properties( avutil-54 34 | PROPERTIES IMPORTED_LOCATION 35 | ${distribution_DIR}/armeabi/libavutil-54.so) 36 | 37 | add_library( swresample-1 38 | SHARED 39 | IMPORTED) 40 | set_target_properties( swresample-1 41 | PROPERTIES IMPORTED_LOCATION 42 | ${distribution_DIR}/armeabi/libswresample-1.so) 43 | 44 | add_library( swscale-3 45 | SHARED 46 | IMPORTED) 47 | set_target_properties( swscale-3 48 | PROPERTIES IMPORTED_LOCATION 49 | ${distribution_DIR}/armeabi/libswscale-3.so) 50 | include_directories(libs/include) 51 | target_link_libraries( native-lib 52 | avcodec-56 53 | avfilter-5 54 | avformat-56 55 | avutil-54 56 | swresample-1 57 | swscale-3 58 | log 59 | android 60 | OpenSLES 61 | ) -------------------------------------------------------------------------------- /FFmpegv播放视频有声音,暂停,释放、快进、退后/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 26 5 | defaultConfig { 6 | applicationId "com.test.ffmpegvideoplay" 7 | minSdkVersion 19 8 | targetSdkVersion 26 9 | versionCode 1 10 | versionName "1.0" 11 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 12 | sourceSets { 13 | main { 14 | jniLibs.srcDirs = ['libs'] 15 | } 16 | } 17 | externalNativeBuild { 18 | cmake { 19 | cppFlags "-frtti -fexceptions" 20 | abiFilters 'armeabi' 21 | } 22 | } 23 | } 24 | buildTypes { 25 | release { 26 | minifyEnabled false 27 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 28 | } 29 | } 30 | externalNativeBuild { 31 | cmake { 32 | path "CMakeLists.txt" 33 | } 34 | } 35 | } 36 | 37 | dependencies { 38 | implementation fileTree(dir: 'libs', include: ['*.jar']) 39 | implementation 'com.android.support:appcompat-v7:26.1.0' 40 | testImplementation 'junit:junit:4.12' 41 | androidTestImplementation 'com.android.support.test:runner:1.0.1' 42 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1' 43 | } 44 | -------------------------------------------------------------------------------- /FFmpegv播放视频有声音,暂停,释放、快进、退后/libs/armeabi/libavcodec-56.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/AudioVideoStudyCodeTwo/938538d1bf88e3b9f1832d36f2d0128fc48429e9/FFmpegv播放视频有声音,暂停,释放、快进、退后/libs/armeabi/libavcodec-56.so -------------------------------------------------------------------------------- /FFmpegv播放视频有声音,暂停,释放、快进、退后/libs/armeabi/libavdevice-56.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/AudioVideoStudyCodeTwo/938538d1bf88e3b9f1832d36f2d0128fc48429e9/FFmpegv播放视频有声音,暂停,释放、快进、退后/libs/armeabi/libavdevice-56.so -------------------------------------------------------------------------------- /FFmpegv播放视频有声音,暂停,释放、快进、退后/libs/armeabi/libavfilter-5.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/AudioVideoStudyCodeTwo/938538d1bf88e3b9f1832d36f2d0128fc48429e9/FFmpegv播放视频有声音,暂停,释放、快进、退后/libs/armeabi/libavfilter-5.so -------------------------------------------------------------------------------- /FFmpegv播放视频有声音,暂停,释放、快进、退后/libs/armeabi/libavformat-56.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/AudioVideoStudyCodeTwo/938538d1bf88e3b9f1832d36f2d0128fc48429e9/FFmpegv播放视频有声音,暂停,释放、快进、退后/libs/armeabi/libavformat-56.so -------------------------------------------------------------------------------- /FFmpegv播放视频有声音,暂停,释放、快进、退后/libs/armeabi/libavutil-54.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/AudioVideoStudyCodeTwo/938538d1bf88e3b9f1832d36f2d0128fc48429e9/FFmpegv播放视频有声音,暂停,释放、快进、退后/libs/armeabi/libavutil-54.so -------------------------------------------------------------------------------- /FFmpegv播放视频有声音,暂停,释放、快进、退后/libs/armeabi/libpostproc-53.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/AudioVideoStudyCodeTwo/938538d1bf88e3b9f1832d36f2d0128fc48429e9/FFmpegv播放视频有声音,暂停,释放、快进、退后/libs/armeabi/libpostproc-53.so -------------------------------------------------------------------------------- /FFmpegv播放视频有声音,暂停,释放、快进、退后/libs/armeabi/libswresample-1.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/AudioVideoStudyCodeTwo/938538d1bf88e3b9f1832d36f2d0128fc48429e9/FFmpegv播放视频有声音,暂停,释放、快进、退后/libs/armeabi/libswresample-1.so -------------------------------------------------------------------------------- /FFmpegv播放视频有声音,暂停,释放、快进、退后/libs/armeabi/libswscale-3.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/AudioVideoStudyCodeTwo/938538d1bf88e3b9f1832d36f2d0128fc48429e9/FFmpegv播放视频有声音,暂停,释放、快进、退后/libs/armeabi/libswscale-3.so -------------------------------------------------------------------------------- /FFmpegv播放视频有声音,暂停,释放、快进、退后/libs/include/libavcodec/qsv.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Intel MediaSDK QSV public API 3 | * 4 | * This file is part of FFmpeg. 5 | * 6 | * FFmpeg is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * FFmpeg is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with FFmpeg; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #ifndef AVCODEC_QSV_H 22 | #define AVCODEC_QSV_H 23 | 24 | #include 25 | 26 | typedef struct AVQSVContext { 27 | mfxSession session; 28 | int iopattern; 29 | 30 | mfxExtBuffer **ext_buffers; 31 | int nb_ext_buffers; 32 | } AVQSVContext; 33 | 34 | /** 35 | * Allocate a new context. 36 | * 37 | * It must be freed by the caller with av_free(). 38 | */ 39 | AVQSVContext *av_qsv_alloc_context(void); 40 | 41 | #endif /* AVCODEC_QSV_H */ 42 | -------------------------------------------------------------------------------- /FFmpegv播放视频有声音,暂停,释放、快进、退后/libs/include/libavdevice/version.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of FFmpeg. 3 | * 4 | * FFmpeg is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Lesser General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2.1 of the License, or (at your option) any later version. 8 | * 9 | * FFmpeg is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Lesser General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Lesser General Public 15 | * License along with FFmpeg; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #ifndef AVDEVICE_VERSION_H 20 | #define AVDEVICE_VERSION_H 21 | 22 | /** 23 | * @file 24 | * @ingroup lavd 25 | * Libavdevice version macros 26 | */ 27 | 28 | #include "libavutil/version.h" 29 | 30 | #define LIBAVDEVICE_VERSION_MAJOR 56 31 | #define LIBAVDEVICE_VERSION_MINOR 4 32 | #define LIBAVDEVICE_VERSION_MICRO 100 33 | 34 | #define LIBAVDEVICE_VERSION_INT AV_VERSION_INT(LIBAVDEVICE_VERSION_MAJOR, \ 35 | LIBAVDEVICE_VERSION_MINOR, \ 36 | LIBAVDEVICE_VERSION_MICRO) 37 | #define LIBAVDEVICE_VERSION AV_VERSION(LIBAVDEVICE_VERSION_MAJOR, \ 38 | LIBAVDEVICE_VERSION_MINOR, \ 39 | LIBAVDEVICE_VERSION_MICRO) 40 | #define LIBAVDEVICE_BUILD LIBAVDEVICE_VERSION_INT 41 | 42 | #define LIBAVDEVICE_IDENT "Lavd" AV_STRINGIFY(LIBAVDEVICE_VERSION) 43 | 44 | /** 45 | * FF_API_* defines may be placed below to indicate public API that will be 46 | * dropped at a future version bump. The defines themselves are not part of 47 | * the public API and may change, break or disappear at any time. 48 | */ 49 | 50 | #endif /* AVDEVICE_VERSION_H */ 51 | -------------------------------------------------------------------------------- /FFmpegv播放视频有声音,暂停,释放、快进、退后/libs/include/libavfilter/avfiltergraph.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Filter graphs 3 | * copyright (c) 2007 Bobby Bingham 4 | * 5 | * This file is part of FFmpeg. 6 | * 7 | * FFmpeg is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * FFmpeg is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with FFmpeg; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 | */ 21 | 22 | #ifndef AVFILTER_AVFILTERGRAPH_H 23 | #define AVFILTER_AVFILTERGRAPH_H 24 | 25 | #include "avfilter.h" 26 | #include "libavutil/log.h" 27 | 28 | #endif /* AVFILTER_AVFILTERGRAPH_H */ 29 | -------------------------------------------------------------------------------- /FFmpegv播放视频有声音,暂停,释放、快进、退后/libs/include/libavutil/adler32.h: -------------------------------------------------------------------------------- 1 | /* 2 | * copyright (c) 2006 Mans Rullgard 3 | * 4 | * This file is part of FFmpeg. 5 | * 6 | * FFmpeg is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * FFmpeg is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with FFmpeg; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #ifndef AVUTIL_ADLER32_H 22 | #define AVUTIL_ADLER32_H 23 | 24 | #include 25 | #include "attributes.h" 26 | 27 | /** 28 | * @file 29 | * Public header for libavutil Adler32 hasher 30 | * 31 | * @defgroup lavu_adler32 Adler32 32 | * @ingroup lavu_crypto 33 | * @{ 34 | */ 35 | 36 | /** 37 | * Calculate the Adler32 checksum of a buffer. 38 | * 39 | * Passing the return value to a subsequent av_adler32_update() call 40 | * allows the checksum of multiple buffers to be calculated as though 41 | * they were concatenated. 42 | * 43 | * @param adler initial checksum value 44 | * @param buf pointer to input buffer 45 | * @param len size of input buffer 46 | * @return updated checksum 47 | */ 48 | unsigned long av_adler32_update(unsigned long adler, const uint8_t *buf, 49 | unsigned int len) av_pure; 50 | 51 | /** 52 | * @} 53 | */ 54 | 55 | #endif /* AVUTIL_ADLER32_H */ 56 | -------------------------------------------------------------------------------- /FFmpegv播放视频有声音,暂停,释放、快进、退后/libs/include/libavutil/aes.h: -------------------------------------------------------------------------------- 1 | /* 2 | * copyright (c) 2007 Michael Niedermayer 3 | * 4 | * This file is part of FFmpeg. 5 | * 6 | * FFmpeg is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * FFmpeg is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with FFmpeg; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #ifndef AVUTIL_AES_H 22 | #define AVUTIL_AES_H 23 | 24 | #include 25 | 26 | #include "attributes.h" 27 | #include "version.h" 28 | 29 | /** 30 | * @defgroup lavu_aes AES 31 | * @ingroup lavu_crypto 32 | * @{ 33 | */ 34 | 35 | extern const int av_aes_size; 36 | 37 | struct AVAES; 38 | 39 | /** 40 | * Allocate an AVAES context. 41 | */ 42 | struct AVAES *av_aes_alloc(void); 43 | 44 | /** 45 | * Initialize an AVAES context. 46 | * @param key_bits 128, 192 or 256 47 | * @param decrypt 0 for encryption, 1 for decryption 48 | */ 49 | int av_aes_init(struct AVAES *a, const uint8_t *key, int key_bits, int decrypt); 50 | 51 | /** 52 | * Encrypt or decrypt a buffer using a previously initialized context. 53 | * @param count number of 16 byte blocks 54 | * @param dst destination array, can be equal to src 55 | * @param src source array, can be equal to dst 56 | * @param iv initialization vector for CBC mode, if NULL then ECB will be used 57 | * @param decrypt 0 for encryption, 1 for decryption 58 | */ 59 | void av_aes_crypt(struct AVAES *a, uint8_t *dst, const uint8_t *src, int count, uint8_t *iv, int decrypt); 60 | 61 | /** 62 | * @} 63 | */ 64 | 65 | #endif /* AVUTIL_AES_H */ 66 | -------------------------------------------------------------------------------- /FFmpegv播放视频有声音,暂停,释放、快进、退后/libs/include/libavutil/audioconvert.h: -------------------------------------------------------------------------------- 1 | 2 | #include "version.h" 3 | 4 | #if FF_API_AUDIOCONVERT 5 | #include "channel_layout.h" 6 | #endif 7 | -------------------------------------------------------------------------------- /FFmpegv播放视频有声音,暂停,释放、快进、退后/libs/include/libavutil/avconfig.h: -------------------------------------------------------------------------------- 1 | /* Generated by ffconf */ 2 | #ifndef AVUTIL_AVCONFIG_H 3 | #define AVUTIL_AVCONFIG_H 4 | #define AV_HAVE_BIGENDIAN 0 5 | #define AV_HAVE_FAST_UNALIGNED 0 6 | #define AV_HAVE_INCOMPATIBLE_LIBAV_ABI 0 7 | #endif /* AVUTIL_AVCONFIG_H */ 8 | -------------------------------------------------------------------------------- /FFmpegv播放视频有声音,暂停,释放、快进、退后/libs/include/libavutil/ffversion.h: -------------------------------------------------------------------------------- 1 | #ifndef AVUTIL_FFVERSION_H 2 | #define AVUTIL_FFVERSION_H 3 | #define FFMPEG_VERSION "2.6.9" 4 | #endif /* AVUTIL_FFVERSION_H */ 5 | -------------------------------------------------------------------------------- /FFmpegv播放视频有声音,暂停,释放、快进、退后/libs/include/libavutil/intfloat.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011 Mans Rullgard 3 | * 4 | * This file is part of FFmpeg. 5 | * 6 | * FFmpeg is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * FFmpeg is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with FFmpeg; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #ifndef AVUTIL_INTFLOAT_H 22 | #define AVUTIL_INTFLOAT_H 23 | 24 | #include 25 | #include "attributes.h" 26 | 27 | union av_intfloat32 { 28 | uint32_t i; 29 | float f; 30 | }; 31 | 32 | union av_intfloat64 { 33 | uint64_t i; 34 | double f; 35 | }; 36 | 37 | /** 38 | * Reinterpret a 32-bit integer as a float. 39 | */ 40 | static av_always_inline float av_int2float(uint32_t i) 41 | { 42 | union av_intfloat32 v; 43 | v.i = i; 44 | return v.f; 45 | } 46 | 47 | /** 48 | * Reinterpret a float as a 32-bit integer. 49 | */ 50 | static av_always_inline uint32_t av_float2int(float f) 51 | { 52 | union av_intfloat32 v; 53 | v.f = f; 54 | return v.i; 55 | } 56 | 57 | /** 58 | * Reinterpret a 64-bit integer as a double. 59 | */ 60 | static av_always_inline double av_int2double(uint64_t i) 61 | { 62 | union av_intfloat64 v; 63 | v.i = i; 64 | return v.f; 65 | } 66 | 67 | /** 68 | * Reinterpret a double as a 64-bit integer. 69 | */ 70 | static av_always_inline uint64_t av_double2int(double f) 71 | { 72 | union av_intfloat64 v; 73 | v.f = f; 74 | return v.i; 75 | } 76 | 77 | #endif /* AVUTIL_INTFLOAT_H */ 78 | -------------------------------------------------------------------------------- /FFmpegv播放视频有声音,暂停,释放、快进、退后/libs/include/libavutil/lfg.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Lagged Fibonacci PRNG 3 | * Copyright (c) 2008 Michael Niedermayer 4 | * 5 | * This file is part of FFmpeg. 6 | * 7 | * FFmpeg is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * FFmpeg is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with FFmpeg; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 | */ 21 | 22 | #ifndef AVUTIL_LFG_H 23 | #define AVUTIL_LFG_H 24 | 25 | typedef struct AVLFG { 26 | unsigned int state[64]; 27 | int index; 28 | } AVLFG; 29 | 30 | void av_lfg_init(AVLFG *c, unsigned int seed); 31 | 32 | /** 33 | * Get the next random unsigned 32-bit number using an ALFG. 34 | * 35 | * Please also consider a simple LCG like state= state*1664525+1013904223, 36 | * it may be good enough and faster for your specific use case. 37 | */ 38 | static inline unsigned int av_lfg_get(AVLFG *c){ 39 | c->state[c->index & 63] = c->state[(c->index-24) & 63] + c->state[(c->index-55) & 63]; 40 | return c->state[c->index++ & 63]; 41 | } 42 | 43 | /** 44 | * Get the next random unsigned 32-bit number using a MLFG. 45 | * 46 | * Please also consider av_lfg_get() above, it is faster. 47 | */ 48 | static inline unsigned int av_mlfg_get(AVLFG *c){ 49 | unsigned int a= c->state[(c->index-55) & 63]; 50 | unsigned int b= c->state[(c->index-24) & 63]; 51 | return c->state[c->index++ & 63] = 2*a*b+a+b; 52 | } 53 | 54 | /** 55 | * Get the next two numbers generated by a Box-Muller Gaussian 56 | * generator using the random numbers issued by lfg. 57 | * 58 | * @param out array where the two generated numbers are placed 59 | */ 60 | void av_bmg_get(AVLFG *lfg, double out[2]); 61 | 62 | #endif /* AVUTIL_LFG_H */ 63 | -------------------------------------------------------------------------------- /FFmpegv播放视频有声音,暂停,释放、快进、退后/libs/include/libavutil/macros.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of FFmpeg. 3 | * 4 | * FFmpeg is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Lesser General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2.1 of the License, or (at your option) any later version. 8 | * 9 | * FFmpeg is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Lesser General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Lesser General Public 15 | * License along with FFmpeg; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | /** 20 | * @file 21 | * @ingroup lavu 22 | * Utility Preprocessor macros 23 | */ 24 | 25 | #ifndef AVUTIL_MACROS_H 26 | #define AVUTIL_MACROS_H 27 | 28 | /** 29 | * @addtogroup preproc_misc Preprocessor String Macros 30 | * 31 | * String manipulation macros 32 | * 33 | * @{ 34 | */ 35 | 36 | #define AV_STRINGIFY(s) AV_TOSTRING(s) 37 | #define AV_TOSTRING(s) #s 38 | 39 | #define AV_GLUE(a, b) a ## b 40 | #define AV_JOIN(a, b) AV_GLUE(a, b) 41 | 42 | /** 43 | * @} 44 | */ 45 | 46 | #define AV_PRAGMA(s) _Pragma(#s) 47 | 48 | #endif /* AVUTIL_MACROS_H */ 49 | -------------------------------------------------------------------------------- /FFmpegv播放视频有声音,暂停,释放、快进、退后/libs/include/libavutil/motion_vector.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of FFmpeg. 3 | * 4 | * FFmpeg is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Lesser General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2.1 of the License, or (at your option) any later version. 8 | * 9 | * FFmpeg is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Lesser General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Lesser General Public 15 | * License along with FFmpeg; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #ifndef AVUTIL_MOTION_VECTOR_H 20 | #define AVUTIL_MOTION_VECTOR_H 21 | 22 | #include 23 | 24 | typedef struct AVMotionVector { 25 | /** 26 | * Where the current macroblock comes from; negative value when it comes 27 | * from the past, positive value when it comes from the future. 28 | * XXX: set exact relative ref frame reference instead of a +/- 1 "direction". 29 | */ 30 | int32_t source; 31 | /** 32 | * Width and height of the block. 33 | */ 34 | uint8_t w, h; 35 | /** 36 | * Absolute source position. Can be outside the frame area. 37 | */ 38 | int16_t src_x, src_y; 39 | /** 40 | * Absolute destination position. Can be outside the frame area. 41 | */ 42 | int16_t dst_x, dst_y; 43 | /** 44 | * Extra flag information. 45 | * Currently unused. 46 | */ 47 | uint64_t flags; 48 | } AVMotionVector; 49 | 50 | #endif /* AVUTIL_MOTION_VECTOR_H */ 51 | -------------------------------------------------------------------------------- /FFmpegv播放视频有声音,暂停,释放、快进、退后/libs/include/libavutil/murmur3.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2013 Reimar Döffinger 3 | * 4 | * This file is part of FFmpeg. 5 | * 6 | * FFmpeg is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * FFmpeg is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with FFmpeg; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #ifndef AVUTIL_MURMUR3_H 22 | #define AVUTIL_MURMUR3_H 23 | 24 | #include 25 | 26 | struct AVMurMur3 *av_murmur3_alloc(void); 27 | void av_murmur3_init_seeded(struct AVMurMur3 *c, uint64_t seed); 28 | void av_murmur3_init(struct AVMurMur3 *c); 29 | void av_murmur3_update(struct AVMurMur3 *c, const uint8_t *src, int len); 30 | void av_murmur3_final(struct AVMurMur3 *c, uint8_t dst[16]); 31 | 32 | #endif /* AVUTIL_MURMUR3_H */ 33 | -------------------------------------------------------------------------------- /FFmpegv播放视频有声音,暂停,释放、快进、退后/libs/include/libavutil/random_seed.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2009 Baptiste Coudurier 3 | * 4 | * This file is part of FFmpeg. 5 | * 6 | * FFmpeg is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * FFmpeg is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with FFmpeg; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #ifndef AVUTIL_RANDOM_SEED_H 22 | #define AVUTIL_RANDOM_SEED_H 23 | 24 | #include 25 | /** 26 | * @addtogroup lavu_crypto 27 | * @{ 28 | */ 29 | 30 | /** 31 | * Get a seed to use in conjunction with random functions. 32 | * This function tries to provide a good seed at a best effort bases. 33 | * Its possible to call this function multiple times if more bits are needed. 34 | * It can be quite slow, which is why it should only be used as seed for a faster 35 | * PRNG. The quality of the seed depends on the platform. 36 | */ 37 | uint32_t av_get_random_seed(void); 38 | 39 | /** 40 | * @} 41 | */ 42 | 43 | #endif /* AVUTIL_RANDOM_SEED_H */ 44 | -------------------------------------------------------------------------------- /FFmpegv播放视频有声音,暂停,释放、快进、退后/libs/include/libavutil/replaygain.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This file is part of FFmpeg. 4 | * 5 | * FFmpeg is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * FFmpeg is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with FFmpeg; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | */ 19 | 20 | #ifndef AVUTIL_REPLAYGAIN_H 21 | #define AVUTIL_REPLAYGAIN_H 22 | 23 | #include 24 | 25 | /** 26 | * ReplayGain information (see 27 | * http://wiki.hydrogenaudio.org/index.php?title=ReplayGain_1.0_specification). 28 | * The size of this struct is a part of the public ABI. 29 | */ 30 | typedef struct AVReplayGain { 31 | /** 32 | * Track replay gain in microbels (divide by 100000 to get the value in dB). 33 | * Should be set to INT32_MIN when unknown. 34 | */ 35 | int32_t track_gain; 36 | /** 37 | * Peak track amplitude, with 100000 representing full scale (but values 38 | * may overflow). 0 when unknown. 39 | */ 40 | uint32_t track_peak; 41 | /** 42 | * Same as track_gain, but for the whole album. 43 | */ 44 | int32_t album_gain; 45 | /** 46 | * Same as track_peak, but for the whole album, 47 | */ 48 | uint32_t album_peak; 49 | } AVReplayGain; 50 | 51 | #endif /* AVUTIL_REPLAYGAIN_H */ 52 | -------------------------------------------------------------------------------- /FFmpegv播放视频有声音,暂停,释放、快进、退后/libs/include/libavutil/time.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2000-2003 Fabrice Bellard 3 | * 4 | * This file is part of FFmpeg. 5 | * 6 | * FFmpeg is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * FFmpeg is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with FFmpeg; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #ifndef AVUTIL_TIME_H 22 | #define AVUTIL_TIME_H 23 | 24 | #include 25 | 26 | /** 27 | * Get the current time in microseconds. 28 | */ 29 | int64_t av_gettime(void); 30 | 31 | /** 32 | * Get the current time in microseconds since some unspecified starting point. 33 | * On platforms that support it, the time comes from a monotonic clock 34 | * This property makes this time source ideal for measuring relative time. 35 | * The returned values may not be monotonic on platforms where a monotonic 36 | * clock is not available. 37 | */ 38 | int64_t av_gettime_relative(void); 39 | 40 | /** 41 | * Indicates with a boolean result if the av_gettime_relative() time source 42 | * is monotonic. 43 | */ 44 | int av_gettime_relative_is_monotonic(void); 45 | 46 | /** 47 | * Sleep for a period of time. Although the duration is expressed in 48 | * microseconds, the actual delay may be rounded to the precision of the 49 | * system timer. 50 | * 51 | * @param usec Number of microseconds to sleep. 52 | * @return zero on success or (negative) error code. 53 | */ 54 | int av_usleep(unsigned usec); 55 | 56 | #endif /* AVUTIL_TIME_H */ 57 | -------------------------------------------------------------------------------- /FFmpegv播放视频有声音,暂停,释放、快进、退后/libs/include/libavutil/xtea.h: -------------------------------------------------------------------------------- 1 | /* 2 | * A 32-bit implementation of the XTEA algorithm 3 | * Copyright (c) 2012 Samuel Pitoiset 4 | * 5 | * This file is part of FFmpeg. 6 | * 7 | * FFmpeg is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * FFmpeg is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with FFmpeg; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 | */ 21 | 22 | #ifndef AVUTIL_XTEA_H 23 | #define AVUTIL_XTEA_H 24 | 25 | #include 26 | 27 | /** 28 | * @file 29 | * @brief Public header for libavutil XTEA algorithm 30 | * @defgroup lavu_xtea XTEA 31 | * @ingroup lavu_crypto 32 | * @{ 33 | */ 34 | 35 | typedef struct AVXTEA { 36 | uint32_t key[16]; 37 | } AVXTEA; 38 | 39 | /** 40 | * Initialize an AVXTEA context. 41 | * 42 | * @param ctx an AVXTEA context 43 | * @param key a key of 16 bytes used for encryption/decryption 44 | */ 45 | void av_xtea_init(struct AVXTEA *ctx, const uint8_t key[16]); 46 | 47 | /** 48 | * Encrypt or decrypt a buffer using a previously initialized context. 49 | * 50 | * @param ctx an AVXTEA context 51 | * @param dst destination array, can be equal to src 52 | * @param src source array, can be equal to dst 53 | * @param count number of 8 byte blocks 54 | * @param iv initialization vector for CBC mode, if NULL then ECB will be used 55 | * @param decrypt 0 for encryption, 1 for decryption 56 | */ 57 | void av_xtea_crypt(struct AVXTEA *ctx, uint8_t *dst, const uint8_t *src, 58 | int count, uint8_t *iv, int decrypt); 59 | 60 | /** 61 | * @} 62 | */ 63 | 64 | #endif /* AVUTIL_XTEA_H */ 65 | -------------------------------------------------------------------------------- /FFmpegv播放视频有声音,暂停,释放、快进、退后/libs/include/libpostproc/version.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Version macros. 3 | * 4 | * This file is part of FFmpeg. 5 | * 6 | * FFmpeg is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * FFmpeg is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with FFmpeg; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #ifndef POSTPROC_POSTPROCESS_VERSION_H 22 | #define POSTPROC_POSTPROCESS_VERSION_H 23 | 24 | /** 25 | * @file 26 | * Libpostproc version macros 27 | */ 28 | 29 | #include "libavutil/avutil.h" 30 | 31 | #define LIBPOSTPROC_VERSION_MAJOR 53 32 | #define LIBPOSTPROC_VERSION_MINOR 3 33 | #define LIBPOSTPROC_VERSION_MICRO 100 34 | 35 | #define LIBPOSTPROC_VERSION_INT AV_VERSION_INT(LIBPOSTPROC_VERSION_MAJOR, \ 36 | LIBPOSTPROC_VERSION_MINOR, \ 37 | LIBPOSTPROC_VERSION_MICRO) 38 | #define LIBPOSTPROC_VERSION AV_VERSION(LIBPOSTPROC_VERSION_MAJOR, \ 39 | LIBPOSTPROC_VERSION_MINOR, \ 40 | LIBPOSTPROC_VERSION_MICRO) 41 | #define LIBPOSTPROC_BUILD LIBPOSTPROC_VERSION_INT 42 | 43 | #define LIBPOSTPROC_IDENT "postproc" AV_STRINGIFY(LIBPOSTPROC_VERSION) 44 | 45 | #endif /* POSTPROC_POSTPROCESS_VERSION_H */ 46 | -------------------------------------------------------------------------------- /FFmpegv播放视频有声音,暂停,释放、快进、退后/libs/include/libswresample/version.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Version macros. 3 | * 4 | * This file is part of libswresample 5 | * 6 | * libswresample is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * libswresample is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with libswresample; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #ifndef SWR_VERSION_H 22 | #define SWR_VERSION_H 23 | 24 | /** 25 | * @file 26 | * Libswresample version macros 27 | */ 28 | 29 | #include "libavutil/avutil.h" 30 | 31 | #define LIBSWRESAMPLE_VERSION_MAJOR 1 32 | #define LIBSWRESAMPLE_VERSION_MINOR 1 33 | #define LIBSWRESAMPLE_VERSION_MICRO 100 34 | 35 | #define LIBSWRESAMPLE_VERSION_INT AV_VERSION_INT(LIBSWRESAMPLE_VERSION_MAJOR, \ 36 | LIBSWRESAMPLE_VERSION_MINOR, \ 37 | LIBSWRESAMPLE_VERSION_MICRO) 38 | #define LIBSWRESAMPLE_VERSION AV_VERSION(LIBSWRESAMPLE_VERSION_MAJOR, \ 39 | LIBSWRESAMPLE_VERSION_MINOR, \ 40 | LIBSWRESAMPLE_VERSION_MICRO) 41 | #define LIBSWRESAMPLE_BUILD LIBSWRESAMPLE_VERSION_INT 42 | 43 | #define LIBSWRESAMPLE_IDENT "SwR" AV_STRINGIFY(LIBSWRESAMPLE_VERSION) 44 | 45 | #endif /* SWR_VERSION_H */ 46 | -------------------------------------------------------------------------------- /FFmpegv播放视频有声音,暂停,释放、快进、退后/src/androidTest/java/com/test/ffmpegvideoplay/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.test.ffmpegvideoplay; 2 | 3 | import android.content.Context; 4 | import android.support.test.InstrumentationRegistry; 5 | import android.support.test.runner.AndroidJUnit4; 6 | 7 | import org.junit.Test; 8 | import org.junit.runner.RunWith; 9 | 10 | import static org.junit.Assert.*; 11 | 12 | /** 13 | * Instrumented test, which will execute on an Android device. 14 | * 15 | * @see Testing documentation 16 | */ 17 | @RunWith(AndroidJUnit4.class) 18 | public class ExampleInstrumentedTest { 19 | @Test 20 | public void useAppContext() throws Exception { 21 | // Context of the app under test. 22 | Context appContext = InstrumentationRegistry.getTargetContext(); 23 | 24 | assertEquals("com.test.ffmpegvideoplay", appContext.getPackageName()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /FFmpegv播放视频有声音,暂停,释放、快进、退后/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /FFmpegv播放视频有声音,暂停,释放、快进、退后/src/main/cpp/FFmpegMusic.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Administrator on 2017/11/20. 3 | // 4 | 5 | #ifndef FFMPEGVIDEOPLAY_FFMPEGMUSIC_H 6 | #define FFMPEGVIDEOPLAY_FFMPEGMUSIC_H 7 | #include 8 | #include 9 | #include 10 | extern "C"{ 11 | 12 | #include 13 | #include 14 | #include 15 | #include "Log.h" 16 | #include 17 | 18 | class FFmpegMusic { 19 | 20 | public: 21 | FFmpegMusic(); 22 | ~FFmpegMusic(); 23 | void setAvCodecContext(AVCodecContext *avCodecContext);//解码器上下文 24 | 25 | int put(AVPacket *avPacket);//压进队列 26 | int get(AVPacket *avPacket);//弹出队列 27 | 28 | void play();//播放 29 | void stop();//暂停 30 | void pause();//pause 31 | 32 | int CreatePlayer();//创建opensl es播放器 33 | 34 | //成员变量 35 | public: 36 | int index;//流索引 37 | int isPlay=-1;//是否正在播放 38 | int isPause=1; 39 | pthread_t playId;//处理线程 40 | std::vector queue;//队列 41 | // std::queue queueNull;//空队列 42 | AVCodecContext *codec;//解码器上下文 43 | 44 | SwrContext *swrContext; 45 | uint8_t *out_buffer; 46 | int out_channer_nb; 47 | 48 | //同步锁 49 | pthread_mutex_t mutex; 50 | //条件变量 51 | pthread_cond_t cond; 52 | 53 | double clock;//从第一zhen开始所需要时间 54 | 55 | AVRational time_base; 56 | 57 | SLObjectItf engineObject; 58 | SLEngineItf engineEngine; 59 | SLEnvironmentalReverbItf outputMixEnvironmentalReverb; 60 | SLObjectItf outputMixObject; 61 | SLObjectItf bqPlayerObject; 62 | SLEffectSendItf bqPlayerEffectSend; 63 | SLVolumeItf bqPlayerVolume; 64 | SLPlayItf bqPlayerPlay; 65 | SLAndroidSimpleBufferQueueItf bqPlayerBufferQueue; 66 | }; 67 | 68 | }; 69 | #endif //FFMPEGMUSIC_FFMPEGAUDIO_H -------------------------------------------------------------------------------- /FFmpegv播放视频有声音,暂停,释放、快进、退后/src/main/cpp/FFmpegVideo.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Administrator on 2017/11/20. 3 | // 4 | 5 | #ifndef FFMPEGVIDEOPLAY_FFMPEGVIDEO_H 6 | #define FFMPEGVIDEOPLAY_FFMPEGVIDEO_H 7 | #include 8 | #include 9 | #include 10 | #include "FFmpegMusic.h" 11 | 12 | extern "C"{ 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include "Log.h" 20 | #include 21 | #include 22 | 23 | class FFmpegVideo { 24 | public: 25 | FFmpegVideo(); 26 | ~FFmpegVideo(); 27 | void setAvCodecContext(AVCodecContext *avCodecContext);//解码器上下文 28 | 29 | int put(AVPacket *avPacket);//压进队列 30 | int get(AVPacket *avPacket);//弹出队列 31 | 32 | void play();//播放 33 | void stop();//暂停 34 | void pause();//pause 35 | 36 | double synchronize(AVFrame *frame, double play); 37 | 38 | void setFFmepegMusic(FFmpegMusic *ffmpegMusic); 39 | 40 | void setPlayCall(void (*call)(AVFrame* frame)); 41 | 42 | 43 | public: 44 | int index;//流索引 45 | int isPlay=-1;//是否正在播放 46 | int isPause=-1;//是否暂停 47 | pthread_t playId;//处理线程 48 | std::vector queue;//队列 49 | 50 | AVCodecContext *codec;//解码器上下文 51 | 52 | SwsContext* swsContext; 53 | //同步锁 54 | pthread_mutex_t mutex; 55 | //条件变量 56 | pthread_cond_t cond; 57 | 58 | FFmpegMusic *ffmpegMusic; 59 | 60 | AVRational time_base; 61 | double clock; 62 | 63 | }; 64 | 65 | }; 66 | 67 | #endif //FFMPEGVIDEOPLAY_FFMPEGVIDEO_H 68 | -------------------------------------------------------------------------------- /FFmpegv播放视频有声音,暂停,释放、快进、退后/src/main/cpp/Log.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by david on 2017/9/27. 3 | // 4 | 5 | #ifndef FFMPEGMUSIC_LOG_H 6 | #define FFMPEGMUSIC_LOG_H 7 | #include 8 | 9 | #define LOGE(FORMAT,...) __android_log_print(ANDROID_LOG_ERROR,"LC XXX",FORMAT,##__VA_ARGS__); 10 | 11 | #endif //FFMPEGMUSIC_LOG_H 12 | -------------------------------------------------------------------------------- /FFmpegv播放视频有声音,暂停,释放、快进、退后/src/main/java/com/test/ffmpegvideoplay/Play.java: -------------------------------------------------------------------------------- 1 | package com.test.ffmpegvideoplay; 2 | 3 | import android.view.Surface; 4 | import android.view.SurfaceHolder; 5 | import android.view.SurfaceView; 6 | 7 | /** 8 | * Created by LC on 2017/11/20. 9 | */ 10 | 11 | public class Play implements SurfaceHolder.Callback { 12 | static{ 13 | System.loadLibrary("avcodec-56"); 14 | System.loadLibrary("avdevice-56"); 15 | System.loadLibrary("avfilter-5"); 16 | System.loadLibrary("avformat-56"); 17 | System.loadLibrary("avutil-54"); 18 | System.loadLibrary("postproc-53"); 19 | System.loadLibrary("swresample-1"); 20 | System.loadLibrary("swscale-3"); 21 | System.loadLibrary("native-lib"); 22 | } 23 | 24 | private SurfaceView surfaceView; 25 | public void playJava(String path) { 26 | if (surfaceView == null) { 27 | return; 28 | } 29 | play(path); 30 | } 31 | 32 | public void setSurfaceView(SurfaceView surfaceView) { 33 | this.surfaceView = surfaceView; 34 | display(surfaceView.getHolder().getSurface()); 35 | surfaceView.getHolder().addCallback(this); 36 | 37 | } 38 | 39 | public native int play(String path); 40 | 41 | public native void display(Surface surface); 42 | 43 | 44 | public native void release(); 45 | 46 | public native void stop(); 47 | 48 | public native int getTotalTime(); 49 | 50 | public native double getCurrentPosition(); 51 | 52 | public native void seekTo(int msec); 53 | 54 | public native void stepBack();//快退 55 | 56 | public native void stepUp();//快进 57 | 58 | 59 | @Override 60 | public void surfaceCreated(SurfaceHolder surfaceHolder) { 61 | 62 | } 63 | 64 | @Override 65 | public void surfaceChanged(SurfaceHolder surfaceHolder, int i, int i1, int i2) { 66 | display(surfaceHolder.getSurface()); 67 | } 68 | 69 | @Override 70 | public void surfaceDestroyed(SurfaceHolder surfaceHolder) { 71 | 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /FFmpegv播放视频有声音,暂停,释放、快进、退后/src/main/java/com/test/ffmpegvideoplay/VideoView.java: -------------------------------------------------------------------------------- 1 | package com.test.ffmpegvideoplay; 2 | 3 | import android.content.Context; 4 | import android.util.AttributeSet; 5 | import android.view.SurfaceView; 6 | 7 | /** 8 | * Created by LC on 2017/12/1. 9 | */ 10 | 11 | public class VideoView extends SurfaceView{ 12 | 13 | public VideoView(Context context) { 14 | super(context); 15 | } 16 | 17 | public VideoView(Context context, AttributeSet attrs) { 18 | super(context, attrs); 19 | } 20 | 21 | public VideoView(Context context, AttributeSet attrs, int defStyleAttr) { 22 | super(context, attrs, defStyleAttr); 23 | } 24 | 25 | public VideoView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { 26 | super(context, attrs, defStyleAttr, defStyleRes); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /FFmpegv播放视频有声音,暂停,释放、快进、退后/src/main/res/drawable-v24/ic_launcher_foreground.xml: -------------------------------------------------------------------------------- 1 | 7 | 12 | 13 | 19 | 22 | 25 | 26 | 27 | 28 | 34 | 35 | -------------------------------------------------------------------------------- /FFmpegv播放视频有声音,暂停,释放、快进、退后/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /FFmpegv播放视频有声音,暂停,释放、快进、退后/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /FFmpegv播放视频有声音,暂停,释放、快进、退后/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/AudioVideoStudyCodeTwo/938538d1bf88e3b9f1832d36f2d0128fc48429e9/FFmpegv播放视频有声音,暂停,释放、快进、退后/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /FFmpegv播放视频有声音,暂停,释放、快进、退后/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/AudioVideoStudyCodeTwo/938538d1bf88e3b9f1832d36f2d0128fc48429e9/FFmpegv播放视频有声音,暂停,释放、快进、退后/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /FFmpegv播放视频有声音,暂停,释放、快进、退后/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/AudioVideoStudyCodeTwo/938538d1bf88e3b9f1832d36f2d0128fc48429e9/FFmpegv播放视频有声音,暂停,释放、快进、退后/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /FFmpegv播放视频有声音,暂停,释放、快进、退后/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/AudioVideoStudyCodeTwo/938538d1bf88e3b9f1832d36f2d0128fc48429e9/FFmpegv播放视频有声音,暂停,释放、快进、退后/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /FFmpegv播放视频有声音,暂停,释放、快进、退后/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/AudioVideoStudyCodeTwo/938538d1bf88e3b9f1832d36f2d0128fc48429e9/FFmpegv播放视频有声音,暂停,释放、快进、退后/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /FFmpegv播放视频有声音,暂停,释放、快进、退后/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/AudioVideoStudyCodeTwo/938538d1bf88e3b9f1832d36f2d0128fc48429e9/FFmpegv播放视频有声音,暂停,释放、快进、退后/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /FFmpegv播放视频有声音,暂停,释放、快进、退后/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/AudioVideoStudyCodeTwo/938538d1bf88e3b9f1832d36f2d0128fc48429e9/FFmpegv播放视频有声音,暂停,释放、快进、退后/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /FFmpegv播放视频有声音,暂停,释放、快进、退后/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/AudioVideoStudyCodeTwo/938538d1bf88e3b9f1832d36f2d0128fc48429e9/FFmpegv播放视频有声音,暂停,释放、快进、退后/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /FFmpegv播放视频有声音,暂停,释放、快进、退后/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/AudioVideoStudyCodeTwo/938538d1bf88e3b9f1832d36f2d0128fc48429e9/FFmpegv播放视频有声音,暂停,释放、快进、退后/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /FFmpegv播放视频有声音,暂停,释放、快进、退后/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/AudioVideoStudyCodeTwo/938538d1bf88e3b9f1832d36f2d0128fc48429e9/FFmpegv播放视频有声音,暂停,释放、快进、退后/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /FFmpegv播放视频有声音,暂停,释放、快进、退后/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | -------------------------------------------------------------------------------- /FFmpegv播放视频有声音,暂停,释放、快进、退后/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | FFmpegVideoPlay 3 | 4 | -------------------------------------------------------------------------------- /FFmpegv播放视频有声音,暂停,释放、快进、退后/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /FFmpegv播放视频有声音,暂停,释放、快进、退后/src/test/java/com/test/ffmpegvideoplay/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.test.ffmpegvideoplay; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * @see Testing documentation 11 | */ 12 | public class ExampleUnitTest { 13 | @Test 14 | public void addition_isCorrect() throws Exception { 15 | assertEquals(4, 2 + 2); 16 | } 17 | } -------------------------------------------------------------------------------- /FFmpeg使用OpenSLES播放音乐,能停止/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.4.1) 2 | 3 | set(distribution_DIR ../../../../libs) 4 | 5 | add_library( native-lib 6 | SHARED 7 | src/main/cpp/native-lib.cpp 8 | src/main/cpp/FFmpegMusic.cpp 9 | ) 10 | add_library( avcodec-56 11 | SHARED 12 | IMPORTED) 13 | set_target_properties( avcodec-56 14 | PROPERTIES IMPORTED_LOCATION 15 | ${distribution_DIR}/armeabi/libavcodec-56.so) 16 | add_library( avfilter-5 17 | SHARED 18 | IMPORTED) 19 | set_target_properties( avfilter-5 20 | PROPERTIES IMPORTED_LOCATION 21 | ${distribution_DIR}/armeabi/libavfilter-5.so) 22 | 23 | add_library( avformat-56 24 | SHARED 25 | IMPORTED) 26 | set_target_properties( avformat-56 27 | PROPERTIES IMPORTED_LOCATION 28 | ${distribution_DIR}/armeabi/libavformat-56.so) 29 | 30 | add_library( avutil-54 31 | SHARED 32 | IMPORTED) 33 | set_target_properties( avutil-54 34 | PROPERTIES IMPORTED_LOCATION 35 | ${distribution_DIR}/armeabi/libavutil-54.so) 36 | 37 | add_library( swresample-1 38 | SHARED 39 | IMPORTED) 40 | set_target_properties( swresample-1 41 | PROPERTIES IMPORTED_LOCATION 42 | ${distribution_DIR}/armeabi/libswresample-1.so) 43 | 44 | add_library( swscale-3 45 | SHARED 46 | IMPORTED) 47 | set_target_properties( swscale-3 48 | PROPERTIES IMPORTED_LOCATION 49 | ${distribution_DIR}/armeabi/libswscale-3.so) 50 | include_directories(libs/include) 51 | target_link_libraries( native-lib 52 | avcodec-56 53 | avfilter-5 54 | avformat-56 55 | avutil-54 56 | swresample-1 57 | swscale-3 58 | log 59 | android 60 | OpenSLES 61 | ) -------------------------------------------------------------------------------- /FFmpeg使用OpenSLES播放音乐,能停止/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 26 5 | defaultConfig { 6 | applicationId "com.test.ffmpegopensles" 7 | minSdkVersion 19 8 | targetSdkVersion 26 9 | versionCode 1 10 | versionName "1.0" 11 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 12 | sourceSets { 13 | main { 14 | jniLibs.srcDirs = ['libs'] 15 | } 16 | } 17 | externalNativeBuild { 18 | cmake { 19 | cppFlags "-frtti -fexceptions" 20 | abiFilters 'armeabi' 21 | } 22 | } 23 | } 24 | buildTypes { 25 | release { 26 | minifyEnabled false 27 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 28 | } 29 | } 30 | externalNativeBuild { 31 | cmake { 32 | path "CMakeLists.txt" 33 | } 34 | } 35 | } 36 | 37 | dependencies { 38 | implementation fileTree(dir: 'libs', include: ['*.jar']) 39 | implementation 'com.android.support:appcompat-v7:26.1.0' 40 | testImplementation 'junit:junit:4.12' 41 | androidTestImplementation 'com.android.support.test:runner:1.0.1' 42 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1' 43 | } 44 | -------------------------------------------------------------------------------- /FFmpeg使用OpenSLES播放音乐,能停止/libs/armeabi/libavcodec-56.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/AudioVideoStudyCodeTwo/938538d1bf88e3b9f1832d36f2d0128fc48429e9/FFmpeg使用OpenSLES播放音乐,能停止/libs/armeabi/libavcodec-56.so -------------------------------------------------------------------------------- /FFmpeg使用OpenSLES播放音乐,能停止/libs/armeabi/libavdevice-56.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/AudioVideoStudyCodeTwo/938538d1bf88e3b9f1832d36f2d0128fc48429e9/FFmpeg使用OpenSLES播放音乐,能停止/libs/armeabi/libavdevice-56.so -------------------------------------------------------------------------------- /FFmpeg使用OpenSLES播放音乐,能停止/libs/armeabi/libavfilter-5.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/AudioVideoStudyCodeTwo/938538d1bf88e3b9f1832d36f2d0128fc48429e9/FFmpeg使用OpenSLES播放音乐,能停止/libs/armeabi/libavfilter-5.so -------------------------------------------------------------------------------- /FFmpeg使用OpenSLES播放音乐,能停止/libs/armeabi/libavformat-56.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/AudioVideoStudyCodeTwo/938538d1bf88e3b9f1832d36f2d0128fc48429e9/FFmpeg使用OpenSLES播放音乐,能停止/libs/armeabi/libavformat-56.so -------------------------------------------------------------------------------- /FFmpeg使用OpenSLES播放音乐,能停止/libs/armeabi/libavutil-54.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/AudioVideoStudyCodeTwo/938538d1bf88e3b9f1832d36f2d0128fc48429e9/FFmpeg使用OpenSLES播放音乐,能停止/libs/armeabi/libavutil-54.so -------------------------------------------------------------------------------- /FFmpeg使用OpenSLES播放音乐,能停止/libs/armeabi/libpostproc-53.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/AudioVideoStudyCodeTwo/938538d1bf88e3b9f1832d36f2d0128fc48429e9/FFmpeg使用OpenSLES播放音乐,能停止/libs/armeabi/libpostproc-53.so -------------------------------------------------------------------------------- /FFmpeg使用OpenSLES播放音乐,能停止/libs/armeabi/libswresample-1.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/AudioVideoStudyCodeTwo/938538d1bf88e3b9f1832d36f2d0128fc48429e9/FFmpeg使用OpenSLES播放音乐,能停止/libs/armeabi/libswresample-1.so -------------------------------------------------------------------------------- /FFmpeg使用OpenSLES播放音乐,能停止/libs/armeabi/libswscale-3.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/979451341/AudioVideoStudyCodeTwo/938538d1bf88e3b9f1832d36f2d0128fc48429e9/FFmpeg使用OpenSLES播放音乐,能停止/libs/armeabi/libswscale-3.so -------------------------------------------------------------------------------- /FFmpeg使用OpenSLES播放音乐,能停止/libs/include/libavcodec/qsv.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Intel MediaSDK QSV public API 3 | * 4 | * This file is part of FFmpeg. 5 | * 6 | * FFmpeg is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * FFmpeg is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with FFmpeg; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #ifndef AVCODEC_QSV_H 22 | #define AVCODEC_QSV_H 23 | 24 | #include 25 | 26 | typedef struct AVQSVContext { 27 | mfxSession session; 28 | int iopattern; 29 | 30 | mfxExtBuffer **ext_buffers; 31 | int nb_ext_buffers; 32 | } AVQSVContext; 33 | 34 | /** 35 | * Allocate a new context. 36 | * 37 | * It must be freed by the caller with av_free(). 38 | */ 39 | AVQSVContext *av_qsv_alloc_context(void); 40 | 41 | #endif /* AVCODEC_QSV_H */ 42 | -------------------------------------------------------------------------------- /FFmpeg使用OpenSLES播放音乐,能停止/libs/include/libavdevice/version.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of FFmpeg. 3 | * 4 | * FFmpeg is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Lesser General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2.1 of the License, or (at your option) any later version. 8 | * 9 | * FFmpeg is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Lesser General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Lesser General Public 15 | * License along with FFmpeg; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #ifndef AVDEVICE_VERSION_H 20 | #define AVDEVICE_VERSION_H 21 | 22 | /** 23 | * @file 24 | * @ingroup lavd 25 | * Libavdevice version macros 26 | */ 27 | 28 | #include "libavutil/version.h" 29 | 30 | #define LIBAVDEVICE_VERSION_MAJOR 56 31 | #define LIBAVDEVICE_VERSION_MINOR 4 32 | #define LIBAVDEVICE_VERSION_MICRO 100 33 | 34 | #define LIBAVDEVICE_VERSION_INT AV_VERSION_INT(LIBAVDEVICE_VERSION_MAJOR, \ 35 | LIBAVDEVICE_VERSION_MINOR, \ 36 | LIBAVDEVICE_VERSION_MICRO) 37 | #define LIBAVDEVICE_VERSION AV_VERSION(LIBAVDEVICE_VERSION_MAJOR, \ 38 | LIBAVDEVICE_VERSION_MINOR, \ 39 | LIBAVDEVICE_VERSION_MICRO) 40 | #define LIBAVDEVICE_BUILD LIBAVDEVICE_VERSION_INT 41 | 42 | #define LIBAVDEVICE_IDENT "Lavd" AV_STRINGIFY(LIBAVDEVICE_VERSION) 43 | 44 | /** 45 | * FF_API_* defines may be placed below to indicate public API that will be 46 | * dropped at a future version bump. The defines themselves are not part of 47 | * the public API and may change, break or disappear at any time. 48 | */ 49 | 50 | #endif /* AVDEVICE_VERSION_H */ 51 | -------------------------------------------------------------------------------- /FFmpeg使用OpenSLES播放音乐,能停止/libs/include/libavfilter/avfiltergraph.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Filter graphs 3 | * copyright (c) 2007 Bobby Bingham 4 | * 5 | * This file is part of FFmpeg. 6 | * 7 | * FFmpeg is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * FFmpeg is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with FFmpeg; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 | */ 21 | 22 | #ifndef AVFILTER_AVFILTERGRAPH_H 23 | #define AVFILTER_AVFILTERGRAPH_H 24 | 25 | #include "avfilter.h" 26 | #include "libavutil/log.h" 27 | 28 | #endif /* AVFILTER_AVFILTERGRAPH_H */ 29 | -------------------------------------------------------------------------------- /FFmpeg使用OpenSLES播放音乐,能停止/libs/include/libavutil/adler32.h: -------------------------------------------------------------------------------- 1 | /* 2 | * copyright (c) 2006 Mans Rullgard 3 | * 4 | * This file is part of FFmpeg. 5 | * 6 | * FFmpeg is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * FFmpeg is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with FFmpeg; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #ifndef AVUTIL_ADLER32_H 22 | #define AVUTIL_ADLER32_H 23 | 24 | #include 25 | #include "attributes.h" 26 | 27 | /** 28 | * @file 29 | * Public header for libavutil Adler32 hasher 30 | * 31 | * @defgroup lavu_adler32 Adler32 32 | * @ingroup lavu_crypto 33 | * @{ 34 | */ 35 | 36 | /** 37 | * Calculate the Adler32 checksum of a buffer. 38 | * 39 | * Passing the return value to a subsequent av_adler32_update() call 40 | * allows the checksum of multiple buffers to be calculated as though 41 | * they were concatenated. 42 | * 43 | * @param adler initial checksum value 44 | * @param buf pointer to input buffer 45 | * @param len size of input buffer 46 | * @return updated checksum 47 | */ 48 | unsigned long av_adler32_update(unsigned long adler, const uint8_t *buf, 49 | unsigned int len) av_pure; 50 | 51 | /** 52 | * @} 53 | */ 54 | 55 | #endif /* AVUTIL_ADLER32_H */ 56 | -------------------------------------------------------------------------------- /FFmpeg使用OpenSLES播放音乐,能停止/libs/include/libavutil/aes.h: -------------------------------------------------------------------------------- 1 | /* 2 | * copyright (c) 2007 Michael Niedermayer 3 | * 4 | * This file is part of FFmpeg. 5 | * 6 | * FFmpeg is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * FFmpeg is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with FFmpeg; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #ifndef AVUTIL_AES_H 22 | #define AVUTIL_AES_H 23 | 24 | #include 25 | 26 | #include "attributes.h" 27 | #include "version.h" 28 | 29 | /** 30 | * @defgroup lavu_aes AES 31 | * @ingroup lavu_crypto 32 | * @{ 33 | */ 34 | 35 | extern const int av_aes_size; 36 | 37 | struct AVAES; 38 | 39 | /** 40 | * Allocate an AVAES context. 41 | */ 42 | struct AVAES *av_aes_alloc(void); 43 | 44 | /** 45 | * Initialize an AVAES context. 46 | * @param key_bits 128, 192 or 256 47 | * @param decrypt 0 for encryption, 1 for decryption 48 | */ 49 | int av_aes_init(struct AVAES *a, const uint8_t *key, int key_bits, int decrypt); 50 | 51 | /** 52 | * Encrypt or decrypt a buffer using a previously initialized context. 53 | * @param count number of 16 byte blocks 54 | * @param dst destination array, can be equal to src 55 | * @param src source array, can be equal to dst 56 | * @param iv initialization vector for CBC mode, if NULL then ECB will be used 57 | * @param decrypt 0 for encryption, 1 for decryption 58 | */ 59 | void av_aes_crypt(struct AVAES *a, uint8_t *dst, const uint8_t *src, int count, uint8_t *iv, int decrypt); 60 | 61 | /** 62 | * @} 63 | */ 64 | 65 | #endif /* AVUTIL_AES_H */ 66 | -------------------------------------------------------------------------------- /FFmpeg使用OpenSLES播放音乐,能停止/libs/include/libavutil/audioconvert.h: -------------------------------------------------------------------------------- 1 | 2 | #include "version.h" 3 | 4 | #if FF_API_AUDIOCONVERT 5 | #include "channel_layout.h" 6 | #endif 7 | -------------------------------------------------------------------------------- /FFmpeg使用OpenSLES播放音乐,能停止/libs/include/libavutil/avconfig.h: -------------------------------------------------------------------------------- 1 | /* Generated by ffconf */ 2 | #ifndef AVUTIL_AVCONFIG_H 3 | #define AVUTIL_AVCONFIG_H 4 | #define AV_HAVE_BIGENDIAN 0 5 | #define AV_HAVE_FAST_UNALIGNED 0 6 | #define AV_HAVE_INCOMPATIBLE_LIBAV_ABI 0 7 | #endif /* AVUTIL_AVCONFIG_H */ 8 | -------------------------------------------------------------------------------- /FFmpeg使用OpenSLES播放音乐,能停止/libs/include/libavutil/ffversion.h: -------------------------------------------------------------------------------- 1 | #ifndef AVUTIL_FFVERSION_H 2 | #define AVUTIL_FFVERSION_H 3 | #define FFMPEG_VERSION "2.6.9" 4 | #endif /* AVUTIL_FFVERSION_H */ 5 | -------------------------------------------------------------------------------- /FFmpeg使用OpenSLES播放音乐,能停止/libs/include/libavutil/intfloat.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011 Mans Rullgard 3 | * 4 | * This file is part of FFmpeg. 5 | * 6 | * FFmpeg is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * FFmpeg is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with FFmpeg; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #ifndef AVUTIL_INTFLOAT_H 22 | #define AVUTIL_INTFLOAT_H 23 | 24 | #include 25 | #include "attributes.h" 26 | 27 | union av_intfloat32 { 28 | uint32_t i; 29 | float f; 30 | }; 31 | 32 | union av_intfloat64 { 33 | uint64_t i; 34 | double f; 35 | }; 36 | 37 | /** 38 | * Reinterpret a 32-bit integer as a float. 39 | */ 40 | static av_always_inline float av_int2float(uint32_t i) 41 | { 42 | union av_intfloat32 v; 43 | v.i = i; 44 | return v.f; 45 | } 46 | 47 | /** 48 | * Reinterpret a float as a 32-bit integer. 49 | */ 50 | static av_always_inline uint32_t av_float2int(float f) 51 | { 52 | union av_intfloat32 v; 53 | v.f = f; 54 | return v.i; 55 | } 56 | 57 | /** 58 | * Reinterpret a 64-bit integer as a double. 59 | */ 60 | static av_always_inline double av_int2double(uint64_t i) 61 | { 62 | union av_intfloat64 v; 63 | v.i = i; 64 | return v.f; 65 | } 66 | 67 | /** 68 | * Reinterpret a double as a 64-bit integer. 69 | */ 70 | static av_always_inline uint64_t av_double2int(double f) 71 | { 72 | union av_intfloat64 v; 73 | v.f = f; 74 | return v.i; 75 | } 76 | 77 | #endif /* AVUTIL_INTFLOAT_H */ 78 | -------------------------------------------------------------------------------- /FFmpeg使用OpenSLES播放音乐,能停止/libs/include/libavutil/lfg.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Lagged Fibonacci PRNG 3 | * Copyright (c) 2008 Michael Niedermayer 4 | * 5 | * This file is part of FFmpeg. 6 | * 7 | * FFmpeg is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * FFmpeg is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with FFmpeg; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 | */ 21 | 22 | #ifndef AVUTIL_LFG_H 23 | #define AVUTIL_LFG_H 24 | 25 | typedef struct AVLFG { 26 | unsigned int state[64]; 27 | int index; 28 | } AVLFG; 29 | 30 | void av_lfg_init(AVLFG *c, unsigned int seed); 31 | 32 | /** 33 | * Get the next random unsigned 32-bit number using an ALFG. 34 | * 35 | * Please also consider a simple LCG like state= state*1664525+1013904223, 36 | * it may be good enough and faster for your specific use case. 37 | */ 38 | static inline unsigned int av_lfg_get(AVLFG *c){ 39 | c->state[c->index & 63] = c->state[(c->index-24) & 63] + c->state[(c->index-55) & 63]; 40 | return c->state[c->index++ & 63]; 41 | } 42 | 43 | /** 44 | * Get the next random unsigned 32-bit number using a MLFG. 45 | * 46 | * Please also consider av_lfg_get() above, it is faster. 47 | */ 48 | static inline unsigned int av_mlfg_get(AVLFG *c){ 49 | unsigned int a= c->state[(c->index-55) & 63]; 50 | unsigned int b= c->state[(c->index-24) & 63]; 51 | return c->state[c->index++ & 63] = 2*a*b+a+b; 52 | } 53 | 54 | /** 55 | * Get the next two numbers generated by a Box-Muller Gaussian 56 | * generator using the random numbers issued by lfg. 57 | * 58 | * @param out array where the two generated numbers are placed 59 | */ 60 | void av_bmg_get(AVLFG *lfg, double out[2]); 61 | 62 | #endif /* AVUTIL_LFG_H */ 63 | -------------------------------------------------------------------------------- /FFmpeg使用OpenSLES播放音乐,能停止/libs/include/libavutil/macros.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of FFmpeg. 3 | * 4 | * FFmpeg is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Lesser General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2.1 of the License, or (at your option) any later version. 8 | * 9 | * FFmpeg is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Lesser General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Lesser General Public 15 | * License along with FFmpeg; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | /** 20 | * @file 21 | * @ingroup lavu 22 | * Utility Preprocessor macros 23 | */ 24 | 25 | #ifndef AVUTIL_MACROS_H 26 | #define AVUTIL_MACROS_H 27 | 28 | /** 29 | * @addtogroup preproc_misc Preprocessor String Macros 30 | * 31 | * String manipulation macros 32 | * 33 | * @{ 34 | */ 35 | 36 | #define AV_STRINGIFY(s) AV_TOSTRING(s) 37 | #define AV_TOSTRING(s) #s 38 | 39 | #define AV_GLUE(a, b) a ## b 40 | #define AV_JOIN(a, b) AV_GLUE(a, b) 41 | 42 | /** 43 | * @} 44 | */ 45 | 46 | #define AV_PRAGMA(s) _Pragma(#s) 47 | 48 | #endif /* AVUTIL_MACROS_H */ 49 | -------------------------------------------------------------------------------- /FFmpeg使用OpenSLES播放音乐,能停止/libs/include/libavutil/motion_vector.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of FFmpeg. 3 | * 4 | * FFmpeg is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Lesser General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2.1 of the License, or (at your option) any later version. 8 | * 9 | * FFmpeg is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Lesser General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Lesser General Public 15 | * License along with FFmpeg; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #ifndef AVUTIL_MOTION_VECTOR_H 20 | #define AVUTIL_MOTION_VECTOR_H 21 | 22 | #include 23 | 24 | typedef struct AVMotionVector { 25 | /** 26 | * Where the current macroblock comes from; negative value when it comes 27 | * from the past, positive value when it comes from the future. 28 | * XXX: set exact relative ref frame reference instead of a +/- 1 "direction". 29 | */ 30 | int32_t source; 31 | /** 32 | * Width and height of the block. 33 | */ 34 | uint8_t w, h; 35 | /** 36 | * Absolute source position. Can be outside the frame area. 37 | */ 38 | int16_t src_x, src_y; 39 | /** 40 | * Absolute destination position. Can be outside the frame area. 41 | */ 42 | int16_t dst_x, dst_y; 43 | /** 44 | * Extra flag information. 45 | * Currently unused. 46 | */ 47 | uint64_t flags; 48 | } AVMotionVector; 49 | 50 | #endif /* AVUTIL_MOTION_VECTOR_H */ 51 | -------------------------------------------------------------------------------- /FFmpeg使用OpenSLES播放音乐,能停止/libs/include/libavutil/murmur3.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2013 Reimar Döffinger 3 | * 4 | * This file is part of FFmpeg. 5 | * 6 | * FFmpeg is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * FFmpeg is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with FFmpeg; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #ifndef AVUTIL_MURMUR3_H 22 | #define AVUTIL_MURMUR3_H 23 | 24 | #include 25 | 26 | struct AVMurMur3 *av_murmur3_alloc(void); 27 | void av_murmur3_init_seeded(struct AVMurMur3 *c, uint64_t seed); 28 | void av_murmur3_init(struct AVMurMur3 *c); 29 | void av_murmur3_update(struct AVMurMur3 *c, const uint8_t *src, int len); 30 | void av_murmur3_final(struct AVMurMur3 *c, uint8_t dst[16]); 31 | 32 | #endif /* AVUTIL_MURMUR3_H */ 33 | -------------------------------------------------------------------------------- /FFmpeg使用OpenSLES播放音乐,能停止/libs/include/libavutil/random_seed.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2009 Baptiste Coudurier 3 | * 4 | * This file is part of FFmpeg. 5 | * 6 | * FFmpeg is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * FFmpeg is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with FFmpeg; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #ifndef AVUTIL_RANDOM_SEED_H 22 | #define AVUTIL_RANDOM_SEED_H 23 | 24 | #include 25 | /** 26 | * @addtogroup lavu_crypto 27 | * @{ 28 | */ 29 | 30 | /** 31 | * Get a seed to use in conjunction with random functions. 32 | * This function tries to provide a good seed at a best effort bases. 33 | * Its possible to call this function multiple times if more bits are needed. 34 | * It can be quite slow, which is why it should only be used as seed for a faster 35 | * PRNG. The quality of the seed depends on the platform. 36 | */ 37 | uint32_t av_get_random_seed(void); 38 | 39 | /** 40 | * @} 41 | */ 42 | 43 | #endif /* AVUTIL_RANDOM_SEED_H */ 44 | -------------------------------------------------------------------------------- /FFmpeg使用OpenSLES播放音乐,能停止/libs/include/libavutil/replaygain.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This file is part of FFmpeg. 4 | * 5 | * FFmpeg is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * FFmpeg is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with FFmpeg; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | */ 19 | 20 | #ifndef AVUTIL_REPLAYGAIN_H 21 | #define AVUTIL_REPLAYGAIN_H 22 | 23 | #include 24 | 25 | /** 26 | * ReplayGain information (see 27 | * http://wiki.hydrogenaudio.org/index.php?title=ReplayGain_1.0_specification). 28 | * The size of this struct is a part of the public ABI. 29 | */ 30 | typedef struct AVReplayGain { 31 | /** 32 | * Track replay gain in microbels (divide by 100000 to get the value in dB). 33 | * Should be set to INT32_MIN when unknown. 34 | */ 35 | int32_t track_gain; 36 | /** 37 | * Peak track amplitude, with 100000 representing full scale (but values 38 | * may overflow). 0 when unknown. 39 | */ 40 | uint32_t track_peak; 41 | /** 42 | * Same as track_gain, but for the whole album. 43 | */ 44 | int32_t album_gain; 45 | /** 46 | * Same as track_peak, but for the whole album, 47 | */ 48 | uint32_t album_peak; 49 | } AVReplayGain; 50 | 51 | #endif /* AVUTIL_REPLAYGAIN_H */ 52 | -------------------------------------------------------------------------------- /FFmpeg使用OpenSLES播放音乐,能停止/libs/include/libavutil/time.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2000-2003 Fabrice Bellard 3 | * 4 | * This file is part of FFmpeg. 5 | * 6 | * FFmpeg is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * FFmpeg is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with FFmpeg; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #ifndef AVUTIL_TIME_H 22 | #define AVUTIL_TIME_H 23 | 24 | #include 25 | 26 | /** 27 | * Get the current time in microseconds. 28 | */ 29 | int64_t av_gettime(void); 30 | 31 | /** 32 | * Get the current time in microseconds since some unspecified starting point. 33 | * On platforms that support it, the time comes from a monotonic clock 34 | * This property makes this time source ideal for measuring relative time. 35 | * The returned values may not be monotonic on platforms where a monotonic 36 | * clock is not available. 37 | */ 38 | int64_t av_gettime_relative(void); 39 | 40 | /** 41 | * Indicates with a boolean result if the av_gettime_relative() time source 42 | * is monotonic. 43 | */ 44 | int av_gettime_relative_is_monotonic(void); 45 | 46 | /** 47 | * Sleep for a period of time. Although the duration is expressed in 48 | * microseconds, the actual delay may be rounded to the precision of the 49 | * system timer. 50 | * 51 | * @param usec Number of microseconds to sleep. 52 | * @return zero on success or (negative) error code. 53 | */ 54 | int av_usleep(unsigned usec); 55 | 56 | #endif /* AVUTIL_TIME_H */ 57 | -------------------------------------------------------------------------------- /FFmpeg使用OpenSLES播放音乐,能停止/libs/include/libavutil/xtea.h: -------------------------------------------------------------------------------- 1 | /* 2 | * A 32-bit implementation of the XTEA algorithm 3 | * Copyright (c) 2012 Samuel Pitoiset 4 | * 5 | * This file is part of FFmpeg. 6 | * 7 | * FFmpeg is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * FFmpeg is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with FFmpeg; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 | */ 21 | 22 | #ifndef AVUTIL_XTEA_H 23 | #define AVUTIL_XTEA_H 24 | 25 | #include 26 | 27 | /** 28 | * @file 29 | * @brief Public header for libavutil XTEA algorithm 30 | * @defgroup lavu_xtea XTEA 31 | * @ingroup lavu_crypto 32 | * @{ 33 | */ 34 | 35 | typedef struct AVXTEA { 36 | uint32_t key[16]; 37 | } AVXTEA; 38 | 39 | /** 40 | * Initialize an AVXTEA context. 41 | * 42 | * @param ctx an AVXTEA context 43 | * @param key a key of 16 bytes used for encryption/decryption 44 | */ 45 | void av_xtea_init(struct AVXTEA *ctx, const uint8_t key[16]); 46 | 47 | /** 48 | * Encrypt or decrypt a buffer using a previously initialized context. 49 | * 50 | * @param ctx an AVXTEA context 51 | * @param dst destination array, can be equal to src 52 | * @param src source array, can be equal to dst 53 | * @param count number of 8 byte blocks 54 | * @param iv initialization vector for CBC mode, if NULL then ECB will be used 55 | * @param decrypt 0 for encryption, 1 for decryption 56 | */ 57 | void av_xtea_crypt(struct AVXTEA *ctx, uint8_t *dst, const uint8_t *src, 58 | int count, uint8_t *iv, int decrypt); 59 | 60 | /** 61 | * @} 62 | */ 63 | 64 | #endif /* AVUTIL_XTEA_H */ 65 | -------------------------------------------------------------------------------- /FFmpeg使用OpenSLES播放音乐,能停止/libs/include/libpostproc/version.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Version macros. 3 | * 4 | * This file is part of FFmpeg. 5 | * 6 | * FFmpeg is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * FFmpeg is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with FFmpeg; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #ifndef POSTPROC_POSTPROCESS_VERSION_H 22 | #define POSTPROC_POSTPROCESS_VERSION_H 23 | 24 | /** 25 | * @file 26 | * Libpostproc version macros 27 | */ 28 | 29 | #include "libavutil/avutil.h" 30 | 31 | #define LIBPOSTPROC_VERSION_MAJOR 53 32 | #define LIBPOSTPROC_VERSION_MINOR 3 33 | #define LIBPOSTPROC_VERSION_MICRO 100 34 | 35 | #define LIBPOSTPROC_VERSION_INT AV_VERSION_INT(LIBPOSTPROC_VERSION_MAJOR, \ 36 | LIBPOSTPROC_VERSION_MINOR, \ 37 | LIBPOSTPROC_VERSION_MICRO) 38 | #define LIBPOSTPROC_VERSION AV_VERSION(LIBPOSTPROC_VERSION_MAJOR, \ 39 | LIBPOSTPROC_VERSION_MINOR, \ 40 | LIBPOSTPROC_VERSION_MICRO) 41 | #define LIBPOSTPROC_BUILD LIBPOSTPROC_VERSION_INT 42 | 43 | #define LIBPOSTPROC_IDENT "postproc" AV_STRINGIFY(LIBPOSTPROC_VERSION) 44 | 45 | #endif /* POSTPROC_POSTPROCESS_VERSION_H */ 46 | -------------------------------------------------------------------------------- /FFmpeg使用OpenSLES播放音乐,能停止/libs/include/libswresample/version.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Version macros. 3 | * 4 | * This file is part of libswresample 5 | * 6 | * libswresample is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * libswresample is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with libswresample; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #ifndef SWR_VERSION_H 22 | #define SWR_VERSION_H 23 | 24 | /** 25 | * @file 26 | * Libswresample version macros 27 | */ 28 | 29 | #include "libavutil/avutil.h" 30 | 31 | #define LIBSWRESAMPLE_VERSION_MAJOR 1 32 | #define LIBSWRESAMPLE_VERSION_MINOR 1 33 | #define LIBSWRESAMPLE_VERSION_MICRO 100 34 | 35 | #define LIBSWRESAMPLE_VERSION_INT AV_VERSION_INT(LIBSWRESAMPLE_VERSION_MAJOR, \ 36 | LIBSWRESAMPLE_VERSION_MINOR, \ 37 | LIBSWRESAMPLE_VERSION_MICRO) 38 | #define LIBSWRESAMPLE_VERSION AV_VERSION(LIBSWRESAMPLE_VERSION_MAJOR, \ 39 | LIBSWRESAMPLE_VERSION_MINOR, \ 40 | LIBSWRESAMPLE_VERSION_MICRO) 41 | #define LIBSWRESAMPLE_BUILD LIBSWRESAMPLE_VERSION_INT 42 | 43 | #define LIBSWRESAMPLE_IDENT "SwR" AV_STRINGIFY(LIBSWRESAMPLE_VERSION) 44 | 45 | #endif /* SWR_VERSION_H */ 46 | -------------------------------------------------------------------------------- /FFmpeg使用OpenSLES播放音乐,能停止/libs/include/libswscale/version.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of FFmpeg. 3 | * 4 | * FFmpeg is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Lesser General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2.1 of the License, or (at your option) any later version. 8 | * 9 | * FFmpeg is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Lesser General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Lesser General Public 15 | * License along with FFmpeg; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #ifndef SWSCALE_VERSION_H 20 | #define SWSCALE_VERSION_H 21 | 22 | /** 23 | * @file 24 | * swscale version macros 25 | */ 26 | 27 | #include "libavutil/version.h" 28 | 29 | #define LIBSWSCALE_VERSION_MAJOR 3 30 | #define LIBSWSCALE_VERSION_MINOR 1 31 | #define LIBSWSCALE_VERSION_MICRO 101 32 | 33 | #define LIBSWSCALE_VERSION_INT AV_VERSION_INT(LIBSWSCALE_VERSION_MAJOR, \ 34 | LIBSWSCALE_VERSION_MINOR, \ 35 | LIBSWSCALE_VERSION_MICRO) 36 | #define LIBSWSCALE_VERSION AV_VERSION(LIBSWSCALE_VERSION_MAJOR, \ 37 | LIBSWSCALE_VERSION_MINOR, \ 38 | LIBSWSCALE_VERSION_MICRO) 39 | #define LIBSWSCALE_BUILD LIBSWSCALE_VERSION_INT 40 | 41 | #define LIBSWSCALE_IDENT "SwS" AV_STRINGIFY(LIBSWSCALE_VERSION) 42 | 43 | /** 44 | * FF_API_* defines may be placed below to indicate public API that will be 45 | * dropped at a future version bump. The defines themselves are not part of 46 | * the public API and may change, break or disappear at any time. 47 | */ 48 | 49 | #ifndef FF_API_SWS_CPU_CAPS 50 | #define FF_API_SWS_CPU_CAPS (LIBSWSCALE_VERSION_MAJOR < 4) 51 | #endif 52 | #ifndef FF_API_ARCH_BFIN 53 | #define FF_API_ARCH_BFIN (LIBSWSCALE_VERSION_MAJOR < 4) 54 | #endif 55 | 56 | #endif /* SWSCALE_VERSION_H */ 57 | -------------------------------------------------------------------------------- /FFmpeg使用OpenSLES播放音乐,能停止/src/androidTest/java/com/test/ffmpegopensles/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.test.ffmpegopensles; 2 | 3 | import android.content.Context; 4 | import android.support.test.InstrumentationRegistry; 5 | import android.support.test.runner.AndroidJUnit4; 6 | 7 | import org.junit.Test; 8 | import org.junit.runner.RunWith; 9 | 10 | import static org.junit.Assert.*; 11 | 12 | /** 13 | * Instrumented test, which will execute on an Android device. 14 | * 15 | * @see Testing documentation 16 | */ 17 | @RunWith(AndroidJUnit4.class) 18 | public class ExampleInstrumentedTest { 19 | @Test 20 | public void useAppContext() throws Exception { 21 | // Context of the app under test. 22 | Context appContext = InstrumentationRegistry.getTargetContext(); 23 | 24 | assertEquals("com.test.ffmpegopensles", appContext.getPackageName()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /FFmpeg使用OpenSLES播放音乐,能停止/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /FFmpeg使用OpenSLES播放音乐,能停止/src/main/cpp/FFmpegMusic.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by david on 2017/9/25. 3 | // 4 | 5 | 6 | 7 | #include 8 | #include 9 | #include 10 | extern "C" { 11 | //编码 12 | #include "libavcodec/avcodec.h" 13 | //封装格式处理 14 | #include "libavformat/avformat.h" 15 | #include "libswresample/swresample.h" 16 | //像素处理 17 | #include "libswscale/swscale.h" 18 | #include 19 | #include 20 | } 21 | #define LOGE(FORMAT,...) __android_log_print(ANDROID_LOG_ERROR,"LC",FORMAT,##__VA_ARGS__); 22 | 23 | int createFFmpeg(int *rate,int *channel); 24 | 25 | int getPcm(void **pcm,size_t *pcm_size); 26 | 27 | void realseFFmpeg(); -------------------------------------------------------------------------------- /FFmpeg使用OpenSLES播放音乐,能停止/src/main/java/com/test/ffmpegopensles/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.test.ffmpegopensles; 2 | 3 | import android.Manifest; 4 | import android.os.Build; 5 | import android.support.v7.app.AppCompatActivity; 6 | import android.os.Bundle; 7 | import android.view.View; 8 | import android.widget.TextView; 9 | 10 | public class MainActivity extends AppCompatActivity { 11 | 12 | 13 | private MusicPlay musicPlay = new MusicPlay(); 14 | @Override 15 | protected void onCreate(Bundle savedInstanceState) { 16 | super.onCreate(savedInstanceState); 17 | setContentView(R.layout.activity_main); 18 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { 19 | requestPermissions(new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE,Manifest.permission.RECORD_AUDIO,Manifest.permission.READ_EXTERNAL_STORAGE}, 5); 20 | } 21 | } 22 | 23 | public void play(View view){ 24 | musicPlay.play(); 25 | } 26 | 27 | public void stop(View view){ 28 | musicPlay.stop(); 29 | } 30 | 31 | 32 | } 33 | -------------------------------------------------------------------------------- /FFmpeg使用OpenSLES播放音乐,能停止/src/main/java/com/test/ffmpegopensles/MusicPlay.java: -------------------------------------------------------------------------------- 1 | package com.test.ffmpegopensles; 2 | 3 | /** 4 | * Created by LC on 2017/11/16. 5 | */ 6 | 7 | public class MusicPlay { 8 | static{ 9 | System.loadLibrary("avcodec-56"); 10 | System.loadLibrary("avdevice-56"); 11 | System.loadLibrary("avfilter-5"); 12 | System.loadLibrary("avformat-56"); 13 | System.loadLibrary("avutil-54"); 14 | System.loadLibrary("postproc-53"); 15 | System.loadLibrary("swresample-1"); 16 | System.loadLibrary("swscale-3"); 17 | System.loadLibrary("native-lib"); 18 | } 19 | public native void play(); 20 | 21 | public native void stop(); 22 | } 23 | -------------------------------------------------------------------------------- /FFmpeg使用OpenSLES播放音乐,能停止/src/main/res/drawable-v24/ic_launcher_foreground.xml: -------------------------------------------------------------------------------- 1 | 7 | 12 | 13 | 19 | 22 | 25 | 26 | 27 | 28 | 34 | 35 | -------------------------------------------------------------------------------- /FFmpeg使用OpenSLES播放音乐,能停止/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 |