Thursday, September 13, 2012

[android-developers] Re: Video (VideoView) flickering and/or doesn't display on ICS (but works fine on Android <= 2.x)

Hey Mathias,

I am facing the similar issue on my Nexus s running ICS on it. Could you find out the exact reason behind this behavior?
If yes can you please share it with me?

Thanks in advance,
Spirit

On Monday, May 7, 2012 12:04:17 PM UTC+5:30, Mathias Lin wrote:
I have an app with a VideoView, which works fine on all Android devices up to 2.x (Gingerbread), but has problems with devices running ICS.

On some devices, the videos don't play, on other devices the video doesn't play when rotating the device. Instead, the screen starts flickering.
(tested on: SGS2, HTC Desire, LG L7, Ainovo Paladium tablet, all running 4.0.x)

I've already tried changing the manifest to android:hardwareAccelerated="false" and also set the VideoView layer type to mVideoView.setLayerType(View.LAYER_TYPE_SOFTWARE, null);

The code itself is very basic and just using the standard video view and media controller:

setContentView(R.layout.act_video_player);
mVideoView = (VideoView) findViewById(R.id.vw_player);
mVideoView.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
Display display = ((WindowManager) getSystemService(WINDOW_SERVICE)).getDefaultDisplay();
MediaController mc = new MediaController(this);
mVideoView.setMediaController(mc);
Uri uri = Uri.parse(mVideoURI);
mVideoView.setVideoURI(uri);
mVideoView.requestFocus();

and the manifest:

<uses-sdk
  android:minSdkVersion="7"
  android:targetSdkVersion="15"/>

<supports-screens
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="false"
android:resizeable="true"
android:anyDensity="true"/>

<application
    ...
    android:hardwareAccelerated="false"/>

Below is the complete log, of which I think the following lines are relevant:

W/QCvdec ( 2751): get_config: unknown param 117440527
I/OMXCodec( 2751): [OMX.qcom.7x30.video.decoder.mpeg4] video dimensions are 960 x 560
W/QCvdec ( 2751): get_extension_index: Error, Not implemented
E/OMXNodeInstance( 2751): OMX_GetExtensionIndex failed

Anybody else having experienced issues with video playback on ICS?

Complete log here:

D/QCvdec ( 2751): VDEC Open with new H 560 and W 960

I/QC_CORE ( 2751): OMXCORE: qc_omx_component_get_parameter 675aec, 41804b60 , 33554433

D/QCvdec ( 2751): portDefn->nBufferSize 806400 m_height 560 m_width 960

I/QC_CORE ( 2751): OMXCORE: qc_omx_component_set_parameter 675aec, 41804b60 , 33554433

I/OMXCodec( 2751): [OMX.qcom.7x30.video.decoder.mpeg4] Enable frame by frame mode

I/QC_CORE ( 2751): OMXCORE: qc_omx_component_set_parameter 675aec, 41804c6c , 2130706434

I/QC_CORE ( 2751): OMXCORE: qc_omx_component_get_parameter 675aec, 41804ba8 , 33554433

I/QC_CORE ( 2751): OMXCORE: qc_omx_component_set_parameter 675aec, 41804ba8 , 33554433

I/QC_CORE ( 2751): OMXCORE: qc_omx_component_get_parameter 675aec, 41804ba8 , 33554433

I/QC_CORE ( 2751): OMXCORE: qc_omx_component_get_parameter 675aec, 41804b1c , 33554433

D/QCvdec ( 2751): portDefn->nBufferSize 806400 m_height 560 m_width 960

I/QC_CORE ( 2751): OMXCORE: qc_omx_component_get_config 675aec

W/QCvdec ( 2751): get_config: unknown param 117440527

I/OMXCodec( 2751): [OMX.qcom.7x30.video.decoder.mpeg4] video dimensions are 960 x 560

W/QCvdec ( 2751): get_extension_index: Error, Not implemented

E/OMXNodeInstance( 2751): OMX_GetExtensionIndex failed

I/QC_CORE ( 2751): OMXCORE: qc_omx_component_get_state 675aec

I/QC_CORE ( 2751): OMXCORE: qc_omx_component_deinit 675aec

I/QC_CORE ( 2751): Calling FreeHandle in state 1

E/OMXCodec( 2751): Attempting to allocate OMX node 'OMX.qcom.video.decoder.mpeg4'

E/OMXCodec( 2751): Attempting to allocate OMX node 'OMX.TI.Video.Decoder'

E/OMXCodec( 2751): Attempting to allocate OMX node 'OMX.SEC.MPEG4.Decoder'

