I use SurfaceView to play videos. I use the Samsung Galaxy Tab for testing. I set the size:
LinearLayout.LayoutParams videoViewParams = new LinearLayout.LayoutParams(m_mainView.getPictureWidth(), m_mainView.getPictureHeight()); mPreview = (SurfaceView) videoView.findViewById(R.id.surface); mPreview.setLayoutParams(videoViewParams);
When mainView.getPictureWidth () or mainView.getPictureHeight () is higher than 1024 - I get a message in logcat:
01-12 11: 49: 15.839: ERROR / SurfaceFlinger (2491): Error initializing temp buffer LayerBuffer with w = 1210, h = 922, exp max = 1024x1024 to 0
and I only see a black screen.
Why? In my application, I use video scaling, and sometimes I need to get videos larger than 1024.
source share