-
Notifications
You must be signed in to change notification settings - Fork 209
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #128 from ksvc/v4.1.2
update to v4.1.2
- Loading branch information
Showing
7 changed files
with
3,978 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
34 changes: 34 additions & 0 deletions
34
demo/src/com/ksyun/media/streamer/demo/YUVI420BufDemoFilter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package com.ksyun.media.streamer.demo; | ||
|
||
import com.ksyun.media.streamer.filter.imgtex.ImgTexBufFilter; | ||
import com.ksyun.media.streamer.framework.ImgBufFormat; | ||
import com.ksyun.media.streamer.util.gles.GLRender; | ||
|
||
import android.util.Log; | ||
|
||
import java.nio.ByteBuffer; | ||
|
||
/** | ||
* Demo filter to handle YUV420 buffer in gpu pipe. | ||
*/ | ||
|
||
public class YUVI420BufDemoFilter extends ImgTexBufFilter { | ||
private static final String TAG = "YUVI420BufDemoFilter"; | ||
|
||
public YUVI420BufDemoFilter(GLRender glRender) { | ||
super(glRender, ImgBufFormat.FMT_I420); | ||
} | ||
|
||
@Override | ||
protected void onSizeChanged(int[] stride, int width, int height) { | ||
Log.d(TAG, "onSizeChanged " + stride[0] + " " + width + "x" + height); | ||
// do nothing. | ||
} | ||
|
||
@Override | ||
protected ByteBuffer doFilter(ByteBuffer buffer, int[] stride, int width, int height) { | ||
Log.d(TAG, "doFilter " + buffer + " " + stride[0] + " " + width + "x" + height); | ||
// handle buffer here | ||
return buffer; | ||
} | ||
} |
Oops, something went wrong.