webosbrew / hyperion-webos

hyperion.ng video grabber for webOS
MIT License
144 stars 27 forks source link

libdile_vt_backend.so: init failure, code: -7 #103

Closed geshkin closed 1 year ago

geshkin commented 1 year ago

Video capture doesn't start on my LG TV, but UI capture works at the same time. I've tried all avaliable versions of piccap and hyperion-webos with the same result.

"board_type": "M2R_DVB",
"hardware_id": "HE_DTV_W17R_AFAAABAA",
"product_id": "43LJ594V-ZA",
"core_os_release": "3.8.0-61409",
"webos_manufacturing_version": "05.80.40",

Logs from hyperion-webos:

/media/developer/apps/usr/palm/services/org.webosbrew.piccap.service # LD_LIBRARY_PATH=./ ./hyperion-webos --address 127.0.0.1 --port 19400 --fps 30 --width 192 --height 108 --backend libdil
e_vt -v
     0.001s [INFO main                ] Starting up (version: tags/0.2.0-0-ge32bebb)...
     0.001s [INFO main                ] Running via CLI
     0.002s [INFO service_init        ] Autodetecting UI backend...
     0.039s [ DBG unicapture_init_backend] libgm_backend.so: loading...
     0.040s [ DBG unicapture_init_backend] libgm_backend.so: loaded, initializing...
[SYSTEM (user mode)][00399] 
=== Start to Init System... ===
[SYSTEM (user mode)][00400] MDrv_MMIO_Init
[SYSTEM (user mode)][00403] MsOS_Init
[SYSTEM (user mode)][00406] MDrv_SYS_Init
[SYSTEM (user mode)][00409] MAdp_MPool_Init

_LX_MEM  = 0x20200000, 0x19100000
_LX_MEM2 = 0x4E400000, 0x11C00000

SysInfo.LX_MEM_ADDR  = 0x20200000, 0x19100000
SysInfo.LX_MEM2_ADDR = 0x8E400000, 0x11C00000

[WARRING!] MAdp_SYS_GetMMAP(),336, type = 16, Size is 0
[WARRING!] MAdp_SYS_GetMMAP(),336, type = 77, Size is 0
[WARRING!] MAdp_SYS_GetMMAP(),336, type = 23, Size is 0
[Utopia2K][User space] Duplicated PA(0x0 ~ 0xfffff) mapping with Table[0](0x0 ~0x200000).
[WARRING!] MAdp_SYS_GetMMAP(),336, type = 45, Size is 0
[WARRING!] MAdp_SYS_GetMMAP(),336, type = 49, Size is 0
[WARRING!] MAdp_SYS_GetMMAP(),336, type = 78, Size is 0
[WARRING!] MAdp_SYS_GetMMAP(),336, type = 29, Size is 0
[WARRING!] MAdp_SYS_GetMMAP(),336, type = 72, Size is 0
[WARRING!] MAdp_SYS_GetMMAP(),336, type = 25, Size is 0
[WARRING!] MAdp_SYS_GetMMAP(),336, type = 24, Size is 0
[WARRING!] MAdp_SYS_GetMMAP(),336, type = 80, Size is 0
[WARRING!] MAdp_SYS_GetMMAP(),336, type = 81, Size is 0
[WARRING!] MAdp_SYS_GetMMAP(),336, type = 74, Size is 0
[WARRING!] MAdp_SYS_GetMMAP(),336, type = 75, Size is 0
[WARRING!] MAdp_SYS_GetMMAP(),336, type = 50, Size is 0
[WARRING!] MAdp_SYS_GetMMAP(),336, type = 73, Size is 0
[WARRING!] MAdp_SYS_GetMMAP(),336, type = 32, Size is 0
[Utopia2K][User space] Duplicated PA(0x20000000 ~ 0x202fffff) mapping with Table[24](0x20000000 ~0x20300000).
[WARRING!] MAdp_SYS_GetMMAP(),336, type = 40, Size is 0
[WARRING!] MAdp_SYS_GetMMAP(),336, type = 41, Size is 0
[Utopia2K][User space] Duplicated PA(0x21300000 ~ 0x268fffff) mapping with Table[25](0x21300000 ~0x21b00000).
[WARRING!] MAdp_SYS_GetMMAP(),336, type = 43, Size is 0
[WARRING!] MAdp_SYS_GetMMAP(),336, type = 82, Size is 0
[WARRING!] MAdp_SYS_GetMMAP(),336, type = 83, Size is 0
[WARRING!] MAdp_SYS_GetMMAP(),336, type = 86, Size is 0
[SYSTEM (user mode)][00412] MDrv_SEM_Init
[SYSTEM (user mode)][00415] MDrv_BDMA_Init
utopia.c : malloc ok,Module= MODULE_BDMA 
[SYSTEM (user mode)][00418] MDrv_MIU_Init
[SYSTEM (user mode)][00421] MsOS_SHM_Init
utopia.c : malloc ok,Module= MODULE_GPIO 
Module : MODULE_GPIO  Open /proc/utopia ok
_s32UtopiaFd : 15  
utopia.c : malloc ok,Module= MODULE_GFX 
Module : MODULE_GFX  Open /proc/utopia ok
_s32UtopiaFd : 16  
utopia.c : malloc ok,Module= MODULE_GOP 
Module : MODULE_GOP  Open /proc/utopia ok
_s32UtopiaFd : 17  
[001951.430158:hyperion-webos->hyperion-webos] <warning> GM_TEMPLATE_HASH_Insert : node already found..ptr = 0x911e8

[001951.430278:hyperion-webos->hyperion-webos] <warning> GM_TEMPLATE_HASH_Insert : node already found..ptr = 0x91618

[001951.430314:hyperion-webos->hyperion-webos] <warning> GM_TEMPLATE_HASH_Insert : node already found..ptr = 0x922a8

[001951.430337:hyperion-webos->hyperion-webos] <warning> GM_TEMPLATE_HASH_Insert : node already found..ptr = 0x926d8

[001951.430385:hyperion-webos->hyperion-webos] <warning> GM_TEMPLATE_HASH_Insert : node already found..ptr = 0x92b08

[001951.430409:hyperion-webos->hyperion-webos] <warning> GM_TEMPLATE_HASH_Insert : node already found..ptr = 0x92f38

[001951.430432:hyperion-webos->hyperion-webos] <warning> GM_TEMPLATE_HASH_Insert : node already found..ptr = 0x92b08

[001951.430452:hyperion-webos->hyperion-webos] <warning> GM_TEMPLATE_HASH_Insert : node already found..ptr = 0x92f38

[001951.430474:hyperion-webos->hyperion-webos] <warning> GM_TEMPLATE_HASH_Insert : node already found..ptr = 0x911e8

[001951.430496:hyperion-webos->hyperion-webos] <warning> GM_TEMPLATE_HASH_Insert : node already found..ptr = 0x91618

[001951.430761:hyperion-webos->hyperion-webos] [_GM_UseGFXHWDirectly][905] _GM_UseGFXHWDirectly OK 

     0.101s [ DBG unicapture_init_backend] libgm_backend.so: success
     0.102s [ DBG unicapture_try_backends] try_backends: libgm_backend.so succeeded
     0.103s [ DBG unicapture_init_backend] libdile_vt_backend.so: loading...
     0.103s [ DBG unicapture_init_backend] libdile_vt_backend.so: loaded, initializing...
     0.103s [INFO capture_init        ] Capture start called.
     0.105s [INFO capture_init        ] Attempting DILE_VT_Create...
initializing lock 'VT' 
utopia.c : malloc ok,Module= MODULE_XC 
utopia.c : malloc ok,Module= MODULE_XC 
utopia.c : malloc ok,Module= MODULE_PNL 
utopia.c : malloc ok,Module= MODULE_PNL 
Module : MODULE_PNL  Open /proc/utopia ok
_s32UtopiaFd : 21  
ML mmap get by DS offset u32MLAddr[0x1deba000] u32MLSize[0x80000]
[WARRING!] MAdp_SYS_GetMMAP(),336, type = 72, Size is 0
[WARRING!] MAdp_SYS_GetMMAP(),336, type = 73, Size is 0
[WARRING!] MAdp_SYS_GetMMAP(),336, type = 80, Size is 0
[WARRING!] MAdp_SYS_GetMMAP(),336, type = 81, Size is 0
MApi_XC_Init Success!!!!!!
utopia.c : malloc ok,Module= MODULE_DIP 

[DIP INFO] dip openutopia.c : malloc ok,Module= MODULE_VDEC_EX 
Module : MODULE_VDEC_EX  Open /proc/utopia ok
_s32UtopiaFd : 22  
     0.148s [ DBG capture_init        ] Got DILE_VT context!
     0.148s [ DBG capture_init        ] supportScaleUp: 0; (0x0)
     0.148s [ DBG capture_init        ] supportScaleDown: 1; (1x1)
     0.148s [ DBG capture_init        ] maxResolution: 1920x1080
     0.148s [ DBG capture_init        ] input deinterlace: 0; display deinterlace: 1
     0.266s [INFO capture_init        ] [DILE_VT] framerate divider: 2
     0.307s [INFO capture_init        ] [DILE_VT] frametime: 20361; estimated fps before divider: 49.11350
     0.349s [INFO capture_init        ] [DILE_VT] frametime: 20411; estimated fps after divider: 48.99319
     0.349s [INFO capture_init        ] [DILE_VT] vfbs: 1; planes: 2
     0.350s [INFO capture_init        ] [DILE_VT] pixelFormat: 4; width: 192; height: 108; stride: 192...
     0.350s [ DBG capture_init        ] [DILE_VT] vfb[0][0] = 0x39c9a000
     0.350s [ DBG capture_init        ] [DILE_VT] vfb[0][1] = 0x39c9f100
     0.351s [ ERR capture_init        ] [DILE_VT] mmap for vfb[0][1] failed!
     0.365s [ ERR unicapture_init_backend] libdile_vt_backend.so: init failure, code: -7
     0.365s [ DBG service_register    ] Try register on LSRegister
     0.370s [ DBG main                ] Going into main loop..
     0.371s [ DBG connection_loop     ] Starting connection loop
     0.373s [INFO connection_loop     ] Connecting hyperion-client..
     0.373s [INFO connection_loop     ] hyperion-client connected!
     0.374s [ DBG unicapture_run      ] Attempting UI capture init...
     0.375s [INFO unicapture_run      ] UI capture started
     0.379s [INFO power_callback      ] Power status callback message: { "subscribed": true, "returnValue": true, "state": "Active" }
     0.384s [INFO unicapture_vsync_handler] vsync thread starting...
     0.430s [INFO picture_callback    ] picture_callback: dynamicRange: sdr --> SDR mode
     0.430s [ DBG set_hdr_state       ] set_hdr_state: Currently known daemon flavor: 0 (NOT SET) -> Fetching new state
     0.431s [ DBG send_rpc_message    ] JSON-RPC target: http://127.0.0.1:8090/json-rpc
     0.431s [ DBG do_http_post        ] do_http_post: Command: curl --silent -X POST http://127.0.0.1:8090/json-rpc -d '{"command":"sysinfo"}'
     0.489s [ DBG get_daemon_flavor   ] get_daemon_flavor: Detected Hyperion.NG
     0.489s [INFO set_hdr_state       ] Detected daemon flavor: 1 (Hyperion.NG)
     0.489s [WARN set_hdr_state       ] set_hdr_state: Daemon is not HyperHDR -> Not submitting HDR state!
     0.489s [ ERR picture_callback    ] videooutput_callback: set_hdr_state failed, ret: -2
     2.393s [ DBG unicapture_run      ] Framerate: 29.660946 FPS; timings - wait: 30359us, acquire: 1221us, convert: 1260us, process; 158us, send: 624us, release: 4us
     2.394s [ DBG unicapture_run      ]         UI: pixfmt: 11; 192x108
     2.394s [ DBG unicapture_run      ]      VIDEO: pixfmt: 0; 0x0
     2.394s [ DBG unicapture_run      ] CONV    UI: pixfmt: 12; 192x108
     2.394s [ DBG unicapture_run      ] CONV VIDEO: pixfmt: 0; 0x0
^C     3.363s [INFO int_handler         ] SIGINT detected, stopping...
     3.363s [ DBG main                ] Main loop quit...
     3.363s [ DBG main                ] Cleaning up service...
     3.364s [INFO unicapture_run      ] Shutting down...
     3.364s [INFO connection_loop     ] Ending connection loop
     3.367s [ DBG connection_loop     ] Connection loop exiting
     3.367s [ DBG unicapture_run      ] Waiting for vsync thread to finish...
     3.393s [INFO unicapture_vsync_handler] vsync thread finished
     3.394s [ DBG unicapture_run      ] Terminating UI capture...
     3.394s [ DBG unicapture_run      ] Done!
     3.394s [ DBG main                ] Service main finished
Mutex Name: UtopiaPrivateMutex
Mutex Name: UtopiaPrivateMutex
satgit62 commented 1 year ago

Try setting the resolution in PicCap Manual to 256 × 144, 20 fps.

geshkin commented 1 year ago

Try setting the resolution in PicCap Manual to 256 × 144, 20 fps.

Thanks a lot. Changing resolution helped. I don't know why I didn't try different resolution by myself :(