Commit 1f577a08 authored by Geoffrey Métais's avatar Geoffrey Métais

Use LibVLC from bintray and AndroidX

parent f0bef070
......@@ -7,3 +7,4 @@
/captures
/vlc-android
/libvlc/*.aar
java_sample/.idea/
......@@ -2,12 +2,11 @@
buildscript {
repositories {
jcenter()
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.0'
classpath 'com.android.tools.build:gradle:3.4.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
......@@ -15,8 +14,11 @@ buildscript {
allprojects {
repositories {
jcenter()
google()
maven {
url "https://dl.bintray.com/videolan/Android"
}
jcenter()
}
}
......
......@@ -29,7 +29,7 @@ android {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:support-v4:28.0.0'
implementation project(':libvlc')
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'org.videolan.android:libvlc-all:3.1.12'
}
android.enableJetifier=true
android.useAndroidX=true
/*****************************************************************************
* JavaActivity.java
*****************************************************************************
* Copyright (C) 2016 VideoLAN
* Copyright (C) 2016-2019 VideoLAN
* All rights reserved.
*
* This software may be modified and distributed under the terms
......@@ -10,8 +10,10 @@
package org.videolan.javasample;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import androidx.appcompat.app.AppCompatActivity;
import org.videolan.libvlc.LibVLC;
import org.videolan.libvlc.Media;
import org.videolan.libvlc.MediaPlayer;
......
......@@ -27,7 +27,7 @@ android {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation project(':libvlc')
}
/*****************************************************************************
* NativeActivity.java
*****************************************************************************
* Copyright (C) 2016 VideoLAN
* Copyright (C) 2016-2019 VideoLAN
* All rights reserved.
*
* This software may be modified and distributed under the terms
......@@ -11,17 +11,13 @@
package org.videolan.nativesample;
import android.content.Context;
import android.graphics.PixelFormat;
import android.os.Build;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.SurfaceView;
import android.view.View;
import android.view.ViewStub;
import android.widget.FrameLayout;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
import org.videolan.libvlc.AWindow;
import org.videolan.libvlc.IVLCVout;
......@@ -39,9 +35,7 @@ public class NativeActivity extends AppCompatActivity implements IVLCVout.Callba
private static int sInit = -1;
static synchronized boolean loadLibraries(Context context) {
if (sInit != -1)
return sInit == 1;
if (sInit != -1) return sInit == 1;
try {
System.loadLibrary("c++_shared");
System.loadLibrary("vlc");
......@@ -73,8 +67,8 @@ public class NativeActivity extends AppCompatActivity implements IVLCVout.Callba
mAWindow = new AWindow(null);
mAWindow.addCallback(this);
mUiSurface = (SurfaceView) findViewById(R.id.ui_surface);
mVideoSurface = (SurfaceView) findViewById(R.id.video_surface);
mUiSurface = findViewById(R.id.ui_surface);
mVideoSurface = findViewById(R.id.video_surface);
if (!nativeCreate()) {
Toast.makeText(this, "Couldn't create LibVLC", Toast.LENGTH_LONG).show();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment