Commit f8ffd57a authored by Thomas Guillem's avatar Thomas Guillem

build: backport vt encoder for chromecast

parent f1e4707b
From bf0d5caa93ac201c2bcb677695528e20d1ff819b Mon Sep 17 00:00:00 2001
From 4775537e9a3857c2c631f70f1344b496dea20b55 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
Date: Thu, 18 Dec 2014 22:14:55 +0100
Subject: [PATCH 01/18] arm_neon: work-around libtool issue
Subject: [PATCH 01/17] arm_neon: work-around libtool issue
---
modules/arm_neon/Makefile.am | 2 ++
......
From b1249111d6b1bab21b7d582725bedc0056e8e17a Mon Sep 17 00:00:00 2001
From 0e8b1b018b07f203d34e4b77c8f717f84850f7fe Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
Date: Wed, 10 Dec 2014 22:14:55 +0100
Subject: [PATCH 02/18] disable neon volume plugin
Subject: [PATCH 02/17] disable neon volume plugin
---
modules/arm_neon/Makefile.am | 1 -
......
From d0d45db08b289da11a23529be31a50249438ebe3 Mon Sep 17 00:00:00 2001
From 2e81ec47e176763158e085057d9701ef476158c6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
Date: Fri, 22 Jul 2016 11:11:44 +0200
Subject: [PATCH 03/18] Enable System DL
Subject: [PATCH 03/17] Enable System DL
---
contrib/src/ffmpeg/patch-as-patch-can.patch | 20 ++++++++++++++++++++
......
From 40a342d3c387a8ab0828ded1b454fefb5d562750 Mon Sep 17 00:00:00 2001
From ee064ce53f3dd5dfb590ecc8b7b8c1166c6fb186 Mon Sep 17 00:00:00 2001
From: Thomas Guillem <thomas@gllm.fr>
Date: Fri, 16 Sep 2016 15:51:10 +0200
Subject: [PATCH 04/18] http: add vlc_http_cookies_clear
Subject: [PATCH 04/17] http: add vlc_http_cookies_clear
Clear all cookies without deleting the jar.
---
......
From 1423905fab5b6cb918dcf858cfad1a29bbd3c7fe Mon Sep 17 00:00:00 2001
From b7447fd2fe5b6986b933d8e0a117a1635775d4fe Mon Sep 17 00:00:00 2001
From: Thomas Guillem <thomas@gllm.fr>
Date: Fri, 16 Sep 2016 15:51:11 +0200
Subject: [PATCH 05/18] libvlc_media: add cookie_jar API
Subject: [PATCH 05/17] libvlc_media: add cookie_jar API
---
include/vlc/libvlc_media.h | 35 +++++++++++++++++++++++++++++++++++
......
From 253c0dc57a8235ca46c4e3d296f07a4eb8f8b321 Mon Sep 17 00:00:00 2001
From 2c608b6bfc2dfe9cff132d8d16c316d54fa2d15d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
Date: Sun, 7 Dec 2014 20:02:18 +0100
Subject: [PATCH 06/18] contrib/gcrypt: work-around a libtool limitation
Subject: [PATCH 06/17] contrib/gcrypt: work-around a libtool limitation
---
contrib/src/gcrypt/rules.mak | 1 +
......
From 8c3cf7190356202d02c8f6fa1f1aadbc4921754e Mon Sep 17 00:00:00 2001
From aa35e69da94471e118f4bd879c24157b896753ae Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
Date: Sat, 3 Oct 2015 22:45:14 +0200
Subject: [PATCH 07/18] contrib/gcrypt: fix tvOS compilation
Subject: [PATCH 07/17] contrib/gcrypt: fix tvOS compilation
---
.../src/gcrypt/fix-sha1-ssse3-for-clang.patch | 16 ++++++++++++++++
......
From 437a1ada2f9b0f658e7766900e11f0f4e30e56d7 Mon Sep 17 00:00:00 2001
From efe6119eea44f642f33155c337e0205cc68de20a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
Date: Mon, 12 Sep 2016 17:03:37 +0200
Subject: [PATCH 08/18] contrib/gcrypt: update patches
Subject: [PATCH 08/17] contrib/gcrypt: update patches
---
.../src/gcrypt/fix-sha1-ssse3-for-clang.patch | 308 +++++++++++++++++-
......
From 7e3d899a9ff37444414f7d337bd0122abb572ef5 Mon Sep 17 00:00:00 2001
From c905d35879df97308b0700e92a095392b4cafd69 Mon Sep 17 00:00:00 2001
From: Thomas Guillem <thomas@gllm.fr>
Date: Mon, 17 Jul 2017 17:03:24 +0200
Subject: [PATCH 09/18] Replace thread local with pthread TSD
Subject: [PATCH 09/17] Replace thread local with pthread TSD
---
src/misc/interrupt.c | 59 ++++++++++++++++++++++++++++++++++++++++++++
......
From 76b00818f5fa5c1722dd860e1f5313cb8181b407 Mon Sep 17 00:00:00 2001
From 7d8cd6dec176afe64d5663419b14bf7af063877f Mon Sep 17 00:00:00 2001
From: Carola Nitz <nitz.carola@googlemail.com>
Date: Fri, 29 Sep 2017 14:49:02 +0200
Subject: [PATCH 10/18] contrib: use live555 version that is compatible with
Subject: [PATCH 10/17] contrib: use live555 version that is compatible with
LGPL2
---
......
From 8dc06538a8a482684420194db68bcda4e6a8dc23 Mon Sep 17 00:00:00 2001
From 2700b538c59b7a2874ab12a03b3820de3566e379 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <felix@feepk.net>
Date: Sun, 17 Dec 2017 18:05:40 +0100
Subject: [PATCH 11/18] libvlc: add a basic API to change freetype's color,
Subject: [PATCH 11/17] libvlc: add a basic API to change freetype's color,
bold, font and size variables on-the-fly
---
......
From e1106f9c6599da8b3c35752af42c935f98c0e895 Mon Sep 17 00:00:00 2001
From bdf3d726e3bdc5fd0674ba626083ba5a4f7f9cd1 Mon Sep 17 00:00:00 2001
From: Carola Nitz <nitz.carola@googlemail.com>
Date: Fri, 23 Feb 2018 13:16:41 +0100
Subject: [PATCH 12/18] Work around lack of __thread storage qualifier on old
Subject: [PATCH 12/17] Work around lack of __thread storage qualifier on old
macOS
---
......
From b281c9b5d94754dd93f0406943171b3ca24b781d Mon Sep 17 00:00:00 2001
From 8ed518755afd1af6300203e493855aa90dba3412 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hugo=20Beauz=C3=A9e-Luyssen?= <hugo@beauzee.fr>
Date: Mon, 26 Mar 2018 16:44:44 +0200
Subject: [PATCH 13/18] modules:common: Use the full module name as MODULE_NAME
Subject: [PATCH 13/17] modules:common: Use the full module name as MODULE_NAME
This avoid conflicts when linking modules staticly on platforms that don't
have objdump
......
From 9f44e0b6609cc396429b309dfeded220cf769068 Mon Sep 17 00:00:00 2001
From 2fd059124fb02972d4354ff299ab408b55e2f6cd Mon Sep 17 00:00:00 2001
From: Luis Fernandes <zipleen@gmail.com>
Date: Mon, 30 Apr 2018 14:33:08 +0100
Subject: [PATCH 14/18] add auto deinterlacer-mode which is also valid
Subject: [PATCH 14/17] add auto deinterlacer-mode which is also valid
---
lib/video.c | 3 ++-
......
From 1739ea67d1a2df1d51456d37e4cfc25dcc46f783 Mon Sep 17 00:00:00 2001
From 667effb586ddf77d5172a39c02e37dca4208ac23 Mon Sep 17 00:00:00 2001
From: Luis Fernandes <zipleen@gmail.com>
Date: Wed, 9 May 2018 10:44:43 +0100
Subject: [PATCH 15/18] Users will be able to change the deinterlace mode
Subject: [PATCH 15/17] Users will be able to change the deinterlace mode
without forcing it.
---
......
From 49c6a2cba2a106aabd1bd535515d7088ac307353 Mon Sep 17 00:00:00 2001
From ef0fa9fef56718a187c03191caf72790af86b04a Mon Sep 17 00:00:00 2001
From: Thomas Guillem <thomas@gllm.fr>
Date: Tue, 27 Mar 2018 16:49:34 +0200
Subject: [PATCH 16/18] contrib: ffmpeg: enable videotoolbox encoder
Subject: [PATCH 16/17] contrib: ffmpeg: enable videotoolbox encoder
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
......
From 27f49e70a850b8c746048a961040e68334278e9d Mon Sep 17 00:00:00 2001
From: Thomas Guillem <thomas@gllm.fr>
Date: Tue, 27 Mar 2018 16:52:35 +0200
Subject: [PATCH 17/17] chromecast: use vt encoder from avcodec
---
modules/stream_out/chromecast/cast.cpp | 33 ++++++++++++++++++++++++++
1 file changed, 33 insertions(+)
diff --git a/modules/stream_out/chromecast/cast.cpp b/modules/stream_out/chromecast/cast.cpp
index b330b70297..47a2758259 100644
--- a/modules/stream_out/chromecast/cast.cpp
+++ b/modules/stream_out/chromecast/cast.cpp
@@ -956,12 +956,45 @@ static std::string GetVencX264Option( sout_stream_t * /* p_stream */,
return ssout.str();
}
+#ifdef __APPLE__
+static std::string GetVencAvcodecVTOption( sout_stream_t * /* p_stream */,
+ const video_format_t * p_vid,
+ int i_quality )
+{
+ const bool b_hdres = p_vid == NULL || p_vid->i_height == 0 || p_vid->i_height >= 800;
+ std::stringstream ssout;
+ ssout << "venc=avcodec{codec=h264_videotoolbox,options{realtime=1}}";
+ if( b_hdres )
+ {
+ switch( i_quality )
+ {
+ /* Here, performances issues won't come from videotoolbox but from
+ * some old chromecast devices */
+
+ case CONVERSION_QUALITY_HIGH:
+ break;
+ case CONVERSION_QUALITY_MEDIUM:
+ ssout << ",vb=8000000";
+ break;
+ case CONVERSION_QUALITY_LOW:
+ case CONVERSION_QUALITY_LOWCPU:
+ ssout << ",vb=3000000";
+ break;
+ }
+ }
+
+ return ssout.str();
+}
+#endif
static struct
{
vlc_fourcc_t fcc;
std::string (*get_opt)( sout_stream_t *, const video_format_t *, int);
} venc_opt_list[] = {
+#ifdef __APPLE__
+ { .fcc = VLC_CODEC_H264, .get_opt = GetVencAvcodecVTOption },
+#endif
{ .fcc = VLC_CODEC_H264, .get_opt = GetVencX264Option },
{ .fcc = VLC_CODEC_VP8, .get_opt = GetVencVPXOption },
{ .fcc = VLC_CODEC_H264, .get_opt = NULL },
--
2.17.0
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment