Java 类org.webrtc.SurfaceTextureHelper 实例源码

项目:InsideCodec    文件:FrameProducer.java   
public FrameProducer(final EglBase eglBase, final File videoFile, final int fps,
        final Callback callback) {
    mVideoFile = videoFile;
    mFps = fps;
    mCallback = callback;
    mBufferInfo = new MediaCodec.BufferInfo();

    mSurfaceTextureHelper = SurfaceTextureHelper.create("SurfaceTextureHelper",
            eglBase.getEglBaseContext());
    mSurfaceTextureHelper.startListening(this);
    mHubSurface = new Surface(mSurfaceTextureHelper.getSurfaceTexture());
}
项目:DeviceConnect-Android    文件:VideoCapturerExternalResource.java   
/**
 * Constructor.
 *
 * @param uri    uri of resource
 * @param width  width
 * @param height height
 */
public VideoCapturerExternalResource(EglBase.Context sharedContext, final String uri, final int width, final int height) {
    mUri = uri;
    mWidth = width;
    mHeight = height;
    mFPS = 30;

    HandlerThread cameraThread = new HandlerThread(TAG);
    cameraThread.start();
    mCameraThreadHandler = new Handler(cameraThread.getLooper());
    mSurfaceHelper = SurfaceTextureHelper.create(sharedContext, mCameraThreadHandler);
}
项目:DeviceConnect-Android    文件:VideoCapturerExternalResource.java   
@Override
public SurfaceTextureHelper getSurfaceTextureHelper() {
    return mSurfaceHelper;
}