mirror of
https://github.com/niellun/FastCarPlay.git
synced 2026-06-07 09:38:25 +02:00
Request extra frames for HW decoder
This commit is contained in:
@@ -98,6 +98,10 @@
|
||||
# This is happening or Raspberry Pi Zero 2W. Disable this to use SW decoding for that case.
|
||||
#hw-decode = true
|
||||
|
||||
# Request extra frames onevery key press. Usefull if you do not see last updates after key press
|
||||
# Enable for RPI hardware decoding and other systems where hardware decoder tends to buffer frames
|
||||
#force-redraw = false
|
||||
|
||||
# Corrects aspect of UI
|
||||
#aspect-correction = 1
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
|
||||
#define BTN_SIRI 5
|
||||
#define BTN_MICROPHONE 7
|
||||
#define BTN_12 12
|
||||
#define BTN_SCREEN_REFRESH 12
|
||||
// Navigation buttons
|
||||
#define BTN_LEFT 100
|
||||
#define BTN_RIGHT 101
|
||||
|
||||
+1
-1
@@ -59,8 +59,8 @@ void processKey(Protocol &protocol, SDL_Keysym key, RunParams ¶ms)
|
||||
return;
|
||||
|
||||
case SDLK_r:
|
||||
protocol.sendKey(BTN_SCREEN_REFRESH);
|
||||
params.dirty = true;
|
||||
protocol.sendKey(BTN_12);
|
||||
return;
|
||||
|
||||
case SDLK_h:
|
||||
|
||||
@@ -119,6 +119,12 @@ void Protocol::sendKey(int key)
|
||||
write_uint32_le(&buf[0], key);
|
||||
|
||||
send(CMD_CONTROL, false, buf, 4);
|
||||
|
||||
if(Settings::forceRedraw)
|
||||
{
|
||||
write_uint32_le(&buf[0], BTN_SCREEN_REFRESH);
|
||||
send(CMD_CONTROL, false, buf, 4);
|
||||
}
|
||||
}
|
||||
|
||||
void Protocol::sendFile(const char *filename, const char *value)
|
||||
|
||||
@@ -35,6 +35,7 @@ public:
|
||||
static inline Setting<int> fontSize{"font-size", 30};
|
||||
static inline Setting<bool> vsync{"vsync", false};
|
||||
static inline Setting<bool> hwDecode{"hw-decode", true};
|
||||
static inline Setting<bool> forceRedraw{"force-redraw", false};
|
||||
static inline Setting<float> aspectCorrection{"aspect-correction", 1};
|
||||
static inline Setting<bool> fastScale{"fast-render-scale", false};
|
||||
static inline Setting<int> videoQueue{"video-buffer-size", 32};
|
||||
|
||||
Reference in New Issue
Block a user