问题
Kindly execuse me for the bit longer description about the problem.
I have a custom board with DM3730 processor, and building android rowboat from
http://code.google.com/p/rowboat/wiki/JellybeanOnBeagleboard_WithSGX
OBJECTIVE: ENABLING HARDWARE DECODER.
2.1) For that, I need OMAX-IL Interface. Hence looked at the source code downloaded from TI. But i do not find omap3/ directory under hardware/ti/ which represents OMX implementation.
2.2) Hence downloaded from AOSP Jelly Bean Code By:
git clone https://android.googlesource.com/platform/hardware/ti/omap3 -b jb-release
2.3) According to https://source.android.com/devices/media.html
* I could build libstagefrighthw.so, libOMX_Core.so, OMX.TI.Video.Decoder.so [ ofcourse with commenting some error lines..]
2.4) Changed media_codec.xml to keep the below entry:
<MediaCodec name="OMX.TI.Video.Decoder" type="video/avc"/>
2.5) Built the DSP according to [ Note: i took latest ] IE: DVSDK
http://code.google.com/p/rowboat/wiki/DSP#Instruction_Difference_for_Build_and_Run_Froyo+DSP
Instead of
http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/dvsdk/DVSDK_4_00/4_01_00_09/index_FDS.html
took new version of dvsdk from below link;
http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/dvsdk/DVSDK_4_00/latest/index_FDS.html
First think, would like to confirm if it is the right approach? or what other underpinnings that i need to be aware of ?
Where I Struck?
1) DSP Layer generates two device files /dev/dsplink and /dev/cmem.
whereas the dspbridge in omap3/ tries to communicate with /dev/DspBridge.
Hence i created symbolic link to /dev/DspBridge to /dev/dsplink.
2) Found the below Flow right from the framework.
1) OMXMaster Loads libstagefrighthw.so, and get the Plugin Instance.
2) Plugin Instance loads libOMX_Core.so.
3) Now the Component libOMX.TI.Video.Decode is detected,
3) I tried two things:
3.1) Getting into gallery: I got into the below issue while accessing album.
D/TIOMX_CORE( 1068): Found component OMX.TI.Video.Decoder with refCount 0
I/TI_Video_Decoder( 1068): TI Video Decoder
I/OMXCodec( 1068): [OMX.TI.Video.Decoder] AVC profile = 100 (High), level = 31
I/OMXCodec( 1068): [OMX.TI.Video.Decoder] video dimensions are 1280 x 720
D/TI_Video_Decoder( 1068): VIDDEC_SendCommand: Received request from omx client to change state to 2
D/TI_Video_Decoder( 1068): Handle request for state transition: 1 => OMX_StateIdle
D/TI_Video_Decoder( 1068): VIDDEC_InitDSP_H264Dec():7191 LCML_InitMMCodec Failed!...80001009
D/TI_Video_Decoder( 1068): VIDDEC_HandleCommand():2584 LCML Error 1
E/OMXCodec( 1068): [OMX.TI.Video.Decoder] ERROR(0x80001009, 2)
W/StagefrightMetadataRetriever( 1068): OMXCodec::start returned error -2147483648 (0x80000000)
D/dalvikvm( 1672): GC_FOR_ALLOC freed 52K, 4% free 6911K/7175K, paused 16ms, total 19ms
E/libEGL ( 1672): called unimplemented OpenGL ES API
E/libEGL ( 1672): called unimplemented OpenGL ES API
I/ARMAssembler( 1672): generated scanline__00000177:03010104_00008001_00000000 [105 ipp] (129 ins) at [0x5e32c7e8:0x5e32c9ec] in 183106 ns
E/libEGL ( 1672): called unimplemented OpenGL ES API
E/WVMExtractor( 1068): Failed to open libwvm.so
E/MetadataRetrieverClient( 1068): failed to extract an album art
E/MediaMetadataRetrieverJNI( 1672): getEmbeddedPicture: Call to getEmbeddedPicture failed.
D/TIOMX_CORE( 1068): Found component OMX.TI.Video.Decoder with refCount 1
E/TIOMX_CORE( 1068): Max instances of component OMX.TI.Video.Decoder already created.
D/TIOMX_CORE( 1068): Found component OMX.TI.Video.Decoder with refCount 1
E/TIOMX_CORE( 1068): Max instances of component OMX.TI.Video.Decoder already created.
E/MetadataRetrieverClient( 1068): failed to capture a video frame
E/MediaMetadataRetrieverJNI( 1672): getFrameAtTime: videoFrame is a NULL pointer
W/ImageCacheRequest( 1672): decode orig failed /local/video/item/41,MICROTHUMB
D/TI_Video_Decoder( 1068): VIDDEC_GetState():2334 VIDDEC_GetState timed out
D/TIOMX_CORE( 1068): Found matching pHandle(0x41d805e0) at index 1 with refCount 1
D/TIOMX_CORE( 1068): Found component OMX.TI.Video.Decoder with refCount 0
I/TI_Video_Decoder( 1068): TI Video Decoder
I/OMXCodec( 1068): [OMX.TI.Video.Decoder] AVC profile = 100 (High), level = 31
I/OMXCodec( 1068): [OMX.TI.Video.Decoder] video dimensions are 1280 x 720
F/MPEG4Extractor( 1068): frameworks/av/media/libstagefright/MPEG4Extractor.cpp:1936 CHECK(!mStarted) failed.
F/libc ( 1068): Fatal signal 11 (SIGSEGV) at 0xdeadbaad (code=1), thread 1068 (mediaserver)
I/DEBUG ( 1064): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG ( 1064): Build fingerprint: 'Android/omap3evm/omap3evm:4.1.2/JZO54K/eng.ramprakash.20140407.195934:userdebug/test-keys'
I/DEBUG ( 1064): pid: 1068, tid: 1068, name: mediaserver >>> /system/bin/mediaserver <<<
I/DEBUG ( 1064): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr deadbaad
I/DEBUG ( 1064): r0 00000027 r1 deadbaad r2 000000a2 r3 00000000
I/DEBUG ( 1064): r4 00000000 r5 be89f504 r6 41d8eb30 r7 00000000
I/DEBUG ( 1064): r8 41d8eb30 r9 00000002 sl ffffffff fp ffffffff
I/DEBUG ( 1064): ip fffd2bec sp be89f500 lr 400ee9e9 pc 400eb086 cpsr 60000030
I/DEBUG ( 1064): d0 2f616964656d2f66 d1 6567617473626961
I/DEBUG ( 1064): d2 4d2f746867697269 d3 727478453447456c
The failure is in
D/TI_Video_Decoder( 1068): VIDDEC_InitDSP_H264Dec():7191 LCML_InitMMCodec Failed!...80001009
3.2 Running High Definition Video with Media player. Below is the logcat.
D/TIOMX_CORE( 1723): Found component OMX.TI.Video.Decoder with refCount 0
I/TI_Video_Decoder( 1723): TI Video Decoder
D/TI_Video_Decoder( 1723): OMX_ComponentInit():377 INIT_STRUCT Major 0x1 Minor 0x0 nRevision 0x0 nStep 0x0
D/TI_Video_Decoder( 1723): VIDDEC_Load_Defaults():832 INIT_STRUCT Major 0x1 Minor 0x0 nRevision 0x0 nStep 0x0
D/TI_Video_Decoder( 1723): VIDDEC_Load_Defaults():836 INIT_STRUCT Major 0x1 Minor 0x0 nRevision 0x0 nStep 0x0
D/TI_Video_Decoder( 1723): VIDDEC_Load_Defaults():839 INIT_STRUCT Major 0x1 Minor 0x0 nRevision 0x0 nStep 0x0
D/TI_Video_Decoder( 1723): VIDDEC_Load_Defaults():842 INIT_STRUCT Major 0x1 Minor 0x0 nRevision 0x0 nStep 0x0
D/TI_Video_Decoder( 1723): VIDDEC_Load_Defaults():851 INIT_STRUCT Major 0x1 Minor 0x0 nRevision 0x0 nStep 0x0
D/TI_Video_Decoder( 1723): VIDDEC_Load_Defaults():880 INIT_STRUCT Major 0x1 Minor 0x0 nRevision 0x0 nStep 0x0
D/TI_Video_Decoder( 1723): VIDDEC_Load_Defaults():918 INIT_STRUCT Major 0x1 Minor 0x0 nRevision 0x0 nStep 0x0
D/TI_Video_Decoder( 1723): VIDDEC_Load_Defaults():928 INIT_STRUCT Major 0x1 Minor 0x0 nRevision 0x0 nStep 0x0
D/TI_Video_Decoder( 1723): VIDDEC_Load_Defaults():937 INIT_STRUCT Major 0x1 Minor 0x0 nRevision 0x0 nStep 0x0
D/TI_Video_Decoder( 1723): VIDDEC_Load_Defaults():945 INIT_STRUCT Major 0x1 Minor 0x0 nRevision 0x0 nStep 0x0
D/TI_Video_Decoder( 1723): VIDDEC_Load_Defaults():950 INIT_STRUCT Major 0x1 Minor 0x0 nRevision 0x0 nStep 0x0
D/TI_Video_Decoder( 1723): VIDDEC_Load_Defaults():957 INIT_STRUCT Major 0x1 Minor 0x0 nRevision 0x0 nStep 0x0
D/TI_Video_Decoder( 1723): VIDDEC_Load_Defaults():963 INIT_STRUCT Major 0x1 Minor 0x0 nRevision 0x0 nStep 0x0
D/TI_Video_Decoder( 1723): VIDDEC_Load_Defaults():963 INIT_STRUCT Major 0x1 Minor 0x0 nRevision 0x0 nStep 0x0
D/TI_Video_Decoder( 1723): VIDDEC_Load_Defaults():963 INIT_STRUCT Major 0x1 Minor 0x0 nRevision 0x0 nStep 0x0
D/TI_Video_Decoder( 1723): VIDDEC_Load_Defaults():963 INIT_STRUCT Major 0x1 Minor 0x0 nRevision 0x0 nStep 0x0
D/TI_Video_Decoder( 1723): VIDDEC_Load_Defaults():963 INIT_STRUCT Major 0x1 Minor 0x0 nRevision 0x0 nStep 0x0
D/TI_Video_Decoder( 1723): VIDDEC_Load_Defaults():963 INIT_STRUCT Major 0x1 Minor 0x0 nRevision 0x0 nStep 0x0
D/TI_Video_Decoder( 1723): VIDDEC_Load_Defaults():981 INIT_STRUCT Major 0x1 Minor 0x0 nRevision 0x0 nStep 0x0
D/TI_Video_Decoder( 1723): VIDDEC_Load_Defaults():999 INIT_STRUCT Major 0x1 Minor 0x0 nRevision 0x0 nStep 0x0
D/TI_Video_Decoder( 1723): VIDDEC_Load_Defaults():1007 INIT_STRUCT Major 0x1 Minor 0x0 nRevision 0x0 nStep 0x0
D/TI_Video_Decoder( 1723): VIDDEC_Load_Defaults():1046 INIT_STRUCT Major 0x1 Minor 0x0 nRevision 0x0 nStep 0x0
D/TI_Video_Decoder( 1723): VIDDEC_Load_Defaults():1083 INIT_STRUCT Major 0x1 Minor 0x0 nRevision 0x0 nStep 0x0
D/TI_Video_Decoder( 1723): VIDDEC_Load_Defaults():1136 INIT_STRUCT Major 0x1 Minor 0x0 nRevision 0x0 nStep 0x0
D/TI_Video_Decoder( 1723): VIDDEC_Start_ComponentThread():1423 +++ENTERING
D/TI_Video_Decoder( 1723): VIDDEC_Start_ComponentThread():1486 ---EXITING(0x0)
I/OMXCodec( 1723): [OMX.TI.Video.Decoder] AVC profile = 100 (High), level = 31
D/TI_Video_Decoder( 1723): VIDDEC_GetParameter():964 eCompressionFormat = OMX_VIDEO_CodingH263
D/TI_Video_Decoder( 1723): VIDDEC_GetParameter():970 eCompressionFormat = OMX_VIDEO_CodingAVC
D/TI_Video_Decoder( 1723): VIDDEC_SetParameter():1257 eCompressionFormat = OMX_VIDEO_CodingAVC
D/TI_Video_Decoder( 1723): VIDDEC_SetParameter():1346 Set i/p size: 1280x544
D/TI_Video_Decoder( 1723): VIDDEC_SetParameter():1356 Set OUT/p size: 1280x544
D/TI_Video_Decoder( 1723): VIDDEC_SetParameter():1346 Set i/p size: 1280x544
I/OMXCodec( 1723): [OMX.TI.Video.Decoder] video dimensions are 1280 x 544
E/OMXNodeInstance( 1723): OMX_GetExtensionIndex failed
D/TI_Video_Decoder( 1723): VIDDEC_Stop_ComponentThread():1514 +++ENTERING
D/TI_Video_Decoder( 1723): VIDDEC_Stop_ComponentThread():1681 ---EXITING(0x0)
D/TIOMX_CORE( 1723): Found matching pHandle(0x40b14d00) at index 0 with refCount 1
E/MediaPlayer( 1696): error (1, -2147483648)
E/MediaPlayer( 1696): Error (1,-2147483648)
D/VideoView( 1696): Error: 1,-2147483648
I tried with #dspexec -v
Having looked at the code of libdspbridge, it opens the device file /dev/dsplink, and emumerates the device [ i am not sure what it is doing], but emumeration fails because of sending ioctl to the device.
http://androidxref.com/4.1.1/xref/hardware/ti/omap3/dspbridge/libbridge/dsptrap.c
DSPTRAP_Trap returns dwResult as -1 .
Kindly point out where my issue is?
UPDATE:
Finding:
1) dsp-bridge, dsp-link both drivers are different, and the DSP which is built for dsp-link, and i am trying with dsp-bridge.
回答1:
Certainly the error is caused by your having linked /dev/dsplink to /dev/DspBridge. Dsplink is the wrong driver to use in this case. You'll need to build DspBridge from the staging area of your kernel, add hooks to load the driver in init.rc with the correct baseimage.dof file, and try again.
来源:https://stackoverflow.com/questions/22956265/enabling-hardware-encoder-in-jelly-bean-4-1-1-rowboat-dm3730