Skip to content

Commit

Permalink
安卓修复
Browse files Browse the repository at this point in the history
  • Loading branch information
syanbo committed Dec 24, 2017
1 parent eec8275 commit e6dc324
Show file tree
Hide file tree
Showing 5 changed files with 263 additions and 48 deletions.
77 changes: 41 additions & 36 deletions android/react-native-agora.iml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.id=":react-native-agora" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/../../../android" external.system.id="GRADLE" type="JAVA_MODULE" version="4">
<module external.linked.project.id=":react-native-agora" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/../../../android" external.system.id="GRADLE" version="4">
<component name="FacetManager">
<facet type="android-gradle" name="Android-Gradle">
<configuration>
Expand Down Expand Up @@ -28,20 +28,21 @@
<output-test url="file://$MODULE_DIR$/build/intermediates/classes/test/debug" />
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/apt/debug" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/debug" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/debug" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/debug" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/debug" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/apt/debug" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/debug" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/debug" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/apt/androidTest/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/androidTest/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/androidTest/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/androidTest/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/androidTest/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/apt/androidTest/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/androidTest/debug" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/androidTest/debug" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/apt/test/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/res" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/assets" type="java-resource" />
Expand All @@ -56,6 +57,13 @@
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/shaders" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/shaders" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/main/res" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/main/assets" type="java-resource" />
Expand All @@ -77,51 +85,48 @@
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/shaders" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/attr" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/blame" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/bundles" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/appcompat-v7/23.0.1/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-v4/23.0.1/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.facebook.fbui.textlayoutbuilder/textlayoutbuilder/1.0.0/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.facebook.fresco/drawee/1.3.0/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.facebook.fresco/fbcore/1.3.0/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.facebook.fresco/fresco/1.3.0/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.facebook.fresco/imagepipeline-base/1.3.0/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.facebook.fresco/imagepipeline-okhttp3/1.3.0/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.facebook.fresco/imagepipeline/1.3.0/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.facebook.react/react-native/0.51.0/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.facebook.soloader/soloader/0.1.0/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/org.webkit/android-jsc/r174650/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/check-manifest" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/intermediate-jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/javaPrecompile" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/jniLibs" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/lint" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/manifests" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/shaders" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/tmp" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/transforms" />
<excludeFolder url="file://$MODULE_DIR$/build/outputs" />
<excludeFolder url="file://$MODULE_DIR$/build/tmp" />
</content>
<orderEntry type="jdk" jdkName="Android API 23 Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" exported="" name="com.facebook.fresco:imagepipeline-okhttp3-1.3.0" level="project" />
<orderEntry type="library" exported="" name="com.android.support:support-v4-23.0.1" level="project" />
<orderEntry type="library" exported="" name="com.facebook.fresco:imagepipeline-1.3.0" level="project" />
<orderEntry type="library" exported="" name="com.squareup.okhttp3:okhttp:3.6.0@jar" level="project" />
<orderEntry type="library" exported="" name="com.facebook.fresco:fbcore-1.3.0" level="project" />
<orderEntry type="library" exported="" name="com.facebook.fresco:drawee-1.3.0" level="project" />
<orderEntry type="library" exported="" name="com.facebook.react:react-native-0.51.0" level="project" />
<orderEntry type="library" exported="" name="com.android.support:appcompat-v7-23.0.1" level="project" />
<orderEntry type="library" exported="" name="javax.inject:javax.inject:1@jar" level="project" />
<orderEntry type="library" exported="" name="com.facebook.fbui.textlayoutbuilder:staticlayout-proxy:1.0@jar" level="project" />
<orderEntry type="library" exported="" name="com.facebook.fresco:imagepipeline-base-1.3.0" level="project" />
<orderEntry type="library" exported="" name="com.parse.bolts:bolts-tasks:1.4.0@jar" level="project" />
<orderEntry type="library" exported="" name="__local_jars__:/Users/dengbo/Documents/GitHub/RNAgoraExample/node_modules/react-native-agora/android/libs/agora-rtc-sdk.jar:unspecified@jar" level="project" />
<orderEntry type="library" exported="" name="com.google.code.findbugs:jsr305:3.0.0@jar" level="project" />
<orderEntry type="library" exported="" name="com.squareup.okhttp3:okhttp-urlconnection:3.6.0@jar" level="project" />
<orderEntry type="library" exported="" name="com.android.support:support-annotations:23.0.1@jar" level="project" />
<orderEntry type="library" exported="" name="com.facebook.soloader:soloader-0.1.0" level="project" />
<orderEntry type="library" exported="" name="com.squareup.okio:okio:1.13.0@jar" level="project" />
<orderEntry type="library" exported="" name="com.facebook.fbui.textlayoutbuilder:textlayoutbuilder-1.0.0" level="project" />
<orderEntry type="library" exported="" name="com.facebook.fresco:fresco-1.3.0" level="project" />
<orderEntry type="library" exported="" name="org.webkit:android-jsc-r174650" level="project" />
<orderEntry type="library" name="com.facebook.fresco:imagepipeline-okhttp3-1.3.0" level="project" />
<orderEntry type="library" name="com.android.support:support-v4-23.0.1" level="project" />
<orderEntry type="library" name="com.facebook.fresco:imagepipeline-1.3.0" level="project" />
<orderEntry type="library" name="com.squareup.okhttp3:okhttp:3.6.0@jar" level="project" />
<orderEntry type="library" name="com.facebook.fresco:fbcore-1.3.0" level="project" />
<orderEntry type="library" name="com.facebook.fresco:drawee-1.3.0" level="project" />
<orderEntry type="library" name="com.facebook.react:react-native-0.51.0" level="project" />
<orderEntry type="library" name="com.android.support:appcompat-v7-23.0.1" level="project" />
<orderEntry type="library" name="javax.inject:javax.inject:1@jar" level="project" />
<orderEntry type="library" name="com.facebook.fbui.textlayoutbuilder:staticlayout-proxy:1.0@jar" level="project" />
<orderEntry type="library" name="__local_aars__:/Users/dengbo/Documents/GitHub/RNAgoraExample/node_modules/react-native-agora/android/libs/agora-rtc-sdk.jar:unspecified@jar" level="project" />
<orderEntry type="library" name="com.facebook.fresco:imagepipeline-base-1.3.0" level="project" />
<orderEntry type="library" name="com.parse.bolts:bolts-tasks:1.4.0@jar" level="project" />
<orderEntry type="library" name="com.google.code.findbugs:jsr305:3.0.0@jar" level="project" />
<orderEntry type="library" name="com.squareup.okhttp3:okhttp-urlconnection:3.6.0@jar" level="project" />
<orderEntry type="library" name="com.android.support:support-annotations:23.0.1@jar" level="project" />
<orderEntry type="library" name="com.facebook.soloader:soloader-0.1.0" level="project" />
<orderEntry type="library" name="com.squareup.okio:okio:1.13.0@jar" level="project" />
<orderEntry type="library" name="com.facebook.fbui.textlayoutbuilder:textlayoutbuilder-1.0.0" level="project" />
<orderEntry type="library" name="com.facebook.fresco:fresco-1.3.0" level="project" />
<orderEntry type="library" name="org.webkit:android-jsc-r174650" level="project" />
</component>
</module>
25 changes: 25 additions & 0 deletions android/src/main/java/com/syan/agora/AgoraVideoView.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package com.syan.agora;

