From 6fcc63ee9ea7660080de985ef07931418b6e2183 Mon Sep 17 00:00:00 2001 From: Iwan Timmer Date: Tue, 5 Apr 2016 20:44:57 +0200 Subject: [PATCH 1/3] Workaround for decoding special case of C1, 1080p, H264 --- src/video/aml.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/video/aml.c b/src/video/aml.c index 704ab45..be67e83 100644 --- a/src/video/aml.c +++ b/src/video/aml.c @@ -20,6 +20,7 @@ #include +#include #include #include #include @@ -28,8 +29,10 @@ #include #include +#define SYNC_OUTSIDE 0x02 +#define UCODE_IP_ONLY_PARAM 0x08 + static codec_para_t codecParam = { 0 }; -static const size_t SYNC_OUTSIDE = (2); static int osd_blank(char *path,int cmd) { int fd; @@ -57,6 +60,7 @@ void aml_setup(int videoFormat, int width, int height, int redrawRate, void* con codecParam.stream_type = STREAM_TYPE_ES_VIDEO; codecParam.has_video = 1; codecParam.noblock = 0; + codecParam.am_sysinfo.param = 0; switch (videoFormat) { case VIDEO_FORMAT_H264: @@ -66,6 +70,14 @@ void aml_setup(int videoFormat, int width, int height, int redrawRate, void* con } else { codecParam.video_type = VFORMAT_H264; codecParam.am_sysinfo.format = VIDEO_DEC_FORMAT_H264; + + // Workaround for decoding special case of C1, 1080p, H264 + int major, minor; + struct utsname name; + uname(&name); + int ret = sscanf(name.release, "%d.%d", &major, &minor); + if (!(major > 3 || (major == 3 && minor >= 14)) && width == 1920 && height == 1080) + codecParam.am_sysinfo.param = UCODE_IP_ONLY_PARAM; } break; case VIDEO_FORMAT_H265: @@ -80,7 +92,7 @@ void aml_setup(int videoFormat, int width, int height, int redrawRate, void* con codecParam.am_sysinfo.width = width; codecParam.am_sysinfo.height = height; codecParam.am_sysinfo.rate = 96000 / redrawRate; - codecParam.am_sysinfo.param = (void *)(SYNC_OUTSIDE); + codecParam.am_sysinfo.param |= SYNC_OUTSIDE; int api = codec_init(&codecParam); if (api != 0) { From de2d581bef401b2e7b09ad148dd9eb642677a500 Mon Sep 17 00:00:00 2001 From: Unknownforce351 Date: Tue, 26 Apr 2016 13:46:33 -0500 Subject: [PATCH 2/3] Fix compile warning --- libgamestream/client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libgamestream/client.c b/libgamestream/client.c index 937cba3..7eec0eb 100644 --- a/libgamestream/client.c +++ b/libgamestream/client.c @@ -337,7 +337,7 @@ static int sign_it(const char *msg, size_t mlen, unsigned char **sig, size_t *sl return result; } -static bool verifySignature(const char *data, int dataLength, const char *signature, int signatureLength, const char *cert) { +static bool verifySignature(const char *data, int dataLength, char *signature, int signatureLength, const char *cert) { X509* x509; BIO* bio = BIO_new(BIO_s_mem()); BIO_puts(bio, cert); From 1b2841a5bf39f10367877b84013df5ed322d0578 Mon Sep 17 00:00:00 2001 From: Iwan Timmer Date: Tue, 17 May 2016 19:58:48 +0200 Subject: [PATCH 3/3] Update moonlight-common-c --- third_party/moonlight-common-c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third_party/moonlight-common-c b/third_party/moonlight-common-c index a6d9ab0..6659e28 160000 --- a/third_party/moonlight-common-c +++ b/third_party/moonlight-common-c @@ -1 +1 @@ -Subproject commit a6d9ab0664c6e5229674b84f2591be4d04c79239 +Subproject commit 6659e2889daba2f07bd7c0ffd567c8e4d93549dc