TIF provide me Surface and I try setup it in LibVLC based player:
Code: Select all
@Override
public boolean onSetSurface(Surface surface) {
if (mPlayer != null) {
final IVLCVout vlcVout = mPlayer.getVLCVout();
vlcVout.setVideoSurface(surface, null);
vlcVout.attachViews();
return vlcVout.areViewsAttached();
}
mSurface = surface;
return true;
}
But? I handle this Exeption:* @param videoSurface if surfaceHolder is null, this surface must be valid and attached.
* @param surfaceHolder optional, used to configure buffers geometry before Android ICS
* and to get notified when surface is destroyed.
I am not shure, but think in a metho setSurface in class AWindow:java.lang.IllegalStateException: surface is not attached and holder is null
at org.videolan.libvlc.AWindow.setSurface(AWindow.java:248)
at org.videolan.libvlc.AWindow.setVideoSurface(AWindow.java:270)
...
Code: Select all
private void setSurface(int id, Surface surface, SurfaceHolder surfaceHolder) {
...
if (!surface.isValid() || surfaceHolder == null)
throw new IllegalStateException("surface is not attached and holder is null");
...
}
Or another solution?