无法通过Vitamio VideoView播放普通Android VideoView将播放的视频文件

时间:2014-12-16 14:18:03

标签: android android-videoview vitamio amazon-fire-tv

我正在创建一个应用程序,可以在Amazon FireTV盒子上播放各种类型的视频。如果我使用默认的Android VideoView播放视频。如果我使用Vitamio的VideoView视频无法播放,我会在“decodeIndirectRef / VM中止”中获得“无效的间接引用0x41fabca0”,这会导致调用dvmAbort。

我需要使用Vitamio VideoView,因为它支持播放多播视频,而默认的Android VideoView则不支持。

我使用Eclipse作为我的IDE。我已经下载了Vitamio包,将其构建为库并将其导入我的项目中。 Vitamio构建的差异在于两个文件,“FullscreenActivity.java”和“activity_fullscreen.xml”。

activity_fullscreen.xml-指定Vitamio VideoView

<io.vov.vitamio.widget.VideoView
    android:id="@+id/myVideo"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:layout_centerInParent="true" />

FullscreenActivity.java-导入Vitamio VideoView而不是默认的Android VideoView

package com.example.playvideo;

import com.example.playvideo.util.SystemUiHider;
import android.app.Activity;
import android.os.Bundle;
import android.net.*;
import android.util.Log;
//import android.widget.VideoView;
import io.vov.vitamio.widget.VideoView;

public class FullscreenActivity extends Activity {BTW, 

    VideoView vidView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {

        super.onCreate(savedInstanceState);

        //check for Vitamio library
        if (!io.vov.vitamio.LibsChecker.checkVitamioLibs(this))
        {
            Log.i("Tag2", "NO Vitamio");
        }
        else
        {
            Log.i("Tag2", "Found Vitamio");
        }

        setContentView(R.layout.activity_fullscreen);
        vidView = (VideoView)findViewById(R.id.myVideo);

        String vidAddress = "http://www.playon.tv/online/iphone5/main.m3u8";

        Uri vidUri = Uri.parse(vidAddress);        
        vidView.setVideoURI(vidUri);
        vidView.start();
        Log.i("Tag2","onCreate complete");
    }
}

下面显示了一个记录到故障点的片段。有没有办法确定间接引用0x41fabca0代表什么对象?我看到R6中的地址0x41fabca0和堆栈(/ dev / ashmem / dalvik-heap(已删除))的引用。好像我在Vitamio代码实现中遗漏了一些内容,但我不确定是什么。

由于

12-12 13:35:43.337 D/dalvikvm(25803): Debugger has detached; object registry had 1 entries
12-12 13:35:43.357 D/dalvikvm(25852): Late-enabling CheckJNI
12-12 13:35:43.357 I/ActivityManager(  692): Start proc com.example.playvideo for activity com.example.playvideo/.FullscreenActivity: pid=25852 uid=10004 gids={
50004, 3003, 1028}
12-12 13:35:43.377 W/ContextImpl( 3401): Calling a method in the system process without a qualified user: android.app.ContextImpl.sendBroadcast:1339 android.app
.Instrumentation.sendLifecycleEventBroadcast:1786 android.app.Instrumentation.callActivityOnStop:1303 android.app.Activity.performStop:5412 android.app.Activity
Thread.performStopActivityInner:3197
12-12 13:35:43.387 D/dalvikvm(25852): Debugger has detached; object registry had 1 entries
12-12 13:35:43.387 W/ContextImpl( 3401): Calling a method in the system process without a qualified user: android.app.ContextImpl.sendBroadcast:1339 android.app
.Instrumentation.sendLifecycleEventBroadcast:1786 android.app.Instrumentation.callActivityOnStop:1303 android.app.Activity.performStop:5412 android.app.Activity
Thread.performStopActivityInner:3197
12-12 13:35:43.407 E/Trace   (25852): error opening trace file: No such file or directory (2)
12-12 13:35:43.417 W/ContextImpl(  692): Calling a method in the system process without a qualified user: android.app.ContextImpl.sendBroadcast:1353 com.amazon.
internal.policy.impl.AmazonPhoneWindowManager$SendTopWindowChanged.run:3297 android.os.Handler.handleCallback:725 android.os.Handler.dispatchMessage:92 android.
os.Looper.loop:137
12-12 13:35:43.427 D/ProfileManager(25852): Create ProfileManager instance
12-12 13:35:43.427 I/Activity(25852): No ActvityExender defined. Proceed with default activity behavior.
12-12 13:35:43.437 D/Vitamio[Player](25852): CPU implementer:0x51
12-12 13:35:43.437 D/Vitamio[Player](25852): Serial:0000000000000000
12-12 13:35:43.437 D/Vitamio[Player](25852): CPU architecture:7
12-12 13:35:43.437 D/Vitamio[Player](25852): Hardware:LAB126 BUELLER
12-12 13:35:43.437 D/Vitamio[Player](25852): CPU revision:0
12-12 13:35:43.437 D/Vitamio[Player](25852): CPU variant:0x1
12-12 13:35:43.437 D/Vitamio[Player](25852): CPU part:0x06f
12-12 13:35:43.437 D/Vitamio[Player](25852): Revision:0003
12-12 13:35:43.437 D/Vitamio[Player](25852): BogoMIPS:13.53
12-12 13:35:43.437 D/Vitamio[Player](25852): processor:3
12-12 13:35:43.437 D/Vitamio[Player](25852): Features:swp half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt
12-12 13:35:43.437 D/Vitamio[Player](25852): Processor:ARMv7 Processor rev 0 (v7l)
12-12 13:35:43.437 W/PackageManager(  692): Launching com.amazon.dcp (32033) with AMZ_APP_GID
12-12 13:35:43.437 D/Vitamio[Player](25852): CPU architecture: 7
12-12 13:35:43.437 D/Vitamio[Player](25852): GET CPU FATURE: V5TE V6 VFP V7A VFPV3 NEON
12-12 13:35:43.437 D/dalvikvm(25852): Trying to load lib /data/app-lib/com.example.playvideo-2/libvinit.so 0x41f4f8e0
12-12 13:35:43.437 D/dalvikvm(25852): Added shared lib /data/app-lib/com.example.playvideo-2/libvinit.so 0x41f4f8e0
12-12 13:35:43.437 I/Vitamio[Player](25852): isNativeLibsInited, APP VERSION: 1, Vitamio Library version: 1
12-12 13:35:43.437 I/Tag2    (25852): Found Vitamio
12-12 13:35:43.437 I/ActivityManager(  692): Start proc com.amazon.dcp for broadcast com.amazon.dcp/.framework.ServicePersistenceHelper: pid=25870 uid=32033 gid
s={72033, 2001, 3003, 1015, 3002, 1028, 9001}
12-12 13:35:43.477 I/Tag2    (25852): onCreate complete
12-12 13:35:43.487 W/ContextImpl(  692): Calling a method in the system process without a qualified user: android.app.ContextImpl.sendBroadcast:1353 com.android
.server.am.ActivityManagerService.activityResumed:4547 android.app.ActivityManagerNative.onTransact:420 com.android.server.am.ActivityManagerService.onTransact:
1716 android.os.Binder.execTransact:351
12-12 13:35:43.517 D/libEGL  (25852): loaded /system/lib/egl/libEGL_adreno200.so
12-12 13:35:43.517 D/libEGL  (25852): loaded /system/lib/egl/libGLESv1_CM_adreno200.so
12-12 13:35:43.517 D/libEGL  (25852): loaded /system/lib/egl/libGLESv2_adreno200.so
12-12 13:35:43.517 I/Adreno200-EGL(25852): <qeglDrvAPI_eglInitialize:265>: EGL 1.4 QUALCOMM build: PDAVID_AU_LINUX_ANDROID_JB_2.5.4.04.02.02.073.175+PATCH[ES]_m
sm8960_JB_2.5.4_CL3406509_release_ENGG (CL3406509)
12-12 13:35:43.517 I/Adreno200-EGL(25852): Build Date: 01/06/14 Mon
12-12 13:35:43.517 I/Adreno200-EGL(25852): Local Branch: master
12-12 13:35:43.517 I/Adreno200-EGL(25852): Remote Branch: quic/jb_2.5.4
12-12 13:35:43.517 I/Adreno200-EGL(25852): Local Patches: 8eb510a221aaeae58c0ecdd202385ce404871588 PROFILER: Added proper handling of partially filled mipmaps
12-12 13:35:43.517 I/Adreno200-EGL(25852):                  2e6d0a734aa661addd942fe6f373d55a407591a6 PROFILER: CL3406509:  Compressed texture support.
12-12 13:35:43.517 I/Adreno200-EGL(25852):                  fdfb486203fdd417c56d12d68e6997ebd0ae8726 PROFILER: Check fo
12-12 13:35:43.557 D/OpenGLRenderer(25852): Enabling debug mode 0
12-12 13:35:43.567 I/Vitamio[Player](25852): isNativeLibsInited, APP VERSION: 1, Vitamio Library version: 1
12-12 13:35:43.567 I/Vitamio[Player](25852): LIB ROOT: /data/data/com.example.playvideo/libs/
12-12 13:35:43.567 D/dalvikvm(25852): Trying to load lib /data/data/com.example.playvideo/libs/libstlport_shared.so 0x41f4f8e0
12-12 13:35:43.567 D/dalvikvm(25852): Added shared lib /data/data/com.example.playvideo/libs/libstlport_shared.so 0x41f4f8e0
12-12 13:35:43.567 D/dalvikvm(25852): No JNI_OnLoad found in /data/data/com.example.playvideo/libs/libstlport_shared.so 0x41f4f8e0, skipping init
12-12 13:35:43.567 D/dalvikvm(25852): Trying to load lib /data/data/com.example.playvideo/libs/libvplayer.so 0x41f4f8e0
12-12 13:35:43.567 D/dalvikvm(25852): Added shared lib /data/data/com.example.playvideo/libs/libvplayer.so 0x41f4f8e0
12-12 13:35:43.577 I/Vitamio[4.2.1][Player](25852): Copyright (c) YIXIA (http://yixia.com).
12-12 13:35:43.577 I/Vitamio[4.2.1][Player](25852): THIS SOFTWARE (Vitamio) IS WORK OF YIXIA (http://yixia.com)
12-12 13:35:43.577 I/Vitamio[4.2.1][Player](25852): LOAD FFMPEG START: /data/data/com.example.playvideo/libs/libffmpeg.so
12-12 13:35:43.577 I/Vitamio[4.2.1][Player](25852): LOAD FFMPEG END: /data/data/com.example.playvideo/libs/libffmpeg.so
12-12 13:35:43.577 I/Vitamio[4.2.1][Player](25852): LOAD VVO START: /data/data/com.example.playvideo/libs/libvvo.9.so
12-12 13:35:43.577 E/Vitamio[4.2.1][Player](25852): FIND_NAME_SYM vvo, render_yuv
12-12 13:35:43.577 I/Vitamio[4.2.1][Player](25852): LOAD VVO END: /data/data/com.example.playvideo/libs/libvvo.9.so
12-12 13:35:43.577 I/Vitamio[4.2.1][Player](25852): LOAD VAO START: /data/data/com.example.playvideo/libs/libvao.0.so
12-12 13:35:43.577 I/Vitamio[4.2.1][Player](25852): LOAD VAO END: /data/data/com.example.playvideo/libs/libvao.0.so
12-12 13:35:43.577 I/Vitamio[4.2.1][Player](25852): VPLAYER INIT BEGIN
12-12 13:35:43.577 I/Vitamio[4.2.1][Player](25852): Application package name: com.example.playvideo
12-12 13:35:43.597 I/Vitamio[4.2.1][Player](25852): VPLAYER INIT END
12-12 13:35:43.597 I/Vitamio[4.2.1][Player](25852): Copyright (c) YIXIA (http://yixia.com).
12-12 13:35:43.597 I/Vitamio[4.2.1][Player](25852): THIS SOFTWARE (Vitamio) IS WORK OF YIXIA (http://yixia.com)
12-12 13:35:43.597 I/Vitamio[4.2.1][Player](25852): Application package name: com.example.playvideo
12-12 13:35:43.597 I/Vitamio[4.2.1][Player](25852): Copyright (c) YIXIA (http://yixia.com).
12-12 13:35:43.597 I/Vitamio[4.2.1][Player](25852): THIS SOFTWARE (Vitamio) IS WORK OF YIXIA (http://yixia.com)
12-12 13:35:43.597 I/Vitamio[4.2.1][Player](25852): Application package name: com.example.playvideo
12-12 13:35:43.597 I/Vitamio[4.2.1][Player](25852): PREPARE SIG: 0
12-12 13:35:43.597 I/Vitamio[4.2.1][Player](25852): THREAD PREPARE START
12-12 13:35:43.597 I/Vitamio[4.2.1][Player](25852): THREAD PREPARE ATTACHED
12-12 13:35:43.597 I/Vitamio[4.2.1][Player](25852): Copyright (c) YIXIA (http://yixia.com).
12-12 13:35:43.597 I/Vitamio[4.2.1][Player](25852): THIS SOFTWARE (Vitamio) IS WORK OF YIXIA (http://yixia.com)
12-12 13:35:43.597 I/Vitamio[4.2.1][Player](25852): OPEN FILE http://www.playon.tv/online/iphone5/main.m3u8
12-12 13:35:43.677 I/ActivityManager(  692): Displayed com.example.playvideo/.FullscreenActivity: +339ms
12-12 13:35:43.687 W/ContextImpl(  692): Calling a method in the system process without a qualified user: android.app.ContextImpl.sendBroadcast:1353 com.amazon.
internal.policy.impl.AmazonPhoneWindowManager$SendTopWindowChanged.run:3297 android.os.Handler.handleCallback:725 android.os.Handler.dispatchMessage:92 android.
os.Looper.loop:137
12-12 13:35:43.948 W/ContextImpl( 3401): Calling a method in the system process without a qualified user: android.app.ContextImpl.sendBroadcast:1339 android.app
.Instrumentation.sendLifecycleEventBroadcast:1786 android.app.Instrumentation.callActivityOnStop:1303 android.app.Activity.performStop:5412 android.app.Activity
Thread.performStopActivityInner:3197
12-12 13:35:44.708 I/ThermalDaemon(  336): Sensor[tmp105_2_pwrs] Temperature : 35.0
12-12 13:35:44.708 I/TemperatureSensorObserver(  692): read new temperature 35000
12-12 13:35:45.239 I/Vitamio[4.2.1][Player](25852): META AUDIO: 1. und. 96000!#!3. und. 256000!#!5. und. 800000!#!6. und. 64000, META SUBTITLE:
12-12 13:35:45.239 I/Vitamio[4.2.1][Player](25852): WOW: BRILLIANT C COUNT 4
12-12 13:35:45.239 I/Vitamio[4.2.1][Player](25852): OPEN STREAM AUDIO BEGIN
12-12 13:35:45.239 I/Vitamio[4.2.1][Player](25852): Copyright (c) YIXIA (http://yixia.com).
12-12 13:35:45.239 I/Vitamio[4.2.1][Player](25852): THIS SOFTWARE (Vitamio) IS WORK OF YIXIA (http://yixia.com)
12-12 13:35:45.239 I/Vitamio[4.2.1][Player](25852): Application package name: com.example.playvideo
12-12 13:35:45.239 I/Vitamio[4.2.1][Player](25852): 2, 48000, 0
12-12 13:35:45.239 V/AudioFlinger(  329): registerClient() client 0x41eab058, binder 1105932496
12-12 13:35:45.239 V/AudioFlinger(  329): sendIoConfigEvent() num events 1 event 0, param 0
12-12 13:35:45.239 V/AudioFlinger(  329): thread 0x4009e008 type 0 TID 717 waking up
12-12 13:35:45.239 V/AudioFlinger(  329): acquireWakeLock_l() AudioOut_2 status 0
12-12 13:35:45.239 V/AudioFlinger(  329): processConfigEvents() remaining events 1
12-12 13:35:45.239 V/AudioFlinger(  329): PlaybackThread::audioConfigChanged_l, thread 0x4009e008, event 0, param 0
12-12 13:35:45.239 V/AudioFlinger(  329): AudioFlinger::audioConfigChanged_l: event 0
12-12 13:35:45.239 V/AudioFlinger(  329): createTrack() sessionId: 0
12-12 13:35:45.239 V/AudioFlinger(  329): createTrack() lSessionId: 202
12-12 13:35:45.249 V/AudioFlinger(  329): Track constructor name 4096, calling pid 25852
12-12 13:35:45.249 V/AudioFlinger(  329): acquiring 202 from 25852
12-12 13:35:45.249 V/AudioFlinger(  329):  added new entry for 202
12-12 13:35:45.249 V/AudioFlinger(  329): start(4096), calling pid 25852 session 202
12-12 13:35:45.249 V/AudioFlinger(  329): ? => ACTIVE (4096) on thread 0x400aaf38
12-12 13:35:45.249 I/AudioPolicyManagerALSA(  329): getDeviceForStrategy() speaker device not found for STRATEGY_SONIFICATION
12-12 13:35:45.249 I/AudioPolicyManagerALSA(  329): getDeviceForStrategy() speaker device not found for STRATEGY_SONIFICATION
12-12 13:35:45.249 V/AudioFlinger(  329): mWaitWorkCV.broadcast
12-12 13:35:45.249 I/Vitamio[4.2.1][Player](25852): OPEN STREAM AUDIO END
12-12 13:35:45.249 I/Vitamio[4.2.1][Player](25852): Copyright (c) YIXIA (http://yixia.com).
12-12 13:35:45.249 I/Vitamio[4.2.1][Player](25852): THIS SOFTWARE (Vitamio) IS WORK OF YIXIA (http://yixia.com)
12-12 13:35:45.249 I/Vitamio[4.2.1][Player](25852): Application package name: com.example.playvideo
12-12 13:35:45.249 I/Vitamio[4.2.1][Player](25852): WOW: BRILLIANT C COUNT 4
12-12 13:35:45.249 I/Vitamio[4.2.1][Player](25852): OPEN STREAM VIDEO BEGIN
12-12 13:35:45.249 D/Vitamio[Player](25852): onVideoSizeChanged: (480x270)
12-12 13:35:45.249 V/AudioFlinger(  329): anticipated start
12-12 13:35:45.249 D/Vitamio[Player](25852): VIDEO: 480x270x1.777778, Surface: 480x270, LP: 1920x1080, Window: 1920x1080x1.777778
12-12 13:35:45.249 I/Vitamio[4.2.1][Player](25852): OPEN STREAM VIDEO END
12-12 13:35:45.249 I/Vitamio[4.2.1][Player](25852): THREAD PREPARE DETTACHED, ret = 0
12-12 13:35:45.249 I/Vitamio[4.2.1][Player](25852): THREAD PREPARE END
12-12 13:35:45.259 I/Vitamio[4.2.1][Player](25852): CC: ARMYUV420 0
12-12 13:35:45.269 D/Vitamio[Player](25852): onPrepared
12-12 13:35:45.269 D/Vitamio[Player](25852): VIDEO: 480x270x1.777778, Surface: 480x270, LP: 1920x1080, Window: 1920x1080x1.777778
12-12 13:35:45.279 I/Vitamio[Player](25852): Info (701, 0)
12-12 13:35:45.289 D/Vitamio[Player](25852): onInfo: (701, 0)
12-12 13:35:45.289 V/AudioFlinger(  329): pause(4096), calling pid 25852
12-12 13:35:45.289 V/AudioFlinger(  329): ACTIVE/RESUMING => PAUSING (4096) on thread 0x4009e008
12-12 13:35:45.289 I/AudioPolicyManagerALSA(  329): getDeviceForStrategy() speaker device not found for STRATEGY_SONIFICATION
12-12 13:35:45.289 I/AudioPolicyManagerALSA(  329): getDeviceForStrategy() speaker device not found for STRATEGY_SONIFICATION
12-12 13:35:45.299 D/Vitamio[Player](25852): onVideoSizeChanged: (480x270)
12-12 13:35:45.299 D/Vitamio[Player](25852): VIDEO: 480x270x1.777778, Surface: 480x270, LP: 1920x1080, Window: 1920x1080x1.777778
12-12 13:35:45.309 D/Vitamio[Player](25852): onVideoSizeChanged: (480x270)
12-12 13:35:45.309 W/dalvikvm(25852): Invalid indirect reference 0x41fabca0 in decodeIndirectRef
12-12 13:35:45.309 E/dalvikvm(25852): VM aborting
12-12 13:35:45.309 D/Vitamio[Player](25852): VIDEO: 480x270x1.777778, Surface: 480x270, LP: 1920x1080, Window: 1920x1080x1.777778
12-12 13:35:45.319 F/libc    (25852): Fatal signal 11 (SIGSEGV) at 0xdeadd00d (code=1), thread 25923 (ample.playvideo)
12-12 13:35:45.419 I/DEBUG   (  324): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
12-12 13:35:45.419 I/DEBUG   (  324): Build fingerprint: 'qcom/bueller/bueller:4.2.2/JDQ39/51.1.4.1_user_514013920:user/release-keys'
12-12 13:35:45.419 I/DEBUG   (  324): Revision: '3'
12-12 13:35:45.419 I/DEBUG   (  324): pid: 25852, tid: 25923, name: ample.playvideo  >>> com.example.playvideo <<<
12-12 13:35:45.419 I/DEBUG   (  324): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr deadd00d
12-12 13:35:45.499 I/DEBUG   (  324):     r0 00000000  r1 00000000  r2 deadd00d  r3 00000000
12-12 13:35:45.499 I/DEBUG   (  324):     r4 40a945a0  r5 0000020c  r6 41fabca0  r7 5cf1beb8
12-12 13:35:45.499 I/DEBUG   (  324):     r8 5ca04020  r9 00000000  sl 5ca8bb30  fp 00000015
12-12 13:35:45.499 I/DEBUG   (  324):     ip 00004000  sp 62daec28  lr 4030c3f9  pc 40a22248  cpsr 60000030
12-12 13:35:45.499 I/DEBUG   (  324):     d0  0000000000000000  d1  0000000000000000
12-12 13:35:45.499 I/DEBUG   (  324):     d2  000003e800000000  d3  00000000000000dc
12-12 13:35:45.499 I/DEBUG   (  324):     d4  0000000000000000  d5  0000000000000000
12-12 13:35:45.499 I/DEBUG   (  324):     d6  43f000000000010e  d7  000000013fe38e39
12-12 13:35:45.499 I/DEBUG   (  324):     d8  0000000000000000  d9  0000000000000000
12-12 13:35:45.499 I/DEBUG   (  324):     d10 0000000000000000  d11 0000000000000000
12-12 13:35:45.499 I/DEBUG   (  324):     d12 0000000000000000  d13 0000000000000000
12-12 13:35:45.499 I/DEBUG   (  324):     d14 0000000000000000  d15 0000000000000000
12-12 13:35:45.499 I/DEBUG   (  324):     d16 6f636564206e6920  d17 657269646e496564
12-12 13:35:45.499 I/DEBUG   (  324):     d18 571c8198571c8160  d19 571c88d8571c81d0
12-12 13:35:45.499 I/DEBUG   (  324):     d20 571c8278571c8240  d21 571c8638571c82b0
12-12 13:35:45.499 I/DEBUG   (  324):     d22 571c86a8571c8670  d23 571c8718571c86e0
12-12 13:35:45.499 I/DEBUG   (  324):     d24 0303030303030303  d25 fdfdfdfdfdfdfdfd
12-12 13:35:45.499 I/DEBUG   (  324):     d26 ffffffffffffffff  d27 1010101010101111
12-12 13:35:45.499 I/DEBUG   (  324):     d28 0080008000800080  d29 0080008000800080
12-12 13:35:45.499 I/DEBUG   (  324):     d30 0000000000000000  d31 0000000000000000
12-12 13:35:45.499 I/DEBUG   (  324):     scr 6800001e
12-12 13:35:45.499 I/DEBUG   (  324):
12-12 13:35:45.499 I/DEBUG   (  324): backtrace:
12-12 13:35:45.499 I/DEBUG   (  324):     #00  pc 00048248  /system/lib/libdvm.so (dvmAbort+75)
12-12 13:35:45.499 I/DEBUG   (  324):     #01  pc 0004c8bf  /system/lib/libdvm.so (dvmDecodeIndirectRef(Thread*, _jobject*)+210)
12-12 13:35:45.499 I/DEBUG   (  324):     #02  pc 0004f205  /system/lib/libdvm.so
12-12 13:35:45.499 I/DEBUG   (  324):     #03  pc 00019158  /data/data/com.example.playvideo/libs/libvplayer.so
12-12 13:35:45.499 I/DEBUG   (  324):     #04  pc 000195b8  /data/data/com.example.playvideo/libs/libvplayer.so
12-12 13:35:45.499 I/DEBUG   (  324):     #05  pc 0000e438  /system/lib/libc.so (__thread_entry+72)
12-12 13:35:45.499 I/DEBUG   (  324):     #06  pc 0000db24  /system/lib/libc.so (pthread_create+160)
12-12 13:35:45.499 I/DEBUG   (  324):
12-12 13:35:45.499 I/DEBUG   (  324): stack:
12-12 13:35:45.499 I/DEBUG   (  324):          62daebe8  00000001
12-12 13:35:45.499 I/DEBUG   (  324):          62daebec  403371b4  /system/lib/libc.so
12-12 13:35:45.499 I/DEBUG   (  324):          62daebf0  403371b4  /system/lib/libc.so
12-12 13:35:45.499 I/DEBUG   (  324):          62daebf4  403371b4  /system/lib/libc.so
12-12 13:35:45.499 I/DEBUG   (  324):          62daebf8  403371b4  /system/lib/libc.so
12-12 13:35:45.499 I/DEBUG   (  324):          62daebfc  4030c3f9  /system/lib/libc.so (__sflush_locked+36)
12-12 13:35:45.499 I/DEBUG   (  324):          62daec00  40337254  /system/lib/libc.so
12-12 13:35:45.499 I/DEBUG   (  324):          62daec04  403371b4  /system/lib/libc.so
12-12 13:35:45.499 I/DEBUG   (  324):          62daec08  00000000
12-12 13:35:45.499 I/DEBUG   (  324):          62daec0c  4030d3c9  /system/lib/libc.so (_fwalk+32)
12-12 13:35:45.499 I/DEBUG   (  324):          62daec10  40a945a0  /system/lib/libdvm.so
12-12 13:35:45.499 I/DEBUG   (  324):          62daec14  0000020c
12-12 13:35:45.499 I/DEBUG   (  324):          62daec18  41fabca0  /dev/ashmem/dalvik-heap (deleted)
12-12 13:35:45.499 I/DEBUG   (  324):          62daec1c  5cf1beb8  /data/data/com.example.playvideo/libs/libvplayer.so
12-12 13:35:45.499 I/DEBUG   (  324):          62daec20  df0027ad
12-12 13:35:45.499 I/DEBUG   (  324):          62daec24  00000000

2 个答案:

答案 0 :(得分:1)

罪魁祸首就是这一行vidView.start();,因为当时你的视频没有被缓冲,这就是你应该做的:

按如下方式初始化您的Vitamio播放器:

Uri vidUri = Uri.parse(vidAddress);
mVideoView.setVideoURI(vidUri);
        mVideoView.setMediaController(new MediaController(this));
        mVideoView.requestFocus();
        mVideoView.setOnInfoListener(this);
        mVideoView.setOnBufferingUpdateListener(this);
        mVideoView.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {
            @Override
            public void onPrepared(MediaPlayer mediaPlayer) {
                mediaPlayer.seekTo(mProgress);
                mediaPlayer.setPlaybackSpeed(1.0f);
            }
        });

之后覆盖onInfo(),如下所示:

 @Override
    public boolean onInfo(MediaPlayer mp, int what, int extra) {
        switch (what) {
            case io.vov.vitamio.MediaPlayer.MEDIA_INFO_BUFFERING_START:
                if (mVideoView.isPlaying()) {
                    mVideoView.pause();
                }
                break;
            case io.vov.vitamio.MediaPlayer.MEDIA_INFO_BUFFERING_END:
                mVideoView.start();
                break;
            case io.vov.vitamio.MediaPlayer.MEDIA_INFO_DOWNLOAD_RATE_CHANGED:
//                            mDownloadRateView.setText("" + extra + "kb/s" + "  ");
                break;
        }
        return true;
    }

如果您的问题仍然存在,请发表评论。

享受!

答案 1 :(得分:1)

似乎清单文件需要访问网络的权限。将以下权限添加到我的清单文件中可以解决问题。

<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />