Skip to content

Commit

Permalink
Merge pull request #314 from Johnny1994/dev
Browse files Browse the repository at this point in the history
Release v3.0.0
  • Loading branch information
KevinHuo authored Apr 23, 2020
2 parents 7f7d72b + e2dc57a commit 47fbee9
Show file tree
Hide file tree
Showing 18 changed files with 129 additions and 24 deletions.
6 changes: 3 additions & 3 deletions PLDroidMediaStreamingDemo/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ android {
applicationId "com.qiniu.pili.droid.streaming.demo"
minSdkVersion 16
targetSdkVersion 28
versionCode 69
versionName "2.4.1"
versionCode 70
versionName "3.0.0"
}
buildTypes {
release {
Expand All @@ -25,5 +25,5 @@ dependencies {
implementation 'com.journeyapps:zxing-android-embedded:3.0.2@aar'
implementation 'com.google.zxing:core:3.2.0'
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation files('libs/pldroid-media-streaming-2.4.1.jar')
implementation files('libs/pldroid-media-streaming-3.0.0.jar')
}
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

import com.google.zxing.integration.android.IntentIntegrator;
import com.google.zxing.integration.android.IntentResult;
import com.qiniu.pili.droid.streaming.PLAuthenticationResultCallback;
import com.qiniu.pili.droid.streaming.StreamingEnv;
import com.qiniu.pili.droid.streaming.demo.activity.AVStreamingActivity;
import com.qiniu.pili.droid.streaming.demo.activity.AudioStreamingActivity;
Expand Down Expand Up @@ -109,6 +110,23 @@ public void launchStreaming(View v) {
startActivity(intent);
}

public void onClickCheckAuth(View v) {
StreamingEnv.checkAuthentication(new PLAuthenticationResultCallback() {
@Override
public void onAuthorizationResult(int result) {
String authState;
if (result == PLAuthenticationResultCallback.UnCheck) {
authState = "UnCheck";
} else if (result == PLAuthenticationResultCallback.UnAuthorized) {
authState = "UnAuthorized";
} else {
authState = "Authorized";
}
Toast.makeText(MainActivity.this, "auth : " + authState, Toast.LENGTH_SHORT).show();
}
});
}

private void initInputTypeSpinner() {
ArrayAdapter<String> adapter = new ArrayAdapter<>(this, android.R.layout.simple_spinner_item, INPUT_TYPES);
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,9 @@ public void run() {
Log.e(TAG, "Unauthorized streaming url:" + extra);
mLogContent += "Unauthorized Url\n";
break;
case UNAUTHORIZED_PACKAGE:
mLogContent += "Unauthorized package\n";
break;
}
runOnUiThread(new Runnable() {
@Override
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
60 changes: 39 additions & 21 deletions PLDroidMediaStreamingDemo/app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<ScrollView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1">
android:layout_weight="9">

<LinearLayout
android:layout_width="match_parent"
Expand All @@ -27,15 +27,15 @@
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginBottom="2dp"
android:layout_marginTop="2dp"
android:layout_marginBottom="2dp"
android:background="#000" />

<EditText
android:id="@+id/input_url"
android:hint="You could paste publish URL here :)"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="You could paste publish URL here :)"
android:singleLine="true" />

<LinearLayout
Expand Down Expand Up @@ -64,8 +64,8 @@
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginBottom="2dp"
android:layout_marginTop="2dp"
android:layout_marginBottom="2dp"
android:background="#000" />

<LinearLayout
Expand All @@ -88,8 +88,8 @@
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginBottom="2dp"
android:layout_marginTop="2dp"
android:layout_marginBottom="2dp"
android:background="#000" />

<RadioGroup
Expand Down Expand Up @@ -119,8 +119,8 @@
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginBottom="2dp"
android:layout_marginTop="2dp"
android:layout_marginBottom="2dp"
android:background="#000" />

<LinearLayout
Expand Down Expand Up @@ -164,8 +164,8 @@
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginBottom="2dp"
android:layout_marginTop="2dp"
android:layout_marginBottom="2dp"
android:background="#000" />

<!-- Camera config panel -->
Expand All @@ -191,25 +191,43 @@
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginBottom="2dp"
android:layout_marginTop="2dp"
android:layout_marginBottom="2dp"
android:background="#000" />
</LinearLayout>
</LinearLayout>
</ScrollView>

<Button
android:layout_marginBottom="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:onClick="scanQRCode"
android:text="Scan QR Code"/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:onClick="launchStreaming"
android:text="LAUNCH" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:gravity="center_vertical"
android:orientation="horizontal">

<Button
android:id="@+id/reauth_btn"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:onClick="onClickCheckAuth"
android:text="Auth" />

<Button
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:onClick="scanQRCode"
android:text="QR Code" />

<Button
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:onClick="launchStreaming"
android:text="LAUNCH" />
</LinearLayout>

</LinearLayout>
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,29 @@ PLDroidCameraStreaming 是一个适用于 Android 的 RTMP 直播推流 SDK,
- 系统要求:Android 4.0.3(API 15) 及其以上

## 版本升级须知

### v3.0.0
- **从 v3.0.0 版本开始,七牛直播推流 SDK 需要先获取授权才能使用。授权分为试用版和正式版,可通过 400-808-9176 转 2 号线联系七牛商务咨询,或者 [通过工单](https://support.qiniu.com/?ref=developer.qiniu.com) 联系七牛的技术支持。**
- **v3.0.0 之前的版本不受影响,请继续放心使用。**
- **老客户升级 v3.0.0 版本之前,请先联系七牛获取相应授权,以免发生鉴权不通过的现象。**
- 基于 114 dns 解析的不确定性,使用该解析可能会导致解析的网络 ip 无法做到最大的优化策略,进而出现推流质量不佳的现象。因此建议使用非 114 dns 解析

### v2.4.1
- 从 v2.4.1 开始,VideoProfile 对 H264 格式配置的参数由 annexb 改为 avcc,之前设置为 false 的客户,需要将配置改为 true。

例如目前设有如下配置的客户:

```java
StreamingProfile.VideoProfile vProfile =
new StreamingProfile.VideoProfile(20, 1000 * 1024, 60, false);
```
需将参数调整为:

```java
StreamingProfile.VideoProfile vProfile =
new StreamingProfile.VideoProfile(20, 1000 * 1024, 60, true);
```

### v2.3.0
- 从 v2.3.0 版本开始,增加 libpldroid_streaming_puic.so 库
- libpldroid_streaming_core.so 依赖于 libpldroid_streaming_puic.so,无论是否启用 QUIC 推流,都需要包含 libpldroid_streaming_puic.so 库
Expand Down
43 changes: 43 additions & 0 deletions ReleaseNotes/release-notes-3.0.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# PLDroidMediaStreaming Release Notes for 3.0.0

本次更新:

## 版本

- 发布 pldroid-media-streaming-3.0.0.jar
- 更新 libpldroid_streaming_core.so

## 功能

- 新增包名鉴权功能
- 新增外部数据导入发送 SEI 的功能

## 缺陷

- 修复个别场景下推流花屏的问题
- 修复硬编场景下个别机型图片推流卡住的问题
- 修复单声道下返听失败的问题
- 修复双声道下回放时长变长的问题
- 修复双声道下混音偶现的崩溃问题
- 修复水印导致三方美颜异常的问题

## 注意事项

- **从 v3.0.0 版本开始,七牛直播推流 SDK 需要先获取授权才能使用。授权分为试用版和正式版,可通过 400-808-9176 转 2 号线联系七牛商务咨询,或者 [通过工单](https://support.qiniu.com/?ref=developer.qiniu.com) 联系七牛的技术支持。**
- **v3.0.0 之前的版本不受影响,请继续放心使用。**
- **老客户升级 v3.0.0 版本之前,请先联系七牛获取相应授权,以免发生鉴权不通过的现象。**
- 基于 114 dns 解析的不确定性,使用该解析可能会导致解析的网络 ip 无法做到最大的优化策略,进而出现推流质量不佳的现象。因此建议使用非 114 dns 解析
- 从 v2.4.1 开始,VideoProfile 对 H264 格式配置的参数由 annexb 改为 avcc,之前设置为 false 的客户,需要将配置改为 true。

例如目前设有如下配置的客户:

```java
StreamingProfile.VideoProfile vProfile =
new StreamingProfile.VideoProfile(20, 1000 * 1024, 60, false);
```
需将参数调整为:

```java
StreamingProfile.VideoProfile vProfile =
new StreamingProfile.VideoProfile(20, 1000 * 1024, 60, true);
```
Binary file modified releases/arm64-v8a/libpldroid_streaming_core.so
Binary file not shown.
Binary file modified releases/armeabi-v7a/libpldroid_streaming_core.so
Binary file not shown.
Binary file modified releases/armeabi/libpldroid_streaming_core.so
Binary file not shown.
Binary file removed releases/pldroid-media-streaming-2.4.1.jar
Binary file not shown.
Binary file added releases/pldroid-media-streaming-3.0.0.jar
Binary file not shown.
Binary file modified releases/x86/libpldroid_streaming_core.so
Binary file not shown.

0 comments on commit 47fbee9

Please sign in to comment.