Skip to content

Commit

Permalink
release v1.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jpxiong committed Jun 29, 2016
1 parent 3d98697 commit acd6c9e
Show file tree
Hide file tree
Showing 35 changed files with 132 additions and 8 deletions.
6 changes: 3 additions & 3 deletions PLDroidCameraStreamingDemo/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ android {
applicationId "com.pili.pldroid.streaming.camera.demo"
minSdkVersion 15
targetSdkVersion 22
versionCode 1
versionName "1.0"
versionCode 13
versionName "1.7.0-7"
}
buildTypes {
release {
Expand All @@ -23,5 +23,5 @@ dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.qiniu:happy-dns:0.2.7'
compile 'com.android.support:appcompat-v7:22.0.0'
compile files('libs/pldroid-camera-streaming-1.6.2.jar')
compile files('libs/pldroid-camera-streaming-1.7.0.jar')
}
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
TextView mVersionInfoTextView = (TextView) findViewById(R.id.version_info);
mVersionInfoTextView.setText("v1.6.2");
mVersionInfoTextView.setText("v1.7.0");

Button mHWCodecCameraStreamingBtn = (Button) findViewById(R.id.hw_codec_camera_streaming_btn);
if (!isSupportHWEncode()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import android.view.Window;
import android.view.WindowManager;
import android.widget.Button;
import android.widget.SeekBar;
import android.widget.TextView;
import android.widget.Toast;

Expand Down Expand Up @@ -72,6 +73,7 @@ public class StreamingBaseActivity extends Activity implements
private Button mCameraSwitchBtn;
private Button mCaptureFrameBtn;
private Button mEncodingOrientationSwitcherBtn;
private Button mFaceBeautyBtn;
private RotateLayout mRotateLayout;

protected TextView mSatusTextView;
Expand All @@ -81,12 +83,14 @@ public class StreamingBaseActivity extends Activity implements
protected boolean mShutterButtonPressed = false;
private boolean mIsTorchOn = false;
private boolean mIsNeedMute = false;
private boolean mIsNeedFB = false;
private boolean isEncOrientationPort = true;

protected static final int MSG_START_STREAMING = 0;
protected static final int MSG_STOP_STREAMING = 1;
private static final int MSG_SET_ZOOM = 2;
private static final int MSG_MUTE = 3;
private static final int MSG_FB = 4;

protected String mStatusMsgContent;

Expand All @@ -99,6 +103,7 @@ public class StreamingBaseActivity extends Activity implements
protected MicrophoneStreamingSetting mMicrophoneStreamingSetting;
protected StreamingProfile mProfile;
protected JSONObject mJSONObject;
private boolean mIsNeedSpeedCheck = true;
private boolean mOrientationChanged = false;

protected boolean mIsReady = false;
Expand Down Expand Up @@ -150,6 +155,13 @@ public void run() {
mCameraStreamingManager.mute(mIsNeedMute);
updateMuteButtonText();
break;
case MSG_FB:
mIsNeedFB = !mIsNeedFB;
mCameraStreamingManager.setVideoFilterType(mIsNeedFB ?
CameraStreamingSetting.VIDEO_FILTER_TYPE.VIDEO_FILTER_BEAUTY
: CameraStreamingSetting.VIDEO_FILTER_TYPE.VIDEO_FILTER_NONE);
updateFBButtonText();
break;
default:
Log.e(TAG, "Invalid message");
break;
Expand Down Expand Up @@ -222,10 +234,14 @@ protected void onCreate(Bundle savedInstanceState) {
mCameraStreamingSetting.setCameraId(Camera.CameraInfo.CAMERA_FACING_BACK)
.setContinuousFocusModeEnabled(true)
.setRecordingHint(false)
.setBuiltInFaceBeautyEnabled(true)
.setResetTouchFocusDelayInMs(3000)
// .setFocusMode(CameraStreamingSetting.FOCUS_MODE_CONTINUOUS_PICTURE)
.setCameraPrvSizeLevel(CameraStreamingSetting.PREVIEW_SIZE_LEVEL.SMALL)
.setCameraPrvSizeRatio(CameraStreamingSetting.PREVIEW_SIZE_RATIO.RATIO_16_9);
.setCameraPrvSizeRatio(CameraStreamingSetting.PREVIEW_SIZE_RATIO.RATIO_16_9)
.setFaceBeautySetting(new CameraStreamingSetting.FaceBeautySetting(1.0f, 1.0f, 0.8f))
.setVideoFilter(CameraStreamingSetting.VIDEO_FILTER_TYPE.VIDEO_FILTER_BEAUTY);
mIsNeedFB = true;
mMicrophoneStreamingSetting = new MicrophoneStreamingSetting();
mMicrophoneStreamingSetting.setBluetoothSCOEnabled(false);

Expand Down Expand Up @@ -443,11 +459,14 @@ private class Screenshooter implements Runnable {
@Override
public void run() {
final String fileName = "PLStreaming_" + System.currentTimeMillis() + ".jpg";
mCameraStreamingManager.captureFrame(0, 0, new FrameCapturedCallback() {
mCameraStreamingManager.captureFrame(100, 100, new FrameCapturedCallback() {
private Bitmap bitmap;

@Override
public void onFrameCaptured(Bitmap bmp) {
if (bmp == null) {
return;
}
bitmap = bmp;
new Thread(new Runnable() {
@Override
Expand Down Expand Up @@ -594,11 +613,21 @@ private void initUIs() {
mTorchBtn = (Button) findViewById(R.id.torch_btn);
mCameraSwitchBtn = (Button) findViewById(R.id.camera_switch_btn);
mCaptureFrameBtn = (Button) findViewById(R.id.capture_btn);
mFaceBeautyBtn = (Button) findViewById(R.id.fb_btn);
mSatusTextView = (TextView) findViewById(R.id.streamingStatus);

mLogTextView = (TextView) findViewById(R.id.log_info);
mStreamStatus = (TextView) findViewById(R.id.stream_status);

mFaceBeautyBtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (!mHandler.hasMessages(MSG_FB)) {
mHandler.sendEmptyMessage(MSG_FB);
}
}
});

mMuteButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Expand Down Expand Up @@ -663,12 +692,36 @@ public void onClick(View v) {
mHandler.post(mEncodingOrientationSwitcher);
}
});

SeekBar seekBarBeauty = (SeekBar) findViewById(R.id.beautyLevel_seekBar);
seekBarBeauty.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
@Override
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
CameraStreamingSetting.FaceBeautySetting fbSetting = mCameraStreamingSetting.getFaceBeautySetting();
fbSetting.beautyLevel = progress / 100.0f;
fbSetting.whiten = progress / 100.0f;
fbSetting.redden = progress / 100.0f;

mCameraStreamingManager.updateFaceBeautySetting(fbSetting);
}

@Override
public void onStartTrackingTouch(SeekBar seekBar) {
}

@Override
public void onStopTrackingTouch(SeekBar seekBar) {
}
});

initButtonText();
}

private void initButtonText() {
updateFBButtonText();
updateCameraSwitcherButtonText(mCameraStreamingSetting.getReqCameraId());
mCaptureFrameBtn.setText("Capture");
updateFBButtonText();
updateMuteButtonText();
updateOrientationBtnText();
}
Expand All @@ -689,6 +742,12 @@ protected void setFocusAreaIndicator() {
}
}

private void updateFBButtonText() {
if (mFaceBeautyBtn != null) {
mFaceBeautyBtn.setText(mIsNeedFB ? "FB Off" : "FB On");
}
}

private void updateMuteButtonText() {
if (mMuteButton != null) {
mMuteButton.setText(mIsNeedMute ? "Unmute" : "Mute");
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,25 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content" />

<Button
android:id="@+id/fb_btn"
android:contentDescription="@string/cd_btn_fb"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:layout_marginTop="150dp"
android:layout_below="@id/torch_btn"
android:layout_marginLeft="@dimen/pldroid_streaming_item_padding"
android:textColor="@color/pldroid_streaming_white"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<SeekBar
android:id="@+id/beautyLevel_seekBar"
android:layout_alignParentBottom="true"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="100dp"
android:max="100"
android:progress="100"/>
<include layout="@layout/status" />
<include layout="@layout/camera_button_holder" />
</RelativeLayout>
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
<string name="cd_btn_capture">cd_btn_capture</string>
<string name="cd_btn_orientation">cd_btn_orientation</string>
<string name="cd_btn_mute">cd_btn_mute</string>
<string name="cd_btn_fb">cd_btn_fb</string>
<string name="cd_tv_streaming_state_hint">cd_tv_streaming_state_hint</string>
<string name="cd_shutter_button">cd_shutter_button</string>
</resources>
19 changes: 17 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ PLDroidCameraStreaming 是一个适用于 Android 的 RTMP 直播推流 SDK,
- [x] 支持构造带安全授权凭证的 RTMP 推流地址
- [x] 支持 RTMP 封包及推流
- [x] 支持 RTMP 推流自适应网络质量动态切换码率或自定义策略
- [x] 支持内置美颜,以及可动态调节美颜效果
- [x] 支持数据源回调接口,可自定义 Filter (滤镜) 特效处理
- [x] 支持前后置摄像头,以及动态切换
- [x] 支持自动对焦
Expand Down Expand Up @@ -813,6 +814,19 @@ mCameraStreamingManager.setNativeLoggingEnabled(false);

### 推流 SDK

* 1.7.0 ([Release Notes][32])
- 新增内置美颜功能,美颜效果可调节
- 新增采集帧率控制,避免帧率飙升不可控
- 修复特殊步骤下 Contex 泄露问题
- 修复硬编水印在特殊机型上(Meilan note 2)异常显示
- 优化采集,避免过度 UI 操作导致推流帧率降低
- 优化内存使用
- 发布 pldroid-camera-streaming-1.7.0.jar
- 更新 libpldroid_mmprocessing.so
- 更新 libpldroid_streaming_core.so
- 更新 libpldroid_streaming_h264_encoder.so
- 更新 Demo

* 1.6.2 ([Release Notes][31])
- 发布 pldroid-camera-streaming-1.6.2.jar
- 修复特殊情况下导致的 crash 问题
Expand All @@ -821,7 +835,7 @@ mCameraStreamingManager.setNativeLoggingEnabled(false);
* 1.6.1 ([Release Notes][30])
- 发布 pldroid-camera-streaming-1.6.1.jar
- 新增 libpldroid_mmprocessing.so
- 更新 libpldroid_streaming_core.so 和 libpldroid_streaming_h264_encoder.so
- 更新 libpldroid_streaming_core.so 和 libpldroid_streaming_h264_encoder.so
- 增加水印支持
- 优化软编 codec,提升画质和码控能力
- 兼容特殊的直播设备
Expand All @@ -833,7 +847,7 @@ mCameraStreamingManager.setNativeLoggingEnabled(false);

* 1.6.0 ([Release Notes][29])
- 发布 pldroid-camera-streaming-1.6.0.jar
- 更新 libpldroid_streaming_core.so 和 libpldroid_streaming_h264_encoder.so
- 更新 libpldroid_streaming_core.so 和 libpldroid_streaming_h264_encoder.so
- 新增 mirror 支持
- 新增 `StreamingEnv`
- 修复特殊机型硬编闪屏问题
Expand Down Expand Up @@ -1111,3 +1125,4 @@ mCameraStreamingManager.setNativeLoggingEnabled(false);
[29]: /ReleaseNotes/release-notes-1.6.0.md
[30]: /ReleaseNotes/release-notes-1.6.1.md
[31]: /ReleaseNotes/release-notes-1.6.2.md
[32]: /ReleaseNotes/release-notes-1.7.0.md
30 changes: 30 additions & 0 deletions ReleaseNotes/release-notes-1.7.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# PLDroidCameraStreaming Release Notes for 1.7.0

## 简介
PLDroidCameraStreaming 是为 Android 开发者提供的 RTMP 直播推流 SDK

## 记录

### 推流 SDK
#### 功能
- 新增内置美颜功能,美颜效果可调节
- `CameraStreamingSetting#setBuiltInFaceBeautyEnabled(boolean)`
- `CameraStreamingSetting.FaceBeautySetting`
- `CameraStreamingManager.updateFaceBeautySetting(CameraStreamingSetting.FaceBeautySetting)`
- 新增采集帧率控制,避免帧率飙升不可控
- `StreamignProfile#setFpsControllerEnable(boolean)`

#### 缺陷
- 修复特殊步骤下 Contex 泄露问题
- 修复硬编水印在特殊机型上(Meilan note 2)异常显示

#### 优化
- 优化采集,避免过度 UI 操作导致推流帧率降低
- 优化内存使用

#### 版本
- 发布 pldroid-camera-streaming-1.7.0.jar
- 更新 libpldroid_mmprocessing.so
- 更新 libpldroid_streaming_core.so
- 更新 libpldroid_streaming_h264_encoder.so
- 更新 Demo
Binary file modified releases/arm64-v8a/libpldroid_mmprocessing.so
Binary file not shown.
Binary file modified releases/arm64-v8a/libpldroid_streaming_core.so
Binary file not shown.
Binary file modified releases/arm64-v8a/libpldroid_streaming_h264_encoder.so
Binary file not shown.
Binary file modified releases/armeabi-v7a/libpldroid_mmprocessing.so
Binary file not shown.
Binary file modified releases/armeabi-v7a/libpldroid_streaming_core.so
Binary file not shown.
Binary file modified releases/armeabi-v7a/libpldroid_streaming_h264_encoder.so
Binary file not shown.
Binary file modified releases/armeabi/libpldroid_mmprocessing.so
Binary file not shown.
Binary file modified releases/armeabi/libpldroid_streaming_core.so
Binary file not shown.
Binary file modified releases/armeabi/libpldroid_streaming_h264_encoder.so
Binary file not shown.
Binary file removed releases/pldroid-camera-streaming-1.6.2.jar
Binary file not shown.
Binary file added releases/pldroid-camera-streaming-1.7.0.jar
Binary file not shown.
Binary file modified releases/x86/libpldroid_mmprocessing.so
Binary file not shown.
Binary file modified releases/x86/libpldroid_streaming_core.so
Binary file not shown.
Binary file modified releases/x86/libpldroid_streaming_h264_encoder.so
Binary file not shown.

0 comments on commit acd6c9e

Please sign in to comment.