Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Known quirks for various TV models/WebOS versions #68

Open
tuxuser opened this issue May 19, 2022 · 1 comment
Open

Known quirks for various TV models/WebOS versions #68

tuxuser opened this issue May 19, 2022 · 1 comment
Labels
documentation Improvements or additions to documentation

Comments

@tuxuser
Copy link
Member

tuxuser commented May 19, 2022

[DILE_VT] TVs of C9 series: If DILE_VT_Create function is called first, initialization of DILE_VT will fail most of the cases.

Solution: Call DILE_VT_CreateEx before DILE_VT_Create

vth = DILE_VT_Create(0);
if (vth == NULL && &DILE_VT_CreateEx != 0) {
WARN("DILE_VT_Create failed, attempting DILE_VT_CreateEx...");
vth = DILE_VT_CreateEx(0, 1);
}

(Reported via Discord)

Test branch that implements this workaround: https://github.com/webosbrew/hyperion-webos/tree/try/c9_createex_first

[DILE_VT] 4k content on some webOS 4.3.0 devices will be cropped to 1/4 of the picture when captured from VT.

Solution: Use (not-named) value 2 to pass as dump_location to DILE_VT_SetVideoFrameOutputDeviceDumpLocation

DILE_VT_DUMP_LOCATION_TYPE_T dump_location = DILE_VT_DISPLAY_OUTPUT;
if (DILE_VT_SetVideoFrameOutputDeviceDumpLocation(vth, dump_location) != 0) {
WARN("[DILE_VT] DISPLAY dump location failed, attempting SCALER...");
dump_location = DILE_VT_SCALER_OUTPUT;
if (DILE_VT_SetVideoFrameOutputDeviceDumpLocation(vth, dump_location) != 0) {
ERR("[DILE_VT] SetVideoFrameOutputDeviceDumpLocation failed!");
ret = -2;
goto err_destroy;
}
}
DILE_VT_RECT region = { 0, 0, config->resolution_width, config->resolution_height };
if (region.width < limitation.scaleDownLimitWidth || region.height < limitation.scaleDownLimitHeight) {
WARN("scaledown is limited to %dx%d while %dx%d has been chosen - there's a chance this will crash!", limitation.scaleDownLimitWidth, limitation.scaleDownLimitHeight, region.width, region.height);
}
if (DILE_VT_SetVideoFrameOutputDeviceOutputRegion(vth, dump_location, &region) != 0) {
ERR("[DILE_VT] SetVideoFrameOutputDeviceOutputRegion failed!");
ret = -3;
goto err_destroy;
}

Reference: #45 (comment)

[General] Some (newer?) TVs: Checking the power state via luna:https://com.webos.service.tvpower/power/getPowerState and evaluating "state" for "Active"/"processing" and pausing capturing due to that criteria, to detect power state, causes flickering each 2 minutes.

chrischan — 02/28/2022
This shows up randomly and leads to hyperion-webos switch off/on:
{ "returnValue": true, "state": "Active", "processing": "Request Screen Saver" }
{ "returnValue": true, "state": "Active", "processing": "Screen On" }
{ "returnValue": true, "state": "Active" }

PowerOff:
{ "returnValue": true, "state": "Active", "processing": "Request Power Off", "onOff": "off", "reason": "remoteKey" }
{ "returnValue": true, "state": "Active", "processing": "Request Active Standby", "onOff": "off", "reason": "remoteKey" }
{ "returnValue": true, "state": "Active", "processing": "Prepare Active Standby", "onOff": "off", "reason": "remoteKey" }
{ "returnValue": true, "state": "Active Standby" }
{ "returnValue": true, "state": "Active Standby", "processing": "Request Suspend", "onOff": "off", "reason": "homekit" }
{ "returnValue": true, "state": "Active Standby", "processing": "Prepare Suspend", "onOff": "off", "reason": "homekit" }
{ "returnValue": true, "state": "Suspend" }

PowerOn:
{ "returnValue": true, "state": "Suspend", "processing": "Prepare Resume", "onOff": "on", "reason": "remoteKey" }
{ "returnValue": true, "state": "Suspend", "processing": "LastInput Ready", "onOff": "on", "reason": "remoteKey" }
{ "returnValue": true, "state": "Suspend", "processing": "Screen On", "onOff": "on", "reason": "remoteKey" }
{ "returnValue": true, "state": "Active" }

Reference:

bool target_state = strcmp(state_str, "Active") == 0 && !jobject_containskey(parsed, j_cstr_to_buffer("processing"));
if (!service->running && target_state && service->power_paused) {
INFO("Resuming after power pause...");
service->power_paused = false;
service_start(service);
}
if (service->running && !target_state && !service->power_paused) {
INFO("Pausing due to power event...");
service->power_paused = true;
service_stop(service);
}

Issue #54

(Reported via Discord)

@drbeat
Copy link

drbeat commented Jun 26, 2022

I have a C7 device and when the TV goes into screensaver the screen grabber does not work afterwards.
Stopping and restarting the service is not working and a full tv reboot is needed.

@TBSniller TBSniller pinned this issue Sep 25, 2022
@TBSniller TBSniller added the documentation Improvements or additions to documentation label Sep 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants