mirror of
https://github.com/moonlight-stream/moonlight-embedded.git
synced 2025-07-01 23:35:47 +00:00
Show platform name when verbose option is on
This commit is contained in:
parent
e06a78130a
commit
b0660e9dd3
@ -240,6 +240,8 @@ int main(int argc, char* argv[]) {
|
|||||||
} else if (strcmp("stream", config.action) == 0) {
|
} else if (strcmp("stream", config.action) == 0) {
|
||||||
pair_check(&server);
|
pair_check(&server);
|
||||||
enum platform system = platform_check(config.platform);
|
enum platform system = platform_check(config.platform);
|
||||||
|
if (config.debug_level > 0)
|
||||||
|
printf("Platform %s\n", platform_name(system));
|
||||||
|
|
||||||
if (system == 0) {
|
if (system == 0) {
|
||||||
fprintf(stderr, "Platform '%s' not found\n", config.platform);
|
fprintf(stderr, "Platform '%s' not found\n", config.platform);
|
||||||
|
@ -171,3 +171,24 @@ bool platform_supports_hevc(enum platform system) {
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
char* platform_name(enum platform system) {
|
||||||
|
switch(system) {
|
||||||
|
case PI:
|
||||||
|
return "Raspberry Pi (Broadcom)";
|
||||||
|
case IMX:
|
||||||
|
return "i.MX6 (MXC Vivante)";
|
||||||
|
case AML:
|
||||||
|
return "AMLogic VPU";
|
||||||
|
case X11:
|
||||||
|
return "X Window System (software decoding)";
|
||||||
|
case X11_VDPAU:
|
||||||
|
return "X Window System (VDPAU)";
|
||||||
|
case SDL:
|
||||||
|
return "SDL2 (software decoding)";
|
||||||
|
case FAKE:
|
||||||
|
return "Fake (no a/v output)";
|
||||||
|
default:
|
||||||
|
return "Unknown";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -32,6 +32,7 @@ enum platform platform_check(char*);
|
|||||||
PDECODER_RENDERER_CALLBACKS platform_get_video(enum platform system);
|
PDECODER_RENDERER_CALLBACKS platform_get_video(enum platform system);
|
||||||
PAUDIO_RENDERER_CALLBACKS platform_get_audio(enum platform system, char* audio_device);
|
PAUDIO_RENDERER_CALLBACKS platform_get_audio(enum platform system, char* audio_device);
|
||||||
bool platform_supports_hevc(enum platform system);
|
bool platform_supports_hevc(enum platform system);
|
||||||
|
char* platform_name(enum platform system);
|
||||||
|
|
||||||
void platform_start(enum platform system);
|
void platform_start(enum platform system);
|
||||||
void platform_stop(enum platform system);
|
void platform_stop(enum platform system);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user