import android.content.Context;
import android.util.AttributeSet;
import android.widget.LinearLayout;

/**
* Created by DB on 2017/6/27.
*/

public class AgoraVideoView extends LinearLayout {

public AgoraVideoView(Context context) {
super(context);
}

public AgoraVideoView(Context context, AttributeSet attrs) {
super(context, attrs);
}


public AgoraVideoView(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
}
}
6 changes: 6 additions & 0 deletions android/src/main/jniLibs/include/IAgoraMediaEngine.h
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ namespace agora
namespace media
{

enum MEDIA_SOURCE_TYPE {
AUDIO_PLAYOUT_SOURCE = 0,
AUDIO_RECORDING_SOURCE = 1,
};

class IAudioFrameObserver
{
public:
Expand Down Expand Up @@ -166,6 +171,7 @@ class IMediaEngine
virtual int registerAudioFrameObserver(IAudioFrameObserver* observer) = 0;
virtual int registerVideoFrameObserver(IVideoFrameObserver* observer) = 0;
virtual int registerVideoRenderFactory(IExternalVideoRenderFactory* factory) = 0;
virtual int pushAudioFrame(MEDIA_SOURCE_TYPE type, IAudioFrameObserver::AudioFrame *frame, bool wrap = false){ return -1; }
};

} //media
Expand Down
Loading

0 comments on commit e6dc324

Please sign in to comment.