@MainThread private void onSurfaceCreated() { if (mSurfacesState.get() != SURFACE_STATE_ATTACHED) throw new IllegalArgumentException("invalid state"); final SurfaceHelper videoHelper = mSurfaceHelpers[ID_VIDEO]; final SurfaceHelper subtitlesHelper = mSurfaceHelpers[ID_SUBTITLES]; if (videoHelper == null) throw new NullPointerException("videoHelper shouldn't be null here"); if (videoHelper.isReady() && (subtitlesHelper == null || subtitlesHelper.isReady())) { mSurfacesState.set(SURFACE_STATE_READY); for (IVLCVout.Callback cb : mIVLCVoutCallbacks) cb.onSurfacesCreated(this); if (mSurfaceCallback != null) mSurfaceCallback.onSurfacesCreated(this); } }
@Override @MainThread public void detachViews() { if (mSurfacesState.get() == SURFACE_STATE_INIT) return; mSurfacesState.set(SURFACE_STATE_INIT); mHandler.removeCallbacksAndMessages(null); synchronized (mBuffersGeometryCond) { mBuffersGeometryCond.abort = true; mBuffersGeometryCond.notifyAll(); } for (int id = 0; id < ID_MAX; ++id) { final SurfaceHelper surfaceHelper = mSurfaceHelpers[id]; if (surfaceHelper != null) surfaceHelper.release(); mSurfaceHelpers[id] = null; } for (IVLCVout.Callback cb : mIVLCVoutCallbacks) cb.onSurfacesDestroyed(this); if (mSurfaceCallback != null) mSurfaceCallback.onSurfacesDestroyed(this); }
@Override @MainThread public void detachViews() { if (mSurfacesState.get() == SURFACE_STATE_INIT) return; mSurfacesState.set(SURFACE_STATE_INIT); mHandler.removeCallbacksAndMessages(null); synchronized (mNativeLock) { mOnNewVideoLayoutListener = null; mNativeLock.buffersGeometryAbort = true; mNativeLock.notifyAll(); } for (int id = 0; id < ID_MAX; ++id) { final SurfaceHelper surfaceHelper = mSurfaceHelpers[id]; if (surfaceHelper != null) surfaceHelper.release(); mSurfaceHelpers[id] = null; } for (IVLCVout.Callback cb : mIVLCVoutCallbacks) cb.onSurfacesDestroyed(this); if (mSurfaceCallback != null) mSurfaceCallback.onSurfacesDestroyed(this); if (AndroidUtil.isJellyBeanOrLater) mSurfaceTextureThread.release(); }
@Override @MainThread public void detachViews() { if (mSurfacesState.get() == SURFACE_STATE_INIT) return; mSurfacesState.set(SURFACE_STATE_INIT); mHandler.removeCallbacksAndMessages(null); synchronized (mNativeLock) { mOnNewVideoLayoutListener = null; mNativeLock.buffersGeometryAbort = true; mNativeLock.notifyAll(); } for (int id = 0; id < ID_MAX; ++id) { final SurfaceHelper surfaceHelper = mSurfaceHelpers[id]; if (surfaceHelper != null) surfaceHelper.release(); mSurfaceHelpers[id] = null; } for (IVLCVout.Callback cb : mIVLCVoutCallbacks) cb.onSurfacesDestroyed(this); if (mSurfaceCallback != null) mSurfaceCallback.onSurfacesDestroyed(this); if (AndroidUtil.isJellyBeanOrLater) mSurfaceTextureThread.release(); }
@Override @MainThread public void detachViews() { if (mSurfacesState.get() == SURFACE_STATE_INIT) return; mSurfacesState.set(SURFACE_STATE_INIT); mHandler.removeCallbacksAndMessages(null); synchronized (mNativeLock) { mOnNewVideoLayoutListener = null; mNativeLock.buffersGeometryAbort = true; mNativeLock.notifyAll(); } for (int id = 0; id < ID_MAX; ++id) { final SurfaceHelper surfaceHelper = mSurfaceHelpers[id]; if (surfaceHelper != null) surfaceHelper.release(); mSurfaceHelpers[id] = null; } for (IVLCVout.Callback cb : mIVLCVoutCallbacks) cb.onSurfacesDestroyed(this); if (mSurfaceCallback != null) mSurfaceCallback.onSurfacesDestroyed(this); if (AndroidUtil.isJellyBeanOrLater) mSurfaceTextureThread.release(); }
@Override @MainThread public void detachViews() { if (mSurfacesState.get() == SURFACE_STATE_INIT) return; mSurfacesState.set(SURFACE_STATE_INIT); mHandler.removeCallbacksAndMessages(null); synchronized (mBuffersGeometryCond) { mBuffersGeometryCond.abort = true; mBuffersGeometryCond.notifyAll(); } for (int id = 0; id < ID_MAX; ++id) { final SurfaceHelper surfaceHelper = mSurfaceHelpers[id]; if (surfaceHelper != null) surfaceHelper.release(); mSurfaceHelpers[id] = null; } for (Callback cb : mIVLCVoutCallbacks) cb.onSurfacesDestroyed(this); if (mSurfaceCallback != null) mSurfaceCallback.onSurfacesDestroyed(this); }
@MainThread private void onSurfaceCreated() { if (mSurfacesState.get() != SURFACE_STATE_ATTACHED) throw new IllegalArgumentException("invalid state"); final SurfaceHelper videoHelper = mSurfaceHelpers[ID_VIDEO]; final SurfaceHelper subtitlesHelper = mSurfaceHelpers[ID_SUBTITLES]; if (videoHelper == null) throw new NullPointerException("videoHelper shouldn't be null here"); if (videoHelper.isReady() && (subtitlesHelper == null || subtitlesHelper.isReady())) { mSurfacesState.set(SURFACE_STATE_READY); for (Callback cb : mIVLCVoutCallbacks) cb.onSurfacesCreated(this); if (mSurfaceCallback != null) mSurfaceCallback.onSurfacesCreated(this); } }
@MainThread private void onSurfaceCreated() { if (mSurfacesState.get() != SURFACE_STATE_ATTACHED) throw new IllegalArgumentException("invalid state"); final SurfaceHelper videoHelper = mSurfaceHelpers[ID_VIDEO]; final SurfaceHelper subtitlesHelper = mSurfaceHelpers[ID_SUBTITLES]; if (videoHelper == null) throw new NullPointerException("videoHelper shouldn't be null here"); if (videoHelper.isReady() && (subtitlesHelper == null || subtitlesHelper.isReady())) { mSurfacesState.set(SURFACE_STATE_READY); for (IVLCVout.Callback cb : mIVLCVoutCallbacks) cb.onSurfacesCreated(this); if (mSurfaceCallback != null) mSurfaceCallback.onSurfacesCreated(this); } }
@MainThread private void onSurfaceCreated() { if (mSurfacesState.get() != SURFACE_STATE_ATTACHED) throw new IllegalArgumentException("invalid state"); final SurfaceHelper videoHelper = mSurfaceHelpers[ID_VIDEO]; final SurfaceHelper subtitlesHelper = mSurfaceHelpers[ID_SUBTITLES]; if (videoHelper == null) throw new NullPointerException("videoHelper shouldn't be null here"); if (videoHelper.isReady() && (subtitlesHelper == null || subtitlesHelper.isReady())) { mSurfacesState.set(SURFACE_STATE_READY); for (IVLCVout.Callback cb : mIVLCVoutCallbacks) cb.onSurfacesCreated(this); if (mSurfaceCallback != null) mSurfaceCallback.onSurfacesCreated(this); } }
@MainThread private void onSurfaceCreated() { if (mSurfacesState.get() != SURFACE_STATE_ATTACHED) throw new IllegalArgumentException("invalid state"); final SurfaceHelper videoHelper = mSurfaceHelpers[ID_VIDEO]; final SurfaceHelper subtitlesHelper = mSurfaceHelpers[ID_SUBTITLES]; if (videoHelper == null) throw new NullPointerException("videoHelper shouldn't be null here"); if (videoHelper.isReady() && (subtitlesHelper == null || subtitlesHelper.isReady())) { mSurfacesState.set(SURFACE_STATE_READY); for (IVLCVout.Callback cb : mIVLCVoutCallbacks) cb.onSurfacesCreated(this); if (mSurfaceCallback != null) mSurfaceCallback.onSurfacesCreated(this); } }