Skip to content

Commit

Permalink
Merge pull request begeekmyfriend#724 from deathemperor/master
Browse files Browse the repository at this point in the history
fix android build
  • Loading branch information
begeekmyfriend authored Jul 22, 2019
2 parents f5fcc76 + 549f4bd commit 6b439bb
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 13 deletions.
9 changes: 4 additions & 5 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ apply plugin: 'com.android.application'

android {
compileSdkVersion 26
buildToolsVersion "26.0.2"

defaultConfig {
applicationId "net.ossrs.yasea.demo"
Expand All @@ -23,8 +22,8 @@ android {
}

dependencies {
compile fileTree(dir: 'libx264.libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:26.1.0'
compile project(path: ':library')
implementation fileTree(dir: 'libx264.libs', include: ['*.jar'])
testImplementation 'junit:junit:4.12'
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation project(path: ':library')
}
3 changes: 2 additions & 1 deletion app/src/main/java/net/ossrs/yasea/demo/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,11 @@ public class MainActivity extends AppCompatActivity implements RtmpHandler.RtmpL
private Button btnPause;

private SharedPreferences sp;
private String rtmpUrl = "rtmp://ossrs.net/" + getRandomAlphaString(3) + '/' + getRandomAlphaDigitString(5);
private String rtmpUrl = "rtmp://asia-southeast1-u-01-gw.uizadev.io:1935/push2transcode/918badeb-0c81-46f1-9e91-9a1cc566dc3a?token=28cc0b78538b13a120d1e47fc0c7ce85&ulasId=57ee741f-3daf-11e9-89c5-02c1b5b83c1a";
private String recPath = Environment.getExternalStorageDirectory().getPath() + "/test.mp4";

private SrsPublisher mPublisher;
private SrsCameraView mCameraView;

@Override
protected void onCreate(Bundle savedInstanceState) {
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0'
classpath 'com.android.tools.build:gradle:3.3.2'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
9 changes: 4 additions & 5 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ apply plugin: 'com.android.library'

android {
compileSdkVersion 26
buildToolsVersion "26.0.2"

defaultConfig {
minSdkVersion 21
Expand All @@ -29,10 +28,10 @@ android {
}

dependencies {
compile fileTree(dir: 'libx264.libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
implementation fileTree(dir: 'libx264.libs', include: ['*.jar'])
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:26.1.0'
testCompile 'junit:junit:4.12'
implementation 'com.android.support:appcompat-v7:26.1.0'
testImplementation 'junit:junit:4.12'
}
4 changes: 3 additions & 1 deletion library/src/main/java/net/ossrs/yasea/SrsCameraView.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package net.ossrs.yasea;

import android.app.Activity;
import android.content.Context;
import android.content.res.Configuration;
import android.graphics.ImageFormat;
Expand All @@ -9,6 +10,7 @@
import android.opengl.GLSurfaceView;
import android.opengl.Matrix;
import android.util.AttributeSet;
import android.view.Surface;

import com.seu.magicfilter.base.gpuimage.GPUImageFilter;
import com.seu.magicfilter.utils.MagicFilterFactory;
Expand Down Expand Up @@ -373,7 +375,7 @@ public void stopCamera() {
}

protected Camera openCamera() {
Camera camera;
Camera camera = null;
if (mCamId < 0) {
Camera.CameraInfo info = new Camera.CameraInfo();
int numCameras = Camera.getNumberOfCameras();
Expand Down
1 change: 1 addition & 0 deletions library/src/main/java/net/ossrs/yasea/SrsPublisher.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package net.ossrs.yasea;

import android.hardware.Camera;
import android.media.AudioRecord;
import android.media.audiofx.AcousticEchoCanceler;
import android.media.audiofx.AutomaticGainControl;
Expand Down

0 comments on commit 6b439bb

Please sign in to comment.