E/OMXCodec( 2751): Attempting to allocate OMX node 'OMX.google.mpeg4.decoder'

E/OMXCodec( 2751): Successfully allocated OMX node 'OMX.google.mpeg4.decoder'

E/OMXCodec( 2751): [OMX.google.mpeg4.decoder] Video O/P format.eColorFormat 0x41804bf8

I/OMXCodec( 2751): [OMX.google.mpeg4.decoder] Enable frame by frame mode

W/OMXCodec( 2751): Failed to set frame packing format on component

I/OMXCodec( 2751): [OMX.google.mpeg4.decoder] video dimensions are 352 x 288

I/OMXCodec( 2751): [OMX.google.mpeg4.decoder] Crop rect is 352 x 288 @ (0, 0)

E/OMXCodec( 2751): Attempting to allocate OMX node 'OMX.TI.AAC.decode'

E/OMXCodec( 2751): Attempting to allocate OMX node 'OMX.google.aac.decoder'

E/OMXCodec( 2751): Successfully allocated OMX node 'OMX.google.aac.decoder'

D/MediaPlayer( 6712): getMetadata

I/OMXCodec( 2751): [OMX.google.mpeg4.decoder] video dimensions are 960 x 560

I/OMXCodec( 2751): [OMX.google.mpeg4.decoder] Crop rect is 960 x 560 @ (0, 0)

I/OMXCodec( 2751): [OMX.google.mpeg4.decoder] video dimensions are 960 x 560

I/OMXCodec( 2751): [OMX.google.mpeg4.decoder] Crop rect is 960 x 560 @ (0, 0)

D/SurfaceTexture( 137): SurfaceTexture::dequeuebuffer: MIN EXCEEDED mBuffer:4 bumped

W/SoftAAC ( 2751): Sample rate was 22050 Hz, but now is 11025 Hz

D/Splash ( 6712): *** onPause ***

D/Splash ( 6712): onPause::mVideoView.getCurrentPosition() store to system: 10500

W/TimedEventQueue( 2751): Event 7 was not found in the queue, already cancelled?

W/AudioFlinger( 2751): session id 57 not found for pid 6712

D/Splash ( 6712): *** onCreate ***

D/Splash ( 6712): *** onResume ***

D/Splash ( 6712): *** videoPos: 10500

D/Splash ( 6712): *** mIsAfterLogin: false

D/Splash ( 6712): *** mIsAfterLoading: true

D/Splash ( 6712): *** onCreate::currentPosition loaded from system: 10500

D/HardwareRenderer( 6712): Disabling v-sync

I/ActivityManager( 204): START {act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10200000 cmp=com.android.launcher/com.android.launcher2.Launcher} from pid 204

E/OMXCodec( 2751): Attempting to allocate OMX node 'OMX.TI.DUCATI1.VIDEO.DECODER'

E/OMXCodec( 2751): Attempting to allocate OMX node 'OMX.Nvidia.mp4.decode'

E/OMXCodec( 2751): Attempting to allocate OMX node 'OMX.qcom.7x30.video.decoder.mpeg4'

I/QC_CORE ( 2751): OMXCORE: qc_omx_component_init 675aec

I/QC_CORE ( 2751): OMXCORE: qc_omx_component_set_callbacks 675aec, 40e5a42c , 69ab50

E/OMXCodec( 2751): Successfully allocated OMX node 'OMX.qcom.7x30.video.decoder.mpeg4'

I/QC_CORE ( 2751): OMXCORE: qc_omx_component_set_parameter 675aec, 41804c3c , 16777239

I/QC_CORE ( 2751): OMXCORE: qc_omx_component_get_parameter 675aec, 41804b0c , 100663297

I/QC_CORE ( 2751): OMXCORE: qc_omx_component_set_parameter 675aec, 41804b0c , 100663297

I/QC_CORE ( 2751): OMXCORE: qc_omx_component_get_parameter 675aec, 41804bc0 , 100663297

E/OMXCodec( 2751): [OMX.qcom.7x30.video.decoder.mpeg4] Video O/P format.eColorFormat 0x7fa30c00

I/QC_CORE ( 2751): OMXCORE: qc_omx_component_get_parameter 675aec, 41804bc0 , 100663297

I/QC_CORE ( 2751): OMXCORE: qc_omx_component_set_parameter 675aec, 41804bc0 , 100663297

I/QC_CORE ( 2751): OMXCORE: qc_omx_component_get_parameter 675aec, 41804b60 , 33554433

