Skip to content

Commit

Permalink
Merge pull request #269 from Johnny1994/dev
Browse files Browse the repository at this point in the history
update sdk 2.2.5
  • Loading branch information
Jhuster authored Dec 5, 2017
2 parents cc431e2 + 86664bf commit 6149c3e
Show file tree
Hide file tree
Showing 18 changed files with 61 additions and 3 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 15
targetSdkVersion 23
versionCode 64
versionName "2.2.4"
versionCode 65
versionName "2.2.5"
}
buildTypes {
release {
Expand All @@ -25,7 +25,7 @@ dependencies {
compile 'com.journeyapps:zxing-android-embedded:3.0.2@aar'
compile 'com.google.zxing:core:3.2.0'
compile 'com.android.support:appcompat-v7:23.0.0'
compile files('libs/pldroid-media-streaming-2.2.4.jar')
compile files('libs/pldroid-media-streaming-2.2.5.jar')
debugCompile 'com.squareup.leakcanary:leakcanary-android:1.4-beta2'
releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.4-beta2'
testCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.4-beta2'
Expand Down
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,11 @@ public Camera.Size onPreviewSizeSelected(List<Camera.Size> list) {
return null;
}

@Override
public int onPreviewFpsSelected(List<int[]> list) {
return -1;
}

protected void setShutterButtonEnabled(final boolean enable) {
runOnUiThread(new Runnable() {
@Override
Expand Down Expand Up @@ -336,6 +341,7 @@ private void initEncodingProfile() {
mProfile.setEncoderRCMode(mEncodingConfig.mVideoRateControlQuality ? StreamingProfile.EncoderRCModes.QUALITY_PRIORITY : StreamingProfile.EncoderRCModes.BITRATE_PRIORITY);
mProfile.setBitrateAdjustMode(mEncodingConfig.mBitrateAdjustMode);
mProfile.setFpsControllerEnable(mEncodingConfig.mVideoFPSControl);
mProfile.setYuvFilterMode(mEncodingConfig.mYuvFilterMode);
if (mEncodingConfig.mBitrateAdjustMode == StreamingProfile.BitrateAdjustMode.Auto) {
mProfile.setVideoAdaptiveBitrateRange(mEncodingConfig.mAdaptiveBitrateMin * 1024, mEncodingConfig.mAdaptiveBitrateMax * 1024);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,13 @@ public class EncodingConfigFragment extends ConfigFragment {
WatermarkSetting.WATERMARK_LOCATION.SOUTH_WEST
};

private static final String[] YUV_FILTER_MODE = {
"NONE",
"Linear",
"Bilinear",
"Box",
};

private String mWatermarkFilePath;
private String mPictureFilePath;

Expand Down Expand Up @@ -199,6 +206,10 @@ private EncodingConfig buildEncodingConfig() {

encodingConfig.mVideoFPSControl = ((CheckBox) root.findViewById(R.id.fps_control)).isChecked();

// YUV filter mode
Spinner yuvFilterModeSpinner = (Spinner) root.findViewById(R.id.yuv_filter_mode_set);
encodingConfig.mYuvFilterMode = StreamingProfile.YuvFilterMode.values()[yuvFilterModeSpinner.getSelectedItemPosition()];

// watermark
CheckBox cbWatermarkControl = (CheckBox) getView().findViewById(R.id.watermark_control);
encodingConfig.mIsWatermarkEnabled = cbWatermarkControl.isChecked();
Expand Down Expand Up @@ -360,6 +371,13 @@ public void onCheckedChanged(RadioGroup group, @IdRes int checkedId) {
});
}

private void initYuvFilterModePanel(final View root) {
final Spinner yuvFilterModeSpinner = (Spinner) root.findViewById(R.id.yuv_filter_mode_set);
ArrayAdapter<String> data = new ArrayAdapter<>(getContext(), android.R.layout.simple_spinner_item, YUV_FILTER_MODE);
yuvFilterModeSpinner.setAdapter(data);
yuvFilterModeSpinner.setSelection(1);
}

@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
Expand All @@ -370,6 +388,7 @@ public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container,
initWatermarkPanel(root);
initPicturePanel(root);
initBitrateCtrlPanel(root);
initYuvFilterModePanel(root);
return root;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,6 @@ public class EncodingConfig implements Serializable {
public int mAudioQualityPreset;
public int mAudioQualityCustomSampleRate;
public int mAudioQualityCustomBitrate;

public StreamingProfile.YuvFilterMode mYuvFilterMode;
}
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 @@ -36,6 +36,24 @@
android:text="HW-YUV" />
</RadioGroup>

<LinearLayout
android:id="@+id/yuv_filter_mode_panel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="YUV filter mode:" />

<Spinner
android:id="@+id/yuv_filter_mode_set"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />

</LinearLayout>

<LinearLayout
android:id="@+id/video_config_panel"
android:layout_width="match_parent"
Expand Down
13 changes: 13 additions & 0 deletions ReleaseNotes/release-notes-2.2.5.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# PLDroidMediaStreaming Release Notes for 2.2.5

本次更新:

## 版本

- 发布 pldroid-media-streaming-2.2.5.jar
- 更新 libpldroid_mmprocessing.so

## 功能

- 新增 YUV resize 算法配置接口
- 新增 Camera 预览帧率设置回调接口
Binary file modified releases/arm64-v8a/libpldroid_mmprocessing.so
Binary file not shown.
Binary file modified releases/armeabi-v7a/libpldroid_mmprocessing.so
Binary file not shown.
Binary file modified releases/armeabi/libpldroid_mmprocessing.so
Binary file not shown.
Binary file removed releases/pldroid-media-streaming-2.2.4.jar
Binary file not shown.
Binary file added releases/pldroid-media-streaming-2.2.5.jar
Binary file not shown.
Binary file modified releases/x86/libpldroid_mmprocessing.so
Binary file not shown.

0 comments on commit 6149c3e

Please sign in to comment.