Skip to content

Commit

Permalink
Merge pull request #173 from ksvc/v4.2.2-7573
Browse files Browse the repository at this point in the history
update to v4.2.2-7573
  • Loading branch information
chriszeng87 authored May 15, 2017
2 parents b69bb6c + 98674f8 commit ae4393b
Show file tree
Hide file tree
Showing 57 changed files with 2,670 additions and 449 deletions.
Binary file modified demo/libs/arm64-v8a/libksylive.so
Binary file not shown.
Binary file modified demo/libs/armeabi-v7a/libksylive.so
Binary file not shown.
Binary file modified demo/libs/armeabi/libksylive.so
Binary file not shown.
Binary file modified demo/libs/ksylive.jar
Binary file not shown.
Binary file modified demo/libs/libksyplayer.jar
Binary file not shown.
Binary file modified demo/libs/x86/libksylive.so
Binary file not shown.
9 changes: 0 additions & 9 deletions demo/src/com/ksyun/media/streamer/demo/CameraActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ public class CameraActivity extends Activity implements
private boolean mRecording = false;
private boolean mIsFileRecording = false;
private boolean mIsFlashOpened = false;
private boolean mSwitchOrQuit = false;
private String mUrl;
private String mDebugInfo = "";
private String mBgmPath = "/sdcard/test.mp3";
Expand Down Expand Up @@ -524,12 +523,6 @@ public void onPause() {
mOrientationEventListener.disable();
}
mStreamer.onPause();
if (!mSwitchOrQuit) {
// setOffscreenPreview to enable camera capture in background
mStreamer.setOffscreenPreview(mStreamer.getPreviewWidth(),
mStreamer.getPreviewHeight());
}
mSwitchOrQuit = false;

// disable audio low delay in background
if (mAudioLDCheckBox.isChecked()) {
Expand Down Expand Up @@ -888,7 +881,6 @@ private void onAddClick() {
Intent intent = new Intent(getApplicationContext(), FloatViewActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
KSYGlobalStreamer.setInstance(mStreamer);
mSwitchOrQuit = true;
startActivity(intent);
}

Expand All @@ -906,7 +898,6 @@ public void onClick(DialogInterface arg0, int arg1) {
@Override
public void onClick(DialogInterface arg0, int arg1) {
mChronometer.stop();
mSwitchOrQuit = true;
CameraActivity.this.finish();
}
}).show();
Expand Down
35 changes: 20 additions & 15 deletions demo/src/com/ksyun/media/streamer/demo/FloatViewActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.goods_activity);
mObserverButton = new ButtonObserver();
initSurfaceWindow();
addSurfaceWindow();
mLastRotation = getDisplayRotation();
mFloatBack = (ImageView) findViewById(R.id.float_back);
mFloatBack.setOnClickListener(mObserverButton);

mOrientationEventListener = new OrientationEventListener(this,
SensorManager.SENSOR_DELAY_NORMAL) {
Expand All @@ -82,28 +82,20 @@ public void onOrientationChanged(int orientation) {
if (mOrientationEventListener.canDetectOrientation()) {
mOrientationEventListener.enable();
}

addFloatViewWithPermCheck();
}

@Override
protected void onResume() {
Log.d(TAG, "onResume");
super.onResume();
//KSYGlobalStreamer.getInstance().onResume();
//6.0 需要检查overlay权限
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
if (!Settings.canDrawOverlays(this)) {
Intent intent = new Intent(Settings.ACTION_MANAGE_OVERLAY_PERMISSION,
Uri.parse("package:" + getPackageName()));
startActivityForResult(intent, OVERLAY_PERMISSION_RESULT_CODE);
}
}
}

@Override
protected void onPause() {
Log.d(TAG, "onPause");
super.onPause();
//KSYGlobalStreamer.getInstance().onPause();
}

@Override
Expand Down Expand Up @@ -131,6 +123,7 @@ public boolean onKeyDown(int keyCode, KeyEvent event) {

private void onBackoffClick() {
KSYGlobalStreamer.getInstance().onPause();
KSYGlobalStreamer.getInstance().setDisplayPreview((GLSurfaceView) null);
FloatViewActivity.this.finish();
}

Expand Down Expand Up @@ -201,9 +194,6 @@ public void onClick(View v) {
}
});

mFloatBack = (ImageView) findViewById(R.id.float_back);
mFloatBack.setOnClickListener(mObserverButton);

mCameraView = new GLSurfaceView(this);
KSYGlobalStreamer.getInstance().setDisplayPreview(mCameraView);
RelativeLayout.LayoutParams previewLayoutParams =
Expand Down Expand Up @@ -276,6 +266,18 @@ private int getDisplayRotation() {
return 0;
}

private void addFloatViewWithPermCheck() {
// 6.0 需要检查overlay权限
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && !Settings.canDrawOverlays(this)) {
Intent intent = new Intent(Settings.ACTION_MANAGE_OVERLAY_PERMISSION,
Uri.parse("package:" + getPackageName()));
startActivityForResult(intent, OVERLAY_PERMISSION_RESULT_CODE);
} else {
initSurfaceWindow();
addSurfaceWindow();
}
}

