├── Android
├── .classpath
├── .project
├── .settings
│ └── org.eclipse.jdt.core.prefs
├── AndroidManifest.xml
├── bin
│ ├── AndroidManifest.xml
│ ├── classes.dex
│ ├── classes
│ │ └── org
│ │ │ └── easydarwin
│ │ │ └── easypublisher
│ │ │ ├── BuildConfig.class
│ │ │ ├── CameraPublishActivity$1.class
│ │ │ ├── CameraPublishActivity$2.class
│ │ │ ├── CameraPublishActivity$ButtonResolutionListener.class
│ │ │ ├── CameraPublishActivity$ButtonStartListener.class
│ │ │ ├── CameraPublishActivity$ButtonStopListener.class
│ │ │ ├── CameraPublishActivity$SwitchCameraListener.class
│ │ │ ├── CameraPublishActivity.class
│ │ │ ├── EasyPublisherJni.class
│ │ │ ├── R$attr.class
│ │ │ ├── R$color.class
│ │ │ ├── R$dimen.class
│ │ │ ├── R$drawable.class
│ │ │ ├── R$id.class
│ │ │ ├── R$layout.class
│ │ │ ├── R$menu.class
│ │ │ ├── R$string.class
│ │ │ ├── R$style.class
│ │ │ ├── R$styleable.class
│ │ │ └── R.class
│ ├── dexedLibs
│ │ ├── easyVoiceEngine-1ae53acdecc21ec9aa7ef975abaaaff2.jar
│ │ └── smartVoiceEngine-18b8e6bead7568daecdfec45cbdd1e7d.jar
│ ├── jarlist.cache
│ ├── res
│ │ └── crunch
│ │ │ ├── drawable-hdpi
│ │ │ ├── ic_camera_switch.png
│ │ │ └── ic_launcher.png
│ │ │ ├── drawable-mdpi
│ │ │ ├── ic_camera_switch.png
│ │ │ └── ic_launcher.png
│ │ │ ├── drawable-xhdpi
│ │ │ ├── ic_camera_switch.png
│ │ │ └── ic_launcher.png
│ │ │ └── drawable-xxhdpi
│ │ │ ├── ic_camera_switch.png
│ │ │ └── ic_launcher.png
│ └── resources.ap_
├── build.xml
├── libs
│ ├── armeabi
│ │ ├── libEasyPublisher.so
│ │ └── libx264.so
│ └── easyVoiceEngine.jar
├── local.properties
├── proguard-project.txt
├── proguard.cfg
├── project.properties
├── res
│ ├── drawable-hdpi
│ │ ├── ic_camera_switch.png
│ │ └── ic_launcher.png
│ ├── drawable-mdpi
│ │ ├── ic_camera_switch.png
│ │ └── ic_launcher.png
│ ├── drawable-xhdpi
│ │ ├── ic_camera_switch.png
│ │ └── ic_launcher.png
│ ├── drawable-xxhdpi
│ │ ├── ic_camera_switch.png
│ │ └── ic_launcher.png
│ ├── layout
│ │ └── activity_main.xml
│ ├── menu
│ │ ├── menu_main.xml
│ │ └── menu_play_active.xml
│ ├── values-v11
│ │ └── styles.xml
│ ├── values-w820dp
│ │ └── dimens.xml
│ └── values
│ │ ├── attrs.xml
│ │ ├── colors.xml
│ │ ├── dimens.xml
│ │ ├── strings.xml
│ │ └── styles.xml
└── src
│ └── org
│ └── easydarwin
│ └── easypublisher
│ ├── CameraPublishActivity.java
│ └── EasyPublisherJni.java
├── Doc
└── EasyPublisher.psd
└── README.md
/Android/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Android/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | EasyPublisher
4 |
5 |
6 |
7 |
8 |
9 | com.android.ide.eclipse.adt.ResourceManagerBuilder
10 |
11 |
12 |
13 |
14 | com.android.ide.eclipse.adt.PreCompilerBuilder
15 |
16 |
17 |
18 |
19 | org.eclipse.jdt.core.javabuilder
20 |
21 |
22 |
23 |
24 | com.android.ide.eclipse.adt.ApkBuilder
25 |
26 |
27 |
28 |
29 |
30 | com.android.ide.eclipse.adt.AndroidNature
31 | org.eclipse.jdt.core.javanature
32 |
33 |
34 |
--------------------------------------------------------------------------------
/Android/.settings/org.eclipse.jdt.core.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
3 | org.eclipse.jdt.core.compiler.compliance=1.6
4 | org.eclipse.jdt.core.compiler.source=1.6
5 |
--------------------------------------------------------------------------------
/Android/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
28 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/Android/bin/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
28 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/Android/bin/classes.dex:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zif2016/EasyPublisher/b7fa3a0d67d3658bad5c6a0a0a6ecf3af025fde7/Android/bin/classes.dex
--------------------------------------------------------------------------------
/Android/bin/classes/org/easydarwin/easypublisher/BuildConfig.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zif2016/EasyPublisher/b7fa3a0d67d3658bad5c6a0a0a6ecf3af025fde7/Android/bin/classes/org/easydarwin/easypublisher/BuildConfig.class
--------------------------------------------------------------------------------
/Android/bin/classes/org/easydarwin/easypublisher/CameraPublishActivity$1.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zif2016/EasyPublisher/b7fa3a0d67d3658bad5c6a0a0a6ecf3af025fde7/Android/bin/classes/org/easydarwin/easypublisher/CameraPublishActivity$1.class
--------------------------------------------------------------------------------
/Android/bin/classes/org/easydarwin/easypublisher/CameraPublishActivity$2.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zif2016/EasyPublisher/b7fa3a0d67d3658bad5c6a0a0a6ecf3af025fde7/Android/bin/classes/org/easydarwin/easypublisher/CameraPublishActivity$2.class
--------------------------------------------------------------------------------
/Android/bin/classes/org/easydarwin/easypublisher/CameraPublishActivity$ButtonResolutionListener.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zif2016/EasyPublisher/b7fa3a0d67d3658bad5c6a0a0a6ecf3af025fde7/Android/bin/classes/org/easydarwin/easypublisher/CameraPublishActivity$ButtonResolutionListener.class
--------------------------------------------------------------------------------
/Android/bin/classes/org/easydarwin/easypublisher/CameraPublishActivity$ButtonStartListener.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zif2016/EasyPublisher/b7fa3a0d67d3658bad5c6a0a0a6ecf3af025fde7/Android/bin/classes/org/easydarwin/easypublisher/CameraPublishActivity$ButtonStartListener.class
--------------------------------------------------------------------------------
/Android/bin/classes/org/easydarwin/easypublisher/CameraPublishActivity$ButtonStopListener.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zif2016/EasyPublisher/b7fa3a0d67d3658bad5c6a0a0a6ecf3af025fde7/Android/bin/classes/org/easydarwin/easypublisher/CameraPublishActivity$ButtonStopListener.class
--------------------------------------------------------------------------------
/Android/bin/classes/org/easydarwin/easypublisher/CameraPublishActivity$SwitchCameraListener.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zif2016/EasyPublisher/b7fa3a0d67d3658bad5c6a0a0a6ecf3af025fde7/Android/bin/classes/org/easydarwin/easypublisher/CameraPublishActivity$SwitchCameraListener.class
--------------------------------------------------------------------------------
/Android/bin/classes/org/easydarwin/easypublisher/CameraPublishActivity.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zif2016/EasyPublisher/b7fa3a0d67d3658bad5c6a0a0a6ecf3af025fde7/Android/bin/classes/org/easydarwin/easypublisher/CameraPublishActivity.class
--------------------------------------------------------------------------------
/Android/bin/classes/org/easydarwin/easypublisher/EasyPublisherJni.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zif2016/EasyPublisher/b7fa3a0d67d3658bad5c6a0a0a6ecf3af025fde7/Android/bin/classes/org/easydarwin/easypublisher/EasyPublisherJni.class
--------------------------------------------------------------------------------
/Android/bin/classes/org/easydarwin/easypublisher/R$attr.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zif2016/EasyPublisher/b7fa3a0d67d3658bad5c6a0a0a6ecf3af025fde7/Android/bin/classes/org/easydarwin/easypublisher/R$attr.class
--------------------------------------------------------------------------------
/Android/bin/classes/org/easydarwin/easypublisher/R$color.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zif2016/EasyPublisher/b7fa3a0d67d3658bad5c6a0a0a6ecf3af025fde7/Android/bin/classes/org/easydarwin/easypublisher/R$color.class
--------------------------------------------------------------------------------
/Android/bin/classes/org/easydarwin/easypublisher/R$dimen.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zif2016/EasyPublisher/b7fa3a0d67d3658bad5c6a0a0a6ecf3af025fde7/Android/bin/classes/org/easydarwin/easypublisher/R$dimen.class
--------------------------------------------------------------------------------
/Android/bin/classes/org/easydarwin/easypublisher/R$drawable.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zif2016/EasyPublisher/b7fa3a0d67d3658bad5c6a0a0a6ecf3af025fde7/Android/bin/classes/org/easydarwin/easypublisher/R$drawable.class
--------------------------------------------------------------------------------
/Android/bin/classes/org/easydarwin/easypublisher/R$id.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zif2016/EasyPublisher/b7fa3a0d67d3658bad5c6a0a0a6ecf3af025fde7/Android/bin/classes/org/easydarwin/easypublisher/R$id.class
--------------------------------------------------------------------------------
/Android/bin/classes/org/easydarwin/easypublisher/R$layout.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zif2016/EasyPublisher/b7fa3a0d67d3658bad5c6a0a0a6ecf3af025fde7/Android/bin/classes/org/easydarwin/easypublisher/R$layout.class
--------------------------------------------------------------------------------
/Android/bin/classes/org/easydarwin/easypublisher/R$menu.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zif2016/EasyPublisher/b7fa3a0d67d3658bad5c6a0a0a6ecf3af025fde7/Android/bin/classes/org/easydarwin/easypublisher/R$menu.class
--------------------------------------------------------------------------------
/Android/bin/classes/org/easydarwin/easypublisher/R$string.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zif2016/EasyPublisher/b7fa3a0d67d3658bad5c6a0a0a6ecf3af025fde7/Android/bin/classes/org/easydarwin/easypublisher/R$string.class
--------------------------------------------------------------------------------
/Android/bin/classes/org/easydarwin/easypublisher/R$style.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zif2016/EasyPublisher/b7fa3a0d67d3658bad5c6a0a0a6ecf3af025fde7/Android/bin/classes/org/easydarwin/easypublisher/R$style.class
--------------------------------------------------------------------------------
/Android/bin/classes/org/easydarwin/easypublisher/R$styleable.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zif2016/EasyPublisher/b7fa3a0d67d3658bad5c6a0a0a6ecf3af025fde7/Android/bin/classes/org/easydarwin/easypublisher/R$styleable.class
--------------------------------------------------------------------------------
/Android/bin/classes/org/easydarwin/easypublisher/R.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zif2016/EasyPublisher/b7fa3a0d67d3658bad5c6a0a0a6ecf3af025fde7/Android/bin/classes/org/easydarwin/easypublisher/R.class
--------------------------------------------------------------------------------
/Android/bin/dexedLibs/easyVoiceEngine-1ae53acdecc21ec9aa7ef975abaaaff2.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zif2016/EasyPublisher/b7fa3a0d67d3658bad5c6a0a0a6ecf3af025fde7/Android/bin/dexedLibs/easyVoiceEngine-1ae53acdecc21ec9aa7ef975abaaaff2.jar
--------------------------------------------------------------------------------
/Android/bin/dexedLibs/smartVoiceEngine-18b8e6bead7568daecdfec45cbdd1e7d.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zif2016/EasyPublisher/b7fa3a0d67d3658bad5c6a0a0a6ecf3af025fde7/Android/bin/dexedLibs/smartVoiceEngine-18b8e6bead7568daecdfec45cbdd1e7d.jar
--------------------------------------------------------------------------------
/Android/bin/jarlist.cache:
--------------------------------------------------------------------------------
1 | # cache for current jar dependency. DO NOT EDIT.
2 | # format is
3 | # Encoding is UTF-8
4 |
--------------------------------------------------------------------------------
/Android/bin/res/crunch/drawable-hdpi/ic_camera_switch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zif2016/EasyPublisher/b7fa3a0d67d3658bad5c6a0a0a6ecf3af025fde7/Android/bin/res/crunch/drawable-hdpi/ic_camera_switch.png
--------------------------------------------------------------------------------
/Android/bin/res/crunch/drawable-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zif2016/EasyPublisher/b7fa3a0d67d3658bad5c6a0a0a6ecf3af025fde7/Android/bin/res/crunch/drawable-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Android/bin/res/crunch/drawable-mdpi/ic_camera_switch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zif2016/EasyPublisher/b7fa3a0d67d3658bad5c6a0a0a6ecf3af025fde7/Android/bin/res/crunch/drawable-mdpi/ic_camera_switch.png
--------------------------------------------------------------------------------
/Android/bin/res/crunch/drawable-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zif2016/EasyPublisher/b7fa3a0d67d3658bad5c6a0a0a6ecf3af025fde7/Android/bin/res/crunch/drawable-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Android/bin/res/crunch/drawable-xhdpi/ic_camera_switch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zif2016/EasyPublisher/b7fa3a0d67d3658bad5c6a0a0a6ecf3af025fde7/Android/bin/res/crunch/drawable-xhdpi/ic_camera_switch.png
--------------------------------------------------------------------------------
/Android/bin/res/crunch/drawable-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zif2016/EasyPublisher/b7fa3a0d67d3658bad5c6a0a0a6ecf3af025fde7/Android/bin/res/crunch/drawable-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Android/bin/res/crunch/drawable-xxhdpi/ic_camera_switch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zif2016/EasyPublisher/b7fa3a0d67d3658bad5c6a0a0a6ecf3af025fde7/Android/bin/res/crunch/drawable-xxhdpi/ic_camera_switch.png
--------------------------------------------------------------------------------
/Android/bin/res/crunch/drawable-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zif2016/EasyPublisher/b7fa3a0d67d3658bad5c6a0a0a6ecf3af025fde7/Android/bin/res/crunch/drawable-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Android/bin/resources.ap_:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zif2016/EasyPublisher/b7fa3a0d67d3658bad5c6a0a0a6ecf3af025fde7/Android/bin/resources.ap_
--------------------------------------------------------------------------------
/Android/build.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
9 |
29 |
30 |
31 |
40 |
41 |
42 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
54 |
55 |
67 |
68 |
69 |
87 |
88 |
89 |
90 |
91 |
--------------------------------------------------------------------------------
/Android/libs/armeabi/libEasyPublisher.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zif2016/EasyPublisher/b7fa3a0d67d3658bad5c6a0a0a6ecf3af025fde7/Android/libs/armeabi/libEasyPublisher.so
--------------------------------------------------------------------------------
/Android/libs/armeabi/libx264.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zif2016/EasyPublisher/b7fa3a0d67d3658bad5c6a0a0a6ecf3af025fde7/Android/libs/armeabi/libx264.so
--------------------------------------------------------------------------------
/Android/libs/easyVoiceEngine.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zif2016/EasyPublisher/b7fa3a0d67d3658bad5c6a0a0a6ecf3af025fde7/Android/libs/easyVoiceEngine.jar
--------------------------------------------------------------------------------
/Android/local.properties:
--------------------------------------------------------------------------------
1 | # This file is automatically generated by Android Tools.
2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED!
3 | #
4 | # This file must *NOT* be checked into Version Control Systems,
5 | # as it contains information specific to your local configuration.
6 |
7 | # location of the SDK. This is only used by Ant
8 | # For customization when using a Version Control System, please read the
9 | # header note.
10 | sdk.dir=/home/yaoquan/linuxwork/android-dev/adt-bundle-linux-x86-20140321/sdk
11 |
--------------------------------------------------------------------------------
/Android/proguard-project.txt:
--------------------------------------------------------------------------------
1 | # To enable ProGuard in your project, edit project.properties
2 | # to define the proguard.config property as described in that file.
3 | #
4 | # Add project specific ProGuard rules here.
5 | # By default, the flags in this file are appended to flags specified
6 | # in ${sdk.dir}/tools/proguard/proguard-android.txt
7 | # You can edit the include path and order by changing the ProGuard
8 | # include property in project.properties.
9 | #
10 | # For more details, see
11 | # http://developer.android.com/guide/developing/tools/proguard.html
12 |
13 | # Add any project specific keep options here:
14 |
15 | # If your project uses WebView with JS, uncomment the following
16 | # and specify the fully qualified class name to the JavaScript interface
17 | # class:
18 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
19 | # public *;
20 | #}
21 |
--------------------------------------------------------------------------------
/Android/proguard.cfg:
--------------------------------------------------------------------------------
1 | -optimizationpasses 5
2 | -dontusemixedcaseclassnames
3 | -dontskipnonpubliclibraryclasses
4 | -dontpreverify
5 | -verbose
6 | -optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
7 |
8 | -keep public class * extends android.app.Activity
9 | -keep public class * extends android.app.Application
10 | -keep public class * extends android.app.Service
11 | -keep public class * extends android.content.BroadcastReceiver
12 | -keep public class * extends android.content.ContentProvider
13 | -keep public class * extends android.app.backup.BackupAgentHelper
14 | -keep public class * extends android.preference.Preference
15 | -keep public class com.android.vending.licensing.ILicensingService
16 |
17 | -keepclasseswithmembernames class * {
18 | native ;
19 | }
20 |
21 | -keepclasseswithmembers class * {
22 | public (android.content.Context, android.util.AttributeSet);
23 | }
24 |
25 | -keepclasseswithmembers class * {
26 | public (android.content.Context, android.util.AttributeSet, int);
27 | }
28 |
29 | -keepclassmembers class * extends android.app.Activity {
30 | public void *(android.view.View);
31 | }
32 |
33 | -keepclassmembers enum * {
34 | public static **[] values();
35 | public static ** valueOf(java.lang.String);
36 | }
37 |
38 | -keep class * implements android.os.Parcelable {
39 | public static final android.os.Parcelable$Creator *;
40 | }
41 |
--------------------------------------------------------------------------------
/Android/project.properties:
--------------------------------------------------------------------------------
1 | # This file is automatically generated by Android Tools.
2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED!
3 | #
4 | # This file must be checked in Version Control Systems.
5 | #
6 | # To customize properties used by the Ant build system edit
7 | # "ant.properties", and override values to adapt the script to your
8 | # project structure.
9 | #
10 | # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
11 | #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
12 |
13 | # Project target.
14 | target=Google Inc.:Google APIs:22
15 |
--------------------------------------------------------------------------------
/Android/res/drawable-hdpi/ic_camera_switch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zif2016/EasyPublisher/b7fa3a0d67d3658bad5c6a0a0a6ecf3af025fde7/Android/res/drawable-hdpi/ic_camera_switch.png
--------------------------------------------------------------------------------
/Android/res/drawable-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zif2016/EasyPublisher/b7fa3a0d67d3658bad5c6a0a0a6ecf3af025fde7/Android/res/drawable-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Android/res/drawable-mdpi/ic_camera_switch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zif2016/EasyPublisher/b7fa3a0d67d3658bad5c6a0a0a6ecf3af025fde7/Android/res/drawable-mdpi/ic_camera_switch.png
--------------------------------------------------------------------------------
/Android/res/drawable-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zif2016/EasyPublisher/b7fa3a0d67d3658bad5c6a0a0a6ecf3af025fde7/Android/res/drawable-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Android/res/drawable-xhdpi/ic_camera_switch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zif2016/EasyPublisher/b7fa3a0d67d3658bad5c6a0a0a6ecf3af025fde7/Android/res/drawable-xhdpi/ic_camera_switch.png
--------------------------------------------------------------------------------
/Android/res/drawable-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zif2016/EasyPublisher/b7fa3a0d67d3658bad5c6a0a0a6ecf3af025fde7/Android/res/drawable-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Android/res/drawable-xxhdpi/ic_camera_switch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zif2016/EasyPublisher/b7fa3a0d67d3658bad5c6a0a0a6ecf3af025fde7/Android/res/drawable-xxhdpi/ic_camera_switch.png
--------------------------------------------------------------------------------
/Android/res/drawable-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zif2016/EasyPublisher/b7fa3a0d67d3658bad5c6a0a0a6ecf3af025fde7/Android/res/drawable-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Android/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
11 |
12 |
16 |
17 |
20 |
21 |
30 |
31 |
32 |
37 |
41 |
42 |
47 |
48 |
53 |
54 |
55 |
59 |
60 |
67 |
68 |
75 |
76 |
77 |
78 |
79 |
--------------------------------------------------------------------------------
/Android/res/menu/menu_main.xml:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/Android/res/menu/menu_play_active.xml:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/Android/res/values-v11/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
10 |
11 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/Android/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 64dp
6 |
7 |
--------------------------------------------------------------------------------
/Android/res/values/attrs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/Android/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #66000000
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Android/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 |
6 |
--------------------------------------------------------------------------------
/Android/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | EasyPublisher
5 | 当前分辨率:高
6 | QQ: 413229569
7 | Settings
8 | VideoActive
9 | Dummy Button
10 | DUMMY\nCONTENT
11 | PlayActive
12 | 前后置摄像头切换
13 | start queue
14 |
15 |
--------------------------------------------------------------------------------
/Android/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
8 |
9 |
15 |
16 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Android/src/org/easydarwin/easypublisher/CameraPublishActivity.java:
--------------------------------------------------------------------------------
1 | package org.easydarwin.easypublisher;
2 |
3 | import java.io.IOException;
4 | import java.util.List;
5 |
6 | import com.voiceengine.NTAudioRecord;
7 |
8 | import android.annotation.SuppressLint; //new api
9 | import android.app.Activity;
10 | import android.content.Context;
11 | import android.content.res.Configuration;
12 | import android.graphics.Color;
13 | import android.graphics.ImageFormat;
14 | import android.graphics.PixelFormat;
15 | import android.hardware.Camera;
16 | import android.hardware.Camera.CameraInfo;
17 | import android.hardware.Camera.Parameters;
18 | import android.hardware.Camera.PreviewCallback;
19 | import android.hardware.Camera.Size;
20 | import android.os.Bundle;
21 | import android.util.Log;
22 | import android.view.SurfaceHolder;
23 | import android.view.SurfaceHolder.Callback;
24 | import android.view.SurfaceView;
25 | import android.view.View;
26 | import android.view.View.OnClickListener;
27 | import android.widget.AdapterView;
28 | import android.widget.AdapterView.OnItemSelectedListener;
29 | import android.widget.ArrayAdapter;
30 | import android.widget.Button;
31 | import android.widget.ImageView;
32 | import android.widget.Spinner;
33 | import android.widget.TextView;
34 | import android.hardware.Camera.AutoFocusCallback;
35 |
36 | @SuppressWarnings("deprecation")
37 | public class CameraPublishActivity extends Activity implements Callback, PreviewCallback
38 | {
39 | private static String TAG = "EasyPublisher";
40 | private TextView textCurURL = null;
41 | private TextView textCurResolution = null;
42 | private native int InitJni();
43 | private EasyPublisherJni libPublisher = null;
44 |
45 | private Spinner serverSelector;
46 | private ImageView imgSwitchCamera;
47 | private Button btnResolution;
48 | private Button btnStartStop;
49 | private Button btnStop;
50 |
51 | private SurfaceView mSurfaceView = null;
52 | private SurfaceHolder mSurfaceHolder = null;
53 |
54 | private Camera mCamera = null;
55 | private Context context;
56 | private AutoFocusCallback myAutoFocusCallback = null;
57 |
58 | private boolean mPreviewRunning = false;
59 | NTAudioRecord audioRecord_ = null;
60 | private boolean isStart = false;
61 |
62 | private String publishURL;
63 | final private String baseURL = "rtmp://rtmp.easydarwin.org:1935/live/stream";
64 |
65 | private String printText = "URL:";
66 |
67 | private Camera cameraView;
68 | private static final int FRONT = 1; //前置摄像头标记
69 | private static final int BACK = 2; //后置摄像头标记
70 | private int currentCameraType = BACK; //当前摄像头标记
71 |
72 | private static final int PORTRAIT = 1; //竖屏
73 | private static final int LANDSCAPE = 2; //横屏
74 | private int currentOrigentation = PORTRAIT;
75 |
76 | private int videoWidth = 640;
77 | private int videoHight = 480;
78 |
79 | private int iResFlag = 0;
80 |
81 | @Override
82 | public void onCreate(Bundle savedInstanceState)
83 | {
84 | Log.i(TAG, "onCreate..");
85 |
86 | publishURL = baseURL + String.valueOf((int)( System.currentTimeMillis() % 1000000));
87 |
88 | printText = printText + publishURL;
89 |
90 | Log.i(TAG, printText);
91 |
92 | super.onCreate(savedInstanceState);
93 | setContentView(R.layout.activity_main);
94 | serverSelector = (Spinner)findViewById(R.id.serverSelctor);
95 | String []servers = new String[]{"电信", "移动", "CDN"};
96 | ArrayAdapter adapterServer = new ArrayAdapter(this,
97 | android.R.layout.simple_spinner_item, servers);
98 | adapterServer.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
99 | serverSelector.setAdapter(adapterServer);
100 |
101 | //添加事件Spinner事件监听
102 | serverSelector.setOnItemSelectedListener(new OnItemSelectedListener() {
103 | @Override
104 | public void onItemSelected(AdapterView> parent, View view,
105 | int position, long id) {
106 | }
107 |
108 | @Override
109 | public void onNothingSelected(AdapterView> parent) {
110 |
111 | }
112 | });
113 |
114 | textCurURL = (TextView)findViewById(R.id.txtCurURL);
115 | textCurURL.setText(printText);
116 |
117 | textCurResolution = (TextView)findViewById(R.id.txtCurResolution);
118 | textCurResolution.setText("当前分辨率:高");
119 |
120 | btnResolution = (Button)findViewById(R.id.button_resolution);
121 | btnResolution.setOnClickListener(new ButtonResolutionListener());
122 |
123 | btnStartStop = (Button)findViewById(R.id.button_start_stop);
124 | btnStartStop.setOnClickListener(new ButtonStartListener());
125 | imgSwitchCamera = (ImageView)findViewById(R.id.button_switchCamera);
126 | imgSwitchCamera.setOnClickListener(new SwitchCameraListener());
127 |
128 | mSurfaceView = (SurfaceView) this.findViewById(R.id.surface);
129 | mSurfaceHolder = mSurfaceView.getHolder();
130 | mSurfaceHolder.addCallback(this);
131 | mSurfaceHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
132 |
133 |
134 | mSurfaceView.getHolder().setKeepScreenOn(true); // 保持屏幕高亮
135 |
136 | //自动聚焦变量回调
137 | myAutoFocusCallback = new AutoFocusCallback()
138 | {
139 |
140 | public void onAutoFocus(boolean success, Camera camera) {
141 | if(success)//success表示对焦成功
142 | {
143 | Log.i(TAG, "onAutoFocus succeed...");
144 | }
145 | else
146 | {
147 | Log.i(TAG, "onAutoFocus failed...");
148 | }
149 | }
150 | };
151 |
152 | libPublisher = new EasyPublisherJni();
153 | audioRecord_ = new NTAudioRecord(this, 1);
154 | }
155 |
156 | class SwitchCameraListener implements OnClickListener
157 | {
158 | public void onClick(View v)
159 | {
160 | Log.e(TAG, "Switch camera..");
161 | try {
162 | changeCamera();
163 | } catch (IOException e) {
164 | // TODO Auto-generated catch block
165 | e.printStackTrace();
166 | }
167 | }
168 | };
169 |
170 |
171 | class ButtonResolutionListener implements OnClickListener
172 | {
173 | public void onClick(View v)
174 | {
175 | Log.i(TAG, "onClick Resolution change..iResFlag:" + iResFlag);
176 |
177 | if(iResFlag == 0)
178 | {
179 | videoWidth = 320;
180 | videoHight = 240;
181 | iResFlag = 1;
182 | btnResolution.setText("设置低分辨率");
183 | textCurResolution.setText("当前分辨率:中");
184 | }
185 | else if(iResFlag == 1)
186 | {
187 | videoWidth = 176;
188 | videoHight = 144;
189 | iResFlag = 2;
190 | btnResolution.setText("设置超高分辨率");
191 | textCurResolution.setText("当前分辨率:低");
192 | }else if(iResFlag == 2)
193 | {
194 | videoWidth = 1280;
195 | videoHight = 720;
196 | btnResolution.setText("设置高分辨率");
197 | iResFlag = 3;
198 | textCurResolution.setText("当前分辨率:超高");
199 | }else if(iResFlag == 3)
200 | {
201 | videoWidth = 640;
202 | videoHight = 480;
203 | btnResolution.setText("设置中高分辨率");
204 | iResFlag = 0;
205 | textCurResolution.setText("当前分辨率:高");
206 | }
207 |
208 | mCamera.stopPreview();
209 | initCamera(mSurfaceHolder);
210 |
211 | libPublisher.EasyPublisherInit(videoWidth, videoHight);
212 |
213 | }
214 | };
215 |
216 | class ButtonStartListener implements OnClickListener
217 | {
218 | public void onClick(View v)
219 | {
220 | if (isStart)
221 | {
222 | stop();
223 | return;
224 | }
225 | isStart = true;
226 | btnStartStop.setText("停止");
227 | Log.i(TAG, "onClick start..");
228 |
229 | if(libPublisher!=null)
230 | {
231 | int isStarted = libPublisher.EasyPublisherStartPublish(publishURL);
232 | if(isStarted != 1)
233 | {
234 | textCurResolution.setText("Failed to publish stream..");
235 | }
236 | }
237 | if(audioRecord_ != null)
238 | {
239 | Log.i(TAG, "onCreate, call executeAudioRecordMethod..");
240 | audioRecord_.executeAudioRecordMethod();
241 | }
242 |
243 | btnResolution.setEnabled(false);
244 | btnResolution.setTextColor(Color.GRAY);
245 | }
246 | };
247 |
248 | class ButtonStopListener implements OnClickListener
249 | {
250 | public void onClick(View v)
251 | {
252 | //onDestroy();
253 | }
254 | };
255 |
256 | private void stop()
257 | {
258 | Log.i(TAG, "onClick stop..");
259 | StopPublish();
260 | isStart = false;
261 | btnResolution.setEnabled(true);
262 | btnResolution.setTextColor(Color.BLACK);
263 | btnStartStop.setText("开始推流");
264 | }
265 |
266 | @Override
267 | protected void onDestroy(){
268 | Log.i(TAG, "activity destory!");
269 | super.onDestroy();
270 | finish();
271 | System.exit(0);
272 | }
273 |
274 | private void initCamera(SurfaceHolder holder)//it will call when surfaceChanged
275 | {
276 | Log.i(TAG, "initCamera..");
277 |
278 | if(mPreviewRunning)
279 | mCamera.stopPreview();
280 |
281 | Camera.Parameters parameters;
282 | try {
283 | parameters = mCamera.getParameters();
284 | } catch (Exception e) {
285 | // TODO Auto-generated catch block
286 | e.printStackTrace();
287 | return;
288 | }
289 |
290 | // List sizeList =parameters.getSupportedPreviewSizes();
291 |
292 | // for(int i = 1; i < sizeList.size(); i++)
293 | //{
294 | //Log.i(TAG, "[camera supported resolution] width: " + sizeList.get(i).width + " height: " + sizeList.get(i).height + "maxResolusion: " + maxResolusion);
295 | //}
296 |
297 | parameters.setPreviewSize(videoWidth, videoHight);
298 | parameters.setPictureFormat(PixelFormat.JPEG);
299 | parameters.setPreviewFormat(PixelFormat.YCbCr_420_SP);
300 |
301 | // 横竖屏镜头自动调整
302 | if (this.getResources().getConfiguration().orientation != Configuration.ORIENTATION_LANDSCAPE) {
303 | parameters.set("orientation", "portrait"); //
304 | mCamera.setDisplayOrientation(90); // 在2.2以上可以使用
305 | } else// 如果是横屏
306 | {
307 | parameters.set("orientation", "landscape");
308 | mCamera.setDisplayOrientation(0); // 在2.2以上可以使用
309 | }
310 |
311 | mCamera.setParameters(parameters);
312 |
313 | int bufferSize = (((videoWidth|0xf)+1) * videoHight * ImageFormat.getBitsPerPixel(parameters.getPreviewFormat())) / 8;
314 | mCamera.addCallbackBuffer(new byte[bufferSize]);
315 |
316 | mCamera.setPreviewCallbackWithBuffer(this);
317 | try {
318 | mCamera.setPreviewDisplay(holder);
319 | } catch (Exception ex) {
320 | // TODO Auto-generated catch block
321 | if(null != mCamera){
322 | mCamera.release();
323 | mCamera = null;
324 | }
325 | ex.printStackTrace();
326 | }
327 | mCamera.startPreview();
328 | mCamera.autoFocus(myAutoFocusCallback);
329 | mPreviewRunning = true;
330 | }
331 |
332 | @Override
333 | public void surfaceCreated(SurfaceHolder holder) {
334 | Log.i(TAG, "surfaceCreated..");
335 | try {
336 |
337 | int CammeraIndex=FindBackCamera();
338 | Log.i(TAG, "BackCamera: " + CammeraIndex);
339 |
340 | if(CammeraIndex==-1){
341 | CammeraIndex=FindFrontCamera();
342 | currentCameraType = FRONT;
343 | imgSwitchCamera.setEnabled(false);
344 | if(CammeraIndex == -1)
345 | {
346 | Log.i(TAG, "NO camera!!");
347 | return;
348 | }
349 | }
350 | else
351 | {
352 | currentCameraType = BACK;
353 | }
354 |
355 | mCamera = openCamera(currentCameraType);
356 |
357 | } catch (Exception e) {
358 | e.printStackTrace();
359 | }
360 | }
361 |
362 | @Override
363 | public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) {
364 | Log.i(TAG, "surfaceChanged..");
365 | initCamera(holder);
366 | }
367 |
368 | @Override
369 | public void surfaceDestroyed(SurfaceHolder holder) {
370 | // TODO Auto-generated method stub
371 | Log.i(TAG, "Surface Destroyed");
372 | if (mCamera != null) {
373 | mCamera.setPreviewCallback(null);
374 | mCamera.stopPreview();
375 | mPreviewRunning = false;
376 | mCamera.release();
377 | mCamera = null;
378 | }
379 |
380 | if(audioRecord_ != null)
381 | {
382 | Log.i(TAG, "surfaceDestroyed, call StopRecording..");
383 | audioRecord_.StopRecording();
384 | audioRecord_ = null;
385 | }
386 | }
387 |
388 | public void onConfigurationChanged(Configuration newConfig) {
389 | try {
390 | super.onConfigurationChanged(newConfig);
391 | Log.i(TAG, "onConfigurationChanged, start:" + isStart);
392 | if (this.getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) {
393 | if(!isStart)
394 | currentOrigentation = LANDSCAPE;
395 | } else if (this.getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT) {
396 | if(!isStart)
397 | currentOrigentation = PORTRAIT;
398 | }
399 | } catch (Exception ex) {
400 | }
401 | }
402 |
403 | @Override
404 | public void onPreviewFrame(byte[] data, Camera camera) {
405 | // forward image data to JNI
406 | if (data == null) {
407 | // It appears that there is a bug in the camera driver that is asking for a buffer size bigger than it should
408 | Parameters params = camera.getParameters();
409 | Size size = params.getPreviewSize();
410 | int bufferSize = (((size.width|0x1f)+1) * size.height * ImageFormat.getBitsPerPixel(params.getPreviewFormat())) / 8;
411 | bufferSize += bufferSize / 20;
412 | camera.addCallbackBuffer(new byte[bufferSize]);
413 | }
414 | else {
415 | if(isStart)
416 | {
417 | libPublisher.EasyPublisherOnCaptureVideoData(data, data.length, currentCameraType, currentOrigentation);
418 | }
419 | camera.addCallbackBuffer(data);
420 | }
421 |
422 | }
423 |
424 | private int FindFrontCamera(){
425 | int cameraCount = 0;
426 | Camera.CameraInfo cameraInfo = new Camera.CameraInfo();
427 | cameraCount = Camera.getNumberOfCameras();
428 |
429 | for ( int camIdx = 0; camIdx < cameraCount;camIdx++ ) {
430 | Camera.getCameraInfo( camIdx, cameraInfo );
431 | if ( cameraInfo.facing ==Camera.CameraInfo.CAMERA_FACING_FRONT ) {
432 | return camIdx;
433 | }
434 | }
435 | return -1;
436 | }
437 | private int FindBackCamera(){
438 | int cameraCount = 0;
439 | Camera.CameraInfo cameraInfo = new Camera.CameraInfo();
440 | cameraCount = Camera.getNumberOfCameras();
441 |
442 | for ( int camIdx = 0; camIdx < cameraCount;camIdx++ ) {
443 | Camera.getCameraInfo( camIdx, cameraInfo );
444 | if ( cameraInfo.facing ==Camera.CameraInfo.CAMERA_FACING_BACK ) {
445 | return camIdx;
446 | }
447 | }
448 | return -1;
449 | }
450 |
451 | @SuppressLint("NewApi")
452 | private Camera openCamera(int type){
453 | int frontIndex =-1;
454 | int backIndex = -1;
455 | int cameraCount = Camera.getNumberOfCameras();
456 | Log.i(TAG, "cameraCount: " + cameraCount);
457 | CameraInfo info = new CameraInfo();
458 | for(int cameraIndex = 0; cameraIndexThis function must be called firstly.
13 | *
14 | * @return {1} if successful
15 | */
16 | public native int EasyPublisherInit(int width, int height);
17 |
18 | /**
19 | * start to publish stream.
20 | *
21 | * @param url
22 | *
23 | * @return {1} if successful
24 | */
25 | public native int EasyPublisherStartPublish(String url);
26 |
27 | /**
28 | * set live video data.
29 | *
30 | * @param cameraType: CAMERA_FACING_BACK with 0, CAMERA_FACING_FRONT with 1
31 | * @param curOrg: LANDSCAPE with 0, PORTRAIT 1
32 | *
33 | * @return {1} if successful
34 | */
35 | public native int EasyPublisherOnCaptureVideoData(byte[] data, int len, int cameraType, int curOrg);
36 |
37 | /**
38 | * Stop publisher.
39 | *
40 | * @return {1} if successful
41 | */
42 | public native int EasyPublisherStopPublish();
43 | }
44 |
--------------------------------------------------------------------------------
/Doc/EasyPublisher.psd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zif2016/EasyPublisher/b7fa3a0d67d3658bad5c6a0a0a6ecf3af025fde7/Doc/EasyPublisher.psd
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # EasyPublisher #
2 |
3 | EasyPublisher是EasyDarwin开源团队开发的一款直播推送库,支持Android、IOS直播推送,基于RTMP协议,支持标准RTMP流媒体服务器以及网宿、蓝汛等cdn,SDK调用流程简单;
4 |
5 | **EasyPublisher SDK库个人使用免费,企业及商用需要经过授权**;
6 |
7 | ## 调用过程 ##
8 | 
9 |
10 | ## 获取更多信息 ##
11 |
12 | 邮件:[support@easydarwin.org](mailto:support@easydarwin.org)
13 |
14 | WEB:[www.EasyDarwin.org](http://www.easydarwin.org)
15 |
16 | Copyright © EasyDarwin.ORG 2012-2016
17 |
18 | 
19 |
--------------------------------------------------------------------------------