Comments (7)
Could you show your code as an example?
from androidinstantvideo.
And is requestRender called?
from androidinstantvideo.
Here is the link https://github.com/inventionsbyhamid/AndroidInstantVideo/tree/screen_display
I have created a separate activity "ScreenPublisherActivity" to just draw the screen preview. Not able to figure out why nothing gets drawn on the texture view.
from androidinstantvideo.
I check and the onFrameAvailable is not called, I am wondering why
from androidinstantvideo.
It seems that the surface in ImageReader works fine. Need to look into the source code of it.
from androidinstantvideo.
I try to use
surfaceTexture.setDefaultBufferSize(width, height);
And it works.
Add this line before set onFrameAvailable listener:
displayTextureView.setSurfaceTextureCreatedListener(new GLMultiTexProducerView.SurfaceTextureCreatedListener() {
@Override
public void onCreated(List<GLTexture> producedTextureList) {
GLTexture texture = producedTextureList.get(0);
surfaceTexture = texture.getSurfaceTexture();
RawTexture outsideTexture = texture.getRawTexture();
width = outsideTexture.getWidth();
height = outsideTexture.getHeight();
surfaceTexture.setDefaultBufferSize(width, height);
surfaceTexture.setOnFrameAvailableListener(new SurfaceTexture.OnFrameAvailableListener() {
@Override
public void onFrameAvailable(SurfaceTexture surfaceTexture) {
Log.i(TAG, "onFrameAvailable");
displayTextureView.requestRender();
}
}, mHandler);
mSurface = new Surface(surfaceTexture);
if(mVirtualDisplay != null) {
mVirtualDisplay.setSurface(mSurface);
}
}
});
from androidinstantvideo.
It works fine. Thanks for the help!
from androidinstantvideo.
Related Issues (20)
- 如何获取预览图像保存到bitmap HOT 3
- 如何实现预览的分辨率和录像的分辨率不同 HOT 2
- test_mp4_encode.mp4 doesn't contain White text label HOT 3
- TestCameraAndVideoActivity - does it record in video file? HOT 1
- 请问是否可以加入预录的功能 HOT 1
- TestCameraAndVideoActivity录制的h264格式视频没有声音 HOT 2
- Camera records video quite bad (drops frames), video isn't smooth HOT 7
- streamPublisher 为null的问题 HOT 1
- 第二次录制mp4muxer出现黑屏问题。 HOT 2
- Stream RTMP Problem HOT 2
- 有考慮將相機API升級至 camera2嗎 HOT 1
- 请教一下怎么加Text 文字水印? HOT 1
- 请问No buffer available 无可用缓冲区怎么解决?
- 图片转视频 HOT 1
- 请问硬编码的性能 HOT 1
- 视频添加图层 HOT 15
- 视频预览方向不对 HOT 5
- 添加时间水印? HOT 2
- How to draw list of videos over camera preview and record simultaneously? HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from androidinstantvideo.