/**
* 申请overlay权限窗口返回
*
Expand All @@ -291,6 +293,9 @@ protected void onActivityResult(int requestCode, int resultCode, Intent data) {
// SYSTEM_ALERT_WINDOW permission not granted...
Toast.makeText(FloatViewActivity.this, "SYSTEM_ALERT_WINDOW not granted",
Toast.LENGTH_SHORT).show();
} else {
initSurfaceWindow();
addSurfaceWindow();
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion docs/assets/navtree_data.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 10 additions & 4 deletions docs/reference/classes.html
Original file line number Diff line number Diff line change
Expand Up @@ -703,25 +703,31 @@ <h2 id="letter_I">I</h2>


<tr class=" api apilevel-" >
<td class="jd-linkcol"><a href="./com/ksyun/media/streamer/filter/imgtex/ImgTexPreview.html">ImgTexPreview</a></td>
<td class="jd-descrcol" width="100%">Texture frame previewer.&nbsp;</td>
</tr>


<tr class="alt-color api apilevel-" >
<td class="jd-linkcol"><a href="./com/ksyun/media/streamer/filter/imgtex/ImgTexScaleFilter.html">ImgTexScaleFilter</a></td>
<td class="jd-descrcol" width="100%">Gpu image filter to rotate/crop/scale video frame,
and covert image format to RGBA if needed.&nbsp;</td>
</tr>


<tr class="alt-color api apilevel-" >
<tr class=" api apilevel-" >
<td class="jd-linkcol"><a href="./com/ksyun/media/streamer/capture/ImgTexSrcPin.html">ImgTexSrcPin</a></td>
<td class="jd-descrcol" width="100%">Convert bitmap image to ImgTexFrame.&nbsp;</td>
</tr>


<tr class=" api apilevel-" >
<tr class="alt-color api apilevel-" >
<td class="jd-linkcol"><a href="./com/ksyun/media/streamer/encoder/ImgTexToBuf.html">ImgTexToBuf</a></td>
<td class="jd-descrcol" width="100%">Get I420/RGBA buffer from texture.&nbsp;</td>
</tr>


<tr class="alt-color api apilevel-" >
<tr class=" api apilevel-" >
<td class="jd-linkcol"><a href="./com/ksyun/media/streamer/encoder/ImgTexToBuf.ErrorListener.html">ImgTexToBuf.ErrorListener</a></td>
<td class="jd-descrcol" width="100%">&nbsp;</td>
</tr>
Expand Down Expand Up @@ -835,7 +841,7 @@ <h2 id="letter_P">P</h2>

<tr class=" api apilevel-" >
<td class="jd-linkcol"><a href="./com/ksyun/media/streamer/publisher/PublisherMgt.html">PublisherMgt</a></td>
<td class="jd-descrcol" width="100%">Created by sujia on 2016/11/23.&nbsp;</td>
<td class="jd-descrcol" width="100%">Publisher management.&nbsp;</td>
</tr>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1103,7 +1103,7 @@ <h2>Summary</h2>



ByteBuffer
<a href="../../../../../com/ksyun/media/streamer/framework/AVBufFrame.html">AVBufFrame</a>
</td>
<td class="jd-linkcol" width="100%">
<span class="sympad"><a href="../../../../../com/ksyun/media/streamer/encoder/Encoder.html#getExtra()">getExtra</a></span>()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1133,7 +1133,7 @@ <h2>Summary</h2>



ByteBuffer
<a href="../../../../../com/ksyun/media/streamer/framework/AVBufFrame.html">AVBufFrame</a>
</td>
<td class="jd-linkcol" width="100%">
<span class="sympad"><a href="../../../../../com/ksyun/media/streamer/encoder/Encoder.html#getExtra()">getExtra</a></span>()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1101,7 +1101,7 @@ <h2>Summary</h2>



ByteBuffer
<a href="../../../../../com/ksyun/media/streamer/framework/AVBufFrame.html">AVBufFrame</a>
</td>
<td class="jd-linkcol" width="100%">
<span class="sympad"><a href="../../../../../com/ksyun/media/streamer/encoder/Encoder.html#getExtra()">getExtra</a></span>()
Expand Down
4 changes: 2 additions & 2 deletions docs/reference/com/ksyun/media/streamer/encoder/Encoder.html
Original file line number Diff line number Diff line change
Expand Up @@ -865,7 +865,7 @@ <h2>Summary</h2>



ByteBuffer
<a href="../../../../../com/ksyun/media/streamer/framework/AVBufFrame.html">AVBufFrame</a>
</td>
<td class="jd-linkcol" width="100%">
<span class="sympad"><a href="../../../../../com/ksyun/media/streamer/encoder/Encoder.html#getExtra()">getExtra</a></span>()
Expand Down Expand Up @@ -2549,7 +2549,7 @@ <h4 class="jd-details-title">



ByteBuffer
<a href="../../../../../com/ksyun/media/streamer/framework/AVBufFrame.html">AVBufFrame</a>
</span>
<span class="sympad">getExtra</span>
<span class="normal">()</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1279,7 +1279,7 @@ <h2>Summary</h2>



ByteBuffer
<a href="../../../../../com/ksyun/media/streamer/framework/AVBufFrame.html">AVBufFrame</a>
</td>
<td class="jd-linkcol" width="100%">
<span class="sympad"><a href="../../../../../com/ksyun/media/streamer/encoder/Encoder.html#getExtra()">getExtra</a></span>()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1165,7 +1165,7 @@ <h2>Summary</h2>



ByteBuffer
<a href="../../../../../com/ksyun/media/streamer/framework/AVBufFrame.html">AVBufFrame</a>
</td>
<td class="jd-linkcol" width="100%">
<span class="sympad"><a href="../../../../../com/ksyun/media/streamer/encoder/Encoder.html#getExtra()">getExtra</a></span>()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1339,7 +1339,7 @@ <h2>Summary</h2>



ByteBuffer
<a href="../../../../../com/ksyun/media/streamer/framework/AVBufFrame.html">AVBufFrame</a>
</td>
<td class="jd-linkcol" width="100%">
<span class="sympad"><a href="../../../../../com/ksyun/media/streamer/encoder/Encoder.html#getExtra()">getExtra</a></span>()
Expand Down
Loading

0 comments on commit ae4393b

Please sign in to comment.