Android Vitamio 5.0.0 crash

丶灬走出姿态 提交于 2019-12-12 04:17:58

问题


I fail to make it work vitamio. everything seems right, but application stops, and you receive this error. What did I do wrong? exactly the same code with vitamio 4.2 works perfectly. I guess I did something wrong

>     import android.support.v7.app.AppCompatActivity; 
> import android.os.Bundle; 
> import io.vov.vitamio.MediaPlayer;
> import io.vov.vitamio.Vitamio;
> import io.vov.vitamio.widget.MediaController;
> import io.vov.vitamio.widget.VideoView;
> 
> 
> public class Rtmp_player extends AppCompatActivity {
> 
> 
>     private static final String TAG = "MainActivity";
>     private String path;
>     //private HashMap<String, String> options;
>     private VideoView mVideoView;
> 
>     @Override
>     protected void onCreate(Bundle savedInstanceState) {
>         super.onCreate(savedInstanceState);
>         Vitamio.isInitialized(this);
>         setContentView(R.layout.activity_rtmp_player);
>         mVideoView = (VideoView) findViewById(R.id.vitamio_videoView);
>         path = "http://80.86.107.169:8100/stream.flv";
>         mVideoView.setVideoPath(path);
>         //mVideoView.setVideoURI(Uri.parse(path), options);
>         mVideoView.setMediaController(new MediaController(this));
>         mVideoView.requestFocus();
>         mVideoView.start();
> 
>         mVideoView.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {
>             @Override
>             public void onPrepared(MediaPlayer mediaPlayer) {
>                 mediaPlayer.setPlaybackSpeed(1.0f);
>             }
>         });
>     } }

log error

   01-22 16:37:25.101 27911-27992/ro.vrt.videoplayerstreaming I/OpenGLRenderer: Initialized EGL, version 1.4
01-22 16:37:25.179 27911-27911/ro.vrt.videoplayerstreaming I/Vitamio[5.0.0][Player]: Copyright (c) YIXIA (http://yixia.com).
                                                                                     THIS SOFTWARE (Vitamio) IS WORK OF YIXIA (http://yixia.com)
01-22 16:37:25.179 27911-27911/ro.vrt.videoplayerstreaming I/Vitamio[5.0.0][Player]: LOAD FFMPEG START: /data/user/0/ro.vrt.videoplayerstreaming/lib/libffmpeg.so
01-22 16:37:25.188 27911-27911/ro.vrt.videoplayerstreaming E/linker: /data/app/ro.vrt.videoplayerstreaming-2/lib/arm/libffmpeg.so: has text relocations
01-22 16:37:25.188 27911-27911/ro.vrt.videoplayerstreaming E/Vitamio[5.0.0][Player]: LOAD FFMPEG ERROR: dlopen failed: /data/app/ro.vrt.videoplayerstreaming-2/lib/arm/libffmpeg.so: has text relocations
01-22 16:37:25.188 27911-27911/ro.vrt.videoplayerstreaming I/Vitamio[5.0.0][Player]: LOAD VVO START: /data/user/0/ro.vrt.videoplayerstreaming/lib/libvvo.9.so
01-22 16:37:25.203 27911-27911/ro.vrt.videoplayerstreaming E/Vitamio[5.0.0][Player]: FIND_NAME_SYM vvo, render_yuv
01-22 16:37:25.203 27911-27911/ro.vrt.videoplayerstreaming I/Vitamio[5.0.0][Player]: LOAD VVO END: /data/user/0/ro.vrt.videoplayerstreaming/lib/libvvo.9.so
01-22 16:37:25.203 27911-27911/ro.vrt.videoplayerstreaming I/Vitamio[5.0.0][Player]: LOAD VAO START: /data/user/0/ro.vrt.videoplayerstreaming/lib/libvao.0.so
01-22 16:37:25.214 27911-27911/ro.vrt.videoplayerstreaming I/Vitamio[5.0.0][Player]: LOAD VAO END: /data/user/0/ro.vrt.videoplayerstreaming/lib/libvao.0.so
01-22 16:37:25.216 27911-27911/ro.vrt.videoplayerstreaming I/Vitamio[5.0.0][Player]: VPLAYER INIT BEGIN
01-22 16:37:25.216 27911-27911/ro.vrt.videoplayerstreaming I/Vitamio[5.0.0][Player]: Vitamio Version 5.0.0 
01-22 16:37:25.216 27911-27911/ro.vrt.videoplayerstreaming I/Vitamio[5.0.0][Player]: Application package name: ro.vrt.videoplayerstreaming
01-22 16:37:25.216 27911-27911/ro.vrt.videoplayerstreaming A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 27911 (playerstreaming)

回答1:


 /data/app/ro.vrt.videoplayerstreaming-2/lib/arm/libffmpeg.so: has text relocations

You did nothing wrong but you target android M and it doesn't support text relocations. It is up to vitamio to correct this. Plese refer to https://code.google.com/p/android-developer-preview/issues/detail?id=3028 and https://github.com/yixia/VitamioBundle/issues/312. There is a workaround to set targetSDKVersion<23 but not recommended if you target some marshmallow features.



来源:https://stackoverflow.com/questions/34951420/android-vitamio-5-0-0-crash

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!