I/QC_CORE ( 2751): OMXCORE: qc_omx_component_set_parameter 675aec, 41804b60 , 33554433

D/QCvdec ( 2751):

D/QCvdec ( 2751): VDEC Open with new H 560 and W 960

I/QC_CORE ( 2751): OMXCORE: qc_omx_component_get_parameter 675aec, 41804b60 , 33554433

D/QCvdec ( 2751): portDefn->nBufferSize 806400 m_height 560 m_width 960

I/QC_CORE ( 2751): OMXCORE: qc_omx_component_set_parameter 675aec, 41804b60 , 33554433

I/OMXCodec( 2751): [OMX.qcom.7x30.video.decoder.mpeg4] Enable frame by frame mode

I/QC_CORE ( 2751): OMXCORE: qc_omx_component_set_parameter 675aec, 41804c6c , 2130706434

I/QC_CORE ( 2751): OMXCORE: qc_omx_component_get_parameter 675aec, 41804ba8 , 33554433

I/QC_CORE ( 2751): OMXCORE: qc_omx_component_set_parameter 675aec, 41804ba8 , 33554433

I/QC_CORE ( 2751): OMXCORE: qc_omx_component_get_parameter 675aec, 41804ba8 , 33554433

I/QC_CORE ( 2751): OMXCORE: qc_omx_component_get_parameter 675aec, 41804b1c , 33554433

D/QCvdec ( 2751): portDefn->nBufferSize 806400 m_height 560 m_width 960

I/QC_CORE ( 2751): OMXCORE: qc_omx_component_get_config 675aec

W/QCvdec ( 2751): get_config: unknown param 117440527

I/OMXCodec( 2751): [OMX.qcom.7x30.video.decoder.mpeg4] video dimensions are 960 x 560

W/QCvdec ( 2751): get_extension_index: Error, Not implemented

E/OMXNodeInstance( 2751): OMX_GetExtensionIndex failed

I/QC_CORE ( 2751): OMXCORE: qc_omx_component_get_state 675aec

I/QC_CORE ( 2751): OMXCORE: qc_omx_component_deinit 675aec

I/QC_CORE ( 2751): Calling FreeHandle in state 1

E/OMXCodec( 2751): Attempting to allocate OMX node 'OMX.qcom.video.decoder.mpeg4'

E/OMXCodec( 2751): Attempting to allocate OMX node 'OMX.TI.Video.Decoder'

E/OMXCodec( 2751): Attempting to allocate OMX node 'OMX.SEC.MPEG4.Decoder'

E/OMXCodec( 2751): Attempting to allocate OMX node 'OMX.google.mpeg4.decoder'

E/OMXCodec( 2751): Successfully allocated OMX node 'OMX.google.mpeg4.decoder'

E/OMXCodec( 2751): [OMX.google.mpeg4.decoder] Video O/P format.eColorFormat 0x41804bf8

I/OMXCodec( 2751): [OMX.google.mpeg4.decoder] Enable frame by frame mode

W/OMXCodec( 2751): Failed to set frame packing format on component

I/OMXCodec( 2751): [OMX.google.mpeg4.decoder] video dimensions are 352 x 288

I/OMXCodec( 2751): [OMX.google.mpeg4.decoder] Crop rect is 352 x 288 @ (0, 0)

E/OMXCodec( 2751): Attempting to allocate OMX node 'OMX.TI.AAC.decode'

E/OMXCodec( 2751): Attempting to allocate OMX node 'OMX.google.aac.decoder'

E/OMXCodec( 2751): Successfully allocated OMX node 'OMX.google.aac.decoder'

D/Splash ( 6712): *** onPause ***

D/Splash ( 6712): onPause::mVideoView.getCurrentPosition() store to system: 0

D/MediaPlayer( 6712): getMetadata

I/OMXCodec( 2751): [OMX.google.mpeg4.decoder] video dimensions are 960 x 560

I/OMXCodec( 2751): [OMX.google.mpeg4.decoder] Crop rect is 960 x 560 @ (0, 0)

I/OMXCodec( 2751): [OMX.google.mpeg4.decoder] video dimensions are 960 x 560

I/OMXCodec( 2751): [OMX.google.mpeg4.decoder] Crop rect is 960 x 560 @ (0, 0)

D/SurfaceTexture( 137): SurfaceTexture::dequeuebuffer: MIN EXCEEDED mBuffer:4 bumped

D/OpenGLRenderer( 6712): Flushing caches (mode 1)


or even more complete log on pastebin: http://pastebin.com/QQsWc2y0

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment