0

  如果他们使用版本 1.0.6 一切正常,但我们 targetSdkVersion 23 接收错误。在版本 sdk v 3.0.0 源代码不起作用。有一个简单的示例,VLC sdk v3?

来自 1.0.6 的代码是有效的,来自 3.0.0 的代码是无效的:

mSurfaceView = (SurfaceView) findViewById(R.id.player_surface);
    mSurfaceHolder = mSurfaceView.getHolder();

    mSurfaceFrame = (FrameLayout) findViewById(R.id.player_surface_frame);
    mMediaUrl = getIntent().getExtras().getString("videoUrl");

    try {
        mLibVLC = new LibVLC();
        mLibVLC.setAout(mLibVLC.AOUT_AUDIOTRACK);
        mLibVLC.setVout(mLibVLC.VOUT_ANDROID_SURFACE);
        mLibVLC.setHardwareAcceleration(LibVLC.HW_ACCELERATION_FULL);


        mLibVLC.setSubtitlesEncoding("");
        mLibVLC.setTimeStretching(false);
        mLibVLC.setFrameSkip(true);
        mLibVLC.setChroma("RV16");
        mLibVLC.setVerboseMode(true);
        mLibVLC.setAout(-1);
        mLibVLC.setDeblocking(0);
        mLibVLC.setNetworkCaching(0);



        mLibVLC.init(getApplicationContext());
    } catch (LibVlcException e){
        Log.e(TAG, e.toString());
    }

    mSurface = mSurfaceHolder.getSurface();

    mLibVLC.attachSurface(mSurface, VideoVLCActivity.this);
    mLibVLC.playMRL(mMediaUrl);
4

1 回答 1

2

有一个基于 SDK 3.0.0 的示例,在此处发布

于 2016-02-18T10:22:44.653 回答