Autouse HEVC on selected platforms

This commit is contained in:
Iwan Timmer
2016-04-02 16:55:44 +02:00
parent be4a13aead
commit 52b4c8ad59
3 changed files with 13 additions and 3 deletions

View File

@@ -181,6 +181,7 @@ int main(int argc, char* argv[]) {
fprintf(stderr, "Platform '%s' not found\n", config.platform);
exit(-1);
}
config.stream.supportsHevc = config.stream.supportsHevc || platform_supports_hevc(system);
if (strcmp("map", config.action) == 0) {
if (config.address == NULL) {

View File

@@ -1,7 +1,7 @@
/*
* This file is part of Moonlight Embedded.
*
* Copyright (C) 2015 Iwan Timmer
* Copyright (C) 2015, 2016 Iwan Timmer
*
* Moonlight is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -22,7 +22,6 @@
#include "platform.h"
#include "audio.h"
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
@@ -112,3 +111,11 @@ AUDIO_RENDERER_CALLBACKS* platform_get_audio(enum platform system) {
}
return NULL;
}
bool platform_supports_hevc(enum platform system) {
switch (system) {
case AML:
return true;
}
return false;
}

View File

@@ -1,7 +1,7 @@
/*
* This file is part of Moonlight Embedded.
*
* Copyright (C) 2015 Iwan Timmer
* Copyright (C) 2015, 2016 Iwan Timmer
*
* Moonlight is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -20,6 +20,7 @@
#include <Limelight.h>
#include <dlfcn.h>
#include <stdbool.h>
#include <stdlib.h>
#include <stdio.h>
@@ -30,6 +31,7 @@ enum platform { NONE, SDL, PI, IMX, AML, FAKE };
enum platform platform_check(char*);
PDECODER_RENDERER_CALLBACKS platform_get_video(enum platform system);
PAUDIO_RENDERER_CALLBACKS platform_get_audio(enum platform system);
bool platform_supports_hevc(enum platform system);
#ifdef HAVE_FAKE
extern DECODER_RENDERER_CALLBACKS decoder_callbacks_fake;